wxruby3 1.8.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/INSTALL.md +20 -10
  3. data/README.md +3 -3
  4. data/ext/wxruby3/include/wxRubyApp.h +49 -3
  5. data/ext/wxruby3/include/wxruby-ComboPopup.h +17 -32
  6. data/ext/wxruby3/include/wxruby-Config.h +34 -11
  7. data/ext/wxruby3/include/wxruby-GCTracking.h +23 -5
  8. data/ext/wxruby3/include/wxruby-SharedEventHandler.h +7 -7
  9. data/ext/wxruby3/include/wxruby-runtime.h +65 -0
  10. data/ext/wxruby3/swig/common.i +6 -0
  11. data/ext/wxruby3/swig/custom/typed_data/rubyhead.swg +220 -0
  12. data/ext/wxruby3/swig/custom/typed_data/rubyprimtypes.swg +265 -0
  13. data/ext/wxruby3/swig/custom/typed_data/rubyrun.swg +243 -0
  14. data/ext/wxruby3/swig/custom/typed_data/swigrun.swg +689 -0
  15. data/ext/wxruby3/swig/custom/{rubyprimtypes.swg → untyped_data/rubyprimtypes.swg} +8 -0
  16. data/ext/wxruby3/swig/mark_free_impl.i +2 -2
  17. data/ext/wxruby3/swig/memory_management.i +1 -0
  18. data/ext/wxruby3/swig/wx.i +19 -6
  19. data/lib/wx/core/file_dialog.rb +3 -10
  20. data/lib/wx/doc/rbn/events.rb +32 -0
  21. data/lib/wx/doc/rbn/ribbon_backstage_mrulist.rb +25 -0
  22. data/lib/wx/keyword_ctors.rb +3 -13
  23. data/lib/wx/rbn/events.rb +18 -0
  24. data/lib/wx/rbn/require.rb +1 -0
  25. data/lib/wx/rbn/ribbon_backstage_mrulist.rb +39 -0
  26. data/lib/wx/version.rb +1 -1
  27. data/rakelib/lib/config.rb +3 -3
  28. data/rakelib/lib/core/include/typed_data/swigrubyrun.inc +629 -0
  29. data/rakelib/lib/core/include/typed_data/swigrun.inc +870 -0
  30. data/rakelib/lib/core/package.rb +2 -2
  31. data/rakelib/lib/director/app.rb +16 -0
  32. data/rakelib/lib/director/art_provider.rb +3 -3
  33. data/rakelib/lib/director/aui_mdi_child_frame.rb +24 -0
  34. data/rakelib/lib/director/aui_mdi_parent_frame.rb +0 -2
  35. data/rakelib/lib/director/aui_tab_ctrl.rb +3 -3
  36. data/rakelib/lib/director/comboctrl.rb +35 -2
  37. data/rakelib/lib/director/config_base.rb +79 -33
  38. data/rakelib/lib/director/data_object.rb +1 -1
  39. data/rakelib/lib/director/date_event.rb +10 -3
  40. data/rakelib/lib/director/event.rb +16 -7
  41. data/rakelib/lib/director/event_handler.rb +48 -10
  42. data/rakelib/lib/director/events.rb +4 -2
  43. data/rakelib/lib/director/file_history.rb +46 -0
  44. data/rakelib/lib/director/frame.rb +29 -0
  45. data/rakelib/lib/director/fs_file.rb +2 -4
  46. data/rakelib/lib/director/functions.rb +2 -2
  47. data/rakelib/lib/director/graphics_context.rb +6 -6
  48. data/rakelib/lib/director/grid_cell_editor.rb +1 -1
  49. data/rakelib/lib/director/grid_cell_renderer.rb +1 -1
  50. data/rakelib/lib/director/grid_ctrl.rb +39 -12
  51. data/rakelib/lib/director/help_controller.rb +17 -0
  52. data/rakelib/lib/director/html_help_data.rb +20 -2
  53. data/rakelib/lib/director/icon.rb +3 -0
  54. data/rakelib/lib/director/log.rb +25 -1
  55. data/rakelib/lib/director/menu.rb +38 -106
  56. data/rakelib/lib/director/menu_bar.rb +36 -70
  57. data/rakelib/lib/director/num_validator.rb +3 -3
  58. data/rakelib/lib/director/numeric_property_validator.rb +1 -1
  59. data/rakelib/lib/director/page_setup_dialog.rb +18 -1
  60. data/rakelib/lib/director/pgeditor.rb +1 -1
  61. data/rakelib/lib/director/pgvalidation_info.rb +1 -0
  62. data/rakelib/lib/director/popup_window.rb +7 -0
  63. data/rakelib/lib/director/preview_frame.rb +8 -1
  64. data/rakelib/lib/director/print_dialog.rb +17 -0
  65. data/rakelib/lib/director/printer.rb +1 -1
  66. data/rakelib/lib/director/property_grid_page.rb +2 -0
  67. data/rakelib/lib/director/region_iterator.rb +1 -1
  68. data/rakelib/lib/director/ribbon_backstage.rb +28 -0
  69. data/rakelib/lib/director/ribbon_backstage_button.rb +25 -0
  70. data/rakelib/lib/director/ribbon_backstage_callout.rb +26 -0
  71. data/rakelib/lib/director/ribbon_backstage_heading.rb +26 -0
  72. data/rakelib/lib/director/ribbon_backstage_itemlist.rb +27 -0
  73. data/rakelib/lib/director/ribbon_backstage_mrulist.rb +112 -0
  74. data/rakelib/lib/director/ribbon_bar.rb +14 -0
  75. data/rakelib/lib/director/ribbon_gallery.rb +6 -2
  76. data/rakelib/lib/director/ribbon_tool_bar.rb +6 -4
  77. data/rakelib/lib/director/richtext_composite_object.rb +4 -4
  78. data/rakelib/lib/director/richtext_paragraph_layout_box.rb +1 -1
  79. data/rakelib/lib/director/scrolled_t.rb +1 -1
  80. data/rakelib/lib/director/sizer.rb +7 -0
  81. data/rakelib/lib/director/sizer_item.rb +4 -1
  82. data/rakelib/lib/director/splitter_event.rb +2 -2
  83. data/rakelib/lib/director/task_bar_icon.rb +4 -1
  84. data/rakelib/lib/director/text_validator.rb +1 -1
  85. data/rakelib/lib/director/tree_event.rb +3 -3
  86. data/rakelib/lib/director/validator.rb +1 -1
  87. data/rakelib/lib/director/variant.rb +2 -2
  88. data/rakelib/lib/director/window.rb +27 -5
  89. data/rakelib/lib/director/window_disabler.rb +1 -1
  90. data/rakelib/lib/director/xml_resource.rb +33 -8
  91. data/rakelib/lib/extractor/class.rb +2 -1
  92. data/rakelib/lib/extractor.rb +3 -2
  93. data/rakelib/lib/generate/interface.rb +2 -3
  94. data/rakelib/lib/specs/interfaces.rb +7 -0
  95. data/rakelib/lib/swig_runner.rb +14 -3
  96. data/rakelib/lib/typemap/common.rb +2 -36
  97. data/rakelib/lib/typemap/config.rb +22 -0
  98. data/samples/ribbon/ribbon.rb +277 -20
  99. data/tests/test_shared_event_handler.rb +3 -3
  100. metadata +32 -16
  101. /data/ext/wxruby3/swig/custom/{director.swg → common/director.swg} +0 -0
  102. /data/ext/wxruby3/swig/custom/{rubyapi.swg → common/rubyapi.swg} +0 -0
  103. /data/ext/wxruby3/swig/custom/{rubyerrors.swg → common/rubyerrors.swg} +0 -0
  104. /data/ext/wxruby3/swig/custom/{rubytracking.swg → common/rubytracking.swg} +0 -0
  105. /data/ext/wxruby3/swig/custom/{swiglabels.swg → common/swiglabels.swg} +0 -0
  106. /data/ext/wxruby3/swig/custom/{typemaps → common/typemaps}/swigtypemaps.swg +0 -0
  107. /data/ext/wxruby3/swig/custom/{wx_ruby_shared_ptr.i → common/wx_ruby_shared_ptr.i} +0 -0
  108. /data/ext/wxruby3/swig/custom/{wx_shared_ptr.i → common/wx_shared_ptr.i} +0 -0
  109. /data/ext/wxruby3/swig/custom/{rubyhead.swg → untyped_data/rubyhead.swg} +0 -0
  110. /data/ext/wxruby3/swig/custom/{rubyrun.swg → untyped_data/rubyrun.swg} +0 -0
  111. /data/ext/wxruby3/swig/custom/{swigrun.swg → untyped_data/swigrun.swg} +0 -0
  112. /data/rakelib/lib/core/include/{swigrubyrun.inc → untyped_data/swigrubyrun.inc} +0 -0
  113. /data/rakelib/lib/core/include/{swigrun.inc → untyped_data/swigrun.inc} +0 -0
@@ -0,0 +1,870 @@
1
+ // Copyright (c) 2023 M.J.N. Corino, The Netherlands
2
+ //
3
+ // This software is released under the MIT license.
4
+
5
+ // SWIG runtime
6
+
7
+ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
8
+ * if you're missing it.
9
+ */
10
+ #if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
11
+ (defined __cplusplus && __cplusplus >= 201103L) || \
12
+ defined SWIG_HAVE_SNPRINTF) && \
13
+ !defined SWIG_NO_SNPRINTF
14
+ # define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
15
+ # define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
16
+ #else
17
+ /* Fallback versions ignore the buffer size, but most of our uses either have a
18
+ * fixed maximum possible size or dynamically allocate a buffer that's large
19
+ * enough.
20
+ */
21
+ # define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
22
+ # define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
23
+ #endif
24
+
25
+ /* -----------------------------------------------------------------------------
26
+ * This section contains generic SWIG labels for method/variable
27
+ * declarations/attributes, and other compiler dependent labels.
28
+ * ----------------------------------------------------------------------------- */
29
+ /* template workaround for compilers that cannot correctly implement the C++ standard */
30
+ #ifndef SWIGTEMPLATEDISAMBIGUATOR
31
+ # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
32
+ # define SWIGTEMPLATEDISAMBIGUATOR template
33
+ # elif defined(__HP_aCC)
34
+ /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
35
+ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
36
+ # define SWIGTEMPLATEDISAMBIGUATOR template
37
+ # else
38
+ # define SWIGTEMPLATEDISAMBIGUATOR
39
+ # endif
40
+ #endif
41
+ /* inline attribute */
42
+ #ifndef SWIGINLINE
43
+ # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
44
+ # define SWIGINLINE inline
45
+ # else
46
+ # define SWIGINLINE
47
+ # endif
48
+ #endif
49
+ /* attribute recognised by some compilers to avoid 'unused' warnings */
50
+ #ifndef SWIGUNUSED
51
+ # if defined(__GNUC__)
52
+ # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
53
+ # define SWIGUNUSED __attribute__ ((__unused__))
54
+ # else
55
+ # define SWIGUNUSED
56
+ # endif
57
+ # elif defined(__ICC) || defined (__clang__)
58
+ # define SWIGUNUSED __attribute__ ((__unused__))
59
+ # else
60
+ # define SWIGUNUSED
61
+ # endif
62
+ #endif
63
+ #ifndef SWIG_MSC_UNSUPPRESS_4505
64
+ # if defined(_MSC_VER)
65
+ # pragma warning(disable : 4505) /* unreferenced local function has been removed */
66
+ # endif
67
+ #endif
68
+ #ifndef SWIGUNUSEDPARM
69
+ # ifdef __cplusplus
70
+ # define SWIGUNUSEDPARM(p)
71
+ # else
72
+ # define SWIGUNUSEDPARM(p) p SWIGUNUSED
73
+ # endif
74
+ #endif
75
+ /* internal SWIG method */
76
+ #ifndef SWIGINTERN
77
+ # define SWIGINTERN static SWIGUNUSED
78
+ #endif
79
+ /* internal inline SWIG method */
80
+ #ifndef SWIGINTERNINLINE
81
+ # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
82
+ #endif
83
+ /* exporting methods */
84
+ #if defined(__GNUC__)
85
+ # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
86
+ # ifndef GCC_HASCLASSVISIBILITY
87
+ # define GCC_HASCLASSVISIBILITY
88
+ # endif
89
+ # endif
90
+ #endif
91
+ #ifndef SWIGEXPORT
92
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
93
+ # if defined(STATIC_LINKED)
94
+ # define SWIGEXPORT
95
+ # else
96
+ # define SWIGEXPORT __declspec(dllexport)
97
+ # endif
98
+ # else
99
+ # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
100
+ # define SWIGEXPORT __attribute__ ((visibility("default")))
101
+ # else
102
+ # define SWIGEXPORT
103
+ # endif
104
+ # endif
105
+ #endif
106
+ /* calling conventions for Windows */
107
+ #ifndef SWIGSTDCALL
108
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
109
+ # define SWIGSTDCALL __stdcall
110
+ # else
111
+ # define SWIGSTDCALL
112
+ # endif
113
+ #endif
114
+ /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
115
+ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
116
+ # define _CRT_SECURE_NO_DEPRECATE
117
+ #endif
118
+ /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
119
+ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
120
+ # define _SCL_SECURE_NO_DEPRECATE
121
+ #endif
122
+ /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
123
+ #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
124
+ # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
125
+ #endif
126
+ /* Intel's compiler complains if a variable which was never initialised is
127
+ * cast to void, which is a common idiom which we use to indicate that we
128
+ * are aware a variable isn't used. So we just silence that warning.
129
+ * See: https://github.com/swig/swig/issues/192 for more discussion.
130
+ */
131
+ #ifdef __INTEL_COMPILER
132
+ # pragma warning disable 592
133
+ #endif
134
+ #if defined(__cplusplus) && __cplusplus >= 201103L
135
+ # define SWIG_NOEXCEPT noexcept
136
+ #else
137
+ # define SWIG_NOEXCEPT throw()
138
+ #endif
139
+ #define SWIG_QUOTE_STRING(x) #x
140
+ #define SWIG_STRINGIFY(x) SWIG_QUOTE_STRING(x)
141
+
142
+ /* This should only be incremented when either the layout of swig_type_info changes,
143
+ or for whatever reason, the runtime changes incompatibly */
144
+ #define SWIG_RUNTIME_VERSION "5"
145
+ /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
146
+ #ifdef SWIG_TYPE_TABLE
147
+ # define SWIG_TYPE_TABLE_NAME SWIG_STRINGIFY(SWIG_TYPE_TABLE)
148
+ #else
149
+ # define SWIG_TYPE_TABLE_NAME
150
+ #endif
151
+ /*
152
+ You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
153
+ creating a static or dynamic library from the SWIG runtime code.
154
+ In 99.9% of the cases, SWIG just needs to declare them as 'static'.
155
+ But only do this if strictly necessary, ie, if you have problems
156
+ with your compiler or suchlike.
157
+ */
158
+ #ifndef SWIGRUNTIME
159
+ # define SWIGRUNTIME SWIGINTERN
160
+ #endif
161
+ #ifndef SWIGRUNTIMEINLINE
162
+ # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
163
+ #endif
164
+ /* Generic buffer size */
165
+ #ifndef SWIG_BUFFER_SIZE
166
+ # define SWIG_BUFFER_SIZE 1024
167
+ #endif
168
+ /* Flags for pointer conversions */
169
+ #define SWIG_POINTER_DISOWN 0x1
170
+ #define SWIG_CAST_NEW_MEMORY 0x2
171
+ #define SWIG_POINTER_NO_NULL 0x4
172
+ #define SWIG_POINTER_CLEAR 0x8
173
+ #define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
174
+ /* Flags for new pointer objects */
175
+ #define SWIG_POINTER_OWN 0x1
176
+
177
+ /* Flags shared by every rb_data_type_t that SWIG allocates with
178
+ TypedData_Make_Struct, so the static descriptors and the per class cext_type
179
+ stay in step. The rb_data_type_t flags member, and RUBY_TYPED_FREE_IMMEDIATELY,
180
+ only exist from Ruby 2.1, so this macro (and every use of it) is guarded by
181
+ '#ifdef RUBY_TYPED_FREE_IMMEDIATELY' and is simply absent on older Ruby. Ruby
182
+ 3.3+ additionally defines TYPED_DATA_EMBEDDED and can store the small, fixed
183
+ size swig_ruby_wrapped_object inside the object slot rather than a separate
184
+ malloc; that embedding also needs FREE_IMMEDIATELY. */
185
+ #ifdef RUBY_TYPED_FREE_IMMEDIATELY
186
+ # ifdef TYPED_DATA_EMBEDDED
187
+ # define SWIG_RUBY_TYPED_DATA_FLAGS (RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_EMBEDDABLE)
188
+ # else
189
+ # define SWIG_RUBY_TYPED_DATA_FLAGS (RUBY_TYPED_FREE_IMMEDIATELY)
190
+ # endif
191
+ #endif
192
+
193
+ /* Wrapper attached to every SWIG TypedData object. It holds the wrapped pointer
194
+ together with the per-object mark and free functions. The static rb_data_type_t
195
+ shared by a class can not carry per-object ownership, which changes as ownership
196
+ is transferred at runtime, so that information is kept here instead. */
197
+ struct swig_ruby_wrapped_object {
198
+ void *data;
199
+ void (*dmark)(void *);
200
+ void (*dfree)(void *);
201
+ };
202
+
203
+ /*
204
+ Flags/methods for returning states.
205
+ The SWIG conversion methods, as ConvertPtr, return an integer
206
+ that tells if the conversion was successful or not. And if not,
207
+ an error code can be returned (see swigerrors.swg for the codes).
208
+ Use the following macros/flags to set or process the returning
209
+ states.
210
+ In old versions of SWIG, code such as the following was usually written:
211
+ if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
212
+ // success code
213
+ } else {
214
+ //fail code
215
+ }
216
+ Now you can be more explicit:
217
+ int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
218
+ if (SWIG_IsOK(res)) {
219
+ // success code
220
+ } else {
221
+ // fail code
222
+ }
223
+ which is the same really, but now you can also do
224
+ Type *ptr;
225
+ int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
226
+ if (SWIG_IsOK(res)) {
227
+ // success code
228
+ if (SWIG_IsNewObj(res) {
229
+ ...
230
+ delete *ptr;
231
+ } else {
232
+ ...
233
+ }
234
+ } else {
235
+ // fail code
236
+ }
237
+ I.e., now SWIG_ConvertPtr can return new objects and you can
238
+ identify the case and take care of the deallocation. Of course that
239
+ also requires SWIG_ConvertPtr to return new result values, such as
240
+ int SWIG_ConvertPtr(obj, ptr,...) {
241
+ if (<obj is ok>) {
242
+ if (<need new object>) {
243
+ *ptr = <ptr to new allocated object>;
244
+ return SWIG_NEWOBJ;
245
+ } else {
246
+ *ptr = <ptr to old object>;
247
+ return SWIG_OLDOBJ;
248
+ }
249
+ } else {
250
+ return SWIG_BADOBJ;
251
+ }
252
+ }
253
+ Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
254
+ more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
255
+ SWIG errors code.
256
+ Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
257
+ allows returning the 'cast rank', for example, if you have this
258
+ int food(double)
259
+ int fooi(int);
260
+ and you call
261
+ food(1) // cast rank '1' (1 -> 1.0)
262
+ fooi(1) // cast rank '0'
263
+ just use the SWIG_AddCast()/SWIG_CheckState()
264
+ */
265
+ #define SWIG_OK (0)
266
+ /* Runtime errors are < 0 */
267
+ #define SWIG_ERROR (-1)
268
+ /* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
269
+ /* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
270
+ /* Errors < -200 are generic runtime specific errors */
271
+ #define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
272
+ #define SWIG_IsOK(r) (r >= 0)
273
+ #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
274
+ /* The CastRankLimit says how many bits are used for the cast rank */
275
+ #define SWIG_CASTRANKLIMIT (1 << 8)
276
+ /* The NewMask denotes the object was created (using new/malloc) */
277
+ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
278
+ /* The TmpMask is for in/out typemaps that use temporary objects */
279
+ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
280
+ /* The binary string mask denotes using string without unicode */
281
+ #define SWIG_BINARYSTRMASK (SWIG_TMPOBJMASK << 1)
282
+ /* Simple returning values */
283
+ #define SWIG_BADOBJ (SWIG_ERROR)
284
+ #define SWIG_OLDOBJ (SWIG_OK)
285
+ #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
286
+ #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
287
+ #define SWIG_BINARYSTR (SWIG_OK | SWIG_BINARYSTRMASK)
288
+ /* Check, add and del object mask methods */
289
+ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
290
+ #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
291
+ #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
292
+ #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
293
+ #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
294
+ #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
295
+ #define SWIG_AddBinaryStrMask(r) (SWIG_IsOK(r) ? (r | SWIG_BINARYSTRMASK) : r)
296
+ #define SWIG_DelBinaryStrMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_BINARYSTRMASK) : r)
297
+ #define SWIG_IsBinaryStr(r) (SWIG_IsOK(r) && (r & SWIG_BINARYSTRMASK))
298
+ /* Cast-Rank Mode */
299
+ #if defined(SWIG_CASTRANK_MODE)
300
+ # ifndef SWIG_TypeRank
301
+ # define SWIG_TypeRank unsigned long
302
+ # endif
303
+ # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
304
+ # define SWIG_MAXCASTRANK (2)
305
+ # endif
306
+ # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
307
+ # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
308
+ SWIGINTERNINLINE int SWIG_AddCast(int r) {
309
+ return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
310
+ }
311
+ SWIGINTERNINLINE int SWIG_CheckState(int r) {
312
+ return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
313
+ }
314
+ #else /* no cast-rank mode */
315
+ # define SWIG_AddCast(r) (r)
316
+ # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
317
+ #endif
318
+
319
+ #include <string.h>
320
+
321
+ #ifdef __cplusplus
322
+ extern "C" {
323
+ #endif
324
+
325
+ typedef void *(*swig_converter_func)(void *, int *);
326
+ typedef struct swig_type_info *(*swig_dycast_func)(void **);
327
+
328
+ /* Structure to store information on one type */
329
+ typedef struct WXRB_EXPORT_FLAG swig_type_info {
330
+ const char *name; /* mangled name of this type */
331
+ const char *str; /* human readable name of this type */
332
+ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
333
+ struct swig_cast_info *cast; /* linked list of types that can cast into this type */
334
+ void *clientdata; /* language specific type data */
335
+ int owndata; /* flag if the structure owns the clientdata */
336
+ } swig_type_info;
337
+
338
+ /* Structure to store a type and conversion function used for casting */
339
+ typedef struct WXRB_EXPORT_FLAG swig_cast_info {
340
+ swig_type_info *type; /* pointer to type that is equivalent to this type */
341
+ swig_converter_func converter; /* function to cast the void pointers */
342
+ struct swig_cast_info *next; /* pointer to next cast in linked list */
343
+ unsigned int value; /* index of the last valid element in the array | typename hash value */
344
+ } swig_cast_info;
345
+
346
+ /* Structure used to store module information
347
+ * Each module generates one structure like this, and the runtime collects
348
+ * all of these structures and stores them in a circularly linked list.*/
349
+ typedef struct WXRB_EXPORT_FLAG swig_module_info {
350
+ swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
351
+ size_t size; /* Number of types in this module */
352
+ struct swig_module_info *next; /* Pointer to next element in circularly linked list */
353
+ swig_type_info **type_initial; /* Array of initially generated type structures */
354
+ swig_cast_info **cast_initial; /* Array of initially generated casting structures */
355
+ void *clientdata; /* Language specific module data */
356
+ } swig_module_info;
357
+
358
+ /*
359
+ Compare two type names skipping the space characters, therefore
360
+ "char*" == "char *" and "Class<int>" == "Class<int >", etc.
361
+
362
+ Return 0 when the two name types are equivalent, as in
363
+ strncmp, but skipping ' '.
364
+ */
365
+ WXRB_EXPORT_FLAG int
366
+ SWIG_TypeNameComp(const char *f1, const char *l1,
367
+ const char *f2, const char *l2)
368
+ {
369
+ for (;(f1 != l1) && (f2 != l2); ++f1, ++f2)
370
+ {
371
+ while ((*f1 == ' ') && (f1 != l1)) ++f1;
372
+ while ((*f2 == ' ') && (f2 != l2)) ++f2;
373
+ if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
374
+ }
375
+ return (int)((l1 - f1) - (l2 - f2));
376
+ }
377
+
378
+ /*
379
+ Check type equivalence in a name list like <name1>|<name2>|...
380
+ Return 0 if equal, -1 if nb < tb, 1 if nb > tb
381
+ */
382
+ WXRB_EXPORT_FLAG int
383
+ SWIG_TypeCmp(const char *nb, const char *tb)
384
+ {
385
+ int equiv = 1;
386
+ const char* te = tb + strlen(tb);
387
+ const char* ne = nb;
388
+ while (equiv != 0 && *ne)
389
+ {
390
+ for (nb = ne; *ne; ++ne)
391
+ {
392
+ if (*ne == '|') break;
393
+ }
394
+ equiv = SWIG_TypeNameComp(nb, ne, tb, te);
395
+ if (*ne) ++ne;
396
+ }
397
+ return equiv;
398
+ }
399
+
400
+ /*
401
+ Check type equivalence in a name list like <name1>|<name2>|...
402
+ Return 0 if not equal, 1 if equal
403
+ */
404
+ SWIGRUNTIME int
405
+ SWIG_TypeEquiv(const char *nb, const char *tb) {
406
+ return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
407
+ }
408
+
409
+ #if SWIG_VERSION >= 0x040400
410
+ /*
411
+ * Hash function for type name strings, based on maRushPrime1Hash (http://amsoftware.narod.ru/algo2.html)
412
+ */
413
+ WXRB_EXPORT_FLAG unsigned int SWIG_Hash(const char *str, unsigned int len) {
414
+ const unsigned char *data = (const unsigned char *)str;
415
+ unsigned int hash = len, i = 0, k;
416
+ int rem = (int)len;
417
+
418
+ while (rem >= (int)sizeof(unsigned int)) {
419
+ k = *(unsigned int *)data;
420
+ k += i++;
421
+ hash ^= k;
422
+ hash *= 171717;
423
+ data += sizeof(unsigned int);
424
+ rem -= sizeof(unsigned int);
425
+ }
426
+
427
+ switch (rem) {
428
+ case 3: k = (unsigned int)(data[2]) << 16;
429
+ k |= (unsigned int)(data[1]) << 8;
430
+ k |= (unsigned int)(data[0]);
431
+ k += i++;
432
+ hash ^= k;
433
+ hash *= 171717;
434
+ break;
435
+ case 2: k = (unsigned int)(data[1]) << 8;
436
+ k |= (unsigned int)(data[0]);
437
+ k += i++;
438
+ hash ^= k;
439
+ hash *= 171717;
440
+ break;
441
+ case 1: k = (unsigned int)(data[0]);
442
+ k += i++;
443
+ hash ^= k;
444
+ hash *= 171717;
445
+ break;
446
+ }
447
+ return hash;
448
+ }
449
+ #endif
450
+
451
+ /*
452
+ Check the typename
453
+ */
454
+ WXRB_EXPORT_FLAG swig_cast_info *
455
+ SWIG_TypeCheck(const char *c, swig_type_info *ty)
456
+ {
457
+ static const unsigned int scan_threshold = 4;
458
+ if (ty) {
459
+ swig_cast_info *head = ty->cast;
460
+ unsigned int hash_value = 0;
461
+ int hashed = 0;
462
+ while (head) {
463
+ if (strcmp(head->type->name, c) == 0) {
464
+ return head;
465
+ }
466
+ if (head->value) {
467
+ swig_cast_info *iter;
468
+ swig_cast_info *last = head + head->value;
469
+ swig_cast_info *first = head + 1;
470
+ int search = 1;
471
+ if (!hashed) {
472
+ if (head->value < scan_threshold) {
473
+ for (iter = first; iter <= last; iter++) {
474
+ if (strcmp(iter->type->name, c) == 0) {
475
+ return iter;
476
+ }
477
+ }
478
+ search = 0;
479
+ } else {
480
+ hashed = 1;
481
+ hash_value = SWIG_Hash(c, (unsigned int)strlen(c));
482
+ }
483
+ }
484
+ if (search) {
485
+ /* Binary search over sorted <'next'|'value'> pairs */
486
+ do {
487
+ iter = first + ((last - first) >> 1);
488
+ if (iter->value < hash_value) {
489
+ first = iter + 1;
490
+ } else if (iter->value == hash_value) {
491
+ if (strcmp(iter->next->type->name, c) == 0) {
492
+ return iter->next;
493
+ }
494
+ /* Hash collision check */
495
+ for (last = iter + 1; last->next && last->value == hash_value; last++) {
496
+ if (strcmp(last->next->type->name, c) == 0) {
497
+ return last->next;
498
+ }
499
+ }
500
+ for (first = iter - 1; first != head && first->value == hash_value; first--) {
501
+ if (strcmp(first->next->type->name, c) == 0) {
502
+ return first->next;
503
+ }
504
+ }
505
+ break;
506
+ } else
507
+ last = iter - 1;
508
+ } while (first <= last);
509
+ }
510
+ }
511
+ head = head->next;
512
+ }
513
+ }
514
+ return 0;
515
+ }
516
+
517
+ /*
518
+ Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
519
+ */
520
+ WXRB_EXPORT_FLAG swig_cast_info *
521
+ SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty)
522
+ {
523
+ if (ty) {
524
+ swig_cast_info *head = ty->cast;
525
+ while (head) {
526
+ if (head->type == from) {
527
+ return head;
528
+ }
529
+ if (head->value) {
530
+ swig_cast_info *iter;
531
+ swig_cast_info *last = head + head->value;
532
+ swig_cast_info *first = head + 1;
533
+ /* Binary search over sorted array of casts */
534
+ do {
535
+ iter = first + ((last - first) >> 1);
536
+ if (iter->type < from) {
537
+ first = iter + 1;
538
+ } else if (iter->type == from) {
539
+ return iter;
540
+ } else
541
+ last = iter - 1;
542
+ } while (first <= last);
543
+ }
544
+ head = head->next;
545
+ }
546
+ }
547
+ return 0;
548
+ }
549
+
550
+ /*
551
+ Cast a pointer up an inheritance hierarchy
552
+ */
553
+ SWIGRUNTIMEINLINE void *
554
+ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
555
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
556
+ }
557
+
558
+ /*
559
+ Dynamic pointer casting. Down an inheritance hierarchy
560
+ */
561
+ WXRB_EXPORT_FLAG swig_type_info *
562
+ SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
563
+ {
564
+ swig_type_info *lastty = ty;
565
+ if (!ty || !ty->dcast) return ty;
566
+ while (ty && (ty->dcast))
567
+ {
568
+ ty = (*ty->dcast)(ptr);
569
+ if (ty) lastty = ty;
570
+ }
571
+ return lastty;
572
+ }
573
+
574
+ /*
575
+ Return the name associated with this type
576
+ */
577
+ SWIGRUNTIMEINLINE const char *
578
+ SWIG_TypeName(const swig_type_info *ty) {
579
+ return ty->name;
580
+ }
581
+
582
+ /*
583
+ Return the pretty name associated with this type,
584
+ that is an unmangled type name in a form presentable to the user.
585
+ */
586
+ WXRB_EXPORT_FLAG const char *
587
+ SWIG_TypePrettyName(const swig_type_info *type)
588
+ {
589
+ /* The "str" field contains the equivalent pretty names of the
590
+ type, separated by vertical-bar characters. Choose the last
591
+ name. It should be the most specific; a fully resolved name
592
+ but not necessarily with default template parameters expanded. */
593
+ if (!type) return NULL;
594
+ if (type->str != NULL)
595
+ {
596
+ const char *last_name = type->str;
597
+ const char *s;
598
+ for (s = type->str; *s; s++)
599
+ if (*s == '|') last_name = s+1;
600
+ return last_name;
601
+ }
602
+ else
603
+ return type->name;
604
+ }
605
+
606
+ /*
607
+ Set the clientdata field for a type
608
+ */
609
+ WXRB_EXPORT_FLAG void
610
+ SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
611
+ {
612
+ swig_cast_info *head = ti->cast;
613
+ /* if (ti->clientdata == clientdata) return; */
614
+ ti->clientdata = clientdata;
615
+ while (head) {
616
+ swig_cast_info *cast;
617
+ for (cast = head; (unsigned int)(cast - head) <= head->value; cast++) {
618
+ if (!cast->converter) {
619
+ swig_type_info *tc = cast->type;
620
+ if (!tc->clientdata) {
621
+ SWIG_TypeClientData(tc, clientdata);
622
+ }
623
+ }
624
+ }
625
+ head = head->next;
626
+ }
627
+ }
628
+ WXRB_EXPORT_FLAG void
629
+ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata)
630
+ {
631
+ SWIG_TypeClientData(ti, clientdata);
632
+ ti->owndata = 1;
633
+ }
634
+
635
+ /*
636
+ Search for a swig_type_info structure only by mangled name
637
+ Search is a O(log #types)
638
+
639
+ We start searching at module start, and finish searching when start == end.
640
+ Note: if start == end at the beginning of the function, we go all the way around
641
+ the circular list.
642
+ */
643
+ WXRB_EXPORT_FLAG swig_type_info *
644
+ SWIG_MangledTypeQueryModule(swig_module_info *start,
645
+ swig_module_info *end,
646
+ const char *name)
647
+ {
648
+ swig_module_info *iter = start;
649
+ do
650
+ {
651
+ if (iter->size)
652
+ {
653
+ size_t l = 0;
654
+ size_t r = iter->size - 1;
655
+ do
656
+ {
657
+ /* since l+r >= 0, we can (>> 1) instead (/ 2) */
658
+ size_t i = (l + r) >> 1;
659
+ const char *iname = iter->types[i]->name;
660
+ if (iname)
661
+ {
662
+ int compare = strcmp(name, iname);
663
+ if (compare == 0)
664
+ {
665
+ return iter->types[i];
666
+ }
667
+ else if (compare < 0)
668
+ {
669
+ if (i)
670
+ {
671
+ r = i - 1;
672
+ }
673
+ else
674
+ {
675
+ break;
676
+ }
677
+ }
678
+ else if (compare > 0)
679
+ {
680
+ l = i + 1;
681
+ }
682
+ }
683
+ else
684
+ {
685
+ break; /* should never happen */
686
+ }
687
+ } while (l <= r);
688
+ }
689
+ iter = iter->next;
690
+ } while (iter != end);
691
+ return 0;
692
+ }
693
+
694
+ /*
695
+ Search for a swig_type_info structure for either a mangled name or a human readable name.
696
+ It first searches the mangled names of the types, which is a O(log #types)
697
+ If a type is not found it then searches the human readable names, which is O(#types).
698
+
699
+ We start searching at module start, and finish searching when start == end.
700
+ Note: if start == end at the beginning of the function, we go all the way around
701
+ the circular list.
702
+ */
703
+ WXRB_EXPORT_FLAG swig_type_info *
704
+ SWIG_TypeQueryModule(swig_module_info *start,
705
+ swig_module_info *end,
706
+ const char *name)
707
+ {
708
+ /* STEP 1: Search the name field using binary search */
709
+ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
710
+ if (ret)
711
+ {
712
+ return ret;
713
+ }
714
+ else
715
+ {
716
+ /* STEP 2: If the type hasn't been found, do a complete search
717
+ of the str field (the human readable name) */
718
+ swig_module_info *iter = start;
719
+ do
720
+ {
721
+ size_t i = 0;
722
+ for (; i < iter->size; ++i)
723
+ {
724
+ if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
725
+ return iter->types[i];
726
+ }
727
+ iter = iter->next;
728
+ } while (iter != end);
729
+ }
730
+
731
+ /* neither found a match */
732
+ return 0;
733
+ }
734
+
735
+ /*
736
+ Pack binary data into a string
737
+ */
738
+ WXRB_EXPORT_FLAG char *
739
+ SWIG_PackData(char *c, void *ptr, size_t sz)
740
+ {
741
+ static const char hex[17] = "0123456789abcdef";
742
+ const unsigned char *u = (unsigned char *) ptr;
743
+ const unsigned char *eu = u + sz;
744
+ for (; u != eu; ++u)
745
+ {
746
+ unsigned char uu = *u;
747
+ *(c++) = hex[(uu & 0xf0) >> 4];
748
+ *(c++) = hex[uu & 0xf];
749
+ }
750
+ return c;
751
+ }
752
+
753
+ /*
754
+ Unpack binary data from a string
755
+ */
756
+ WXRB_EXPORT_FLAG const char *
757
+ SWIG_UnpackData(const char *c, void *ptr, size_t sz)
758
+ {
759
+ unsigned char *u = (unsigned char *) ptr;
760
+ const unsigned char *eu = u + sz;
761
+ for (; u != eu; ++u)
762
+ {
763
+ char d = *(c++);
764
+ unsigned char uu;
765
+ if ((d >= '0') && (d <= '9'))
766
+ uu = (unsigned char)((d - '0') << 4);
767
+ else if ((d >= 'a') && (d <= 'f'))
768
+ uu = (unsigned char)((d - ('a'-10)) << 4);
769
+ else
770
+ return (char *) 0;
771
+ d = *(c++);
772
+ if ((d >= '0') && (d <= '9'))
773
+ uu |= (unsigned char)(d - '0');
774
+ else if ((d >= 'a') && (d <= 'f'))
775
+ uu |= (unsigned char)(d - ('a'-10));
776
+ else
777
+ return (char *) 0;
778
+ *u = uu;
779
+ }
780
+ return c;
781
+ }
782
+
783
+ /*
784
+ Pack 'void *' into a string buffer.
785
+ */
786
+ WXRB_EXPORT_FLAG char *
787
+ SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
788
+ {
789
+ char *r = buff;
790
+ if ((2*sizeof(void *) + 2) > bsz) return 0;
791
+ *(r++) = '_';
792
+ r = SWIG_PackData(r,&ptr,sizeof(void *));
793
+ if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
794
+ strcpy(r,name);
795
+ return buff;
796
+ }
797
+
798
+ WXRB_EXPORT_FLAG const char *
799
+ SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
800
+ {
801
+ if (*c != '_')
802
+ {
803
+ if (strcmp(c,"NULL") == 0)
804
+ {
805
+ *ptr = (void *) 0;
806
+ return name;
807
+ }
808
+ else
809
+ {
810
+ return 0;
811
+ }
812
+ }
813
+ return SWIG_UnpackData(++c,ptr,sizeof(void *));
814
+ }
815
+
816
+ WXRB_EXPORT_FLAG char *
817
+ SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
818
+ {
819
+ char *r = buff;
820
+ size_t lname = (name ? strlen(name) : 0);
821
+ if ((2*sz + 2 + lname) > bsz) return 0;
822
+ *(r++) = '_';
823
+ r = SWIG_PackData(r,ptr,sz);
824
+ if (lname)
825
+ {
826
+ strncpy(r,name,lname+1);
827
+ }
828
+ else
829
+ {
830
+ *r = 0;
831
+ }
832
+ return buff;
833
+ }
834
+
835
+ WXRB_EXPORT_FLAG const char *
836
+ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
837
+ {
838
+ if (*c != '_')
839
+ {
840
+ if (strcmp(c,"NULL") == 0)
841
+ {
842
+ memset(ptr,0,sz);
843
+ return name;
844
+ }
845
+ else
846
+ {
847
+ return 0;
848
+ }
849
+ }
850
+ return SWIG_UnpackData(++c,ptr,sz);
851
+ }
852
+
853
+ #ifdef __cplusplus
854
+ }
855
+ #endif
856
+
857
+ /* Errors in SWIG */
858
+ #define SWIG_UnknownError -1
859
+ #define SWIG_IOError -2
860
+ #define SWIG_RuntimeError -3
861
+ #define SWIG_IndexError -4
862
+ #define SWIG_TypeError -5
863
+ #define SWIG_DivisionByZero -6
864
+ #define SWIG_OverflowError -7
865
+ #define SWIG_SyntaxError -8
866
+ #define SWIG_ValueError -9
867
+ #define SWIG_SystemError -10
868
+ #define SWIG_AttributeError -11
869
+ #define SWIG_MemoryError -12
870
+ #define SWIG_NullReferenceError -13