Re: missing prototype for pango_context_new?

Ross McFarland wrote:

pcg goof com ( Marc) (A.) (Lehmann ) said:
While compiling Gtk2, I get this warning:

  PangoContext.c: In function `XS_Gtk2__Pango__Context_new':
  PangoContext.c:44: warning: assignment makes pointer from integer without a

Might be a missing include or something else. I have no idea and don't
really understand why the prototype for pango_context_new is not there
while all the other prototypes seem to be there.

i can't repeat it.

try greping the pango include dir for pango_context_new. if that works see if
the file it's in (should be pango-context.h) is included in pango.h.
I get the same warning when compiling the new 2.3.x stuff.

I looked into it, and found the following in the documentation in pango-1.3.0 about pango_context_new:

This function is only useful when implementing a new backend for Pango, something applications won't do. You should use the context creation function for the backend you are using, for example, pango_xft_get_context() <>, pango_win32_get_context() <> or, pango_ft2_font_map_create_context() <>.

If you are using Pango as part of a higher-level system, that system may have it's own ways of create a PangoContext <>. For instance, the GTK+ toolkit has, among others, gdk_pango_context_get_for_screen() <file:///home/lfs/gtk-2.3.0/pango-1.3.0/docs/gdk/gdk-Pango-Interaction.html#gdk-pango-context-get-for-screen>, and gtk_widget_get_pango_context() <file:///home/lfs/gtk-2.3.0/pango-1.3.0/docs/gtk/GtkWidget.html#gtk-widget-get-pango-context>.


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