]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/contrib/ogl/_ogldefs.i
trying to add wxBase project file from Unix
[wxWidgets.git] / wxPython / contrib / ogl / _ogldefs.i
... / ...
CommitLineData
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;
34class wxControlPoint;
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;
53class wxPyControlPoint;
54
55
56//---------------------------------------------------------------------------
57// Typemaps just for OGL
58
59
60// OOR Support
61%typemap(python, out) wxPyShape* { $target = wxPyMake_wxObject($source); }
62%typemap(python, out) wxPyShapeEvtHandler* { $target = wxPyMake_wxObject($source); }
63%typemap(python, out) wxPyShapeCanvas* { $target = wxPyMake_wxObject($source); }
64%typemap(python, out) wxDiagram* { $target = wxPyMake_wxObject($source); }
65%typemap(python, out) wxOGLConstraint* { $target = wxPyMake_wxObject($source); }
66%typemap(python, out) wxPyDivisionShape* { $target = wxPyMake_wxObject($source); }
67%typemap(python, out) wxPseudoMetaFile* { $target = wxPyMake_wxObject($source); }
68%typemap(python, out) wxArrowHead* { $target = wxPyMake_wxObject($source); }
69
70
71
72
73// wxOGL doesn't use a ref-counted copy of pens and brushes, so we'll
74// use the pen and brush lists to simulate that...
75
76%typemap(python, in) wxPen* {
77 wxPen* temp;
78 if ($source) {
79 if ($source == Py_None) { temp = NULL; }
80 else if (SWIG_GetPtrObj($source, (void **) &temp,"_wxPen_p")) {
81 PyErr_SetString(PyExc_TypeError,"Type error, expected _wxPen_p.");
82 return NULL;
83 }
84 }
85 if (temp)
86 $target = wxThePenList->FindOrCreatePen(temp->GetColour(),
87 temp->GetWidth(),
88 temp->GetStyle());
89 else
90 $target = NULL;
91}
92
93%typemap(python, in) wxBrush* {
94 wxBrush* temp;
95 if ($source) {
96 if ($source == Py_None) { temp = NULL; }
97 else if (SWIG_GetPtrObj($source, (void **) &temp,"_wxBrush_p")) {
98 PyErr_SetString(PyExc_TypeError,"Type error, expected _wxBrush_p.");
99 return NULL;
100 }
101 }
102 if (temp)
103 $target = wxTheBrushList->FindOrCreateBrush(temp->GetColour(), temp->GetStyle());
104 else
105 $target = NULL;
106}
107
108
109%typemap(python, in) wxFont* {
110 wxFont* temp;
111 if ($source) {
112 if ($source == Py_None) { temp = NULL; }
113 else if (SWIG_GetPtrObj($source, (void **) &temp,"_wxFont_p")) {
114 PyErr_SetString(PyExc_TypeError,"Type error, expected _wxFont_p.");
115 return NULL;
116 }
117 }
118 if (temp)
119 $target = wxTheFontList->FindOrCreateFont(temp->GetPointSize(),
120 temp->GetFamily(),
121 temp->GetStyle(),
122 temp->GetWeight(),
123 temp->GetUnderlined(),
124 temp->GetFaceName(),
125 temp->GetEncoding());
126 else
127 $target = NULL;
128}
129
130
131//---------------------------------------------------------------------------
132//---------------------------------------------------------------------------
133
134
135
136
137