[go: nahoru, domu]

Jump to content

GObject

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 217.231.152.15 (talk) at 12:02, 17 January 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

GObject is a library and framework which provides object oriented programming techniques for the programming language C. Its approach is compareable to that of Objective C. It is the fundament of all Gtk+/Gnome applications. GObject is the base class of all Gtk+/Gnome classes. GObject also provides additional features like events, boxing of datatypes and collection classes e.g. strings, lists, hashtables and n-ary trees. Unlike C++ object orientation with GObject does not allow multiple inheritance. Instead it uses interface classes like Java or C# does. A class in GObject is implemented by at least two C structs: One that holds the information for the class e.g. methods/vtable and the other contains the instance information e.g. member variables. There are no access modifiers "public, protected, private" like in C++, C# or Java but private members can be implemented by an additional, hidden struct which is not defined in the C header files of that class.