]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/function.tex
fixed broken GIFs
[wxWidgets.git] / docs / latex / wx / function.tex
index 3a5343e446ad6501a1a3b029bb774633bd236b2a..507e0339f31de88376bebdf56b130839fcccf5fd 100644 (file)
@@ -4,6 +4,58 @@
 
 The functions defined in wxWindows are described here.
 
+\section{Thread functions}\label{threadfunctions}
+
+\wxheading{Include files}
+
+<wx/thread.h>
+
+\wxheading{See also}
+
+\helpref{wxThread}{wxthread}, \helpref{wxMutex}{wxmutex}, \helpref{Multithreading overview}{wxthreadoverview}
+
+\membersection{::wxMutexGuiEnter}\label{wxmutexguienter}
+
+\func{void}{wxMutexGuiEnter}{\void}
+
+This function must be called when any thread other than the main GUI thread
+wants to get access to the GUI library. This function will block the execution
+of the calling thread until the main thread (or any other thread holding the
+main GUI lock) leaves the GUI library and no other other thread will enter
+the GUI library until the calling thread calls \helpref{::wxMutexGuiLeave()}{wxmutexguileave}.
+
+Typically, these functions are used like this:
+
+\begin{verbatim}
+void MyThread::Foo(void)
+{
+    // before doing any GUI calls we must ensure that this thread is the only
+    // one doing it!
+
+    wxMutexGuiEnter();
+
+    // Call GUI here:
+    my_window->DrawSomething();
+    
+    wxMutexGuiLeave();
+}
+\end{verbatim}
+
+Note that under GTK, no creation of top-level windows is allowed in any
+thread but the main one.
+
+This function is only defined on platforms which support preemptive
+threads. 
+
+\membersection{::wxMutexGuiLeave}\label{wxmutexguileave}
+
+\func{void}{wxMutexGuiLeave}{\void}
+
+See \helpref{::wxMutexGuiEnter()}{wxmutexguienter}.
+
+This function is only defined on platforms which support preemptive
+threads.
+
 \section{File functions}\label{filefunctions}
 
 \wxheading{Include files}
@@ -34,6 +86,13 @@ slashes.
 Returns TRUE if the file exists. It also returns TRUE if the file is
 a directory.
 
+\membersection{::wxFileModificationTime}
+
+\func{time_t}{wxFileModificationTime}{\param{const wxString\& }{filename}}
+
+Returns time of last modification of given file.
+
+
 \membersection{::wxFileNameFromPath}
 
 \func{wxString}{wxFileNameFromPath}{\param{const wxString\& }{path}}
@@ -87,10 +146,12 @@ Returns the Windows directory under Windows; on other platforms returns the empt
 
 Adds some common image format handlers, which, depending on wxWindows
 configuration, can be handlers for BMP (loading) (always installed), GIF
-(loading), PCX (loading), PNM (loading and saving as raw
-rgb), PNG (loading and saving), JPEG (loading and saving), file formats.
+(loading), PCX (loading and saving), PNM (loading and saving as raw rgb),
+PNG (loading and saving), JPEG (loading and saving), file formats.
 
-See also: \helpref{wxImage}{wximage} \helpref{wxImageHandler}{wximagehandler}
+\wxheading{See also}
+
+\helpref{wxImage}{wximage}, \helpref{wxImageHandler}{wximagehandler}
 
 \membersection{::wxIsAbsolutePath}
 
@@ -258,7 +319,9 @@ Use of this function requires the file wx\_doc.h to be included.
 Returns the FQDN (fully qualified domain host name) or an empty string on
 error.
 
-See also: \helpref{wxGetHostName}{wxgethostname}
+\wxheading{See also}
+
+\helpref{wxGetHostName}{wxgethostname}
 
 \wxheading{Include files}
 
@@ -296,7 +359,9 @@ The first variant of this function returns the hostname if successful or an
 empty string otherwise. The second (deprecated) function returns TRUE
 if successful, FALSE otherwise.
 
-See also: \helpref{wxGetFullHostName}{wxgetfullhostname}
+\wxheading{See also}
+
+\helpref{wxGetFullHostName}{wxgetfullhostname}
 
 \wxheading{Include files}
 
@@ -321,7 +386,9 @@ The first variant of this function returns the login name if successful or an
 empty string otherwise. The second (deprecated) function returns TRUE
 if successful, FALSE otherwise.
 
-See also: \helpref{wxGetUserName}{wxgetusername}
+\wxheading{See also}
+
+\helpref{wxGetUserName}{wxgetusername}
 
 \wxheading{Include files}
 
@@ -344,7 +411,9 @@ The first variant of this function returns the user name if successful or an
 empty string otherwise. The second (deprecated) function returns TRUE
 if successful, FALSE otherwise.
 
-See also: \helpref{wxGetUserId}{wxgetuserid}
+\wxheading{See also}
+
+\helpref{wxGetUserId}{wxgetuserid}
 
 \wxheading{Include files}
 
@@ -427,20 +496,20 @@ buffer is never overflowed.
 Returns the number of characters copied to the buffer or -1 if there is not
 enough space.
 
-\wxheading{See also:}
-\helpref{wxVsnprintf}{wxvsnprintf},
-\helpref{wxString::Printf}{wxstringprintf}
+\wxheading{See also}
+
+\helpref{wxVsnprintf}{wxvsnprintf}, \helpref{wxString::Printf}{wxstringprintf}
 
-\membersection{::wxVsnprintf}\label{wxsnprintf}
+\membersection{::wxVsnprintf}\label{wxvsnprintf}
 
 \func{int}{wxVsnprintf}{\param{wxChar *}{buf}, \param{size\_t }{len}, \param{const wxChar *}{format}, \param{va\_list }{argptr}}
 
 The same as \helpref{wxSnprintf}{wxsnprintf} but takes a {\tt va\_list}
 argument instead of arbitrary number of parameters.
 
-\wxheading{See also:}
-\helpref{wxSnprintf}{wxsnprintf},
-\helpref{wxString::PrintfV}{wxstringprintfv}
+\wxheading{See also}
+
+\helpref{wxSnprintf}{wxsnprintf}, \helpref{wxString::PrintfV}{wxstringprintfv}
 
 \section{Dialog functions}\label{dialogfunctions}
 
@@ -462,7 +531,7 @@ used with \helpref{wxShowTip}{wxshowtip}.
 \docparam{currentTip}{The index of the first tip to show - normally this index
 is remembered between the 2 program runs.}
 
-\wxheading{See also:}
+\wxheading{See also}
 
 \helpref{Tips overview}{tipsoverview}
 
@@ -478,13 +547,13 @@ is remembered between the 2 program runs.}
  \param{int}{ x = -1}, \param{int}{ y = -1}}
 
 Pops up a file selector box. In Windows, this is the common file selector
-dialog. In X, this is a file selector box with somewhat less functionality.
+dialog. In X, this is a file selector box with the same functionality.
 The path and filename are distinct elements of a full file pathname.
 If path is empty, the current directory will be used. If filename is empty,
 no default filename will be supplied. The wildcard determines what files
 are displayed in the file selector, and file extension supplies a type
 extension for the required filename. Flags may be a combination of wxOPEN,
-wxSAVE, wxOVERWRITE\_PROMPT, wxHIDE\_READONLY, wxMULTIPLE or 0.
+wxSAVE, wxOVERWRITE\_PROMPT, wxHIDE\_READONLY, wxFILE\_MUST\_EXIST, wxMULTIPLE or 0.
 
 Both the Unix and Windows versions implement a wildcard filter. Typing a
 filename containing wildcards (*, ?) in the filename text item, and
@@ -691,7 +760,7 @@ It may be created with the \helpref{wxCreateFileTipProvider}{wxcreatefiletipprov
 otherwise. This is used as the initial value for "Show tips at startup"
 checkbox which is shown in the tips dialog.}
 
-\wxheading{See also:}
+\wxheading{See also}
 
 \helpref{Tips overview}{tipsoverview}
 
@@ -1187,7 +1256,7 @@ 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 \helpref{wxYield}{wxyield}. The caller
-should ensure that this can cause no recursion, in the simples case by 
+should ensure that this can cause no recursion, in the simplest case by 
 calling \helpref{wxEnableTopLevelWindows(FALSE)}{wxenabletoplevelwindows}.
 
 For asynchronous execution, however, the return value is the process id and
@@ -1198,7 +1267,8 @@ parameter can not be non NULL for synchronous execution),
 \helpref{wxProcess::OnTerminate}{wxprocessonterminate} will be called when
 the process finishes.
 
-See also \helpref{wxShell}{wxshell}, \helpref{wxProcess}{wxprocess}.
+See also \helpref{wxShell}{wxshell}, \helpref{wxProcess}{wxprocess}, 
+\helpref{Exec sample}{sampleexec}.
 
 \wxheading{Include files}
 
@@ -1293,7 +1363,7 @@ Under X only, returns the current display name. See also \helpref{wxSetDisplayNa
 
 Return the (current) user's home directory.
 
-\wxheading{See also:}
+\wxheading{See also}
 
 \helpref{wxGetUserHome}{wxgetuserhome}
 
@@ -1590,7 +1660,7 @@ See also \helpref{wxGetDisplayName}{wxgetdisplayname}.
 Executes a command in an interactive shell window. If no command is
 specified, then just the shell is spawned.
 
-See also \helpref{wxExecute}{wxexecute}.
+See also \helpref{wxExecute}{wxexecute}, \helpref{Exec sample}{sampleexec}.
 
 \wxheading{Include files}