Re: Adding g_object_get_type?
- From: Tim Janik <timj gtk org>
- To: Darin Adler <darin bentspoon com>
- Cc: Gtk Developers <gtk-devel-list gnome org>
- Subject: Re: Adding g_object_get_type?
- Date: Sat, 10 Nov 2001 18:47:05 +0100 (CET)
On Sat, 10 Nov 2001, Darin Adler wrote:
> on 11/10/01 9:17 AM, Tim Janik at timj gtk org wrote:
>
> > i don't know what passing you're exactly talking about, but what about:
> > C-Type: GtkObject
> > Type: GTK_TYPE_OBJECT
> >
> > and forget about *_get_type() variants that are not always present?
>
> I think it's a waste of time to belabor this point on the list, because I
> know it's not going to lead to any change to gtk, but just FYI. Here are the
> four parameters used for this one macro:
>
> MyClass, my_class,
> GtkObject, GTK_TYPE_OBJECT
>
> It would be *way* more elegant to have:
>
> MyClass, my_class,
> GtkObject, gtk_object
>
> But anyway, lets not waste any more time on this. I thought you guys might
> be receptive to adding a few trivial *_get_type functions to make the thing
> slightly more orthogonal. If not, there's no need to waste a lot of time
> discussing it.
this looks fairly redundant. i still don't know what you're using
this macro for, but if you can use a code generator, we already have
routines that can generate all of GTK_FOO_XBAR/GTK_TYPE_FOO_XBAR,
gtk_foo_xbar/gtk_foo_xbar_get_type, etc. from giving just the capitalized
version GtkFooXBar.
e.g. in perl: glib-mkenums, the rules for generating $enumshort and friends,
or in C: beast/bsw/mkapi.c the function tmacro_from_type() and friends.
>
> -- Darin
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]