X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fglyphs.c;h=a83f4b9e95dc43f8585f6da3ee3beebdb54ea36d;hb=74f57eef75bfea808b9d7b09c9e3dfa40c9302c1;hp=7804e038261f7bce8e1a34ba3480fd82e17e8ee6;hpb=571a24e2bfea15d37c3503414674f59e89ec9652;p=chise%2Fxemacs-chise.git.1 diff --git a/src/glyphs.c b/src/glyphs.c index 7804e03..a83f4b9 100644 --- a/src/glyphs.c +++ b/src/glyphs.c @@ -46,7 +46,7 @@ Boston, MA 02111-1307, USA. */ #include "specifier.h" #include "window.h" -#ifdef HAVE_XPM +#if defined (HAVE_XPM) && !defined (HAVE_GTK) #include #endif @@ -2265,11 +2265,13 @@ query_string_geometry (Lisp_Object string, Lisp_Object face, int* width, int* height, int* descent, Lisp_Object domain) { struct font_metric_info fm; - unsigned char charsets[NUM_LEADING_BYTES]; + Charset_ID charsets[NUM_LEADING_BYTES]; struct face_cachel frame_cachel; struct face_cachel *cachel; Lisp_Object frame = DOMAIN_FRAME (domain); + CHECK_STRING (string); + /* Compute height */ if (height) { @@ -2317,7 +2319,7 @@ query_string_geometry (Lisp_Object string, Lisp_Object face, Lisp_Object query_string_font (Lisp_Object string, Lisp_Object face, Lisp_Object domain) { - unsigned char charsets[NUM_LEADING_BYTES]; + Charset_ID charsets[NUM_LEADING_BYTES]; struct face_cachel frame_cachel; struct face_cachel *cachel; int i; @@ -2811,6 +2813,14 @@ xface_possible_dest_types (void) * XPM * **********************************************************************/ +#ifdef HAVE_GTK +/* Gtk has to be gratuitously different, eh? */ +Lisp_Object +pixmap_to_lisp_data (Lisp_Object name, int ok_if_data_invalid) +{ + return (make_string_from_file (name)); +} +#else Lisp_Object pixmap_to_lisp_data (Lisp_Object name, int ok_if_data_invalid) { @@ -2892,6 +2902,7 @@ pixmap_to_lisp_data (Lisp_Object name, int ok_if_data_invalid) return Qnil; /* not reached */ } +#endif /* !HAVE_GTK */ static void check_valid_xpm_color_symbols (Lisp_Object data) @@ -4412,9 +4423,9 @@ check_for_ignored_expose (struct frame* f, int x, int y, int width, int height) we have to check for overlaps. Being conservative, we will check for exposures wholly contained by the subwindow - this might give us what we want.*/ - if (ei->x <= x && ei->y <= y - && ei->x + ei->width >= x + width - && ei->y + ei->height >= y + height) + if (ei->x <= (unsigned) x && ei->y <= (unsigned) y + && ei->x + ei->width >= (unsigned) (x + width) + && ei->y + ei->height >= (unsigned) (y + height)) { #ifdef DEBUG_WIDGETS stderr_out ("ignored %d+%d, %dx%d for exposure %d+%d, %dx%d\n", @@ -4482,15 +4493,15 @@ int find_matching_subwindow (struct frame* f, int x, int y, int width, int heigh if (IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) && - IMAGE_INSTANCE_DISPLAY_X (ii) <= x + IMAGE_INSTANCE_DISPLAY_X (ii) <= (unsigned) x && - IMAGE_INSTANCE_DISPLAY_Y (ii) <= y + IMAGE_INSTANCE_DISPLAY_Y (ii) <= (unsigned) y && IMAGE_INSTANCE_DISPLAY_X (ii) - + IMAGE_INSTANCE_DISPLAY_WIDTH (ii) >= x + width + + IMAGE_INSTANCE_DISPLAY_WIDTH (ii) >= (unsigned) (x + width) && IMAGE_INSTANCE_DISPLAY_Y (ii) - + IMAGE_INSTANCE_DISPLAY_HEIGHT (ii) >= y + height) + + IMAGE_INSTANCE_DISPLAY_HEIGHT (ii) >= (unsigned) (y + height)) { return 1; } @@ -4623,8 +4634,8 @@ void unmap_subwindow (Lisp_Object subwindow) ERROR_CHECK_IMAGE_INSTANCE (subwindow); - if (!image_instance_type_to_mask (IMAGE_INSTANCE_TYPE (ii)) - & (IMAGE_WIDGET_MASK | IMAGE_SUBWINDOW_MASK) + if (!(image_instance_type_to_mask (IMAGE_INSTANCE_TYPE (ii)) + & (IMAGE_WIDGET_MASK | IMAGE_SUBWINDOW_MASK)) || !IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii)) return; @@ -4654,8 +4665,8 @@ void map_subwindow (Lisp_Object subwindow, int x, int y, ERROR_CHECK_IMAGE_INSTANCE (subwindow); - if (!image_instance_type_to_mask (IMAGE_INSTANCE_TYPE (ii)) - & (IMAGE_WIDGET_MASK | IMAGE_SUBWINDOW_MASK)) + if (!(image_instance_type_to_mask (IMAGE_INSTANCE_TYPE (ii)) + & (IMAGE_WIDGET_MASK | IMAGE_SUBWINDOW_MASK))) return; #ifdef DEBUG_WIDGETS