Mercurial > hg > xemacs-beta
changeset 3087:dbd2a866e38a
[xemacs-hg @ 2005-11-22 11:24:40 by malcolmp]
Fix compilation errors and warnings in GTK code that have appeared over the
last few months.
author | malcolmp |
---|---|
date | Tue, 22 Nov 2005 11:24:45 +0000 |
parents | c6ef6267f65c |
children | f6505976acd1 |
files | src/ChangeLog src/frame-gtk.c src/glyphs-gtk.c src/glyphs-gtk.h src/gtk-xemacs.c src/redisplay-gtk.c |
diffstat | 6 files changed, 25 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Tue Nov 22 10:36:39 2005 +0000 +++ b/src/ChangeLog Tue Nov 22 11:24:45 2005 +0000 @@ -1,3 +1,14 @@ +2005-11-22 Malcolm Purvis <malcolmp@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@xemacs.org> * keymap.c (Fdefine_key): More focused docstring.
--- a/src/frame-gtk.c Tue Nov 22 10:36:39 2005 +0000 +++ b/src/frame-gtk.c Tue Nov 22 11:24:45 2005 +0000 @@ -265,7 +265,7 @@ } 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)
--- a/src/glyphs-gtk.c Tue Nov 22 10:36:39 2005 +0000 +++ b/src/glyphs-gtk.c Tue Nov 22 11:24:45 2005 +0000 @@ -686,8 +686,8 @@ 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 @@ 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 @@ 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;
--- a/src/glyphs-gtk.h Tue Nov 22 10:36:39 2005 +0000 +++ b/src/glyphs-gtk.h Tue Nov 22 11:24:45 2005 +0000 @@ -86,7 +86,7 @@ (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)
--- a/src/gtk-xemacs.c Tue Nov 22 10:36:39 2005 +0000 +++ b/src/gtk-xemacs.c Tue Nov 22 11:24:45 2005 +0000 @@ -410,6 +410,8 @@ redisplay_redraw_exposed_area (f, a->x, a->y, a->width, a->height); return (TRUE); } + + return FALSE; } Lisp_Object
--- a/src/redisplay-gtk.c Tue Nov 22 10:36:39 2005 +0000 +++ b/src/redisplay-gtk.c Tue Nov 22 11:24:45 2005 +0000 @@ -1176,7 +1176,7 @@ 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);