summaryrefslogtreecommitdiff
path: root/gdk/x11
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-06-24 22:20:02 +0200
committerJavier Jardón <jjardon@gnome.org>2010-06-28 23:38:03 +0200
commitc1affa4f3cbe51574a1895df9c4d9b77f50f81aa (patch)
treee9c00a9dacb2080a3e7855bbf4d4297913d98baa /gdk/x11
parentc3987f9ee2cf0ee2277c31e711755257f62c46db (diff)
downloadgtk+-c1affa4f3cbe51574a1895df9c4d9b77f50f81aa.tar.gz
Remove deprecated code from X interaction
Diffstat (limited to 'gdk/x11')
-rw-r--r--gdk/x11/gdkfont-x11.c144
-rw-r--r--gdk/x11/gdkx.h22
2 files changed, 0 insertions, 166 deletions
diff --git a/gdk/x11/gdkfont-x11.c b/gdk/x11/gdkfont-x11.c
index d2edafcd46..43282e50e0 100644
--- a/gdk/x11/gdkfont-x11.c
+++ b/gdk/x11/gdkfont-x11.c
@@ -170,95 +170,6 @@ gdk_font_hash_lookup (GdkDisplay *display,
}
/**
- * gdk_font_load_for_display:
- * @display: a #GdkDisplay
- * @font_name: a XLFD describing the font to load.
- * @returns: a #GdkFont, or %NULL if the font could not be loaded.
- *
- * Loads a font for use on @display.
- *
- * The font may be newly loaded or looked up the font in a cache.
- * You should make no assumptions about the initial reference count.
- *
- * Since: 2.2
- */
-GdkFont *
-gdk_font_load_for_display (GdkDisplay *display,
- const gchar *font_name)
-{
- GdkFont *font;
- GdkFontPrivateX *private;
- XFontStruct *xfont;
-
- g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- g_return_val_if_fail (font_name != NULL, NULL);
-
- font = gdk_font_hash_lookup (display, GDK_FONT_FONT, font_name);
- if (font)
- return font;
-
- xfont = XLoadQueryFont (GDK_DISPLAY_XDISPLAY (display), font_name);
- if (xfont == NULL)
- return NULL;
-
- font = gdk_font_lookup_for_display (display, xfont->fid);
- if (font != NULL)
- {
- private = (GdkFontPrivateX *) font;
- if (xfont != private->xfont)
- XFreeFont (GDK_DISPLAY_XDISPLAY (display), xfont);
-
- gdk_font_ref (font);
- }
- else
- {
- private = g_new (GdkFontPrivateX, 1);
- private->display = display;
- private->xfont = xfont;
- private->base.ref_count = 1;
- private->names = NULL;
- private->xid = xfont->fid | XID_FONT_BIT;
-
- font = (GdkFont*) private;
- font->type = GDK_FONT_FONT;
- font->ascent = xfont->ascent;
- font->descent = xfont->descent;
-
- _gdk_xid_table_insert (display, &private->xid, font);
- }
-
- gdk_font_hash_insert (GDK_FONT_FONT, font, font_name);
-
- return font;
-}
-
-/**
- * gdk_font_from_description_for_display:
- * @display: a #GdkDisplay
- * @font_desc: a #PangoFontDescription.
- *
- * Loads a #GdkFont based on a Pango font description for use on @display.
- * This font will only be an approximation of the Pango font, and
- * internationalization will not be handled correctly. This function
- * should only be used for legacy code that cannot be easily converted
- * to use Pango. Using Pango directly will produce better results.
- *
- * Return value: the newly loaded font, or %NULL if the font
- * cannot be loaded.
- *
- * Since: 2.2
- */
-GdkFont *
-gdk_font_from_description_for_display (GdkDisplay *display,
- PangoFontDescription *font_desc)
-{
- g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- g_return_val_if_fail (font_desc != NULL, NULL);
-
- return gdk_font_load_for_display (display, "fixed");
-}
-
-/**
* gdk_fontset_load_for_display:
* @display: a #GdkDisplay
* @fontset_name: a comma-separated list of XLFDs describing
@@ -491,61 +402,6 @@ gdk_font_equal (const GdkFont *fonta,
return FALSE;
}
-/**
- * gdk_x11_font_get_xdisplay:
- * @font: a #GdkFont.
- *
- * Returns the display of a #GdkFont.
- *
- * Return value: an Xlib <type>Display*</type>.
- **/
-Display *
-gdk_x11_font_get_xdisplay (GdkFont *font)
-{
- g_return_val_if_fail (font != NULL, NULL);
- return GDK_DISPLAY_XDISPLAY (((GdkFontPrivateX *)font)->display);
-}
-
-/**
- * gdk_x11_font_get_xfont:
- * @font: a #GdkFont.
- *
- * Returns the X font belonging to a #GdkFont.
- *
- * Return value: an Xlib <type>XFontStruct*</type> or an <type>XFontSet</type>.
- **/
-gpointer
-gdk_x11_font_get_xfont (GdkFont *font)
-{
- g_return_val_if_fail (font != NULL, NULL);
-
- return ((GdkFontPrivateX *)font)->xfont;
-}
-
-/**
- * gdk_x11_font_get_name:
- * @font: a #GdkFont.
- *
- * Return the X Logical Font Description (for font->type == GDK_FONT_FONT)
- * or comma separated list of XLFDs (for font->type == GDK_FONT_FONTSET)
- * that was used to load the font. If the same font was loaded
- * via multiple names, which name is returned is undefined.
- *
- * Return value: the name of the font. This string is owned
- * by GDK and must not be modified or freed.
- **/
-G_CONST_RETURN char *
-gdk_x11_font_get_name (GdkFont *font)
-{
- GdkFontPrivateX *private = (GdkFontPrivateX *)font;
-
- g_return_val_if_fail (font != NULL, NULL);
-
- g_assert (private->names);
-
- return private->names->data;
-}
-
#define __GDK_FONT_X11_C__
#include "gdkaliasdef.c"
diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
index c56d462996..d23f1fb58f 100644
--- a/gdk/x11/gdkx.h
+++ b/gdk/x11/gdkx.h
@@ -187,28 +187,6 @@ void gdk_x11_register_standard_event_type (GdkDisplay *display,
gint event_base,
gint n_events);
-#if !defined(GDK_DISABLE_DEPRECATED) || defined(GDK_COMPILATION)
-
-gpointer gdk_x11_font_get_xfont (GdkFont *font);
-#define GDK_FONT_XFONT(font) (gdk_x11_font_get_xfont (font))
-
-#define gdk_font_lookup_for_display(display, xid) ((GdkFont*) gdk_xid_table_lookup_for_display (display, ((xid)|XID_FONT_BIT)))
-
-#endif /* !GDK_DISABLE_DEPRECATED || GDK_COMPILATION */
-
-#ifndef GDK_DISABLE_DEPRECATED
-
-Display * gdk_x11_font_get_xdisplay (GdkFont *font);
-G_CONST_RETURN char *gdk_x11_font_get_name (GdkFont *font);
-
-#define GDK_FONT_XDISPLAY(font) (gdk_x11_font_get_xdisplay (font))
-
-#ifndef GDK_MULTIHEAD_SAFE
-
-#define gdk_font_lookup(xid) ((GdkFont*) gdk_xid_table_lookup (xid))
-
-#endif /* GDK_MULTIHEAD_SAFE */
-#endif /* GDK_DISABLE_DEPRECATED */
G_END_DECLS