1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface defs for various functions and such
7 // Created: 3-July-1997
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
19 DECLARE_DEF_STRING(FileSelectorPromptStr);
20 DECLARE_DEF_STRING(FileSelectorDefaultWildcardStr);
21 DECLARE_DEF_STRING(DirSelectorPromptStr);
24 //---------------------------------------------------------------------------
29 void wxRegisterId(long id);
30 long wxGetCurrentId();
33 void wxEndBusyCursor();
35 long wxGetElapsedTime(bool resetTimer = True);
36 void wxGetMousePosition(int* OUTPUT, int* OUTPUT);
39 bool wxShell(const wxString& command = wxPyEmptyString);
41 int wxGetOsVersion(int *OUTPUT, int *OUTPUT);
42 wxString wxGetOsDescription();
44 #if defined(__WXMSW__) || defined(__WXMAC__)
45 long wxGetFreeMemory();
48 long wxGetFreeMemory()
49 { PyErr_SetNone(PyExc_NotImplementedError); return 0; }
55 wxSHUTDOWN_POWEROFF, // power off the computer
56 wxSHUTDOWN_REBOOT // shutdown and reboot
59 // Shutdown or reboot the PC
60 bool wxShutdown(wxShutdownFlags wFlags);
63 void wxSleep(int secs);
64 void wxUsleep(unsigned long milliseconds);
65 void wxEnableTopLevelWindows(bool enable);
67 wxString wxStripMenuCodes(const wxString& in);
70 wxString wxGetEmailAddress();
71 wxString wxGetHostName();
72 wxString wxGetFullHostName();
73 wxString wxGetUserId();
74 wxString wxGetUserName();
75 wxString wxGetHomeDir();
76 wxString wxGetUserHome(const wxString& user = wxPyEmptyString);
78 unsigned long wxGetProcessId();
85 wxString wxFileSelector(const wxString& message = wxPyFileSelectorPromptStr,
86 const wxString& default_path = wxPyEmptyString,
87 const wxString& default_filename = wxPyEmptyString,
88 const wxString& default_extension = wxPyEmptyString,
89 const wxString& wildcard = wxPyFileSelectorDefaultWildcardStr,
91 wxWindow *parent = NULL,
92 int x = -1, int y = -1);
94 // TODO: wxFileSelectorEx
97 // Ask for filename to load
98 wxString wxLoadFileSelector(const wxString& what,
99 const wxString& extension,
100 const wxString& default_name = wxPyEmptyString,
101 wxWindow *parent = NULL);
103 // Ask for filename to save
104 wxString wxSaveFileSelector(const wxString& what,
105 const wxString& extension,
106 const wxString& default_name = wxPyEmptyString,
107 wxWindow *parent = NULL);
110 wxString wxDirSelector(const wxString& message = wxPyDirSelectorPromptStr,
111 const wxString& defaultPath = wxPyEmptyString,
112 long style = wxDD_DEFAULT_STYLE,
113 const wxPoint& pos = wxDefaultPosition,
114 wxWindow *parent = NULL);
116 wxString wxGetTextFromUser(const wxString& message,
117 const wxString& caption = wxPyEmptyString,
118 const wxString& default_value = wxPyEmptyString,
119 wxWindow *parent = NULL,
120 int x = -1, int y = -1,
123 wxString wxGetPasswordFromUser(const wxString& message,
124 const wxString& caption = wxPyEmptyString,
125 const wxString& default_value = wxPyEmptyString,
126 wxWindow *parent = NULL);
129 // TODO: Need to custom wrap this one...
130 // int wxGetMultipleChoice(char* message, char* caption,
131 // int LCOUNT, char** choices,
132 // int nsel, int *selection,
133 // wxWindow *parent = NULL, int x = -1, int y = -1,
134 // bool centre = True, int width=150, int height=200);
137 wxString wxGetSingleChoice(const wxString& message, const wxString& caption,
138 int choices, wxString* choices_array,
139 wxWindow *parent = NULL,
140 int x = -1, int y = -1,
142 int width=150, int height=200);
144 int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption,
145 int choices, wxString* choices_array,
146 wxWindow *parent = NULL,
147 int x = -1, int y = -1,
149 int width=150, int height=200);
152 int wxMessageBox(const wxString& message,
153 const wxString& caption = wxPyEmptyString,
154 int style = wxOK | wxCENTRE,
155 wxWindow *parent = NULL,
156 int x = -1, int y = -1);
158 long wxGetNumberFromUser(const wxString& message,
159 const wxString& prompt,
160 const wxString& caption,
162 long min = 0, long max = 100,
163 wxWindow *parent = NULL,
164 const wxPoint& pos = wxDefaultPosition);
168 bool wxColourDisplay();
170 int wxDisplayDepth();
171 int wxGetDisplayDepth();
173 void wxDisplaySize(int* OUTPUT, int* OUTPUT);
174 wxSize wxGetDisplaySize();
176 void wxDisplaySizeMM(int* OUTPUT, int* OUTPUT);
177 wxSize wxGetDisplaySizeMM();
179 void wxClientDisplayRect(int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT);
180 wxRect wxGetClientDisplayRect();
182 void wxSetCursor(wxCursor& cursor);
186 // Miscellaneous functions
188 void wxBeginBusyCursor(wxCursor *cursor = wxHOURGLASS_CURSOR);
189 wxWindow * wxGetActiveWindow();
191 wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt);
192 wxWindow* wxFindWindowAtPoint(const wxPoint& pt);
194 wxWindow* wxGetTopLevelParent(wxWindow *win);
196 //bool wxSpawnBrowser(wxWindow *parent, wxString href);
200 //---------------------------------------------------------------------------
202 #if defined(__WXMSW__) || defined(__WXMAC__)
203 void wxWakeUpMainThread();
206 void wxWakeUpMainThread() {}
210 void wxMutexGuiEnter();
211 void wxMutexGuiLeave();
214 class wxMutexGuiLocker {
222 bool wxThread_IsMain() {
223 #ifdef WXP_WITH_THREAD
224 return wxThread::IsMain();
231 //---------------------------------------------------------------------------
232 //---------------------------------------------------------------------------