Tue Dec 7 07:50:01 EST 2004
To implement this with a WindProc, instead of passing the LCL self to the GTK object, instead pass the xxxCallbackInterface self to the object. The xxxCallbackInterface has the LCL object Self stored. Interfaces It takes the GTK callback information and instead of retrieving the LCL self, it instead gets the xxxCallbackInterface self. From there, it calls a Transmit message routine, which reformats the callback data to an LCL message, and then calls the LCL Self WindProc. This WindProc then calls Dispatch.
This would give each LCL component its own WindProc, and only replace the LCL self with a new xxxCallbackInterface self in the GTK callbacks. Two additional layer of redirection, I suppose, the xxxCallbackInterface and the WindProc itself.
Is this not possible? What am I missing?
>What you would have to do is create a message for the LCL controls (I
>guess the base class) that is the wndproc method. then you would have to
>have all messages (signals) that come in from GTK be sent to the
>Dispatch which would call the wndproc for the correct object. Then this
>wndproc method would have to have a large case statement to deal with
>every kind of message that needs to be dealt with.
>Does that get you where you want to go?
That gets you to the opposite of my first attempt at making Win32 look like GTK. There, I had one "true" (in the Win32 sense) WindProc. I can tell you from the other side, this is definitely -NOT- the way to go.
More information about the Lazarus