gtk2/gdk/gdkfont.h
Owen Taylor 425b9886c9 Start of integration of Erwann Chenede's multihead work from the
Thu Apr 25 16:51:40 2002  Owen Taylor  <otaylor@redhat.com>

        Start of integration of Erwann Chenede's multihead work
        from the gtk-multihead branch.

        * gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch]
        gdk/x11/gdkdisplay-x11.[ch] gdk/x11/gdkscreen-x11.[ch]
        New classes representing a set of screens with attached
        input devices and a single contiguous area, respectively.

        * gdk/gdk.[ch] gdk/gdkinternals.h gdk/x11/gdkmain-x11.c:
        gdk/x11/gdkprivate-x11.h: Make the initialization interface
        simple _gdk_windowing_init() and do the rest in
        gdk_open_display() calls.

        * gdk/gdk.[ch]: Add gdk_parse_args() which can be used
        to do the display-independent part of initialization
        instead of gdk_init_[check].

        * gdk/gdkcursor.h gdk/gdkfont.h gdk/gdkkeys.h gdk/gdkpixmap.h
        gdk/gdkproperty.h gdk/gdkselection.h gdk/gdkwindow.h:
        Add multihead variants (_for_display(), for_screen()) of functions
        getting information specific to a particular screen screen or
        display.

        * gdk/gdkscreen.[ch]: Add gdk_screen__* variants of functions
        like gdk_rgb_get_colormap() that used to get/list global
        objects.

        * gdk/x11/gdkx.h: Add functions for converting GdkScreen
        and GdkDisplay into the X equivalents.

        * gdk/x11/gdkwindow-x11.c: Removed gdk_window_xid_at_coords()
        not in the headers and unused.

        * configure.in gdk/x11/{gxid.c,gxid_lib.[ch],gdkinput-gxi.c}:
        Remove gxid support ... has not been tested for a long time...
        "xfree" support is more portable to non XFree86.

        * gdk/**.h: Add a GDK_MULTIHEAD_SAFE define that can be
        used to turn off functions that are inherently non-multihead
        safe.

        * gdk/**.c: add GDK_NOTE(multihead, ...) calls when functions
        are used in non-multihead-safe ways.

        * gdk/*.c gdk/x11/*.c: Changes to make the internals of GDK
        multihead safe.
2002-04-25 22:29:14 +00:00

119 lines
3.4 KiB
C

#ifndef GDK_DISABLE_DEPRECATED
#ifndef __GDK_FONT_H__
#define __GDK_FONT_H__
#include <gdk/gdktypes.h>
#include <pango/pango-font.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define GDK_TYPE_FONT gdk_font_get_type ()
/* Types of font.
* GDK_FONT_FONT: the font is an XFontStruct.
* GDK_FONT_FONTSET: the font is an XFontSet used for I18N.
*/
typedef enum
{
GDK_FONT_FONT,
GDK_FONT_FONTSET
} GdkFontType;
struct _GdkFont
{
GdkFontType type;
gint ascent;
gint descent;
};
GType gdk_font_get_type (void);
#ifndef GDK_MULTIHEAD_SAFE
GdkFont* gdk_font_load (const gchar *font_name);
GdkFont* gdk_fontset_load (const gchar *fontset_name);
GdkFont* gdk_font_from_description (PangoFontDescription *font_desc);
#endif
GdkFont *gdk_font_load_for_display (GdkDisplay *display,
const gchar *font_name);
GdkFont *gdk_fontset_load_for_display (GdkDisplay *display,
const gchar *fontset_name);
GdkFont *gdk_font_from_description_for_display (GdkDisplay *display,
PangoFontDescription *font_desc);
GdkFont* gdk_font_ref (GdkFont *font);
void gdk_font_unref (GdkFont *font);
gint gdk_font_id (const GdkFont *font);
gboolean gdk_font_equal (const GdkFont *fonta,
const GdkFont *fontb);
gint gdk_string_width (GdkFont *font,
const gchar *string);
gint gdk_text_width (GdkFont *font,
const gchar *text,
gint text_length);
gint gdk_text_width_wc (GdkFont *font,
const GdkWChar *text,
gint text_length);
gint gdk_char_width (GdkFont *font,
gchar character);
gint gdk_char_width_wc (GdkFont *font,
GdkWChar character);
gint gdk_string_measure (GdkFont *font,
const gchar *string);
gint gdk_text_measure (GdkFont *font,
const gchar *text,
gint text_length);
gint gdk_char_measure (GdkFont *font,
gchar character);
gint gdk_string_height (GdkFont *font,
const gchar *string);
gint gdk_text_height (GdkFont *font,
const gchar *text,
gint text_length);
gint gdk_char_height (GdkFont *font,
gchar character);
void gdk_text_extents (GdkFont *font,
const gchar *text,
gint text_length,
gint *lbearing,
gint *rbearing,
gint *width,
gint *ascent,
gint *descent);
void gdk_text_extents_wc (GdkFont *font,
const GdkWChar *text,
gint text_length,
gint *lbearing,
gint *rbearing,
gint *width,
gint *ascent,
gint *descent);
void gdk_string_extents (GdkFont *font,
const gchar *string,
gint *lbearing,
gint *rbearing,
gint *width,
gint *ascent,
gint *descent);
GdkDisplay * gdk_font_get_display (GdkFont *font);
#ifdef GDK_WINDOWING_WIN32
/* Ditto temporary */
gchar* gdk_font_full_name_get (GdkFont *font);
void gdk_font_full_name_free (gchar *name);
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GDK_FONT_H__ */
#endif /* GDK_DISABLE_DEPRECATED */