Re: Adding g_object_get_type?
- From: James Henstridge <james daa com au>
- To: Darin Adler <darin bentspoon com>
- Cc: Havoc Pennington <hp redhat com>, Gtk Developers <gtk-devel-list gnome org>
- Subject: Re: Adding g_object_get_type?
- Date: Wed, 14 Nov 2001 11:45:04 +1100
Darin Adler wrote:
on 11/9/01 11:30 AM, Havoc Pennington at hp redhat com wrote:
The "official doctrine" is indeed that you should never put the
foo_get_type() functions in your code, always use FOO_TYPE macros
instead, because some types are fundamental/builtin and thus not
registered via function.
OK. It's too bad because then I have to pass the class name in three formats
for macros that do things related to classes. Normal:
GtkObject
Function prefix style:
gtk_object
And type macro:
GTK_TYPE_OBJECT
If the get_type functions always existed, then I wouldn't need the third
format at all. But now I understand that this is not the gobject way.
Shouldn't you just be able to take the second form, convert to upper
case and replace the first occurence of '_' with '_TYPE_'? That is what
I do in my code generator for pygtk.
James.
--
Email: james daa com au
WWW: http://www.daa.com.au/~james/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]