]> git.saurik.com Git - wxWidgets.git/blob - wxPython/include/wx/wxPython/wxPython.h
c2ca98e30f4d222ba43459b0dd2f4f2b90fa4044
[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 wxPyCheckSwigType(a) (wxPyCoreAPIPtr->p_wxPyCheckSwigType(a))
59 #define wxPyConstructObject(a,b,c) (wxPyCoreAPIPtr->p_wxPyConstructObject(a,b,c))
60 #define wxPyConvertSwigPtr(a,b,c) (wxPyCoreAPIPtr->p_wxPyConvertSwigPtr(a,b,c))
61 #define wxPyMakeSwigPtr(a,b) (wxPyCoreAPIPtr->p_wxPyMakeSwigPtr(a,b))
62
63 #define wxPyBeginAllowThreads() (wxPyCoreAPIPtr->p_wxPyBeginAllowThreads())
64 #define wxPyEndAllowThreads(a) (wxPyCoreAPIPtr->p_wxPyEndAllowThreads(a))
65 #define wxPyBeginBlockThreads() (wxPyCoreAPIPtr->p_wxPyBeginBlockThreads())
66 #define wxPyEndBlockThreads(a) (wxPyCoreAPIPtr->p_wxPyEndBlockThreads(a))
67
68 #define wxPyConstructObject(a,b,c) (wxPyCoreAPIPtr->p_wxPyConstructObject(a,b,c))
69 #define wxPy_ConvertList(a) (wxPyCoreAPIPtr->p_wxPy_ConvertList(a))
70
71 #define wxString_in_helper(a) (wxPyCoreAPIPtr->p_wxString_in_helper(a))
72 #define Py2wxString(a) (wxPyCoreAPIPtr->p_Py2wxString(a))
73 #define wx2PyString(a) (wxPyCoreAPIPtr->p_wx2PyString(a))
74
75 #define byte_LIST_helper(a) (wxPyCoreAPIPtr->p_byte_LIST_helper(a))
76 #define int_LIST_helper(a) (wxPyCoreAPIPtr->p_int_LIST_helper(a))
77 #define long_LIST_helper(a) (wxPyCoreAPIPtr->p_long_LIST_helper(a))
78 #define string_LIST_helper(a) (wxPyCoreAPIPtr->p_string_LIST_helper(a))
79 #define wxPoint_LIST_helper(a,b) (wxPyCoreAPIPtr->p_wxPoint_LIST_helper(a, b))
80 #define wxBitmap_LIST_helper(a) (wxPyCoreAPIPtr->p_wxBitmap_LIST_helper(a))
81 #define wxString_LIST_helper(a) (wxPyCoreAPIPtr->p_wxString_LIST_helper(a))
82 #define wxAcceleratorEntry_LIST_helper(a) (wxPyCoreAPIPtr->p_wxAcceleratorEntry_LIST_helper(a))
83
84 #define wxSize_helper(a,b) (wxPyCoreAPIPtr->p_wxSize_helper(a,b))
85 #define wxPoint_helper(a,b) (wxPyCoreAPIPtr->p_wxPoint_helper(a,b))
86 #define wxRealPoint_helper(a,b) (wxPyCoreAPIPtr->p_wxRealPoint_helper(a,b))
87 #define wxRect_helper(a,b) (wxPyCoreAPIPtr->p_wxRect_helper(a,b))
88 #define wxColour_helper(a,b) (wxPyCoreAPIPtr->p_wxColour_helper(a,b))
89 #define wxPoint2D_helper(a,b) (wxPyCoreAPIPtr->p_wxPoint2D_helper(a,b))
90
91 #define wxPySimple_typecheck(a,b,c) (wxPyCoreAPIPtr->p_wxPySimple_typecheck(a,b,c))
92 #define wxColour_typecheck(a) (wxPyCoreAPIPtr->p_wxColour_typecheck(a))
93
94 #define wxPyCBH_setCallbackInfo(a, b, c, d) (wxPyCoreAPIPtr->p_wxPyCBH_setCallbackInfo(a,b,c,d))
95 #define wxPyCBH_findCallback(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_findCallback(a, b))
96 #define wxPyCBH_callCallback(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_callCallback(a, b))
97 #define wxPyCBH_callCallbackObj(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_callCallbackObj(a, b))
98 #define wxPyCBH_delete(a) (wxPyCoreAPIPtr->p_wxPyCBH_delete(a))
99
100 #define wxPyMake_wxObject(a) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,True))
101 #define wxPyMake_wxObject2(a,b) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,b))
102 #define wxPyMake_wxSizer(a) (wxPyCoreAPIPtr->p_wxPyMake_wxSizer(a))
103 #define wxPyPtrTypeMap_Add(a, b) (wxPyCoreAPIPtr->p_wxPyPtrTypeMap_Add(a, b))
104 #define wxPy2int_seq_helper(a, b, c) (wxPyCoreAPIPtr->p_wxPy2int_seq_helper(a, b, c))
105 #define wxPy4int_seq_helper(a, b, c, d, e) (wxPyCoreAPIPtr->p_wxPy4int_seq_helper(a, b, c, d, e))
106 #define wxArrayString2PyList_helper(a) (wxPyCoreAPIPtr->p_wxArrayString2PyList_helper(a))
107 #define wxArrayInt2PyList_helper(a) (wxPyCoreAPIPtr->p_wxArrayInt2PyList_helper(a))
108
109 #define wxPyClientData_dtor(a) (wxPyCoreAPIPtr->p_wxPyClientData_dtor(a))
110 #define wxPyUserData_dtor(a) (wxPyCoreAPIPtr->p_wxPyUserData_dtor(a))
111 #define wxPyOORClientData_dtor(a) (wxPyCoreAPIPtr->p_wxPyOORClientData_dtor(a))
112
113 #define wxPyCBInputStream_create(a, b) (wxPyCoreAPIPtr->p_wxPyCBInputStream_create(a, b))
114
115 #define wxPyInstance_Check(a) (wxPyCoreAPIPtr->p_wxPyInstance_Check(a))
116 #define wxPySwigInstance_Check(a) (wxPyCoreAPIPtr->p_wxPySwigInstance_Check(a))
117
118
119 // This one is special. It's the first function called in SWIG generated
120 // modules, so we'll use it to also import the API.
121 #define SWIG_Python_newvarlink() (wxPyCoreAPI_IMPORT(), wxPyCoreAPIPtr->p_SWIG_Python_newvarlink())
122
123
124 //----------------------------------------------------------------------
125 #endif