Re: stupid question regarding pixmaps and reference counts
- From: Deborah Swayne <dfs research att com>
- To: Olexiy Avramchenko <ath beast stu cn ua>
- Cc: NavEcos <ecos navosha com>, gtk-list gnome org
- Subject: Re: stupid question regarding pixmaps and reference counts
- Date: Thu, 19 Sep 2002 08:51:51 -0400
> >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]