Re: [gtk-list] Re: Interpreter requests



On 9 Jun 1998, Marius Vollmer wrote:

> Tim Janik <timj@gtk.org> writes:
> 
> > GtkType
> > foo_enum_get_type (void)
> > {
> [...]
> > }
> 
> Wouldn't it be better to just add gtk_type_register_enum /
> gtk_type_register_flags / etc functions to Gtk, so that
> foo_enum_get_type could just look like:
 
>     GtkType
>     foo_enum_get_type (void)
>     {
>       static GtkType type = GTK_TYPE_INVALID;
>       if (type == GTK_TYPE_INVALID)
>         type = gtk_type_register_enum ("FooEnum", foo_enum_values);
>       return type;
>     }
[...]

Looks good to me, yes.

-- 
Kenneth Albanowski (kjahds@kjahds.com, CIS: 70705,126)




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