FreeBASIC  0.91.0
rtl-gfx.bas
Go to the documentation of this file.
1 '' intrinsic runtime lib gfx functions (SCREEN, PSET, LINE, ...)
2 ''
3 '' chng: oct/2004 written [v1ctor]
4 
5 #include once "fb.bi"
6 #include once "fbint.bi"
7 #include once "ast.bi"
8 #include once "lex.bi"
9 #include once "rtl.bi"
10 
11 declare function hGfxlib_cb _
12  ( _
13  byval sym as FBSYMBOL ptr _
14  ) as integer
15 
16 declare function hPorts_cb _
17  ( _
18  byval sym as FBSYMBOL ptr _
19  ) as integer
20 
21  dim shared as FB_RTL_PROCDEF funcdata( 0 to ... ) = _
22  { _
23 /' sub fb_GfxPset _
24  ( _
25  byref target as any, _
26  byval x as single, _
27  byval y as single, _
28  byval color as ulong, _
29  byval coord_type as long, _
30  byval ispreset as long _
31  ) '/ _
32  ( _
33  @FB_RTL_GFXPSET, NULL, _
34  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
35  @hGfxlib_cb, FB_RTL_OPT_NONE, _
36  6, _
37  { _
38  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
39  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
40  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
41  ( FB_DATATYPE_ULONG, FB_PARAMMODE_BYVAL, FALSE ), _
42  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
43  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ) _
44  } _
45  ), _
46 /' function fb_GfxPoint _
47  ( _
48  byref target as any, _
49  byval x as single, _
50  byval y as single _
51  ) as long '/ _
52  ( _
53  @FB_RTL_GFXPOINT, NULL, _
54  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
55  @hGfxlib_cb, FB_RTL_OPT_NONE, _
56  3, _
57  { _
58  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
59  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
60  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ) _
61  } _
62  ), _
63 /' sub fb_GfxLine _
64  ( _
65  byref target as any, _
66  byval x1 as single = 0, _
67  byval y1 as single = 0, _
68  byval x2 as single = 0, _
69  byval y2 as single = 0, _
70  byval color as ulong = DEFAULT_COLOR, _
71  byval type as long = LINE_TYPE_LINE, _
72  byval style as ulong = &hFFFF, _
73  byval coord_type as long = COORD_TYPE_AA _
74  ) '/ _
75  ( _
76  @FB_RTL_GFXLINE, NULL, _
77  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
78  @hGfxlib_cb, FB_RTL_OPT_NONE, _
79  9, _
80  { _
81  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
82  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
83  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
84  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
85  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
86  ( FB_DATATYPE_ULONG, FB_PARAMMODE_BYVAL, FALSE ), _
87  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
88  ( FB_DATATYPE_ULONG, FB_PARAMMODE_BYVAL, FALSE ), _
89  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ) _
90  } _
91  ), _
92 /' sub fb_GfxEllipse _
93  ( _
94  byref target as any, _
95  byval x as single, _
96  byval y as single, _
97  byval radius as single, _
98  byval color as ulong = DEFAULT_COLOR, _
99  byval aspect as single = 0.0, _
100  byval start as single = 0.0, _
101  byval end as single = 6.283186, _
102  byval fill as long = 0, _
103  byval coord_type as long = COORD_TYPE_A _
104  ) '/ _
105  ( _
106  @FB_RTL_GFXCIRCLE, NULL, _
107  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
108  @hGfxlib_cb, FB_RTL_OPT_NONE, _
109  10, _
110  { _
111  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
112  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
113  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
114  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
115  ( FB_DATATYPE_ULONG, FB_PARAMMODE_BYVAL, FALSE ), _
116  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
117  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
118  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
119  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
120  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ) _
121  } _
122  ), _
123 /' sub fb_GfxPaint _
124  ( _
125  byref target as any, _
126  byval fx as single, _
127  byval fy as single, _
128  byval color as ulong = DEFAULT_COLOR, _
129  byval border_color as ulong = DEFAULT_COLOR, _
130  byref pattern as string, _
131  byval mode as long = PAINT_TYPE_FILL, _
132  byval coord_type as long = COORD_TYPE_A _
133  ) '/ _
134  ( _
135  @FB_RTL_GFXPAINT, NULL, _
136  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
137  @hGfxlib_cb, FB_RTL_OPT_NONE, _
138  8, _
139  { _
140  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
141  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
142  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
143  ( FB_DATATYPE_ULONG, FB_PARAMMODE_BYVAL, FALSE ), _
144  ( FB_DATATYPE_ULONG, FB_PARAMMODE_BYVAL, FALSE ), _
145  ( FB_DATATYPE_STRING, FB_PARAMMODE_BYREF, FALSE ), _
146  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
147  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ) _
148  } _
149  ), _
150 /' sub fb_GfxDraw( byref target as any, byref cmd as string ) '/ _
151  ( _
152  @FB_RTL_GFXDRAW, NULL, _
153  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
154  @hGfxlib_cb, FB_RTL_OPT_NONE, _
155  2, _
156  { _
157  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
158  ( FB_DATATYPE_STRING, FB_PARAMMODE_BYREF, FALSE ) _
159  } _
160  ), _
161 /' function fb_GfxDrawString _
162  ( _
163  byref target as any, _
164  byval fx as single, _
165  byval fy as single, _
166  byval coord_type as long = COORD_TYPE_A, _
167  byref string as string, _
168  byval color as ulong = DEFAULT_COLOR, _
169  byval font as any = NULL, _
170  byval mode as long, _
171  byval putter as PUTTER ptr, _
172  byval blender as BLENDER ptr, _
173  byval param as any ptr _
174  ) '/ _
175  ( _
176  @FB_RTL_GFXDRAWSTRING, NULL, _
177  FB_DATATYPE_INTEGER, FB_FUNCMODE_FBCALL, _
178  @hGfxlib_cb, FB_RTL_OPT_ERROR, _
179  11, _
180  { _
181  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
182  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
183  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
184  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
185  ( FB_DATATYPE_STRING, FB_PARAMMODE_BYREF, FALSE ), _
186  ( FB_DATATYPE_ULONG, FB_PARAMMODE_BYVAL, FALSE ), _
187  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
188  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
189  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
190  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
191  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
192  } _
193  ), _
194 /' sub fb_GfxView _
195  ( _
196  byval x1 as long, _
197  byval y1 as long, _
198  byval x2 as long, _
199  byval y2 as long, _
200  byval fill_color as ulong, _
201  byval border_color as ulong, _
202  byval screen as long _
203  ) '/ _
204  ( _
205  @FB_RTL_GFXVIEW, NULL, _
206  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
207  @hGfxlib_cb, FB_RTL_OPT_NONE, _
208  7, _
209  { _
210  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
211  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
212  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
213  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
214  ( FB_DATATYPE_ULONG, FB_PARAMMODE_BYVAL, FALSE ), _
215  ( FB_DATATYPE_ULONG, FB_PARAMMODE_BYVAL, FALSE ), _
216  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ) _
217  } _
218  ), _
219 /' sub fb_GfxWindow _
220  ( _
221  byval x1 as single = 0, _
222  byval y1 as single = 0, _
223  byval x2 as single = 0, _
224  byval y2 as single = 0, _
225  byval screen as long = 0 _
226  ) '/ _
227  ( _
228  @FB_RTL_GFXWINDOW, NULL, _
229  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
230  @hGfxlib_cb, FB_RTL_OPT_NONE, _
231  5, _
232  { _
233  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, TRUE, 0 ), _
234  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, TRUE, 0 ), _
235  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, TRUE, 0 ), _
236  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, TRUE, 0 ), _
237  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ) _
238  } _
239  ), _
240 /' sub fb_GfxPalette _
241  ( _
242  byval index as long = -1, _
243  byval r as long = -1, _
244  byval g as long = -1, _
245  byval b as long = -1 _
246  ) '/ _
247  ( _
248  @FB_RTL_GFXPALETTE, NULL, _
249  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
250  @hGfxlib_cb, FB_RTL_OPT_NONE, _
251  4, _
252  { _
253  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ), _
254  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ), _
255  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ), _
256  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ) _
257  } _
258  ), _
259 /' sub fb_GfxPaletteUsing( byref data as long ) '/ _
260  ( _
261  @FB_RTL_GFXPALETTEUSING, NULL, _
262  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
263  @hGfxlib_cb, FB_RTL_OPT_NONE, _
264  1, _
265  { _
266  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYREF, FALSE ) _
267  } _
268  ), _
269 /' sub fb_GfxPaletteUsing64( byref data as longint ) '/ _
270  ( _
271  @FB_RTL_GFXPALETTEUSING64, NULL, _
272  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
273  @hGfxlib_cb, FB_RTL_OPT_NONE, _
274  1, _
275  { _
276  ( FB_DATATYPE_LONGINT, FB_PARAMMODE_BYREF, FALSE ) _
277  } _
278  ), _
279 /' sub fb_GfxPaletteGet _
280  ( _
281  byval index as long, _
282  byref r as long, _
283  byref g as long, _
284  byref b as long _
285  ) '/ _
286  ( _
287  @FB_RTL_GFXPALETTEGET, NULL, _
288  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
289  @hGfxlib_cb, FB_RTL_OPT_NONE, _
290  4, _
291  { _
292  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
293  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYREF, FALSE ), _
294  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYREF, FALSE ), _
295  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYREF, FALSE ) _
296  } _
297  ), _
298 /' sub fb_GfxPaletteGet64 _
299  ( _
300  byval index as long, _
301  byref r as longint, _
302  byref g as longint, _
303  byref b as longint _
304  ) '/ _
305  ( _
306  @FB_RTL_GFXPALETTEGET64, NULL, _
307  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
308  @hGfxlib_cb, FB_RTL_OPT_NONE, _
309  4, _
310  { _
311  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
312  ( FB_DATATYPE_LONGINT, FB_PARAMMODE_BYREF, FALSE ), _
313  ( FB_DATATYPE_LONGINT, FB_PARAMMODE_BYREF, FALSE ), _
314  ( FB_DATATYPE_LONGINT, FB_PARAMMODE_BYREF, FALSE ) _
315  } _
316  ), _
317 /' sub fb_GfxPaletteGetUsing( byref data as long ) '/ _
318  ( _
319  @FB_RTL_GFXPALETTEGETUSING, NULL, _
320  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
321  @hGfxlib_cb, FB_RTL_OPT_NONE, _
322  1, _
323  { _
324  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYREF, FALSE ) _
325  } _
326  ), _
327 /' sub fb_GfxPaletteGetUsing64( byref data as longint ) '/ _
328  ( _
329  @FB_RTL_GFXPALETTEGETUSING64, NULL, _
330  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
331  @hGfxlib_cb, FB_RTL_OPT_NONE, _
332  1, _
333  { _
334  ( FB_DATATYPE_LONGINT, FB_PARAMMODE_BYREF, FALSE ) _
335  } _
336  ), _
337 /' function fb_GfxPut _
338  ( _
339  byref target as any, _
340  byval x as single, _
341  byval y as single, _
342  byref src as any, _
343  byval x1 as long, _
344  byval y1 as long, _
345  byval x2 as long, _
346  byval y2 as long, _
347  byval coord_type as long, _
348  byval mode as long, _
349  byval putter as PUTTER ptr, _
350  byval alpha as long, _
351  byval blender as BLENDER ptr,
352  byval param as any ptr _
353  ) as long '/ _
354  ( _
355  @FB_RTL_GFXPUT, NULL, _
356  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
357  @hGfxlib_cb, FB_RTL_OPT_ERROR, _
358  14, _
359  { _
360  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
361  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
362  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
363  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
364  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
365  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
366  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
367  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
368  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
369  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
370  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
371  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
372  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
373  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
374  } _
375  ), _
376 /' function fb_GfxGet _
377  ( _
378  byref target as any, _
379  byval x1 as single, _
380  byval y1 as single, _
381  byval x2 as single, _
382  byval y2 as single, _
383  byref dest as any, _
384  byval coord_type as long, _
385  array() as any _
386  ) as long '/ _
387  ( _
388  @FB_RTL_GFXGET, NULL, _
389  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
390  @hGfxlib_cb, FB_RTL_OPT_ERROR or FB_RTL_OPT_FBONLY, _
391  8, _
392  { _
393  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
394  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
395  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
396  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
397  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
398  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
399  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
400  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYDESC, FALSE ) _
401  } _
402  ), _
403 /' function fb_GfxGetQB _
404  ( _
405  byref target as any, _
406  byval x1 as single, _
407  byval y1 as single, _
408  byval x2 as single, _
409  byval y2 as single, _
410  byref dest as any, _
411  byval coord_type as long, _
412  array() as any _
413  ) as long '/ _
414  ( _
415  @FB_RTL_GFXGETQB, NULL, _
416  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
417  @hGfxlib_cb, FB_RTL_OPT_ERROR or FB_RTL_OPT_NOFB, _
418  8, _
419  { _
420  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
421  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
422  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
423  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
424  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
425  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
426  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
427  ( FB_DATATYPE_VOID, FB_PARAMMODE_BYDESC, FALSE ) _
428  } _
429  ), _
430 /' function fb_GfxScreen _
431  ( _
432  byval mode as long, _
433  byval depth as long = 0, _
434  byval num_pages as long = 0, _
435  byval flags as long = 0, _
436  byval refresh_rate as long = 0 _
437  ) as long '/ _
438  ( _
439  @FB_RTL_GFXSCREENSET, NULL, _
440  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
441  @hGfxlib_cb, FB_RTL_OPT_NONE, _
442  5, _
443  { _
444  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
445  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ), _
446  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ), _
447  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ), _
448  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ) _
449  } _
450  ), _
451 /' function fb_GfxScreenQB _
452  ( _
453  byval mode as long, _
454  byval visible as long = -1,
455  byval active as long = -1 _
456  ) as long '/ _
457  ( _
458  @FB_RTL_GFXSCREENSETQB, NULL, _
459  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
460  @hGfxlib_cb, FB_RTL_OPT_NONE, _
461  3, _
462  { _
463  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
464  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ), _
465  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ) _
466  } _
467  ), _
468 /' function screenres _
469  ( _
470  byval width as long, _
471  byval height as long, _
472  byval depth as long = 8, _
473  byval num_pages as long = 1, _
474  byval flags as long = 0, _
475  byval refresh_rate as long = 0 _
476  ) as long '/ _
477  ( _
478  @"screenres", @"fb_GfxScreenRes", _
479  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
480  @hGfxlib_cb, FB_RTL_OPT_ERROR or FB_RTL_OPT_NOQB, _
481  6, _
482  { _
483  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
484  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
485  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 8 ), _
486  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 1 ), _
487  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ), _
488  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ) _
489  } _
490  ), _
491 /' function bload _
492  ( _
493  byref filename as string, _
494  byval dest as any ptr = NULL, _
495  byval pal as any ptr = NULL _
496  ) as long '/ _
497  ( _
498  @"bload", @"fb_GfxBload", _
499  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
500  @hGfxlib_cb, FB_RTL_OPT_ERROR or FB_RTL_OPT_FBONLY, _
501  3, _
502  { _
503  ( FB_DATATYPE_STRING, FB_PARAMMODE_BYREF, FALSE ), _
504  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, TRUE, NULL ), _
505  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, TRUE, NULL ) _
506  } _
507  ), _
508 /' function bload _
509  ( _
510  byref filename as string, _
511  byval dest as any ptr = NULL, _
512  byval pal as any ptr = NULL _
513  ) as long '/ _
514  ( _
515  @"bload", @"fb_GfxBloadQB", _
516  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
517  @hGfxlib_cb, FB_RTL_OPT_ERROR or FB_RTL_OPT_NOFB, _
518  3, _
519  { _
520  ( FB_DATATYPE_STRING, FB_PARAMMODE_BYREF, FALSE ), _
521  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, TRUE, NULL ), _
522  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, TRUE, NULL ) _
523  } _
524  ), _
525 /' function bsave overload _
526  ( _
527  byref filename as string, _
528  byval src as any ptr, _
529  byval size as ulong = 0, _
530  byval pal as any ptr = 0 _
531  ) as long '/ _
532  ( _
533  @"bsave", @"fb_GfxBsave", _
534  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
535  @hGfxlib_cb, FB_RTL_OPT_OVER or FB_RTL_OPT_ERROR, _
536  4, _
537  { _
538  ( FB_DATATYPE_STRING, FB_PARAMMODE_BYREF, FALSE ), _
539  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
540  ( FB_DATATYPE_ULONG, FB_PARAMMODE_BYVAL, TRUE, 0 ), _
541  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, TRUE, 0 ) _
542  } _
543  ), _
544 /' function bsave overload _
545  ( _
546  byref filename as string, _
547  byval src as any ptr, _
548  byval size as ulong = 0, _
549  byval pal as any ptr, _
550  byval bitsperpixel as long _
551  ) as long '/ _
552  ( _
553  @"bsave", @"fb_GfxBsaveEx", _
554  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
555  @hGfxlib_cb, FB_RTL_OPT_OVER or FB_RTL_OPT_ERROR, _
556  5, _
557  { _
558  ( FB_DATATYPE_STRING, FB_PARAMMODE_BYREF, FALSE ), _
559  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
560  ( FB_DATATYPE_ULONG, FB_PARAMMODE_BYVAL, TRUE, 0 ), _
561  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
562  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ) _
563  } _
564  ), _
565 /' function flip _
566  ( _
567  byval from_page as long = -1, _
568  byval to_page as long = -1 _
569  ) as long '/ _
570  ( _
571  @"flip", @"fb_GfxFlip", _
572  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
573  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
574  2, _
575  { _
576  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ), _
577  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ) _
578  } _
579  ), _
580 /' function screencopy _
581  ( _
582  byval from_page as long = -1, _
583  byval to_page as long = -1 _
584  ) as long '/ _
585  ( _
586  @"screencopy", @"fb_GfxFlip", _
587  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
588  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
589  2, _
590  { _
591  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ), _
592  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ) _
593  } _
594  ), _
595 /' function pointcoord( byval func as long ) as single '/ _
596  ( _
597  @"pointcoord", @"fb_GfxCursor", _
598  FB_DATATYPE_SINGLE, FB_FUNCMODE_FBCALL, _
599  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
600  1, _
601  { _
602  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ) _
603  } _
604  ), _
605 /' function pmap( byval coord as single, byval func as long ) as single '/ _
606  ( _
607  @"pmap", @"fb_GfxPMap", _
608  FB_DATATYPE_SINGLE, FB_FUNCMODE_FBCALL, _
609  @hGfxlib_cb, FB_RTL_OPT_NONE, _
610  2, _
611  { _
612  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYVAL, FALSE ), _
613  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ) _
614  } _
615  ), _
616 /' function out( byval port as ushort, byval value as ubyte ) as long '/ _
617  ( _
618  @"out", @"fb_Out", _
619  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
620  @hPorts_cb, FB_RTL_OPT_ERROR, _
621  2, _
622  { _
623  ( FB_DATATYPE_USHORT, FB_PARAMMODE_BYVAL, FALSE ), _
624  ( FB_DATATYPE_UBYTE, FB_PARAMMODE_BYVAL, FALSE ) _
625  } _
626  ), _
627 /' function inp( byval port as ushort ) as long '/ _
628  ( _
629  @"inp", @"fb_In", _
630  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
631  @hPorts_cb, FB_RTL_OPT_NONE, _
632  1, _
633  { _
634  ( FB_DATATYPE_USHORT, FB_PARAMMODE_BYVAL, FALSE ) _
635  } _
636  ), _
637 /' function wait _
638  ( _
639  byval port as ushort, _
640  byval and as long, _
641  byval xor as long = 0 _
642  ) as long '/ _
643  ( _
644  @"wait", @"fb_Wait", _
645  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
646  @hPorts_cb, FB_RTL_OPT_ERROR, _
647  3, _
648  { _
649  ( FB_DATATYPE_USHORT, FB_PARAMMODE_BYVAL, FALSE ), _
650  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
651  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ) _
652  } _
653  ), _
654 /' function screensync( ) as long '/ _
655  ( _
656  @"screensync", @"fb_GfxWaitVSync", _
657  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
658  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
659  0 _
660  ), _
661 /' function screenset cdecl _
662  ( _
663  byval work_page as integer = -1, _
664  byval visible_page as integer = -1 _
665  ) as long '/ _
666  ( _
667  @"screenset", @"fb_GfxPageSet", _
668  FB_DATATYPE_LONG, FB_FUNCMODE_CDECL, _
669  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
670  2, _
671  { _
672  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ), _
673  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ) _
674  } _
675  ), _
676 /' sub screenlock( ) '/ _
677  ( _
678  @"screenlock", @"fb_GfxLock", _
679  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
680  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
681  0 _
682  ), _
683 /' sub screenunlock( byval start_line as long, byval end_line as long ) '/ _
684  ( _
685  @"screenunlock", @"fb_GfxUnlock", _
686  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
687  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
688  2, _
689  { _
690  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ), _
691  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ) _
692  } _
693  ), _
694 /' function screenptr( ) as any ptr '/ _
695  ( _
696  @"screenptr", @"fb_GfxScreenPtr", _
697  typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_FBCALL, _
698  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
699  0 _
700  ), _
701 /' sub windowtitle( byref title as string ) '/ _
702  ( _
703  @"windowtitle", @"fb_GfxSetWindowTitle", _
704  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
705  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
706  1, _
707  { _
708  ( FB_DATATYPE_STRING, FB_PARAMMODE_BYREF, FALSE ) _
709  } _
710  ), _
711 /' function multikey( byval scancode as long ) as long '/ _
712  ( _
713  @"multikey", @"fb_Multikey", _
714  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
715  @rtlMultinput_cb, FB_RTL_OPT_NOQB, _
716  1, _
717  { _
718  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ) _
719  } _
720  ), _
721 /' function getmouse overload _
722  ( _
723  byref x as long = 0, _
724  byref y as long = 0, _
725  byref z as long = 0, _
726  byref buttons as long = 0, _
727  byref clip as long = 0 _
728  ) as long '/ _
729  ( _
730  @"getmouse", @"fb_GetMouse", _
731  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
732  @rtlMultinput_cb, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
733  5, _
734  { _
735  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYREF, FALSE, 0, TRUE ), _
736  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYREF, FALSE, 0, TRUE ), _
737  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYREF, TRUE, 0, TRUE ), _
738  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYREF, TRUE, 0, TRUE ), _
739  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYREF, TRUE, 0, TRUE ) _
740  } _
741  ), _
742 /' function getmouse overload _
743  ( _
744  byref x as longint = 0, _
745  byref y as longint = 0, _
746  byref z as longint = 0, _
747  byref buttons as longint = 0, _
748  byref clip as longint = 0 _
749  ) as long '/ _
750  ( _
751  @"getmouse", @"fb_GetMouse64", _
752  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
753  @rtlMultinput_cb, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
754  5, _
755  { _
756  ( FB_DATATYPE_LONGINT, FB_PARAMMODE_BYREF, FALSE, 0, TRUE ), _
757  ( FB_DATATYPE_LONGINT, FB_PARAMMODE_BYREF, FALSE, 0, TRUE ), _
758  ( FB_DATATYPE_LONGINT, FB_PARAMMODE_BYREF, TRUE, 0, TRUE ), _
759  ( FB_DATATYPE_LONGINT, FB_PARAMMODE_BYREF, TRUE, 0, TRUE ), _
760  ( FB_DATATYPE_LONGINT, FB_PARAMMODE_BYREF, TRUE, 0, TRUE ) _
761  } _
762  ), _
763 /' function setmouse _
764  ( _
765  byval x as long = -1, _
766  byval y as long = -1, _
767  byval cursor as long = -1, _
768  byval clip as long = -1 _
769  ) as long '/ _
770  ( _
771  @"setmouse", @"fb_SetMouse", _
772  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
773  @rtlMultinput_cb, FB_RTL_OPT_NOQB, _
774  4, _
775  { _
776  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ), _
777  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ), _
778  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ), _
779  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, -1 ) _
780  } _
781  ), _
782 /' function getjoystick _
783  ( _
784  byval id as long = 0, _
785  byref buttons as integer = 0, _
786  byref a1 as single = 0, _
787  byref a2 as single = 0, _
788  byref a3 as single = 0, _
789  byref a4 as single = 0, _
790  byref a5 as single = 0, _
791  byref a6 as single = 0, _
792  byref a7 as single = 0, _
793  byref a8 as single = 0 _
794  ) as long '/ _
795  ( _
796  @"getjoystick", @"fb_GfxGetJoystick", _
797  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
798  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
799  10, _
800  { _
801  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE, 0, TRUE ), _
802  ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYREF, TRUE, 0, TRUE ), _
803  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYREF, TRUE, 0, TRUE ), _
804  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYREF, TRUE, 0, TRUE ), _
805  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYREF, TRUE, 0, TRUE ), _
806  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYREF, TRUE, 0, TRUE ), _
807  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYREF, TRUE, 0, TRUE ), _
808  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYREF, TRUE, 0, TRUE ), _
809  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYREF, TRUE, 0, TRUE ), _
810  ( FB_DATATYPE_SINGLE, FB_PARAMMODE_BYREF, TRUE, 0, TRUE ) _
811  } _
812  ), _
813 /' function stick( byval n as long ) as long '/ _
814  ( _
815  @"stick", @"fb_GfxStickQB", _
816  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
817  @hGfxlib_cb, FB_RTL_OPT_QBONLY, _
818  1, _
819  { _
820  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ) _
821  } _
822  ), _
823 /' function strig( byval n as long ) as long '/ _
824  ( _
825  @"strig", @"fb_GfxStrigQB", _
826  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
827  @hGfxlib_cb, FB_RTL_OPT_QBONLY, _
828  1, _
829  { _
830  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ) _
831  } _
832  ), _
833 /' sub screeninfo _
834  ( _
835  byref width as integer = 0, _
836  byref height as integer = 0, _
837  byref depth as integer = 0, _
838  byref bpp as integer = 0, _
839  byref pitch as integer = 0, _
840  byref refresh_rate as integer = 0, _
841  byref driver as string = byval NULL _
842  ) '/ _
843  ( _
844  @"screeninfo", @"fb_GfxScreenInfo", _
845  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
846  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
847  7, _
848  { _
849  ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYREF, TRUE, 0 ), _
850  ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYREF, TRUE, 0 ), _
851  ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYREF, TRUE, 0 ), _
852  ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYREF, TRUE, 0 ), _
853  ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYREF, TRUE, 0 ), _
854  ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYREF, TRUE, 0 ), _
855  ( FB_DATATYPE_STRING, FB_PARAMMODE_BYREF, TRUE, NULL ) _
856  } _
857  ), _
858 /' function screenlist( byval depth as long = 0 ) as long '/ _
859  ( _
860  @"screenlist", @"fb_GfxScreenList", _
861  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
862  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
863  1, _
864  { _
865  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ) _
866  } _
867  ), _
868 /' function fb_GfxImageCreate _
869  ( _
870  byval width as long, _
871  byval height as long, _
872  byval color as ulong = 0, _
873  byval depth as long = 0, _
874  byval flags as long = 0 _
875  ) as any ptr '/ _
876  ( _
877  @FB_RTL_GFXIMAGECREATE, NULL, _
878  typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_FBCALL, _
879  @hGfxlib_cb, FB_RTL_OPT_FBONLY, _
880  5, _
881  { _
882  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
883  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
884  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ), _
885  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ), _
886  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ) _
887  } _
888  ), _
889 /' function fb_GfxImageCreateQB _
890  ( _
891  byval width as long, _
892  byval height as long, _
893  byval color as ulong = 0, _
894  byval depth as long = 0, _
895  byval flags as long = 0 _
896  ) as any ptr '/ _
897  ( _
898  @FB_RTL_GFXIMAGECREATEQB, NULL, _
899  typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_FBCALL, _
900  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
901  5, _
902  { _
903  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
904  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
905  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ), _
906  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ), _
907  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ) _
908  } _
909  ), _
910 /' sub imagedestroy( byval image as any ptr ) '/ _
911  ( _
912  @"imagedestroy", @"fb_GfxImageDestroy", _
913  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
914  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
915  1, _
916  { _
917  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
918  } _
919  ), _
920 /' function imageinfo _
921  ( _
922  byval img as any ptr, _
923  byref width as long = 0, _
924  byref height as long = 0, _
925  byref bpp as long = 0, _
926  byref pitch as long = 0, _
927  byref imgdata as any ptr = 0, _
928  byref size as long = 0 _
929  ) as long '/ _
930  ( _
931  @"imageinfo", @"fb_GfxImageInfo", _
932  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
933  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
934  7, _
935  { _
936  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
937  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYREF, TRUE, 0 ), _
938  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYREF, TRUE, 0 ), _
939  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYREF, TRUE, 0 ), _
940  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYREF, TRUE, 0 ), _
941  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYREF, TRUE, 0 ), _
942  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYREF, TRUE, 0 ) _
943  } _
944  ), _
945 /' sub imageconvertrow _
946  ( _
947  byval src as any ptr, _
948  byval src_bpp as long, _
949  byval dest as any ptr, _
950  byval dst_bpp as long, _
951  byval width as long, _
952  byval isrgb as long = 1 _
953  ) '/ _
954  ( _
955  @"imageconvertrow", @"fb_GfxImageConvertRow", _
956  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
957  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
958  6, _
959  { _
960  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
961  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
962  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
963  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
964  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
965  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 1 ) _
966  } _
967  ), _
968 /' function screenevent( byval event as EVENT ptr ) as long '/ _
969  ( _
970  @"screenevent", @"fb_GfxEvent", _
971  FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
972  @hGfxlib_cb, FB_RTL_OPT_NOQB, _
973  1, _
974  { _
975  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, TRUE, 0, TRUE ) _
976  } _
977  ), _
978 /' sub screencontrol overload _
979  ( _
980  byval what as long, _
981  byref param as string _
982  ) '/ _
983  ( _
984  @"screencontrol", @"fb_GfxControl_s", _
985  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
986  @hGfxlib_cb, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
987  2, _
988  { _
989  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
990  ( FB_DATATYPE_STRING, FB_PARAMMODE_BYREF ) _
991  } _
992  ), _
993 /' sub screencontrol overload _
994  ( _
995  byval what as long, _
996  byref param1 as integer = &h80000000, _
997  byref param2 as integer = &h80000000, _
998  byref param3 as integer = &h80000000, _
999  byref param4 as integer = &h80000000 _
1000  ) '/ _
1001  ( _
1002  @"screencontrol", @"fb_GfxControl_i", _
1003  FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
1004  @hGfxlib_cb, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
1005  5, _
1006  { _
1007  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1008  ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYREF, TRUE, &h80000000 ), _
1009  ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYREF, TRUE, &h80000000 ), _
1010  ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYREF, TRUE, &h80000000 ), _
1011  ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYREF, TRUE, &h80000000 ) _
1012  } _
1013  ), _
1014 /' function screenglproc( byval proc as zstring ptr ) as any ptr '/ _
1015  ( _
1016  @"screenglproc", @"fb_GfxGetGLProcAddress", _
1017  typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_FBCALL, _
1018  @hGfxlib_cb, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
1019  1, _
1020  { _
1021  ( typeAddrOf( FB_DATATYPE_CHAR ), FB_PARAMMODE_BYVAL, FALSE ) _
1022  } _
1023  ), _
1024 /' sub fb_hPutTrans cdecl _
1025  ( _
1026  byval src as ubyte ptr, _
1027  byval dest as ubyte ptr, _
1028  byval w as long, _
1029  byval h as long, _
1030  byval src_pitch as long, _
1031  byval dest_pitch as long, _
1032  byval alpha as long, _
1033  byval blender as BLENDER ptr, _
1034  byval param as any ptr _
1035  ) '/ _
1036  ( _
1037  @FB_RTL_GFXPUTTRANS, NULL, _
1038  FB_DATATYPE_VOID, FB_FUNCMODE_CDECL, _
1039  @hGfxlib_cb, FB_RTL_OPT_NONE, _
1040  9, _
1041  { _
1042  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1043  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1044  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1045  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1046  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1047  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1048  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1049  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
1050  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
1051  } _
1052  ), _
1053 /' sub fb_hPutPSet cdecl _
1054  ( _
1055  byval src as ubyte ptr, _
1056  byval dest as ubyte ptr, _
1057  byval w as long, _
1058  byval h as long, _
1059  byval src_pitch as long, _
1060  byval dest_pitch as long, _
1061  byval alpha as long, _
1062  byval blender as BLENDER ptr, _
1063  byval param as any ptr _
1064  ) '/ _
1065  ( _
1066  @FB_RTL_GFXPUTPSET, NULL, _
1067  FB_DATATYPE_VOID, FB_FUNCMODE_CDECL, _
1068  @hGfxlib_cb, FB_RTL_OPT_NONE, _
1069  9, _
1070  { _
1071  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1072  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1073  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1074  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1075  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1076  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1077  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1078  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
1079  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
1080  } _
1081  ), _
1082 /' sub fb_hPutPReset cdecl _
1083  ( _
1084  byval src as ubyte ptr, _
1085  byval dest as ubyte ptr, _
1086  byval w as long, _
1087  byval h as long, _
1088  byval src_pitch as long, _
1089  byval dest_pitch as long, _
1090  byval alpha as long, _
1091  byval blender as BLENDER ptr, _
1092  byval param as any ptr _
1093  ) '/ _
1094  ( _
1095  @FB_RTL_GFXPUTPRESET, NULL, _
1096  FB_DATATYPE_VOID, FB_FUNCMODE_CDECL, _
1097  @hGfxlib_cb, FB_RTL_OPT_NONE, _
1098  9, _
1099  { _
1100  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1101  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1102  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1103  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1104  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1105  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1106  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1107  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
1108  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
1109  } _
1110  ), _
1111 /' sub fb_hPutAnd cdecl _
1112  ( _
1113  byval src as ubyte ptr, _
1114  byval dest as ubyte ptr, _
1115  byval w as long, _
1116  byval h as long, _
1117  byval src_pitch as long, _
1118  byval dest_pitch as long, _
1119  byval alpha as long, _
1120  byval blender as BLENDER ptr, _
1121  byval param as any ptr _
1122  ) '/ _
1123  ( _
1124  @FB_RTL_GFXPUTAND, NULL, _
1125  FB_DATATYPE_VOID, FB_FUNCMODE_CDECL, _
1126  @hGfxlib_cb, FB_RTL_OPT_NONE, _
1127  9, _
1128  { _
1129  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1130  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1131  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1132  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1133  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1134  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1135  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1136  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
1137  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
1138  } _
1139  ), _
1140 /' sub fb_hPutOr cdecl _
1141  ( _
1142  byval src as ubyte ptr, _
1143  byval dest as ubyte ptr, _
1144  byval w as long, _
1145  byval h as long, _
1146  byval src_pitch as long, _
1147  byval dest_pitch as long, _
1148  byval alpha as long, _
1149  byval blender as BLENDER ptr, _
1150  byval param as any ptr _
1151  ) '/ _
1152  ( _
1153  @FB_RTL_GFXPUTOR, NULL, _
1154  FB_DATATYPE_VOID, FB_FUNCMODE_CDECL, _
1155  @hGfxlib_cb, FB_RTL_OPT_NONE, _
1156  9, _
1157  { _
1158  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1159  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1160  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1161  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1162  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1163  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1164  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1165  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
1166  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
1167  } _
1168  ), _
1169 /' sub fb_hPutXor cdecl _
1170  ( _
1171  byval src as ubyte ptr, _
1172  byval dest as ubyte ptr, _
1173  byval w as long, _
1174  byval h as long, _
1175  byval src_pitch as long, _
1176  byval dest_pitch as long, _
1177  byval alpha as long, _
1178  byval blender as BLENDER ptr, _
1179  byval param as any ptr _
1180  ) '/ _
1181  ( _
1182  @FB_RTL_GFXPUTXOR, NULL, _
1183  FB_DATATYPE_VOID, FB_FUNCMODE_CDECL, _
1184  @hGfxlib_cb, FB_RTL_OPT_NONE, _
1185  9, _
1186  { _
1187  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1188  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1189  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1190  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1191  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1192  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1193  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1194  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
1195  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
1196  } _
1197  ), _
1198 /' sub fb_hPutAlpha cdecl _
1199  ( _
1200  byval src as ubyte ptr, _
1201  byval dest as ubyte ptr, _
1202  byval w as long, _
1203  byval h as long, _
1204  byval src_pitch as long, _
1205  byval dest_pitch as long, _
1206  byval alpha as long, _
1207  byval blender as BLENDER ptr, _
1208  byval param as any ptr _
1209  ) '/ _
1210  ( _
1211  @FB_RTL_GFXPUTALPHA, NULL, _
1212  FB_DATATYPE_VOID, FB_FUNCMODE_CDECL, _
1213  @hGfxlib_cb, FB_RTL_OPT_NONE, _
1214  9, _
1215  { _
1216  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1217  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1218  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1219  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1220  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1221  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1222  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1223  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
1224  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
1225  } _
1226  ), _
1227 /' sub fb_hPutBlend cdecl _
1228  ( _
1229  byval src as ubyte ptr, _
1230  byval dest as ubyte ptr, _
1231  byval w as long, _
1232  byval h as long, _
1233  byval src_pitch as long, _
1234  byval dest_pitch as long, _
1235  byval alpha as long, _
1236  byval blender as BLENDER ptr, _
1237  byval param as any ptr _
1238  ) '/ _
1239  ( _
1240  @FB_RTL_GFXPUTBLEND, NULL, _
1241  FB_DATATYPE_VOID, FB_FUNCMODE_CDECL, _
1242  @hGfxlib_cb, FB_RTL_OPT_NONE, _
1243  9, _
1244  { _
1245  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1246  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1247  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1248  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1249  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1250  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1251  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1252  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
1253  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
1254  } _
1255  ), _
1256 /' sub fb_hPutAdd cdecl _
1257  ( _
1258  byval src as ubyte ptr, _
1259  byval dest as ubyte ptr, _
1260  byval w as long, _
1261  byval h as long, _
1262  byval src_pitch as long, _
1263  byval dest_pitch as long, _
1264  byval alpha as long, _
1265  byval blender as BLENDER ptr, _
1266  byval param as any ptr _
1267  ) '/ _
1268  ( _
1269  @FB_RTL_GFXPUTADD, NULL, _
1270  FB_DATATYPE_VOID, FB_FUNCMODE_CDECL, _
1271  @hGfxlib_cb, FB_RTL_OPT_NONE, _
1272  9, _
1273  { _
1274  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1275  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1276  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1277  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1278  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1279  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1280  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1281  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
1282  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
1283  } _
1284  ), _
1285 /' sub fb_hPutCustom cdecl _
1286  ( _
1287  byval src as ubyte ptr, _
1288  byval dest as ubyte ptr, _
1289  byval w as long, _
1290  byval h as long, _
1291  byval src_pitch as long, _
1292  byval dest_pitch as long, _
1293  byval alpha as long, _
1294  byval blender as BLENDER ptr, _
1295  byval param as any ptr _
1296  ) '/ _
1297  ( _
1298  @FB_RTL_GFXPUTCUSTOM, NULL, _
1299  FB_DATATYPE_VOID, FB_FUNCMODE_CDECL, _
1300  @hGfxlib_cb, FB_RTL_OPT_NONE, _
1301  9, _
1302  { _
1303  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1304  ( typeAddrOf( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
1305  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1306  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1307  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1308  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1309  ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
1310  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
1311  ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
1312  } _
1313  ), _
1314 /' EOL '/ _
1315  ( _
1316  NULL _
1317  ) _
1318  }
1319 
1320 '':::::
1322 
1324 
1325 end sub
1326 
1327 '':::::
1329 
1330  '' procs will be deleted when symbEnd is called
1331 
1332 end sub
1333 
1334 '':::::
1335 function hPorts_cb _
1336  ( _
1337  byval sym as FBSYMBOL ptr _
1338  ) as integer
1339 
1340  static as integer libsAdded = FALSE
1341 
1342  if( libsadded = FALSE ) then
1343  libsAdded = TRUE
1344 
1345  select case env.clopt.target
1346  case FB_COMPTARGET_WIN32, FB_COMPTARGET_CYGWIN
1347  fbAddLib("advapi32")
1348  end select
1349  end if
1350 
1351  function = TRUE
1352 
1353 end function
1354 
1355 '':::::
1356 function rtlMultinput_cb _
1357  ( _
1358  byval sym as FBSYMBOL ptr _
1359  ) as integer
1360 
1361  static as integer libsAdded = FALSE
1362 
1363  if( libsadded = FALSE ) then
1364  libsAdded = TRUE
1365 
1366  select case env.clopt.target
1367  case FB_COMPTARGET_WIN32, FB_COMPTARGET_CYGWIN
1368  fbAddLib("user32")
1369  end select
1370  end if
1371 
1372  function = TRUE
1373 
1374 end function
1375 
1376 '':::::
1377 function hGfxlib_cb _
1378  ( _
1379  byval sym as FBSYMBOL ptr _
1380  ) as integer
1381 
1382  static as integer added = FALSE
1383 
1384  if (added = FALSE) then
1385  added = TRUE
1386 
1387  fbAddLib("fbgfx")
1388 
1389  select case as const fbGetOption( FB_COMPOPT_TARGET )
1390  case FB_COMPTARGET_WIN32, FB_COMPTARGET_CYGWIN
1391  fbAddLib("user32")
1392  fbAddLib("gdi32")
1393  fbAddLib("winmm")
1394 
1395  case FB_COMPTARGET_LINUX, FB_COMPTARGET_FREEBSD, _
1396  FB_COMPTARGET_OPENBSD, FB_COMPTARGET_NETBSD
1397 
1398  #if defined(__FB_LINUX__) or _
1399  defined(__FB_FREEBSD__) or _
1400  defined(__FB_OPENBSD__) or _
1401  defined(__FB_NETBSD__)
1402  fbAddLibPath("/usr/X11R6/lib")
1403  #endif
1404 
1405  fbAddLib("X11")
1406  fbAddLib("Xext")
1407  fbAddLib("Xpm")
1408  fbAddLib("Xrandr")
1409  fbAddLib("Xrender")
1410 
1411  end select
1412 
1413  end if
1414 
1415  return TRUE
1416 end function
1417 
1418 '':::::
1419 function hGetPutter _
1420  ( _
1421  byval mode as integer _
1422  ) as ASTNODE ptr
1423 
1424  dim as FBSYMBOL ptr proc = any
1425 
1426  select case as const mode
1427  case FBGFX_PUTMODE_TRANS
1428  proc = PROCLOOKUP( GFXPUTTRANS )
1429  case FBGFX_PUTMODE_PSET
1430  proc = PROCLOOKUP( GFXPUTPSET )
1431  case FBGFX_PUTMODE_PRESET
1432  proc = PROCLOOKUP( GFXPUTPRESET )
1433  case FBGFX_PUTMODE_AND
1434  proc = PROCLOOKUP( GFXPUTAND )
1435  case FBGFX_PUTMODE_OR
1436  proc = PROCLOOKUP( GFXPUTOR )
1437  case FBGFX_PUTMODE_XOR
1438  proc = PROCLOOKUP( GFXPUTXOR )
1439  case FBGFX_PUTMODE_ALPHA
1440  proc = PROCLOOKUP( GFXPUTALPHA )
1441  case FBGFX_PUTMODE_BLEND
1442  proc = PROCLOOKUP( GFXPUTBLEND )
1443  case FBGFX_PUTMODE_ADD
1444  proc = PROCLOOKUP( GFXPUTADD )
1445  case else
1446  assert(mode = FBGFX_PUTMODE_CUSTOM)
1447  proc = PROCLOOKUP( GFXPUTCUSTOM )
1448  end select
1449 
1450  function = astBuildProcAddrof( proc )
1451 end function
1452 
1453 '':::::
1454 function rtlGfxPset _
1455  ( _
1456  byval target as ASTNODE ptr, _
1457  byval targetisptr as integer, _
1458  byval xexpr as ASTNODE ptr, _
1459  byval yexpr as ASTNODE ptr, _
1460  byval cexpr as ASTNODE ptr, _
1461  byval coordtype as integer, _
1462  byval ispreset as integer _
1463  ) as integer
1464 
1465  dim as ASTNODE ptr proc = any
1466  dim as integer targetmode = any
1467 
1468  function = FALSE
1469 
1470  proc = astNewCALL( PROCLOOKUP( GFXPSET ) )
1471 
1472  '' byref target as any
1473  if( target = NULL ) then
1474  target = astNewCONSTi( 0 )
1475  targetmode = FB_PARAMMODE_BYVAL
1476  else
1477  if( targetisptr ) then
1478  targetmode = FB_PARAMMODE_BYVAL
1479  else
1480  targetmode = INVALID
1481  end if
1482  end if
1483  if( astNewARG( proc, target, , targetmode ) = NULL ) then
1484  exit function
1485  end if
1486 
1487  '' byval x as single
1488  if( astNewARG( proc, xexpr ) = NULL ) then
1489  exit function
1490  end if
1491 
1492  '' byval y as single
1493  if( astNewARG( proc, yexpr ) = NULL ) then
1494  exit function
1495  end if
1496 
1497  '' byval color as uinteger
1498  if( astNewARG( proc, cexpr ) = NULL ) then
1499  exit function
1500  end if
1501 
1502  '' byval coordtype as integer
1503  if( astNewARG( proc, astNewCONSTi( coordtype ) ) = NULL ) then
1504  exit function
1505  end if
1506 
1507  '' byval ispreset as integer
1508  if( astNewARG( proc, astNewCONSTi( ispreset ) ) = NULL ) then
1509  exit function
1510  end if
1511 
1512  ''
1513  astAdd( proc )
1514 
1515  function = TRUE
1516 
1517 end function
1518 
1519 '':::::
1520 function rtlGfxPoint _
1521  ( _
1522  byval target as ASTNODE ptr, _
1523  byval targetisptr as integer, _
1524  byval xexpr as ASTNODE ptr, _
1525  byval yexpr as ASTNODE ptr _
1526  ) as ASTNODE ptr
1527 
1528  dim as ASTNODE ptr proc = any
1529  dim as integer targetmode = any
1530 
1531  function = NULL
1532 
1533  proc = astNewCALL( PROCLOOKUP( GFXPOINT ) )
1534 
1535  '' byref target as any
1536  if( target = NULL ) then
1537  target = astNewCONSTi( 0 )
1538  targetmode = FB_PARAMMODE_BYVAL
1539  else
1540  if( targetisptr ) then
1541  targetmode = FB_PARAMMODE_BYVAL
1542  else
1543  targetmode = INVALID
1544  end if
1545  end if
1546  if( astNewARG( proc, target, , targetmode ) = NULL ) then
1547  exit function
1548  end if
1549 
1550  '' byval x as single
1551  if( astNewARG( proc, xexpr ) = NULL ) then
1552  exit function
1553  end if
1554 
1555  '' byval y as single
1556  if( yexpr = NULL ) then
1557  yexpr = astNewCONSTf( -8388607, FB_DATATYPE_SINGLE )
1558  end if
1559  if( astNewARG( proc, yexpr ) = NULL ) then
1560  exit function
1561  end if
1562 
1563  function = proc
1564 
1565 end function
1566 
1567 '':::::
1568 function rtlGfxLine _
1569  ( _
1570  byval target as ASTNODE ptr, _
1571  byval targetisptr as integer, _
1572  byval x1expr as ASTNODE ptr, _
1573  byval y1expr as ASTNODE ptr, _
1574  byval x2expr as ASTNODE ptr, _
1575  byval y2expr as ASTNODE ptr, _
1576  byval cexpr as ASTNODE ptr, _
1577  byval linetype as integer, _
1578  byval styleexpr as ASTNODE ptr, _
1579  byval coordtype as integer _
1580  ) as integer
1581 
1582  dim as ASTNODE ptr proc = any
1583  dim as integer targetmode = any
1584 
1585  function = FALSE
1586 
1587  proc = astNewCALL( PROCLOOKUP( GFXLINE ) )
1588 
1589  '' byref target as any
1590  if( target = NULL ) then
1591  target = astNewCONSTi( 0 )
1592  targetmode = FB_PARAMMODE_BYVAL
1593  else
1594  if( targetisptr ) then
1595  targetmode = FB_PARAMMODE_BYVAL
1596  else
1597  targetmode = INVALID
1598  end if
1599  end if
1600  if( astNewARG( proc, target, , targetmode ) = NULL ) then
1601  exit function
1602  end if
1603 
1604  '' byval x1 as single
1605  if( astNewARG( proc, x1expr ) = NULL ) then
1606  exit function
1607  end if
1608 
1609  '' byval y1 as single
1610  if( astNewARG( proc, y1expr ) = NULL ) then
1611  exit function
1612  end if
1613 
1614  '' byval x2 as single
1615  if( astNewARG( proc, x2expr ) = NULL ) then
1616  exit function
1617  end if
1618 
1619  '' byval y2 as single
1620  if( astNewARG( proc, y2expr ) = NULL ) then
1621  exit function
1622  end if
1623 
1624  '' byval color as uinteger
1625  if( astNewARG( proc, cexpr ) = NULL ) then
1626  exit function
1627  end if
1628 
1629  '' byval linetype as integer
1630  if( astNewARG( proc, astNewCONSTi( linetype ) ) = NULL ) then
1631  exit function
1632  end if
1633 
1634  '' byval style as uinteger
1635  if( styleexpr = NULL ) then
1636  styleexpr = astNewCONSTi( &h0000FFFF, FB_DATATYPE_UINT )
1637  end if
1638  if( astNewARG( proc, styleexpr ) = NULL ) then
1639  exit function
1640  end if
1641 
1642  '' byval coordtype as integer
1643  if( astNewARG( proc, astNewCONSTi( coordtype ) ) = NULL ) then
1644  exit function
1645  end if
1646 
1647  ''
1648  astAdd( proc )
1649 
1650  function = TRUE
1651 
1652 end function
1653 
1654 '':::::
1655 function rtlGfxCircle _
1656  ( _
1657  byval target as ASTNODE ptr, _
1658  byval targetisptr as integer, _
1659  byval xexpr as ASTNODE ptr, _
1660  byval yexpr as ASTNODE ptr, _
1661  byval radexpr as ASTNODE ptr, _
1662  byval cexpr as ASTNODE ptr, _
1663  byval aspexpr as ASTNODE ptr, _
1664  byval iniexpr as ASTNODE ptr, _
1665  byval endexpr as ASTNODE ptr, _
1666  byval fillflag as integer, _
1667  byval coordtype as integer _
1668  ) as integer
1669 
1670  dim as ASTNODE ptr proc = any
1671  dim as integer targetmode = any
1672 
1673  function = FALSE
1674 
1675  proc = astNewCALL( PROCLOOKUP( GFXCIRCLE ) )
1676 
1677  '' byref target as any
1678  if( target = NULL ) then
1679  target = astNewCONSTi( 0 )
1680  targetmode = FB_PARAMMODE_BYVAL
1681  else
1682  if( targetisptr ) then
1683  targetmode = FB_PARAMMODE_BYVAL
1684  else
1685  targetmode = INVALID
1686  end if
1687  end if
1688  if( astNewARG( proc, target, , targetmode ) = NULL ) then
1689  exit function
1690  end if
1691 
1692  '' byval x as single
1693  if( astNewARG( proc, xexpr ) = NULL ) then
1694  exit function
1695  end if
1696 
1697  '' byval y as single
1698  if( astNewARG( proc, yexpr ) = NULL ) then
1699  exit function
1700  end if
1701 
1702  '' byval radians as single
1703  if( astNewARG( proc, radexpr ) = NULL ) then
1704  exit function
1705  end if
1706 
1707  '' byval color as uinteger
1708  if( astNewARG( proc, cexpr ) = NULL ) then
1709  exit function
1710  end if
1711 
1712  '' byval aspect as single
1713  if( aspexpr = NULL ) then
1714  aspexpr = astNewCONSTf( 0.0, FB_DATATYPE_SINGLE )
1715  end if
1716  if( astNewARG( proc, aspexpr ) = NULL ) then
1717  exit function
1718  end if
1719 
1720  '' byval arcini as single
1721  if( iniexpr = NULL ) then
1722  iniexpr = astNewCONSTf( 0.0, FB_DATATYPE_SINGLE )
1723  end if
1724  if( astNewARG( proc, iniexpr ) = NULL ) then
1725  exit function
1726  end if
1727 
1728  '' byval arcend as single
1729  if( endexpr = NULL ) then
1730  endexpr = astNewCONSTf( 3.141593*2, FB_DATATYPE_SINGLE )
1731  end if
1732  if( astNewARG( proc, endexpr ) = NULL ) then
1733  exit function
1734  end if
1735 
1736  '' byval fillflag as integer
1737  if( astNewARG( proc, astNewCONSTi( fillflag ) ) = NULL ) then
1738  exit function
1739  end if
1740 
1741  '' byval coordtype as integer
1742  if( astNewARG( proc, astNewCONSTi( coordtype ) ) = NULL ) then
1743  exit function
1744  end if
1745 
1746  ''
1747  astAdd( proc )
1748 
1749  function = TRUE
1750 
1751 end function
1752 
1753 '':::::
1754 function rtlGfxPaint _
1755  ( _
1756  byval target as ASTNODE ptr, _
1757  byval targetisptr as integer, _
1758  byval xexpr as ASTNODE ptr, _
1759  byval yexpr as ASTNODE ptr, _
1760  byval pexpr as ASTNODE ptr, _
1761  byval bexpr as ASTNODE ptr, _
1762  byval coord_type as integer _
1763  ) as integer
1764 
1765  dim as ASTNODE ptr proc = any
1766  dim as integer targetmode = any, pattern = any
1767 
1768  function = FALSE
1769 
1770  proc = astNewCALL( PROCLOOKUP( GFXPAINT ) )
1771 
1772  '' byref target as any
1773  if( target = NULL ) then
1774  target = astNewCONSTi( 0 )
1775  targetmode = FB_PARAMMODE_BYVAL
1776  else
1777  if( targetisptr ) then
1778  targetmode = FB_PARAMMODE_BYVAL
1779  else
1780  targetmode = INVALID
1781  end if
1782  end if
1783  if( astNewARG( proc, target, , targetmode ) = NULL ) then
1784  exit function
1785  end if
1786 
1787  '' byval x as single
1788  if( astNewARG( proc, xexpr ) = NULL ) then
1789  exit function
1790  end if
1791 
1792  '' byval y as single
1793  if( astNewARG( proc, yexpr ) = NULL ) then
1794  exit function
1795  end if
1796 
1797  '' byval color as uinteger
1798  if( symbIsString( astGetDataType( pexpr ) ) ) then
1799  pattern = TRUE
1800  if( astNewARG( proc, astNewCONSTi( &hFFFF0000 ) ) = NULL ) then
1801  exit function
1802  end if
1803  else
1804  pattern = FALSE
1805  if( astNewARG( proc, pexpr ) = NULL ) then
1806  exit function
1807  end if
1808  end if
1809 
1810  '' byval border_color as uinteger
1811  if( astNewARG( proc, bexpr ) = NULL ) then
1812  exit function
1813  end if
1814 
1815  '' pattern as string, byval mode as integer
1816  if( pattern = TRUE ) then
1817  if( astNewARG( proc, pexpr ) = NULL ) then
1818  exit function
1819  end if
1820  if( astNewARG( proc, astNewCONSTi( 1 ) ) = NULL ) then
1821  exit function
1822  end if
1823  else
1824  if( astNewARG( proc, astNewVAR( symbAllocStrConst( "", 0 ) ) ) = NULL ) then
1825  exit function
1826  end if
1827  if( astNewARG( proc, astNewCONSTi( 0 ) ) = NULL ) then
1828  exit function
1829  end if
1830  end if
1831 
1832  '' byval coord_type as integer
1833  if( astNewARG( proc, astNewCONSTi( coord_type ) ) = NULL ) then
1834  exit function
1835  end if
1836 
1837  ''
1838  astAdd( proc )
1839 
1840  function = TRUE
1841 
1842 end function
1843 
1844 '':::::
1845 function rtlGfxDraw _
1846  ( _
1847  byval target as ASTNODE ptr, _
1848  byval targetisptr as integer, _
1849  byval cexpr as ASTNODE ptr _
1850  ) as integer
1851 
1852  dim as ASTNODE ptr proc = any
1853  dim as integer targetmode = any
1854 
1855  function = FALSE
1856 
1857  proc = astNewCALL( PROCLOOKUP( GFXDRAW ) )
1858 
1859  '' byref target as any
1860  if( target = NULL ) then
1861  target = astNewCONSTi( 0 )
1862  targetmode = FB_PARAMMODE_BYVAL
1863  else
1864  if( targetisptr ) then
1865  targetmode = FB_PARAMMODE_BYVAL
1866  else
1867  targetmode = INVALID
1868  end if
1869  end if
1870  if( astNewARG( proc, target, , targetmode ) = NULL ) then
1871  exit function
1872  end if
1873 
1874  '' cmd as string
1875  if( astNewARG( proc, cexpr ) = NULL ) then
1876  exit function
1877  end if
1878 
1879  ''
1880  astAdd( proc )
1881 
1882  function = TRUE
1883 
1884 end function
1885 
1886 '':::::
1887 function rtlGfxDrawString _
1888  ( _
1889  byval target as ASTNODE ptr, _
1890  byval targetisptr as integer, _
1891  byval xexpr as ASTNODE ptr, _
1892  byval yexpr as ASTNODE ptr, _
1893  byval sexpr as ASTNODE ptr, _
1894  byval cexpr as ASTNODE ptr, _
1895  byval fexpr as ASTNODE ptr, _
1896  byval fisptr as integer, _
1897  byval coord_type as integer, _
1898  byval mode as integer, _
1899  byval alphaexpr as ASTNODE ptr, _
1900  byval funcexpr as ASTNODE ptr, _
1901  byval paramexpr as ASTNODE ptr _
1902  ) as integer
1903 
1904  dim as ASTNODE ptr proc = any, putter = any
1905  dim as integer targetmode = any
1906 
1907  function = FALSE
1908 
1909  proc = astNewCALL( PROCLOOKUP( GFXDRAWSTRING ) )
1910 
1911  '' byref target as any
1912  if( target = NULL ) then
1913  target = astNewCONSTi( 0 )
1914  targetmode = FB_PARAMMODE_BYVAL
1915  else
1916  if( targetisptr ) then
1917  targetmode = FB_PARAMMODE_BYVAL
1918  else
1919  targetmode = INVALID
1920  end if
1921  end if
1922  if( astNewARG( proc, target, , targetmode ) = NULL ) then
1923  exit function
1924  end if
1925 
1926  '' byval x as single
1927  if( astNewARG( proc, xexpr ) = NULL ) then
1928  exit function
1929  end if
1930 
1931  '' byval y as single
1932  if( astNewARG( proc, yexpr ) = NULL ) then
1933  exit function
1934  end if
1935 
1936  '' byval coord_type as integer
1937  if( astNewARG( proc, astNewCONSTi( coord_type ) ) = NULL ) then
1938  exit function
1939  end if
1940 
1941  '' text as string
1942  if( astNewARG( proc, sexpr ) = NULL ) then
1943  exit function
1944  end if
1945 
1946  '' byval color as uinteger
1947  if( alphaexpr <> NULL ) then
1948  cexpr = alphaexpr
1949  end if
1950  if( astNewARG( proc, cexpr ) = NULL ) then
1951  exit function
1952  end if
1953 
1954  '' byref font as any
1955  if( fexpr = NULL ) then
1956  fexpr = astNewCONSTi( 0 )
1957  targetmode = FB_PARAMMODE_BYVAL
1958  putter = astNewCONSTi( 0 )
1959  else
1960  if( fisptr ) then
1961  targetmode = FB_PARAMMODE_BYVAL
1962  else
1963  targetmode = INVALID
1964  end if
1965  putter = hGetPutter( mode )
1966  end if
1967  if( astNewARG( proc, fexpr, , targetmode ) = NULL ) then
1968  exit function
1969  end if
1970 
1971  '' byval mode as integer
1972  if( astNewARG( proc, astNewCONSTi( mode ) ) = NULL ) then
1973  exit function
1974  end if
1975 
1976  '' byval putter as integer
1977  if( astNewARG( proc, putter ) = NULL ) then
1978  exit function
1979  end if
1980 
1981  '' byval func as function( src as uinteger, dest as uinteger ) as uinteger
1982  if( funcexpr = NULL ) then
1983  funcexpr = astNewCONSTi( 0 )
1984  end if
1985  if( astNewARG( proc, funcexpr ) = NULL ) then
1986  exit function
1987  end if
1988 
1989  '' byval param as any ptr
1990  if( paramexpr = NULL ) then
1991  paramexpr = astNewCONSTi( 0 )
1992  end if
1993  if( astNewARG( proc, paramexpr ) = NULL ) then
1994  exit function
1995  end if
1996 
1997  astAdd( rtlErrorCheck( proc ) )
1998  function = TRUE
1999 end function
2000 
2001 '':::::
2002 function rtlGfxView _
2003  ( _
2004  byval x1expr as ASTNODE ptr, _
2005  byval y1expr as ASTNODE ptr, _
2006  byval x2expr as ASTNODE ptr, _
2007  byval y2expr as ASTNODE ptr, _
2008  byval fillexpr as ASTNODE ptr, _
2009  byval bordexpr as ASTNODE ptr, _
2010  byval screenflag as integer _
2011  ) as integer
2012 
2013  dim as ASTNODE ptr proc = any
2014 
2015  function = FALSE
2016 
2017  proc = astNewCALL( PROCLOOKUP( GFXVIEW ) )
2018 
2019  '' byval x1 as integer
2020  if( x1expr = NULL ) then
2021  x1expr = astNewCONSTi( -32768 )
2022  end if
2023  if( astNewARG( proc, x1expr ) = NULL ) then
2024  exit function
2025  end if
2026 
2027  '' byval y1 as integer
2028  if( y1expr = NULL ) then
2029  y1expr = astNewCONSTi( -32768 )
2030  end if
2031  if( astNewARG( proc, y1expr ) = NULL ) then
2032  exit function
2033  end if
2034 
2035  '' byval x2 as integer
2036  if( x2expr = NULL ) then
2037  x2expr = astNewCONSTi( -32768 )
2038  end if
2039  if( astNewARG( proc, x2expr ) = NULL ) then
2040  exit function
2041  end if
2042 
2043  '' byval y2 as integer
2044  if( y2expr = NULL ) then
2045  y2expr = astNewCONSTi( -32768 )
2046  end if
2047  if( astNewARG( proc, y2expr ) = NULL ) then
2048  exit function
2049  end if
2050 
2051  '' byval fillcolor as uinteger
2052  if( fillexpr = NULL ) then
2053  fillexpr = astNewCONSTi( 0, FB_DATATYPE_UINT )
2054  end if
2055  if( astNewARG( proc, fillexpr ) = NULL ) then
2056  exit function
2057  end if
2058 
2059  '' byval bordercolor as uinteger
2060  if( bordexpr = NULL ) then
2061  bordexpr = astNewCONSTi( 0, FB_DATATYPE_UINT )
2062  end if
2063  if( astNewARG( proc, bordexpr ) = NULL ) then
2064  exit function
2065  end if
2066 
2067  '' byval screenflag as integer
2068  if( astNewARG( proc, astNewCONSTi( screenflag ) ) = NULL ) then
2069  exit function
2070  end if
2071 
2072  ''
2073  astAdd( proc )
2074 
2075  function = TRUE
2076 
2077 end function
2078 
2079 '':::::
2080 function rtlGfxWindow _
2081  ( _
2082  byval x1expr as ASTNODE ptr, _
2083  byval y1expr as ASTNODE ptr, _
2084  byval x2expr as ASTNODE ptr, _
2085  byval y2expr as ASTNODE ptr, _
2086  byval screenflag as integer _
2087  ) as integer
2088 
2089  dim as ASTNODE ptr proc = any
2090 
2091  function = FALSE
2092 
2093  proc = astNewCALL( PROCLOOKUP( GFXWINDOW ) )
2094 
2095  '' byval x1 as single
2096  if( x1expr = NULL ) then
2097  x1expr = astNewCONSTf( 0.0, FB_DATATYPE_SINGLE )
2098  end if
2099  if( astNewARG( proc, x1expr ) = NULL ) then
2100  exit function
2101  end if
2102 
2103  '' byval y1 as single
2104  if( y1expr = NULL ) then
2105  y1expr = astNewCONSTf( 0.0, FB_DATATYPE_SINGLE )
2106  end if
2107  if( astNewARG( proc, y1expr ) = NULL ) then
2108  exit function
2109  end if
2110 
2111  '' byval x2 as single
2112  if( x2expr = NULL ) then
2113  x2expr = astNewCONSTf( 0.0, FB_DATATYPE_SINGLE )
2114  end if
2115  if( astNewARG( proc, x2expr ) = NULL ) then
2116  exit function
2117  end if
2118 
2119  '' byval y2 as single
2120  if( y2expr = NULL ) then
2121  y2expr = astNewCONSTf( 0.0, FB_DATATYPE_SINGLE )
2122  end if
2123  if( astNewARG( proc, y2expr ) = NULL ) then
2124  exit function
2125  end if
2126 
2127  '' byval screenflag as integer
2128  if( astNewARG( proc, astNewCONSTi( screenflag ) ) = NULL ) then
2129  exit function
2130  end if
2131 
2132  ''
2133  astAdd( proc )
2134 
2135  function = TRUE
2136 
2137 end function
2138 
2139 function rtlGfxPalette _
2140  ( _
2141  byval attexpr as ASTNODE ptr, _
2142  byval rexpr as ASTNODE ptr, _
2143  byval gexpr as ASTNODE ptr, _
2144  byval bexpr as ASTNODE ptr, _
2145  byval isget as integer _
2146  ) as integer
2147 
2148  dim as ASTNODE ptr proc = any
2149  dim as FBSYMBOL ptr f = any
2150  dim as integer defval = any, targetmode = any
2151 
2152  function = FALSE
2153 
2154  if( isget ) then
2155  '' Choose one of these two:
2156  ''
2157  '' fb_GfxPaletteGet(): r/g/b BYREF parameters = 32bit integers
2158  '' fb_GfxPaletteGet64(): r/g/b BYREF parameters = 64bit integers
2159  ''
2160  '' There are only these two overloads available, so we can
2161  '' choose one based on the r parameter's type.
2162  ''
2163  '' It probably wouldn't be useful to have overloads where the
2164  '' r/g/b BYREF parameters have mixed types, because who'd use
2165  '' a 32bit r/g and 64bit b, or similar?
2166  if( typeGetSize( astGetDataType( rexpr ) ) = 8 ) then
2167  f = PROCLOOKUP( GFXPALETTEGET64 )
2168  else
2169  f = PROCLOOKUP( GFXPALETTEGET )
2170  end if
2171  targetmode = FB_PARAMMODE_BYREF
2172  defval = 0
2173  else
2174  f = PROCLOOKUP( GFXPALETTE )
2175  targetmode = FB_PARAMMODE_BYVAL
2176  defval = -1
2177  end if
2178 
2179  proc = astNewCALL( f )
2180 
2181  '' byval index as long
2182  if( attexpr = NULL ) then
2183  attexpr = astNewCONSTi( -1 )
2184  end if
2185  if( astNewARG( proc, attexpr ) = NULL ) then
2186  exit function
2187  end if
2188 
2189  '' byval r as long|longint
2190  if( rexpr = NULL ) then
2191  rexpr = astNewCONSTi( -1 )
2192  end if
2193  if( astNewARG( proc, rexpr ) = NULL ) then
2194  exit function
2195  end if
2196 
2197  '' byval g as long|longint
2198  if( gexpr = NULL ) then
2199  targetmode = FB_PARAMMODE_BYVAL
2200  gexpr = astNewCONSTi( defval )
2201  end if
2202  if( astNewARG( proc, gexpr, , targetmode ) = NULL ) then
2203  exit function
2204  end if
2205 
2206  '' byval b as long|longint
2207  if( bexpr = NULL ) then
2208  bexpr = astNewCONSTi( defval )
2209  end if
2210  if( astNewARG( proc, bexpr, , targetmode ) = NULL ) then
2211  exit function
2212  end if
2213 
2214  astAdd( proc )
2215  function = TRUE
2216 end function
2217 
2218 function rtlGfxPaletteUsing _
2219  ( _
2220  byval arrayexpr as ASTNODE ptr, _
2221  byval isptr as integer, _
2222  byval isget as integer _
2223  ) as integer
2224 
2225  dim as ASTNODE ptr proc = any
2226  dim as FBSYMBOL ptr f = any
2227  dim as integer mode = any
2228 
2229  function = FALSE
2230 
2231  if( typeGetSize( astGetDataType( arrayexpr ) ) = 8 ) then
2232  if( isget ) then
2233  f = PROCLOOKUP( GFXPALETTEGETUSING64 )
2234  else
2235  f = PROCLOOKUP( GFXPALETTEUSING64 )
2236  end if
2237  else
2238  if( isget ) then
2239  f = PROCLOOKUP( GFXPALETTEGETUSING )
2240  else
2241  f = PROCLOOKUP( GFXPALETTEUSING )
2242  end if
2243  end if
2244  proc = astNewCALL( f )
2245 
2246  '' byref array as long|longint
2247  mode = iif( isptr, FB_PARAMMODE_BYVAL, INVALID )
2248  if( astNewARG( proc, arrayexpr, , mode ) = NULL ) then
2249  exit function
2250  end if
2251 
2252  astAdd( proc )
2253  function = TRUE
2254 end function
2255 
2256 '':::::
2257 function rtlGfxPut _
2258  ( _
2259  byval target as ASTNODE ptr, _
2260  byval targetisptr as integer, _
2261  byval xexpr as ASTNODE ptr, _
2262  byval yexpr as ASTNODE ptr, _
2263  byval arrayexpr as ASTNODE ptr, _
2264  byval isptr as integer, _
2265  byval x1expr as ASTNODE ptr, _
2266  byval x2expr as ASTNODE ptr, _
2267  byval y1expr as ASTNODE ptr, _
2268  byval y2expr as ASTNODE ptr, _
2269  byval mode as integer, _
2270  byval alphaexpr as ASTNODE ptr, _
2271  byval funcexpr as ASTNODE ptr, _
2272  byval paramexpr as ASTNODE ptr, _
2273  byval coordtype as integer _
2274  ) as integer
2275 
2276  dim as ASTNODE ptr proc = any
2277  dim as integer targetmode = any, argmode = any
2278 
2279  function = FALSE
2280 
2281  proc = astNewCALL( PROCLOOKUP( GFXPUT ) )
2282 
2283  '' byref target as any
2284  if( target = NULL ) then
2285  target = astNewCONSTi( 0 )
2286  targetmode = FB_PARAMMODE_BYVAL
2287  else
2288  if( targetisptr ) then
2289  targetmode = FB_PARAMMODE_BYVAL
2290  else
2291  targetmode = INVALID
2292  end if
2293  end if
2294  if( astNewARG( proc, target, , targetmode ) = NULL ) then
2295  exit function
2296  end if
2297 
2298  '' byval x as single
2299  if( astNewARG( proc, xexpr ) = NULL ) then
2300  exit function
2301  end if
2302 
2303  '' byval y as single
2304  if( astNewARG( proc, yexpr ) = NULL ) then
2305  exit function
2306  end if
2307 
2308  '' byref array as any
2309  if( isptr ) then
2310  argmode = FB_PARAMMODE_BYVAL
2311  else
2312  argmode = INVALID
2313  end if
2314  if( astNewARG( proc, arrayexpr, , argmode ) = NULL ) then
2315  exit function
2316  end if
2317 
2318  '' area coordinates, if any
2319  if( x1expr = NULL ) then
2320  x1expr = astNewCONSTi( &hFFFF0000 )
2321  x2expr = astNewCONSTi( &hFFFF0000 )
2322  y1expr = astNewCONSTi( &hFFFF0000 )
2323  y2expr = astNewCONSTi( &hFFFF0000 )
2324  end if
2325  if( astNewARG( proc, x1expr ) = NULL ) then
2326  exit function
2327  end if
2328  if( astNewARG( proc, x2expr ) = NULL ) then
2329  exit function
2330  end if
2331  if( astNewARG( proc, y1expr ) = NULL ) then
2332  exit function
2333  end if
2334  if( astNewARG( proc, y2expr ) = NULL ) then
2335  exit function
2336  end if
2337 
2338  '' byval coordtype as integer
2339  if( astNewARG( proc, astNewCONSTi( coordtype ) ) = NULL ) then
2340  exit function
2341  end if
2342 
2343  '' byval mode as integer
2344  if( astNewARG( proc, astNewCONSTi( mode ) ) = NULL ) then
2345  exit function
2346  end if
2347 
2348  '' byval putter as integer
2349  if( astNewARG( proc, hGetPutter( mode ) ) = NULL ) then
2350  exit function
2351  end if
2352 
2353  '' byval alpha as integer
2354  if( alphaexpr = NULL ) then
2355  alphaexpr = astNewCONSTi( -1 )
2356  end if
2357  if( astNewARG( proc, alphaexpr ) = NULL ) then
2358  exit function
2359  end if
2360 
2361  '' byval func as function( src as uinteger, dest as uinteger ) as uinteger
2362  if( funcexpr = NULL ) then
2363  funcexpr = astNewCONSTi( 0 )
2364  end if
2365  if( astNewARG( proc, funcexpr ) = NULL ) then
2366  exit function
2367  end if
2368 
2369  '' byval param as any ptr
2370  if( paramexpr = NULL ) then
2371  paramexpr = astNewCONSTi( 0 )
2372  end if
2373  if( astNewARG( proc, paramexpr ) = NULL ) then
2374  exit function
2375  end if
2376 
2377  astAdd( rtlErrorCheck( proc ) )
2378  function = TRUE
2379 end function
2380 
2381 '':::::
2382 function rtlGfxGet _
2383  ( _
2384  byval target as ASTNODE ptr, _
2385  byval targetisptr as integer, _
2386  byval x1expr as ASTNODE ptr, _
2387  byval y1expr as ASTNODE ptr, _
2388  byval x2expr as ASTNODE ptr, _
2389  byval y2expr as ASTNODE ptr, _
2390  byval arrayexpr as ASTNODE ptr, _
2391  byval isptr as integer, _
2392  byval symbol as FBSYMBOL ptr, _
2393  byval coordtype as integer _
2394  ) as integer
2395 
2396  dim as ASTNODE ptr proc = any, descexpr = any
2397  dim as integer targetmode = any, argmode = any
2398 
2399  function = FALSE
2400 
2401  '' use new header in -lang fb, otherwise old header
2402  proc = astNewCALL( iif( fbLangIsSet( FB_LANG_FB ), PROCLOOKUP( GFXGET ), PROCLOOKUP( GFXGETQB ) ) )
2403 
2404  '' byref target as any
2405  if( target = NULL ) then
2406  target = astNewCONSTi( 0 )
2407  targetmode = FB_PARAMMODE_BYVAL
2408  else
2409  if( targetisptr ) then
2410  targetmode = FB_PARAMMODE_BYVAL
2411  else
2412  targetmode = INVALID
2413  end if
2414  end if
2415  if( astNewARG( proc, target, , targetmode ) = NULL ) then
2416  exit function
2417  end if
2418 
2419  '' byval x1 as single
2420  if( astNewARG( proc, x1expr ) = NULL ) then
2421  exit function
2422  end if
2423 
2424  '' byval y1 as single
2425  if( astNewARG( proc, y1expr ) = NULL ) then
2426  exit function
2427  end if
2428 
2429  '' byval x2 as single
2430  if( astNewARG( proc, x2expr ) = NULL ) then
2431  exit function
2432  end if
2433 
2434  '' byval y2 as single
2435  if( astNewARG( proc, y2expr ) = NULL ) then
2436  exit function
2437  end if
2438 
2439  '' byref array as any
2440  if( isptr ) then
2441  argmode = FB_PARAMMODE_BYVAL
2442  descexpr = astNewCONSTi( NULL, typeAddrOf( FB_DATATYPE_VOID ) )
2443  else
2444  argmode = INVALID
2445 
2446  if( astIsFIELD( arrayexpr ) = FALSE ) then
2447  descexpr = astNewVAR( symbol )
2448  else
2449  '' side-effect?
2450  if( astIsClassOnTree( AST_NODECLASS_CALL, arrayexpr ) <> NULL ) then
2451  astAdd( astRemSideFx( arrayexpr ) )
2452  end if
2453 
2454  descexpr = astCloneTree( arrayexpr )
2455  end if
2456  end if
2457 
2458  if( astNewARG( proc, arrayexpr, , argmode ) = NULL ) then
2459  exit function
2460  end if
2461 
2462  '' byval coordtype as integer
2463  if( astNewARG( proc, astNewCONSTi( coordtype ) ) = NULL ) then
2464  exit function
2465  end if
2466 
2467  '' array() as any
2468  if( astNewARG( proc, descexpr, , argmode ) = NULL ) then
2469  exit function
2470  end if
2471 
2472  astAdd( rtlErrorCheck( proc ) )
2473  function = TRUE
2474 end function
2475 
2476 '':::::
2477 function rtlGfxScreenSet _
2478  ( _
2479  byval mexpr as ASTNODE ptr, _
2480  byval dexpr as ASTNODE ptr, _
2481  byval pexpr as ASTNODE ptr, _
2482  byval fexpr as ASTNODE ptr, _
2483  byval rexpr as ASTNODE ptr _
2484  ) as integer
2485 
2486  dim as ASTNODE ptr proc = any
2487 
2488  function = FALSE
2489 
2490  proc = astNewCALL( PROCLOOKUP( GFXSCREENSET ) )
2491 
2492  '' byval m as integer
2493  if( astNewARG( proc, mexpr ) = NULL ) then
2494  exit function
2495  end if
2496 
2497  '' byval d as integer
2498  if( dexpr = NULL ) then
2499  dexpr = astNewCONSTi( 8 )
2500  end if
2501  if( astNewARG( proc, dexpr ) = NULL ) then
2502  exit function
2503  end if
2504 
2505  '' byval depth as integer
2506  if( pexpr = NULL ) then
2507  pexpr = astNewCONSTi( 0 )
2508  end if
2509  if( astNewARG( proc, pexpr ) = NULL ) then
2510  exit function
2511  end if
2512 
2513  '' byval flags as integer
2514  if( fexpr = NULL ) then
2515  fexpr = astNewCONSTi( 0 )
2516  end if
2517  if( astNewARG( proc, fexpr ) = NULL ) then
2518  exit function
2519  end if
2520 
2521  '' byval refresh_rate as integer
2522  if( rexpr = NULL ) then
2523  rexpr = astNewCONSTi( 0 )
2524  end if
2525  if( astNewARG( proc, rexpr ) = NULL ) then
2526  exit function
2527  end if
2528 
2529  astAdd( rtlErrorCheck( proc ) )
2530  function = TRUE
2531 end function
2532 
2533 '':::::
2534 function rtlGfxScreenSetQB _
2535  ( _
2536  byval mode as ASTNODE ptr, _
2537  byval active as ASTNODE ptr, _
2538  byval visible as ASTNODE ptr _
2539  ) as integer
2540 
2541  dim as ASTNODE ptr proc = any
2542 
2543  function = FALSE
2544 
2545  proc = astNewCALL( PROCLOOKUP( GFXSCREENSETQB ) )
2546 
2547  '' byval mode as integer
2548  if( astNewARG( proc, mode ) = NULL ) then
2549  exit function
2550  end if
2551 
2552  '' byval active as integer
2553  if( active = NULL ) then
2554  active = astNewCONSTi( -1 )
2555  end if
2556  if( astNewARG( proc, active ) = NULL ) then
2557  exit function
2558  end if
2559 
2560  '' byval visible as integer
2561  if( visible = NULL ) then
2562  visible = astNewCONSTi( -1 )
2563  end if
2564  if( astNewARG( proc, visible ) = NULL ) then
2565  exit function
2566  end if
2567 
2568  astAdd( rtlErrorCheck( proc ) )
2569  function = TRUE
2570 end function
2571 
2572 '':::::
2573 function rtlGfxImageCreate _
2574  ( _
2575  byval wexpr as ASTNODE ptr, _
2576  byval hexpr as ASTNODE ptr, _
2577  byval cexpr as ASTNODE ptr, _
2578  byval dexpr as ASTNODE ptr, _
2579  byval flags as integer _
2580  ) as ASTNODE ptr
2581 
2582  dim as ASTNODE ptr proc = any
2583 
2584  function = NULL
2585 
2586  '' use new header in -lang fb, otherwise old header
2587  proc = astNewCALL( iif( fbLangIsSet( FB_LANG_FB ), PROCLOOKUP( GFXIMAGECREATE ), PROCLOOKUP( GFXIMAGECREATEQB ) ) )
2588 
2589  '' byval w as integer
2590  if( astNewARG( proc, wexpr ) = NULL ) then
2591  exit function
2592  end if
2593 
2594  '' byval h as integer
2595  if( astNewARG( proc, hexpr ) = NULL ) then
2596  exit function
2597  end if
2598 
2599  '' byval c as integer
2600  if( cexpr = NULL ) then
2601  cexpr = astNewCONSTi( 0 )
2602  end if
2603  if( astNewARG( proc, cexpr ) = NULL ) then
2604  exit function
2605  end if
2606 
2607  '' byval d as integer
2608  if( dexpr = NULL ) then
2609  dexpr = astNewCONSTi( 0 )
2610  end if
2611  if( astNewARG( proc, dexpr ) = NULL ) then
2612  exit function
2613  end if
2614 
2615  '' byval flags as integer
2616  if( astNewARG( proc, astNewCONSTi( flags ) ) = NULL ) then
2617  exit function
2618  end if
2619 
2620  function = proc
2621 
2622 end function
2623