-/**
- Returns the current value of the environment variable @e var in @e value.
- @e 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.
-*/
-bool wxGetEnv(const wxString& var, wxString * value);
-
-/**
- Under X only, returns the current display name. See also wxSetDisplayName.
-*/
-wxString wxGetDisplayName();
-
-/**
- Ring the system bell.
-
- Note that this function is categorized as a GUI one and so is not thread-safe.
-*/
-void wxBell();
-
-/**
- Returns the home directory for the given user. If the @e user is empty
- (default value), this function behaves like
- wxGetHomeDir i.e. returns the current user home
- directory.
-
- If the home directory couldn't be determined, an empty string is returned.
-*/
-wxString wxGetUserHome(const wxString& user = "");
-
-//@{
-/**
- @b wxPerl note: In wxPerl this function is called @c Wx::ExecuteStdoutStderr
- and it only takes the @c command argument,
- and returns a 3-element list @c ( status, output, errors ), where
- @c output and @c errors are array references.
-
- Executes another program in Unix or Windows.
-
- The first form takes a command string, such as @c "emacs file.txt".
-
- The second form takes an array of values: a command, any number of
- arguments, terminated by @NULL.
-
- The semantics of the third and fourth versions is different from the first two
- and is described in more details below.
-
- If @e flags parameter contains @c wxEXEC_ASYNC flag (the default), flow
- of control immediately returns. If it contains @c wxEXEC_SYNC, the current
- application waits until the other program has terminated.
-
- In the case of synchronous execution, the return value is the exit code of
- the process (which terminates by the moment the function returns) and will be
- -1 if the process couldn't be started and typically 0 if the process
- terminated successfully. Also, while waiting for the process to
- terminate, wxExecute will call wxYield. Because of this, by
- default this function disables all application windows to avoid unexpected
- reentrancies which could result from the users interaction with the program
- while the child process is running. If you are sure that it is safe to not
- disable the program windows, you may pass @c wxEXEC_NODISABLE flag to
- prevent this automatic disabling from happening.
-
- For asynchronous execution, however, the return value is the process id and
- zero value indicates that the command could not be executed. As an added
- complication, the return value of -1 in this case indicates that we didn't
- launch a new process, but connected to the running one (this can only happen in
- case of using DDE under Windows for command execution). In particular, in this,
- and only this, case the calling code will not get the notification about
- process termination.
-
- If callback isn't @NULL and if execution is asynchronous,
- wxProcess::OnTerminate will be called when
- the process finishes. Specifying this parameter also allows you to redirect the
- standard input and/or output of the process being launched by calling
- wxProcess::Redirect. If the child process IO is redirected,
- under Windows the process window is not shown by default (this avoids having to
- flush an unnecessary console for the processes which don't create any windows
- anyhow) but a @c wxEXEC_NOHIDE flag can be used to prevent this from
- happening, i.e. with this flag the child process window will be shown normally.
-
- Under Unix the flag @c wxEXEC_MAKE_GROUP_LEADER may be used to ensure
- that the new process is a group leader (this will create a new session if
- needed). Calling wxKill passing wxKILL_CHILDREN will
- kill this process as well as all of its children (except those which have
- started their own session).
-
- The @c wxEXEC_NOEVENTS flag prevents processing of any events from taking
- place while the child process is running. It should be only used for very
- short-lived processes as otherwise the application windows risk becoming
- unresponsive from the users point of view. As this flag only makes sense with
- @c wxEXEC_SYNC, @c wxEXEC_BLOCK equal to the sum of both of these flags
- is provided as a convenience.
-
- Finally, you may use the third overloaded version of this function to execute
- a process (always synchronously, the contents of @e flags is or'd with
- @c wxEXEC_SYNC) and capture its output in the array @e output. The
- fourth version adds the possibility to additionally capture the messages from
- standard error output in the @e errors array.
-
- @b NB: Currently wxExecute() can only be used from the main thread, calling
- this function from another thread will result in an assert failure in debug
- build and won't work.
-
- @param command
- The command to execute and any parameters to pass to it as a
- single string.
-
- @param argv
- The command to execute should be the first element of this
- array, any additional ones are the command parameters and the array must be
- terminated with a @NULL pointer.
-
- @param flags
- Combination of bit masks wxEXEC_ASYNC,
- wxEXEC_SYNC and wxEXEC_NOHIDE
-
- @param callback
- An optional pointer to wxProcess
-
- @sa wxShell, wxProcess, @ref overview_sampleexec "Exec sample".
-*/
-long wxExecute(const wxString& command, int sync = wxEXEC_ASYNC,
- wxProcess * callback = @NULL);
- wxPerl note: long wxExecute(char ** argv,
- int flags = wxEXEC_ASYNC,
- wxProcess * callback = @NULL);
- wxPerl note: long wxExecute(const wxString& command,
- wxArrayString& output,
- int flags = 0);
- wxPerl note: long wxExecute(const wxString& command,
- wxArrayString& output,
- wxArrayString& errors,
- int flags = 0);
-//@}