[gtk+] [GdkGC] Remove deprecated GdkFont from GdkGCValues structure
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] [GdkGC] Remove deprecated GdkFont from GdkGCValues structure
- Date: Mon, 28 Jun 2010 21:44:27 +0000 (UTC)
commit c3987f9ee2cf0ee2277c31e711755257f62c46db
Author: Javier Jardón <jjardon gnome org>
Date: Thu Jun 24 23:40:06 2010 +0200
[GdkGC] Remove deprecated GdkFont from GdkGCValues structure
gdk/directfb/gdkgc-directfb.c | 16 ----------------
gdk/gdkgc.h | 1 -
gdk/quartz/gdkgc-quartz.c | 13 -------------
gdk/quartz/gdkprivate-quartz.h | 1 -
gdk/win32/gdkgc-win32.c | 35 +----------------------------------
gdk/win32/gdkprivate-win32.h | 1 -
gdk/x11/gdkgc-x11.c | 7 -------
gtk/gtkgc.c | 9 ---------
8 files changed, 1 insertions(+), 82 deletions(-)
---
diff --git a/gdk/directfb/gdkgc-directfb.c b/gdk/directfb/gdkgc-directfb.c
index 202c27c..e8cb617 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 a8b84e2..3292bea 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 9cddd74..552bf5f 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 11d57bf..4bc924f 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 62f7929..a0fd152 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 7578800..a4de788 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 0a6869a..3cac64f 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 15d8636..80a2d66 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]