1 /* X-specific glyphs and related.
2 Copyright (C) 1993, 1994 Free Software Foundation, Inc.
3 Copyright (C) 1995 Board of Trustees, University of Illinois.
4 Copyright (C) 1995, 1996 Ben Wing
5 Copyright (C) 1995 Sun Microsystems, Inc.
7 This file is part of XEmacs.
9 XEmacs is free software; you can redistribute it and/or modify it
10 under the terms of the GNU General Public License as published by the
11 Free Software Foundation; either version 2, or (at your option) any
14 XEmacs is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 You should have received a copy of the GNU General Public License
20 along with XEmacs; see the file COPYING. If not, write to
21 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
24 /* Synched up with: Not in FSF. */
26 #ifndef _XEMACS_GLYPHS_X_H_
27 #define _XEMACS_GLYPHS_X_H_
33 #include "xintrinsic.h"
34 #include "../lwlib/lwlib.h"
36 /****************************************************************************
37 * Image-Instance Object *
38 ****************************************************************************/
40 struct x_image_instance_data
46 /* If depth>0, then that means that other colors were allocated when
47 this pixmap was loaded. These are they; we need to free them when
48 finalizing the image instance. */
50 unsigned long *pixels;
53 /* Should we hang on to the extra info from the XpmAttributes, like
54 the textual color table and the comments? Is that useful? */
57 #define X_IMAGE_INSTANCE_DATA(i) ((struct x_image_instance_data *) (i)->data)
59 #define IMAGE_INSTANCE_X_PIXMAP(i) (X_IMAGE_INSTANCE_DATA (i)->pixmap)
60 #define IMAGE_INSTANCE_X_MASK(i) (X_IMAGE_INSTANCE_DATA (i)->mask)
61 #define IMAGE_INSTANCE_X_CURSOR(i) (X_IMAGE_INSTANCE_DATA (i)->cursor)
62 #define IMAGE_INSTANCE_X_COLORMAP(i) (X_IMAGE_INSTANCE_DATA (i)->colormap)
63 #define IMAGE_INSTANCE_X_PIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->pixels)
64 #define IMAGE_INSTANCE_X_NPIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->npixels)
66 #define XIMAGE_INSTANCE_X_PIXMAP(i) \
67 IMAGE_INSTANCE_X_PIXMAP (XIMAGE_INSTANCE (i))
68 #define XIMAGE_INSTANCE_X_MASK(i) \
69 IMAGE_INSTANCE_X_MASK (XIMAGE_INSTANCE (i))
70 #define XIMAGE_INSTANCE_X_CURSOR(i) \
71 IMAGE_INSTANCE_X_CURSOR (XIMAGE_INSTANCE (i))
72 #define XIMAGE_INSTANCE_X_PIXELS(i) \
73 IMAGE_INSTANCE_X_PIXELS (XIMAGE_INSTANCE (i))
74 #define XIMAGE_INSTANCE_X_NPIXELS(i) \
75 IMAGE_INSTANCE_X_NPIXELS (XIMAGE_INSTANCE (i))
77 /****************************************************************************
79 ****************************************************************************/
81 struct x_subwindow_data
99 #define X_SUBWINDOW_INSTANCE_DATA(i) ((struct x_subwindow_data *) (i)->data)
101 #define IMAGE_INSTANCE_X_SUBWINDOW_SCREEN(i) \
102 (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.xscreen)
103 #define IMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \
104 (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.parent_window)
105 #define IMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \
106 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.x_offset)
107 #define IMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \
108 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.y_offset)
109 #define IMAGE_INSTANCE_X_WIDGET_LWID(i) \
110 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.id)
111 #define XIMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \
112 IMAGE_INSTANCE_X_SUBWINDOW_PARENT (XIMAGE_INSTANCE (i))
113 #define XIMAGE_INSTANCE_X_SUBWINDOW_SCREEN(i) \
114 IMAGE_INSTANCE_X_SUBWINDOW_SCREEN (XIMAGE_INSTANCE (i))
115 #define XIMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \
116 IMAGE_INSTANCE_X_WIDGET_XOFFSET (XIMAGE_INSTANCE (i))
117 #define XIMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \
118 IMAGE_INSTANCE_X_WIDGET_YOFFSET (XIMAGE_INSTANCE (i))
119 #define XIMAGE_INSTANCE_X_WIDGET_LWID(i) \
120 IMAGE_INSTANCE_X_WIDGET_LWID (XIMAGE_INSTANCE (i))
121 #define IMAGE_INSTANCE_X_SUBWINDOW_ID(i) \
122 ((Window) IMAGE_INSTANCE_SUBWINDOW_ID (i))
123 #define IMAGE_INSTANCE_X_WIDGET_ID(i) \
124 ((Widget) IMAGE_INSTANCE_SUBWINDOW_ID (i))
126 #endif /* HAVE_X_WINDOWS */
127 #endif /* _XEMACS_GLYPHS_X_H_ */