GObject style questions (interfaces)



I've just mustered the courage to venture into the wonderful world of
GObject and object oriented C.

I've mostly used two sources:

 - The GObject reference manual:
   http://developer.gnome.org/doc/API/2.0/gobject/index.html
 - The GObject FAQ:
   http://s1x.homelinux.net/documents/gtk/gobject-faq.html

I'm looking at interfaces and see that they differ in naming (the FAQ is
actually inconsistent in itself).

Questions:
1. Do I need the *_CLASS macros for interfaces? The FAQ defines them
   all but the reference manual doesn't.
2. The macro for getting the interface is called *_GET_IFACE in the FAQ
   and the reference manual uses the longer *_GET_INTERFACE, which one
   should I use?
3. The naming of the "class" of the interface (i.e. the struct that
   inherits from GTypeInterface) is unclear. The FAQ is inconsistent and
   seems to use *Iface in some places and *Class in others. The
   reference manual uses *Interface. Again, which one should I use?

/M

-- 
Magnus Therning                             (OpenPGP: 0xAB4DFBA4)
magnus therning org             Jabber: magnus therning gmail com
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.
     -- R.P. Feynman

Attachment: pgpZj0Gdpflx9.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]