]>
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 | ||
6e2129f9 | 58 | #include "wxPython.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 | ||
1e7ecb7b RD |
88 | //--------------------------------------------------------------------------- |
89 | // This one will work for any class for the VERY generic cases, but beyond that | |
90 | // the helper needs to know more about the type. | |
91 | ||
92 | wxList* wxPy_wxListHelper(PyObject* pyList, char* className) { | |
4268f798 | 93 | wxPyBeginBlockThreads(); |
1e7ecb7b RD |
94 | if (!PyList_Check(pyList)) { |
95 | PyErr_SetString(PyExc_TypeError, "Expected a list object."); | |
4268f798 | 96 | wxPyEndBlockThreads(); |
1e7ecb7b RD |
97 | return NULL; |
98 | } | |
99 | int count = PyList_Size(pyList); | |
100 | wxList* list = new wxList; | |
101 | if (! list) { | |
102 | PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object"); | |
4268f798 | 103 | wxPyEndBlockThreads(); |
1e7ecb7b RD |
104 | return NULL; |
105 | } | |
106 | for (int x=0; x<count; x++) { | |
107 | PyObject* pyo = PyList_GetItem(pyList, x); | |
108 | wxObject* wxo = NULL; | |
109 | ||
110 | if (SWIG_GetPtrObj(pyo, (void **)&wxo, className)) { | |
111 | char errmsg[1024]; | |
112 | sprintf(errmsg, "Type error, expected list of %s objects", className); | |
113 | PyErr_SetString(PyExc_TypeError, errmsg); | |
4268f798 | 114 | wxPyEndBlockThreads(); |
1e7ecb7b RD |
115 | return NULL; |
116 | } | |
117 | list->Append(wxo); | |
118 | } | |
4268f798 | 119 | wxPyEndBlockThreads(); |
1e7ecb7b RD |
120 | return list; |
121 | } | |
122 | ||
123 | //--------------------------------------------------------------------------- | |
124 | ||
125 | wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) { | |
4268f798 | 126 | wxPyBeginBlockThreads(); |
1e7ecb7b RD |
127 | if (!PyList_Check(pyList)) { |
128 | PyErr_SetString(PyExc_TypeError, "Expected a list object."); | |
4268f798 | 129 | wxPyEndBlockThreads(); |
1e7ecb7b RD |
130 | return NULL; |
131 | } | |
132 | int count = PyList_Size(pyList); | |
133 | wxList* list = new wxList; | |
134 | if (! list) { | |
135 | PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object"); | |
4268f798 | 136 | wxPyEndBlockThreads(); |
1e7ecb7b RD |
137 | return NULL; |
138 | } | |
139 | for (int x=0; x<count; x++) { | |
140 | PyObject* pyo = PyList_GetItem(pyList, x); | |
141 | ||
142 | if (PyTuple_Check(pyo)) { | |
143 | PyObject* o1 = PyNumber_Float(PyTuple_GetItem(pyo, 0)); | |
144 | PyObject* o2 = PyNumber_Float(PyTuple_GetItem(pyo, 1)); | |
145 | ||
146 | double val1 = (o1 ? PyFloat_AsDouble(o1) : 0.0); | |
147 | double val2 = (o2 ? PyFloat_AsDouble(o2) : 0.0); | |
148 | ||
149 | list->Append((wxObject*) new wxRealPoint(val1, val2)); | |
150 | ||
151 | } else { | |
152 | wxRealPoint* wxo = NULL; | |
153 | if (SWIG_GetPtrObj(pyo, (void **)&wxo, "_wxRealPoint_p")) { | |
154 | PyErr_SetString(PyExc_TypeError, "Type error, expected list of wxRealPoint objects or 2-tuples"); | |
4268f798 | 155 | wxPyEndBlockThreads(); |
1e7ecb7b RD |
156 | return NULL; |
157 | } | |
158 | list->Append((wxObject*) new wxRealPoint(*wxo)); | |
159 | } | |
160 | } | |
4268f798 | 161 | wxPyEndBlockThreads(); |
1e7ecb7b RD |
162 | return list; |
163 | } | |
164 | ||
2f4e9287 RD |
165 | //--------------------------------------------------------------------------- |
166 | ||
167 | PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) { | |
168 | PyObject* target = NULL; | |
169 | ||
170 | if (source && wxIsKindOf(source, wxShapeEvtHandler)) { | |
171 | // If it's derived from wxShapeEvtHandler then there may | |
172 | // already be a pointer to a Python object that we can use | |
173 | // in the OOR data. | |
174 | wxShapeEvtHandler* seh = (wxShapeEvtHandler*)source; | |
4acff284 | 175 | wxPyOORClientData* data = (wxPyOORClientData*)seh->GetClientObject(); |
2f4e9287 RD |
176 | if (data) { |
177 | target = data->m_obj; | |
178 | Py_INCREF(target); | |
179 | } | |
180 | } | |
181 | if (! target) { | |
182 | target = wxPyMake_wxObject2(source, FALSE); | |
183 | if (target != Py_None) | |
4acff284 | 184 | ((wxShapeEvtHandler*)source)->SetClientObject(new wxPyOORClientData(target)); |
2f4e9287 RD |
185 | } |
186 | return target; | |
187 | } | |
188 | ||
c893f25d RD |
189 | //--------------------------------------------------------------------------- |
190 | ||
191 | PyObject* wxPy_ConvertShapeList(wxListBase* list, const char* className) { | |
192 | PyObject* pyList; | |
193 | PyObject* pyObj; | |
194 | wxObject* wxObj; | |
195 | wxNode* node = list->First(); | |
196 | ||
197 | wxPyBeginBlockThreads(); | |
198 | pyList = PyList_New(0); | |
199 | while (node) { | |
200 | wxObj = node->Data(); | |
201 | pyObj = wxPyMake_wxShapeEvtHandler((wxShapeEvtHandler*)wxObj); | |
202 | PyList_Append(pyList, pyObj); | |
203 | node = node->Next(); | |
204 | } | |
205 | wxPyEndBlockThreads(); | |
206 | return pyList; | |
207 | } | |
2f4e9287 | 208 | |
1e7ecb7b RD |
209 | |
210 | //--------------------------------------------------------------------------- | |
211 | ||
9416aa89 RD |
212 | IMPLEMENT_DYNAMIC_CLASS(wxPyShapeCanvas, wxShapeCanvas); |
213 | IMPLEMENT_DYNAMIC_CLASS(wxPyShapeEvtHandler, wxShapeEvtHandler); | |
214 | IMPLEMENT_ABSTRACT_CLASS(wxPyShape, wxShape); | |
215 | IMPLEMENT_DYNAMIC_CLASS(wxPyRectangleShape, wxRectangleShape); | |
216 | IMPLEMENT_DYNAMIC_CLASS(wxPyControlPoint, wxControlPoint); | |
217 | IMPLEMENT_DYNAMIC_CLASS(wxPyBitmapShape, wxBitmapShape); | |
218 | IMPLEMENT_DYNAMIC_CLASS(wxPyDrawnShape, wxDrawnShape); | |
219 | IMPLEMENT_DYNAMIC_CLASS(wxPyCompositeShape, wxCompositeShape); | |
220 | IMPLEMENT_DYNAMIC_CLASS(wxPyDividedShape, wxDividedShape); | |
221 | IMPLEMENT_DYNAMIC_CLASS(wxPyDivisionShape, wxDivisionShape); | |
222 | IMPLEMENT_DYNAMIC_CLASS(wxPyEllipseShape, wxEllipseShape); | |
223 | IMPLEMENT_DYNAMIC_CLASS(wxPyCircleShape, wxCircleShape); | |
224 | IMPLEMENT_DYNAMIC_CLASS(wxPyLineShape, wxLineShape); | |
225 | IMPLEMENT_DYNAMIC_CLASS(wxPyPolygonShape, wxPolygonShape); | |
226 | IMPLEMENT_DYNAMIC_CLASS(wxPyTextShape, wxTextShape); | |
227 | ||
228 | //--------------------------------------------------------------------------- | |
1e7ecb7b | 229 | |
e91a9dfc RD |
230 | extern "C" SWIGEXPORT(void) initoglbasicc(); |
231 | extern "C" SWIGEXPORT(void) initoglshapesc(); | |
232 | extern "C" SWIGEXPORT(void) initoglshapes2c(); | |
233 | extern "C" SWIGEXPORT(void) initoglcanvasc(); | |
234 | #ifdef __cplusplus | |
235 | extern "C" { | |
236 | #endif | |
237 | static PyObject *_wrap_wxOGLInitialize(PyObject *self, PyObject *args, PyObject *kwargs) { | |
238 | PyObject * _resultobj; | |
239 | char *_kwnames[] = { NULL }; | |
240 | ||
241 | self = self; | |
242 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxOGLInitialize",_kwnames)) | |
243 | return NULL; | |
244 | { | |
4268f798 | 245 | PyThreadState* __tstate = wxPyBeginAllowThreads(); |
c8bc7bb8 | 246 | wxOGLInitialize(); |
e91a9dfc | 247 | |
4268f798 RD |
248 | wxPyEndAllowThreads(__tstate); |
249 | if (PyErr_Occurred()) return NULL; | |
e91a9dfc RD |
250 | } Py_INCREF(Py_None); |
251 | _resultobj = Py_None; | |
252 | return _resultobj; | |
253 | } | |
254 | ||
255 | static PyObject *_wrap_wxOGLCleanUp(PyObject *self, PyObject *args, PyObject *kwargs) { | |
256 | PyObject * _resultobj; | |
257 | char *_kwnames[] = { NULL }; | |
258 | ||
259 | self = self; | |
260 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxOGLCleanUp",_kwnames)) | |
261 | return NULL; | |
262 | { | |
4268f798 | 263 | PyThreadState* __tstate = wxPyBeginAllowThreads(); |
c8bc7bb8 | 264 | wxOGLCleanUp(); |
e91a9dfc | 265 | |
4268f798 RD |
266 | wxPyEndAllowThreads(__tstate); |
267 | if (PyErr_Occurred()) return NULL; | |
e91a9dfc RD |
268 | } Py_INCREF(Py_None); |
269 | _resultobj = Py_None; | |
270 | return _resultobj; | |
271 | } | |
272 | ||
273 | static PyMethodDef oglcMethods[] = { | |
274 | { "wxOGLCleanUp", (PyCFunction) _wrap_wxOGLCleanUp, METH_VARARGS | METH_KEYWORDS }, | |
275 | { "wxOGLInitialize", (PyCFunction) _wrap_wxOGLInitialize, METH_VARARGS | METH_KEYWORDS }, | |
276 | { NULL, NULL } | |
277 | }; | |
278 | #ifdef __cplusplus | |
279 | } | |
280 | #endif | |
281 | /* | |
282 | * This table is used by the pointer type-checker | |
283 | */ | |
284 | static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { | |
e91a9dfc | 285 | { "_signed_long","_long",0}, |
4c9993c3 | 286 | { "_wxPrintQuality","_wxCoord",0}, |
e91a9dfc RD |
287 | { "_wxPrintQuality","_int",0}, |
288 | { "_wxPrintQuality","_signed_int",0}, | |
289 | { "_wxPrintQuality","_unsigned_int",0}, | |
290 | { "_wxPrintQuality","_wxWindowID",0}, | |
291 | { "_wxPrintQuality","_uint",0}, | |
292 | { "_wxPrintQuality","_EBool",0}, | |
293 | { "_wxPrintQuality","_size_t",0}, | |
c368d904 | 294 | { "_wxPrintQuality","_time_t",0}, |
e91a9dfc | 295 | { "_byte","_unsigned_char",0}, |
e91a9dfc RD |
296 | { "_long","_unsigned_long",0}, |
297 | { "_long","_signed_long",0}, | |
4c9993c3 | 298 | { "_size_t","_wxCoord",0}, |
e91a9dfc | 299 | { "_size_t","_wxPrintQuality",0}, |
c368d904 | 300 | { "_size_t","_time_t",0}, |
e91a9dfc RD |
301 | { "_size_t","_unsigned_int",0}, |
302 | { "_size_t","_int",0}, | |
303 | { "_size_t","_wxWindowID",0}, | |
304 | { "_size_t","_uint",0}, | |
4c9993c3 | 305 | { "_uint","_wxCoord",0}, |
e91a9dfc | 306 | { "_uint","_wxPrintQuality",0}, |
c368d904 | 307 | { "_uint","_time_t",0}, |
e91a9dfc RD |
308 | { "_uint","_size_t",0}, |
309 | { "_uint","_unsigned_int",0}, | |
310 | { "_uint","_int",0}, | |
311 | { "_uint","_wxWindowID",0}, | |
c368d904 | 312 | { "_wxChar","_char",0}, |
c368d904 | 313 | { "_char","_wxChar",0}, |
19a97bd6 | 314 | { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0}, |
4c9993c3 | 315 | { "_EBool","_wxCoord",0}, |
e91a9dfc RD |
316 | { "_EBool","_wxPrintQuality",0}, |
317 | { "_EBool","_signed_int",0}, | |
318 | { "_EBool","_int",0}, | |
319 | { "_EBool","_wxWindowID",0}, | |
e91a9dfc | 320 | { "_unsigned_long","_long",0}, |
19a97bd6 | 321 | { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0}, |
4c9993c3 | 322 | { "_signed_int","_wxCoord",0}, |
e91a9dfc RD |
323 | { "_signed_int","_wxPrintQuality",0}, |
324 | { "_signed_int","_EBool",0}, | |
325 | { "_signed_int","_wxWindowID",0}, | |
326 | { "_signed_int","_int",0}, | |
c368d904 | 327 | { "_WXTYPE","_wxDateTime_t",0}, |
e91a9dfc RD |
328 | { "_WXTYPE","_short",0}, |
329 | { "_WXTYPE","_signed_short",0}, | |
330 | { "_WXTYPE","_unsigned_short",0}, | |
c368d904 | 331 | { "_unsigned_short","_wxDateTime_t",0}, |
e91a9dfc RD |
332 | { "_unsigned_short","_WXTYPE",0}, |
333 | { "_unsigned_short","_short",0}, | |
e91a9dfc RD |
334 | { "_signed_short","_WXTYPE",0}, |
335 | { "_signed_short","_short",0}, | |
e91a9dfc | 336 | { "_unsigned_char","_byte",0}, |
4c9993c3 | 337 | { "_unsigned_int","_wxCoord",0}, |
e91a9dfc | 338 | { "_unsigned_int","_wxPrintQuality",0}, |
c368d904 | 339 | { "_unsigned_int","_time_t",0}, |
e91a9dfc RD |
340 | { "_unsigned_int","_size_t",0}, |
341 | { "_unsigned_int","_uint",0}, | |
342 | { "_unsigned_int","_wxWindowID",0}, | |
343 | { "_unsigned_int","_int",0}, | |
c368d904 | 344 | { "_short","_wxDateTime_t",0}, |
e91a9dfc RD |
345 | { "_short","_WXTYPE",0}, |
346 | { "_short","_unsigned_short",0}, | |
347 | { "_short","_signed_short",0}, | |
4c9993c3 | 348 | { "_wxWindowID","_wxCoord",0}, |
e91a9dfc | 349 | { "_wxWindowID","_wxPrintQuality",0}, |
c368d904 | 350 | { "_wxWindowID","_time_t",0}, |
e91a9dfc RD |
351 | { "_wxWindowID","_size_t",0}, |
352 | { "_wxWindowID","_EBool",0}, | |
353 | { "_wxWindowID","_uint",0}, | |
354 | { "_wxWindowID","_int",0}, | |
355 | { "_wxWindowID","_signed_int",0}, | |
356 | { "_wxWindowID","_unsigned_int",0}, | |
4c9993c3 | 357 | { "_int","_wxCoord",0}, |
e91a9dfc | 358 | { "_int","_wxPrintQuality",0}, |
c368d904 | 359 | { "_int","_time_t",0}, |
e91a9dfc RD |
360 | { "_int","_size_t",0}, |
361 | { "_int","_EBool",0}, | |
362 | { "_int","_uint",0}, | |
363 | { "_int","_wxWindowID",0}, | |
364 | { "_int","_unsigned_int",0}, | |
365 | { "_int","_signed_int",0}, | |
c368d904 RD |
366 | { "_wxDateTime_t","_unsigned_short",0}, |
367 | { "_wxDateTime_t","_short",0}, | |
368 | { "_wxDateTime_t","_WXTYPE",0}, | |
c368d904 RD |
369 | { "_time_t","_wxCoord",0}, |
370 | { "_time_t","_wxPrintQuality",0}, | |
371 | { "_time_t","_unsigned_int",0}, | |
372 | { "_time_t","_int",0}, | |
373 | { "_time_t","_wxWindowID",0}, | |
374 | { "_time_t","_uint",0}, | |
375 | { "_time_t","_size_t",0}, | |
4c9993c3 RD |
376 | { "_wxCoord","_int",0}, |
377 | { "_wxCoord","_signed_int",0}, | |
378 | { "_wxCoord","_unsigned_int",0}, | |
379 | { "_wxCoord","_wxWindowID",0}, | |
380 | { "_wxCoord","_uint",0}, | |
381 | { "_wxCoord","_EBool",0}, | |
382 | { "_wxCoord","_size_t",0}, | |
c368d904 | 383 | { "_wxCoord","_time_t",0}, |
4c9993c3 | 384 | { "_wxCoord","_wxPrintQuality",0}, |
e91a9dfc RD |
385 | {0,0,0}}; |
386 | ||
387 | static PyObject *SWIG_globals; | |
388 | #ifdef __cplusplus | |
389 | extern "C" | |
390 | #endif | |
391 | SWIGEXPORT(void) initoglc() { | |
392 | PyObject *m, *d; | |
393 | SWIG_globals = SWIG_newvarlink(); | |
394 | m = Py_InitModule("oglc", oglcMethods); | |
395 | d = PyModule_GetDict(m); | |
396 | PyDict_SetItemString(d,"KEY_SHIFT", PyInt_FromLong((long) KEY_SHIFT)); | |
397 | PyDict_SetItemString(d,"KEY_CTRL", PyInt_FromLong((long) KEY_CTRL)); | |
398 | PyDict_SetItemString(d,"ARROW_NONE", PyInt_FromLong((long) ARROW_NONE)); | |
399 | PyDict_SetItemString(d,"ARROW_END", PyInt_FromLong((long) ARROW_END)); | |
400 | PyDict_SetItemString(d,"ARROW_BOTH", PyInt_FromLong((long) ARROW_BOTH)); | |
401 | PyDict_SetItemString(d,"ARROW_MIDDLE", PyInt_FromLong((long) ARROW_MIDDLE)); | |
402 | PyDict_SetItemString(d,"ARROW_START", PyInt_FromLong((long) ARROW_START)); | |
403 | PyDict_SetItemString(d,"ARROW_HOLLOW_CIRCLE", PyInt_FromLong((long) ARROW_HOLLOW_CIRCLE)); | |
404 | PyDict_SetItemString(d,"ARROW_FILLED_CIRCLE", PyInt_FromLong((long) ARROW_FILLED_CIRCLE)); | |
405 | PyDict_SetItemString(d,"ARROW_ARROW", PyInt_FromLong((long) ARROW_ARROW)); | |
406 | PyDict_SetItemString(d,"ARROW_SINGLE_OBLIQUE", PyInt_FromLong((long) ARROW_SINGLE_OBLIQUE)); | |
407 | PyDict_SetItemString(d,"ARROW_DOUBLE_OBLIQUE", PyInt_FromLong((long) ARROW_DOUBLE_OBLIQUE)); | |
408 | PyDict_SetItemString(d,"ARROW_METAFILE", PyInt_FromLong((long) ARROW_METAFILE)); | |
409 | PyDict_SetItemString(d,"ARROW_POSITION_END", PyInt_FromLong((long) ARROW_POSITION_END)); | |
410 | PyDict_SetItemString(d,"ARROW_POSITION_START", PyInt_FromLong((long) ARROW_POSITION_START)); | |
411 | PyDict_SetItemString(d,"CONTROL_POINT_VERTICAL", PyInt_FromLong((long) CONTROL_POINT_VERTICAL)); | |
412 | PyDict_SetItemString(d,"CONTROL_POINT_HORIZONTAL", PyInt_FromLong((long) CONTROL_POINT_HORIZONTAL)); | |
413 | PyDict_SetItemString(d,"CONTROL_POINT_DIAGONAL", PyInt_FromLong((long) CONTROL_POINT_DIAGONAL)); | |
414 | PyDict_SetItemString(d,"CONTROL_POINT_ENDPOINT_TO", PyInt_FromLong((long) CONTROL_POINT_ENDPOINT_TO)); | |
415 | PyDict_SetItemString(d,"CONTROL_POINT_ENDPOINT_FROM", PyInt_FromLong((long) CONTROL_POINT_ENDPOINT_FROM)); | |
416 | PyDict_SetItemString(d,"CONTROL_POINT_LINE", PyInt_FromLong((long) CONTROL_POINT_LINE)); | |
417 | PyDict_SetItemString(d,"FORMAT_NONE", PyInt_FromLong((long) FORMAT_NONE)); | |
418 | PyDict_SetItemString(d,"FORMAT_CENTRE_HORIZ", PyInt_FromLong((long) FORMAT_CENTRE_HORIZ)); | |
419 | PyDict_SetItemString(d,"FORMAT_CENTRE_VERT", PyInt_FromLong((long) FORMAT_CENTRE_VERT)); | |
420 | PyDict_SetItemString(d,"FORMAT_SIZE_TO_CONTENTS", PyInt_FromLong((long) FORMAT_SIZE_TO_CONTENTS)); | |
421 | PyDict_SetItemString(d,"LINE_ALIGNMENT_HORIZ", PyInt_FromLong((long) LINE_ALIGNMENT_HORIZ)); | |
422 | PyDict_SetItemString(d,"LINE_ALIGNMENT_VERT", PyInt_FromLong((long) LINE_ALIGNMENT_VERT)); | |
423 | PyDict_SetItemString(d,"LINE_ALIGNMENT_TO_NEXT_HANDLE", PyInt_FromLong((long) LINE_ALIGNMENT_TO_NEXT_HANDLE)); | |
424 | PyDict_SetItemString(d,"LINE_ALIGNMENT_NONE", PyInt_FromLong((long) LINE_ALIGNMENT_NONE)); | |
425 | PyDict_SetItemString(d,"SHADOW_NONE", PyInt_FromLong((long) SHADOW_NONE)); | |
426 | PyDict_SetItemString(d,"SHADOW_LEFT", PyInt_FromLong((long) SHADOW_LEFT)); | |
427 | PyDict_SetItemString(d,"SHADOW_RIGHT", PyInt_FromLong((long) SHADOW_RIGHT)); | |
428 | PyDict_SetItemString(d,"OP_CLICK_LEFT", PyInt_FromLong((long) OP_CLICK_LEFT)); | |
429 | PyDict_SetItemString(d,"OP_CLICK_RIGHT", PyInt_FromLong((long) OP_CLICK_RIGHT)); | |
430 | PyDict_SetItemString(d,"OP_DRAG_LEFT", PyInt_FromLong((long) OP_DRAG_LEFT)); | |
431 | PyDict_SetItemString(d,"OP_DRAG_RIGHT", PyInt_FromLong((long) OP_DRAG_RIGHT)); | |
432 | PyDict_SetItemString(d,"OP_ALL", PyInt_FromLong((long) OP_ALL)); | |
433 | PyDict_SetItemString(d,"ATTACHMENT_MODE_NONE", PyInt_FromLong((long) ATTACHMENT_MODE_NONE)); | |
434 | PyDict_SetItemString(d,"ATTACHMENT_MODE_EDGE", PyInt_FromLong((long) ATTACHMENT_MODE_EDGE)); | |
435 | PyDict_SetItemString(d,"ATTACHMENT_MODE_BRANCHING", PyInt_FromLong((long) ATTACHMENT_MODE_BRANCHING)); | |
436 | PyDict_SetItemString(d,"BRANCHING_ATTACHMENT_NORMAL", PyInt_FromLong((long) BRANCHING_ATTACHMENT_NORMAL)); | |
437 | PyDict_SetItemString(d,"BRANCHING_ATTACHMENT_BLOB", PyInt_FromLong((long) BRANCHING_ATTACHMENT_BLOB)); | |
438 | PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_VERTICALLY", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_VERTICALLY)); | |
439 | PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_HORIZONTALLY", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_HORIZONTALLY)); | |
440 | PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_BOTH", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_BOTH)); | |
441 | PyDict_SetItemString(d,"gyCONSTRAINT_LEFT_OF", PyInt_FromLong((long) gyCONSTRAINT_LEFT_OF)); | |
442 | PyDict_SetItemString(d,"gyCONSTRAINT_RIGHT_OF", PyInt_FromLong((long) gyCONSTRAINT_RIGHT_OF)); | |
443 | PyDict_SetItemString(d,"gyCONSTRAINT_ABOVE", PyInt_FromLong((long) gyCONSTRAINT_ABOVE)); | |
444 | PyDict_SetItemString(d,"gyCONSTRAINT_BELOW", PyInt_FromLong((long) gyCONSTRAINT_BELOW)); | |
445 | PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_TOP", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_TOP)); | |
446 | PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_BOTTOM", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_BOTTOM)); | |
447 | PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_LEFT", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_LEFT)); | |
448 | PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_RIGHT", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_RIGHT)); | |
449 | PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_TOP", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_TOP)); | |
450 | PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_BOTTOM", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_BOTTOM)); | |
451 | PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_LEFT", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_LEFT)); | |
452 | PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_RIGHT", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_RIGHT)); | |
453 | PyDict_SetItemString(d,"DIVISION_SIDE_NONE", PyInt_FromLong((long) DIVISION_SIDE_NONE)); | |
454 | PyDict_SetItemString(d,"DIVISION_SIDE_LEFT", PyInt_FromLong((long) DIVISION_SIDE_LEFT)); | |
455 | PyDict_SetItemString(d,"DIVISION_SIDE_TOP", PyInt_FromLong((long) DIVISION_SIDE_TOP)); | |
456 | PyDict_SetItemString(d,"DIVISION_SIDE_RIGHT", PyInt_FromLong((long) DIVISION_SIDE_RIGHT)); | |
457 | PyDict_SetItemString(d,"DIVISION_SIDE_BOTTOM", PyInt_FromLong((long) DIVISION_SIDE_BOTTOM)); | |
458 | ||
459 | ||
460 | initoglbasicc(); | |
461 | initoglshapesc(); | |
462 | initoglshapes2c(); | |
463 | initoglcanvasc(); | |
464 | ||
465 | ||
e508a2b6 RD |
466 | wxClassInfo::CleanUpClasses(); |
467 | wxClassInfo::InitializeClasses(); | |
e91a9dfc | 468 | |
856e03b7 RD |
469 | wxPyPtrTypeMap_Add("wxControlPoint", "wxPyControlPoint"); |
470 | wxPyPtrTypeMap_Add("wxShapeCanvas", "wxPyShapeCanvas"); | |
471 | wxPyPtrTypeMap_Add("wxShapeEvtHandler", "wxPyShapeEvtHandler"); | |
472 | wxPyPtrTypeMap_Add("wxShape", "wxPyShape"); | |
473 | wxPyPtrTypeMap_Add("wxRectangleShape", "wxPyRectangleShape"); | |
474 | wxPyPtrTypeMap_Add("wxDrawnShape", "wxPyDrawnShape"); | |
475 | wxPyPtrTypeMap_Add("wxCompositeShape", "wxPyCompositeShape"); | |
476 | wxPyPtrTypeMap_Add("wxDividedShape", "wxPyDividedShape"); | |
477 | wxPyPtrTypeMap_Add("wxDivisionShape", "wxPyDivisionShape"); | |
478 | wxPyPtrTypeMap_Add("wxEllipseShape", "wxPyEllipseShape"); | |
479 | wxPyPtrTypeMap_Add("wxCircleShape", "wxPyCircleShape"); | |
480 | wxPyPtrTypeMap_Add("wxLineShape", "wxPyLineShape"); | |
481 | wxPyPtrTypeMap_Add("wxPolygonShape", "wxPyPolygonShape"); | |
482 | wxPyPtrTypeMap_Add("wxTextShape", "wxPyTextShape"); | |
483 | ||
e91a9dfc RD |
484 | { |
485 | int i; | |
486 | for (i = 0; _swig_mapping[i].n1; i++) | |
487 | SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); | |
488 | } | |
489 | } |