wxruby3 0.9.0 → 0.9.1
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.
- checksums.yaml +4 -4
- data/ext/wxruby3/include/wxruby-runtime.h +3 -0
- data/ext/wxruby3/swig/common.i +22 -0
- data/ext/wxruby3/swig/custom/director.swg +296 -0
- data/ext/wxruby3/swig/custom/rubyapi.swg +19 -0
- data/ext/wxruby3/swig/custom/rubyerrors.swg +45 -0
- data/ext/wxruby3/swig/custom/rubyhead.swg +192 -0
- data/ext/wxruby3/swig/custom/rubyrun.swg +187 -0
- data/ext/wxruby3/swig/custom/swigrun.swg +363 -0
- data/ext/wxruby3/swig/custom/typemaps/swigtypemaps.swg +173 -0
- data/ext/wxruby3/swig/wx.i +50 -30
- data/lib/wx/core/const.rb +83 -0
- data/lib/wx/doc/const.rb +66 -66
- data/lib/wx/doc/event.rb +0 -6
- data/lib/wx/doc/functions.rb +9 -9
- data/lib/wx/doc/window.rb +5 -0
- data/lib/wx/keyword_defs.rb +43 -6
- data/lib/wx/version.rb +1 -1
- data/rakelib/lib/config/macosx.rb +1 -1
- data/rakelib/lib/core/include/funcall.inc +33 -14
- data/rakelib/lib/core/include/swigdirector.inc +384 -0
- data/rakelib/lib/core/include/swigrubyerrors.inc +161 -0
- data/{ext/wxruby3/swig/custom/swig4/rubyrun.swg → rakelib/lib/core/include/swigrubyrun.inc} +245 -120
- data/rakelib/lib/core/include/swigrun.inc +700 -0
- data/rakelib/lib/core/package.rb +5 -2
- data/rakelib/lib/core/parameter.rb +3 -0
- data/rakelib/lib/director/accelerator.rb +1 -1
- data/rakelib/lib/director/animation.rb +1 -1
- data/rakelib/lib/director/animation_ctrl.rb +20 -0
- data/rakelib/lib/director/app.rb +23 -5
- data/rakelib/lib/director/art_provider.rb +1 -1
- data/rakelib/lib/director/data_object_simple_base.rb +1 -2
- data/rakelib/lib/director/dialog.rb +5 -0
- data/rakelib/lib/director/dialup_event.rb +44 -0
- data/rakelib/lib/director/dialup_manager.rb +45 -0
- data/rakelib/lib/director/event.rb +20 -2
- data/rakelib/lib/director/file_ctrl.rb +35 -0
- data/rakelib/lib/director/file_ctrl_event.rb +26 -0
- data/rakelib/lib/director/gdicommon.rb +19 -1
- data/rakelib/lib/director/grid_cell_editor.rb +6 -6
- data/rakelib/lib/director/help_controller.rb +1 -1
- data/rakelib/lib/director/pgarray_editor_dialog.rb +0 -6
- data/rakelib/lib/director/pgeditor.rb +2 -2
- data/rakelib/lib/director/pgproperties.rb +2 -2
- data/rakelib/lib/director/richtext_buffer.rb +1 -1
- data/rakelib/lib/director/richtext_ctrl.rb +1 -1
- data/rakelib/lib/director/sash_event.rb +42 -0
- data/rakelib/lib/director/sizer.rb +64 -1
- data/rakelib/lib/director/sizer_item.rb +22 -0
- data/rakelib/lib/director/task_bar_icon.rb +1 -1
- data/rakelib/lib/director/tree_ctrl.rb +19 -44
- data/rakelib/lib/generate/doc/animation_ctrl.yaml +15 -0
- data/rakelib/lib/generate/doc/events.yaml +10 -4
- data/rakelib/lib/generate/doc/static_box.yaml +8 -0
- data/rakelib/lib/generate/doc/xml_resource.yaml +3 -0
- data/rakelib/lib/generate/doc.rb +14 -3
- data/rakelib/lib/generate/interface.rb +4 -3
- data/rakelib/lib/specs/interfaces.rb +5 -1
- data/rakelib/lib/swig_runner.rb +4 -50
- data/rakelib/lib/typemap/common.rb +24 -9
- data/rakelib/lib/typemap/data_format.rb +1 -1
- data/rakelib/lib/typemap/data_object_data.rb +2 -2
- data/rakelib/lib/typemap/pgprop_arg.rb +7 -2
- data/rakelib/lib/typemap/points_list.rb +5 -7
- data/rakelib/lib/util/string.rb +10 -8
- data/samples/text/richtext.rb +0 -30
- data/tests/test_app_exit_exception.rb +36 -0
- data/tests/test_app_init_exception.rb +20 -0
- data/tests/test_book_controls.rb +29 -0
- data/tests/test_exceptions.rb +41 -0
- data/tests/test_sizer.rb +43 -0
- data/tests/test_std_controls.rb +36 -0
- metadata +25 -4
- data/ext/wxruby3/swig/custom/swig3/rubyrun.swg +0 -456
@@ -0,0 +1,187 @@
|
|
1
|
+
/* -----------------------------------------------------------------------------
|
2
|
+
* rubyrun.swg
|
3
|
+
*
|
4
|
+
* This file contains the runtime support for Ruby modules
|
5
|
+
* and includes code for managing global variables and pointer
|
6
|
+
* type checking.
|
7
|
+
*
|
8
|
+
* Customized for wxRuby3.
|
9
|
+
* Copyright (c) 2023 M.J.N. Corino, The Netherlands
|
10
|
+
*
|
11
|
+
* This software is released under the MIT license.
|
12
|
+
* ----------------------------------------------------------------------------- */
|
13
|
+
|
14
|
+
/* For backward compatibility only */
|
15
|
+
#define SWIG_POINTER_EXCEPTION 0
|
16
|
+
|
17
|
+
/* for raw pointers */
|
18
|
+
#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
|
19
|
+
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
|
20
|
+
#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags)
|
21
|
+
#define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own)
|
22
|
+
#define swig_owntype swig_ruby_owntype
|
23
|
+
|
24
|
+
/* for raw packed data */
|
25
|
+
#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
|
26
|
+
#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
|
27
|
+
|
28
|
+
/* for class or struct pointers */
|
29
|
+
#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
|
30
|
+
#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
|
31
|
+
|
32
|
+
/* for C or C++ function pointers */
|
33
|
+
#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
|
34
|
+
#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
|
35
|
+
|
36
|
+
/* for C++ member pointers, ie, member methods */
|
37
|
+
#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty)
|
38
|
+
#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
|
39
|
+
|
40
|
+
|
41
|
+
/* Runtime API */
|
42
|
+
|
43
|
+
#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule(clientdata)
|
44
|
+
#define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer)
|
45
|
+
|
46
|
+
|
47
|
+
/* Error manipulation */
|
48
|
+
|
49
|
+
#define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
|
50
|
+
#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
|
51
|
+
#define SWIG_fail goto fail
|
52
|
+
|
53
|
+
|
54
|
+
/* Ruby-specific SWIG API */
|
55
|
+
|
56
|
+
#define SWIG_InitRuntime() SWIG_Ruby_InitRuntime()
|
57
|
+
#define SWIG_define_class(ty) SWIG_Ruby_define_class(ty)
|
58
|
+
#define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty)
|
59
|
+
#define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value)
|
60
|
+
#define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty)
|
61
|
+
|
62
|
+
#include "assert.h"
|
63
|
+
|
64
|
+
/* -----------------------------------------------------------------------------
|
65
|
+
* pointers/data manipulation
|
66
|
+
* ----------------------------------------------------------------------------- */
|
67
|
+
|
68
|
+
#ifdef __cplusplus
|
69
|
+
extern "C" {
|
70
|
+
#endif
|
71
|
+
|
72
|
+
typedef struct WXRUBY_EXPORT swig_class {
|
73
|
+
VALUE klass;
|
74
|
+
VALUE mImpl;
|
75
|
+
void (*mark)(void *);
|
76
|
+
void (*destroy)(void *);
|
77
|
+
int trackObjects;
|
78
|
+
} swig_class;
|
79
|
+
|
80
|
+
/*
|
81
|
+
If your swig extension is to be run within an embedded ruby and has
|
82
|
+
director callbacks, you should set -DRUBY_EMBEDDED during compilation.
|
83
|
+
This will reset ruby's stack frame on each entry point from the main
|
84
|
+
program the first time a virtual director function is invoked (in a
|
85
|
+
non-recursive way).
|
86
|
+
If this is not done, you run the risk of Ruby trashing the stack.
|
87
|
+
*/
|
88
|
+
|
89
|
+
#ifdef RUBY_EMBEDDED
|
90
|
+
|
91
|
+
# define SWIG_INIT_STACK \
|
92
|
+
if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
|
93
|
+
++swig_virtual_calls;
|
94
|
+
# define SWIG_RELEASE_STACK --swig_virtual_calls;
|
95
|
+
# define Ruby_DirectorTypeMismatchException(x) \
|
96
|
+
rb_raise( rb_eTypeError, "%s", x ); return c_result;
|
97
|
+
|
98
|
+
static unsigned int swig_virtual_calls = 0;
|
99
|
+
|
100
|
+
#else /* normal non-embedded extension */
|
101
|
+
|
102
|
+
# define SWIG_INIT_STACK
|
103
|
+
# define SWIG_RELEASE_STACK
|
104
|
+
# define Ruby_DirectorTypeMismatchException(x) \
|
105
|
+
throw Swig::DirectorTypeMismatchException( x );
|
106
|
+
|
107
|
+
#endif /* RUBY_EMBEDDED */
|
108
|
+
|
109
|
+
|
110
|
+
/* This code checks to see if the Ruby object being raised as part
|
111
|
+
of an exception inherits from the Ruby class Exception. If so,
|
112
|
+
the object is simply returned. If not, then a new Ruby exception
|
113
|
+
object is created and that will be returned to Ruby.*/
|
114
|
+
WXRUBY_EXPORT VALUE
|
115
|
+
SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj);
|
116
|
+
|
117
|
+
/* Initialize Ruby runtime support */
|
118
|
+
WXRUBY_EXPORT void
|
119
|
+
SWIG_Ruby_InitRuntime(void);
|
120
|
+
|
121
|
+
/* Define Ruby class for C type */
|
122
|
+
WXRUBY_EXPORT void
|
123
|
+
SWIG_Ruby_define_class(swig_type_info *type);
|
124
|
+
|
125
|
+
/* Create a new pointer object */
|
126
|
+
WXRUBY_EXPORT VALUE
|
127
|
+
SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags);
|
128
|
+
|
129
|
+
/* Create a new class instance (always owned) */
|
130
|
+
WXRUBY_EXPORT VALUE
|
131
|
+
SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type);
|
132
|
+
|
133
|
+
/* Get type mangle from class name */
|
134
|
+
WXRUBY_EXPORT char *
|
135
|
+
SWIG_Ruby_MangleStr(VALUE obj);
|
136
|
+
|
137
|
+
/* Acquire a pointer value */
|
138
|
+
typedef struct WXRUBY_EXPORT swig_ruby_owntype {
|
139
|
+
void (*datafree)(void *);
|
140
|
+
int own;
|
141
|
+
} swig_ruby_owntype;
|
142
|
+
|
143
|
+
WXRUBY_EXPORT swig_ruby_owntype
|
144
|
+
SWIG_Ruby_AcquirePtr(VALUE obj, swig_ruby_owntype own);
|
145
|
+
|
146
|
+
/* Convert a pointer value */
|
147
|
+
WXRUBY_EXPORT int
|
148
|
+
SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, swig_ruby_owntype *own);
|
149
|
+
|
150
|
+
/* Check convert */
|
151
|
+
WXRUBY_EXPORT int
|
152
|
+
SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty);
|
153
|
+
|
154
|
+
WXRUBY_EXPORT VALUE
|
155
|
+
SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type);
|
156
|
+
|
157
|
+
/* Convert a packed pointer value */
|
158
|
+
WXRUBY_EXPORT int
|
159
|
+
SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty);
|
160
|
+
|
161
|
+
WXRUBY_EXPORT swig_module_info *
|
162
|
+
SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata));
|
163
|
+
|
164
|
+
WXRUBY_EXPORT void
|
165
|
+
SWIG_Ruby_SetModule(swig_module_info *pointer);
|
166
|
+
|
167
|
+
/* This function can be used to check whether a proc or method or similarly
|
168
|
+
callable function has been passed. Usually used in a %typecheck, like:
|
169
|
+
|
170
|
+
%typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) {
|
171
|
+
$result = SWIG_Ruby_isCallable( $input );
|
172
|
+
}
|
173
|
+
*/
|
174
|
+
WXRUBY_EXPORT
|
175
|
+
int SWIG_Ruby_isCallable( VALUE proc );
|
176
|
+
|
177
|
+
/* This function can be used to check the arity (number of arguments)
|
178
|
+
a proc or method can take. Usually used in a %typecheck.
|
179
|
+
Valid arities will be that equal to minimal or those < 0
|
180
|
+
which indicate a variable number of parameters at the end.
|
181
|
+
*/
|
182
|
+
WXRUBY_EXPORT
|
183
|
+
int SWIG_Ruby_arity( VALUE proc, int minimal );
|
184
|
+
|
185
|
+
#ifdef __cplusplus
|
186
|
+
}
|
187
|
+
#endif
|
@@ -0,0 +1,363 @@
|
|
1
|
+
/* -----------------------------------------------------------------------------
|
2
|
+
* swigrun.swg
|
3
|
+
*
|
4
|
+
* This file contains generic C API SWIG runtime support for pointer
|
5
|
+
* type checking.
|
6
|
+
*
|
7
|
+
* Customized for wxRuby3.
|
8
|
+
* Copyright (c) 2023 M.J.N. Corino, The Netherlands
|
9
|
+
*
|
10
|
+
* This software is released under the MIT license.
|
11
|
+
* ----------------------------------------------------------------------------- */
|
12
|
+
|
13
|
+
/* This should only be incremented when either the layout of swig_type_info changes,
|
14
|
+
or for whatever reason, the runtime changes incompatibly */
|
15
|
+
#define SWIG_RUNTIME_VERSION "4"
|
16
|
+
|
17
|
+
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
|
18
|
+
#ifdef SWIG_TYPE_TABLE
|
19
|
+
# define SWIG_QUOTE_STRING(x) #x
|
20
|
+
# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
|
21
|
+
# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
|
22
|
+
#else
|
23
|
+
# define SWIG_TYPE_TABLE_NAME
|
24
|
+
#endif
|
25
|
+
|
26
|
+
/*
|
27
|
+
You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
|
28
|
+
creating a static or dynamic library from the SWIG runtime code.
|
29
|
+
In 99.9% of the cases, SWIG just needs to declare them as 'static'.
|
30
|
+
|
31
|
+
But only do this if strictly necessary, ie, if you have problems
|
32
|
+
with your compiler or suchlike.
|
33
|
+
*/
|
34
|
+
|
35
|
+
#ifndef SWIGRUNTIME
|
36
|
+
# define SWIGRUNTIME SWIGINTERN
|
37
|
+
#endif
|
38
|
+
|
39
|
+
#ifndef SWIGRUNTIMEINLINE
|
40
|
+
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
|
41
|
+
#endif
|
42
|
+
|
43
|
+
/* Generic buffer size */
|
44
|
+
#ifndef SWIG_BUFFER_SIZE
|
45
|
+
# define SWIG_BUFFER_SIZE 1024
|
46
|
+
#endif
|
47
|
+
|
48
|
+
/* Flags for pointer conversions */
|
49
|
+
#define SWIG_POINTER_DISOWN 0x1
|
50
|
+
#define SWIG_CAST_NEW_MEMORY 0x2
|
51
|
+
#define SWIG_POINTER_NO_NULL 0x4
|
52
|
+
#define SWIG_POINTER_CLEAR 0x8
|
53
|
+
#define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
|
54
|
+
|
55
|
+
/* Flags for new pointer objects */
|
56
|
+
#define SWIG_POINTER_OWN 0x1
|
57
|
+
|
58
|
+
|
59
|
+
/*
|
60
|
+
Flags/methods for returning states.
|
61
|
+
|
62
|
+
The SWIG conversion methods, as ConvertPtr, return an integer
|
63
|
+
that tells if the conversion was successful or not. And if not,
|
64
|
+
an error code can be returned (see swigerrors.swg for the codes).
|
65
|
+
|
66
|
+
Use the following macros/flags to set or process the returning
|
67
|
+
states.
|
68
|
+
|
69
|
+
In old versions of SWIG, code such as the following was usually written:
|
70
|
+
|
71
|
+
if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
|
72
|
+
// success code
|
73
|
+
} else {
|
74
|
+
//fail code
|
75
|
+
}
|
76
|
+
|
77
|
+
Now you can be more explicit:
|
78
|
+
|
79
|
+
int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
|
80
|
+
if (SWIG_IsOK(res)) {
|
81
|
+
// success code
|
82
|
+
} else {
|
83
|
+
// fail code
|
84
|
+
}
|
85
|
+
|
86
|
+
which is the same really, but now you can also do
|
87
|
+
|
88
|
+
Type *ptr;
|
89
|
+
int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
|
90
|
+
if (SWIG_IsOK(res)) {
|
91
|
+
// success code
|
92
|
+
if (SWIG_IsNewObj(res) {
|
93
|
+
...
|
94
|
+
delete *ptr;
|
95
|
+
} else {
|
96
|
+
...
|
97
|
+
}
|
98
|
+
} else {
|
99
|
+
// fail code
|
100
|
+
}
|
101
|
+
|
102
|
+
I.e., now SWIG_ConvertPtr can return new objects and you can
|
103
|
+
identify the case and take care of the deallocation. Of course that
|
104
|
+
also requires SWIG_ConvertPtr to return new result values, such as
|
105
|
+
|
106
|
+
int SWIG_ConvertPtr(obj, ptr,...) {
|
107
|
+
if (<obj is ok>) {
|
108
|
+
if (<need new object>) {
|
109
|
+
*ptr = <ptr to new allocated object>;
|
110
|
+
return SWIG_NEWOBJ;
|
111
|
+
} else {
|
112
|
+
*ptr = <ptr to old object>;
|
113
|
+
return SWIG_OLDOBJ;
|
114
|
+
}
|
115
|
+
} else {
|
116
|
+
return SWIG_BADOBJ;
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
|
121
|
+
more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
|
122
|
+
SWIG errors code.
|
123
|
+
|
124
|
+
Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
|
125
|
+
allows returning the 'cast rank', for example, if you have this
|
126
|
+
|
127
|
+
int food(double)
|
128
|
+
int fooi(int);
|
129
|
+
|
130
|
+
and you call
|
131
|
+
|
132
|
+
food(1) // cast rank '1' (1 -> 1.0)
|
133
|
+
fooi(1) // cast rank '0'
|
134
|
+
|
135
|
+
just use the SWIG_AddCast()/SWIG_CheckState()
|
136
|
+
*/
|
137
|
+
|
138
|
+
#define SWIG_OK (0)
|
139
|
+
/* Runtime errors are < 0 */
|
140
|
+
#define SWIG_ERROR (-1)
|
141
|
+
/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
|
142
|
+
/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
|
143
|
+
/* Errors < -200 are generic runtime specific errors */
|
144
|
+
#define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
|
145
|
+
|
146
|
+
#define SWIG_IsOK(r) (r >= 0)
|
147
|
+
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
148
|
+
|
149
|
+
/* The CastRankLimit says how many bits are used for the cast rank */
|
150
|
+
#define SWIG_CASTRANKLIMIT (1 << 8)
|
151
|
+
/* The NewMask denotes the object was created (using new/malloc) */
|
152
|
+
#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
|
153
|
+
/* The TmpMask is for in/out typemaps that use temporary objects */
|
154
|
+
#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
|
155
|
+
/* Simple returning values */
|
156
|
+
#define SWIG_BADOBJ (SWIG_ERROR)
|
157
|
+
#define SWIG_OLDOBJ (SWIG_OK)
|
158
|
+
#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
|
159
|
+
#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
|
160
|
+
/* Check, add and del object mask methods */
|
161
|
+
#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
|
162
|
+
#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
|
163
|
+
#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
|
164
|
+
#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
|
165
|
+
#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
|
166
|
+
#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
|
167
|
+
|
168
|
+
/* Cast-Rank Mode */
|
169
|
+
#if defined(SWIG_CASTRANK_MODE)
|
170
|
+
# ifndef SWIG_TypeRank
|
171
|
+
# define SWIG_TypeRank unsigned long
|
172
|
+
# endif
|
173
|
+
# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
|
174
|
+
# define SWIG_MAXCASTRANK (2)
|
175
|
+
# endif
|
176
|
+
# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
|
177
|
+
# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
|
178
|
+
SWIGINTERNINLINE int SWIG_AddCast(int r) {
|
179
|
+
return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
|
180
|
+
}
|
181
|
+
SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
182
|
+
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
183
|
+
}
|
184
|
+
#else /* no cast-rank mode */
|
185
|
+
# define SWIG_AddCast(r) (r)
|
186
|
+
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
|
187
|
+
#endif
|
188
|
+
|
189
|
+
|
190
|
+
#include <string.h>
|
191
|
+
|
192
|
+
#ifdef __cplusplus
|
193
|
+
extern "C" {
|
194
|
+
#endif
|
195
|
+
|
196
|
+
typedef void *(*swig_converter_func)(void *, int *);
|
197
|
+
typedef struct swig_type_info *(*swig_dycast_func)(void **);
|
198
|
+
|
199
|
+
/* Structure to store information on one type */
|
200
|
+
typedef struct WXRUBY_EXPORT swig_type_info
|
201
|
+
{
|
202
|
+
const char *name; /* mangled name of this type */
|
203
|
+
const char *str; /* human readable name of this type */
|
204
|
+
swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
|
205
|
+
struct swig_cast_info *cast; /* linked list of types that can cast into this type */
|
206
|
+
void *clientdata; /* language specific type data */
|
207
|
+
int owndata; /* flag if the structure owns the clientdata */
|
208
|
+
} swig_type_info;
|
209
|
+
|
210
|
+
/* Structure to store a type and conversion function used for casting */
|
211
|
+
typedef struct WXRUBY_EXPORT swig_cast_info
|
212
|
+
{
|
213
|
+
swig_type_info *type; /* pointer to type that is equivalent to this type */
|
214
|
+
swig_converter_func converter; /* function to cast the void pointers */
|
215
|
+
struct swig_cast_info *next; /* pointer to next cast in linked list */
|
216
|
+
struct swig_cast_info *prev; /* pointer to the previous cast */
|
217
|
+
} swig_cast_info;
|
218
|
+
|
219
|
+
/* Structure used to store module information
|
220
|
+
* Each module generates one structure like this, and the runtime collects
|
221
|
+
* all of these structures and stores them in a circularly linked list.*/
|
222
|
+
typedef struct WXRUBY_EXPORT swig_module_info
|
223
|
+
{
|
224
|
+
swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
|
225
|
+
size_t size; /* Number of types in this module */
|
226
|
+
struct swig_module_info *next; /* Pointer to next element in circularly linked list */
|
227
|
+
swig_type_info **type_initial; /* Array of initially generated type structures */
|
228
|
+
swig_cast_info **cast_initial; /* Array of initially generated casting structures */
|
229
|
+
void *clientdata; /* Language specific module data */
|
230
|
+
} swig_module_info;
|
231
|
+
|
232
|
+
/*
|
233
|
+
Compare two type names skipping the space characters, therefore
|
234
|
+
"char*" == "char *" and "Class<int>" == "Class<int >", etc.
|
235
|
+
|
236
|
+
Return 0 when the two name types are equivalent, as in
|
237
|
+
strncmp, but skipping ' '.
|
238
|
+
*/
|
239
|
+
WXRUBY_EXPORT int
|
240
|
+
SWIG_TypeNameComp(const char *f1, const char *l1,
|
241
|
+
const char *f2, const char *l2);
|
242
|
+
|
243
|
+
/*
|
244
|
+
Check type equivalence in a name list like <name1>|<name2>|...
|
245
|
+
Return 0 if equal, -1 if nb < tb, 1 if nb > tb
|
246
|
+
*/
|
247
|
+
WXRUBY_EXPORT int
|
248
|
+
SWIG_TypeCmp(const char *nb, const char *tb);
|
249
|
+
|
250
|
+
/*
|
251
|
+
Check type equivalence in a name list like <name1>|<name2>|...
|
252
|
+
Return 0 if not equal, 1 if equal
|
253
|
+
*/
|
254
|
+
SWIGRUNTIME int
|
255
|
+
SWIG_TypeEquiv(const char *nb, const char *tb) {
|
256
|
+
return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
|
257
|
+
}
|
258
|
+
|
259
|
+
/*
|
260
|
+
Check the typename
|
261
|
+
*/
|
262
|
+
WXRUBY_EXPORT swig_cast_info *
|
263
|
+
SWIG_TypeCheck(const char *c, swig_type_info *ty);
|
264
|
+
|
265
|
+
/*
|
266
|
+
Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
|
267
|
+
*/
|
268
|
+
WXRUBY_EXPORT swig_cast_info *
|
269
|
+
SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty);
|
270
|
+
|
271
|
+
/*
|
272
|
+
Cast a pointer up an inheritance hierarchy
|
273
|
+
*/
|
274
|
+
SWIGRUNTIMEINLINE void *
|
275
|
+
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
|
276
|
+
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
|
277
|
+
}
|
278
|
+
|
279
|
+
/*
|
280
|
+
Dynamic pointer casting. Down an inheritance hierarchy
|
281
|
+
*/
|
282
|
+
WXRUBY_EXPORT swig_type_info *
|
283
|
+
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr);
|
284
|
+
|
285
|
+
/*
|
286
|
+
Return the name associated with this type
|
287
|
+
*/
|
288
|
+
SWIGRUNTIMEINLINE const char *
|
289
|
+
SWIG_TypeName(const swig_type_info *ty) {
|
290
|
+
return ty->name;
|
291
|
+
}
|
292
|
+
|
293
|
+
/*
|
294
|
+
Return the pretty name associated with this type,
|
295
|
+
that is an unmangled type name in a form presentable to the user.
|
296
|
+
*/
|
297
|
+
WXRUBY_EXPORT const char *
|
298
|
+
SWIG_TypePrettyName(const swig_type_info *type);
|
299
|
+
|
300
|
+
/*
|
301
|
+
Set the clientdata field for a type
|
302
|
+
*/
|
303
|
+
WXRUBY_EXPORT void
|
304
|
+
SWIG_TypeClientData(swig_type_info *ti, void *clientdata);
|
305
|
+
WXRUBY_EXPORT void
|
306
|
+
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata);
|
307
|
+
|
308
|
+
/*
|
309
|
+
Search for a swig_type_info structure only by mangled name
|
310
|
+
Search is a O(log #types)
|
311
|
+
|
312
|
+
We start searching at module start, and finish searching when start == end.
|
313
|
+
Note: if start == end at the beginning of the function, we go all the way around
|
314
|
+
the circular list.
|
315
|
+
*/
|
316
|
+
WXRUBY_EXPORT swig_type_info *
|
317
|
+
SWIG_MangledTypeQueryModule(swig_module_info *start,
|
318
|
+
swig_module_info *end,
|
319
|
+
const char *name);
|
320
|
+
/*
|
321
|
+
Search for a swig_type_info structure for either a mangled name or a human readable name.
|
322
|
+
It first searches the mangled names of the types, which is a O(log #types)
|
323
|
+
If a type is not found it then searches the human readable names, which is O(#types).
|
324
|
+
|
325
|
+
We start searching at module start, and finish searching when start == end.
|
326
|
+
Note: if start == end at the beginning of the function, we go all the way around
|
327
|
+
the circular list.
|
328
|
+
*/
|
329
|
+
WXRUBY_EXPORT swig_type_info *
|
330
|
+
SWIG_TypeQueryModule(swig_module_info *start,
|
331
|
+
swig_module_info *end,
|
332
|
+
const char *name);
|
333
|
+
|
334
|
+
/*
|
335
|
+
Pack binary data into a string
|
336
|
+
*/
|
337
|
+
WXRUBY_EXPORT char *
|
338
|
+
SWIG_PackData(char *c, void *ptr, size_t sz);
|
339
|
+
|
340
|
+
/*
|
341
|
+
Unpack binary data from a string
|
342
|
+
*/
|
343
|
+
WXRUBY_EXPORT const char *
|
344
|
+
SWIG_UnpackData(const char *c, void *ptr, size_t sz);
|
345
|
+
|
346
|
+
/*
|
347
|
+
Pack 'void *' into a string buffer.
|
348
|
+
*/
|
349
|
+
WXRUBY_EXPORT char *
|
350
|
+
SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz);
|
351
|
+
|
352
|
+
WXRUBY_EXPORT const char *
|
353
|
+
SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name);
|
354
|
+
|
355
|
+
WXRUBY_EXPORT char *
|
356
|
+
SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz);
|
357
|
+
|
358
|
+
WXRUBY_EXPORT const char *
|
359
|
+
SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name);
|
360
|
+
|
361
|
+
#ifdef __cplusplus
|
362
|
+
}
|
363
|
+
#endif
|