annotate src/glyphs-x.h @ 185:3d6bfa290dbd r20-3b19

Import from CVS: tag r20-3b19
author cvs
date Mon, 13 Aug 2007 09:55:28 +0200
parents 6b37e6ddd302
children b2472a1930f2
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
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 #ifndef _XEMACS_GLYPHS_X_H_
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 #define _XEMACS_GLYPHS_X_H_
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 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 Pixmap pixmap;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 Pixmap mask;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 Cursor cursor;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 /* If depth>0, then that means that other colors were allocated when
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 this pixmap was loaded. These are they; we need to free them when
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 finalizing the image instance. */
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
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 #define IMAGE_INSTANCE_X_PIXMAP(i) (X_IMAGE_INSTANCE_DATA (i)->pixmap)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 #define IMAGE_INSTANCE_X_MASK(i) (X_IMAGE_INSTANCE_DATA (i)->mask)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 #define IMAGE_INSTANCE_X_CURSOR(i) (X_IMAGE_INSTANCE_DATA (i)->cursor)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 #define IMAGE_INSTANCE_X_PIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->pixels)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 #define IMAGE_INSTANCE_X_NPIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->npixels)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 #define XIMAGE_INSTANCE_X_PIXMAP(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 IMAGE_INSTANCE_X_PIXMAP (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 #define XIMAGE_INSTANCE_X_MASK(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 IMAGE_INSTANCE_X_MASK (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 #define XIMAGE_INSTANCE_X_CURSOR(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 IMAGE_INSTANCE_X_CURSOR (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 #define XIMAGE_INSTANCE_X_PIXELS(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 IMAGE_INSTANCE_X_PIXELS (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 #define XIMAGE_INSTANCE_X_NPIXELS(i) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 IMAGE_INSTANCE_X_NPIXELS (XIMAGE_INSTANCE (i))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74
114
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 70
diff changeset
75 /* Set to 1 if you wish to implement this feature */
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 70
diff changeset
76 # define HAVE_SUBWINDOWS 0
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 70
diff changeset
77 # if HAVE_SUBWINDOWS
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 /****************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 * Subwindow Object *
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 ****************************************************************************/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 DECLARE_LRECORD (subwindow, struct Lisp_Subwindow);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 #define XSUBWINDOW(x) XRECORD (x, subwindow, struct Lisp_Subwindow)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 #define XSETSUBWINDOW(x, p) XSETRECORD (x, p, subwindow)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 #define SUBWINDOWP(x) RECORDP (x, subwindow)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 #define GC_SUBWINDOWP(x) GC_RECORDP (x, subwindow)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 #define CHECK_SUBWINDOW(x) CHECK_RECORD (x, subwindow)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 struct Lisp_Subwindow
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 struct lcrecord_header header;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 Lisp_Object frame;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 Screen *xscreen;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 Window parent_window;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 unsigned int width, height;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 Window subwindow;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 int being_displayed; /* used to detect when needs to be unmapped */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 };
114
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 70
diff changeset
101 # endif
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 #endif /* HAVE_X_WINDOWS */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 #endif /* _XEMACS_GLYPHS_X_H_ */