Re: Simple GdkFont and GtkStyle question



learfox furry ao net writes:

When I gdk_font_load() a new, I need to gdk_font_ref() it once right after
loading?

ie:

    style->font = gdk_font_load(...);
    gdk_font_ref(style->font);


No, when you load a font you own one refcount immediately.

Havoc

I'm having a problem here, I'm copying a style and loading a font as
follows:

        style = gtk_style_copy(orig_style);
        gdk_font_unref(style->font);
        style->font = gdk_font_load(...);

Then later on in my code, how do I unref the coppied style and font?

When I:

        gtk_style_unref(style);

Will that also unref its font?


--
Sincerely,                  ,"-_                         \|/
-Capt. Taura M.             ,   O=__                    --X--
..__                         ,_JNMNNEO=_                 /|\
OMNOUMmnne.                  {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn.               'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe              '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe.                "7OMMMMNNNNNWWEEEEOOOOOO"   "'.
EEBNNMMMNWNWWEEIMMNe.             __  7EMMMNNNNNWWWEEEEEEEOO.     " .
NNMMMMWWWMMMWEINMMMNn            "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._     .
                  http://furry.ao.net/~learfox/





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