gdkfont.h

Go to the documentation of this file.
00001 #ifndef __GDK_FONT_H__
00002 #define __GDK_FONT_H__
00003 
00004 #include <gdk/gdktypes.h>
00005 
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif                          /* __cplusplus */
00009 
00010 /* Types of font.
00011  *   GDK_FONT_FONT: the font is an XFontStruct.
00012  *   GDK_FONT_FONTSET: the font is an XFontSet used for I18N.
00013  */
00014    typedef enum {
00015       GDK_FONT_FONT,
00016       GDK_FONT_FONTSET
00017    } GdkFontType;
00018 
00019    struct _GdkFont {
00020       GdkFontType type;
00021       gint ascent;
00022       gint descent;
00023    };
00024 
00025    gchar **gdk_font_list_new(const gchar * font_pattern,
00026                              gint * n_returned);
00027    void gdk_font_list_free(gchar ** font_list);
00028 //-----------------------------------------------------------------------------
00029    GdkFont *gdk_font_load(const gchar * font_name);
00030    GdkFont *gdk_fontset_load(const gchar * fontset_name);
00031    GdkFont *gdk_font_ref(GdkFont * font);
00032    void gdk_font_unref(GdkFont * font);
00033    gint gdk_font_id(const GdkFont * font);
00034    gboolean gdk_font_equal(const GdkFont * fonta, const GdkFont * fontb);
00035 
00036    gint gdk_string_width(GdkFont * font, const gchar * string);
00037    gint gdk_text_width(GdkFont * font,
00038                        const gchar * text, gint text_length);
00039    gint gdk_text_width_wc(GdkFont * font,
00040                           const GdkWChar * text, gint text_length);
00041    gint gdk_char_width(GdkFont * font, gchar character);
00042    gint gdk_char_width_wc(GdkFont * font, GdkWChar character);
00043    gint gdk_string_measure(GdkFont * font, const gchar * string);
00044    gint gdk_text_measure(GdkFont * font,
00045                          const gchar * text, gint text_length);
00046    gint gdk_char_measure(GdkFont * font, gchar character);
00047    gint gdk_string_height(GdkFont * font, const gchar * string);
00048    gint gdk_text_height(GdkFont * font,
00049                         const gchar * text, gint text_length);
00050    gint gdk_char_height(GdkFont * font, gchar character);
00051 
00052    void gdk_text_extents(GdkFont * font,
00053                          const gchar * text,
00054                          gint text_length,
00055                          gint * lbearing,
00056                          gint * rbearing,
00057                          gint * width, gint * ascent, gint * descent);
00058    void gdk_text_extents_wc(GdkFont * font,
00059                             const GdkWChar * text,
00060                             gint text_length,
00061                             gint * lbearing,
00062                             gint * rbearing,
00063                             gint * width, gint * ascent, gint * descent);
00064    void gdk_string_extents(GdkFont * font,
00065                            const gchar * string,
00066                            gint * lbearing,
00067                            gint * rbearing,
00068                            gint * width, gint * ascent, gint * descent);
00069 
00070    gchar *gdk_font_full_name_get(GdkFont * font);
00071    void gdk_font_full_name_free(gchar * name);
00072 
00073 #ifdef __cplusplus
00074 }
00075 #endif                          /* __cplusplus */
00076 #endif                          /* __GDK_FONT_H__ */

Generated on Tue Jul 5 14:14:37 2011 for ROOT_528-00b_version by  doxygen 1.5.1