Re: How to access a GObject's class?



On 24 Jun 2001 11:04:12 -0400, Owen Taylor wrote:
> 
> 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.
> 
that's what I should have done (look at GTK). I was looking in libbonobo and in the
glib sources :-)

thanks

--
Rodrigo Moya <rodrigo gnome-db org> - <rodrigo ximian com>
http://www.gnome-db.org/ - http://www.ximian.com/




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