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