summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>2000-11-13 13:15:41 +0000
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>2000-11-13 13:15:41 +0000
commitb664be5ffb0f854c8e7464f34e93eb15227a8d2b (patch)
tree6d929c957e07a36606b56db749f850b464e66464 /gdk
parent1ddb7f30f641a3d6ab9d734707e3582ad2a5dd61 (diff)
downloadgtk+-b664be5ffb0f854c8e7464f34e93eb15227a8d2b.tar.gz
GCompareFunc -> GEqualFunc where applicable.
2000-11-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gdk/linux-fb/gdkcolor-fb.c, gdk/nanox/gdkmain-nanox.c, gdk/win32/gdkcolor-win32.c, gdk/win32/gdkwin32id.c, gdk/x11/gdkcolor-x11.c, gdk/x11/gdkvisual-x11.c, gdk/x11/gdkxid.c, gtk/gtkgc.c, gtk/gtkrc.c, gtk/gtktext.c: GCompareFunc -> GEqualFunc where applicable. * gdk/linux-fb/gdkpango-fb.c: pango_font_description_compare -> pango_font_description_equal as changed in pango. * gdk/nanox/gdkmain-nanox.c: gdk_xid_compare -> gdk_xid_equal. * gdk/win32/gdkcolor-win32.c: gdk_colormap_cmp -> gdk_colormap_equal. * gdk/win32/gdkwin32id.c: gdk_handle_compare -> gdk_handle_equal. * gdk/x11/gdkcolor-x11.c: gdk_colormap_cmp -> gdk_colormap_equal. * gdk/x11/gdkvisual-x11.c: gdk_visual_compare -> gdk_visual_equal. * gdk/x11/gdkxid.c: gdk_xid_compare -> gdk_xid_equal. * gtk/gtkgc.c: gtk_gc_key_compare -> gtk_gc_key_equal and gtk_gc_drawable_compare -> gtk_gc_drawable_equal. * gtk/gtkrc.c: gtk_rc_style_compare -> gtk_rc_style_equal and gtk_rc_styles_compare -> gtk_rc_styles_equal.
Diffstat (limited to 'gdk')
-rw-r--r--gdk/linux-fb/gdkcolor-fb.c2
-rw-r--r--gdk/linux-fb/gdkpango-fb.c4
-rw-r--r--gdk/nanox/gdkmain-nanox.c16
-rw-r--r--gdk/win32/gdkcolor-win32.c38
-rw-r--r--gdk/win32/gdkwin32id.c6
-rw-r--r--gdk/x11/gdkcolor-x11.c30
-rw-r--r--gdk/x11/gdkvisual-x11.c22
-rw-r--r--gdk/x11/gdkxid.c16
8 files changed, 67 insertions, 67 deletions
diff --git a/gdk/linux-fb/gdkcolor-fb.c b/gdk/linux-fb/gdkcolor-fb.c
index ed694e0307..3dadfc010a 100644
--- a/gdk/linux-fb/gdkcolor-fb.c
+++ b/gdk/linux-fb/gdkcolor-fb.c
@@ -133,7 +133,7 @@ gdk_colormap_new (GdkVisual *visual,
colormap->colors = g_new (GdkColor, colormap->size);
private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash,
- (GCompareFunc) gdk_color_equal);
+ (GEqualFunc) gdk_color_equal);
if (private_cmap)
{
diff --git a/gdk/linux-fb/gdkpango-fb.c b/gdk/linux-fb/gdkpango-fb.c
index e8e9b6247c..49fc3801a9 100644
--- a/gdk/linux-fb/gdkpango-fb.c
+++ b/gdk/linux-fb/gdkpango-fb.c
@@ -143,7 +143,7 @@ pango_fb_font_map_load_font(PangoFontMap *fontmap,
{
fl = g_ptr_array_index(fbfm->all_descs, i);
- /* Can't use pango_font_description_compare() because it checks ->size as well */
+ /* Can't use pango_font_description_equal() because it checks ->size as well */
if(!g_strcasecmp(desc->family_name, fl->desc.family_name)
&& desc->style == fl->desc.style
&& desc->weight == fl->desc.weight
@@ -276,7 +276,7 @@ pango_fb_font_map_init(PangoFBFontMap *fontmap)
};
int i;
- fontmap->all_fonts = g_hash_table_new(pango_font_description_hash, (GCompareFunc)pango_font_description_compare);
+ fontmap->all_fonts = g_hash_table_new(pango_font_description_hash, (GEqualFunc)pango_font_description_equal);
fontmap->all_descs = g_ptr_array_new();
for(i = 0; font_dirs[i]; i++)
list_fonts(fontmap, NULL, fontmap->all_descs, font_dirs[i]);
diff --git a/gdk/nanox/gdkmain-nanox.c b/gdk/nanox/gdkmain-nanox.c
index 08defba480..38983228b8 100644
--- a/gdk/nanox/gdkmain-nanox.c
+++ b/gdk/nanox/gdkmain-nanox.c
@@ -168,9 +168,9 @@ gdk_keyval_convert_case (guint symbol,
}
*/
-static guint gdk_xid_hash (guint *xid);
-static gint gdk_xid_compare (guint *a,
- guint *b);
+static guint gdk_xid_hash (guint *xid);
+static gboolean gdk_xid_equal (guint *a,
+ guint *b);
static GHashTable *xid_ht = NULL;
@@ -184,7 +184,7 @@ gdk_xid_table_insert (guint *xid,
if (!xid_ht)
xid_ht = g_hash_table_new ((GHashFunc) gdk_xid_hash,
- (GCompareFunc) gdk_xid_compare);
+ (GEqualFunc) gdk_xid_equal);
g_hash_table_insert (xid_ht, xid, data);
}
@@ -194,7 +194,7 @@ gdk_xid_table_remove (guint xid)
{
if (!xid_ht)
xid_ht = g_hash_table_new ((GHashFunc) gdk_xid_hash,
- (GCompareFunc) gdk_xid_compare);
+ (GEqualFunc) gdk_xid_equal);
g_hash_table_remove (xid_ht, &xid);
}
@@ -217,9 +217,9 @@ gdk_xid_hash (guint *xid)
return *xid;
}
-static gint
-gdk_xid_compare (guint *a,
- guint *b)
+static gboolean
+gdk_xid_equal (guint *a,
+ guint *b)
{
return (*a == *b);
}
diff --git a/gdk/win32/gdkcolor-win32.c b/gdk/win32/gdkcolor-win32.c
index a96b23ebcb..035af920bd 100644
--- a/gdk/win32/gdkcolor-win32.c
+++ b/gdk/win32/gdkcolor-win32.c
@@ -34,20 +34,20 @@
#include "gdkcolor.h"
#include "gdkprivate-win32.h"
-static void free_colormap (Colormap colormap);
+static void free_colormap (Colormap colormap);
-static gint gdk_colormap_match_color (GdkColormap *cmap,
- GdkColor *color,
- const gchar *available);
-static void gdk_colormap_add (GdkColormap *cmap);
-static void gdk_colormap_remove (GdkColormap *cmap);
-static guint gdk_colormap_hash (Colormap *cmap);
-static gint gdk_colormap_cmp (Colormap *a,
- Colormap *b);
+static gint gdk_colormap_match_color (GdkColormap *cmap,
+ GdkColor *color,
+ const gchar *available);
+static void gdk_colormap_add (GdkColormap *cmap);
+static void gdk_colormap_remove (GdkColormap *cmap);
+static guint gdk_colormap_hash (Colormap *cmap);
+static gboolean gdk_colormap_equal (Colormap *a,
+ Colormap *b);
-static void gdk_colormap_init (GdkColormap *colormap);
-static void gdk_colormap_class_init (GdkColormapClass *klass);
-static void gdk_colormap_finalize (GObject *object);
+static void gdk_colormap_init (GdkColormap *colormap);
+static void gdk_colormap_class_init (GdkColormapClass *klass);
+static void gdk_colormap_finalize (GObject *object);
static gpointer parent_class = NULL;
@@ -1421,7 +1421,7 @@ gdk_colormap_new (GdkVisual *visual,
colormap->colors = g_new (GdkColor, colormap->size);
private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash,
- (GCompareFunc) gdk_color_equal);
+ (GEqualFunc) gdk_color_equal);
private->private_val = private_cmap;
private->xcolormap = create_colormap (gdk_root_window, xvisual, private_cmap);
@@ -1543,7 +1543,7 @@ gdk_colormap_get_system (void)
colormap->colors = g_new (GdkColor, colormap->size);
private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash,
- (GCompareFunc) gdk_color_equal);
+ (GEqualFunc) gdk_color_equal);
gdk_colormap_sync (colormap, TRUE);
}
@@ -2231,7 +2231,7 @@ gdk_colormap_add (GdkColormap *cmap)
if (!colormap_hash)
colormap_hash = g_hash_table_new ((GHashFunc) gdk_colormap_hash,
- (GCompareFunc) gdk_colormap_cmp);
+ (GEqualFunc) gdk_colormap_equal);
private = GDK_COLORMAP_PRIVATE_DATA (cmap);
@@ -2245,7 +2245,7 @@ gdk_colormap_remove (GdkColormap *cmap)
if (!colormap_hash)
colormap_hash = g_hash_table_new ((GHashFunc) gdk_colormap_hash,
- (GCompareFunc) gdk_colormap_cmp);
+ (GEqualFunc) gdk_colormap_equal);
private = GDK_COLORMAP_PRIVATE_DATA (cmap);
@@ -2258,9 +2258,9 @@ gdk_colormap_hash (Colormap *cmap)
return (guint) *cmap;
}
-static gint
-gdk_colormap_cmp (Colormap *a,
- Colormap *b)
+static gboolean
+gdk_colormap_equal (Colormap *a,
+ Colormap *b)
{
return (*a == *b);
}
diff --git a/gdk/win32/gdkwin32id.c b/gdk/win32/gdkwin32id.c
index 88d126060f..6cd73a34e6 100644
--- a/gdk/win32/gdkwin32id.c
+++ b/gdk/win32/gdkwin32id.c
@@ -37,7 +37,7 @@ gdk_handle_hash (HANDLE *handle)
}
static gint
-gdk_handle_compare (HANDLE *a,
+gdk_handle_equal (HANDLE *a,
HANDLE *b)
{
return (*a == *b);
@@ -51,7 +51,7 @@ gdk_win32_handle_table_insert (HANDLE *handle,
if (!handle_ht)
handle_ht = g_hash_table_new ((GHashFunc) gdk_handle_hash,
- (GCompareFunc) gdk_handle_compare);
+ (GEqualFunc) gdk_handle_equal);
g_hash_table_insert (handle_ht, handle, data);
}
@@ -61,7 +61,7 @@ gdk_win32_handle_table_remove (HANDLE handle)
{
if (!handle_ht)
handle_ht = g_hash_table_new ((GHashFunc) gdk_handle_hash,
- (GCompareFunc) gdk_handle_compare);
+ (GEqualFunc) gdk_handle_equal);
g_hash_table_remove (handle_ht, &handle);
}
diff --git a/gdk/x11/gdkcolor-x11.c b/gdk/x11/gdkcolor-x11.c
index cd78240f9f..9dff2d55f9 100644
--- a/gdk/x11/gdkcolor-x11.c
+++ b/gdk/x11/gdkcolor-x11.c
@@ -31,14 +31,14 @@
#define GDK_COLORMAP_PRIVATE_DATA(cmap) ((GdkColormapPrivateX11 *) GDK_COLORMAP (cmap)->windowing_data)
-static gint gdk_colormap_match_color (GdkColormap *cmap,
- GdkColor *color,
- const gchar *available);
-static void gdk_colormap_add (GdkColormap *cmap);
-static void gdk_colormap_remove (GdkColormap *cmap);
-static guint gdk_colormap_hash (Colormap *cmap);
-static gint gdk_colormap_cmp (Colormap *a,
- Colormap *b);
+static gint gdk_colormap_match_color (GdkColormap *cmap,
+ GdkColor *color,
+ const gchar *available);
+static void gdk_colormap_add (GdkColormap *cmap);
+static void gdk_colormap_remove (GdkColormap *cmap);
+static guint gdk_colormap_hash (Colormap *cmap);
+static gboolean gdk_colormap_equal (Colormap *a,
+ Colormap *b);
static void gdk_colormap_init (GdkColormap *colormap);
static void gdk_colormap_class_init (GdkColormapClass *klass);
@@ -156,7 +156,7 @@ gdk_colormap_new (GdkVisual *visual,
colormap->colors = g_new (GdkColor, colormap->size);
private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash,
- (GCompareFunc) gdk_color_equal);
+ (GEqualFunc) gdk_color_equal);
private->private_val = private_cmap;
private->xcolormap = XCreateColormap (private->xdisplay, gdk_root_window,
@@ -304,7 +304,7 @@ gdk_colormap_get_system (void)
colormap->colors = g_new (GdkColor, colormap->size);
private->hash = g_hash_table_new ((GHashFunc) gdk_color_hash,
- (GCompareFunc) gdk_color_equal);
+ (GEqualFunc) gdk_color_equal);
gdk_colormap_sync (colormap, TRUE);
}
@@ -1101,7 +1101,7 @@ gdk_colormap_add (GdkColormap *cmap)
if (!colormap_hash)
colormap_hash = g_hash_table_new ((GHashFunc) gdk_colormap_hash,
- (GCompareFunc) gdk_colormap_cmp);
+ (GEqualFunc) gdk_colormap_equal);
private = GDK_COLORMAP_PRIVATE_DATA (cmap);
@@ -1115,7 +1115,7 @@ gdk_colormap_remove (GdkColormap *cmap)
if (!colormap_hash)
colormap_hash = g_hash_table_new ((GHashFunc) gdk_colormap_hash,
- (GCompareFunc) gdk_colormap_cmp);
+ (GEqualFunc) gdk_colormap_equal);
private = GDK_COLORMAP_PRIVATE_DATA (cmap);
@@ -1128,9 +1128,9 @@ gdk_colormap_hash (Colormap *cmap)
return *cmap;
}
-static gint
-gdk_colormap_cmp (Colormap *a,
- Colormap *b)
+static gboolean
+gdk_colormap_equal (Colormap *a,
+ Colormap *b)
{
return (*a == *b);
}
diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
index 94b2624b4f..ebbd755919 100644
--- a/gdk/x11/gdkvisual-x11.c
+++ b/gdk/x11/gdkvisual-x11.c
@@ -31,13 +31,13 @@
#include "gdkprivate-x11.h"
#include "gdkinternals.h"
-static void gdk_visual_add (GdkVisual *visual);
-static void gdk_visual_decompose_mask (gulong mask,
- gint *shift,
- gint *prec);
-static guint gdk_visual_hash (Visual *key);
-static gint gdk_visual_compare (Visual *a,
- Visual *b);
+static void gdk_visual_add (GdkVisual *visual);
+static void gdk_visual_decompose_mask (gulong mask,
+ gint *shift,
+ gint *prec);
+static guint gdk_visual_hash (Visual *key);
+static gboolean gdk_visual_equal (Visual *a,
+ Visual *b);
static GdkVisualPrivate *system_visual;
@@ -411,7 +411,7 @@ gdk_visual_add (GdkVisual *visual)
if (!visual_hash)
visual_hash = g_hash_table_new ((GHashFunc) gdk_visual_hash,
- (GCompareFunc) gdk_visual_compare);
+ (GEqualFunc) gdk_visual_equal);
private = (GdkVisualPrivate*) visual;
@@ -445,9 +445,9 @@ gdk_visual_hash (Visual *key)
return key->visualid;
}
-static gint
-gdk_visual_compare (Visual *a,
- Visual *b)
+static gboolean
+gdk_visual_equal (Visual *a,
+ Visual *b)
{
return (a->visualid == b->visualid);
}
diff --git a/gdk/x11/gdkxid.c b/gdk/x11/gdkxid.c
index 81cbde3ccc..8c46073a2a 100644
--- a/gdk/x11/gdkxid.c
+++ b/gdk/x11/gdkxid.c
@@ -27,9 +27,9 @@
#include "gdkprivate-x11.h"
#include <stdio.h>
-static guint gdk_xid_hash (XID *xid);
-static gint gdk_xid_compare (XID *a,
- XID *b);
+static guint gdk_xid_hash (XID *xid);
+static gboolean gdk_xid_equal (XID *a,
+ XID *b);
static GHashTable *xid_ht = NULL;
@@ -43,7 +43,7 @@ gdk_xid_table_insert (XID *xid,
if (!xid_ht)
xid_ht = g_hash_table_new ((GHashFunc) gdk_xid_hash,
- (GCompareFunc) gdk_xid_compare);
+ (GEqualFunc) gdk_xid_equal);
g_hash_table_insert (xid_ht, xid, data);
}
@@ -53,7 +53,7 @@ gdk_xid_table_remove (XID xid)
{
if (!xid_ht)
xid_ht = g_hash_table_new ((GHashFunc) gdk_xid_hash,
- (GCompareFunc) gdk_xid_compare);
+ (GEqualFunc) gdk_xid_equal);
g_hash_table_remove (xid_ht, &xid);
}
@@ -76,9 +76,9 @@ gdk_xid_hash (XID *xid)
return *xid;
}
-static gint
-gdk_xid_compare (XID *a,
- XID *b)
+static gboolean
+gdk_xid_equal (XID *a,
+ XID *b)
{
return (*a == *b);
}