[lazarus] Wrapping glib with objects

John Margaglione jmargaglione at hotmail.com
Mon Jun 14 17:50:06 EDT 1999


You lost me.  What do you mean by "cast them internally"?  Do you mean the
wrapped class, or the TObject being passed to a function of the wrapped
class?

> Wrapping glib is a good idea.  In reference to your queastions:
> 1) Why not pass around TObjects and type cast them internally as a
TLinkedList or whatever and store the gpointer within the class itself.
Then you can pass the gpointer within the class that they passed
you....understand?

> 2) I would go with TThread simply because our thought here is to create a
Delphi-like environment and even if it's not perfect we would like to port
over Delphi apps into this environment and have them compile.  Creating a
TThread to be added to our library would be useful.

Michael C. says we already have a TThread class.  I'll look into the source
and see if I can dig it up.  If we have a usuable TThread class, I see no
reason to make another one.  Unless there is additional functionality to be
had.  Actually, TThread in Delphi never handled mutexes and semaphores, so
maybe there is some merit.  I'm not sure how well using TThread as a
descendant will work.

This brings me to another issue:  I realize the importance of bringing over
current Delphi projects, and therefore we need a compatible interface.
However, I would very much like to see us fix any of the deficiencies of
Delphi (real container classes and thread management classes come to mind).
This interface should probably be separate from the main interface.  Unless
we want to start using real-live interfaces (pure abstract classes) as a
basis for our libraries.

But,

I'll be working on the first version of the interfaces this week.  If there
are any particular wrappings that you need, please let me know and I will
boot them to the top of the list.  I'll most likely start off with linked
lists, then move to hashtables, then maybe the thread stuff.

John Margaglione
jmargaglione at hotmail.com







More information about the Lazarus mailing list