Marc Weustink wrote
What eventqueue related code are you talking about and which forms*
files ?
Maybe in fact the form* files need not to be targeted directly.
Here some locations in the code used by "gtk" that lead to code-sequences that I think could be cleaned up to separate the message queue code from the gui code.
gtkmsgque.pp 47:
TGtkMessageQueue=class(TLinkList)
defines the event queue object
gtkwinapi.inc 7402:
function TGtkWidgetSet.PostMessage(Handle: HWND; Msg: Cardinal;
wParam: WParam;
here events are inserted into the queue
gtkwidgetset.inc 1204:
procedure TGtkWidgetSet.AppProcessMessages;
here we wait for events and events are taken out of the queue
gtkwidgetset.inc 1224:
gtk_main_iteration_do(False);
My suggestion includes that e.g.
- the "MessageQueue" class is defined independently of the Widget Type ("Interface") as a simple ubiquitously usable object.using inheritance/functions/properties/callbacks to interface whatever Widget type specific code uses it.
- AppProcessMessages is defined in a file independent of the Widget type and done way that is independent of the Widget type, interfacing the Widget type actually used by inheritance/functions/properties/callbacks
-Michael