]> git.saurik.com Git - wxWidgets.git/blame - wxPython/contrib/ogl/_ogldefs.i
Fixed a compiler performance warning
[wxWidgets.git] / wxPython / contrib / ogl / _ogldefs.i
CommitLineData
e91a9dfc
RD
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
17class wxOGLConstraint;
18class wxBitmapShape;
19class wxDiagram;
20class wxDrawnShape;
21class wxCircleShape;
22class wxCompositeShape;
23class wxDividedShape;
24class wxDivisionShape;
25class wxEllipseShape;
26class wxLineShape;
27class wxPolygonShape;
28class wxRectangleShape;
29class wxPseudoMetaFile;
30class wxShape;
31class wxShapeCanvas;
32class wxShapeEvtHandler;
33class wxTextShape;
2348eaee 34class wxControlPoint;
e91a9dfc
RD
35
36class wxPyOGLConstraint;
37class wxPyBitmapShape;
38class wxPyDiagram;
39class wxPyDrawnShape;
40class wxPyCircleShape;
41class wxPyCompositeShape;
42class wxPyDividedShape;
43class wxPyDivisionShape;
44class wxPyEllipseShape;
45class wxPyLineShape;
46class wxPyPolygonShape;
47class wxPyRectangleShape;
48class wxPyPseudoMetaFile;
49class wxPyShape;
50class wxPyShapeCanvas;
51class wxPyShapeEvtHandler;
52class wxPyTextShape;
2348eaee 53class wxPyControlPoint;
e91a9dfc
RD
54
55
56//---------------------------------------------------------------------------
d74525f7
RD
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
e91a9dfc
RD
119//---------------------------------------------------------------------------
120//---------------------------------------------------------------------------
121
122
123
124
125