BRL-CAD
dm_xvars.h
Go to the documentation of this file.
1 /* D M _ X V A R S . H
2  * BRL-CAD
3  *
4  * Copyright (c) 1993-2014 United States Government as represented by
5  * the U.S. Army Research Laboratory.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * version 2.1 as published by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this file; see the file named COPYING for more
18  * information.
19  */
20 /** @addtogroup libdm */
21 /** @{ */
22 /** @file dm_xvars.h
23  *
24  */
25 #ifndef DM_XVARS_H
26 #define DM_XVARS_H
27 
28 #include "common.h"
29 
30 #ifdef HAVE_X11_XLIB_H
31 # include <X11/Xlib.h>
32 # include <X11/Xutil.h>
33 # define HAVE_X11_TYPES 1
34 #endif
35 
36 #ifdef HAVE_TK
37 # include "tk.h"
38 #endif
39 #ifdef IF_WGL
40 #include "tkWinInt.h"
41 #endif
42 
43 #if !defined(HAVE_TK) && !defined(TK_WINDOW_TYPEDEF)
44 typedef void *Tk_Window;
45 # define TK_WINDOW_TYPEDEF 1
46 #endif
47 
48 #ifndef HAVE_X11_TYPES
49 typedef long Display;
50 typedef long Window;
51 typedef long Colormap;
52 #endif
53 
54 #define XVARS_MV_O(_m) offsetof(struct dm_xvars, _m)
55 
56 #define INIT_XCOLOR(c) memset((c), 0, sizeof(XColor))
57 
58 /* FIXME: this structure really should not be variable-width and it
59  * does not allow multiple interfaces to be simultaneously compiled.
60  */
61 struct dm_xvars {
66  int depth;
68 #ifdef IF_WGL
69  PIXELFORMATDESCRIPTOR *vip;
70  HFONT fontstruct;
71  HDC hdc; /* device context of device that OpenGL calls are to be drawn on */
72 #endif
73 #if defined(DM_X) || defined (DM_OGL) || defined (DM_RTGL)
74  XVisualInfo *vip;
75  XFontStruct *fontstruct;
76 #endif
77 #ifdef DM_TK
78  int tkfontset;
79  Tk_Font tkfontstruct;
80 #endif
84 };
85 
86 #endif /* DM_XVARS_H */
87 /** @} */
88 /*
89  * Local Variables:
90  * mode: C
91  * tab-width: 8
92  * indent-tabs-mode: t
93  * c-file-style: "stroustrup"
94  * End:
95  * ex: shiftwidth=4 tabstop=8
96  */
int devbuttonpress
Definition: dm_xvars.h:82
Tk_Window xtkwin
Definition: dm_xvars.h:65
int depth
Definition: dm_xvars.h:66
long Display
Definition: dm_xvars.h:49
Header file for the BRL-CAD common definitions.
Colormap cmap
Definition: dm_xvars.h:67
int devmotionnotify
Definition: dm_xvars.h:81
long Colormap
Definition: dm_xvars.h:51
Tk_Window top
Definition: dm_xvars.h:64
int devbuttonrelease
Definition: dm_xvars.h:83
long Window
Definition: dm_xvars.h:50
Display * dpy
Definition: dm_xvars.h:62
void * Tk_Window
Definition: dm_xvars.h:44
Window win
Definition: dm_xvars.h:63