static Pixmap
pixmap_from_xbm_inline (Lisp_Object device, int width, int height,
/* Note that data is in ext-format! */
- const Extbyte *bits)
+ const char *bits)
{
- return XCreatePixmapFromBitmapData (DEVICE_X_DISPLAY (XDEVICE(device)),
- XtWindow (DEVICE_XT_APP_SHELL (XDEVICE (device))),
- (char *) bits, width, height,
- 1, 0, 1);
+ return XCreatePixmapFromBitmapData
+ (DEVICE_X_DISPLAY (XDEVICE (device)),
+ XtWindow (DEVICE_XT_APP_SHELL (XDEVICE (device))),
+ (char *) bits, width, height,
+ 1, 0, 1);
}
/* Given inline data for a mono pixmap, initialize the given
mask = pixmap_from_xbm_inline (IMAGE_INSTANCE_DEVICE (ii),
XINT (XCAR (mask_data)),
XINT (XCAR (XCDR (mask_data))),
- (const unsigned char *) ext_data);
+ ext_data);
}
init_image_instance_from_xbm_inline (ii, width, height, bits,
reference to the real values rather than a copy thus any
changes we make to the values we get back will look like they
have already been applied. If we rebuild the widget tree then
- we may lose propertie. */
- wv = copy_widget_value_tree (lw_get_all_values
+ we may lose properties. */
+ wv = copy_widget_value_tree (lw_get_all_values
(IMAGE_INSTANCE_X_WIDGET_LWID (p)),
NO_CHANGE);
}
IIFORMAT_HAS_METHOD (autodetect, validate);
IIFORMAT_HAS_METHOD (autodetect, normalize);
IIFORMAT_HAS_METHOD (autodetect, possible_dest_types);
+ /* #### autodetect is flawed IMO:
+ 1. It makes the assumption that you can detect whether the user
+ wanted a cursor or a string based on the data, since the data is a
+ string you have to prioritise cursors. Instead we will force users
+ to pick the appropriate image type, this is what we do under
+ MS-Windows anyway.
+ 2. It doesn't fit with the new domain model - you cannot tell which
+ domain it needs to be instantiated in until you've actually
+ instantiated it, which mucks up caching.
+ 3. It only copes with cursors and strings which seems bogus. */
+ IIFORMAT_HAS_SHARED_METHOD (autodetect, governing_domain, subwindow);
IIFORMAT_HAS_METHOD (autodetect, instantiate);
IIFORMAT_VALID_CONSOLE (x, autodetect);
vector3 (Qxbm, Q_data, \
list3 (make_int (name##_width), \
make_int (name##_height), \
- make_ext_string (name##_bits, \
+ make_ext_string ((Extbyte *) name##_bits, \
sizeof (name##_bits), \
Qbinary))), \
Qglobal, Qx, Qnil)