X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5d9d763f7cceb415dd96033c05c6f181662bce9..26b22ae371c4ba3cfc35deb0f72b4288081b54fd:/interface/wx/utils.h?ds=sidebyside diff --git a/interface/wx/utils.h b/interface/wx/utils.h index 096429dee5..9bb227a63d 100644 --- a/interface/wx/utils.h +++ b/interface/wx/utils.h @@ -169,8 +169,9 @@ void wxInfoMessageBox(wxWindow parent = NULL); wxChar* wxGetenv(const wxString& var); /** - Returns the current value of the environment variable @c var in @c value. - @c value may be @NULL if you just want to know if the variable exists and + Returns the current value of the environment variable @a var in @a value. + + @a value may be @NULL if you just want to know if the variable exists and are not interested in its value. Returns @true if the variable exists, @false otherwise. @@ -180,10 +181,24 @@ wxChar* wxGetenv(const wxString& var); bool wxGetEnv(const wxString& var, wxString* value); /** - Sets the value of the environment variable @c var (adding it if necessary) - to @c value. - - Returns @true on success. + Sets the value of the environment variable @a var (adding it if necessary) + to @a value. + + Notice that under Windows platforms the program may have two different + environment blocks: the first one is that of a Windows process and is + always present, but the CRT may maintain its own independent copy of the + environment. wxSetEnv() will always update the first copy, which means that + wxGetEnv(), which uses it directly, will always return the expected value + after this call. But wxSetEnv() only updates the second copy for some + compilers/CRT implementations (currently only MSVC) and so using wxGetenv() + (notice the difference in case) may not return the updated value. + + @param var + The environment variable to be set, must not contain @c '=' character. + @param value + New value of the variable. + @return + @true on success or @false if changing the value failed. @see wxUnsetEnv() @@ -192,8 +207,9 @@ bool wxGetEnv(const wxString& var, wxString* value); bool wxSetEnv(const wxString& var, const wxString& value); /** - Removes the variable @c var from the environment. wxGetEnv() will return - @NULL after the call to this function. + Removes the variable @a var from the environment. + + wxGetEnv() will return @NULL after the call to this function. Returns @true on success. @@ -668,6 +684,23 @@ bool wxIsPlatform64Bit(); */ bool wxIsPlatformLittleEndian(); +/** + Returns a structure containing informations about the currently running + Linux distribution. + + This function uses the @c lsb_release utility which is part of the + Linux Standard Base Core specification + (see http://refspecs.linux-foundation.org/lsb.shtml) since the very first LSB + release 1.0 (released in 2001). + The @c lsb_release utility is very common on modern Linux distributions but in + case it's not available, then this function will return a ::wxLinuxDistributionInfo + structure containing empty strings. + + This function is Linux-specific and is only available when the @c __LINUX__ + symbol is defined. +*/ +wxLinuxDistributionInfo wxGetLinuxDistributionInfo(); + //@} @@ -747,9 +780,7 @@ bool wxIsPlatformLittleEndian(); @header{wx/utils.h} @beginWxPerlOnly - This function is called @c Wx::ExecuteStdoutStderr and it only takes the - @a command argument, and returns a 3-element list (@c status, @c output, - @c errors), where @c output and @c errors are array references. + In wxPerl this function is called @c Wx::ExecuteCommand. @endWxPerlOnly */ long wxExecute(const wxString& command, int flags = wxEXEC_ASYNC, @@ -782,6 +813,10 @@ long wxExecute(const wxString& command, int flags = wxEXEC_ASYNC, wxLaunchDefaultApplication(), wxLaunchDefaultBrowser() @header{wx/utils.h} + + @beginWxPerlOnly + In wxPerl this function is called @c Wx::ExecuteArgs. + @endWxPerlOnly */ long wxExecute(char** argv, int flags = wxEXEC_ASYNC, wxProcess* callback = NULL); @@ -814,6 +849,12 @@ long wxExecute(wchar_t** argv, int flags = wxEXEC_ASYNC, wxLaunchDefaultApplication(), wxLaunchDefaultBrowser() @header{wx/utils.h} + + @beginWxPerlOnly + This function is called @c Wx::ExecuteStdout: it only takes the + @a command argument, and returns a 2-element list (@c status, @c output), + where @c output in an array reference. + @endWxPerlOnly */ long wxExecute(const wxString& command, wxArrayString& output, int flags = 0); @@ -841,6 +882,12 @@ long wxExecute(const wxString& command, wxArrayString& output, int flags = 0); wxLaunchDefaultApplication(), wxLaunchDefaultBrowser() @header{wx/utils.h} + + @beginWxPerlOnly + This function is called @c Wx::ExecuteStdoutStderr: it only takes the + @a command argument, and returns a 3-element list (@c status, @c output, + @c errors), where @c output and @c errors are array references. + @endWxPerlOnly */ long wxExecute(const wxString& command, wxArrayString& output, wxArrayString& errors, int flags = 0);