annotate src/glyphs-x.h @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents 41dbb7a9d5f2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 /* X-specific glyphs and related.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 Copyright (C) 1993, 1994 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 Copyright (C) 1995 Board of Trustees, University of Illinois.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 Copyright (C) 1995, 1996 Ben Wing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 Copyright (C) 1995 Sun Microsystems, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 This file is part of XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 XEmacs is free software; you can redistribute it and/or modify it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 under the terms of the GNU General Public License as published by the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 Free Software Foundation; either version 2, or (at your option) any
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 XEmacs is distributed in the hope that it will be useful, but WITHOUT
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 along with XEmacs; see the file COPYING. If not, write to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 Boston, MA 02111-1307, USA. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 /* Synched up with: Not in FSF. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
26 #ifndef _XEMACS_GLYPHS_X_H_
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
27 #define _XEMACS_GLYPHS_X_H_
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 #include "glyphs.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 #ifdef HAVE_X_WINDOWS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 #include "xintrinsic.h"
157
6b37e6ddd302 Import from CVS: tag r20-3b5
cvs
parents: 114
diff changeset
34 #include "../lwlib/lwlib.h"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 /****************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 * Image-Instance Object *
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 ****************************************************************************/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 struct x_image_instance_data
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 {
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
42 Pixmap* pixmaps;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 Cursor cursor;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 /* If depth>0, then that means that other colors were allocated when
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 this pixmap was loaded. These are they; we need to free them when
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 finalizing the image instance. */
269
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 157
diff changeset
48 Colormap colormap;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 unsigned long *pixels;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 int npixels;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 /* Should we hang on to the extra info from the XpmAttributes, like
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 the textual color table and the comments? Is that useful? */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 #define X_IMAGE_INSTANCE_DATA(i) ((struct x_image_instance_data *) (i)->data)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
58 #define IMAGE_INSTANCE_X_PIXMAP(i) (X_IMAGE_INSTANCE_DATA (i)->pixmaps[0])
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
59 #define IMAGE_INSTANCE_X_PIXMAP_SLICE(i,slice) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
60 (X_IMAGE_INSTANCE_DATA (i)->pixmaps[slice])
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
61 #define IMAGE_INSTANCE_X_PIXMAP_SLICES(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
62 (X_IMAGE_INSTANCE_DATA (i)->pixmaps)
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
63 #define IMAGE_INSTANCE_X_MASK(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
64 (Pixmap)(IMAGE_INSTANCE_PIXMAP_MASK (i))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 #define IMAGE_INSTANCE_X_CURSOR(i) (X_IMAGE_INSTANCE_DATA (i)->cursor)
269
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 157
diff changeset
66 #define IMAGE_INSTANCE_X_COLORMAP(i) (X_IMAGE_INSTANCE_DATA (i)->colormap)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 #define IMAGE_INSTANCE_X_PIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->pixels)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 #define IMAGE_INSTANCE_X_NPIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->npixels)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 #define XIMAGE_INSTANCE_X_PIXMAP(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 IMAGE_INSTANCE_X_PIXMAP (XIMAGE_INSTANCE (i))
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
72 #define XIMAGE_INSTANCE_X_PIXMAP_SLICES(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
73 IMAGE_INSTANCE_X_PIXMAP_SLICES (XIMAGE_INSTANCE (i))
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
74 #define XIMAGE_INSTANCE_X_PIXMAP_SLICE(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
75 IMAGE_INSTANCE_X_PIXMAP_SLICE (XIMAGE_INSTANCE (i))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 #define XIMAGE_INSTANCE_X_MASK(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 IMAGE_INSTANCE_X_MASK (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 #define XIMAGE_INSTANCE_X_CURSOR(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 IMAGE_INSTANCE_X_CURSOR (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 #define XIMAGE_INSTANCE_X_PIXELS(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 IMAGE_INSTANCE_X_PIXELS (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 #define XIMAGE_INSTANCE_X_NPIXELS(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 IMAGE_INSTANCE_X_NPIXELS (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 /****************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 * Subwindow Object *
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 ****************************************************************************/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 269
diff changeset
89 struct x_subwindow_data
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 {
420
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
91 union
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
92 {
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
93 struct
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
94 {
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
95 Display *display;
420
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
96 Window parent_window;
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
97 Window clip_window;
420
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
98 } sub;
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
99 struct
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
100 {
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
101 Widget clip_window;
420
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
102 Position x_offset;
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
103 Position y_offset;
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
104 LWLIB_ID id;
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
105 } wid;
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
106 } data;
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 269
diff changeset
107 };
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 269
diff changeset
109 #define X_SUBWINDOW_INSTANCE_DATA(i) ((struct x_subwindow_data *) (i)->data)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
111 #define IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
112 (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.display)
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 269
diff changeset
113 #define IMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \
420
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
114 (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.parent_window)
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
115 #define IMAGE_INSTANCE_X_CLIPWINDOW(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
116 (X_SUBWINDOW_INSTANCE_DATA (i)->data.sub.clip_window)
420
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
117 #define IMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
118 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.x_offset)
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
119 #define IMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
120 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.y_offset)
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
121 #define IMAGE_INSTANCE_X_WIDGET_LWID(i) \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
122 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.id)
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
123 #define IMAGE_INSTANCE_X_CLIPWIDGET(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
124 (X_SUBWINDOW_INSTANCE_DATA (i)->data.wid.clip_window)
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 269
diff changeset
125 #define XIMAGE_INSTANCE_X_SUBWINDOW_PARENT(i) \
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 269
diff changeset
126 IMAGE_INSTANCE_X_SUBWINDOW_PARENT (XIMAGE_INSTANCE (i))
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
127 #define XIMAGE_INSTANCE_X_SUBWINDOW_DISPLAY(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
128 IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (XIMAGE_INSTANCE (i))
420
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
129 #define XIMAGE_INSTANCE_X_WIDGET_XOFFSET(i) \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
130 IMAGE_INSTANCE_X_WIDGET_XOFFSET (XIMAGE_INSTANCE (i))
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
131 #define XIMAGE_INSTANCE_X_WIDGET_YOFFSET(i) \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
132 IMAGE_INSTANCE_X_WIDGET_YOFFSET (XIMAGE_INSTANCE (i))
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
133 #define XIMAGE_INSTANCE_X_WIDGET_LWID(i) \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
134 IMAGE_INSTANCE_X_WIDGET_LWID (XIMAGE_INSTANCE (i))
424
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
135 #define XIMAGE_INSTANCE_X_CLIPWIDGET(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
136 IMAGE_INSTANCE_X_CLIPWIDGET (XIMAGE_INSTANCE (i))
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
137 #define XIMAGE_INSTANCE_X_CLIPWINDOW(i) \
11054d720c21 Import from CVS: tag r21-2-20
cvs
parents: 420
diff changeset
138 IMAGE_INSTANCE_X_CLIPWINDOW (XIMAGE_INSTANCE (i))
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
139 #define IMAGE_INSTANCE_X_SUBWINDOW_ID(i) \
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
140 ((Window) IMAGE_INSTANCE_SUBWINDOW_ID (i))
420
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
141 #define IMAGE_INSTANCE_X_WIDGET_ID(i) \
41dbb7a9d5f2 Import from CVS: tag r21-2-18
cvs
parents: 412
diff changeset
142 ((Widget) IMAGE_INSTANCE_SUBWINDOW_ID (i))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 #endif /* HAVE_X_WINDOWS */
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
145 #endif /* _XEMACS_GLYPHS_X_H_ */