[gtkglarea/jjardon/gtk3: 3/12] Remove GdkFont related API



commit 22f676b7e34127985fb48a69cc32e721f869a0a8
Author: Javier Jardón <jjardon gnome org>
Date:   Wed Mar 19 22:47:15 2014 +0000

    Remove GdkFont related API

 .gitignore           |    1 -
 docs/gdkgl.txt       |   38 -----------
 examples/Makefile.am |    3 +-
 examples/README      |    9 ---
 examples/gdkfont.c   |  182 --------------------------------------------------
 examples/zktor.c     |   13 ----
 gtkgl/gdkgl.c        |   22 ------
 gtkgl/gdkgl.h        |    4 -
 8 files changed, 1 insertions(+), 271 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a6693f2..bb349c2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,7 +21,6 @@ libtool
 stamp-*
 *-stamp
 po
-examples/gdkfont
 examples/glpixmap
 examples/gtkglarea_demo
 examples/makefile.mingw
diff --git a/docs/gdkgl.txt b/docs/gdkgl.txt
index 342127c..ea23439 100644
--- a/docs/gdkgl.txt
+++ b/docs/gdkgl.txt
@@ -340,41 +340,3 @@ DESCRIPTION
 SEE ALSO
        glXMakeCurrent
        gdk_gl_make_current
-
-
-
----------------------------------------------------------------
-
-NAME
-       gdk_gl_use_gdk_font
-
-C SPECIFICATION
-       void gdk_gl_use_gdk_font( GdkFont *font,
-                                  int first,
-                                  int count,
-                                  int list_base )
-
-
-PARAMETERS
-
-font
-       Pointer to GdkFont structure, font type must be GDK_FONT_FONT.
-
-first
-       Specifies the index of the first font glyph to be taken
-
-count
-        Specifies the number of glyphs to be taken.
-
-list_base
-       Specifies the index of the first display list to be generated.
-
-DESCRIPTION
-       gdk_gl_use_gdk_font generates count display lists, named list_base
-       through list_base+count-1, each containing a single glBitmap command.
-
-       gdk_gl_use_gdk_font is ignored if there is no current context.
-
-
-SEE ALSO
-       glXUseXFont
diff --git a/examples/Makefile.am b/examples/Makefile.am
index c305f44..18b4a2f 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -6,7 +6,7 @@ if HAVE_SHADERS
 shader_programs = shaders
 endif
 
-noinst_PROGRAMS = simple zktor viewlw glpixmap gdkfont $(shader_programs) gtkglarea_demo
+noinst_PROGRAMS = simple zktor viewlw glpixmap $(shader_programs) gtkglarea_demo
 
 AM_CPPFLAGS = -I$(top_srcdir)
 AM_CFLAGS = $(GTK_CFLAGS) $(GL_CFLAGS)
@@ -16,6 +16,5 @@ simple_SOURCES   = simple.c
 zktor_SOURCES    = zktor.c
 glpixmap_SOURCES = glpixmap.c
 viewlw_SOURCES   = viewlw.c lw.h lw.c trackball.h trackball.c
-gdkfont_SOURCES  = gdkfont.c
 shaders_SOURCES  = shaders.c
 gtkglarea_demo_SOURCES = gtkglarea_demo.c
diff --git a/examples/README b/examples/README
index 9502c3e..f6585e8 100644
--- a/examples/README
+++ b/examples/README
@@ -12,15 +12,6 @@ Even better example than simple.
 
 
 
-gdkfont
--------
-
-Usage: gdkfont [fontname]
-
-Shows how to turn GdkFont to display lists using gdk_gl_use_gdk_font
-function.
-
-
 glpixmap
 --------
 
diff --git a/examples/zktor.c b/examples/zktor.c
index aa35a4d..16c12d3 100644
--- a/examples/zktor.c
+++ b/examples/zktor.c
@@ -738,24 +738,11 @@ gint init(GtkWidget *widget)
 {
   /* OpenGL functions can be called only if makecurrent returns true */
   if (gtk_gl_area_make_current(GTK_GL_AREA(widget))) {
-#if !defined(WIN32)
-    GdkFont *font;
-#endif
 
     /* set viewport */
     GtkAllocation allocation;
     gtk_widget_get_allocation (widget, &allocation);
     glViewport(0, 0, allocation.width, allocation.height);
-
-#if !defined(WIN32)
-    /* generate font display lists */
-    font = gdk_font_load("-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*");
-    if (font) {
-      fontbase = glGenLists( 128 );
-      gdk_gl_use_gdk_font(font, 0, 128, fontbase);
-      gdk_font_unref(font);
-    }
-#endif
   }
   return TRUE;
 }
diff --git a/gtkgl/gdkgl.c b/gtkgl/gdkgl.c
index efad04a..0ad15ea 100644
--- a/gtkgl/gdkgl.c
+++ b/gtkgl/gdkgl.c
@@ -669,28 +669,6 @@ gint gdk_gl_pixmap_make_current(GdkGLPixmap *glpixmap, GdkGLContext *context)
 #endif
 }
 
-/*
- *  Font support
- */
-
-void gdk_gl_use_gdk_font(GdkFont *font, int first, int count, int list_base)
-{
-#if defined GDK_WINDOWING_WIN32
-  HDC dc = CreateCompatibleDC (NULL);
-  HFONT old_font = SelectObject (dc, (void *)gdk_font_id (font));
-
-  wglUseFontBitmaps (dc, first, count, list_base);
-
-  SelectObject (dc, old_font);
-  DeleteDC (dc);
-#elif defined GDK_WINDOWING_X11
-  g_return_if_fail(font != NULL);
-  glXUseXFont(gdk_font_id(font), first, count, list_base);
-#else
-  g_warning ("gdk_gl_use_gdk_font not implemented on " PLATFORM);
-#endif
-}
-
 
 /*
  *  Helper functions
diff --git a/gtkgl/gdkgl.h b/gtkgl/gdkgl.h
index 29068fa..ad20bb8 100644
--- a/gtkgl/gdkgl.h
+++ b/gtkgl/gdkgl.h
@@ -115,10 +115,6 @@ GdkGLPixmap *gdk_gl_pixmap_new(GdkVisual *visual, GdkPixmap *pixmap);
 gint         gdk_gl_pixmap_make_current(GdkGLPixmap *glpixmap, GdkGLContext *context);
 
 
-/* fonts */
-void gdk_gl_use_gdk_font(GdkFont *font, int first, int count, int list_base);
-
-
 #ifndef GTKGL_DISABLE_DEPRECATED
 #  define gdk_gl_context_ref(context)   g_object_ref(context)
 #  define gdk_gl_context_unref(context) g_object_unref(context)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]