]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/wxPython.h
Updated note about wxSTC using wxPopupWindow
[wxWidgets.git] / wxPython / src / wxPython.h
CommitLineData
1e7ecb7b 1////////////////////////////////////////////////////////////////////////////
6e2129f9 2// Name: wxPython.h
1e7ecb7b 3// Purpose: To be used from modules that are not part of the core
6e2129f9
RD
4// wxPython extension--or from 3rd party apps and modules--in
5// order to get access to some helper functions that live in wxc.
1e7ecb7b
RD
6//
7// Author: Robin Dunn
8//
9// Created: 14-Dec-2000
10// RCS-ID: $Id$
11// Copyright: (c) 2000 by Total Control Software
12// Licence: wxWindows license
13/////////////////////////////////////////////////////////////////////////////
14
15#ifndef __wxp_export__
16#define __wxp_export__
17
18//----------------------------------------------------------------------
19
6e2129f9
RD
20// TODO: Make it so this and helpers.h are installed to
21// the wx include path...
22
1e7ecb7b
RD
23#define wxPyUSE_EXPORT
24#include "helpers.h"
25
6e2129f9 26//----------------------------------------------------------------------
1e7ecb7b 27
6e2129f9
RD
28// This needs to be called in modules that need to make calls to any
29// of the functions exported by the wxPython API. It sets a static
30// pointer to a structure of function pointers located in wxc.
1b62f00d
RD
31static void wxPyCoreAPI_IMPORT() {
32 wxPyCoreAPIPtr = (wxPyCoreAPI*)PyCObject_Import("wxPython.wxc", "wxPyCoreAPI");
33 if (! wxPyCoreAPIPtr)
34 wxPyCoreAPIPtr = (wxPyCoreAPI*)PyCObject_Import("wxc", "wxPyCoreAPI");
35}
1e7ecb7b 36
6e2129f9
RD
37
38
39// The following macros actually call functions of the same name located
40// in the wxc extension module via the API pointer retieved above.
41
a541c325
RD
42#define SWIG_MakePtr(a, b, c) (wxPyCoreAPIPtr->p_SWIG_MakePtr(a, b, c))
43#define SWIG_GetPtr(a, b, c) (wxPyCoreAPIPtr->p_SWIG_GetPtr(a, b, c))
44#define SWIG_GetPtrObj(a, b, c) (wxPyCoreAPIPtr->p_SWIG_GetPtrObj(a, b, c))
45#define SWIG_RegisterMapping(a, b, c) (wxPyCoreAPIPtr->p_SWIG_RegisterMapping(a, b, c))
46#define SWIG_addvarlink(a, b, c, d) (wxPyCoreAPIPtr->p_SWIG_addvarlink(a, b, c, d))
47
48#define wxPyBeginAllowThreads() (wxPyCoreAPIPtr->p_wxPyBeginAllowThreads())
49#define wxPyEndAllowThreads(a) (wxPyCoreAPIPtr->p_wxPyEndAllowThreads(a))
50#define wxPyBeginBlockThreads() (wxPyCoreAPIPtr->p_wxPyBeginBlockThreads())
51#define wxPyEndBlockThreads() (wxPyCoreAPIPtr->p_wxPyEndBlockThreads())
52
53#define wxPyConstructObject(a,b,c) (wxPyCoreAPIPtr->p_wxPyConstructObject(a,b,c))
54#define wxPy_ConvertList(a,b) (wxPyCoreAPIPtr->p_wxPy_ConvertList(a,b))
55
56#define wxString_in_helper(a) (wxPyCoreAPIPtr->p_wxString_in_helper(a))
57#define Py2wxString(a) (wxPyCoreAPIPtr->p_Py2wxString(a))
58#define wx2PyString(a) (wxPyCoreAPIPtr->p_wx2PyString(a))
59
60#define byte_LIST_helper(a) (wxPyCoreAPIPtr->p_byte_LIST_helper(a))
61#define int_LIST_helper(a) (wxPyCoreAPIPtr->p_int_LIST_helper(a))
62#define long_LIST_helper(a) (wxPyCoreAPIPtr->p_long_LIST_helper(a))
63#define string_LIST_helper(a) (wxPyCoreAPIPtr->p_string_LIST_helper(a))
64#define wxPoint_LIST_helper(a,b) (wxPyCoreAPIPtr->p_wxPoint_LIST_helper(a, b))
65#define wxBitmap_LIST_helper(a) (wxPyCoreAPIPtr->p_wxBitmap_LIST_helper(a))
66#define wxString_LIST_helper(a) (wxPyCoreAPIPtr->p_wxString_LIST_helper(a))
67#define wxAcceleratorEntry_LIST_helper(a) (wxPyCoreAPIPtr->p_wxAcceleratorEntry_LIST_helper(a))
68
69#define wxSize_helper(a,b) (wxPyCoreAPIPtr->p_wxSize_helper(a,b))
70#define wxPoint_helper(a,b) (wxPyCoreAPIPtr->p_wxPoint_helper(a,b))
71#define wxRealPoint_helper(a,b) (wxPyCoreAPIPtr->p_wxRealPoint_helper(a,b))
72#define wxRect_helper(a,b) (wxPyCoreAPIPtr->p_wxRect_helper(a,b))
73#define wxColour_helper(a,b) (wxPyCoreAPIPtr->p_wxColour_helper(a,b))
74
75#define wxPyCBH_setCallbackInfo(a, b, c, d) (wxPyCoreAPIPtr->p_wxPyCBH_setCallbackInfo(a,b,c,d))
76#define wxPyCBH_findCallback(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_findCallback(a, b))
77#define wxPyCBH_callCallback(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_callCallback(a, b))
78#define wxPyCBH_callCallbackObj(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_callCallbackObj(a, b))
79#define wxPyCBH_delete(a) (wxPyCoreAPIPtr->p_wxPyCBH_delete(a))
80
81#define wxPyClassExists(a) (wxPyCoreAPIPtr->p_wxPyClassExists(a))
82#define wxPyMake_wxObject(a) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,TRUE))
83#define wxPyMake_wxObject2(a,b) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,b))
84#define wxPyMake_wxSizer(a) (wxPyCoreAPIPtr->p_wxPyMake_wxSizer(a))
85#define wxPyPtrTypeMap_Add(a, b) (wxPyCoreAPIPtr->p_wxPyPtrTypeMap_Add(a, b))
86#define wxArrayString2PyList_helper(a) (wxPyCoreAPIPtr->p_wxArrayString2PyList_helper(a))
87#define wxArrayInt2PyList_helper(a) (wxPyCoreAPIPtr->p_wxArrayInt2PyList_helper(a))
9416aa89 88
4acff284
RD
89#define wxPyClientData_dtor(a) (wxPyCoreAPIPtr->p_wxPyClientData_dtor(a))
90#define wxPyUserData_dtor(a) (wxPyCoreAPIPtr->p_wxPyUserData_dtor(a))
91#define wxPyOORClientData_dtor(a) (wxPyCoreAPIPtr->p_wxPyOORClientData_dtor(a))
1e7ecb7b 92
249a57f4
RD
93#define wxPyCBInputStream_create(a, b) (wxPyCoreAPIPtr->p_wxPyCBInputStream_create(a, b))
94
95
1e7ecb7b
RD
96// This one is special. It's the first function called in SWIG generated
97// modules, so we'll use it to also import the API.
a541c325 98#define SWIG_newvarlink() (wxPyCoreAPI_IMPORT(), wxPyCoreAPIPtr->p_SWIG_newvarlink())
1e7ecb7b
RD
99
100
101//----------------------------------------------------------------------
102#endif