GTK eradication -- the build chain.
[sxemacs] / src / ui / Gtk / objects-gtk.h
1 /* Gtk-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 /* Gtk version by William Perry */
24
25 #ifndef _XEMACS_OBJECTS_GTK_H_
26 #define _XEMACS_OBJECTS_GTK_H_
27
28 #include "ui/objects.h"
29
30 #ifdef HAVE_GTK
31
32 /*****************************************************************************
33  Color-Instance
34  ****************************************************************************/
35
36 struct gtk_color_instance_data {
37         GdkColor *color;
38         char dealloc_on_gc;
39 };
40
41 #define GTK_COLOR_INSTANCE_DATA(c) ((struct gtk_color_instance_data *) (c)->data)
42 #define COLOR_INSTANCE_GTK_COLOR(c) (GTK_COLOR_INSTANCE_DATA (c)->color)
43 #define COLOR_INSTANCE_GTK_DEALLOC(c) (GTK_COLOR_INSTANCE_DATA (c)->dealloc_on_gc)
44
45 int allocate_nearest_color(GdkColormap * screen_colormap, GdkVisual * visual,
46                            GdkColor * color_def);
47 int gtk_parse_nearest_color(struct device *d, GdkColor * color, Bufbyte * name,
48                             Bytecount len, Error_behavior errb);
49
50 /*****************************************************************************
51  Font-Instance
52  ****************************************************************************/
53
54 struct gtk_font_instance_data {
55         /* Gtk-specific information */
56         Lisp_Object truename;
57         GdkFont *font;
58 };
59
60 #define GTK_FONT_INSTANCE_DATA(f) ((struct gtk_font_instance_data *) (f)->data)
61 #define FONT_INSTANCE_GTK_FONT(f) (GTK_FONT_INSTANCE_DATA (f)->font)
62 #define FONT_INSTANCE_GTK_TRUENAME(f) (GTK_FONT_INSTANCE_DATA (f)->truename)
63
64 #endif                          /* HAVE_GTK */
65 #endif                          /* _XEMACS_OBJECTS_GTK_H_ */