fxruby 1.6.29 → 1.6.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/History.txt +12 -1
  3. data/Manifest.txt +5 -0
  4. data/Rakefile +8 -2
  5. data/examples/gltest.rb +0 -7
  6. data/examples/groupbox.rb +5 -3
  7. data/examples/thread.rb +55 -0
  8. data/ext/fox16_c/FXRbApp.cpp +67 -5
  9. data/ext/fox16_c/FXRuby.cpp +142 -110
  10. data/ext/fox16_c/extconf.rb +36 -28
  11. data/ext/fox16_c/gvl_wrappers.cpp +12 -0
  12. data/ext/fox16_c/include/FXRbApp.h +41 -6
  13. data/ext/fox16_c/include/FXRbBitmap.h +12 -12
  14. data/ext/fox16_c/include/FXRbCommon.h +3 -0
  15. data/ext/fox16_c/include/FXRbCursor.h +2 -2
  16. data/ext/fox16_c/include/FXRbDC.h +62 -62
  17. data/ext/fox16_c/include/FXRbDialogBox.h +2 -2
  18. data/ext/fox16_c/include/FXRbDockBar.h +3 -3
  19. data/ext/fox16_c/include/FXRbDockSite.h +4 -4
  20. data/ext/fox16_c/include/FXRbDrawable.h +1 -1
  21. data/ext/fox16_c/include/FXRbFileDict.h +3 -3
  22. data/ext/fox16_c/include/FXRbFoldingList.h +28 -28
  23. data/ext/fox16_c/include/FXRbFont.h +18 -18
  24. data/ext/fox16_c/include/FXRbGLCanvas.h +4 -4
  25. data/ext/fox16_c/include/FXRbGLObject.h +8 -8
  26. data/ext/fox16_c/include/FXRbGLShape.h +1 -1
  27. data/ext/fox16_c/include/FXRbGLViewer.h +3 -3
  28. data/ext/fox16_c/include/FXRbHeader.h +7 -7
  29. data/ext/fox16_c/include/FXRbIconList.h +28 -28
  30. data/ext/fox16_c/include/FXRbIconSource.h +12 -12
  31. data/ext/fox16_c/include/FXRbId.h +3 -3
  32. data/ext/fox16_c/include/FXRbImage.h +19 -19
  33. data/ext/fox16_c/include/FXRbList.h +21 -21
  34. data/ext/fox16_c/include/FXRbListBox.h +1 -1
  35. data/ext/fox16_c/include/FXRbMDIChild.h +4 -4
  36. data/ext/fox16_c/include/FXRbMDIClient.h +4 -4
  37. data/ext/fox16_c/include/FXRbObject.h +2 -2
  38. data/ext/fox16_c/include/FXRbPopup.h +2 -2
  39. data/ext/fox16_c/include/FXRbRealSpinner.h +1 -1
  40. data/ext/fox16_c/include/FXRbScrollArea.h +4 -4
  41. data/ext/fox16_c/include/FXRbShutter.h +1 -1
  42. data/ext/fox16_c/include/FXRbSpinner.h +1 -1
  43. data/ext/fox16_c/include/FXRbStream.h +3 -3
  44. data/ext/fox16_c/include/FXRbTabBar.h +1 -1
  45. data/ext/fox16_c/include/FXRbTable.h +53 -53
  46. data/ext/fox16_c/include/FXRbText.h +23 -23
  47. data/ext/fox16_c/include/FXRbTopWindow.h +5 -5
  48. data/ext/fox16_c/include/FXRbTranslator.h +1 -1
  49. data/ext/fox16_c/include/FXRbTreeList.h +28 -28
  50. data/ext/fox16_c/include/FXRbTreeListBox.h +1 -1
  51. data/ext/fox16_c/include/FXRbWindow.h +31 -31
  52. data/ext/fox16_c/include/FXRuby.h +200 -94
  53. data/ext/fox16_c/include/gvl_wrappers.h +594 -0
  54. data/lib/fox16.rb +1 -0
  55. data/lib/fox16/thread.rb +51 -0
  56. data/lib/fox16/version.rb +1 -1
  57. data/rdoc-sources/FXApp.rb +5 -0
  58. data/rdoc-sources/FXId.rb +5 -0
  59. data/swig-interfaces/FXApp.i +14 -78
  60. data/swig-interfaces/macros.i +56 -0
  61. data/test/TC_FXApp.rb +60 -10
  62. data/test/TC_FXJPGImage.rb +47 -0
  63. metadata +24 -103
  64. checksums.yaml.gz.sig +0 -0
  65. data.tar.gz.sig +0 -0
  66. metadata.gz.sig +0 -0
@@ -0,0 +1,594 @@
1
+ /*
2
+ * gvl_wrappers.h - Wrapper functions for locking/unlocking the Ruby GVL
3
+ *
4
+ * These are some obscure preprocessor directives that allow to generate
5
+ * drop-in replacement wrapper functions in a declarative manner.
6
+ * These wrapper functions ensure that ruby's GVL is released on each
7
+ * function call and reacquired at the end of the call or in callbacks.
8
+ * This way blocking functions calls don't block concurrent ruby threads.
9
+ *
10
+ * The wrapper of each function is prefixed by "gvl_".
11
+ *
12
+ * Use "gcc -E" to retrieve the generated code.
13
+ */
14
+
15
+ #ifndef __gvl_wrappers_h
16
+ #define __gvl_wrappers_h
17
+
18
+ extern "C" {
19
+ #if defined(HAVE_RB_THREAD_CALL_WITH_GVL)
20
+ extern void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
21
+ #endif
22
+
23
+ #if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
24
+ extern "C" void *rb_thread_call_without_gvl(void *(*func)(void *), void *data1,
25
+ rb_unblock_function_t *ubf, void *data2);
26
+ #endif
27
+ }
28
+
29
+ void fxrb_wakeup_fox(void *);
30
+
31
+ #define DEFINE_PARAM_LIST1(type, ref, name) \
32
+ , name
33
+
34
+ #define DEFINE_PARAM_LIST2(type, ref, name) \
35
+ , p->params.name
36
+
37
+ #define DEFINE_PARAM_LIST3(type, ref, name) \
38
+ , type ref name
39
+
40
+ #define DEFINE_PARAM_LIST4(type, ref, name) \
41
+ , typename type
42
+
43
+ #define DEFINE_PARAM_LIST5(type, ref, name) \
44
+ , type
45
+
46
+ #define DEFINE_PARAM_DECL(type, ref, name) \
47
+ type ref name;
48
+
49
+ #define DEFINE_GVL_WRAPPER_STRUCT(klass, name, baseclass, when_non_void, rettype, firstparamtype, firstparamname) \
50
+ struct gvl_wrapper_##klass##_##name##_params { \
51
+ struct { \
52
+ firstparamtype firstparamname; \
53
+ FOR_EACH_PARAM_OF_##baseclass##_##name(DEFINE_PARAM_DECL) \
54
+ } params; \
55
+ when_non_void( rettype retval; ) \
56
+ };
57
+
58
+ extern __thread int g_fxrb_thread_has_gvl;
59
+
60
+ #define DEFINE_GVL_SKELETON(klass, name, baseclass, when_non_void, rettype, firstparamtype, firstparamname) \
61
+ static void * gvl_##klass##_##name##_skeleton( void *data ){ \
62
+ struct gvl_wrapper_##klass##_##name##_params *p = (struct gvl_wrapper_##klass##_##name##_params*)data; \
63
+ g_fxrb_thread_has_gvl = 0; \
64
+ when_non_void( p->retval = ) \
65
+ klass##_##name##_gvl( p->params.firstparamname FOR_EACH_PARAM_OF_##baseclass##_##name(DEFINE_PARAM_LIST2) ); \
66
+ g_fxrb_thread_has_gvl = 1; \
67
+ return NULL; \
68
+ }
69
+
70
+ #if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
71
+ #define DEFINE_GVL_STUB(klass, name, baseclass, when_non_void, rettype, firstparamtype, firstparamname) \
72
+ rettype klass##_##name(firstparamtype firstparamname FOR_EACH_PARAM_OF_##baseclass##_##name(DEFINE_PARAM_LIST3)){ \
73
+ struct gvl_wrapper_##klass##_##name##_params params = { \
74
+ {firstparamname FOR_EACH_PARAM_OF_##baseclass##_##name(DEFINE_PARAM_LIST1)}, when_non_void((rettype)0) \
75
+ }; \
76
+ rb_thread_call_without_gvl(gvl_##klass##_##name##_skeleton, &params, fxrb_wakeup_fox, 0); \
77
+ when_non_void( return params.retval; ) \
78
+ }
79
+ #else
80
+ #define DEFINE_GVL_STUB(klass, name, baseclass, when_non_void, rettype, firstparamtype, firstparamname) \
81
+ rettype klass##_##name(firstparamtype firstparamname FOR_EACH_PARAM_OF_##baseclass##_##name(DEFINE_PARAM_LIST3)){ \
82
+ return klass##_##name##_gvl(firstparamname FOR_EACH_PARAM_OF_##baseclass##_##name(DEFINE_PARAM_LIST1)); \
83
+ }
84
+ #endif
85
+
86
+ #define DEFINE_GVL_STUB_DECL(klass, name, baseclass, when_non_void, rettype, firstparamtype, firstparamname) \
87
+ rettype klass##_##name( firstparamtype firstparamname FOR_EACH_PARAM_OF_##baseclass##_##name(DEFINE_PARAM_LIST3));
88
+
89
+
90
+
91
+ #define DEFINE_GVLCB_WRAPPER_STRUCT(name, when_non_void, rettype, firstparamtype, firstparamname, paramcount) \
92
+ template<typename firstparamtype FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST4)> \
93
+ struct gvl_wrapper_##name##_##paramcount##_params { \
94
+ struct { \
95
+ firstparamtype firstparamname; \
96
+ FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_DECL) \
97
+ } params; \
98
+ when_non_void( rettype retval; ) \
99
+ };
100
+
101
+ #define DEFINE_GVLCB_STUB_DECL(name, when_non_void, rettype, firstparamtype, firstparamname, paramcount) \
102
+ template<typename firstparamtype FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST4)> \
103
+ rettype name( firstparamtype firstparamname FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST3));
104
+
105
+ #define DEFINE_GVLCB_SKELETON(name, when_non_void, rettype, firstparamtype, firstparamname, paramcount) \
106
+ template<typename firstparamtype FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST4)> \
107
+ static void * gvl_##name##_##paramcount##_skeleton( void *data ){ \
108
+ struct gvl_wrapper_##name##_##paramcount##_params<firstparamtype FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST5)> *p = \
109
+ (struct gvl_wrapper_##name##_##paramcount##_params<firstparamtype FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST5)>*)data; \
110
+ when_non_void( p->retval = ) \
111
+ name##_gvlcb( p->params.firstparamname FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST2) ); \
112
+ return NULL; \
113
+ }
114
+
115
+ #if defined(HAVE_RB_THREAD_CALL_WITH_GVL)
116
+ #define DEFINE_GVLCB_STUB(name, when_non_void, rettype, firstparamtype, firstparamname, paramcount) \
117
+ template<typename firstparamtype FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST4)> \
118
+ rettype name(firstparamtype firstparamname FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST3)){ \
119
+ if( g_fxrb_thread_has_gvl ){ \
120
+ return name##_gvlcb( firstparamname FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST1) ); \
121
+ } else { \
122
+ struct gvl_wrapper_##name##_##paramcount##_params<firstparamtype FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST5)> params = { \
123
+ {firstparamname FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST1)} \
124
+ }; \
125
+ g_fxrb_thread_has_gvl = 1; \
126
+ rb_thread_call_with_gvl(gvl_##name##_##paramcount##_skeleton<firstparamtype FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST5)>, &params); \
127
+ g_fxrb_thread_has_gvl = 0; \
128
+ when_non_void( return params.retval; ) \
129
+ } \
130
+ }
131
+ #else
132
+ #define DEFINE_GVLCB_STUB(name, when_non_void, rettype, firstparamtype, firstparamname, paramcount) \
133
+ template<typename firstparamtype FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST4)> \
134
+ rettype name(firstparamtype firstparamname FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST3)){ \
135
+ return name##_gvlcb( firstparamname FOR_EACH_PARAM_OF_##name##_##paramcount(DEFINE_PARAM_LIST1) ); \
136
+ }
137
+ #endif
138
+
139
+ #define GVL_TYPE_VOID(string)
140
+ #define GVL_TYPE_NONVOID(string) string
141
+
142
+
143
+ /*
144
+ * Definitions of blocking functions and their parameters
145
+ */
146
+
147
+ #define FOR_EACH_PARAM_OF_FXImage_loadPixels(param) \
148
+ param(FXStream, &, store)
149
+ #define FOR_EACH_PARAM_OF_FXImage_savePixels(param) \
150
+ param(FXStream, &, store)
151
+
152
+ #define FOR_EACH_PARAM_OF_FXDialogBox_execute(param) \
153
+ param(FXuint, , placement)
154
+
155
+ #define FOR_EACH_PARAM_OF_FXApp_run(param)
156
+
157
+ #define FOR_EACH_PARAM_OF_FXApp_runOneEvent(param) \
158
+ param(bool, , blocking)
159
+
160
+ #define FOR_EACH_PARAM_OF_FXApp_runUntil(param) \
161
+ param(FXuint, &, condition)
162
+
163
+ #define FOR_EACH_PARAM_OF_FXApp_runWhileEvents(param)
164
+
165
+ #define FOR_EACH_PARAM_OF_FXApp_runModalWhileEvents(param) \
166
+ param(FXWindow*, , window)
167
+
168
+ #define FOR_EACH_PARAM_OF_FXApp_runModal(param)
169
+
170
+ #define FOR_EACH_PARAM_OF_FXApp_runModalFor(param) \
171
+ param(FXWindow*, , window)
172
+
173
+ #define FOR_EACH_PARAM_OF_FXApp_runModalWhileShown(param) \
174
+ param(FXWindow*, , window)
175
+
176
+ #define FOR_EACH_PARAM_OF_FXApp_runPopup(param) \
177
+ param(FXWindow*, , owner)
178
+
179
+
180
+
181
+ /* function( class, name, baseclass, void_or_nonvoid, returntype, firstparamtype, firstparamname ) */
182
+ #define FOR_EACH_BLOCKING_FUNCTION(function) \
183
+ function(FXImage, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXImage *, self) \
184
+ function(FXImage, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXImage *, self) \
185
+ function(FXBMPImage, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXBMPImage *, self) \
186
+ function(FXBMPImage, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXBMPImage *, self) \
187
+ function(FXJPGImage, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXJPGImage *, self) \
188
+ function(FXJPGImage, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXJPGImage *, self) \
189
+ function(FXGIFImage, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXGIFImage *, self) \
190
+ function(FXGIFImage, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXGIFImage *, self) \
191
+ function(FXICOImage, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXICOImage *, self) \
192
+ function(FXICOImage, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXICOImage *, self) \
193
+ function(FXPNGImage, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXPNGImage *, self) \
194
+ function(FXPNGImage, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXPNGImage *, self) \
195
+ function(FXPPMImage, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXPPMImage *, self) \
196
+ function(FXPPMImage, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXPPMImage *, self) \
197
+ function(FXPCXImage, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXPCXImage *, self) \
198
+ function(FXPCXImage, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXPCXImage *, self) \
199
+ function(FXRGBImage, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXRGBImage *, self) \
200
+ function(FXRGBImage, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXRGBImage *, self) \
201
+ function(FXTGAImage, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXTGAImage *, self) \
202
+ function(FXTGAImage, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXTGAImage *, self) \
203
+ function(FXTIFImage, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXTIFImage *, self) \
204
+ function(FXTIFImage, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXTIFImage *, self) \
205
+ function(FXXBMImage, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXXBMImage *, self) \
206
+ function(FXXBMImage, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXXBMImage *, self) \
207
+ function(FXXPMImage, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXXPMImage *, self) \
208
+ function(FXXPMImage, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXXPMImage *, self) \
209
+ function(FXIcon, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXIcon *, self) \
210
+ function(FXIcon, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXIcon *, self) \
211
+ function(FXBMPIcon, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXBMPIcon *, self) \
212
+ function(FXBMPIcon, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXBMPIcon *, self) \
213
+ function(FXJPGIcon, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXJPGIcon *, self) \
214
+ function(FXJPGIcon, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXJPGIcon *, self) \
215
+ function(FXGIFIcon, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXGIFIcon *, self) \
216
+ function(FXGIFIcon, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXGIFIcon *, self) \
217
+ function(FXICOIcon, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXICOIcon *, self) \
218
+ function(FXICOIcon, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXICOIcon *, self) \
219
+ function(FXPNGIcon, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXPNGIcon *, self) \
220
+ function(FXPNGIcon, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXPNGIcon *, self) \
221
+ function(FXPPMIcon, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXPPMIcon *, self) \
222
+ function(FXPPMIcon, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXPPMIcon *, self) \
223
+ function(FXPCXIcon, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXPCXIcon *, self) \
224
+ function(FXPCXIcon, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXPCXIcon *, self) \
225
+ function(FXRGBIcon, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXRGBIcon *, self) \
226
+ function(FXRGBIcon, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXRGBIcon *, self) \
227
+ function(FXTGAIcon, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXTGAIcon *, self) \
228
+ function(FXTGAIcon, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXTGAIcon *, self) \
229
+ function(FXTIFIcon, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXTIFIcon *, self) \
230
+ function(FXTIFIcon, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXTIFIcon *, self) \
231
+ function(FXXBMIcon, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXXBMIcon *, self) \
232
+ function(FXXBMIcon, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXXBMIcon *, self) \
233
+ function(FXXPMIcon, loadPixels, FXImage, GVL_TYPE_NONVOID, bool, FXXPMIcon *, self) \
234
+ function(FXXPMIcon, savePixels, FXImage, GVL_TYPE_NONVOID, bool, const FXXPMIcon *, self) \
235
+ function(FXChoiceBox, execute, FXDialogBox, GVL_TYPE_NONVOID, FXuint, FXChoiceBox *, self) \
236
+ function(FXColorDialog, execute, FXDialogBox, GVL_TYPE_NONVOID, FXuint, FXColorDialog *, self) \
237
+ function(FXDialogBox, execute, FXDialogBox, GVL_TYPE_NONVOID, FXuint, FXDialogBox *, self) \
238
+ function(FXDirDialog, execute, FXDialogBox, GVL_TYPE_NONVOID, FXuint, FXDirDialog *, self) \
239
+ function(FXFileDialog, execute, FXDialogBox, GVL_TYPE_NONVOID, FXuint, FXFileDialog *, self) \
240
+ function(FXFontDialog, execute, FXDialogBox, GVL_TYPE_NONVOID, FXuint, FXFontDialog *, self) \
241
+ function(FXInputDialog, execute, FXDialogBox, GVL_TYPE_NONVOID, FXuint, FXInputDialog *, self) \
242
+ function(FXMessageBox, execute, FXDialogBox, GVL_TYPE_NONVOID, FXuint, FXMessageBox *, self) \
243
+ function(FXPrintDialog, execute, FXDialogBox, GVL_TYPE_NONVOID, FXuint, FXPrintDialog *, self) \
244
+ function(FXProgressDialog, execute, FXDialogBox, GVL_TYPE_NONVOID, FXuint, FXProgressDialog *, self) \
245
+ function(FXReplaceDialog, execute, FXDialogBox, GVL_TYPE_NONVOID, FXuint, FXReplaceDialog *, self) \
246
+ function(FXSearchDialog, execute, FXDialogBox, GVL_TYPE_NONVOID, FXuint, FXSearchDialog *, self) \
247
+ function(FXWizard, execute, FXDialogBox, GVL_TYPE_NONVOID, FXuint, FXWizard *, self) \
248
+ function(FXApp, run, FXApp, GVL_TYPE_NONVOID, FXint, FXApp *, self) \
249
+ function(FXApp, runOneEvent, FXApp, GVL_TYPE_NONVOID, bool, FXApp *, self) \
250
+ function(FXApp, runUntil, FXApp, GVL_TYPE_NONVOID, FXint, FXApp *, self) \
251
+ function(FXApp, runWhileEvents, FXApp, GVL_TYPE_NONVOID, FXint, FXApp *, self) \
252
+ function(FXApp, runModalWhileEvents, FXApp, GVL_TYPE_NONVOID, FXint, FXApp *, self) \
253
+ function(FXApp, runModal, FXApp, GVL_TYPE_NONVOID, FXint, FXApp *, self) \
254
+ function(FXApp, runModalFor, FXApp, GVL_TYPE_NONVOID, FXint, FXApp *, self) \
255
+ function(FXApp, runModalWhileShown, FXApp, GVL_TYPE_NONVOID, FXint, FXApp *, self) \
256
+ function(FXApp, runPopup, FXApp, GVL_TYPE_NONVOID, FXint, FXApp *, self) \
257
+
258
+
259
+
260
+ FOR_EACH_BLOCKING_FUNCTION( DEFINE_GVL_STUB_DECL )
261
+
262
+ /*
263
+ * Definitions of callback functions and their parameters
264
+ */
265
+
266
+ #define FOR_EACH_PARAM_OF_FXRbCallVoidMethod_2(param) \
267
+ param(ID, , func)
268
+
269
+ #define FOR_EACH_PARAM_OF_FXRbCallVoidMethod_3(param) \
270
+ param(ID, , func) \
271
+ param(TYPE1, &, arg1)
272
+
273
+ #define FOR_EACH_PARAM_OF_FXRbCallVoidMethod_4(param) \
274
+ param(ID, , func) \
275
+ param(TYPE1, , arg1) \
276
+ param(TYPE2, , arg2)
277
+
278
+ #define FOR_EACH_PARAM_OF_FXRbCallVoidMethod_5(param) \
279
+ param(ID, , func) \
280
+ param(TYPE1, , arg1) \
281
+ param(TYPE2, , arg2) \
282
+ param(TYPE3, , arg3)
283
+
284
+ #define FOR_EACH_PARAM_OF_FXRbCallVoidMethod_6(param) \
285
+ param(ID, , func) \
286
+ param(TYPE1, , arg1) \
287
+ param(TYPE2, , arg2) \
288
+ param(TYPE3, , arg3) \
289
+ param(TYPE4, , arg4)
290
+
291
+ #define FOR_EACH_PARAM_OF_FXRbCallVoidMethod_7(param) \
292
+ param(ID, , func) \
293
+ param(TYPE1, &, arg1) \
294
+ param(TYPE2, , arg2) \
295
+ param(TYPE3, , arg3) \
296
+ param(TYPE4, , arg4) \
297
+ param(TYPE5, , arg5)
298
+
299
+ #define FOR_EACH_PARAM_OF_FXRbCallVoidMethod_8(param) \
300
+ param(ID, , func) \
301
+ param(TYPE1, , arg1) \
302
+ param(TYPE2, &, arg2) \
303
+ param(TYPE3, , arg3) \
304
+ param(TYPE4, , arg4) \
305
+ param(TYPE5, , arg5) \
306
+ param(TYPE6, , arg6)
307
+
308
+ #define FOR_EACH_PARAM_OF_FXRbCallVoidMethod_9(param) \
309
+ param(ID, , func) \
310
+ param(TYPE1, , arg1) \
311
+ param(TYPE2, , arg2) \
312
+ param(TYPE3, , arg3) \
313
+ param(TYPE4, , arg4) \
314
+ param(TYPE5, , arg5) \
315
+ param(TYPE6, , arg6) \
316
+ param(TYPE7, , arg7)
317
+
318
+ #define FOR_EACH_PARAM_OF_FXRbCallVoidMethod_11(param) \
319
+ param(ID, , func) \
320
+ param(TYPE1, , arg1) \
321
+ param(TYPE2, , arg2) \
322
+ param(TYPE3, , arg3) \
323
+ param(TYPE4, , arg4) \
324
+ param(TYPE5, , arg5) \
325
+ param(TYPE6, , arg6) \
326
+ param(TYPE7, , arg7) \
327
+ param(TYPE8, , arg8) \
328
+ param(TYPE9, , arg9)
329
+
330
+ #define FOR_EACH_PARAM_OF_FXRbCallBoolMethod_2(param) \
331
+ param(ID, , func)
332
+
333
+ #define FOR_EACH_PARAM_OF_FXRbCallBoolMethod_3(param) \
334
+ param(ID, , func) \
335
+ param(TYPE1, &, arg1)
336
+
337
+ #define FOR_EACH_PARAM_OF_FXRbCallBoolMethod_4(param) \
338
+ param(ID, , func) \
339
+ param(TYPE1, , arg1) \
340
+ param(TYPE2, , arg2)
341
+
342
+ #define FOR_EACH_PARAM_OF_FXRbCallBoolMethod_5(param) \
343
+ param(ID, , func) \
344
+ param(TYPE1, , arg1) \
345
+ param(TYPE2, , arg2) \
346
+ param(TYPE3, , arg3)
347
+
348
+ #define FOR_EACH_PARAM_OF_FXRbCallBoolMethod_7(param) \
349
+ param(ID, , func) \
350
+ param(TYPE1, , arg1) \
351
+ param(TYPE2, , arg2) \
352
+ param(TYPE3, , arg3) \
353
+ param(TYPE4, , arg4) \
354
+ param(TYPE5, , arg5)
355
+
356
+ #define FOR_EACH_PARAM_OF_FXRbCallIntMethod_2(param) \
357
+ param(ID, , func)
358
+
359
+ #define FOR_EACH_PARAM_OF_FXRbCallIntMethod_3(param) \
360
+ param(ID, , func) \
361
+ param(TYPE1, , arg1)
362
+
363
+ #define FOR_EACH_PARAM_OF_FXRbCallIntMethod_4(param) \
364
+ param(ID, , func) \
365
+ param(TYPE1, , arg1) \
366
+ param(TYPE2, , arg2)
367
+
368
+ #define FOR_EACH_PARAM_OF_FXRbCallIntMethod_7(param) \
369
+ param(ID, , func) \
370
+ param(TYPE1, , arg1) \
371
+ param(TYPE2, , arg2) \
372
+ param(TYPE3, , arg3) \
373
+ param(TYPE4, , arg4) \
374
+ param(TYPE5, , arg5)
375
+
376
+ #define FOR_EACH_PARAM_OF_FXRbCallLongMethod_5(param) \
377
+ param(ID, , func) \
378
+ param(TYPE1, , arg1) \
379
+ param(TYPE2, , arg2) \
380
+ param(TYPE3, , arg3)
381
+
382
+ #define FOR_EACH_PARAM_OF_FXRbCallUIntMethod_3(param) \
383
+ param(ID, , func) \
384
+ param(TYPE1, , arg1)
385
+
386
+ #define FOR_EACH_PARAM_OF_FXRbCallGLObjectMethod_2(param) \
387
+ param(ID, , func)
388
+
389
+ #define FOR_EACH_PARAM_OF_FXRbCallGLObjectMethod_3(param) \
390
+ param(ID, , func) \
391
+ param(TYPE1, , arg1)
392
+
393
+ #define FOR_EACH_PARAM_OF_FXRbCallGLObjectMethod_4(param) \
394
+ param(ID, , func) \
395
+ param(TYPE1, , arg1) \
396
+ param(TYPE2, , arg2)
397
+
398
+ #define FOR_EACH_PARAM_OF_FXRbCallStringMethod_2(param) \
399
+ param(ID, , func)
400
+
401
+ #define FOR_EACH_PARAM_OF_FXRbCallCStringMethod_4(param) \
402
+ param(ID, , func) \
403
+ param(TYPE1, , arg1) \
404
+ param(TYPE2, , arg2)
405
+
406
+ #define FOR_EACH_PARAM_OF_FXRbCallCStringMethod_5(param) \
407
+ param(ID, , func) \
408
+ param(TYPE1, , arg1) \
409
+ param(TYPE2, , arg2) \
410
+ param(TYPE3, , arg3)
411
+
412
+ #define FOR_EACH_PARAM_OF_FXRbCallGLObjectArrayMethod_6(param) \
413
+ param(ID, , func) \
414
+ param(TYPE1, , arg1) \
415
+ param(TYPE2, , arg2) \
416
+ param(TYPE3, , arg3) \
417
+ param(TYPE4, , arg4)
418
+
419
+ #define FOR_EACH_PARAM_OF_FXRbCallTableItemMethod_5(param) \
420
+ param(ID, , func) \
421
+ param(TYPE1, , arg1) \
422
+ param(TYPE2, , arg2) \
423
+ param(TYPE3, , arg3)
424
+
425
+ #define FOR_EACH_PARAM_OF_FXRbCallFileAssocMethod_3(param) \
426
+ param(ID, , func) \
427
+ param(TYPE1, , arg1)
428
+
429
+ #define FOR_EACH_PARAM_OF_FXRbCallIconMethod_2(param) \
430
+ param(ID, , func)
431
+
432
+ #define FOR_EACH_PARAM_OF_FXRbCallIconMethod_4(param) \
433
+ param(ID, , func) \
434
+ param(TYPE1, &, arg1) \
435
+ param(TYPE2, &, arg2)
436
+
437
+ #define FOR_EACH_PARAM_OF_FXRbCallIconMethod_6(param) \
438
+ param(ID, , func) \
439
+ param(TYPE1, &, arg1) \
440
+ param(TYPE2, &, arg2) \
441
+ param(TYPE3, &, arg3) \
442
+ param(TYPE4, &, arg4)
443
+
444
+ #define FOR_EACH_PARAM_OF_FXRbCallImageMethod_4(param) \
445
+ param(ID, , func) \
446
+ param(TYPE1, &, arg1) \
447
+ param(TYPE2, &, arg2)
448
+
449
+ #define FOR_EACH_PARAM_OF_FXRbCallImageMethod_6(param) \
450
+ param(ID, , func) \
451
+ param(TYPE1, &, arg1) \
452
+ param(TYPE2, &, arg2) \
453
+ param(TYPE3, &, arg3) \
454
+ param(TYPE4, &, arg4)
455
+
456
+ #define FOR_EACH_PARAM_OF_FXRbCallWindowMethod_3(param) \
457
+ param(ID, , func) \
458
+ param(TYPE1, , arg1)
459
+
460
+ #define FOR_EACH_PARAM_OF_FXRbCallColorMethod_4(param) \
461
+ param(ID, , func) \
462
+ param(TYPE1, , arg1) \
463
+ param(TYPE2, , arg2)
464
+
465
+ #define FOR_EACH_PARAM_OF_FXRbCallRangeMethod_2(param) \
466
+ param(ID, , func)
467
+
468
+ #define FOR_EACH_PARAM_OF_FXRbCallWCharMethod_2(param) \
469
+ param(ID, , func)
470
+
471
+ #define FOR_EACH_PARAM_OF_FXRbCallSetDashes_5(param) \
472
+ param(ID, , func) \
473
+ param(TYPE1, , arg1) \
474
+ param(TYPE2, , arg2) \
475
+ param(TYPE3, , arg3)
476
+
477
+ #define FOR_EACH_PARAM_OF_FXRbLookupHandler_2(param) \
478
+ param(ITEMB, , itemb)
479
+
480
+ #define FOR_EACH_PARAM_OF_FXRbHandleMessage_5(param) \
481
+ param(ID, , func) \
482
+ param(TYPE1, , arg1) \
483
+ param(TYPE2, , arg2) \
484
+ param(TYPE3, , arg3)
485
+
486
+ #define FOR_EACH_PARAM_OF_FXRbComboBox_sortFunc_2(param) \
487
+ param(ITEMB, , itemb)
488
+
489
+ #define FOR_EACH_PARAM_OF_FXRbFoldingList_sortFunc_2(param) \
490
+ param(ITEMB, , itemb)
491
+
492
+ #define FOR_EACH_PARAM_OF_FXRbIconList_sortFunc_2(param) \
493
+ param(ITEMB, , itemb)
494
+
495
+ #define FOR_EACH_PARAM_OF_FXRbList_sortFunc_2(param) \
496
+ param(ITEMB, , itemb)
497
+
498
+ #define FOR_EACH_PARAM_OF_FXRbListBox_sortFunc_2(param) \
499
+ param(ITEMB, , itemb)
500
+
501
+ #define FOR_EACH_PARAM_OF_FXRbTreeList_sortFunc_2(param) \
502
+ param(ITEMB, , itemb)
503
+
504
+ #define FOR_EACH_PARAM_OF_FXRbCallDCDrawMethod_5(param) \
505
+ param(ID, , func) \
506
+ param(TYPE1, , arg1) \
507
+ param(TYPE2, , arg2) \
508
+ param(TYPE3, &, arg3)
509
+
510
+ #define FOR_EACH_PARAM_OF_FXRbCallDCDrawMethod_6(param) \
511
+ param(ID, , func) \
512
+ param(TYPE1, , arg1) \
513
+ param(TYPE2, , arg2) \
514
+ param(TYPE3, , arg3) \
515
+ param(TYPE4, , arg4)
516
+
517
+ #define FOR_EACH_PARAM_OF_FXRbCallTreeItemMethod_4(param) \
518
+ param(ID, , func) \
519
+ param(TYPE1, , arg1) \
520
+ param(TYPE2, , arg2)
521
+
522
+ #define FOR_EACH_PARAM_OF_FXRbCallFoldingItemMethod_4(param) \
523
+ param(ID, , func) \
524
+ param(TYPE1, , arg1) \
525
+ param(TYPE2, , arg2)
526
+
527
+ #define FOR_EACH_PARAM_OF_FXRbApp_onChoreThreads_4(param) \
528
+ param(ID, , func) \
529
+ param(TYPE1, , arg1) \
530
+ param(TYPE2, , arg2)
531
+
532
+
533
+ /* function( name, void_or_nonvoid, returntype, firstparamtype, firstparamname, paramcount ) */
534
+ #define FOR_EACH_CALLBACK_FUNCTION(function) \
535
+ function(FXRbCallVoidMethod, GVL_TYPE_VOID, void, RECV, recv, 2) \
536
+ function(FXRbCallVoidMethod, GVL_TYPE_VOID, void, RECV, recv, 3) \
537
+ function(FXRbCallVoidMethod, GVL_TYPE_VOID, void, RECV, recv, 4) \
538
+ function(FXRbCallVoidMethod, GVL_TYPE_VOID, void, RECV, recv, 5) \
539
+ function(FXRbCallVoidMethod, GVL_TYPE_VOID, void, RECV, recv, 6) \
540
+ function(FXRbCallVoidMethod, GVL_TYPE_VOID, void, RECV, recv, 7) \
541
+ function(FXRbCallVoidMethod, GVL_TYPE_VOID, void, RECV, recv, 8) \
542
+ function(FXRbCallVoidMethod, GVL_TYPE_VOID, void, RECV, recv, 9) \
543
+ function(FXRbCallVoidMethod, GVL_TYPE_VOID, void, RECV, recv, 11) \
544
+ function(FXRbCallBoolMethod, GVL_TYPE_NONVOID, bool, RECV, recv, 2) \
545
+ function(FXRbCallBoolMethod, GVL_TYPE_NONVOID, bool, RECV, recv, 3) \
546
+ function(FXRbCallBoolMethod, GVL_TYPE_NONVOID, bool, RECV, recv, 4) \
547
+ function(FXRbCallBoolMethod, GVL_TYPE_NONVOID, bool, RECV, recv, 5) \
548
+ function(FXRbCallBoolMethod, GVL_TYPE_NONVOID, bool, RECV, recv, 7) \
549
+ function(FXRbCallIntMethod, GVL_TYPE_NONVOID, FXint, RECV, recv, 2) \
550
+ function(FXRbCallIntMethod, GVL_TYPE_NONVOID, FXint, RECV, recv, 3) \
551
+ function(FXRbCallIntMethod, GVL_TYPE_NONVOID, FXint, RECV, recv, 4) \
552
+ function(FXRbCallIntMethod, GVL_TYPE_NONVOID, FXint, RECV, recv, 7) \
553
+ function(FXRbCallLongMethod, GVL_TYPE_NONVOID, FXint, RECV, recv, 5) \
554
+ function(FXRbCallUIntMethod, GVL_TYPE_NONVOID, FXint, RECV, recv, 3) \
555
+ function(FXRbCallGLObjectMethod, GVL_TYPE_NONVOID, FXGLObject*, RECV, recv, 2) \
556
+ function(FXRbCallGLObjectMethod, GVL_TYPE_NONVOID, FXGLObject*, RECV, recv, 3) \
557
+ function(FXRbCallGLObjectMethod, GVL_TYPE_NONVOID, FXGLObject*, RECV, recv, 4) \
558
+ function(FXRbCallStringMethod, GVL_TYPE_NONVOID, FXString, RECV, recv, 2) \
559
+ function(FXRbCallCStringMethod, GVL_TYPE_NONVOID, const FXchar*, RECV, recv, 4) \
560
+ function(FXRbCallCStringMethod, GVL_TYPE_NONVOID, const FXchar*, RECV, recv, 5) \
561
+ function(FXRbCallGLObjectArrayMethod, GVL_TYPE_NONVOID, FXGLObject**, RECV, recv, 6) \
562
+ function(FXRbCallTableItemMethod, GVL_TYPE_NONVOID, FXTableItem*, RECV, recv, 5) \
563
+ function(FXRbCallFileAssocMethod, GVL_TYPE_NONVOID, FXFileAssoc*, RECV, recv, 3) \
564
+ function(FXRbCallIconMethod, GVL_TYPE_NONVOID, FXIcon*, RECV, recv, 2) \
565
+ function(FXRbCallIconMethod, GVL_TYPE_NONVOID, FXIcon*, RECV, recv, 4) \
566
+ function(FXRbCallIconMethod, GVL_TYPE_NONVOID, FXIcon*, RECV, recv, 6) \
567
+ function(FXRbCallImageMethod, GVL_TYPE_NONVOID, FXImage*, RECV, recv, 4) \
568
+ function(FXRbCallImageMethod, GVL_TYPE_NONVOID, FXImage*, RECV, recv, 6) \
569
+ function(FXRbCallWindowMethod, GVL_TYPE_NONVOID, FXWindow*, RECV, recv, 3) \
570
+ function(FXRbCallColorMethod, GVL_TYPE_NONVOID, FXColor, RECV, recv, 4) \
571
+ function(FXRbCallRangeMethod, GVL_TYPE_NONVOID, FXRangef, RECV, recv, 2) \
572
+ function(FXRbCallWCharMethod, GVL_TYPE_NONVOID, FXwchar, RECV, recv, 2) \
573
+ function(FXRbCallSetDashes, GVL_TYPE_VOID, void, RECV, recv, 5) \
574
+ function(FXRbLookupHandler, GVL_TYPE_NONVOID, ID, RECV, recv, 2) \
575
+ function(FXRbHandleMessage, GVL_TYPE_NONVOID, long, RECV, recv, 5) \
576
+ function(FXRbComboBox_sortFunc, GVL_TYPE_NONVOID, FXint, ITEMA, itema, 2) \
577
+ function(FXRbFoldingList_sortFunc, GVL_TYPE_NONVOID, FXint, ITEMA, itema, 2) \
578
+ function(FXRbIconList_sortFunc, GVL_TYPE_NONVOID, FXint, ITEMA, itema, 2) \
579
+ function(FXRbList_sortFunc, GVL_TYPE_NONVOID, FXint, ITEMA, itema, 2) \
580
+ function(FXRbListBox_sortFunc, GVL_TYPE_NONVOID, FXint, ITEMA, itema, 2) \
581
+ function(FXRbTreeList_sortFunc, GVL_TYPE_NONVOID, FXint, ITEMA, itema, 2) \
582
+ function(FXRbCallDCDrawMethod, GVL_TYPE_VOID, void, RECV, recv, 5) \
583
+ function(FXRbCallDCDrawMethod, GVL_TYPE_VOID, void, RECV, recv, 6) \
584
+ function(FXRbCallTreeItemMethod, GVL_TYPE_NONVOID, FXTreeItem*, RECV, recv, 4) \
585
+ function(FXRbCallFoldingItemMethod, GVL_TYPE_NONVOID, FXFoldingItem*, RECV, recv, 4) \
586
+ function(FXRbApp_onChoreThreads, GVL_TYPE_NONVOID, long, RECV, recv, 4) \
587
+
588
+
589
+ FOR_EACH_CALLBACK_FUNCTION( DEFINE_GVLCB_STUB_DECL )
590
+ FOR_EACH_CALLBACK_FUNCTION( DEFINE_GVLCB_WRAPPER_STRUCT )
591
+ FOR_EACH_CALLBACK_FUNCTION( DEFINE_GVLCB_SKELETON )
592
+ FOR_EACH_CALLBACK_FUNCTION( DEFINE_GVLCB_STUB )
593
+
594
+ #endif /* end __gvl_wrappers_h */