Hmm, that was just an idea. The problem I am trying to solve is more about efficiency and…
Michal Bukovjan wroteI presume that gtkint.pp, as well as lmessages.pp, should now only about TControl, NOT its descendants.
No that is not the case.
Show quoted text 8 lines
Here is what is going on in a nut shell. We are trying to remove gtk, gdk, and glib dependence from the LCL (Lazarus class libraries). We are doing this by placing ALL gtk+ calls within one unit. At this point in time it is called gtkint.pp (plus .inc's). The LCL components and controls don't know anything about the gtkint and how it does anything. The LCL just passes requests to the gtkint unit with the SendMessage function. However the gtkint knows ALL about the LCL. It can access, refer to, place in uses clause ANY LCL unit and use the information found there. So if you want to declare a unit in the uses clause of gtkint for an LCL control so that you can access class information, go right ahead.
Again let me repeat this. In the end all of the standard LCL units will NOT reference gtk, gdk, glib, or gtkint (aka interfaces). The only unit that will reference the gtkint (aka interfaces) unit will be controls.pp and the only unit that will reference the gtk, gdk, glib will be gtkint (aka interfaces).
**************************************
|-------| * |--------| |-------| | |----> calls from LCL ---->| |--> calls to -->| | | LCL | to widget set * | gtkint | | gtk+ | | | via SendMessage * | |<--callbacks <--| | |-------| * |--------| from |-------| ^ * |
| calls to anyplace * |
|--- in the LCL accessing <---------|
a class object *
**************************************
Everything with the asterisk section is what is GUI API specific. By keeping this type of separation we will be able to plunk a different set of code for different API's into this area with out modifing the LCL. The LCL just talks to this via the SendMessage function. It doesn't know what the API must do to honor that message request.
I think this is far more information than you were asking about but I thought it might also help the lurkers on the list. :-)
