comparison src/glyphs-x.c @ 16:0293115a14e9 r19-15b91

Import from CVS: tag r19-15b91
author cvs
date Mon, 13 Aug 2007 08:49:20 +0200
parents 9ee227acff29
children 859a2309aef8
comparison
equal deleted inserted replaced
15:ad457d5f7d04 16:0293115a14e9
982 abort (); 982 abort ();
983 } 983 }
984 } 984 }
985 985
986 static int 986 static int
987 xbm_possible_dest_types () 987 xbm_possible_dest_types (void)
988 { 988 {
989 return IMAGE_MONO_PIXMAP_MASK | IMAGE_COLOR_PIXMAP_MASK | 989 return
990 IMAGE_MONO_PIXMAP_MASK |
991 IMAGE_COLOR_PIXMAP_MASK |
990 IMAGE_POINTER_MASK; 992 IMAGE_POINTER_MASK;
991 } 993 }
992 994
993 static void 995 static void
994 xbm_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator, 996 xbm_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator,
1064 { 1066 {
1065 return simple_image_type_normalize (inst, console_type, Qjpeg); 1067 return simple_image_type_normalize (inst, console_type, Qjpeg);
1066 } 1068 }
1067 1069
1068 static int 1070 static int
1069 jpeg_possible_dest_types () 1071 jpeg_possible_dest_types (void)
1070 { 1072 {
1071 return IMAGE_COLOR_PIXMAP_MASK; 1073 return IMAGE_COLOR_PIXMAP_MASK;
1072 } 1074 }
1073 1075
1074 /* To survive the otherwise baffling complexity of making sure 1076 /* To survive the otherwise baffling complexity of making sure
1545 { 1547 {
1546 return simple_image_type_normalize (inst, console_type, Qgif); 1548 return simple_image_type_normalize (inst, console_type, Qgif);
1547 } 1549 }
1548 1550
1549 static int 1551 static int
1550 gif_possible_dest_types () 1552 gif_possible_dest_types (void)
1551 { 1553 {
1552 return IMAGE_COLOR_PIXMAP_MASK; 1554 return IMAGE_COLOR_PIXMAP_MASK;
1553 } 1555 }
1554 1556
1555 /* To survive the otherwise baffling complexity of making sure 1557 /* To survive the otherwise baffling complexity of making sure
1866 { 1868 {
1867 return simple_image_type_normalize (inst, console_type, Qpng); 1869 return simple_image_type_normalize (inst, console_type, Qpng);
1868 } 1870 }
1869 1871
1870 static int 1872 static int
1871 png_possible_dest_types () 1873 png_possible_dest_types (void)
1872 { 1874 {
1873 return IMAGE_COLOR_PIXMAP_MASK; 1875 return IMAGE_COLOR_PIXMAP_MASK;
1874 } 1876 }
1875 1877
1876 #if !defined (USE_TEMP_FILES_FOR_IMAGES) && (PNG_LIBPNG_VER >= 87) 1878 #if !defined (USE_TEMP_FILES_FOR_IMAGES) && (PNG_LIBPNG_VER >= 87)
2245 signal_simple_error ("No TIFF support yet", inst); 2247 signal_simple_error ("No TIFF support yet", inst);
2246 return Qnil; 2248 return Qnil;
2247 } 2249 }
2248 2250
2249 static int 2251 static int
2250 tiff_possible_dest_types () 2252 tiff_possible_dest_types (void)
2251 { 2253 {
2252 return IMAGE_COLOR_PIXMAP_MASK; 2254 return IMAGE_COLOR_PIXMAP_MASK;
2253 } 2255 }
2254 2256
2255 static void 2257 static void
2461 RETURN_UNGCPRO (result); 2463 RETURN_UNGCPRO (result);
2462 } 2464 }
2463 } 2465 }
2464 2466
2465 static int 2467 static int
2466 xpm_possible_dest_types () 2468 xpm_possible_dest_types (void)
2467 { 2469 {
2468 return IMAGE_MONO_PIXMAP_MASK | IMAGE_COLOR_PIXMAP_MASK | 2470 return
2471 IMAGE_MONO_PIXMAP_MASK |
2472 IMAGE_COLOR_PIXMAP_MASK |
2469 IMAGE_POINTER_MASK; 2473 IMAGE_POINTER_MASK;
2470 } 2474 }
2471 2475
2472 /* xpm 3.2g and better has XpmCreatePixmapFromBuffer()... 2476 /* xpm 3.2g and better has XpmCreatePixmapFromBuffer()...
2473 There was no version number in xpm.h before 3.3, but this should do. 2477 There was no version number in xpm.h before 3.3, but this should do.
2949 RETURN_UNGCPRO (result); 2953 RETURN_UNGCPRO (result);
2950 } 2954 }
2951 } 2955 }
2952 2956
2953 static int 2957 static int
2954 xface_possible_dest_types () 2958 xface_possible_dest_types (void)
2955 { 2959 {
2956 return IMAGE_MONO_PIXMAP_MASK | IMAGE_COLOR_PIXMAP_MASK | 2960 return
2961 IMAGE_MONO_PIXMAP_MASK |
2962 IMAGE_COLOR_PIXMAP_MASK |
2957 IMAGE_POINTER_MASK; 2963 IMAGE_POINTER_MASK;
2958 } 2964 }
2959 2965
2960 #if defined(EXTERN) 2966 #if defined(EXTERN)
2961 /* This is about to get redefined! */ 2967 /* This is about to get redefined! */
2977 int dest_mask) 2983 int dest_mask)
2978 { 2984 {
2979 Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); 2985 Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
2980 int i, stattis; 2986 int i, stattis;
2981 char *p, *bits, *bp; 2987 char *p, *bits, *bp;
2982 CONST char *emsg = 0; 2988 CONST char * volatile emsg = 0;
2983 CONST char *dstring; 2989 CONST char * volatile dstring;
2984 2990
2985 assert (!NILP (data)); 2991 assert (!NILP (data));
2986 2992
2987 GET_C_STRING_BINARY_DATA_ALLOCA (data, dstring); 2993 GET_C_STRING_BINARY_DATA_ALLOCA (data, dstring);
2988 2994
3125 RETURN_UNGCPRO (result); 3131 RETURN_UNGCPRO (result);
3126 } 3132 }
3127 } 3133 }
3128 3134
3129 static int 3135 static int
3130 autodetect_possible_dest_types () 3136 autodetect_possible_dest_types (void)
3131 { 3137 {
3132 return IMAGE_MONO_PIXMAP_MASK | IMAGE_COLOR_PIXMAP_MASK | 3138 return
3133 IMAGE_POINTER_MASK | IMAGE_TEXT_MASK; 3139 IMAGE_MONO_PIXMAP_MASK |
3140 IMAGE_COLOR_PIXMAP_MASK |
3141 IMAGE_POINTER_MASK |
3142 IMAGE_TEXT_MASK;
3134 } 3143 }
3135 3144
3136 static void 3145 static void
3137 autodetect_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, 3146 autodetect_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
3138 Lisp_Object pointer_fg, Lisp_Object pointer_bg, 3147 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
3223 if (XLoadFont_got_error) return 0; 3232 if (XLoadFont_got_error) return 0;
3224 return font; 3233 return font;
3225 } 3234 }
3226 3235
3227 static int 3236 static int
3228 font_possible_dest_types () 3237 font_possible_dest_types (void)
3229 { 3238 {
3230 return IMAGE_POINTER_MASK; 3239 return IMAGE_POINTER_MASK;
3231 } 3240 }
3232 3241
3233 static void 3242 static void
3321 { 3330 {
3322 data_must_be_present (instantiator); 3331 data_must_be_present (instantiator);
3323 } 3332 }
3324 3333
3325 static int 3334 static int
3326 cursor_font_possible_dest_types () 3335 cursor_font_possible_dest_types (void)
3327 { 3336 {
3328 return IMAGE_POINTER_MASK; 3337 return IMAGE_POINTER_MASK;
3329 } 3338 }
3330 3339
3331 static void 3340 static void
3600 3609
3601 sw = XSUBWINDOW (subwindow); 3610 sw = XSUBWINDOW (subwindow);
3602 dpy = DisplayOfScreen (LISP_DEVICE_TO_X_SCREEN 3611 dpy = DisplayOfScreen (LISP_DEVICE_TO_X_SCREEN
3603 (FRAME_DEVICE (XFRAME (sw->frame)))); 3612 (FRAME_DEVICE (XFRAME (sw->frame))));
3604 3613
3605 property_atom = XInternAtom (dpy, (char *) XSTRING_DATA (property), 3614 property_atom = XInternAtom (dpy, (char *) XSTRING_DATA (property), False);
3606 False);
3607 XChangeProperty (dpy, sw->subwindow, property_atom, XA_STRING, 8, 3615 XChangeProperty (dpy, sw->subwindow, property_atom, XA_STRING, 8,
3608 PropModeReplace, XSTRING_DATA (data), 3616 PropModeReplace,
3617 XSTRING_DATA (data),
3609 XSTRING_LENGTH (data)); 3618 XSTRING_LENGTH (data));
3610 3619
3611 return (property); 3620 return (property);
3612 } 3621 }
3613 3622