mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
d8a4962708
2002-09-20 Tor Lillqvist <tml@iki.fi> * gdk/gdkfont.h: Delete leftover declarations of the obsolete Win32-only functions gdk_font_full_name_get() and gdk_font_full_name_free(). * gdk/gdk.def: Delete from here, too. * gdk/win32/gdkfont-win32.c (logfont_to_xlfd, gdk_font_full_name_get, gdk_font_full_name_free): Delete implementation, and helper functions. (pattern_match, InnerEnumFontFamExProc, EnumFontFamExProc, gdk_font_list_new, gdk_font_list_free): Delete unused functions. (gdk_text_width, gdk_text_width_wc) Instead of code duplication, let gdk_text_extents() and gdk_text_extents_wc() do the job. * gdk/win32/gdkgc-win32.c (gdk_win32_gc_values_to_win32values): Don't use the above removed functions in debugging output. * gdk/win32/gdkdisplay-win32.c * gdk/win32/gdkmain-win32.c * gdk/win32/gdkprivate-win32.h * gdk/win32/gdkselection-win32.c * gdk/win32/gdkinput-win32.h * gdk/win32/gdkinput.c: Make it compile again, pass a GdkDisplay in a couple of places.
113 lines
3.3 KiB
C
113 lines
3.3 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 __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* __GDK_FONT_H__ */
|
|
|
|
#endif /* GDK_DISABLE_DEPRECATED */
|