0
|
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.
|
|
6
|
|
7 This file is part of XEmacs.
|
|
8
|
|
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
|
|
12 later version.
|
|
13
|
|
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
|
|
17 for more details.
|
|
18
|
|
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. */
|
|
23
|
|
24 /* Synched up with: Not in FSF. */
|
|
25
|
|
26 #ifndef _XEMACS_GLYPHS_X_H_
|
|
27 #define _XEMACS_GLYPHS_X_H_
|
|
28
|
|
29 #include "glyphs.h"
|
|
30
|
|
31 #ifdef HAVE_X_WINDOWS
|
|
32
|
|
33 #include "xintrinsic.h"
|
157
|
34 #include "../lwlib/lwlib.h"
|
0
|
35
|
|
36 /****************************************************************************
|
|
37 * Image-Instance Object *
|
|
38 ****************************************************************************/
|
|
39
|
|
40 struct x_image_instance_data
|
|
41 {
|
|
42 Pixmap pixmap;
|
|
43 Pixmap mask;
|
|
44 Cursor cursor;
|
|
45
|
|
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. */
|
|
49 unsigned long *pixels;
|
|
50 int npixels;
|
|
51
|
|
52 /* Should we hang on to the extra info from the XpmAttributes, like
|
|
53 the textual color table and the comments? Is that useful? */
|
|
54 };
|
|
55
|
|
56 #define X_IMAGE_INSTANCE_DATA(i) ((struct x_image_instance_data *) (i)->data)
|
|
57
|
|
58 #define IMAGE_INSTANCE_X_PIXMAP(i) (X_IMAGE_INSTANCE_DATA (i)->pixmap)
|
|
59 #define IMAGE_INSTANCE_X_MASK(i) (X_IMAGE_INSTANCE_DATA (i)->mask)
|
|
60 #define IMAGE_INSTANCE_X_CURSOR(i) (X_IMAGE_INSTANCE_DATA (i)->cursor)
|
|
61 #define IMAGE_INSTANCE_X_PIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->pixels)
|
|
62 #define IMAGE_INSTANCE_X_NPIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->npixels)
|
|
63
|
|
64 #define XIMAGE_INSTANCE_X_PIXMAP(i) \
|
|
65 IMAGE_INSTANCE_X_PIXMAP (XIMAGE_INSTANCE (i))
|
|
66 #define XIMAGE_INSTANCE_X_MASK(i) \
|
|
67 IMAGE_INSTANCE_X_MASK (XIMAGE_INSTANCE (i))
|
|
68 #define XIMAGE_INSTANCE_X_CURSOR(i) \
|
|
69 IMAGE_INSTANCE_X_CURSOR (XIMAGE_INSTANCE (i))
|
|
70 #define XIMAGE_INSTANCE_X_PIXELS(i) \
|
|
71 IMAGE_INSTANCE_X_PIXELS (XIMAGE_INSTANCE (i))
|
|
72 #define XIMAGE_INSTANCE_X_NPIXELS(i) \
|
|
73 IMAGE_INSTANCE_X_NPIXELS (XIMAGE_INSTANCE (i))
|
|
74
|
114
|
75 /* Set to 1 if you wish to implement this feature */
|
|
76 # define HAVE_SUBWINDOWS 0
|
|
77 # if HAVE_SUBWINDOWS
|
0
|
78 /****************************************************************************
|
|
79 * Subwindow Object *
|
|
80 ****************************************************************************/
|
|
81
|
|
82 DECLARE_LRECORD (subwindow, struct Lisp_Subwindow);
|
|
83 #define XSUBWINDOW(x) XRECORD (x, subwindow, struct Lisp_Subwindow)
|
|
84 #define XSETSUBWINDOW(x, p) XSETRECORD (x, p, subwindow)
|
|
85 #define SUBWINDOWP(x) RECORDP (x, subwindow)
|
|
86 #define GC_SUBWINDOWP(x) GC_RECORDP (x, subwindow)
|
|
87 #define CHECK_SUBWINDOW(x) CHECK_RECORD (x, subwindow)
|
|
88
|
|
89 struct Lisp_Subwindow
|
|
90 {
|
|
91 struct lcrecord_header header;
|
|
92 Lisp_Object frame;
|
|
93 Screen *xscreen;
|
|
94 Window parent_window;
|
|
95
|
|
96 unsigned int width, height;
|
|
97 Window subwindow;
|
|
98
|
|
99 int being_displayed; /* used to detect when needs to be unmapped */
|
|
100 };
|
114
|
101 # endif
|
0
|
102
|
|
103 #endif /* HAVE_X_WINDOWS */
|
|
104 #endif /* _XEMACS_GLYPHS_X_H_ */
|