]> git.saurik.com Git - wxWidgets.git/blob - wxPython/contrib/ogl/_ogldefs.i
Fixed a compiler performance warning
[wxWidgets.git] / wxPython / contrib / ogl / _ogldefs.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: _ogldefs.i
3 // Purpose: SWIG definitions for the wxWindows Object Graphics Library
4 //
5 // Author: Robin Dunn
6 //
7 // Created: 27-Aug-1999
8 // RCS-ID: $Id$
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13
14 //---------------------------------------------------------------------------
15
16
17 class wxOGLConstraint;
18 class wxBitmapShape;
19 class wxDiagram;
20 class wxDrawnShape;
21 class wxCircleShape;
22 class wxCompositeShape;
23 class wxDividedShape;
24 class wxDivisionShape;
25 class wxEllipseShape;
26 class wxLineShape;
27 class wxPolygonShape;
28 class wxRectangleShape;
29 class wxPseudoMetaFile;
30 class wxShape;
31 class wxShapeCanvas;
32 class wxShapeEvtHandler;
33 class wxTextShape;
34 class wxControlPoint;
35
36 class wxPyOGLConstraint;
37 class wxPyBitmapShape;
38 class wxPyDiagram;
39 class wxPyDrawnShape;
40 class wxPyCircleShape;
41 class wxPyCompositeShape;
42 class wxPyDividedShape;
43 class wxPyDivisionShape;
44 class wxPyEllipseShape;
45 class wxPyLineShape;
46 class wxPyPolygonShape;
47 class wxPyRectangleShape;
48 class wxPyPseudoMetaFile;
49 class wxPyShape;
50 class wxPyShapeCanvas;
51 class wxPyShapeEvtHandler;
52 class wxPyTextShape;
53 class wxPyControlPoint;
54
55
56 //---------------------------------------------------------------------------
57 // Typemaps just for OGL
58
59
60 // wxOGL doesn't use a ref-counted copy of pens and brushes, so we'll
61 // use the pen and brush lists to simulate that...
62
63
64 %typemap(python, in) wxPen* {
65 wxPen* temp;
66 if ($source) {
67 if ($source == Py_None) { temp = NULL; }
68 else if (SWIG_GetPtrObj($source, (void **) &temp,"_wxPen_p")) {
69 PyErr_SetString(PyExc_TypeError,"Type error, expected _wxPen_p.");
70 return NULL;
71 }
72 }
73 if (temp)
74 $target = wxThePenList->FindOrCreatePen(temp->GetColour(),
75 temp->GetWidth(),
76 temp->GetStyle());
77 else
78 $target = NULL;
79 }
80
81 %typemap(python, in) wxBrush* {
82 wxBrush* temp;
83 if ($source) {
84 if ($source == Py_None) { temp = NULL; }
85 else if (SWIG_GetPtrObj($source, (void **) &temp,"_wxBrush_p")) {
86 PyErr_SetString(PyExc_TypeError,"Type error, expected _wxBrush_p.");
87 return NULL;
88 }
89 }
90 if (temp)
91 $target = wxTheBrushList->FindOrCreateBrush(temp->GetColour(), temp->GetStyle());
92 else
93 $target = NULL;
94 }
95
96
97 %typemap(python, in) wxFont* {
98 wxFont* temp;
99 if ($source) {
100 if ($source == Py_None) { temp = NULL; }
101 else if (SWIG_GetPtrObj($source, (void **) &temp,"_wxFont_p")) {
102 PyErr_SetString(PyExc_TypeError,"Type error, expected _wxFont_p.");
103 return NULL;
104 }
105 }
106 if (temp)
107 $target = wxTheFontList->FindOrCreateFont(temp->GetPointSize(),
108 temp->GetFamily(),
109 temp->GetStyle(),
110 temp->GetWeight(),
111 temp->GetUnderlined(),
112 temp->GetFaceName(),
113 temp->GetEncoding());
114 else
115 $target = NULL;
116 }
117
118
119 //---------------------------------------------------------------------------
120 //---------------------------------------------------------------------------
121
122
123
124
125