X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fglyphs-x.h;h=f904a4d84e81fc0e1954394040083f3b594ded98;hb=8b6b965da075da197b3d654db3405aa6846bd3d8;hp=d49ba53d07f81894815d6c8a9d3cd825ffd2dc2a;hpb=ea1ea793fe6e244ef5555ed983423a204101af13;p=chise%2Fxemacs-chise.git.1 diff --git a/src/glyphs-x.h b/src/glyphs-x.h index d49ba53..f904a4d 100644 --- a/src/glyphs-x.h +++ b/src/glyphs-x.h @@ -23,8 +23,8 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ -#ifndef _XEMACS_GLYPHS_X_H_ -#define _XEMACS_GLYPHS_X_H_ +#ifndef INCLUDED_glyphs_x_h_ +#define INCLUDED_glyphs_x_h_ #include "glyphs.h" @@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */ #include "xintrinsic.h" #include "../lwlib/lwlib.h" +#include "../lwlib/lwlib-utils.h" /**************************************************************************** * Image-Instance Object * @@ -96,7 +97,7 @@ struct x_subwindow_data Window parent_window; Window clip_window; } sub; - struct + struct { Widget clip_window; Position x_offset; @@ -122,6 +123,11 @@ struct x_subwindow_data (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.id) #define IMAGE_INSTANCE_X_CLIPWIDGET(i) \ (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.clip_window) +#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)) + #define XIMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \ IMAGE_INSTANCE_X_SUBWINDOW_PARENT (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_X_SUBWINDOW_DISPLAY(i) \ @@ -136,10 +142,14 @@ struct x_subwindow_data IMAGE_INSTANCE_X_CLIPWIDGET (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_X_CLIPWINDOW(i) \ IMAGE_INSTANCE_X_CLIPWINDOW (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)) +#define XIMAGE_INSTANCE_X_WIDGET_ID(i) \ + IMAGE_INSTANCE_X_WIDGET_ID (XIMAGE_INSTANCE (i)) + +#define DOMAIN_X_WIDGET(domain) \ + ((IMAGE_INSTANCEP (domain) && \ + X_SUBWINDOW_INSTANCE_DATA (XIMAGE_INSTANCE (domain))) ? \ + XIMAGE_INSTANCE_X_WIDGET_ID (domain) : \ + FRAME_X_CONTAINER_WIDGET (f) (DOMAIN_XFRAME (domain))) #endif /* HAVE_X_WINDOWS */ -#endif /* _XEMACS_GLYPHS_X_H_ */ +#endif /* INCLUDED_glyphs_x_h_ */