Subversion Repositories tendra.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
#   		 Crown Copyright (c) 1997
2
#   
3
#   This TenDRA(r) Computer Program is subject to Copyright
4
#   owned by the United Kingdom Secretary of State for Defence
5
#   acting through the Defence Evaluation and Research Agency
6
#   (DERA).  It is made available to Recipients with a
7
#   royalty-free licence for its use, reproduction, transfer
8
#   to other parties and amendment for any purpose not excluding
9
#   product development provided that any such use et cetera
10
#   shall be deemed to be acceptance of the following conditions:-
11
#   
12
#       (1) Its Recipients shall ensure that this Notice is
13
#       reproduced upon any copies or amended versions of it;
14
#   
15
#       (2) Any amended version of it shall be clearly marked to
16
#       show both the nature of and the organisation responsible
17
#       for the relevant amendment or amendments;
18
#   
19
#       (3) Its onward transfer from a recipient to another
20
#       party shall be deemed to be that party's acceptance of
21
#       these conditions;
22
#   
23
#       (4) DERA gives no warranty or assurance as to its
24
#       quality or suitability for any purpose and DERA accepts
25
#       no liability whatsoever in relation to any use to which
26
#       it may be put.
27
#
28
# Interclient communication facilities
29
 
30
+USE "x5/lib", "X11/X.h" ;
31
+USE "x5/lib", "X11/Xlib.h", "types" ;
32
 
33
 
34
# Setting and Reading the WM_HINTS Property (14.1.6)
35
 
36
+DEFINE InputHint		%% (1L<<0) %% ;
37
+DEFINE StateHint		%% (1L<<1) %% ;
38
+DEFINE IconPixmapHint		%% (1L<<2) %% ;
39
+DEFINE IconWindowHint		%% (1L<<3) %% ;
40
+DEFINE IconPositionHint	%% (1L<<4) %% ;
41
+DEFINE IconMaskHint		%% (1L<<5) %% ;
42
+DEFINE WindowGroupHint		%% (1L<<6) %% ;
43
+DEFINE AllHints		%% (InputHint|StateHint|IconPixmapHint|IconWindowHint|IconPosiionHint|IconMaskHint|WindowGroupHint) %% ;
44
 
45
+FIELD ( struct ) XWMHints {
46
    long flags ;
47
    Bool input ;
48
    int initial_state ;
49
    Pixmap icon_pixmap ;
50
    Window icon_window ;
51
    int icon_x, icon_y ;
52
    Pixmap icon_mask ;
53
    XID window_group ;
54
} ;
55
 
56
+DEFINE WithdrawnState		%% 0 %% ;
57
+DEFINE NormalState		%% 1 %% ;
58
+DEFINE IconicState		%% 3 %% ;
59
 
60
 
61
# Setting and Reading the WM_NORMAL_HINTS Property (14.1.7)
62
 
63
+DEFINE USPosition		%% (1L<<0) %% ;
64
+DEFINE USSize			%% (1L<<1) %% ;
65
+DEFINE PPosition		%% (1L<<2) %% ;
66
+DEFINE PSize			%% (1L<<3) %% ;
67
+DEFINE PMinSize		%% (1L<<4) %% ;
68
+DEFINE PMaxSize		%% (1L<<5) %% ;
69
+DEFINE PResizeInc		%% (1L<<6) %% ;
70
+DEFINE PAspect			%% (1L<<7) %% ;
71
+DEFINE PBaseSize		%% (1L<<8) %% ;
72
+DEFINE PWinGravity		%% (1L<<9) %% ;
73
+DEFINE PAllHints		%% (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect) %% ;
74
 
75
+FIELD struct ~XSizeHintsAspect := {
76
    int x ;
77
    int y ;
78
} ;
79
 
80
+FIELD ( struct ) XSizeHints := {
81
    long flags ;
82
    int x, y ;
83
    int width, height ;
84
    int min_width, min_height ;
85
    int max_width, max_height ;
86
    int width_inc, height_inc ;
87
    struct ~XSizeHintsAspect min_aspect, max_aspect ;
88
    int base_width, base_height ;
89
    int win_gravity ;
90
} ;
91
 
92
 
93
# Setting and Reading the WM_CLASS Property (14.1.8)
94
 
95
+FIELD ( struct ) XClassHint := {
96
    char *res_name ;
97
    char *res_class ;
98
} ;
99
 
100
 
101
# Setting and Reading the WM_ICON_SIZE Property (14.1.12)
102
 
103
+FIELD ( struct ) XIconSize := {
104
    int min_width, min_height ;
105
    int max_width, max_height ;
106
    int width_inc, height_inc ;
107
} ;
108
 
109
 
110
# Parsing the Window Geometry (16.4)
111
 
112
+CONST int XValue, YValue, WidthValue, HeightValue, XNegative, YNegative ;
113
 
114
 
115
# Manipulating Regions (16.5)
116
 
117
+TYPE ~RegionRec ;
118
+TYPEDEF ~RegionRec *Region ;	# RCA : it must be a pointer
119
 
120
 
121
# Determining a Visual Type (16.7)
122
 
123
+DEFINE VisualNoMask		%% 0x0 %% ;
124
+DEFINE VisualIDMask		%% 0x1 %% ;
125
+DEFINE VisualScreenMask	%% 0x2 %% ;
126
+DEFINE VisualDepthMask		%% 0x4 %% ;
127
+DEFINE VisualClassMask		%% 0x8 %% ;
128
+DEFINE VisualRedMaskMask	%% 0x10 %% ;
129
+DEFINE VisualGreenMaskMask	%% 0x20 %% ;
130
+DEFINE VisualBlueMaskMask	%% 0x40 %% ;
131
+DEFINE VisualColormapSizeMask	%% 0x80 %% ;
132
+DEFINE VisualBitsPerRGBMask	%% 0x100 %% ;
133
+DEFINE VisualAllMask		%% 0x1FF %% ;
134
 
135
+FIELD ( struct ) XVisualInfo := {
136
    Visual *visual ;
137
    VisualID visualid ;
138
    int screen ;
139
    unsigned int depth ;
140
    int class ;
141
    unsigned long red_mask ;
142
    unsigned long green_mask ;
143
    unsigned long blue_mask ;
144
    int colormap_size ;
145
    int bits_per_rgb ;
146
} ;
147
 
148
 
149
# Manipulating Images (16.8)
150
 
151
+FUNC unsigned long XGetPixel ( XImage *, int, int ) ;
152
+FUNC void XPutPixel ( XImage *, int, int, unsigned long ) ;
153
+FUNC XImage *XSubImage ( XImage *, int, int, unsigned int, unsigned int ) ;
154
+FUNC void XAddPixel ( XImage *, long ) ;
155
 
156
 
157
# Using the Context Manager (16.10)
158
 
159
+CONST int XCNOMEM, XCNOENT ;