X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca5016d4ddae7f9a2d72a16326e9339f8d3e8748..36a0190ebd5bd9a7302f60f6dcd608b80574e21c:/interface/wx/process.h?ds=inline diff --git a/interface/wx/process.h b/interface/wx/process.h index 4a5585f81a..69573bf362 100644 --- a/interface/wx/process.h +++ b/interface/wx/process.h @@ -2,45 +2,9 @@ // Name: process.h // Purpose: interface of wxProcess // Author: wxWidgets team -// RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -/** - Signal constants used by wxProcess. -*/ -enum wxSignal -{ - wxSIGNONE = 0, //!< verify if the process exists under Unix - wxSIGHUP, - wxSIGINT, - wxSIGQUIT, - wxSIGILL, - wxSIGTRAP, - wxSIGABRT, - wxSIGEMT, - wxSIGFPE, - wxSIGKILL, //!< forcefully kill, dangerous! - wxSIGBUS, - wxSIGSEGV, - wxSIGSYS, - wxSIGPIPE, - wxSIGALRM, - wxSIGTERM //!< terminate the process gently -}; - -/** - Return values for wxProcess::Kill. -*/ -enum wxKillError -{ - wxKILL_OK, //!< no error - wxKILL_BAD_SIGNAL, //!< no such signal - wxKILL_ACCESS_DENIED, //!< permission denied - wxKILL_NO_PROCESS, //!< no such process - wxKILL_ERROR //!< another, unspecified error -}; - /** @class wxProcess @@ -75,6 +39,11 @@ enum wxKillError @library{wxbase} @category{appmanagement} + @beginWxPerlOnly + In wxPerl this class has an additional @c Destroy method, + for explicit destruction. + @endWxPerlOnly + @see wxExecute(), @ref page_samples_exec */ class wxProcess : public wxEvtHandler @@ -118,12 +87,15 @@ public: This function can be used to indicate to the child process that there is no more data to be read - usually, a filter program will only terminate when the input stream is closed. + + Notice that GetOutputStream() will return @NULL after the output stream + is closed. */ void CloseOutput(); /** Detaches this event handler from the parent specified in the constructor - (see wxEvtHandler::Unlink() for a similar but not identic function). + (see wxEvtHandler::Unlink() for a similar but not identical function). Normally, a wxProcess object is deleted by its parent when it receives the notification about the process termination. @@ -161,8 +133,10 @@ public: wxInputStream* GetInputStream() const; /** - It returns an output stream correspoding to the input stream of the subprocess. - If it is @NULL, you have not turned on the redirection. + It returns an output stream corresponding to the input stream of the subprocess. + + If it is @NULL, you have not turned on the redirection or already + called CloseOutput(). @see Redirect(). */ @@ -268,6 +242,20 @@ public: The caught output stream is returned by GetInputStream() as a non-seekable stream. */ void Redirect(); + + /** + Sets the priority of the process, between 0 (lowest) and 100 (highest). + It can only be set before the process is created. + + The following symbolic constants can be used in addition to raw + values in 0..100 range: + - @b wxPRIORITY_MIN: 0 + - @b wxPRIORITY_DEFAULT: 50 + - @b wxPRIORITY_MAX: 100 + + @since 2.9.5 + */ + void SetPriority(unsigned priority); }; @@ -311,3 +299,6 @@ public: int GetPid(); }; + +wxEventType wxEVT_END_PROCESS; +