Re: Private GObject-derived structs



Murray Cumming wrote:

If a type's struct is private but I know that it is a GObject (for
instance, PangoContext), can I treat it like a GObject? For instance,
should I g_object_ref/unref() a PangoContext* from
gtk_widget_get_context().

Yes you can use g_object_* functions on them, just like any other GObject. Making the structs private is to discourage you from subclassing them. (having the structs private can make header parsing tools miss the object though).

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]