X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f47658bb79c3013c033c25e20b882b00e84558f0..4eb438cf7c42d5ceaa60b55048b5d0dc36c3986b:/docs/latex/wx/function.tex diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex index 2e2a82e22e..a341f54d0d 100644 --- a/docs/latex/wx/function.tex +++ b/docs/latex/wx/function.tex @@ -177,6 +177,27 @@ Returns the next file that matches the path passed to \helpref{wxFindFirstFile}{ See \helpref{wxFindFirstFile}{wxfindfirstfile} for an example. +\membersection{::wxGetDiskSpace}\label{wxgetdiskspace} + +\func{bool}{wxGetDiskSpace}{\param{const wxString\& }{path}, \param{wxLongLong }{*total = NULL}, \param{wxLongLong }{*free = NULL}} + +This function returns the total number of bytes and number of free bytes on +the disk containing the directory {\it path} (it should exist). Both +{\it total} and {\it free} parameters may be {\tt NULL} if the corresponding +information is not needed. + +\wxheading{Returns} + +{\tt TRUE} on success, {\tt FALSE} if an error occured (for example, the +directory doesn't exist). + +\wxheading{Portability} + +This function is implemented for Win16 (only for drives less than 2Gb), Win32, +Mac OS and generic Unix provided the system has {\tt statfs()} function. + +This function first appeared in wxWindows 2.3.2. + \membersection{::wxGetOSDirectory}\label{wxgetosdirectory} \func{wxString}{wxGetOSDirectory}{\void} @@ -470,7 +491,7 @@ string, {\tt FALSE} otherwise. \membersection{::wxStricmp}\label{wxstricmp} -\func{int}{Stricmp}{\param{const char *}{p1}, \param{const char *}{p2}} +\func{int}{wxStricmp}{\param{const char *}{p1}, \param{const char *}{p2}} Returns a negative value, 0, or positive value if {\it p1} is less than, equal to or greater than {\it p2}. The comparison is case-insensitive. @@ -1753,30 +1774,40 @@ normal way which usually just means that the application will be terminated. Calling wxHandleFatalExceptions() with {\it doIt} equal to FALSE will restore this default behaviour. -\membersection{::wxKill}\label{wxkill} +\membersection{::wxInitAllImageHandlers}\label{wxinitallimagehandlers} + +\func{void}{wxInitAllImageHandlers}{\void} -\func{int}{wxKill}{\param{long}{ pid}, \param{int}{ sig}} +Initializes all available image handlers. For a list of available handlers, +see \helpref{wxImage}{wximage}. -Under Unix (the only supported platform), equivalent to the Unix kill function. -Returns 0 on success, -1 on failure. +\wxheading{See also} -Tip: sending a signal of 0 to a process returns -1 if the process does not exist. -It does not raise a signal in the receiving process. +\helpref{wxImage}{wximage}, \helpref{wxImageHandler}{wximagehandler} \wxheading{Include files} - + -\membersection{::wxInitAllImageHandlers}\label{wxinitallimagehandlers} +\membersection{::wxInitialize}\label{wxinitialize} -\func{void}{wxInitAllImageHandlers}{\void} +\func{bool}{wxInitialize}{\void} -Initializes all available image handlers. For a list of available handlers, -see \helpref{wxImage}{wximage}. +This function is used in wxBase only and only if you don't create +\helpref{wxApp}{wxapp} object at all. In this case you must call it from your +{\tt main()} function before calling any other wxWindows functions. -\wxheading{See also} +If the function returns {\tt FALSE} the initialization could not be performed, +in this case the library cannot be used and +\helpref{wxUninitialize}{wxuninitialize} shouldn't be called neither. -\helpref{wxImage}{wximage}, \helpref{wxImageHandler}{wximagehandler} +This function may be called several times but +\helpref{wxUninitialize}{wxuninitialize} must be called for each successful +call to this function. + +\wxheading{Include files} + + \membersection{::wxIsBusy}\label{wxisbusy} @@ -1791,6 +1822,63 @@ See also \helpref{wxBusyCursor}{wxbusycursor}. +\membersection{::wxKill}\label{wxkill} + +\func{int}{wxKill}{\param{long}{ pid}, \param{int}{ sig = wxSIGTERM}, \param{wxKillError }{*rc = NULL}} + +Equivalent to the Unix kill function: send the given signal {\it sig} to the +process with PID {\it pid}. The valud signal values are + +\begin{verbatim} +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 +}; +\end{verbatim} + +{\tt wxSIGNONE}, {\tt wxSIGKILL} and {\tt wxSIGTERM} have the same meaning +under both Unix and Windows but all the other signals are equivalent to +{\tt wxSIGTERM} under Windows. + +Returns 0 on success, -1 on failure. If {\it rc} parameter is not NULL, it will +be filled with an element of {\tt wxKillError} enum: + +\begin{verbatim} +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 +}; +\end{verbatim} + +\wxheading{See also} + +\helpref{wxProcess::Kill}{wxprocesskill},\rtfsp +\helpref{wxProcess::Exists}{wxprocessexists},\rtfsp +\helpref{Exec sample}{sampleexec} + +\wxheading{Include files} + + + \membersection{::wxLoadUserResource}\label{wxloaduserresource} \func{wxString}{wxLoadUserResource}{\param{const wxString\& }{resourceName}, \param{const wxString\& }{resourceType=``TEXT"}} @@ -1997,6 +2085,17 @@ In release mode this function does nothing. +\membersection{::wxUninitialize}\label{wxuninitialize} + +\func{void}{wxUninitialize}{\void} + +This function is for use in console (wxBase) programs only. It must be called +once for each previous successful call to \helpref{wxInitialize}{wxinitialize}. + +\wxheading{Include files} + + + \membersection{::wxUsleep}\label{wxusleep} \func{void}{wxUsleep}{\param{unsigned long}{ milliseconds}} @@ -2359,7 +2458,7 @@ avoid using {\tt \#ifdef}s when creating bitmaps. \membersection{wxConstCast}\label{wxconstcast} -\func{}{wxConstCast}{ptr, classname} +\func{classname *}{wxConstCast}{ptr, classname} This macro expands into {\tt const\_cast(ptr)} if the compiler supports {\it const\_cast} or into an old, C-style cast, otherwise. @@ -2388,14 +2487,15 @@ In non-debug mode, this is defined as the normal new operator. \membersection{wxDynamicCast}\label{wxdynamiccast} -\func{}{wxDynamicCast}{ptr, classname} +\func{classname *}{wxDynamicCast}{ptr, classname} This macro returns the pointer {\it ptr} cast to the type {\it classname *} if -the pointer is of this type (the check is done during the run-time) or NULL -otherwise. Usage of this macro is preferred over obsoleted wxObject::IsKindOf() -function. +the pointer is of this type (the check is done during the run-time) or +{\tt NULL} otherwise. Usage of this macro is preferred over obsoleted +wxObject::IsKindOf() function. -The {\it ptr} argument may be NULL, in which case NULL will be returned. +The {\it ptr} argument may be {\tt NULL}, in which case {\tt NULL} will be +returned. Example: @@ -2415,9 +2515,23 @@ Example: \wxheading{See also} \helpref{RTTI overview}{runtimeclassoverview}\\ +\helpref{wxDynamicCastThis}{wxdynamiccastthis}\\ \helpref{wxConstCast}{wxconstcast}\\ \helpref{wxStatiicCast}{wxstaticcast} +\membersection{wxDynamicCastThis}\label{wxdynamiccastthis} + +\func{classname *}{wxDynamicCastThis}{classname} + +This macro is equivalent to {\tt wxDynamicCast(this, classname)} but the +latter provokes spurious compilation warnings from some compilers (because it +tests whether {\tt this} pointer is non {\tt NULL} which is always true), so +this macro should be used to avoid them. + +\wxheading{See also} + +\helpref{wxDynamicCast}{wxdynamiccast} + \membersection{wxICON}\label{wxiconmacro} \func{}{wxICON}{iconName} @@ -2437,7 +2551,7 @@ avoid using {\tt \#ifdef}s when creating icons. \membersection{wxStaticCast}\label{wxstaticcast} -\func{}{wxStaticCast}{ptr, classname} +\func{classname *}{wxStaticCast}{ptr, classname} This macro checks that the cast is valid in debug mode (an assert failure will result if {\tt wxDynamicCast(ptr, classname) == NULL}) and then returns the