]> git.saurik.com Git - wxWidgets.git/blob - wxPython/include/wx/wxPython/wxPython.h
739805ec57349ff57083dd4768f9c2abf0d10c2e
[wxWidgets.git] / wxPython / include / wx / wxPython / wxPython.h
1 ////////////////////////////////////////////////////////////////////////////
2 // Name: wxPython.h
3 // Purpose: To be used from modules that are not part of the core
4 // wxPython extension--or from 3rd party apps and modules--in
5 // order to get access to the wxPython API (some helper
6 // functions and such) that lives in the wx.core module
7 //
8 // Author: Robin Dunn
9 //
10 // Created: 14-Dec-2000
11 // RCS-ID: $Id$
12 // Copyright: (c) 2000 by Total Control Software
13 // Licence: wxWindows license
14 /////////////////////////////////////////////////////////////////////////////
15
16 #ifndef __wxp_export__
17 #define __wxp_export__
18
19 //----------------------------------------------------------------------
20
21 #define wxPyUSE_EXPORTED_API
22 #include "wx/wxPython/wxPython_int.h"
23
24 //----------------------------------------------------------------------
25
26 // This needs to be called in modules that make calls to any of the functions
27 // exported by the wxPython API. It sets a static pointer to a structure of
28 // function pointers located in the wx._core extension module.
29 static void wxPyCoreAPI_IMPORT() {
30 wxPyCoreAPIPtr = (wxPyCoreAPI*)PyCObject_Import("wx._core", "_wxPyCoreAPI");
31 if (! wxPyCoreAPIPtr)
32 wxPyCoreAPIPtr = (wxPyCoreAPI*)PyCObject_Import("_core", "_wxPyCoreAPI");
33 }
34
35
36
37 // The following macros call functions located in wx._core of the same name
38 // via the API pointer retrieved above.
39
40
41 #define SWIG_Python_TypeRegister(a) (wxPyCoreAPIPtr->p_SWIG_Python_TypeRegister(a))
42 #define SWIG_Python_TypeCheck(a,b) (wxPyCoreAPIPtr->p_SWIG_Python_TypeCheck(a,b))
43 #define SWIG_Python_TypeCast(a,b) (wxPyCoreAPIPtr->p_SWIG_Python_TypeCast(a,b))
44 #define SWIG_Python_TypeDynamicCast(a,b) (wxPyCoreAPIPtr->p_SWIG_Python_TypeDynamicCast(a,b))
45 #define SWIG_Python_TypeName(a) (wxPyCoreAPIPtr->p_SWIG_Python_TypeName(a))
46 #define SWIG_Python_TypeQuery(a) (wxPyCoreAPIPtr->p_SWIG_Python_TypeQuery(a))
47 #define SWIG_Python_TypeClientData(a,b) (wxPyCoreAPIPtr->p_SWIG_Python_TypeClientData(a,b))
48 #define SWIG_Python_addvarlink(a,b,c,d) (wxPyCoreAPIPtr->p_SWIG_Python_addvarlink(a,b,c,d))
49 #define SWIG_Python_ConvertPtr(a,b,c,d) (wxPyCoreAPIPtr->p_SWIG_Python_ConvertPtr(a,b,c,d))
50 #define SWIG_Python_ConvertPacked(a,b,c,d,e) (wxPyCoreAPIPtr->p_SWIG_Python_ConvertPacked(a,b,c,d,e))
51 #define SWIG_Python_PackData(a,b,c) (wxPyCoreAPIPtr->p_SWIG_Python_PackData(a,b,c))
52 #define SWIG_Python_UnpackData(a,b,c) (wxPyCoreAPIPtr->p_SWIG_Python_UnpackData(a,b,c))
53 #define SWIG_Python_NewPointerObj(a,b,c) (wxPyCoreAPIPtr->p_SWIG_Python_NewPointerObj(a,b,c))
54 #define SWIG_Python_NewPackedObj(a,b,c) (wxPyCoreAPIPtr->p_SWIG_Python_NewPackedObj(a,b,c))
55 #define SWIG_Python_InstallConstants(a,b) (wxPyCoreAPIPtr->p_SWIG_Python_InstallConstants(a,b))
56 #define SWIG_Python_MustGetPtr(a,b,c,d) (wxPyCoreAPIPtr->p_SWIG_Python_MustGetPtr(a,b,c,d))
57
58 #define SWIG_PyObj_AsCharPtr(a,b) (wxPyCoreAPIPtr->p_SWIG_PyObj_AsCharPtr(a,b))
59 #define SWIG_PyObj_FromCharPtr(a) (wxPyCoreAPIPtr->p_SWIG_PyObj_FromCharPtr(a))
60 #define SWIG_PyObj_AsUnsignedLong(a) (wxPyCoreAPIPtr->p_SWIG_PyObj_AsUnsignedLong(a))
61 #define SWIG_PyObj_AsLongInRange(a,b,c,d) (wxPyCoreAPIPtr->p_SWIG_PyObj_AsLongInRange(a,b,c,d))
62 #define SWIG_PyObj_AsUnsignedLongInRange(a,b,c) (wxPyCoreAPIPtr->p_SWIG_PyObj_AsUnsignedLongInRange(a,b,c))
63 #define SWIG_PyObj_AsNewCharPtr(a,b) (wxPyCoreAPIPtr->p_SWIG_PyObj_AsNewCharPtr(a,b))
64 #define SWIG_PyObj_AsCharPtrAndSize(a,b,c,d) (wxPyCoreAPIPtr->p_SWIG_PyObj_AsCharPtrAndSize(a,b,c,d))
65 #define SWIG_PyObj_AsCharArray(a,b,c,d) (wxPyCoreAPIPtr->p_SWIG_PyObj_AsCharArray(a,b,c,d))
66 #define SWIG_PyObj_FromCharArray(a,b) (wxPyCoreAPIPtr->p_SWIG_PyObj_FromCharArray(a,b))
67 #define SWIG_PyObj_AsFloatConv(a,b) (wxPyCoreAPIPtr->p_SWIG_PyObj_AsFloatConv(a,b))
68
69 #define wxPyCheckSwigType(a) (wxPyCoreAPIPtr->p_wxPyCheckSwigType(a))
70 #define wxPyConstructObject(a,b,c) (wxPyCoreAPIPtr->p_wxPyConstructObject(a,b,c))
71 #define wxPyConvertSwigPtr(a,b,c) (wxPyCoreAPIPtr->p_wxPyConvertSwigPtr(a,b,c))
72 #define wxPyMakeSwigPtr(a,b) (wxPyCoreAPIPtr->p_wxPyMakeSwigPtr(a,b))
73
74 #define wxPyBeginAllowThreads() (wxPyCoreAPIPtr->p_wxPyBeginAllowThreads())
75 #define wxPyEndAllowThreads(a) (wxPyCoreAPIPtr->p_wxPyEndAllowThreads(a))
76 #define wxPyBeginBlockThreads() (wxPyCoreAPIPtr->p_wxPyBeginBlockThreads())
77 #define wxPyEndBlockThreads() (wxPyCoreAPIPtr->p_wxPyEndBlockThreads())
78
79 #define wxPyConstructObject(a,b,c) (wxPyCoreAPIPtr->p_wxPyConstructObject(a,b,c))
80 #define wxPy_ConvertList(a) (wxPyCoreAPIPtr->p_wxPy_ConvertList(a))
81
82 #define wxString_in_helper(a) (wxPyCoreAPIPtr->p_wxString_in_helper(a))
83 #define Py2wxString(a) (wxPyCoreAPIPtr->p_Py2wxString(a))
84 #define wx2PyString(a) (wxPyCoreAPIPtr->p_wx2PyString(a))
85
86 #define byte_LIST_helper(a) (wxPyCoreAPIPtr->p_byte_LIST_helper(a))
87 #define int_LIST_helper(a) (wxPyCoreAPIPtr->p_int_LIST_helper(a))
88 #define long_LIST_helper(a) (wxPyCoreAPIPtr->p_long_LIST_helper(a))
89 #define string_LIST_helper(a) (wxPyCoreAPIPtr->p_string_LIST_helper(a))
90 #define wxPoint_LIST_helper(a,b) (wxPyCoreAPIPtr->p_wxPoint_LIST_helper(a, b))
91 #define wxBitmap_LIST_helper(a) (wxPyCoreAPIPtr->p_wxBitmap_LIST_helper(a))
92 #define wxString_LIST_helper(a) (wxPyCoreAPIPtr->p_wxString_LIST_helper(a))
93 #define wxAcceleratorEntry_LIST_helper(a) (wxPyCoreAPIPtr->p_wxAcceleratorEntry_LIST_helper(a))
94
95 #define wxSize_helper(a,b) (wxPyCoreAPIPtr->p_wxSize_helper(a,b))
96 #define wxPoint_helper(a,b) (wxPyCoreAPIPtr->p_wxPoint_helper(a,b))
97 #define wxRealPoint_helper(a,b) (wxPyCoreAPIPtr->p_wxRealPoint_helper(a,b))
98 #define wxRect_helper(a,b) (wxPyCoreAPIPtr->p_wxRect_helper(a,b))
99 #define wxColour_helper(a,b) (wxPyCoreAPIPtr->p_wxColour_helper(a,b))
100 #define wxPoint2D_helper(a,b) (wxPyCoreAPIPtr->p_wxPoint2D_helper(a,b))
101
102 #define wxPySimple_typecheck(a,b,c) (wxPyCoreAPIPtr->p_wxPySimple_typecheck(a,b,c))
103 #define wxColour_typecheck(a) (wxPyCoreAPIPtr->p_wxColour_typecheck(a))
104
105 #define wxPyCBH_setCallbackInfo(a, b, c, d) (wxPyCoreAPIPtr->p_wxPyCBH_setCallbackInfo(a,b,c,d))
106 #define wxPyCBH_findCallback(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_findCallback(a, b))
107 #define wxPyCBH_callCallback(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_callCallback(a, b))
108 #define wxPyCBH_callCallbackObj(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_callCallbackObj(a, b))
109 #define wxPyCBH_delete(a) (wxPyCoreAPIPtr->p_wxPyCBH_delete(a))
110
111 #define wxPyMake_wxObject(a) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,True))
112 #define wxPyMake_wxObject2(a,b) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,b))
113 #define wxPyMake_wxSizer(a) (wxPyCoreAPIPtr->p_wxPyMake_wxSizer(a))
114 #define wxPyPtrTypeMap_Add(a, b) (wxPyCoreAPIPtr->p_wxPyPtrTypeMap_Add(a, b))
115 #define wxPy2int_seq_helper(a, b, c) (wxPyCoreAPIPtr->p_wxPy2int_seq_helper(a, b, c))
116 #define wxPy4int_seq_helper(a, b, c, d, e) (wxPyCoreAPIPtr->p_wxPy4int_seq_helper(a, b, c, d, e))
117 #define wxArrayString2PyList_helper(a) (wxPyCoreAPIPtr->p_wxArrayString2PyList_helper(a))
118 #define wxArrayInt2PyList_helper(a) (wxPyCoreAPIPtr->p_wxArrayInt2PyList_helper(a))
119
120 #define wxPyClientData_dtor(a) (wxPyCoreAPIPtr->p_wxPyClientData_dtor(a))
121 #define wxPyUserData_dtor(a) (wxPyCoreAPIPtr->p_wxPyUserData_dtor(a))
122 #define wxPyOORClientData_dtor(a) (wxPyCoreAPIPtr->p_wxPyOORClientData_dtor(a))
123
124 #define wxPyCBInputStream_create(a, b) (wxPyCoreAPIPtr->p_wxPyCBInputStream_create(a, b))
125
126 #define wxPyInstance_Check(a) (wxPyCoreAPIPtr->p_wxPyInstance_Check(a))
127 #define wxPySwigInstance_Check(a) (wxPyCoreAPIPtr->p_wxPySwigInstance_Check(a))
128
129
130 // This one is special. It's the first function called in SWIG generated
131 // modules, so we'll use it to also import the API.
132 #define SWIG_Python_newvarlink() (wxPyCoreAPI_IMPORT(), wxPyCoreAPIPtr->p_SWIG_Python_newvarlink())
133
134
135 //----------------------------------------------------------------------
136 #endif