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 //---------------------------------------------------------------------------
18 MAKE_CONST_WXSTRING(FileSelectorPromptStr);
19 MAKE_CONST_WXSTRING(FileSelectorDefaultWildcardStr);
20 MAKE_CONST_WXSTRING(DirSelectorPromptStr);
22 //---------------------------------------------------------------------------
27 void wxRegisterId(long id);
28 long wxGetCurrentId();
31 void wxEndBusyCursor();
33 long wxGetElapsedTime(bool resetTimer = True);
36 void, wxGetMousePosition(int* OUTPUT, int* OUTPUT),
37 "GetMousePosition() -> (x,y)");
41 bool wxShell(const wxString& command = wxPyEmptyString);
45 int, wxGetOsVersion(int *OUTPUT, int *OUTPUT),
46 "GetOsVersion() -> (platform, major, minor)");
48 wxString wxGetOsDescription();
50 #if defined(__WXMSW__) || defined(__WXMAC__)
51 long wxGetFreeMemory();
54 long wxGetFreeMemory()
55 { wxPyRaiseNotImplemented(); return 0; }
61 wxSHUTDOWN_POWEROFF, // power off the computer
62 wxSHUTDOWN_REBOOT // shutdown and reboot
65 // Shutdown or reboot the PC
66 bool wxShutdown(wxShutdownFlags wFlags);
69 void wxSleep(int secs);
70 void wxUsleep(unsigned long milliseconds);
71 void wxEnableTopLevelWindows(bool enable);
73 wxString wxStripMenuCodes(const wxString& in);
76 wxString wxGetEmailAddress();
77 wxString wxGetHostName();
78 wxString wxGetFullHostName();
79 wxString wxGetUserId();
80 wxString wxGetUserName();
81 wxString wxGetHomeDir();
82 wxString wxGetUserHome(const wxString& user = wxPyEmptyString);
84 unsigned long wxGetProcessId();
91 wxString wxFileSelector(const wxString& message = wxPyFileSelectorPromptStr,
92 const wxString& default_path = wxPyEmptyString,
93 const wxString& default_filename = wxPyEmptyString,
94 const wxString& default_extension = wxPyEmptyString,
95 const wxString& wildcard = wxPyFileSelectorDefaultWildcardStr,
97 wxWindow *parent = NULL,
98 int x = -1, int y = -1);
100 // TODO: wxFileSelectorEx
103 // Ask for filename to load
104 wxString wxLoadFileSelector(const wxString& what,
105 const wxString& extension,
106 const wxString& default_name = wxPyEmptyString,
107 wxWindow *parent = NULL);
109 // Ask for filename to save
110 wxString wxSaveFileSelector(const wxString& what,
111 const wxString& extension,
112 const wxString& default_name = wxPyEmptyString,
113 wxWindow *parent = NULL);
116 wxString wxDirSelector(const wxString& message = wxPyDirSelectorPromptStr,
117 const wxString& defaultPath = wxPyEmptyString,
118 long style = wxDD_DEFAULT_STYLE,
119 const wxPoint& pos = wxDefaultPosition,
120 wxWindow *parent = NULL);
122 wxString wxGetTextFromUser(const wxString& message,
123 const wxString& caption = wxPyEmptyString,
124 const wxString& default_value = wxPyEmptyString,
125 wxWindow *parent = NULL,
126 int x = -1, int y = -1,
129 wxString wxGetPasswordFromUser(const wxString& message,
130 const wxString& caption = wxPyEmptyString,
131 const wxString& default_value = wxPyEmptyString,
132 wxWindow *parent = NULL);
135 // TODO: Need to custom wrap this one...
136 // int wxGetMultipleChoice(char* message, char* caption,
137 // int LCOUNT, char** choices,
138 // int nsel, int *selection,
139 // wxWindow *parent = NULL, int x = -1, int y = -1,
140 // bool centre = True, int width=150, int height=200);
143 wxString wxGetSingleChoice(const wxString& message, const wxString& caption,
144 int choices, wxString* choices_array,
145 wxWindow *parent = NULL,
146 int x = -1, int y = -1,
148 int width=150, int height=200);
150 int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption,
151 int choices, wxString* choices_array,
152 wxWindow *parent = NULL,
153 int x = -1, int y = -1,
155 int width=150, int height=200);
158 int wxMessageBox(const wxString& message,
159 const wxString& caption = wxPyEmptyString,
160 int style = wxOK | wxCENTRE,
161 wxWindow *parent = NULL,
162 int x = -1, int y = -1);
164 long wxGetNumberFromUser(const wxString& message,
165 const wxString& prompt,
166 const wxString& caption,
168 long min = 0, long max = 100,
169 wxWindow *parent = NULL,
170 const wxPoint& pos = wxDefaultPosition);
174 bool wxColourDisplay();
176 int wxDisplayDepth();
177 int wxGetDisplayDepth();
180 void, wxDisplaySize(int* OUTPUT, int* OUTPUT),
181 "DisplaySize() -> (width, height)");
182 wxSize wxGetDisplaySize();
185 void, wxDisplaySizeMM(int* OUTPUT, int* OUTPUT),
186 "DisplaySizeMM() -> (width, height)");
187 wxSize wxGetDisplaySizeMM();
190 void, wxClientDisplayRect(int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT),
191 "ClientDisplayRect() -> (x, y, width, height)");
192 wxRect wxGetClientDisplayRect();
194 void wxSetCursor(wxCursor& cursor);
198 // Miscellaneous functions
200 void wxBeginBusyCursor(wxCursor *cursor = wxHOURGLASS_CURSOR);
201 wxWindow * wxGetActiveWindow();
203 wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt);
204 wxWindow* wxFindWindowAtPoint(const wxPoint& pt);
206 wxWindow* wxGetTopLevelParent(wxWindow *win);
208 //bool wxSpawnBrowser(wxWindow *parent, wxString href);
212 #if defined(__WXMSW__) || defined(__WXMAC__)
213 // Get the state of a key (true if pressed, false if not)
214 // This is generally most useful getting the state of
215 // Caps Lock, Num Lock and Scroll Lock...
216 bool wxGetKeyState(wxKeyCode key);
219 bool wxGetKeyState(wxKeyCode key)
220 { wxPyRaiseNotImplemented(); return False; }
225 //---------------------------------------------------------------------------
227 #if defined(__WXMSW__) || defined(__WXMAC__)
228 void wxWakeUpMainThread();
231 void wxWakeUpMainThread() {}
235 void wxMutexGuiEnter();
236 void wxMutexGuiLeave();
239 class wxMutexGuiLocker {
247 bool wxThread_IsMain() {
248 #ifdef WXP_WITH_THREAD
249 return wxThread::IsMain();
256 //---------------------------------------------------------------------------
257 //---------------------------------------------------------------------------