1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #ifndef __PGTKGUI_H__
20 #define __PGTKGUI_H__
21
22
23 typedef struct _XCharStruct
24 {
25 int rbearing;
26 int lbearing;
27 int width;
28 int ascent;
29 int descent;
30 } XCharStruct;
31
32
33 typedef unsigned short unichar;
34 typedef unichar XChar2b;
35
36 #define STORE_XCHAR2B(chp, b1, b2) \
37 (*(chp) = ((XChar2b)((((b1) & 0x00ff) << 8) | ((b2) & 0x00ff))))
38
39 #define XCHAR2B_BYTE1(chp) \
40 ((*(chp) & 0xff00) >> 8)
41
42 #define XCHAR2B_BYTE2(chp) \
43 (*(chp) & 0x00ff)
44
45
46 typedef struct _GdkCursor *Emacs_Cursor;
47
48 typedef void *Color;
49 typedef int Window;
50 typedef struct _GdkDisplay Display;
51
52
53 typedef void *XrmDatabase;
54
55
56
57
58 typedef struct
59 {
60 int x, y;
61 unsigned width, height;
62 } XRectangle;
63
64
65 #define ForgetGravity 0
66 #define NorthWestGravity 1
67 #define NorthGravity 2
68 #define NorthEastGravity 3
69 #define WestGravity 4
70 #define CenterGravity 5
71 #define EastGravity 6
72 #define SouthWestGravity 7
73 #define SouthGravity 8
74 #define SouthEastGravity 9
75 #define StaticGravity 10
76
77 #define NoValue 0x0000
78 #define XValue 0x0001
79 #define YValue 0x0002
80 #define WidthValue 0x0004
81 #define HeightValue 0x0008
82 #define AllValues 0x000F
83 #define XNegative 0x0010
84 #define YNegative 0x0020
85
86 #define USPosition (1L << 0)
87 #define USSize (1L << 1)
88
89 #define PPosition (1L << 2)
90 #define PSize (1L << 3)
91 #define PMinSize (1L << 4)
92 #define PMaxSize (1L << 5)
93 #define PResizeInc (1L << 6)
94 #define PAspect (1L << 7)
95 #define PBaseSize (1L << 8)
96 #define PWinGravity (1L << 9)
97
98
99 #define NativeRectangle XRectangle
100
101 #define CONVERT_TO_EMACS_RECT(xr, nr) \
102 ((xr).x = (nr).x, \
103 (xr).y = (nr).y, \
104 (xr).width = (nr).width, \
105 (xr).height = (nr).height)
106
107 #define CONVERT_FROM_EMACS_RECT(xr, nr) \
108 ((nr).x = (xr).x, \
109 (nr).y = (xr).y, \
110 (nr).width = (xr).width, \
111 (nr).height = (xr).height)
112
113 #define STORE_NATIVE_RECT(nr, px, py, pwidth, pheight) \
114 ((nr).x = (px), \
115 (nr).y = (py), \
116 (nr).width = (pwidth), \
117 (nr).height = (pheight))
118
119 #endif