Initial git import
[sxemacs] / src / ui / X11 / objects-x.h
1 /* X-specific Lisp objects.
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
6 This file is part of SXEmacs
7
8 SXEmacs is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 SXEmacs is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
20
21
22 /* Synched up with:  Not in FSF. */
23
24 /* This file Mule-ized (more like Mule-verified) by Ben Wing, 7-10-00. */
25
26 #ifndef INCLUDED_objects_x_h_
27 #define INCLUDED_objects_x_h_
28
29 #include "ui/objects.h"
30
31 #ifdef HAVE_X_WINDOWS
32
33 /*****************************************************************************
34  Color-Instance
35  ****************************************************************************/
36
37 struct x_color_instance_data {
38         XColor color;
39         char dealloc_on_gc;
40 };
41
42 #define X_COLOR_INSTANCE_DATA(c) ((struct x_color_instance_data *) (c)->data)
43 #define COLOR_INSTANCE_X_COLOR(c) (X_COLOR_INSTANCE_DATA (c)->color)
44 #define COLOR_INSTANCE_X_DEALLOC(c) (X_COLOR_INSTANCE_DATA (c)->dealloc_on_gc)
45
46 int allocate_nearest_color(Display * display, Colormap screen_colormap,
47                            Visual * visual, XColor * color_def);
48
49 /*****************************************************************************
50  Font-Instance
51  ****************************************************************************/
52
53 struct x_font_instance_data {
54         /* X-specific information */
55         Lisp_Object truename;
56         XFontStruct *font;
57 };
58
59 #define X_FONT_INSTANCE_DATA(f) ((struct x_font_instance_data *) (f)->data)
60 #define FONT_INSTANCE_X_FONT(f) (X_FONT_INSTANCE_DATA (f)->font)
61 #define FONT_INSTANCE_X_TRUENAME(f) (X_FONT_INSTANCE_DATA (f)->truename)
62
63 #endif                          /* HAVE_X_WINDOWS */
64
65 #endif                          /* INCLUDED_objects_x_h_ */