[Lazarus] LCL-fpGUI widgetset and COM interfaces
Graeme Geldenhuys
graemeg.lists at gmail.com
Mon Jan 10 14:27:02 CET 2011
Hi,
While looking at the LCL-fpGUI code for a reply to a previous message, I
noticed something...
Is it really necessary for LCL-fpGUI to use COM-style interfaces? After
all, TFGGUIPrivate overrides the COM memory management anyway. So
wouldn't it be better and probably more efficient to simply use
CORBA-style interfaces instead?
I'm not well versed in the LCL-fpGUI widgetset code, so if there really
is an advantage to using COM-style interface in this widgetset, would
somebody so kind as to explain those advantages. Many thanks.
---8<-----------8<-----------8<-----------8<-----------8<-----------
⋮
type
IContainer = interface(IInterface)
procedure AddChild(AWidget: TfpgWidget);
procedure RemoveChild(AWidget: TfpgWidget);
end;
TFPGUIPrivate = class(TInterfacedObject)
function _AddRef : longint;stdcall;
function _Release : longint;stdcall;
end;
⋮
---8<-----------8<-----------8<-----------8<-----------8<-----------
Regards,
- Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
More information about the Lazarus
mailing list