diff options
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/src/image.c b/src/image.c index f2778165ece..c444c986a76 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -50,11 +50,19 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 50 | #include "termhooks.h" | 50 | #include "termhooks.h" |
| 51 | #include "font.h" | 51 | #include "font.h" |
| 52 | 52 | ||
| 53 | #ifdef HAVE_X_WINDOWS | 53 | #ifdef HAVE_SYS_STAT_H |
| 54 | #include "xterm.h" | ||
| 55 | #include <sys/types.h> | ||
| 56 | #include <sys/stat.h> | 54 | #include <sys/stat.h> |
| 55 | #endif /* HAVE_SYS_STAT_H */ | ||
| 56 | |||
| 57 | #ifdef HAVE_SYS_TYPES_H | ||
| 58 | #include <sys/types.h> | ||
| 59 | #endif /* HAVE_SYS_TYPES_H */ | ||
| 60 | |||
| 61 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 62 | #include TERM_HEADER | ||
| 63 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 57 | 64 | ||
| 65 | #ifdef HAVE_X_WINDOWS | ||
| 58 | #define COLOR_TABLE_SUPPORT 1 | 66 | #define COLOR_TABLE_SUPPORT 1 |
| 59 | 67 | ||
| 60 | typedef struct x_bitmap_record Bitmap_Record; | 68 | typedef struct x_bitmap_record Bitmap_Record; |
| @@ -67,11 +75,7 @@ typedef struct x_bitmap_record Bitmap_Record; | |||
| 67 | #define PIX_MASK_DRAW 1 | 75 | #define PIX_MASK_DRAW 1 |
| 68 | #endif /* HAVE_X_WINDOWS */ | 76 | #endif /* HAVE_X_WINDOWS */ |
| 69 | 77 | ||
| 70 | |||
| 71 | #ifdef HAVE_NTGUI | 78 | #ifdef HAVE_NTGUI |
| 72 | #include "w32.h" | ||
| 73 | #include "w32term.h" | ||
| 74 | |||
| 75 | /* W32_TODO : Color tables on W32. */ | 79 | /* W32_TODO : Color tables on W32. */ |
| 76 | #undef COLOR_TABLE_SUPPORT | 80 | #undef COLOR_TABLE_SUPPORT |
| 77 | 81 | ||
| @@ -84,15 +88,9 @@ typedef struct w32_bitmap_record Bitmap_Record; | |||
| 84 | #define PIX_MASK_RETAIN 0 | 88 | #define PIX_MASK_RETAIN 0 |
| 85 | #define PIX_MASK_DRAW 1 | 89 | #define PIX_MASK_DRAW 1 |
| 86 | 90 | ||
| 87 | #define FRAME_X_VISUAL(f) FRAME_X_DISPLAY_INFO (f)->visual | ||
| 88 | #define x_defined_color w32_defined_color | 91 | #define x_defined_color w32_defined_color |
| 89 | #define DefaultDepthOfScreen(screen) (one_w32_display_info.n_cbits) | 92 | #define DefaultDepthOfScreen(screen) (one_w32_display_info.n_cbits) |
| 90 | 93 | ||
| 91 | /* Functions from w32term.c that depend on XColor (so can't go in w32term.h | ||
| 92 | without modifying lots of files). */ | ||
| 93 | extern void x_query_colors (struct frame *f, XColor *colors, int ncolors); | ||
| 94 | extern void x_query_color (struct frame *f, XColor *color); | ||
| 95 | |||
| 96 | /* Version of libpng that we were compiled with, or -1 if no PNG | 94 | /* Version of libpng that we were compiled with, or -1 if no PNG |
| 97 | support was compiled in. This is tested by w32-win.el to correctly | 95 | support was compiled in. This is tested by w32-win.el to correctly |
| 98 | set up the alist used to search for PNG libraries. */ | 96 | set up the alist used to search for PNG libraries. */ |
| @@ -100,10 +98,6 @@ Lisp_Object Qlibpng_version; | |||
| 100 | #endif /* HAVE_NTGUI */ | 98 | #endif /* HAVE_NTGUI */ |
| 101 | 99 | ||
| 102 | #ifdef HAVE_NS | 100 | #ifdef HAVE_NS |
| 103 | #include "nsterm.h" | ||
| 104 | #include <sys/types.h> | ||
| 105 | #include <sys/stat.h> | ||
| 106 | |||
| 107 | #undef COLOR_TABLE_SUPPORT | 101 | #undef COLOR_TABLE_SUPPORT |
| 108 | 102 | ||
| 109 | typedef struct ns_bitmap_record Bitmap_Record; | 103 | typedef struct ns_bitmap_record Bitmap_Record; |
| @@ -117,10 +111,8 @@ typedef struct ns_bitmap_record Bitmap_Record; | |||
| 117 | #define PIX_MASK_RETAIN 0 | 111 | #define PIX_MASK_RETAIN 0 |
| 118 | #define PIX_MASK_DRAW 1 | 112 | #define PIX_MASK_DRAW 1 |
| 119 | 113 | ||
| 120 | #define FRAME_X_VISUAL FRAME_NS_DISPLAY_INFO (f)->visual | ||
| 121 | #define x_defined_color(f, name, color_def, alloc) \ | 114 | #define x_defined_color(f, name, color_def, alloc) \ |
| 122 | ns_defined_color (f, name, color_def, alloc, 0) | 115 | ns_defined_color (f, name, color_def, alloc, 0) |
| 123 | #define FRAME_X_SCREEN(f) 0 | ||
| 124 | #define DefaultDepthOfScreen(screen) x_display_list->n_planes | 116 | #define DefaultDepthOfScreen(screen) x_display_list->n_planes |
| 125 | #endif /* HAVE_NS */ | 117 | #endif /* HAVE_NS */ |
| 126 | 118 | ||
| @@ -577,6 +569,7 @@ static void x_emboss (struct frame *, struct image *); | |||
| 577 | static int x_build_heuristic_mask (struct frame *, struct image *, | 569 | static int x_build_heuristic_mask (struct frame *, struct image *, |
| 578 | Lisp_Object); | 570 | Lisp_Object); |
| 579 | #ifdef HAVE_NTGUI | 571 | #ifdef HAVE_NTGUI |
| 572 | extern Lisp_Object Vlibrary_cache, QCloaded_from; | ||
| 580 | #define CACHE_IMAGE_TYPE(type, status) \ | 573 | #define CACHE_IMAGE_TYPE(type, status) \ |
| 581 | do { Vlibrary_cache = Fcons (Fcons (type, status), Vlibrary_cache); } while (0) | 574 | do { Vlibrary_cache = Fcons (Fcons (type, status), Vlibrary_cache); } while (0) |
| 582 | #else | 575 | #else |