Re: How to access a GObject's class?



Rodrigo Moya <rodrigo gnome-db org> writes:

> Hi!
> 
> I can't seem to find the correct way to access the class for a specific
> GObject instance. That is, how would I replace:
> 
> #define CLASS(cnc)  (GDA_SERVER_CONNECTION_CLASS (GTK_OBJECT
> (cnc)->klass))
> 
> for glib 2.0?

#define GTK_TEXT_BUFFER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TEXT_BUFFER, GtkTextBufferClass))

Every GTK+-2.0 (and GTK+-1.2, for that matter) object class should
have such a macro.

Regards,
                                        Owen 




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