]> git.saurik.com Git - wxWidgets.git/blob - interface/utils.h
Finished review/fixes of Math and Miscellaneous categories of functions and macros.
[wxWidgets.git] / interface / utils.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: utils.h
3 // Purpose: interface of wxWindowDisabler
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxWindowDisabler
11 @wxheader{utils.h}
12
13 This class disables all windows of the application (may be with the exception
14 of one of them) in its constructor and enables them back in its destructor.
15
16 This is useful when you want to indicate to the user that the application
17 is currently busy and cannot respond to user input.
18
19 @library{wxcore}
20 @category{FIXME}
21
22 @see wxBusyCursor
23 */
24 class wxWindowDisabler
25 {
26 public:
27 /**
28 Disables all top level windows of the applications.
29
30 If @a disable is @c false nothing is done. This can be convenient if
31 the windows should be disabled depending on some condition.
32
33 @since 2.9.0
34 */
35 wxWindowDisabler(bool disable = true);
36
37 /**
38 Disables all top level windows of the applications with the exception of
39 @a winToSkip if it is not @NULL.
40 */
41 wxWindowDisabler(wxWindow* winToSkip);
42
43 /**
44 Reenables back the windows disabled by the constructor.
45 */
46 ~wxWindowDisabler();
47 };
48
49
50
51 /**
52 @class wxBusyCursor
53 @wxheader{utils.h}
54
55 This class makes it easy to tell your user that the program is temporarily busy.
56 Just create a wxBusyCursor object on the stack, and within the current scope,
57 the hourglass will be shown.
58
59 For example:
60
61 @code
62 wxBusyCursor wait;
63
64 for (int i = 0; i 100000; i++)
65 DoACalculation();
66 @endcode
67
68 It works by calling wxBeginBusyCursor() in the constructor,
69 and wxEndBusyCursor() in the destructor.
70
71 @library{wxcore}
72 @category{FIXME}
73
74 @see wxBeginBusyCursor(), wxEndBusyCursor(), wxWindowDisabler
75 */
76 class wxBusyCursor
77 {
78 public:
79 /**
80 Constructs a busy cursor object, calling wxBeginBusyCursor().
81 */
82 wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR);
83
84 /**
85 Destroys the busy cursor object, calling wxEndBusyCursor().
86 */
87 ~wxBusyCursor();
88 };
89
90
91
92 // ============================================================================
93 // Global functions/macros
94 // ============================================================================
95
96
97 /** @ingroup group_funcmacro_dialog */
98 //@{
99
100 /**
101 Changes the cursor to the given cursor for all windows in the application.
102 Use wxEndBusyCursor() to revert the cursor back to its previous state.
103 These two calls can be nested, and a counter ensures that only the outer
104 calls take effect.
105
106 @see wxIsBusy(), wxBusyCursor
107
108 @header{wx/utils.h}
109 */
110 void wxBeginBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR);
111
112 /**
113 Changes the cursor back to the original cursor, for all windows in the
114 application. Use with wxBeginBusyCursor().
115
116 @see wxIsBusy(), wxBusyCursor
117
118 @header{wx/utils.h}
119 */
120 void wxEndBusyCursor();
121
122 /**
123 Returns @true if between two wxBeginBusyCursor() and wxEndBusyCursor()
124 calls.
125
126 @see wxBusyCursor.
127
128 @header{wx/utils.h}
129 */
130 bool wxIsBusy();
131
132 /**
133 Ring the system bell.
134
135 @note This function is categorized as a GUI one and so is not thread-safe.
136
137 @header{wx/utils.h}
138 */
139 void wxBell();
140
141 /**
142 Shows a message box with the information about the wxWidgets build used,
143 including its version, most important build parameters and the version of
144 the underlying GUI toolkit. This is mainly used for diagnostic purposes
145 and can be invoked by Ctrl-Alt-middle clicking on any wxWindow which
146 doesn't otherwise handle this event.
147
148 @wxsince{2.9.0}
149
150 @header{wx/utils.h}
151 */
152 void wxInfoMessageBox(wxWindow parent = NULL);
153
154 //@}
155
156
157
158 /** @ingroup group_funcmacro_env */
159 //@{
160
161 /**
162 This is a macro defined as @c getenv() or its wide char version in Unicode
163 mode.
164
165 Note that under Win32 it may not return correct value for the variables set
166 with wxSetEnv(), use wxGetEnv() function instead.
167
168 @header{wx/utils.h}
169 */
170 wxChar* wxGetenv(const wxString& var);
171
172 /**
173 Returns the current value of the environment variable @c var in @c value.
174 @c value may be @NULL if you just want to know if the variable exists and
175 are not interested in its value.
176
177 Returns @true if the variable exists, @false otherwise.
178
179 @header{wx/utils.h}
180 */
181 bool wxGetEnv(const wxString& var, wxString* value);
182
183 /**
184 Sets the value of the environment variable @c var (adding it if necessary)
185 to @c value.
186
187 Returns @true on success.
188
189 @see wxUnsetEnv()
190
191 @header{wx/utils.h}
192 */
193 bool wxSetEnv(const wxString& var, const wxString& value);
194
195 /**
196 Removes the variable @c var from the environment. wxGetEnv() will return
197 @NULL after the call to this function.
198
199 Returns @true on success.
200
201 @header{wx/utils.h}
202 */
203 bool wxUnsetEnv(const wxString& var);
204
205 //@}
206
207
208
209 /** @ingroup group_funcmacro_misc */
210 //@{
211
212 /**
213 Returns battery state as one of @c wxBATTERY_NORMAL_STATE,
214 @c wxBATTERY_LOW_STATE, @c wxBATTERY_CRITICAL_STATE,
215 @c wxBATTERY_SHUTDOWN_STATE or @c wxBATTERY_UNKNOWN_STATE.
216 @c wxBATTERY_UNKNOWN_STATE is also the default on platforms where this
217 feature is not implemented (currently everywhere but MS Windows).
218
219 @header{wx/utils.h}
220 */
221 wxBatteryState wxGetBatteryState();
222
223 /**
224 Returns the type of power source as one of @c wxPOWER_SOCKET,
225 @c wxPOWER_BATTERY or @c wxPOWER_UNKNOWN. @c wxPOWER_UNKNOWN is also the
226 default on platforms where this feature is not implemented (currently
227 everywhere but MS Windows).
228
229 @header{wx/utils.h}
230 */
231 wxPowerType wxGetPowerType();
232
233 /**
234 Under X only, returns the current display name.
235
236 @see wxSetDisplayName()
237
238 @header{wx/utils.h}
239 */
240 wxString wxGetDisplayName();
241
242 /**
243 For normal keys, returns @true if the specified key is currently down.
244
245 For togglable keys (Caps Lock, Num Lock and Scroll Lock), returns @true if
246 the key is toggled such that its LED indicator is lit. There is currently
247 no way to test whether togglable keys are up or down.
248
249 Even though there are virtual key codes defined for mouse buttons, they
250 cannot be used with this function currently.
251
252 @header{wx/utils.h}
253 */
254 bool wxGetKeyState(wxKeyCode key);
255
256 /**
257 Returns the mouse position in screen coordinates.
258
259 @header{wx/utils.h}
260 */
261 wxPoint wxGetMousePosition();
262
263 /**
264 Returns the current state of the mouse. Returns a wxMouseState instance
265 that contains the current position of the mouse pointer in screen
266 coordinates, as well as boolean values indicating the up/down status of the
267 mouse buttons and the modifier keys.
268
269 @header{wx/utils.h}
270 */
271 wxMouseState wxGetMouseState();
272
273 /**
274 This function enables or disables all top level windows. It is used by
275 wxSafeYield().
276
277 @header{wx/utils.h}
278 */
279 void wxEnableTopLevelWindows(bool enable = true);
280
281 /**
282 Find the deepest window at the given mouse position in screen coordinates,
283 returning the window if found, or @NULL if not.
284
285 @header{wx/utils.h}
286 */
287 wxWindow* wxFindWindowAtPoint(const wxPoint& pt);
288
289 /**
290 @deprecated Replaced by wxWindow::FindWindowByLabel().
291
292 Find a window by its label. Depending on the type of window, the label may
293 be a window title or panel item label. If @a parent is @NULL, the search
294 will start from all top-level frames and dialog boxes; if non-@NULL, the
295 search will be limited to the given window hierarchy. The search is
296 recursive in both cases.
297
298 @header{wx/utils.h}
299 */
300 wxWindow* wxFindWindowByLabel(const wxString& label,
301 wxWindow* parent = NULL);
302
303 /**
304 @deprecated Replaced by wxWindow::FindWindowByName().
305
306 Find a window by its name (as given in a window constructor or @e Create
307 function call). If @a parent is @NULL, the search will start from all
308 top-level frames and dialog boxes; if non-@NULL, the search will be limited
309 to the given window hierarchy. The search is recursive in both cases.
310
311 If no such named window is found, wxFindWindowByLabel() is called.
312
313 @header{wx/utils.h}
314 */
315 wxWindow* wxFindWindowByName(const wxString& name, wxWindow* parent = NULL);
316
317 /**
318 Find a menu item identifier associated with the given frame's menu bar.
319
320 @header{wx/utils.h}
321 */
322 int wxFindMenuItemId(wxFrame* frame, const wxString& menuString,
323 const wxString& itemString);
324
325 /**
326 @deprecated Ids generated by it can conflict with the Ids defined by the
327 user code, use @c wxID_ANY to assign ids which are guaranteed
328 to not conflict with the user-defined ids for the controls and
329 menu items you create instead of using this function.
330
331 Generates an integer identifier unique to this run of the program.
332
333 @header{wx/utils.h}
334 */
335 long wxNewId();
336
337 /**
338 Ensures that Ids subsequently generated by wxNewId() do not clash with the
339 given @a id.
340
341 @header{wx/utils.h}
342 */
343 void wxRegisterId(long id);
344
345 /**
346 Opens the @a url in user's default browser. If the @a flags parameter
347 contains @c wxBROWSER_NEW_WINDOW flag, a new window is opened for the URL
348 (currently this is only supported under Windows). The @a url may also be a
349 local file path (with or without the "file://" prefix), if it doesn't
350 correspond to an existing file and the URL has no scheme "http://" is
351 prepended to it by default.
352
353 Returns @true if the application was successfully launched.
354
355 @note For some configurations of the running user, the application which is
356 launched to open the given URL may be URL-dependent (e.g. a browser
357 may be used for local URLs while another one may be used for remote
358 URLs).
359
360 @header{wx/utils.h}
361 */
362 bool wxLaunchDefaultBrowser(const wxString& url, int flags = 0);
363
364 /**
365 Loads a user-defined Windows resource as a string. If the resource is
366 found, the function creates a new character array and copies the data into
367 it. A pointer to this data is returned. If unsuccessful, @NULL is returned.
368
369 The resource must be defined in the @c .rc file using the following syntax:
370
371 @code
372 myResource TEXT file.ext
373 @endcode
374
375 Where @c file.ext is a file that the resource compiler can find.
376
377 This function is available under Windows only.
378
379 @header{wx/utils.h}
380 */
381 wxString wxLoadUserResource(const wxString& resourceName,
382 const wxString& resourceType = "TEXT");
383
384 /**
385 @deprecated Replaced by wxWindow::Close(). See the
386 @ref overview_windowdeletion "window deletion overview".
387
388 Tells the system to delete the specified object when all other events have
389 been processed. In some environments, it is necessary to use this instead
390 of deleting a frame directly with the delete operator, because some GUIs
391 will still send events to a deleted window.
392
393 @header{wx/utils.h}
394 */
395 void wxPostDelete(wxObject* object);
396
397 /**
398 Under X only, sets the current display name. This is the X host and display
399 name such as "colonsay:0.0", and the function indicates which display
400 should be used for creating windows from this point on. Setting the display
401 within an application allows multiple displays to be used.
402
403 @see wxGetDisplayName()
404
405 @header{wx/utils.h}
406 */
407 void wxSetDisplayName(const wxString& displayName);
408
409 /**
410 Strips any menu codes from @a str and returns the result.
411
412 By default, the functions strips both the mnemonics character (@c '&')
413 which is used to indicate a keyboard shortkey, and the accelerators, which
414 are used only in the menu items and are separated from the main text by the
415 @c \t (TAB) character. By using @a flags of @c wxStrip_Mnemonics or
416 @c wxStrip_Accel to strip only the former or the latter part, respectively.
417
418 Notice that in most cases wxMenuItem::GetLabelFromText() or
419 wxControl::GetLabelText() can be used instead.
420
421 @header{wx/utils.h}
422 */
423 wxString wxStripMenuCodes(const wxString& str, int flags = wxStrip_All);
424
425 //@}
426
427
428
429
430
431
432 /**
433 This function returns the "user id" also known as "login name" under Unix
434 i.e. something like "jsmith". It uniquely identifies the current user (on
435 this system). Under Windows or NT, this function first looks in the
436 environment variables USER and LOGNAME; if neither of these is found, the
437 entry @b UserId in the @b wxWidgets section of the WIN.INI file is tried.
438
439 @return Returns the login name if successful or an empty string otherwise.
440
441 @see wxGetUserName()
442
443 @header{wx/utils.h}
444 */
445 wxString wxGetUserId();
446
447 /**
448 @deprecated
449 This form is deprecated, use wxGetUserId() version that returns wxString.
450
451 @param buf Buffer to store login name in.
452 @param sz Size of the buffer.
453
454 @return Returns @true if successful, @false otherwise.
455 */
456 bool wxGetUserId(char* buf, int sz);
457
458 /**
459 Returns the string containing the description of the current platform in a
460 user-readable form. For example, this function may return strings like
461 @c Windows NT Version 4.0 or @c Linux 2.2.2 i386.
462
463 @see ::wxGetOsVersion
464
465 @header{wx/utils.h}
466 */
467 wxString wxGetOsDescription();
468
469 /**
470 Return the (current) user's home directory.
471
472 @see wxGetUserHome(), wxStandardPaths
473
474 @header{wx/utils.h}
475 */
476 wxString wxGetHomeDir();
477
478 /**
479 Sleeps for the specified number of milliseconds. Notice that usage of this
480 function is encouraged instead of calling usleep(3) directly because the
481 standard usleep() function is not MT safe.
482
483 @header{wx/utils.h}
484 */
485 void wxMilliSleep(unsigned long milliseconds);
486
487 /**
488 Sleeps for the specified number of microseconds. The microsecond resolution may
489 not, in fact, be available on all platforms (currently only Unix platforms with
490 nanosleep(2) may provide it) in which case this is the same as
491 wxMilliSleep()(@e microseconds/1000).
492
493 @header{wx/utils.h}
494 */
495 void wxMicroSleep(unsigned long microseconds);
496
497 /**
498 Executes a command in an interactive shell window. If no command is
499 specified, then just the shell is spawned.
500 See also wxExecute(), @ref overview_sampleexec "Exec sample".
501
502 @header{wx/utils.h}
503 */
504 bool wxShell(const wxString& command = NULL);
505
506 /**
507 Gets the version and the operating system ID for currently running OS.
508 See wxPlatformInfo for more details about wxOperatingSystemId.
509
510 @see ::wxGetOsDescription, wxPlatformInfo
511
512 @header{wx/utils.h}
513 */
514 wxOperatingSystemId wxGetOsVersion(int* major = NULL,
515 int* minor = NULL);
516
517 /**
518 Returns the FQDN (fully qualified domain host name) or an empty string on
519 error.
520
521 @see wxGetHostName()
522
523 @header{wx/utils.h}
524 */
525 wxString wxGetFullHostName();
526
527 /**
528 Returns the amount of free memory in bytes under environments which
529 support it, and -1 if not supported or failed to perform measurement.
530 */
531 wxMemorySize wxGetFreeMemory();
532
533 //@{
534 /**
535 Copies the current host machine's name into the supplied buffer. Please note
536 that the returned name is @e not fully qualified, i.e. it does not include
537 the domain name.
538 Under Windows or NT, this function first looks in the environment
539 variable SYSTEM_NAME; if this is not found, the entry @b HostName
540 in the @b wxWidgets section of the WIN.INI file is tried.
541 The first variant of this function returns the hostname if successful or an
542 empty string otherwise. The second (deprecated) function returns @true
543 if successful, @false otherwise.
544
545 @see wxGetFullHostName()
546
547 @header{wx/utils.h}
548 */
549 wxString wxGetHostName();
550 bool wxGetHostName(char* buf, int sz);
551 //@}
552
553 /**
554 Returns the home directory for the given user. If the @a user is empty
555 (default value), this function behaves like
556 wxGetHomeDir() i.e. returns the current user home
557 directory.
558 If the home directory couldn't be determined, an empty string is returned.
559
560 @header{wx/utils.h}
561 */
562 wxString wxGetUserHome(const wxString& user = "");
563
564 //@{
565 /**
566 @b wxPerl note: In wxPerl this function is called @c Wx::ExecuteStdoutStderr
567 and it only takes the @c command argument,
568 and returns a 3-element list @c ( status, output, errors ), where
569 @c output and @c errors are array references.
570 Executes another program in Unix or Windows.
571 The first form takes a command string, such as @c "emacs file.txt".
572 The second form takes an array of values: a command, any number of
573 arguments, terminated by @NULL.
574 The semantics of the third and fourth versions is different from the first two
575 and is described in more details below.
576 If @a flags parameter contains @c wxEXEC_ASYNC flag (the default), flow
577 of control immediately returns. If it contains @c wxEXEC_SYNC, the current
578 application waits until the other program has terminated.
579 In the case of synchronous execution, the return value is the exit code of
580 the process (which terminates by the moment the function returns) and will be
581 -1 if the process couldn't be started and typically 0 if the process
582 terminated successfully. Also, while waiting for the process to
583 terminate, wxExecute will call wxYield(). Because of this, by
584 default this function disables all application windows to avoid unexpected
585 reentrancies which could result from the users interaction with the program
586 while the child process is running. If you are sure that it is safe to not
587 disable the program windows, you may pass @c wxEXEC_NODISABLE flag to
588 prevent this automatic disabling from happening.
589 For asynchronous execution, however, the return value is the process id and
590 zero value indicates that the command could not be executed. As an added
591 complication, the return value of -1 in this case indicates that we didn't
592 launch a new process, but connected to the running one (this can only happen in
593 case of using DDE under Windows for command execution). In particular, in this,
594 and only this, case the calling code will not get the notification about
595 process termination.
596 If callback isn't @NULL and if execution is asynchronous,
597 wxProcess::OnTerminate will be called when
598 the process finishes. Specifying this parameter also allows you to redirect the
599 standard input and/or output of the process being launched by calling
600 wxProcess::Redirect. If the child process IO is redirected,
601 under Windows the process window is not shown by default (this avoids having to
602 flush an unnecessary console for the processes which don't create any windows
603 anyhow) but a @c wxEXEC_NOHIDE flag can be used to prevent this from
604 happening, i.e. with this flag the child process window will be shown normally.
605 Under Unix the flag @c wxEXEC_MAKE_GROUP_LEADER may be used to ensure
606 that the new process is a group leader (this will create a new session if
607 needed). Calling wxKill() passing wxKILL_CHILDREN will
608 kill this process as well as all of its children (except those which have
609 started their own session).
610 The @c wxEXEC_NOEVENTS flag prevents processing of any events from taking
611 place while the child process is running. It should be only used for very
612 short-lived processes as otherwise the application windows risk becoming
613 unresponsive from the users point of view. As this flag only makes sense with
614 @c wxEXEC_SYNC, @c wxEXEC_BLOCK equal to the sum of both of these flags
615 is provided as a convenience.
616 Finally, you may use the third overloaded version of this function to execute
617 a process (always synchronously, the contents of @a flags is or'd with
618 @c wxEXEC_SYNC) and capture its output in the array @e output. The
619 fourth version adds the possibility to additionally capture the messages from
620 standard error output in the @a errors array.
621 @b NB: Currently wxExecute() can only be used from the main thread, calling
622 this function from another thread will result in an assert failure in debug
623 build and won't work.
624
625 @param command
626 The command to execute and any parameters to pass to it as a
627 single string.
628 @param argv
629 The command to execute should be the first element of this
630 array, any additional ones are the command parameters and the array must be
631 terminated with a @NULL pointer.
632 @param flags
633 Must include either wxEXEC_ASYNC or wxEXEC_SYNC and can also include
634 wxEXEC_NOHIDE, wxEXEC_MAKE_GROUP_LEADER (in either case) or
635 wxEXEC_NODISABLE and wxEXEC_NOEVENTS or wxEXEC_BLOCK, which is equal to
636 their combination, in wxEXEC_SYNC case.
637 @param callback
638 An optional pointer to wxProcess
639
640 @see wxShell(), wxProcess, @ref overview_sampleexec "Exec sample".
641
642 @header{wx/utils.h}
643 */
644 long wxExecute(const wxString& command,
645 int sync = wxEXEC_ASYNC,
646 wxProcess* callback = NULL);
647 long wxExecute(char** argv,
648 int flags = wxEXEC_ASYNC,
649 wxProcess* callback = NULL);
650 long wxExecute(wchar_t** argv,
651 int flags = wxEXEC_ASYNC,
652 wxProcess* callback = NULL);
653 long wxExecute(const wxString& command,
654 wxArrayString& output,
655 int flags = 0);
656 long wxExecute(const wxString& command,
657 wxArrayString& output,
658 wxArrayString& errors,
659 int flags = 0);
660 //@}
661
662 /**
663 Returns a string representing the current date and time.
664
665 @header{wx/utils.h}
666 */
667 wxString wxNow();
668
669 /**
670 Returns @true if the operating system the program is running under is 64 bit.
671 The check is performed at run-time and may differ from the value available at
672 compile-time (at compile-time you can just check if @c sizeof(void*)==8)
673 since the program could be running in emulation mode or in a mixed 32/64 bit
674 system
675 (bi-architecture operating system).
676 Very important: this function is not 100% reliable on some systems given the
677 fact
678 that there isn't always a standard way to do a reliable check on the OS
679 architecture.
680
681 @header{wx/utils.h}
682 */
683 bool wxIsPlatform64Bit();
684
685 /**
686 Returns the number uniquely identifying the current process in the system.
687 If an error occurs, 0 is returned.
688
689 @header{wx/utils.h}
690 */
691 unsigned long wxGetProcessId();
692
693 /**
694 Equivalent to the Unix kill function: send the given signal @a sig to the
695 process with PID @e pid. The valid signal values are
696
697 @code
698 enum wxSignal
699 {
700 wxSIGNONE = 0, // verify if the process exists under Unix
701 wxSIGHUP,
702 wxSIGINT,
703 wxSIGQUIT,
704 wxSIGILL,
705 wxSIGTRAP,
706 wxSIGABRT,
707 wxSIGEMT,
708 wxSIGFPE,
709 wxSIGKILL, // forcefully kill, dangerous!
710 wxSIGBUS,
711 wxSIGSEGV,
712 wxSIGSYS,
713 wxSIGPIPE,
714 wxSIGALRM,
715 wxSIGTERM // terminate the process gently
716 };
717 @endcode
718
719 @c wxSIGNONE, @c wxSIGKILL and @c wxSIGTERM have the same meaning
720 under both Unix and Windows but all the other signals are equivalent to
721 @c wxSIGTERM under Windows.
722 Returns 0 on success, -1 on failure. If @a rc parameter is not @NULL, it will
723 be filled with an element of @c wxKillError enum:
724
725 @code
726 enum wxKillError
727 {
728 wxKILL_OK, // no error
729 wxKILL_BAD_SIGNAL, // no such signal
730 wxKILL_ACCESS_DENIED, // permission denied
731 wxKILL_NO_PROCESS, // no such process
732 wxKILL_ERROR // another, unspecified error
733 };
734 @endcode
735
736 The @a flags parameter can be wxKILL_NOCHILDREN (the default),
737 or wxKILL_CHILDREN, in which case the child processes of this
738 process will be killed too. Note that under Unix, for wxKILL_CHILDREN
739 to work you should have created the process by passing wxEXEC_MAKE_GROUP_LEADER
740 to wxExecute.
741
742 @see wxProcess::Kill, wxProcess::Exists, @ref overview_sampleexec "Exec sample"
743
744 @header{wx/utils.h}
745 */
746 int wxKill(long pid, int sig = wxSIGTERM, wxKillError rc = NULL,
747 int flags = 0);
748
749 //@{
750 /**
751 Copies the user's email address into the supplied buffer, by
752 concatenating the values returned by wxGetFullHostName()
753 and wxGetUserId().
754 Returns @true if successful, @false otherwise.
755
756 @header{wx/utils.h}
757 */
758 wxString wxGetEmailAddress();
759 bool wxGetEmailAddress(char* buf, int sz);
760 //@}
761
762 /**
763 Sleeps for the specified number of seconds.
764
765 @header{wx/utils.h}
766 */
767 void wxSleep(int secs);
768
769 /**
770 Returns @true if the current platform is little endian (instead of big
771 endian).
772 The check is performed at run-time.
773
774 @see @ref overview_byteordermacros "Byte order macros"
775
776 @header{wx/utils.h}
777 */
778 bool wxIsPlatformLittleEndian();
779