]> git.saurik.com Git - wxWidgets.git/blob - wxPython/include/wx/wxPython/wxPython.h
0d1d76da12dbde37a1665b46ea6e774f57fc5e41
[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 bool wxPyCoreAPI_IMPORT() {
30 wxPyCoreAPIPtr = (wxPyCoreAPI*)PyCObject_Import("wx._core_", "_wxPyCoreAPI");
31 return wxPyCoreAPIPtr != NULL;
32 }
33
34
35
36 // The following macros call functions located in wx._core_ of the same name
37 // via the API pointer retrieved above.
38
39
40 #define SWIG_Python_TypeRegister(a) (wxPyCoreAPIPtr->p_SWIG_Python_TypeRegister(a))
41 #define SWIG_Python_TypeCheck(a,b) (wxPyCoreAPIPtr->p_SWIG_Python_TypeCheck(a,b))
42 #define SWIG_Python_TypeCast(a,b) (wxPyCoreAPIPtr->p_SWIG_Python_TypeCast(a,b))
43 #define SWIG_Python_TypeDynamicCast(a,b) (wxPyCoreAPIPtr->p_SWIG_Python_TypeDynamicCast(a,b))
44 #define SWIG_Python_TypeName(a) (wxPyCoreAPIPtr->p_SWIG_Python_TypeName(a))
45 #define SWIG_Python_TypeQuery(a) (wxPyCoreAPIPtr->p_SWIG_Python_TypeQuery(a))
46 #define SWIG_Python_TypeClientData(a,b) (wxPyCoreAPIPtr->p_SWIG_Python_TypeClientData(a,b))
47 #define SWIG_Python_addvarlink(a,b,c,d) (wxPyCoreAPIPtr->p_SWIG_Python_addvarlink(a,b,c,d))
48 #define SWIG_Python_ConvertPtr(a,b,c,d) (wxPyCoreAPIPtr->p_SWIG_Python_ConvertPtr(a,b,c,d))
49 #define SWIG_Python_ConvertPacked(a,b,c,d,e) (wxPyCoreAPIPtr->p_SWIG_Python_ConvertPacked(a,b,c,d,e))
50 #define SWIG_Python_PackData(a,b,c) (wxPyCoreAPIPtr->p_SWIG_Python_PackData(a,b,c))
51 #define SWIG_Python_UnpackData(a,b,c) (wxPyCoreAPIPtr->p_SWIG_Python_UnpackData(a,b,c))
52 #define SWIG_Python_NewPointerObj(a,b,c) (wxPyCoreAPIPtr->p_SWIG_Python_NewPointerObj(a,b,c))
53 #define SWIG_Python_NewPackedObj(a,b,c) (wxPyCoreAPIPtr->p_SWIG_Python_NewPackedObj(a,b,c))
54 #define SWIG_Python_InstallConstants(a,b) (wxPyCoreAPIPtr->p_SWIG_Python_InstallConstants(a,b))
55 #define SWIG_Python_MustGetPtr(a,b,c,d) (wxPyCoreAPIPtr->p_SWIG_Python_MustGetPtr(a,b,c,d))
56
57 #define wxPyCheckSwigType(a) (wxPyCoreAPIPtr->p_wxPyCheckSwigType(a))
58 #define wxPyConstructObject(a,b,c) (wxPyCoreAPIPtr->p_wxPyConstructObject(a,b,c))
59 #define wxPyConvertSwigPtr(a,b,c) (wxPyCoreAPIPtr->p_wxPyConvertSwigPtr(a,b,c))
60 #define wxPyMakeSwigPtr(a,b) (wxPyCoreAPIPtr->p_wxPyMakeSwigPtr(a,b))
61
62 #define wxPyBeginAllowThreads() (wxPyCoreAPIPtr->p_wxPyBeginAllowThreads())
63 #define wxPyEndAllowThreads(a) (wxPyCoreAPIPtr->p_wxPyEndAllowThreads(a))
64 #define wxPyBeginBlockThreads() (wxPyCoreAPIPtr->p_wxPyBeginBlockThreads())
65 #define wxPyEndBlockThreads(a) (wxPyCoreAPIPtr->p_wxPyEndBlockThreads(a))
66
67 #define wxPyConstructObject(a,b,c) (wxPyCoreAPIPtr->p_wxPyConstructObject(a,b,c))
68 #define wxPy_ConvertList(a) (wxPyCoreAPIPtr->p_wxPy_ConvertList(a))
69
70 #define wxString_in_helper(a) (wxPyCoreAPIPtr->p_wxString_in_helper(a))
71 #define Py2wxString(a) (wxPyCoreAPIPtr->p_Py2wxString(a))
72 #define wx2PyString(a) (wxPyCoreAPIPtr->p_wx2PyString(a))
73
74 #define byte_LIST_helper(a) (wxPyCoreAPIPtr->p_byte_LIST_helper(a))
75 #define int_LIST_helper(a) (wxPyCoreAPIPtr->p_int_LIST_helper(a))
76 #define long_LIST_helper(a) (wxPyCoreAPIPtr->p_long_LIST_helper(a))
77 #define string_LIST_helper(a) (wxPyCoreAPIPtr->p_string_LIST_helper(a))
78 #define wxPoint_LIST_helper(a,b) (wxPyCoreAPIPtr->p_wxPoint_LIST_helper(a, b))
79 #define wxBitmap_LIST_helper(a) (wxPyCoreAPIPtr->p_wxBitmap_LIST_helper(a))
80 #define wxString_LIST_helper(a) (wxPyCoreAPIPtr->p_wxString_LIST_helper(a))
81 #define wxAcceleratorEntry_LIST_helper(a) (wxPyCoreAPIPtr->p_wxAcceleratorEntry_LIST_helper(a))
82
83 #define wxSize_helper(a,b) (wxPyCoreAPIPtr->p_wxSize_helper(a,b))
84 #define wxPoint_helper(a,b) (wxPyCoreAPIPtr->p_wxPoint_helper(a,b))
85 #define wxRealPoint_helper(a,b) (wxPyCoreAPIPtr->p_wxRealPoint_helper(a,b))
86 #define wxRect_helper(a,b) (wxPyCoreAPIPtr->p_wxRect_helper(a,b))
87 #define wxColour_helper(a,b) (wxPyCoreAPIPtr->p_wxColour_helper(a,b))
88 #define wxPoint2D_helper(a,b) (wxPyCoreAPIPtr->p_wxPoint2D_helper(a,b))
89
90 #define wxPySimple_typecheck(a,b,c) (wxPyCoreAPIPtr->p_wxPySimple_typecheck(a,b,c))
91 #define wxColour_typecheck(a) (wxPyCoreAPIPtr->p_wxColour_typecheck(a))
92
93 #define wxPyCBH_setCallbackInfo(a, b, c, d) (wxPyCoreAPIPtr->p_wxPyCBH_setCallbackInfo(a,b,c,d))
94 #define wxPyCBH_findCallback(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_findCallback(a, b))
95 #define wxPyCBH_callCallback(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_callCallback(a, b))
96 #define wxPyCBH_callCallbackObj(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_callCallbackObj(a, b))
97 #define wxPyCBH_delete(a) (wxPyCoreAPIPtr->p_wxPyCBH_delete(a))
98
99 #define wxPyMake_wxObject(a) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,True))
100 #define wxPyMake_wxObject2(a,b) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,b))
101 #define wxPyMake_wxSizer(a) (wxPyCoreAPIPtr->p_wxPyMake_wxSizer(a))
102 #define wxPyPtrTypeMap_Add(a, b) (wxPyCoreAPIPtr->p_wxPyPtrTypeMap_Add(a, b))
103 #define wxPy2int_seq_helper(a, b, c) (wxPyCoreAPIPtr->p_wxPy2int_seq_helper(a, b, c))
104 #define wxPy4int_seq_helper(a, b, c, d, e) (wxPyCoreAPIPtr->p_wxPy4int_seq_helper(a, b, c, d, e))
105 #define wxArrayString2PyList_helper(a) (wxPyCoreAPIPtr->p_wxArrayString2PyList_helper(a))
106 #define wxArrayInt2PyList_helper(a) (wxPyCoreAPIPtr->p_wxArrayInt2PyList_helper(a))
107
108 #define wxPyClientData_dtor(a) (wxPyCoreAPIPtr->p_wxPyClientData_dtor(a))
109 #define wxPyUserData_dtor(a) (wxPyCoreAPIPtr->p_wxPyUserData_dtor(a))
110 #define wxPyOORClientData_dtor(a) (wxPyCoreAPIPtr->p_wxPyOORClientData_dtor(a))
111
112 #define wxPyCBInputStream_create(a, b) (wxPyCoreAPIPtr->p_wxPyCBInputStream_create(a, b))
113
114 #define wxPyInstance_Check(a) (wxPyCoreAPIPtr->p_wxPyInstance_Check(a))
115 #define wxPySwigInstance_Check(a) (wxPyCoreAPIPtr->p_wxPySwigInstance_Check(a))
116
117
118 // This one is special. It's the first function called in SWIG generated
119 // modules, so we'll use it to also import the API.
120 #define SWIG_Python_newvarlink() (wxPyCoreAPI_IMPORT(), wxPyCoreAPIPtr->p_SWIG_Python_newvarlink())
121
122
123 //----------------------------------------------------------------------
124 #endif