User: malcolmp
Date: 05/11/22 12:24:55
Modified: xemacs/src ChangeLog frame-gtk.c glyphs-gtk.c glyphs-gtk.h
gtk-xemacs.c redisplay-gtk.c
Log:
Fix compilation errors and warnings in GTK code that have appeared over the
last few months.
Revision Changes Path
1.891 +11 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.890
retrieving revision 1.891
diff -u -p -r1.890 -r1.891
--- ChangeLog 2005/11/22 10:36:34 1.890
+++ ChangeLog 2005/11/22 11:24:40 1.891
@@ -1,3 +1,14 @@
+2005-11-22 Malcolm Purvis <malcolmp(a)xemacs.org>
+
+ * frame-gtk.c (gtk_internal_frame_property_p):
+ * glyphs-gtk.c (image_instance_convert_to_pointer):
+ * glyphs-gtk.c (gtk_xpm_instantiate):
+ * glyphs-gtk.h (IMAGE_INSTANCE_GTK_MASK):
+ * gtk-xemacs.c (gtk_xemacs_expose):
+ * redisplay-gtk.c (gtk_output_vertical_divider):
+ Fix compilation errors and warnings that have appeared over the
+ last few months.
+
2005-11-22 Stephen J. Turnbull <stephen(a)xemacs.org>
* keymap.c (Fdefine_key): More focused docstring.
1.21 +1 -1 XEmacs/xemacs/src/frame-gtk.c
Index: frame-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/frame-gtk.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -p -r1.20 -r1.21
--- frame-gtk.c 2005/01/24 23:33:56 1.20
+++ frame-gtk.c 2005/11/22 11:24:44 1.21
@@ -265,7 +265,7 @@ gtk_frame_property (struct frame *f, Lis
}
static int
-gtk_internal_frame_property_p (struct frame *f, Lisp_Object property)
+gtk_internal_frame_property_p (struct frame *UNUSED(f), Lisp_Object property)
{
return EQ (property, Qleft)
|| EQ (property, Qtop)
1.32 +9 -8 XEmacs/xemacs/src/glyphs-gtk.c
Index: glyphs-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-gtk.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -p -r1.31 -r1.32
--- glyphs-gtk.c 2005/09/27 05:48:26 1.31
+++ glyphs-gtk.c 2005/11/22 11:24:44 1.32
@@ -686,8 +686,8 @@ image_instance_convert_to_pointer (Lisp_
Lisp_Object pointer_bg)
{
Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
- GdkPixmap *pixmap = IMAGE_INSTANCE_X_PIXMAP (ii);
- GdkPixmap *mask = (GdkPixmap *) IMAGE_INSTANCE_PIXMAP_MASK (ii);
+ GdkPixmap *pixmap = IMAGE_INSTANCE_GTK_PIXMAP (ii);
+ GdkPixmap *mask = (GdkPixmap *) IMAGE_INSTANCE_GTK_MASK (ii);
GdkColor fg, bg;
int xhot = 0, yhot = 0;
int w, h;
@@ -1310,7 +1310,7 @@ gtk_xpm_instantiate (Lisp_Object image_i
gdk_window_get_geometry (pixmap, NULL, NULL, &w, &h, &depth);
IMAGE_INSTANCE_GTK_PIXMAP (ii) = pixmap;
- IMAGE_INSTANCE_PIXMAP_MASK (ii) = (void*)mask;
+ IMAGE_INSTANCE_PIXMAP_MASK (ii) = mask;
IMAGE_INSTANCE_GTK_COLORMAP (ii) = cmap;
IMAGE_INSTANCE_GTK_PIXELS (ii) = 0;
IMAGE_INSTANCE_GTK_NPIXELS (ii) = 0;
@@ -1329,11 +1329,12 @@ gtk_xpm_instantiate (Lisp_Object image_i
break;
case IMAGE_POINTER:
- if (xpmattrs.valuemask & XpmHotspot)
- IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii) = make_int (xpmattrs.x_hotspot);
- if (xpmattrs.valuemask & XpmHotspot)
- IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii) = make_int (xpmattrs.y_hotspot);
-
+ /* #### Gtk does not give us access to the hotspots of a pixmap */
+
+ IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii) = 1;
+ IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii) = 1;
+
+
image_instance_convert_to_pointer (ii, instantiator, pointer_fg,
pointer_bg);
break;
1.4 +1 -1 XEmacs/xemacs/src/glyphs-gtk.h
Index: glyphs-gtk.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-gtk.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- glyphs-gtk.h 2004/05/15 07:43:09 1.3
+++ glyphs-gtk.h 2005/11/22 11:24:45 1.4
@@ -86,7 +86,7 @@ void init_image_instance_from_gdk_pixmap
(GTK_IMAGE_INSTANCE_DATA (i)->pixmaps[slice])
#define IMAGE_INSTANCE_GTK_PIXMAP_SLICES(i) \
(GTK_IMAGE_INSTANCE_DATA (i)->pixmaps)
-#define IMAGE_INSTANCE_GTK_MASK(i) (GdkPixmap*)(IMAGE_INSTANCE_PIXMAP_MASK (i))
+#define IMAGE_INSTANCE_GTK_MASK(i) ((GdkPixmap*)(IMAGE_INSTANCE_PIXMAP_MASK (i)))
#define IMAGE_INSTANCE_GTK_CURSOR(i) (GTK_IMAGE_INSTANCE_DATA (i)->cursor)
#define IMAGE_INSTANCE_GTK_COLORMAP(i) (GTK_IMAGE_INSTANCE_DATA (i)->colormap)
#define IMAGE_INSTANCE_GTK_PIXELS(i) (GTK_IMAGE_INSTANCE_DATA (i)->pixels)
1.15 +2 -0 XEmacs/xemacs/src/gtk-xemacs.c
Index: gtk-xemacs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gtk-xemacs.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- gtk-xemacs.c 2004/10/16 13:08:58 1.14
+++ gtk-xemacs.c 2005/11/22 11:24:45 1.15
@@ -410,6 +410,8 @@ gtk_xemacs_expose (GtkWidget *widget, Gd
redisplay_redraw_exposed_area (f, a->x, a->y, a->width, a->height);
return (TRUE);
}
+
+ return FALSE;
}
Lisp_Object
1.18 +1 -1 XEmacs/xemacs/src/redisplay-gtk.c
Index: redisplay-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/redisplay-gtk.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -p -r1.17 -r1.18
--- redisplay-gtk.c 2005/01/24 23:34:06 1.17
+++ redisplay-gtk.c 2005/11/22 11:24:45 1.18
@@ -1176,7 +1176,7 @@ gtk_output_pixmap (struct window *w,
Draw a vertical divider down the right side of the given window.
****************************************************************************/
static void
-gtk_output_vertical_divider (struct window *w, int clear)
+gtk_output_vertical_divider (struct window *w, int UNUSED(clear))
{
struct frame *f = XFRAME (w->frame);
struct device *d = XDEVICE (f->device);