From: Ken Brown Date: Sun, 17 Mar 2013 14:34:18 +0000 (-0400) Subject: Fix return type of image_background (Bug#13981) X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~555 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6db423a92abf874f1780b8ddb2786dff4fc5b942;p=emacs.git Fix return type of image_background (Bug#13981) * src/dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it as return type of image_background. (Bug#13981) * src/image.c (RGB_PIXEL_COLOR): Move to dispextern.h. --- diff --git a/src/ChangeLog b/src/ChangeLog index 3a2a36c0cf7..4ece7400276 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-03-17 Ken Brown + + * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it + as return type of image_background. (Bug#13981) + * image.c (RGB_PIXEL_COLOR): Move to dispextern.h. + 2013-03-16 Jan Djärv * nsterm.m (updateFrameSize:): Change resize increments if needed. diff --git a/src/dispextern.h b/src/dispextern.h index 46878745c07..a696abfddbb 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3186,7 +3186,15 @@ bool valid_image_p (Lisp_Object); void prepare_image_for_display (struct frame *, struct image *); ptrdiff_t lookup_image (struct frame *, Lisp_Object); -unsigned long image_background (struct image *, struct frame *, +#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) +#define RGB_PIXEL_COLOR unsigned long +#endif + +#ifdef HAVE_NTGUI +#define RGB_PIXEL_COLOR COLORREF +#endif + +RGB_PIXEL_COLOR image_background (struct image *, struct frame *, XImagePtr_or_DC ximg); int image_background_transparent (struct image *, struct frame *, XImagePtr_or_DC mask); diff --git a/src/image.c b/src/image.c index 2d4e7e731ad..0d4bc82f3b4 100644 --- a/src/image.c +++ b/src/image.c @@ -68,8 +68,6 @@ typedef struct x_bitmap_record Bitmap_Record; #define GET_PIXEL(ximg, x, y) XGetPixel (ximg, x, y) #define NO_PIXMAP None -#define RGB_PIXEL_COLOR unsigned long - #define PIX_MASK_RETAIN 0 #define PIX_MASK_DRAW 1 #endif /* HAVE_X_WINDOWS */ @@ -88,8 +86,6 @@ typedef struct w32_bitmap_record Bitmap_Record; #define GET_PIXEL(ximg, x, y) GetPixel (ximg, x, y) #define NO_PIXMAP 0 -#define RGB_PIXEL_COLOR COLORREF - #define PIX_MASK_RETAIN 0 #define PIX_MASK_DRAW 1 @@ -110,7 +106,6 @@ typedef struct ns_bitmap_record Bitmap_Record; #define GET_PIXEL(ximg, x, y) XGetPixel (ximg, x, y) #define NO_PIXMAP 0 -#define RGB_PIXEL_COLOR unsigned long #define ZPixmap 0 #define PIX_MASK_RETAIN 0