diff options
author | Christian Dywan <christian@lanedo.com> | 2010-04-28 21:28:06 +0200 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2010-06-28 23:38:03 +0200 |
commit | 655dcff09622777765f32d84549a7779c78147a5 (patch) | |
tree | 37a9ba76ab0c4bb7be5cf1c0fe20fe104071ec6d /gdk/directfb | |
parent | 34573b53f3926c2081bcce585f5e99680fb874a6 (diff) | |
download | gtk+-655dcff09622777765f32d84549a7779c78147a5.tar.gz |
Remove deprecated GdkFont
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=604196
Signed-off-by: Javier Jardón <jjardon@gnome.org>
Diffstat (limited to 'gdk/directfb')
-rw-r--r-- | gdk/directfb/Makefile.am | 1 | ||||
-rw-r--r-- | gdk/directfb/TODO | 1 | ||||
-rw-r--r-- | gdk/directfb/gdkfont-directfb.c | 176 |
3 files changed, 0 insertions, 178 deletions
diff --git a/gdk/directfb/Makefile.am b/gdk/directfb/Makefile.am index be2bf25772..57d3fed3c6 100644 --- a/gdk/directfb/Makefile.am +++ b/gdk/directfb/Makefile.am @@ -27,7 +27,6 @@ libgdk_directfb_la_SOURCES = \ gdkdisplay-directfb.h \ gdkdrawable-directfb.c \ gdkevents-directfb.c \ - gdkfont-directfb.c \ gdkgc-directfb.c \ gdkgeometry-directfb.c \ gdkglobals-directfb.c \ diff --git a/gdk/directfb/TODO b/gdk/directfb/TODO index db0eb77b02..10215d3ea4 100644 --- a/gdk/directfb/TODO +++ b/gdk/directfb/TODO @@ -31,7 +31,6 @@ gdkdisplay-directfb.c gdkdnd-directfb.c gdkdrawable-directfb.c gdkevents-directfb.c -gdkfont-directfb.c gdkgc-directfb.c gdkgeometry-directfb.c gdkglobals-directfb.c diff --git a/gdk/directfb/gdkfont-directfb.c b/gdk/directfb/gdkfont-directfb.c deleted file mode 100644 index 06635c510a..0000000000 --- a/gdk/directfb/gdkfont-directfb.c +++ /dev/null @@ -1,176 +0,0 @@ -/* GDK - The GIMP Drawing Kit - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GTK+ Team. - */ - -/* - * GTK+ DirectFB backend - * Copyright (C) 2001-2002 convergence integrated media GmbH - * Copyright (C) 2002-2004 convergence GmbH - * Written by Denis Oliver Kropp <dok@convergence.de> and - * Sven Neumann <sven@convergence.de> - */ - -#undef GDK_DISABLE_DEPRECATED - -#include "config.h" -#include "gdk.h" - -#include <string.h> - -#include "gdkdirectfb.h" -#include "gdkprivate-directfb.h" - -#include "gdkinternals.h" - -#include "gdkfont.h" -#include "gdkalias.h" - - -typedef struct _GdkFontDirectFB GdkFontDirectFB; - -struct _GdkFontDirectFB -{ - GdkFontPrivate base; - gint size; - IDirectFBFont *dfbfont; -}; - - -static GdkFont * -gdk_directfb_bogus_font (gint height) -{ - GdkFont *font; - GdkFontDirectFB *private; - - private = g_new0 (GdkFontDirectFB, 1); - font = (GdkFont *)private; - - font->type = GDK_FONT_FONT; - font->ascent = height*3/4; - font->descent = height/4; - private->size = height; - private->base.ref_count = 1; - return font; -} - - -/* ********************* */ - -GdkFont* -gdk_fontset_load (const gchar *fontset_name) -{ - return gdk_directfb_bogus_font (10); -} - -GdkFont * -gdk_fontset_load_for_display (GdkDisplay *display,const gchar *font_name) { - return gdk_directfb_bogus_font (10); -} - -void -_gdk_font_destroy (GdkFont *font) -{ - switch (font->type) - { - case GDK_FONT_FONT: - break; - case GDK_FONT_FONTSET: - break; - default: - g_error ("unknown font type."); - break; - } - - g_free (font); -} - -gint -_gdk_font_strlen (GdkFont *font, - const gchar *str) -{ - GdkFontDirectFB *font_private; - gint length = 0; - - g_return_val_if_fail (font != NULL, -1); - g_return_val_if_fail (str != NULL, -1); - - font_private = (GdkFontDirectFB*) font; - - if (font->type == GDK_FONT_FONT) - { - guint16 *string_2b = (guint16 *)str; - - while (*(string_2b++)) - length++; - } - else if (font->type == GDK_FONT_FONTSET) - { - length = strlen (str); - } - else - g_error("undefined font type\n"); - - return length; -} - -gint -gdk_font_id (const GdkFont *font) -{ - const GdkFontDirectFB *font_private; - - g_return_val_if_fail (font != NULL, 0); - - font_private = (const GdkFontDirectFB*) font; - - if (font->type == GDK_FONT_FONT) - { - return -1; - } - else - { - return 0; - } -} - -gint -gdk_font_equal (const GdkFont *fonta, - const GdkFont *fontb) -{ - const GdkFontDirectFB *privatea; - const GdkFontDirectFB *privateb; - - g_return_val_if_fail (fonta != NULL, FALSE); - g_return_val_if_fail (fontb != NULL, FALSE); - - privatea = (const GdkFontDirectFB*) fonta; - privateb = (const GdkFontDirectFB*) fontb; - - if(fonta == fontb) - return TRUE; - - return FALSE; -} - - -#define __GDK_FONT_X11_C__ -#include "gdkaliasdef.c" |