Re: gdk_draw_string deprecated?

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

 



On Tue, 2003-10-14 at 13:39, Andrej Prsa wrote:
> Hi!
> 
> > > Could anyone tell me what to use if gdk_draw_string and 
> > > gdk_draw_text are deprecated? I want to put labels to my 
> > > graph on a drawable?
> > 
> > PangoLayout, I think. There is some information here:
> > http://developer.gnome.org/dotplan/porting/ar01s10.html
> 
> Thanks; I'm trying to make a transition and the following bugs me already:
> 
> 	PangoContext *context = pango_context_new ();
> 
> This line gives me the warning:
> 
> 	initialization makes pointer from integer without a cast

This says the compiler has generated a default signature for the
pango_context_new function which returns an int because it did not find
the function declaration. Looking a the pango/pango-context.h header
shows the function declaration is enclosed in #ifdef/#endif which are
true only if you build a pango module which is not what you want to do
here.

pango_context_new is a private function used only by subclasses of
PangoContext. Instead, you want to instantiate a subclass for your
platform.

I am not sure what you are trying to do but you can get the platform's
default context object for a given layout with pango_layout_get_context.

regards,
Mathieu
-- 
Mathieu Lacage <mathieu@xxxxxxx>

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux