1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
|
with
Interfaces.C;
use type
Interfaces.C.int;
package body FLTK.Screen is
function fl_screen_x
return Interfaces.C.int;
pragma Import (C, fl_screen_x, "fl_screen_x");
pragma Inline (fl_screen_x);
function fl_screen_y
return Interfaces.C.int;
pragma Import (C, fl_screen_y, "fl_screen_y");
pragma Inline (fl_screen_y);
function fl_screen_w
return Interfaces.C.int;
pragma Import (C, fl_screen_w, "fl_screen_w");
pragma Inline (fl_screen_w);
function fl_screen_h
return Interfaces.C.int;
pragma Import (C, fl_screen_h, "fl_screen_h");
pragma Inline (fl_screen_h);
function fl_screen_count
return Interfaces.C.int;
pragma Import (C, fl_screen_count, "fl_screen_count");
pragma Inline (fl_screen_count);
procedure fl_screen_dpi
(H, V : out Interfaces.C.C_float;
N : in Interfaces.C.int);
pragma Import (C, fl_screen_dpi, "fl_screen_dpi");
pragma Inline (fl_screen_dpi);
function fl_screen_num
(X, Y : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_screen_num, "fl_screen_num");
pragma Inline (fl_screen_num);
function fl_screen_num2
(X, Y, W, H : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_screen_num2, "fl_screen_num2");
pragma Inline (fl_screen_num2);
procedure fl_screen_work_area
(X, Y, W, H : out Interfaces.C.int;
PX, PY : in Interfaces.C.int);
pragma Import (C, fl_screen_work_area, "fl_screen_work_area");
pragma Inline (fl_screen_work_area);
procedure fl_screen_work_area2
(X, Y, W, H : out Interfaces.C.int;
N : in Interfaces.C.int);
pragma Import (C, fl_screen_work_area2, "fl_screen_work_area2");
pragma Inline (fl_screen_work_area2);
procedure fl_screen_work_area3
(X, Y, W, H : out Interfaces.C.int);
pragma Import (C, fl_screen_work_area3, "fl_screen_work_area3");
pragma Inline (fl_screen_work_area3);
procedure fl_screen_xywh
(X, Y, W, H : out Interfaces.C.int;
PX, PY : in Interfaces.C.int);
pragma Import (C, fl_screen_xywh, "fl_screen_xywh");
pragma Inline (fl_screen_xywh);
procedure fl_screen_xywh2
(X, Y, W, H : out Interfaces.C.int;
N : in Interfaces.C.int);
pragma Import (C, fl_screen_xywh2, "fl_screen_xywh2");
pragma Inline (fl_screen_xywh2);
procedure fl_screen_xywh3
(X, Y, W, H : out Interfaces.C.int);
pragma Import (C, fl_screen_xywh3, "fl_screen_xywh3");
pragma Inline (fl_screen_xywh3);
procedure fl_screen_xywh4
(X, Y, W, H : out Interfaces.C.int;
PX, PY, PW, PH : in Interfaces.C.int);
pragma Import (C, fl_screen_xywh4, "fl_screen_xywh4");
pragma Inline (fl_screen_xywh4);
function Get_X return Integer is
begin
return Integer (fl_screen_x);
end Get_X;
function Get_Y return Integer is
begin
return Integer (fl_screen_y);
end Get_Y;
function Get_W return Integer is
begin
return Integer (fl_screen_w);
end Get_W;
function Get_H return Integer is
begin
return Integer (fl_screen_h);
end Get_H;
function Count return Integer is
begin
return Integer (fl_screen_count);
end Count;
-- Screen numbers in the range 1 .. Get_Count
procedure DPI
(Horizontal, Vertical : out Float;
Screen_Number : in Integer := 1)
is
H, V : Interfaces.C.C_float;
begin
fl_screen_dpi (H, V, Interfaces.C.int (Screen_Number) - 1);
Horizontal := Float (H);
Vertical := Float (V);
end DPI;
function Containing
(X, Y : in Integer)
return Integer is
begin
return Integer (fl_screen_num
(Interfaces.C.int (X),
Interfaces.C.int (Y)));
end Containing;
function Containing
(X, Y, W, H : in Integer)
return Integer is
begin
return Integer (fl_screen_num2
(Interfaces.C.int (X),
Interfaces.C.int (Y),
Interfaces.C.int (W),
Interfaces.C.int (H)));
end Containing;
procedure Work_Area
(X, Y, W, H : out Integer;
Pos_X, Pos_Y : in Integer) is
begin
fl_screen_work_area
(Interfaces.C.int (X),
Interfaces.C.int (Y),
Interfaces.C.int (W),
Interfaces.C.int (H),
Interfaces.C.int (Pos_X),
Interfaces.C.int (Pos_Y));
end Work_Area;
procedure Work_Area
(X, Y, W, H : out Integer;
Screen_Num : in Integer) is
begin
fl_screen_work_area2
(Interfaces.C.int (X),
Interfaces.C.int (Y),
Interfaces.C.int (W),
Interfaces.C.int (H),
Interfaces.C.int (Screen_Num));
end Work_Area;
procedure Work_Area
(X, Y, W, H : out Integer) is
begin
fl_screen_work_area3
(Interfaces.C.int (X),
Interfaces.C.int (Y),
Interfaces.C.int (W),
Interfaces.C.int (H));
end Work_Area;
procedure Bounding_Rect
(X, Y, W, H : out Integer;
Pos_X, Pos_Y : in Integer) is
begin
fl_screen_xywh
(Interfaces.C.int (X),
Interfaces.C.int (Y),
Interfaces.C.int (W),
Interfaces.C.int (H),
Interfaces.C.int (Pos_X),
Interfaces.C.int (Pos_Y));
end Bounding_Rect;
procedure Bounding_Rect
(X, Y, W, H : out Integer;
Screen_Num : in Integer) is
begin
fl_screen_xywh2
(Interfaces.C.int (X),
Interfaces.C.int (Y),
Interfaces.C.int (W),
Interfaces.C.int (H),
Interfaces.C.int (Screen_Num));
end Bounding_Rect;
procedure Bounding_Rect
(X, Y, W, H : out Integer) is
begin
fl_screen_xywh3
(Interfaces.C.int (X),
Interfaces.C.int (Y),
Interfaces.C.int (W),
Interfaces.C.int (H));
end Bounding_Rect;
procedure Bounding_Rect
(X, Y, W, H : out Integer;
PX, PY, PW, PH : in Integer) is
begin
fl_screen_xywh4
(Interfaces.C.int (X),
Interfaces.C.int (Y),
Interfaces.C.int (W),
Interfaces.C.int (H),
Interfaces.C.int (PX),
Interfaces.C.int (PY),
Interfaces.C.int (PW),
Interfaces.C.int (PH));
end Bounding_Rect;
end FLTK.Screen;
|