X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fglyphs-x.h;h=a2bc03f993e3590ae78f3f383eaa50c52b52bc73;hb=aa5b3d9f401a1e96e261cd3c60997544a8c87e1d;hp=68980faf2ed5fa08b311c2dfd2d225a7133ad7ce;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910;p=chise%2Fxemacs-chise.git diff --git a/src/glyphs-x.h b/src/glyphs-x.h index 68980fa..a2bc03f 100644 --- a/src/glyphs-x.h +++ b/src/glyphs-x.h @@ -74,33 +74,54 @@ struct x_image_instance_data #define XIMAGE_INSTANCE_X_NPIXELS(i) \ IMAGE_INSTANCE_X_NPIXELS (XIMAGE_INSTANCE (i)) -/* Set to 1 if you wish to implement this feature */ -# define HAVE_SUBWINDOWS 0 -# if HAVE_SUBWINDOWS /**************************************************************************** * Subwindow Object * ****************************************************************************/ -DECLARE_LRECORD (subwindow, struct Lisp_Subwindow); -#define XSUBWINDOW(x) XRECORD (x, subwindow, struct Lisp_Subwindow) -#define XSETSUBWINDOW(x, p) XSETRECORD (x, p, subwindow) -#define SUBWINDOWP(x) RECORDP (x, subwindow) -#define GC_SUBWINDOWP(x) GC_RECORDP (x, subwindow) -#define CHECK_SUBWINDOW(x) CHECK_RECORD (x, subwindow) - -struct Lisp_Subwindow +struct x_subwindow_data { - struct lcrecord_header header; - Lisp_Object frame; - Screen *xscreen; - Window parent_window; - - unsigned int width, height; - Window subwindow; - - int being_displayed; /* used to detect when needs to be unmapped */ + union + { + struct + { + Screen *xscreen; + Window parent_window; + } sub; + struct + { + Position x_offset; + Position y_offset; + LWLIB_ID id; + } wid; + } data; }; -# endif + +#define X_SUBWINDOW_INSTANCE_DATA(i) ((struct x_subwindow_data *) (i)->data) + +#define IMAGE_INSTANCE_X_SUBWINDOW_SCREEN(i) \ + (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.xscreen) +#define IMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ + (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.parent_window) +#define IMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \ + (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.x_offset) +#define IMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \ + (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.y_offset) +#define IMAGE_INSTANCE_X_WIDGET_LWID(i) \ + (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.id) +#define XIMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ + IMAGE_INSTANCE_X_SUBWINDOW_PARENT (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_X_SUBWINDOW_SCREEN(i) \ + IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \ + IMAGE_INSTANCE_X_WIDGET_XOFFSET (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \ + IMAGE_INSTANCE_X_WIDGET_YOFFSET (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_X_WIDGET_LWID(i) \ + IMAGE_INSTANCE_X_WIDGET_LWID (XIMAGE_INSTANCE (i)) +#define IMAGE_INSTANCE_X_SUBWINDOW_ID(i) \ + ((Window) IMAGE_INSTANCE_SUBWINDOW_ID (i)) +#define IMAGE_INSTANCE_X_WIDGET_ID(i) \ + ((Widget) IMAGE_INSTANCE_SUBWINDOW_ID (i)) #endif /* HAVE_X_WINDOWS */ #endif /* _XEMACS_GLYPHS_X_H_ */