gtk/gdk/gdkfont.h
Manish Singh 89fd6ad3de add -DGDK_DISABLE_DEPRECATED
Sun Nov 17 13:45:08 2002  Manish Singh  <yosh@gimp.org>

        * gdk/Makefile.am: add -DGDK_DISABLE_DEPRECATED

        * gdk/gdk.c (gdk_exit): remove obsolete comment

        * gdk/gdk.h: declare gdk_input_add_full if GTK_COMPILATION for
        gtk_input_add_full

        * gdk/gdkcolor.c (gdk_color_white, gdk_color_black): use
        gdk_colormap_alloc_color instead of gdk_color_alloc

        * gdk/gdkcolor.h: declare gdk_colormap_change if GDK_COMPILATION for
        gdk_colors_store. Also, gdk_colors_{alloc,free} for
        gdk_rgb_try_colormap

        * gdk/gdkdrawable.h: declare gdk_draw_string if GTK_COMPILATION for
        gtk_default_draw_string. Also, gdk_draw_text and gdk_draw_text_wc
        if GDK_COMPILATION for the respective gdk_window_ and gdk_pixmap_
        functions.

        * gdk/gdkfont.c: #undef GDK_DISABLE_DEPRECATED, completely compat
        code here

        * gdk/gdkfont.h: allow the GdkFont structure and a few gdk_font_
        functions for compat code in GDK_COMPILATION and GTK_COMPILATION.

        * gdk/gdkrgb.c (gdk_rgb_cmap_fail, gdk_rgb_try_colormap): use
        gdk_colormap_free_colors instead of gdk_colors_free.

        * gdk/gdkrgb.c (gdk_draw_rgb_image_core): no need to set fg/bg
        for own_gc, unused.

        * gdk/gdkwindow.h: declare gdk_window_get_deskrelative_origin if
        GTK_COMPILATION for gtk_handle_box_button_changed.

        * gdk/x11/Makefile.am: add -DGDK_DISABLE_DEPRECATED, renmae
        -DINSIDE_GDK_X11 to -DGDK_COMPILATION

        * gdk/x11/gdkcolor-x11.c: remove duplicate doc string for
        gdk_colormap_alloc_colors.

        * gdk/x11/gdkfont-x11.c:  #undef GDK_DISABLE_DEPRECATED, completely
        compat code here

        * gdk/x11/gdkx.h: use GDK_COMPILATION instead of INSIDE_GDK_X11,
        allow a few gdk_x11_font_ functions if GDK_COMPILATION for compat
        code

        * gtk/Makefile.am: add -DGDK_DISABLE_DEPRECATED

        * gtk/gtkclist.c
        * gtk/gtkctree.c
        * gtk/gtkpixmap.c
        * gtk/gtkpreview.c
        * gtk/gtktext.c: #undef GDK_DISABLE_DEPRECATED, deprecated widget

        * gtk/gtkhandlebox.c (gtk_handle_box_motion): use
        gdk_window_set_geometry_hints instead of gdk_window_set_hints.

        * gtk/gtkmain.c (gtk_exit): call exit directly

        * gtktipsquery.c (gtk_tips_query_real_start_query)
        * gtk/gtktreeitem.c (gtk_tree_item_add_pixmaps): remove some
        deprecated GDK usage.
2002-11-17 22:04:03 +00:00

117 lines
3.5 KiB
C

#if !defined(GDK_DISABLE_DEPRECATED) || defined(GDK_COMPILATION) || defined(GTK_COMPILATION)
#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);
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);
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);
#ifndef GDK_DISABLE_DEPRECATED
#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
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);
#endif /* GDK_DISABLE_DEPRECATED */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GDK_FONT_H__ */
#endif /* !GDK_DISABLE_DEPRECATED || GDK_COMPILATION || GTK_COMPILATION */