]> git.saurik.com Git - wxWidgets.git/blame - wxPython/contrib/ogl/_ogldefs.i
generated rename directives are no longer needed
[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
e91a9dfc 14//---------------------------------------------------------------------------
d74525f7
RD
15// Typemaps just for OGL
16
17
9416aa89 18// OOR Support
6d450e1a
RD
19%typemap(out) wxPyShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
20%typemap(out) wxPyShapeEvtHandler* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
21%typemap(out) wxPyDivisionShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
22
23%typemap(out) wxPyShapeCanvas* { $result = wxPyMake_wxObject($1, $owner); }
24%typemap(out) wxDiagram* { $result = wxPyMake_wxObject($1, $owner); }
25%typemap(out) wxOGLConstraint* { $result = wxPyMake_wxObject($1, $owner); }
26%typemap(out) wxPseudoMetaFile* { $result = wxPyMake_wxObject($1, $owner); }
27%typemap(out) wxArrowHead* { $result = wxPyMake_wxObject($1, $owner); }
9416aa89
RD
28
29
30
31
d74525f7
RD
32// wxOGL doesn't use a ref-counted copy of pens and brushes, so we'll
33// use the pen and brush lists to simulate that...
34
d14a1e28 35%typemap(in) wxPen* {
d74525f7 36 wxPen* temp;
d14a1e28
RD
37 if ($input) {
38 if ($input == Py_None) { temp = NULL; }
39 else if (! wxPyConvertSwigPtr($input, (void **) &temp, wxT("wxPen"))) {
40 PyErr_SetString(PyExc_TypeError, "Type error, expected wxPen.");
d74525f7
RD
41 return NULL;
42 }
43 }
44 if (temp)
d14a1e28
RD
45 $1 = wxThePenList->FindOrCreatePen(temp->GetColour(),
46 temp->GetWidth(),
47 temp->GetStyle());
d74525f7 48 else
d14a1e28 49 $1 = NULL;
d74525f7
RD
50}
51
d14a1e28 52%typemap(in) wxBrush* {
d74525f7 53 wxBrush* temp;
d14a1e28
RD
54 if ($input) {
55 if ($input == Py_None) { temp = NULL; }
56 else if (! wxPyConvertSwigPtr($input, (void **) &temp, wxT("wxBrush"))) {
57 PyErr_SetString(PyExc_TypeError, "Type error, expected wxBrush.");
d74525f7
RD
58 return NULL;
59 }
60 }
61 if (temp)
d14a1e28 62 $1 = wxTheBrushList->FindOrCreateBrush(temp->GetColour(), temp->GetStyle());
d74525f7 63 else
d14a1e28 64 $1 = NULL;
d74525f7
RD
65}
66
67
d14a1e28 68%typemap(in) wxFont* {
d74525f7 69 wxFont* temp;
d14a1e28
RD
70 if ($input) {
71 if ($input == Py_None) { temp = NULL; }
72 else if (! wxPyConvertSwigPtr($input, (void **) &temp, wxT("wxFont"))) {
73 PyErr_SetString(PyExc_TypeError, "Type error, expected wxFont.");
d74525f7
RD
74 return NULL;
75 }
76 }
77 if (temp)
d14a1e28
RD
78 $1 = wxTheFontList->FindOrCreateFont(temp->GetPointSize(),
79 temp->GetFamily(),
80 temp->GetStyle(),
81 temp->GetWeight(),
82 temp->GetUnderlined(),
83 temp->GetFaceName(),
84 temp->GetEncoding());
d74525f7 85 else
d14a1e28 86 $1 = NULL;
d74525f7
RD
87}
88
89
e91a9dfc
RD
90//---------------------------------------------------------------------------
91//---------------------------------------------------------------------------
92
93
94
95
96