Re: stupid question regarding pixmaps and reference counts



> >How do I get the reference count of a GdkPixmap?
> >
> Hello (it's about gtk+-2.0),
> It says right, cause GObject -> GdkDrawable -> GdkPixmap.
> You have to cast to GObject*, not to GtkObject*.
> So all you need is: ((GObject*)pixmap)->ref_count.

Right, my code for checking the reference count of a widget
looks like this:

#if GTK_MAJOR_VERSION == 1
            if (GTK_OBJECT (box)->ref_count > 1)
#else
            if (G_OBJECT (box)->ref_count > 1)
#endif

Debby



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