comparison src/glyphs-x.c @ 384:bbff43aa5eb7 r21-2-7

Import from CVS: tag r21-2-7
author cvs
date Mon, 13 Aug 2007 11:08:24 +0200
parents 8626e4521993
children aabb7f5b1c81
comparison
equal deleted inserted replaced
383:6a50c6a581a5 384:bbff43aa5eb7
52 #include "glyphs-x.h" 52 #include "glyphs-x.h"
53 #include "objects-x.h" 53 #include "objects-x.h"
54 #include "xmu.h" 54 #include "xmu.h"
55 55
56 #include "buffer.h" 56 #include "buffer.h"
57 #include "window.h"
57 #include "frame.h" 58 #include "frame.h"
58 #include "insdel.h" 59 #include "insdel.h"
59 #include "opaque.h" 60 #include "opaque.h"
60 61
61 #include "imgproc.h" 62 #include "imgproc.h"
78 #error What kind of strange-ass system are we running on? 79 #error What kind of strange-ass system are we running on?
79 #endif 80 #endif
80 81
81 #define LISP_DEVICE_TO_X_SCREEN(dev) XDefaultScreenOfDisplay (DEVICE_X_DISPLAY (XDEVICE (dev))) 82 #define LISP_DEVICE_TO_X_SCREEN(dev) XDefaultScreenOfDisplay (DEVICE_X_DISPLAY (XDEVICE (dev)))
82 83
84 #ifdef HAVE_XPM
85 DEFINE_DEVICE_IIFORMAT (x, xpm);
86 #endif
87 DEFINE_DEVICE_IIFORMAT (x, xbm);
88 DEFINE_DEVICE_IIFORMAT (x, subwindow);
83 #ifdef HAVE_XFACE 89 #ifdef HAVE_XFACE
84 DEFINE_IMAGE_INSTANTIATOR_FORMAT (xface); 90 DEFINE_IMAGE_INSTANTIATOR_FORMAT (xface);
85 Lisp_Object Qxface; 91 Lisp_Object Qxface;
86 #endif 92 #endif
87 93
312 sprintf (buf, "/0x%lx", (unsigned long) IMAGE_INSTANCE_X_MASK (p)); 318 sprintf (buf, "/0x%lx", (unsigned long) IMAGE_INSTANCE_X_MASK (p));
313 write_c_string (buf, printcharfun); 319 write_c_string (buf, printcharfun);
314 } 320 }
315 write_c_string (")", printcharfun); 321 write_c_string (")", printcharfun);
316 break; 322 break;
317 #if HAVE_SUBWINDOWS
318 case IMAGE_SUBWINDOW:
319 /* #### implement me */
320 #endif
321 default: 323 default:
322 break; 324 break;
323 } 325 }
324 } 326 }
325 327
331 333
332 if (DEVICE_LIVE_P (XDEVICE (p->device))) 334 if (DEVICE_LIVE_P (XDEVICE (p->device)))
333 { 335 {
334 Display *dpy = DEVICE_X_DISPLAY (XDEVICE (p->device)); 336 Display *dpy = DEVICE_X_DISPLAY (XDEVICE (p->device));
335 337
336 if (IMAGE_INSTANCE_X_PIXMAP (p)) 338 if (IMAGE_INSTANCE_TYPE (p) == IMAGE_WIDGET
337 XFreePixmap (dpy, IMAGE_INSTANCE_X_PIXMAP (p)); 339 ||
338 if (IMAGE_INSTANCE_X_MASK (p) && 340 IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW)
339 IMAGE_INSTANCE_X_MASK (p) != IMAGE_INSTANCE_X_PIXMAP (p))
340 XFreePixmap (dpy, IMAGE_INSTANCE_X_MASK (p));
341 IMAGE_INSTANCE_X_PIXMAP (p) = 0;
342 IMAGE_INSTANCE_X_MASK (p) = 0;
343
344 if (IMAGE_INSTANCE_X_CURSOR (p))
345 { 341 {
346 XFreeCursor (dpy, IMAGE_INSTANCE_X_CURSOR (p)); 342 if (IMAGE_INSTANCE_SUBWINDOW_ID (p))
347 IMAGE_INSTANCE_X_CURSOR (p) = 0; 343 XDestroyWindow (dpy, IMAGE_INSTANCE_X_SUBWINDOW_ID (p));
344 IMAGE_INSTANCE_SUBWINDOW_ID (p) = 0;
348 } 345 }
349 346 else
350 if (IMAGE_INSTANCE_X_NPIXELS (p) != 0)
351 { 347 {
352 XFreeColors (dpy, 348 if (IMAGE_INSTANCE_X_PIXMAP (p))
353 IMAGE_INSTANCE_X_COLORMAP (p), 349 XFreePixmap (dpy, IMAGE_INSTANCE_X_PIXMAP (p));
354 IMAGE_INSTANCE_X_PIXELS (p), 350 if (IMAGE_INSTANCE_X_MASK (p) &&
355 IMAGE_INSTANCE_X_NPIXELS (p), 0); 351 IMAGE_INSTANCE_X_MASK (p) != IMAGE_INSTANCE_X_PIXMAP (p))
356 IMAGE_INSTANCE_X_NPIXELS (p) = 0; 352 XFreePixmap (dpy, IMAGE_INSTANCE_X_MASK (p));
353 IMAGE_INSTANCE_X_PIXMAP (p) = 0;
354 IMAGE_INSTANCE_X_MASK (p) = 0;
355
356 if (IMAGE_INSTANCE_X_CURSOR (p))
357 {
358 XFreeCursor (dpy, IMAGE_INSTANCE_X_CURSOR (p));
359 IMAGE_INSTANCE_X_CURSOR (p) = 0;
360 }
361
362 if (IMAGE_INSTANCE_X_NPIXELS (p) != 0)
363 {
364 XFreeColors (dpy,
365 IMAGE_INSTANCE_X_COLORMAP (p),
366 IMAGE_INSTANCE_X_PIXELS (p),
367 IMAGE_INSTANCE_X_NPIXELS (p), 0);
368 IMAGE_INSTANCE_X_NPIXELS (p) = 0;
369 }
357 } 370 }
358 } 371 }
359 if (IMAGE_INSTANCE_X_PIXELS (p)) 372 if (IMAGE_INSTANCE_X_PIXELS (p))
360 { 373 {
361 xfree (IMAGE_INSTANCE_X_PIXELS (p)); 374 xfree (IMAGE_INSTANCE_X_PIXELS (p));
376 case IMAGE_COLOR_PIXMAP: 389 case IMAGE_COLOR_PIXMAP:
377 case IMAGE_POINTER: 390 case IMAGE_POINTER:
378 if (IMAGE_INSTANCE_X_COLORMAP (p1) != IMAGE_INSTANCE_X_COLORMAP (p2) || 391 if (IMAGE_INSTANCE_X_COLORMAP (p1) != IMAGE_INSTANCE_X_COLORMAP (p2) ||
379 IMAGE_INSTANCE_X_NPIXELS (p1) != IMAGE_INSTANCE_X_NPIXELS (p2)) 392 IMAGE_INSTANCE_X_NPIXELS (p1) != IMAGE_INSTANCE_X_NPIXELS (p2))
380 return 0; 393 return 0;
381 #if HAVE_SUBWINDOWS
382 case IMAGE_SUBWINDOW:
383 /* #### implement me */
384 #endif
385 break; 394 break;
386 default: 395 default:
387 break; 396 break;
388 } 397 }
389 398
397 { 406 {
398 case IMAGE_MONO_PIXMAP: 407 case IMAGE_MONO_PIXMAP:
399 case IMAGE_COLOR_PIXMAP: 408 case IMAGE_COLOR_PIXMAP:
400 case IMAGE_POINTER: 409 case IMAGE_POINTER:
401 return IMAGE_INSTANCE_X_NPIXELS (p); 410 return IMAGE_INSTANCE_X_NPIXELS (p);
402 #if HAVE_SUBWINDOWS
403 case IMAGE_SUBWINDOW:
404 /* #### implement me */
405 return 0;
406 #endif
407 default: 411 default:
408 return 0; 412 return 0;
409 } 413 }
410 } 414 }
411 415
2018 return 1; 2022 return 1;
2019 } 2023 }
2020 } 2024 }
2021 2025
2022 2026
2023 #if HAVE_SUBWINDOWS
2024 /************************************************************************/ 2027 /************************************************************************/
2025 /* subwindows */ 2028 /* subwindow and widget support */
2026 /************************************************************************/ 2029 /************************************************************************/
2027 2030
2028 Lisp_Object Qsubwindowp; 2031 /* unmap the image if it is a widget. This is used by redisplay via
2029 2032 redisplay_unmap_subwindows */
2030 static Lisp_Object 2033 static void
2031 mark_subwindow (Lisp_Object obj, void (*markobj) (Lisp_Object)) 2034 x_unmap_subwindow (struct Lisp_Image_Instance *p)
2032 { 2035 {
2033 struct Lisp_Subwindow *sw = XSUBWINDOW (obj); 2036 XUnmapWindow (DisplayOfScreen (IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (p)),
2034 return sw->frame; 2037 IMAGE_INSTANCE_X_SUBWINDOW_ID (p));
2035 } 2038 }
2036 2039
2037 static void 2040 /* map the subwindow. This is used by redisplay via
2038 print_subwindow (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) 2041 redisplay_output_subwindow */
2039 { 2042 static void
2040 char buf[100]; 2043 x_map_subwindow (struct Lisp_Image_Instance *p, int x, int y)
2041 struct Lisp_Subwindow *sw = XSUBWINDOW (obj); 2044 {
2042 struct frame *frm = XFRAME (sw->frame); 2045 XMapWindow (DisplayOfScreen (IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (p)),
2043 2046 IMAGE_INSTANCE_X_SUBWINDOW_ID (p));
2044 if (print_readably) 2047 XMoveWindow (DisplayOfScreen (IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (p)),
2045 error ("printing unreadable object #<subwindow 0x%x>", 2048 IMAGE_INSTANCE_X_SUBWINDOW_ID (p), x, y);
2046 sw->header.uid); 2049 }
2047 2050
2048 write_c_string ("#<subwindow", printcharfun); 2051 /* instantiate and x type subwindow */
2049 sprintf (buf, " %dx%d", sw->width, sw->height); 2052 static void
2050 write_c_string (buf, printcharfun); 2053 x_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
2051 2054 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
2052 /* This is stolen from frame.c. Subwindows are strange in that they 2055 int dest_mask, Lisp_Object domain)
2053 are specific to a particular frame so we want to print in their 2056 {
2054 description what that frame is. */ 2057 /* This function can GC */
2055 2058 struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
2056 write_c_string (" on #<", printcharfun); 2059 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
2057 if (!FRAME_LIVE_P (frm)) 2060 Lisp_Object frame = FW_FRAME (domain);
2058 write_c_string ("dead", printcharfun); 2061 struct frame* f = XFRAME (frame);
2059 else if (FRAME_TTY_P (frm))
2060 write_c_string ("tty", printcharfun);
2061 else if (FRAME_X_P (frm))
2062 write_c_string ("x", printcharfun);
2063 else
2064 write_c_string ("UNKNOWN", printcharfun);
2065 write_c_string ("-frame ", printcharfun);
2066 print_internal (frm->name, printcharfun, 1);
2067 sprintf (buf, " 0x%x>", frm->header.uid);
2068 write_c_string (buf, printcharfun);
2069
2070 sprintf (buf, ") 0x%x>", sw->header.uid);
2071 write_c_string (buf, printcharfun);
2072 }
2073
2074 static void
2075 finalize_subwindow (void *header, int for_disksave)
2076 {
2077 struct Lisp_Subwindow *sw = (struct Lisp_Subwindow *) header;
2078 if (for_disksave) finalose (sw);
2079 if (sw->subwindow)
2080 {
2081 XDestroyWindow (DisplayOfScreen (sw->xscreen), sw->subwindow);
2082 sw->subwindow = 0;
2083 }
2084 }
2085
2086 /* subwindows are equal iff they have the same window XID */
2087 static int
2088 subwindow_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
2089 {
2090 return (XSUBWINDOW (obj1)->subwindow == XSUBWINDOW (obj2)->subwindow);
2091 }
2092
2093 static unsigned long
2094 subwindow_hash (Lisp_Object obj, int depth)
2095 {
2096 return XSUBWINDOW (obj)->subwindow;
2097 }
2098
2099 DEFINE_LRECORD_IMPLEMENTATION ("subwindow", subwindow,
2100 mark_subwindow, print_subwindow,
2101 finalize_subwindow, subwindow_equal,
2102 subwindow_hash, struct Lisp_Subwindow);
2103
2104 /* #### PROBLEM: The display routines assume that the glyph is only
2105 being displayed in one buffer. If it is in two different buffers
2106 which are both being displayed simultaneously you will lose big time.
2107 This can be dealt with in the new redisplay. */
2108
2109 /* #### These are completely un-re-implemented in 19.14. Get it done
2110 for 19.15. */
2111
2112 DEFUN ("make-subwindow", Fmake_subwindow, 0, 3, 0, /*
2113 Creates a new `subwindow' object of size WIDTH x HEIGHT.
2114 The default is a window of size 1x1, which is also the minimum allowed
2115 window size. Subwindows are per-frame. A buffer being shown in two
2116 different frames will only display a subwindow glyph in the frame in
2117 which it was actually created. If two windows on the same frame are
2118 displaying the buffer then the most recently used window will actually
2119 display the window. If the frame is not specified, the selected frame
2120 is used.
2121
2122 Subwindows are not currently implemented.
2123 */
2124 (width, height, frame))
2125 {
2126 Display *dpy; 2062 Display *dpy;
2127 Screen *xs; 2063 Screen *xs;
2128 Window pw; 2064 Window pw, win;
2129 struct frame *f;
2130 unsigned int iw, ih;
2131 XSetWindowAttributes xswa; 2065 XSetWindowAttributes xswa;
2132 Mask valueMask = 0; 2066 Mask valueMask = 0;
2133 2067 unsigned int w = IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii),
2134 error ("subwindows are not functional in 20.2; they may be again someday"); 2068 h = IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii);
2135 2069
2136 f = decode_x_frame (frame); 2070 if (!DEVICE_X_P (XDEVICE (device)))
2137 2071 signal_simple_error ("Not an X device", device);
2138 xs = LISP_DEVICE_TO_X_SCREEN (FRAME_DEVICE (f)); 2072
2139 dpy = DisplayOfScreen (xs); 2073 dpy = DEVICE_X_DISPLAY (XDEVICE (device));
2074 xs = DefaultScreenOfDisplay (dpy);
2075
2076 if (dest_mask & IMAGE_SUBWINDOW_MASK)
2077 IMAGE_INSTANCE_TYPE (ii) = IMAGE_SUBWINDOW;
2078 else
2079 incompatible_image_types (instantiator, dest_mask,
2080 IMAGE_SUBWINDOW_MASK);
2081
2140 pw = XtWindow (FRAME_X_TEXT_WIDGET (f)); 2082 pw = XtWindow (FRAME_X_TEXT_WIDGET (f));
2141 2083
2142 if (NILP (width)) 2084 ii->data = xnew_and_zero (struct x_subwindow_data);
2143 iw = 1; 2085
2144 else 2086 IMAGE_INSTANCE_X_SUBWINDOW_PARENT (ii) = pw;
2145 { 2087 IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (ii) = xs;
2146 CHECK_INT (width); 2088
2147 iw = XINT (width); 2089 xswa.backing_store = Always;
2148 if (iw < 1) iw = 1; 2090 valueMask |= CWBackingStore;
2149 } 2091 xswa.colormap = DefaultColormapOfScreen (xs);
2150 if (NILP (height)) 2092 valueMask |= CWColormap;
2151 ih = 1; 2093
2152 else 2094 win = XCreateWindow (dpy, pw, 0, 0, w, h, 0, CopyFromParent,
2153 { 2095 InputOutput, CopyFromParent, valueMask,
2154 CHECK_INT (height); 2096 &xswa);
2155 ih = XINT (height); 2097
2156 if (ih < 1) ih = 1; 2098 IMAGE_INSTANCE_SUBWINDOW_ID (ii) = (void*)win;
2157 } 2099 }
2158 2100
2159 { 2101 #if 0
2160 struct Lisp_Subwindow *sw = 2102 /* #### Should this function exist? If there's any doubt I'm not implementing it --andyp */
2161 alloc_lcrecord_type (struct Lisp_Subwindow, lrecord_subwindow);
2162 Lisp_Object val;
2163 sw->frame = frame;
2164 sw->xscreen = xs;
2165 sw->parent_window = pw;
2166 sw->height = ih;
2167 sw->width = iw;
2168
2169 xswa.backing_store = Always;
2170 valueMask |= CWBackingStore;
2171
2172 xswa.colormap = DefaultColormapOfScreen (xs);
2173 valueMask |= CWColormap;
2174
2175 sw->subwindow = XCreateWindow (dpy, pw, 0, 0, iw, ih, 0, CopyFromParent,
2176 InputOutput, CopyFromParent, valueMask,
2177 &xswa);
2178
2179 XSETSUBWINDOW (val, sw);
2180 return val;
2181 }
2182 }
2183
2184 /* #### Should this function exist? */
2185 DEFUN ("change-subwindow-property", Fchange_subwindow_property, 3, 3, 0, /* 2103 DEFUN ("change-subwindow-property", Fchange_subwindow_property, 3, 3, 0, /*
2186 For the given SUBWINDOW, set PROPERTY to DATA, which is a string. 2104 For the given SUBWINDOW, set PROPERTY to DATA, which is a string.
2187 Subwindows are not currently implemented. 2105 Subwindows are not currently implemented.
2188 */ 2106 */
2189 (subwindow, property, data)) 2107 (subwindow, property, data))
2206 XSTRING_DATA (data), 2124 XSTRING_DATA (data),
2207 XSTRING_LENGTH (data)); 2125 XSTRING_LENGTH (data));
2208 2126
2209 return property; 2127 return property;
2210 } 2128 }
2211 2129 #endif
2212 DEFUN ("subwindowp", Fsubwindowp, 1, 1, 0, /* 2130
2213 Return non-nil if OBJECT is a subwindow. 2131 static void
2214 Subwindows are not currently implemented. 2132 x_resize_subwindow (struct Lisp_Image_Instance* ii, int w, int h)
2215 */ 2133 {
2216 (object)) 2134 XResizeWindow (DisplayOfScreen (IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (ii)),
2217 { 2135 IMAGE_INSTANCE_X_SUBWINDOW_ID (ii),
2218 return SUBWINDOWP (object) ? Qt : Qnil; 2136 w, h);
2219 } 2137 }
2220 2138
2221 DEFUN ("subwindow-width", Fsubwindow_width, 1, 1, 0, /*
2222 Width of SUBWINDOW.
2223 Subwindows are not currently implemented.
2224 */
2225 (subwindow))
2226 {
2227 CHECK_SUBWINDOW (subwindow);
2228 return make_int (XSUBWINDOW (subwindow)->width);
2229 }
2230
2231 DEFUN ("subwindow-height", Fsubwindow_height, 1, 1, 0, /*
2232 Height of SUBWINDOW.
2233 Subwindows are not currently implemented.
2234 */
2235 (subwindow))
2236 {
2237 CHECK_SUBWINDOW (subwindow);
2238 return make_int (XSUBWINDOW (subwindow)->height);
2239 }
2240
2241 DEFUN ("subwindow-xid", Fsubwindow_xid, 1, 1, 0, /*
2242 Return the xid of SUBWINDOW as a number.
2243 Subwindows are not currently implemented.
2244 */
2245 (subwindow))
2246 {
2247 CHECK_SUBWINDOW (subwindow);
2248 return make_int (XSUBWINDOW (subwindow)->subwindow);
2249 }
2250
2251 DEFUN ("resize-subwindow", Fresize_subwindow, 1, 3, 0, /*
2252 Resize SUBWINDOW to WIDTH x HEIGHT.
2253 If a value is nil that parameter is not changed.
2254 Subwindows are not currently implemented.
2255 */
2256 (subwindow, width, height))
2257 {
2258 int neww, newh;
2259 struct Lisp_Subwindow *sw;
2260
2261 CHECK_SUBWINDOW (subwindow);
2262 sw = XSUBWINDOW (subwindow);
2263
2264 if (NILP (width))
2265 neww = sw->width;
2266 else
2267 neww = XINT (width);
2268
2269 if (NILP (height))
2270 newh = sw->height;
2271 else
2272 newh = XINT (height);
2273
2274 XResizeWindow (DisplayOfScreen (sw->xscreen), sw->subwindow, neww, newh);
2275
2276 sw->height = newh;
2277 sw->width = neww;
2278
2279 return subwindow;
2280 }
2281
2282 DEFUN ("force-subwindow-map", Fforce_subwindow_map, 1, 1, 0, /*
2283 Generate a Map event for SUBWINDOW.
2284 Subwindows are not currently implemented.
2285 */
2286 (subwindow))
2287 {
2288 CHECK_SUBWINDOW (subwindow);
2289
2290 XMapWindow (DisplayOfScreen (XSUBWINDOW (subwindow)->xscreen),
2291 XSUBWINDOW (subwindow)->subwindow);
2292
2293 return subwindow;
2294 }
2295 #endif
2296 2139
2297 /************************************************************************/ 2140 /************************************************************************/
2298 /* initialization */ 2141 /* initialization */
2299 /************************************************************************/ 2142 /************************************************************************/
2300 2143
2301 void 2144 void
2302 syms_of_glyphs_x (void) 2145 syms_of_glyphs_x (void)
2303 { 2146 {
2304 #if HAVE_SUBWINDOWS 2147 #if 0
2305 defsymbol (&Qsubwindowp, "subwindowp");
2306
2307 DEFSUBR (Fmake_subwindow);
2308 DEFSUBR (Fchange_subwindow_property); 2148 DEFSUBR (Fchange_subwindow_property);
2309 DEFSUBR (Fsubwindowp);
2310 DEFSUBR (Fsubwindow_width);
2311 DEFSUBR (Fsubwindow_height);
2312 DEFSUBR (Fsubwindow_xid);
2313 DEFSUBR (Fresize_subwindow);
2314 DEFSUBR (Fforce_subwindow_map);
2315 #endif 2149 #endif
2316 } 2150 }
2317 2151
2318 void 2152 void
2319 console_type_create_glyphs_x (void) 2153 console_type_create_glyphs_x (void)
2325 CONSOLE_HAS_METHOD (x, image_instance_equal); 2159 CONSOLE_HAS_METHOD (x, image_instance_equal);
2326 CONSOLE_HAS_METHOD (x, image_instance_hash); 2160 CONSOLE_HAS_METHOD (x, image_instance_hash);
2327 CONSOLE_HAS_METHOD (x, colorize_image_instance); 2161 CONSOLE_HAS_METHOD (x, colorize_image_instance);
2328 CONSOLE_HAS_METHOD (x, init_image_instance_from_eimage); 2162 CONSOLE_HAS_METHOD (x, init_image_instance_from_eimage);
2329 CONSOLE_HAS_METHOD (x, locate_pixmap_file); 2163 CONSOLE_HAS_METHOD (x, locate_pixmap_file);
2330 #ifdef HAVE_XPM 2164 CONSOLE_HAS_METHOD (x, unmap_subwindow);
2331 CONSOLE_HAS_METHOD (x, xpm_instantiate); 2165 CONSOLE_HAS_METHOD (x, map_subwindow);
2332 #endif 2166 CONSOLE_HAS_METHOD (x, resize_subwindow);
2333 CONSOLE_HAS_METHOD (x, xbm_instantiate);
2334 } 2167 }
2335 2168
2336 void 2169 void
2337 image_instantiator_format_create_glyphs_x (void) 2170 image_instantiator_format_create_glyphs_x (void)
2338 { 2171 {
2172 #ifdef HAVE_XPM
2173 INITIALIZE_DEVICE_IIFORMAT (x, xpm);
2174 IIFORMAT_HAS_DEVMETHOD (x, xpm, instantiate);
2175 #endif
2176 INITIALIZE_DEVICE_IIFORMAT (x, xbm);
2177 IIFORMAT_HAS_DEVMETHOD (x, xbm, instantiate);
2178
2179 INITIALIZE_DEVICE_IIFORMAT (x, subwindow);
2180 IIFORMAT_HAS_DEVMETHOD (x, subwindow, instantiate);
2339 2181
2340 INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (cursor_font, "cursor-font"); 2182 INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (cursor_font, "cursor-font");
2341 2183
2342 IIFORMAT_HAS_METHOD (cursor_font, validate); 2184 IIFORMAT_HAS_METHOD (cursor_font, validate);
2343 IIFORMAT_HAS_METHOD (cursor_font, possible_dest_types); 2185 IIFORMAT_HAS_METHOD (cursor_font, possible_dest_types);