summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-06-24 23:40:06 +0200
committerJavier Jardón <jjardon@gnome.org>2010-06-28 23:38:03 +0200
commitc3987f9ee2cf0ee2277c31e711755257f62c46db (patch)
treec049ff93656d0739d2a1ad8aeb5d4a62fbfb3a66
parent418d84f3114548381ca86745d54fad2d7be8cc98 (diff)
downloadgtk+-c3987f9ee2cf0ee2277c31e711755257f62c46db.tar.gz
[GdkGC] Remove deprecated GdkFont from GdkGCValues structure
-rw-r--r--gdk/directfb/gdkgc-directfb.c16
-rw-r--r--gdk/gdkgc.h1
-rw-r--r--gdk/quartz/gdkgc-quartz.c13
-rw-r--r--gdk/quartz/gdkprivate-quartz.h1
-rw-r--r--gdk/win32/gdkgc-win32.c35
-rw-r--r--gdk/win32/gdkprivate-win32.h1
-rw-r--r--gdk/x11/gdkgc-x11.c7
-rw-r--r--gtk/gtkgc.c9
8 files changed, 1 insertions, 82 deletions
diff --git a/gdk/directfb/gdkgc-directfb.c b/gdk/directfb/gdkgc-directfb.c
index 202c27c5f1..e8cb617472 100644
--- a/gdk/directfb/gdkgc-directfb.c
+++ b/gdk/directfb/gdkgc-directfb.c
@@ -41,7 +41,6 @@
#include "gdkprivate-directfb.h"
#include "gdkgc.h"
-#include "gdkfont.h"
#include "gdkpixmap.h"
#include "gdkregion-generic.h"
@@ -173,17 +172,6 @@ gdk_directfb_gc_set_values (GdkGC *gc,
private->values_mask |= GDK_GC_BACKGROUND;
}
- if (values_mask & GDK_GC_FONT)
- {
- GdkFont *oldf = private->values.font;
-
- private->values.font = gdk_font_ref (values->font);
- private->values_mask |= GDK_GC_FONT;
-
- if (oldf)
- gdk_font_unref (oldf);
- }
-
if (values_mask & GDK_GC_FUNCTION)
{
private->values.function = values->function;
@@ -366,8 +354,6 @@ _gdk_windowing_gc_copy (GdkGC *dst_gc,
temp_region_reset(&dst_private->clip_region);
- if (dst_private->values_mask & GDK_GC_FONT)
- gdk_font_unref (dst_private->values.font);
if (dst_private->values_mask & GDK_GC_TILE)
g_object_unref (dst_private->values.tile);
if (dst_private->values_mask & GDK_GC_STIPPLE)
@@ -376,8 +362,6 @@ _gdk_windowing_gc_copy (GdkGC *dst_gc,
g_object_unref (dst_private->values.clip_mask);
*dst_gc = *src_gc;
- if (dst_private->values_mask & GDK_GC_FONT)
- gdk_font_ref (dst_private->values.font);
if (dst_private->values_mask & GDK_GC_TILE)
g_object_ref (dst_private->values.tile);
if (dst_private->values_mask & GDK_GC_STIPPLE)
diff --git a/gdk/gdkgc.h b/gdk/gdkgc.h
index a8b84e2c36..3292beae09 100644
--- a/gdk/gdkgc.h
+++ b/gdk/gdkgc.h
@@ -161,7 +161,6 @@ struct _GdkGCValues
{
GdkColor foreground;
GdkColor background;
- GdkFont *font;
GdkFunction function;
GdkFill fill;
GdkPixmap *tile;
diff --git a/gdk/quartz/gdkgc-quartz.c b/gdk/quartz/gdkgc-quartz.c
index 9cddd74d36..552bf5f496 100644
--- a/gdk/quartz/gdkgc-quartz.c
+++ b/gdk/quartz/gdkgc-quartz.c
@@ -36,8 +36,6 @@ gdk_quartz_gc_get_values (GdkGC *gc,
values->foreground.pixel = _gdk_gc_get_fg_pixel (gc);
values->background.pixel = _gdk_gc_get_bg_pixel (gc);
- values->font = private->font;
-
values->function = private->function;
values->fill = _gdk_gc_get_fill (gc);
@@ -130,11 +128,6 @@ gdk_quartz_gc_set_values (GdkGC *gc,
{
GdkGCQuartz *private = GDK_GC_QUARTZ (gc);
- if (mask & GDK_GC_FONT)
- {
- /* FIXME: implement font */
- }
-
if (mask & GDK_GC_FUNCTION)
private->function = values->function;
@@ -302,12 +295,6 @@ _gdk_windowing_gc_copy (GdkGC *dst_gc,
GdkGCQuartz *dst_quartz_gc = GDK_GC_QUARTZ (dst_gc);
GdkGCQuartz *src_quartz_gc = GDK_GC_QUARTZ (src_gc);
- if (dst_quartz_gc->font)
- gdk_font_unref (dst_quartz_gc->font);
- dst_quartz_gc->font = src_quartz_gc->font;
- if (dst_quartz_gc->font)
- gdk_font_ref (dst_quartz_gc->font);
-
dst_quartz_gc->function = src_quartz_gc->function;
dst_quartz_gc->subwindow_mode = src_quartz_gc->subwindow_mode;
dst_quartz_gc->graphics_exposures = src_quartz_gc->graphics_exposures;
diff --git a/gdk/quartz/gdkprivate-quartz.h b/gdk/quartz/gdkprivate-quartz.h
index 11d57bf36c..4bc924f6fa 100644
--- a/gdk/quartz/gdkprivate-quartz.h
+++ b/gdk/quartz/gdkprivate-quartz.h
@@ -53,7 +53,6 @@ struct _GdkGCQuartz
{
GdkGC parent_instance;
- GdkFont *font;
GdkFunction function;
GdkSubwindowMode subwindow_mode;
gboolean graphics_exposures;
diff --git a/gdk/win32/gdkgc-win32.c b/gdk/win32/gdkgc-win32.c
index 62f79292b6..a0fd152daf 100644
--- a/gdk/win32/gdkgc-win32.c
+++ b/gdk/win32/gdkgc-win32.c
@@ -33,7 +33,6 @@
#include <string.h>
#include "gdkgc.h"
-#include "gdkfont.h"
#include "gdkpixmap.h"
#include "gdkregion-generic.h"
#include "gdkprivate-win32.h"
@@ -103,10 +102,7 @@ gdk_gc_win32_finalize (GObject *object)
if (win32_gc->hcliprgn != NULL)
DeleteObject (win32_gc->hcliprgn);
-
- if (win32_gc->values_mask & GDK_GC_FONT)
- gdk_font_unref (win32_gc->font);
-
+
g_free (win32_gc->pen_dashes);
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -225,27 +221,6 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
s = ","));
}
- if ((mask & GDK_GC_FONT) && (values->font->type == GDK_FONT_FONT
- || values->font->type == GDK_FONT_FONTSET))
- {
- if (win32_gc->font != NULL)
- gdk_font_unref (win32_gc->font);
- win32_gc->font = values->font;
- if (win32_gc->font != NULL)
- {
- gdk_font_ref (win32_gc->font);
- win32_gc->values_mask |= GDK_GC_FONT;
- GDK_NOTE (GC, (g_print ("%sfont=%p", s, win32_gc->font),
- s = ","));
- }
- else
- {
- win32_gc->values_mask &= ~GDK_GC_FONT;
- GDK_NOTE (GC, (g_print ("%sfont=NULL", s),
- s = ","));
- }
- }
-
if (mask & GDK_GC_FUNCTION)
{
GDK_NOTE (GC, (g_print ("%srop2=", s),
@@ -440,7 +415,6 @@ _gdk_win32_gc_new (GdkDrawable *drawable,
win32_gc->hcliprgn = NULL;
- win32_gc->font = NULL;
win32_gc->rop2 = R2_COPYPEN;
win32_gc->subwindow_mode = GDK_CLIP_BY_CHILDREN;
win32_gc->graphics_exposures = TRUE;
@@ -477,7 +451,6 @@ gdk_win32_gc_get_values (GdkGC *gc,
values->foreground.pixel = _gdk_gc_get_fg_pixel (gc);
values->background.pixel = _gdk_gc_get_bg_pixel (gc);
- values->font = win32_gc->font;
switch (win32_gc->rop2)
{
@@ -617,9 +590,6 @@ _gdk_windowing_gc_copy (GdkGC *dst_gc,
if (dst_win32_gc->hcliprgn != NULL)
DeleteObject (dst_win32_gc->hcliprgn);
- if (dst_win32_gc->font != NULL)
- gdk_font_unref (dst_win32_gc->font);
-
g_free (dst_win32_gc->pen_dashes);
dst_win32_gc->hcliprgn = src_win32_gc->hcliprgn;
@@ -633,9 +603,6 @@ _gdk_windowing_gc_copy (GdkGC *dst_gc,
}
dst_win32_gc->values_mask = src_win32_gc->values_mask;
- dst_win32_gc->font = src_win32_gc->font;
- if (dst_win32_gc->font != NULL)
- gdk_font_ref (dst_win32_gc->font);
dst_win32_gc->rop2 = src_win32_gc->rop2;
diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h
index 7578800f51..a4de7885c3 100644
--- a/gdk/win32/gdkprivate-win32.h
+++ b/gdk/win32/gdkprivate-win32.h
@@ -188,7 +188,6 @@ struct _GdkGCWin32
GdkGCValuesMask values_mask;
- GdkFont *font;
gint rop2;
GdkSubwindowMode subwindow_mode;
gint graphics_exposures;
diff --git a/gdk/x11/gdkgc-x11.c b/gdk/x11/gdkgc-x11.c
index 0a6869a215..3cac64fd4f 100644
--- a/gdk/x11/gdkgc-x11.c
+++ b/gdk/x11/gdkgc-x11.c
@@ -206,8 +206,6 @@ gdk_x11_gc_get_values (GdkGC *gc,
{
values->foreground.pixel = xvalues.foreground;
values->background.pixel = xvalues.background;
- values->font = gdk_font_lookup_for_display (GDK_GC_DISPLAY (gc),
- xvalues.font);
switch (xvalues.function)
{
@@ -408,11 +406,6 @@ gdk_x11_gc_values_to_xvalues (GdkGCValues *values,
xvalues->background = values->background.pixel;
*xvalues_mask |= GCBackground;
}
- if ((mask & GDK_GC_FONT) && (values->font->type == GDK_FONT_FONT))
- {
- xvalues->font = ((XFontStruct *) (GDK_FONT_XFONT (values->font)))->fid;
- *xvalues_mask |= GCFont;
- }
if (mask & GDK_GC_FUNCTION)
{
switch (values->function)
diff --git a/gtk/gtkgc.c b/gtk/gtkgc.c
index 15d863621f..80a2d66cfc 100644
--- a/gtk/gtkgc.c
+++ b/gtk/gtkgc.c
@@ -208,10 +208,6 @@ gtk_gc_key_hash (gpointer key)
{
hash_val += keyval->values.background.pixel;
}
- if (keyval->mask & GDK_GC_FONT)
- {
- hash_val += gdk_font_id (keyval->values.font);
- }
if (keyval->mask & GDK_GC_FUNCTION)
{
hash_val += (gint) keyval->values.function;
@@ -316,11 +312,6 @@ gtk_gc_key_equal (gpointer a,
if (avalues->background.pixel != bvalues->background.pixel)
return FALSE;
}
- if (akey->mask & GDK_GC_FONT)
- {
- if (!gdk_font_equal (avalues->font, bvalues->font))
- return FALSE;
- }
if (akey->mask & GDK_GC_FUNCTION)
{
if (avalues->function != bvalues->function)