]>
Commit | Line | Data |
---|---|---|
e91a9dfc | 1 | /* |
c368d904 | 2 | * FILE : contrib/ogl/ogl.cpp |
e91a9dfc RD |
3 | * |
4 | * This file was automatically generated by : | |
5 | * Simplified Wrapper and Interface Generator (SWIG) | |
185d7c3e | 6 | * Version 1.1 (Build 883) |
e91a9dfc RD |
7 | * |
8 | * Portions Copyright (c) 1995-1998 | |
9 | * The University of Utah and The Regents of the University of California. | |
10 | * Permission is granted to distribute this file in any manner provided | |
11 | * this notice remains intact. | |
12 | * | |
13 | * Do not make changes to this file--changes will be lost! | |
14 | * | |
15 | */ | |
16 | ||
17 | ||
18 | #define SWIGCODE | |
19 | /* Implementation : PYTHON */ | |
20 | ||
21 | #define SWIGPYTHON | |
22 | #include <string.h> | |
23 | #include <stdlib.h> | |
24 | /* Definitions for Windows/Unix exporting */ | |
25 | #if defined(__WIN32__) | |
26 | # if defined(_MSC_VER) | |
27 | # define SWIGEXPORT(a) __declspec(dllexport) a | |
28 | # else | |
29 | # if defined(__BORLANDC__) | |
9ae9011b | 30 | # define SWIGEXPORT(a) a _export |
e91a9dfc | 31 | # else |
9ae9011b | 32 | # define SWIGEXPORT(a) a |
e91a9dfc RD |
33 | # endif |
34 | # endif | |
35 | #else | |
9ae9011b | 36 | # define SWIGEXPORT(a) a |
e91a9dfc RD |
37 | #endif |
38 | ||
9ae9011b RD |
39 | #include "Python.h" |
40 | ||
e91a9dfc RD |
41 | #ifdef __cplusplus |
42 | extern "C" { | |
43 | #endif | |
9ae9011b | 44 | |
e91a9dfc RD |
45 | extern void SWIG_MakePtr(char *, void *, char *); |
46 | extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); | |
47 | extern char *SWIG_GetPtr(char *, void **, char *); | |
48 | extern char *SWIG_GetPtrObj(PyObject *, void **, char *); | |
49 | extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); | |
50 | extern PyObject *SWIG_newvarlink(void); | |
51 | #ifdef __cplusplus | |
52 | } | |
53 | #endif | |
54 | #define SWIG_init initoglc | |
55 | ||
56 | #define SWIG_name "oglc" | |
57 | ||
1e7ecb7b | 58 | #include "export.h" |
e91a9dfc | 59 | #include "oglhelpers.h" |
e91a9dfc | 60 | |
e91a9dfc RD |
61 | |
62 | static PyObject* t_output_helper(PyObject* target, PyObject* o) { | |
63 | PyObject* o2; | |
64 | PyObject* o3; | |
65 | ||
d74525f7 | 66 | if (!target) { |
e91a9dfc | 67 | target = o; |
d74525f7 | 68 | } else if (target == Py_None) { |
e91a9dfc RD |
69 | Py_DECREF(Py_None); |
70 | target = o; | |
d74525f7 | 71 | } else { |
e91a9dfc RD |
72 | if (!PyTuple_Check(target)) { |
73 | o2 = target; | |
74 | target = PyTuple_New(1); | |
75 | PyTuple_SetItem(target, 0, o2); | |
76 | } | |
d74525f7 RD |
77 | o3 = PyTuple_New(1); |
78 | PyTuple_SetItem(o3, 0, o); | |
e91a9dfc RD |
79 | |
80 | o2 = target; | |
d74525f7 RD |
81 | target = PySequence_Concat(o2, o3); |
82 | Py_DECREF(o2); | |
e91a9dfc RD |
83 | Py_DECREF(o3); |
84 | } | |
85 | return target; | |
86 | } | |
87 | ||
7a446686 RD |
88 | #if PYTHON_API_VERSION >= 1009 |
89 | static char* wxStringErrorMsg = "String or Unicode type required"; | |
90 | #else | |
91 | static char* wxStringErrorMsg = "string type is required for parameter"; | |
92 | #endif | |
e91a9dfc | 93 | |
1e7ecb7b RD |
94 | //--------------------------------------------------------------------------- |
95 | // This one will work for any class for the VERY generic cases, but beyond that | |
96 | // the helper needs to know more about the type. | |
97 | ||
98 | wxList* wxPy_wxListHelper(PyObject* pyList, char* className) { | |
99 | bool doSave = wxPyRestoreThread(); | |
100 | if (!PyList_Check(pyList)) { | |
101 | PyErr_SetString(PyExc_TypeError, "Expected a list object."); | |
102 | wxPySaveThread(doSave); | |
103 | return NULL; | |
104 | } | |
105 | int count = PyList_Size(pyList); | |
106 | wxList* list = new wxList; | |
107 | if (! list) { | |
108 | PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object"); | |
109 | wxPySaveThread(doSave); | |
110 | return NULL; | |
111 | } | |
112 | for (int x=0; x<count; x++) { | |
113 | PyObject* pyo = PyList_GetItem(pyList, x); | |
114 | wxObject* wxo = NULL; | |
115 | ||
116 | if (SWIG_GetPtrObj(pyo, (void **)&wxo, className)) { | |
117 | char errmsg[1024]; | |
118 | sprintf(errmsg, "Type error, expected list of %s objects", className); | |
119 | PyErr_SetString(PyExc_TypeError, errmsg); | |
120 | wxPySaveThread(doSave); | |
121 | return NULL; | |
122 | } | |
123 | list->Append(wxo); | |
124 | } | |
125 | wxPySaveThread(doSave); | |
126 | return list; | |
127 | } | |
128 | ||
129 | //--------------------------------------------------------------------------- | |
130 | ||
131 | wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) { | |
132 | bool doSave = wxPyRestoreThread(); | |
133 | if (!PyList_Check(pyList)) { | |
134 | PyErr_SetString(PyExc_TypeError, "Expected a list object."); | |
135 | wxPySaveThread(doSave); | |
136 | return NULL; | |
137 | } | |
138 | int count = PyList_Size(pyList); | |
139 | wxList* list = new wxList; | |
140 | if (! list) { | |
141 | PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object"); | |
142 | wxPySaveThread(doSave); | |
143 | return NULL; | |
144 | } | |
145 | for (int x=0; x<count; x++) { | |
146 | PyObject* pyo = PyList_GetItem(pyList, x); | |
147 | ||
148 | if (PyTuple_Check(pyo)) { | |
149 | PyObject* o1 = PyNumber_Float(PyTuple_GetItem(pyo, 0)); | |
150 | PyObject* o2 = PyNumber_Float(PyTuple_GetItem(pyo, 1)); | |
151 | ||
152 | double val1 = (o1 ? PyFloat_AsDouble(o1) : 0.0); | |
153 | double val2 = (o2 ? PyFloat_AsDouble(o2) : 0.0); | |
154 | ||
155 | list->Append((wxObject*) new wxRealPoint(val1, val2)); | |
156 | ||
157 | } else { | |
158 | wxRealPoint* wxo = NULL; | |
159 | if (SWIG_GetPtrObj(pyo, (void **)&wxo, "_wxRealPoint_p")) { | |
160 | PyErr_SetString(PyExc_TypeError, "Type error, expected list of wxRealPoint objects or 2-tuples"); | |
161 | wxPySaveThread(doSave); | |
162 | return NULL; | |
163 | } | |
164 | list->Append((wxObject*) new wxRealPoint(*wxo)); | |
165 | } | |
166 | } | |
167 | wxPySaveThread(doSave); | |
168 | return list; | |
169 | } | |
170 | ||
171 | ||
172 | //--------------------------------------------------------------------------- | |
173 | ||
9416aa89 RD |
174 | IMPLEMENT_DYNAMIC_CLASS(wxPyShapeCanvas, wxShapeCanvas); |
175 | IMPLEMENT_DYNAMIC_CLASS(wxPyShapeEvtHandler, wxShapeEvtHandler); | |
176 | IMPLEMENT_ABSTRACT_CLASS(wxPyShape, wxShape); | |
177 | IMPLEMENT_DYNAMIC_CLASS(wxPyRectangleShape, wxRectangleShape); | |
178 | IMPLEMENT_DYNAMIC_CLASS(wxPyControlPoint, wxControlPoint); | |
179 | IMPLEMENT_DYNAMIC_CLASS(wxPyBitmapShape, wxBitmapShape); | |
180 | IMPLEMENT_DYNAMIC_CLASS(wxPyDrawnShape, wxDrawnShape); | |
181 | IMPLEMENT_DYNAMIC_CLASS(wxPyCompositeShape, wxCompositeShape); | |
182 | IMPLEMENT_DYNAMIC_CLASS(wxPyDividedShape, wxDividedShape); | |
183 | IMPLEMENT_DYNAMIC_CLASS(wxPyDivisionShape, wxDivisionShape); | |
184 | IMPLEMENT_DYNAMIC_CLASS(wxPyEllipseShape, wxEllipseShape); | |
185 | IMPLEMENT_DYNAMIC_CLASS(wxPyCircleShape, wxCircleShape); | |
186 | IMPLEMENT_DYNAMIC_CLASS(wxPyLineShape, wxLineShape); | |
187 | IMPLEMENT_DYNAMIC_CLASS(wxPyPolygonShape, wxPolygonShape); | |
188 | IMPLEMENT_DYNAMIC_CLASS(wxPyTextShape, wxTextShape); | |
189 | ||
190 | //--------------------------------------------------------------------------- | |
1e7ecb7b | 191 | |
e91a9dfc RD |
192 | extern "C" SWIGEXPORT(void) initoglbasicc(); |
193 | extern "C" SWIGEXPORT(void) initoglshapesc(); | |
194 | extern "C" SWIGEXPORT(void) initoglshapes2c(); | |
195 | extern "C" SWIGEXPORT(void) initoglcanvasc(); | |
196 | #ifdef __cplusplus | |
197 | extern "C" { | |
198 | #endif | |
199 | static PyObject *_wrap_wxOGLInitialize(PyObject *self, PyObject *args, PyObject *kwargs) { | |
200 | PyObject * _resultobj; | |
201 | char *_kwnames[] = { NULL }; | |
202 | ||
203 | self = self; | |
204 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxOGLInitialize",_kwnames)) | |
205 | return NULL; | |
206 | { | |
207 | wxPy_BEGIN_ALLOW_THREADS; | |
208 | wxOGLInitialize(); | |
209 | ||
210 | wxPy_END_ALLOW_THREADS; | |
211 | } Py_INCREF(Py_None); | |
212 | _resultobj = Py_None; | |
213 | return _resultobj; | |
214 | } | |
215 | ||
216 | static PyObject *_wrap_wxOGLCleanUp(PyObject *self, PyObject *args, PyObject *kwargs) { | |
217 | PyObject * _resultobj; | |
218 | char *_kwnames[] = { NULL }; | |
219 | ||
220 | self = self; | |
221 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxOGLCleanUp",_kwnames)) | |
222 | return NULL; | |
223 | { | |
224 | wxPy_BEGIN_ALLOW_THREADS; | |
225 | wxOGLCleanUp(); | |
226 | ||
227 | wxPy_END_ALLOW_THREADS; | |
228 | } Py_INCREF(Py_None); | |
229 | _resultobj = Py_None; | |
230 | return _resultobj; | |
231 | } | |
232 | ||
233 | static PyMethodDef oglcMethods[] = { | |
234 | { "wxOGLCleanUp", (PyCFunction) _wrap_wxOGLCleanUp, METH_VARARGS | METH_KEYWORDS }, | |
235 | { "wxOGLInitialize", (PyCFunction) _wrap_wxOGLInitialize, METH_VARARGS | METH_KEYWORDS }, | |
236 | { NULL, NULL } | |
237 | }; | |
238 | #ifdef __cplusplus | |
239 | } | |
240 | #endif | |
241 | /* | |
242 | * This table is used by the pointer type-checker | |
243 | */ | |
244 | static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { | |
e91a9dfc | 245 | { "_signed_long","_long",0}, |
4c9993c3 | 246 | { "_wxPrintQuality","_wxCoord",0}, |
e91a9dfc RD |
247 | { "_wxPrintQuality","_int",0}, |
248 | { "_wxPrintQuality","_signed_int",0}, | |
249 | { "_wxPrintQuality","_unsigned_int",0}, | |
250 | { "_wxPrintQuality","_wxWindowID",0}, | |
251 | { "_wxPrintQuality","_uint",0}, | |
252 | { "_wxPrintQuality","_EBool",0}, | |
253 | { "_wxPrintQuality","_size_t",0}, | |
c368d904 | 254 | { "_wxPrintQuality","_time_t",0}, |
e91a9dfc | 255 | { "_byte","_unsigned_char",0}, |
e91a9dfc RD |
256 | { "_long","_unsigned_long",0}, |
257 | { "_long","_signed_long",0}, | |
4c9993c3 | 258 | { "_size_t","_wxCoord",0}, |
e91a9dfc | 259 | { "_size_t","_wxPrintQuality",0}, |
c368d904 | 260 | { "_size_t","_time_t",0}, |
e91a9dfc RD |
261 | { "_size_t","_unsigned_int",0}, |
262 | { "_size_t","_int",0}, | |
263 | { "_size_t","_wxWindowID",0}, | |
264 | { "_size_t","_uint",0}, | |
4c9993c3 | 265 | { "_uint","_wxCoord",0}, |
e91a9dfc | 266 | { "_uint","_wxPrintQuality",0}, |
c368d904 | 267 | { "_uint","_time_t",0}, |
e91a9dfc RD |
268 | { "_uint","_size_t",0}, |
269 | { "_uint","_unsigned_int",0}, | |
270 | { "_uint","_int",0}, | |
271 | { "_uint","_wxWindowID",0}, | |
c368d904 | 272 | { "_wxChar","_char",0}, |
c368d904 | 273 | { "_char","_wxChar",0}, |
4c9993c3 | 274 | { "_EBool","_wxCoord",0}, |
e91a9dfc RD |
275 | { "_EBool","_wxPrintQuality",0}, |
276 | { "_EBool","_signed_int",0}, | |
277 | { "_EBool","_int",0}, | |
278 | { "_EBool","_wxWindowID",0}, | |
e91a9dfc | 279 | { "_unsigned_long","_long",0}, |
4c9993c3 | 280 | { "_signed_int","_wxCoord",0}, |
e91a9dfc RD |
281 | { "_signed_int","_wxPrintQuality",0}, |
282 | { "_signed_int","_EBool",0}, | |
283 | { "_signed_int","_wxWindowID",0}, | |
284 | { "_signed_int","_int",0}, | |
c368d904 | 285 | { "_WXTYPE","_wxDateTime_t",0}, |
e91a9dfc RD |
286 | { "_WXTYPE","_short",0}, |
287 | { "_WXTYPE","_signed_short",0}, | |
288 | { "_WXTYPE","_unsigned_short",0}, | |
c368d904 | 289 | { "_unsigned_short","_wxDateTime_t",0}, |
e91a9dfc RD |
290 | { "_unsigned_short","_WXTYPE",0}, |
291 | { "_unsigned_short","_short",0}, | |
e91a9dfc RD |
292 | { "_signed_short","_WXTYPE",0}, |
293 | { "_signed_short","_short",0}, | |
e91a9dfc | 294 | { "_unsigned_char","_byte",0}, |
4c9993c3 | 295 | { "_unsigned_int","_wxCoord",0}, |
e91a9dfc | 296 | { "_unsigned_int","_wxPrintQuality",0}, |
c368d904 | 297 | { "_unsigned_int","_time_t",0}, |
e91a9dfc RD |
298 | { "_unsigned_int","_size_t",0}, |
299 | { "_unsigned_int","_uint",0}, | |
300 | { "_unsigned_int","_wxWindowID",0}, | |
301 | { "_unsigned_int","_int",0}, | |
c368d904 | 302 | { "_short","_wxDateTime_t",0}, |
e91a9dfc RD |
303 | { "_short","_WXTYPE",0}, |
304 | { "_short","_unsigned_short",0}, | |
305 | { "_short","_signed_short",0}, | |
4c9993c3 | 306 | { "_wxWindowID","_wxCoord",0}, |
e91a9dfc | 307 | { "_wxWindowID","_wxPrintQuality",0}, |
c368d904 | 308 | { "_wxWindowID","_time_t",0}, |
e91a9dfc RD |
309 | { "_wxWindowID","_size_t",0}, |
310 | { "_wxWindowID","_EBool",0}, | |
311 | { "_wxWindowID","_uint",0}, | |
312 | { "_wxWindowID","_int",0}, | |
313 | { "_wxWindowID","_signed_int",0}, | |
314 | { "_wxWindowID","_unsigned_int",0}, | |
4c9993c3 | 315 | { "_int","_wxCoord",0}, |
e91a9dfc | 316 | { "_int","_wxPrintQuality",0}, |
c368d904 | 317 | { "_int","_time_t",0}, |
e91a9dfc RD |
318 | { "_int","_size_t",0}, |
319 | { "_int","_EBool",0}, | |
320 | { "_int","_uint",0}, | |
321 | { "_int","_wxWindowID",0}, | |
322 | { "_int","_unsigned_int",0}, | |
323 | { "_int","_signed_int",0}, | |
c368d904 RD |
324 | { "_wxDateTime_t","_unsigned_short",0}, |
325 | { "_wxDateTime_t","_short",0}, | |
326 | { "_wxDateTime_t","_WXTYPE",0}, | |
c368d904 RD |
327 | { "_time_t","_wxCoord",0}, |
328 | { "_time_t","_wxPrintQuality",0}, | |
329 | { "_time_t","_unsigned_int",0}, | |
330 | { "_time_t","_int",0}, | |
331 | { "_time_t","_wxWindowID",0}, | |
332 | { "_time_t","_uint",0}, | |
333 | { "_time_t","_size_t",0}, | |
4c9993c3 RD |
334 | { "_wxCoord","_int",0}, |
335 | { "_wxCoord","_signed_int",0}, | |
336 | { "_wxCoord","_unsigned_int",0}, | |
337 | { "_wxCoord","_wxWindowID",0}, | |
338 | { "_wxCoord","_uint",0}, | |
339 | { "_wxCoord","_EBool",0}, | |
340 | { "_wxCoord","_size_t",0}, | |
c368d904 | 341 | { "_wxCoord","_time_t",0}, |
4c9993c3 | 342 | { "_wxCoord","_wxPrintQuality",0}, |
e91a9dfc RD |
343 | {0,0,0}}; |
344 | ||
345 | static PyObject *SWIG_globals; | |
346 | #ifdef __cplusplus | |
347 | extern "C" | |
348 | #endif | |
349 | SWIGEXPORT(void) initoglc() { | |
350 | PyObject *m, *d; | |
351 | SWIG_globals = SWIG_newvarlink(); | |
352 | m = Py_InitModule("oglc", oglcMethods); | |
353 | d = PyModule_GetDict(m); | |
354 | PyDict_SetItemString(d,"KEY_SHIFT", PyInt_FromLong((long) KEY_SHIFT)); | |
355 | PyDict_SetItemString(d,"KEY_CTRL", PyInt_FromLong((long) KEY_CTRL)); | |
356 | PyDict_SetItemString(d,"ARROW_NONE", PyInt_FromLong((long) ARROW_NONE)); | |
357 | PyDict_SetItemString(d,"ARROW_END", PyInt_FromLong((long) ARROW_END)); | |
358 | PyDict_SetItemString(d,"ARROW_BOTH", PyInt_FromLong((long) ARROW_BOTH)); | |
359 | PyDict_SetItemString(d,"ARROW_MIDDLE", PyInt_FromLong((long) ARROW_MIDDLE)); | |
360 | PyDict_SetItemString(d,"ARROW_START", PyInt_FromLong((long) ARROW_START)); | |
361 | PyDict_SetItemString(d,"ARROW_HOLLOW_CIRCLE", PyInt_FromLong((long) ARROW_HOLLOW_CIRCLE)); | |
362 | PyDict_SetItemString(d,"ARROW_FILLED_CIRCLE", PyInt_FromLong((long) ARROW_FILLED_CIRCLE)); | |
363 | PyDict_SetItemString(d,"ARROW_ARROW", PyInt_FromLong((long) ARROW_ARROW)); | |
364 | PyDict_SetItemString(d,"ARROW_SINGLE_OBLIQUE", PyInt_FromLong((long) ARROW_SINGLE_OBLIQUE)); | |
365 | PyDict_SetItemString(d,"ARROW_DOUBLE_OBLIQUE", PyInt_FromLong((long) ARROW_DOUBLE_OBLIQUE)); | |
366 | PyDict_SetItemString(d,"ARROW_METAFILE", PyInt_FromLong((long) ARROW_METAFILE)); | |
367 | PyDict_SetItemString(d,"ARROW_POSITION_END", PyInt_FromLong((long) ARROW_POSITION_END)); | |
368 | PyDict_SetItemString(d,"ARROW_POSITION_START", PyInt_FromLong((long) ARROW_POSITION_START)); | |
369 | PyDict_SetItemString(d,"CONTROL_POINT_VERTICAL", PyInt_FromLong((long) CONTROL_POINT_VERTICAL)); | |
370 | PyDict_SetItemString(d,"CONTROL_POINT_HORIZONTAL", PyInt_FromLong((long) CONTROL_POINT_HORIZONTAL)); | |
371 | PyDict_SetItemString(d,"CONTROL_POINT_DIAGONAL", PyInt_FromLong((long) CONTROL_POINT_DIAGONAL)); | |
372 | PyDict_SetItemString(d,"CONTROL_POINT_ENDPOINT_TO", PyInt_FromLong((long) CONTROL_POINT_ENDPOINT_TO)); | |
373 | PyDict_SetItemString(d,"CONTROL_POINT_ENDPOINT_FROM", PyInt_FromLong((long) CONTROL_POINT_ENDPOINT_FROM)); | |
374 | PyDict_SetItemString(d,"CONTROL_POINT_LINE", PyInt_FromLong((long) CONTROL_POINT_LINE)); | |
375 | PyDict_SetItemString(d,"FORMAT_NONE", PyInt_FromLong((long) FORMAT_NONE)); | |
376 | PyDict_SetItemString(d,"FORMAT_CENTRE_HORIZ", PyInt_FromLong((long) FORMAT_CENTRE_HORIZ)); | |
377 | PyDict_SetItemString(d,"FORMAT_CENTRE_VERT", PyInt_FromLong((long) FORMAT_CENTRE_VERT)); | |
378 | PyDict_SetItemString(d,"FORMAT_SIZE_TO_CONTENTS", PyInt_FromLong((long) FORMAT_SIZE_TO_CONTENTS)); | |
379 | PyDict_SetItemString(d,"LINE_ALIGNMENT_HORIZ", PyInt_FromLong((long) LINE_ALIGNMENT_HORIZ)); | |
380 | PyDict_SetItemString(d,"LINE_ALIGNMENT_VERT", PyInt_FromLong((long) LINE_ALIGNMENT_VERT)); | |
381 | PyDict_SetItemString(d,"LINE_ALIGNMENT_TO_NEXT_HANDLE", PyInt_FromLong((long) LINE_ALIGNMENT_TO_NEXT_HANDLE)); | |
382 | PyDict_SetItemString(d,"LINE_ALIGNMENT_NONE", PyInt_FromLong((long) LINE_ALIGNMENT_NONE)); | |
383 | PyDict_SetItemString(d,"SHADOW_NONE", PyInt_FromLong((long) SHADOW_NONE)); | |
384 | PyDict_SetItemString(d,"SHADOW_LEFT", PyInt_FromLong((long) SHADOW_LEFT)); | |
385 | PyDict_SetItemString(d,"SHADOW_RIGHT", PyInt_FromLong((long) SHADOW_RIGHT)); | |
386 | PyDict_SetItemString(d,"OP_CLICK_LEFT", PyInt_FromLong((long) OP_CLICK_LEFT)); | |
387 | PyDict_SetItemString(d,"OP_CLICK_RIGHT", PyInt_FromLong((long) OP_CLICK_RIGHT)); | |
388 | PyDict_SetItemString(d,"OP_DRAG_LEFT", PyInt_FromLong((long) OP_DRAG_LEFT)); | |
389 | PyDict_SetItemString(d,"OP_DRAG_RIGHT", PyInt_FromLong((long) OP_DRAG_RIGHT)); | |
390 | PyDict_SetItemString(d,"OP_ALL", PyInt_FromLong((long) OP_ALL)); | |
391 | PyDict_SetItemString(d,"ATTACHMENT_MODE_NONE", PyInt_FromLong((long) ATTACHMENT_MODE_NONE)); | |
392 | PyDict_SetItemString(d,"ATTACHMENT_MODE_EDGE", PyInt_FromLong((long) ATTACHMENT_MODE_EDGE)); | |
393 | PyDict_SetItemString(d,"ATTACHMENT_MODE_BRANCHING", PyInt_FromLong((long) ATTACHMENT_MODE_BRANCHING)); | |
394 | PyDict_SetItemString(d,"BRANCHING_ATTACHMENT_NORMAL", PyInt_FromLong((long) BRANCHING_ATTACHMENT_NORMAL)); | |
395 | PyDict_SetItemString(d,"BRANCHING_ATTACHMENT_BLOB", PyInt_FromLong((long) BRANCHING_ATTACHMENT_BLOB)); | |
396 | PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_VERTICALLY", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_VERTICALLY)); | |
397 | PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_HORIZONTALLY", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_HORIZONTALLY)); | |
398 | PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_BOTH", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_BOTH)); | |
399 | PyDict_SetItemString(d,"gyCONSTRAINT_LEFT_OF", PyInt_FromLong((long) gyCONSTRAINT_LEFT_OF)); | |
400 | PyDict_SetItemString(d,"gyCONSTRAINT_RIGHT_OF", PyInt_FromLong((long) gyCONSTRAINT_RIGHT_OF)); | |
401 | PyDict_SetItemString(d,"gyCONSTRAINT_ABOVE", PyInt_FromLong((long) gyCONSTRAINT_ABOVE)); | |
402 | PyDict_SetItemString(d,"gyCONSTRAINT_BELOW", PyInt_FromLong((long) gyCONSTRAINT_BELOW)); | |
403 | PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_TOP", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_TOP)); | |
404 | PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_BOTTOM", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_BOTTOM)); | |
405 | PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_LEFT", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_LEFT)); | |
406 | PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_RIGHT", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_RIGHT)); | |
407 | PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_TOP", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_TOP)); | |
408 | PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_BOTTOM", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_BOTTOM)); | |
409 | PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_LEFT", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_LEFT)); | |
410 | PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_RIGHT", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_RIGHT)); | |
411 | PyDict_SetItemString(d,"DIVISION_SIDE_NONE", PyInt_FromLong((long) DIVISION_SIDE_NONE)); | |
412 | PyDict_SetItemString(d,"DIVISION_SIDE_LEFT", PyInt_FromLong((long) DIVISION_SIDE_LEFT)); | |
413 | PyDict_SetItemString(d,"DIVISION_SIDE_TOP", PyInt_FromLong((long) DIVISION_SIDE_TOP)); | |
414 | PyDict_SetItemString(d,"DIVISION_SIDE_RIGHT", PyInt_FromLong((long) DIVISION_SIDE_RIGHT)); | |
415 | PyDict_SetItemString(d,"DIVISION_SIDE_BOTTOM", PyInt_FromLong((long) DIVISION_SIDE_BOTTOM)); | |
416 | ||
417 | ||
418 | initoglbasicc(); | |
419 | initoglshapesc(); | |
420 | initoglshapes2c(); | |
421 | initoglcanvasc(); | |
422 | ||
423 | ||
e508a2b6 RD |
424 | wxClassInfo::CleanUpClasses(); |
425 | wxClassInfo::InitializeClasses(); | |
e91a9dfc | 426 | |
856e03b7 RD |
427 | wxPyPtrTypeMap_Add("wxControlPoint", "wxPyControlPoint"); |
428 | wxPyPtrTypeMap_Add("wxShapeCanvas", "wxPyShapeCanvas"); | |
429 | wxPyPtrTypeMap_Add("wxShapeEvtHandler", "wxPyShapeEvtHandler"); | |
430 | wxPyPtrTypeMap_Add("wxShape", "wxPyShape"); | |
431 | wxPyPtrTypeMap_Add("wxRectangleShape", "wxPyRectangleShape"); | |
432 | wxPyPtrTypeMap_Add("wxDrawnShape", "wxPyDrawnShape"); | |
433 | wxPyPtrTypeMap_Add("wxCompositeShape", "wxPyCompositeShape"); | |
434 | wxPyPtrTypeMap_Add("wxDividedShape", "wxPyDividedShape"); | |
435 | wxPyPtrTypeMap_Add("wxDivisionShape", "wxPyDivisionShape"); | |
436 | wxPyPtrTypeMap_Add("wxEllipseShape", "wxPyEllipseShape"); | |
437 | wxPyPtrTypeMap_Add("wxCircleShape", "wxPyCircleShape"); | |
438 | wxPyPtrTypeMap_Add("wxLineShape", "wxPyLineShape"); | |
439 | wxPyPtrTypeMap_Add("wxPolygonShape", "wxPyPolygonShape"); | |
440 | wxPyPtrTypeMap_Add("wxTextShape", "wxPyTextShape"); | |
441 | ||
e91a9dfc RD |
442 | { |
443 | int i; | |
444 | for (i = 0; _swig_mapping[i].n1; i++) | |
445 | SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); | |
446 | } | |
447 | } |