Removed docs for old clipboard functions, and reviewed/fixed atomic ops, file & directory, and environment function categories.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2008-03-19 08:02:01 +00:00
parent ba2874ff30
commit 1ba0de2efa
9 changed files with 351 additions and 301 deletions
+5 -7
View File
@@ -14,17 +14,15 @@
When using multi-threaded applications, it is often required to access or
modify memory which is shared between threads. Atomic integer and pointer
operations are an efficient way to handle this issue (another, less efficient,
way is to use a mutex or critical section). A native implementation exists for
Windows, Linux, Solaris and Mac OS X, for other OS, a wxCriticalSection is used
to protect the data.
way is to use a wxMutex or wxCriticalSection). A native implementation exists
for Windows, Linux, Solaris and Mac OS X; for others, a wxCriticalSection is
used to protect the data.
One particular application is reference counting (used by so-called smart
pointers).
One particular application is reference counting (used by so-called
@ref group_class_smartpointers "smart pointers").
You should define your variable with the type wxAtomicInt in order to apply
atomic operations to it.
@header{wx/atomic.h}
*/
-21
View File
@@ -1,21 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: funcmacro_clipboard.h
// Purpose: Clipboard function and macro group docs
// Author: wxWidgets team
// RCS-ID: $Id: funcmacro_gdi.h 52454 2008-03-12 19:08:48Z BP $
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
/**
@defgroup group_funcmacro_clipboard Clipboard
@ingroup group_funcmacro
@warning These functions are deprecated, use the wxClipboard class instead.
These clipboard functions are implemented for Windows only.
@header{wx/clipbrd.h}
*/
+3 -5
View File
@@ -11,11 +11,9 @@
@defgroup group_funcmacro_env Environment
@ingroup group_funcmacro
The functions in this section allow to access (get) or change value of
environment variables in a portable way. They are currently implemented under
Win32 and POSIX-like systems (Unix).
@header{wx/utils.h}
These functions allow access to get or change the values of environment
variables in a portable way. They are currently implemented under Win32 and
POSIX-like systems (Unix).
*/
+3 -2
View File
@@ -11,9 +11,10 @@
@defgroup group_funcmacro_file Files and Directories
@ingroup group_funcmacro
@header{wx/filefn.h}
These functions provide a platform-independent API for common file and
directory functionality.
@sa wxPathList, wxDir, wxFile, wxFileName
@see wxPathList, wxDir, wxFile, wxFileName
*/
+8 -3
View File
@@ -16,14 +16,19 @@
/**
This function increments @a value in an atomic manner.
@header{wx/atomic.h}
*/
void wxAtomicInc(wxAtomicInt& value);
/**
This function decrements value in an atomic manner.
Returns 0 if value is 0 after decrementation or any non-zero value
(not necessarily equal to the value of the variable) otherwise.
This function decrements value in an atomic manner. Returns 0 if value is 0
after decrementation or any non-zero value (not necessarily equal to the
value of the variable) otherwise.
@header{wx/atomic.h}
*/
wxInt32 wxAtomicDec(wxAtomicInt& value);
//@}
-76
View File
@@ -1,76 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: clipboard.h
// Purpose: interface of global functions
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
/**
Gets the name of a registered clipboard format, and puts it into the buffer @a
formatName which is of maximum
length @e maxCount. @a dataFormat must not specify a predefined clipboard
format.
*/
bool wxGetClipboardFormatName(int dataFormat,
const wxString& formatName,
int maxCount);
/**
Gets data from the clipboard.
@a dataFormat may be one of:
wxCF_TEXT or wxCF_OEMTEXT: returns a pointer to new memory containing a
null-terminated text string.
wxCF_BITMAP: returns a new wxBitmap.
The clipboard must have previously been opened for this call to succeed.
*/
wxObject* wxGetClipboardData(int dataFormat);
/**
Returns @true if the given data format is available on the clipboard.
*/
bool wxIsClipboardFormatAvailable(int dataFormat);
/**
Opens the clipboard for passing data to it or getting data from it.
*/
bool wxOpenClipboard();
/**
Empties the clipboard.
*/
bool wxEmptyClipboard();
/**
Returns @true if this application has already opened the clipboard.
*/
bool wxClipboardOpen();
/**
Registers the clipboard data format name and returns an identifier.
*/
int wxRegisterClipboardFormat(const wxString& formatName);
/**
Closes the clipboard to allow other applications to use it.
*/
bool wxCloseClipboard();
/**
Enumerates the formats found in a list of available formats that belong
to the clipboard. Each call to this function specifies a known
available format; the function returns the format that appears next in
the list.
@a dataFormat specifies a known format. If this parameter is zero,
the function returns the first format in the list.
The return value specifies the next known clipboard data format if the
function is successful. It is zero if the @a dataFormat parameter specifies
the last format in the list of available formats, or if the clipboard
is not open.
Before it enumerates the formats function, an application must open the
clipboard by using the
wxOpenClipboard function.
*/
int wxEnumClipboardFormats(int dataFormat);
+20 -2
View File
@@ -1448,10 +1448,28 @@ public:
// Global functions/macros
// ============================================================================
/** @ingroup group_funcmacro_file */
//@{
/**
Copies the given file to @e stream. Useful when converting an old application to
use streams (within the document/view framework, for example).
Copies the given file to @a stream. Useful when converting an old
application to use streams (within the document/view framework, for
example).
@header{wx/docview.h}
*/
bool wxTransferFileToStream(const wxString& filename,
ostream& stream);
/**
Copies the given stream to the file @a filename. Useful when converting an
old application to use streams (within the document/view framework, for
example).
@header{wx/docview.h}
*/
bool wxTransferStreamToFile(istream& stream,
const wxString& filename);
//@}
+261 -153
View File
File diff suppressed because it is too large Load Diff
+51 -32
View File
@@ -144,6 +144,57 @@ void wxInfoMessageBox(wxWindow parent = NULL);
/** @ingroup group_funcmacro_env */
//@{
/**
This is a macro defined as @c getenv() or its wide char version in Unicode
mode.
Note that under Win32 it may not return correct value for the variables set
with wxSetEnv(), use wxGetEnv() function instead.
@header{wx/utils.h}
*/
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
are not interested in its value.
Returns @true if the variable exists, @false otherwise.
@header{wx/utils.h}
*/
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.
@see wxUnsetEnv()
@header{wx/utils.h}
*/
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.
Returns @true on success.
@header{wx/utils.h}
*/
bool wxUnsetEnv(const wxString& var);
//@}
/**
Returns the type of power source as one of @c wxPOWER_SOCKET,
@c wxPOWER_BATTERY or @c wxPOWER_UNKNOWN.
@@ -455,17 +506,6 @@ wxString wxLoadUserResource(const wxString& resourceName,
*/
wxMemorySize wxGetFreeMemory();
/**
This is a macro defined as @c getenv() or its wide char version in Unicode
mode.
Note that under Win32 it may not return correct value for the variables set
with wxSetEnv(), use wxGetEnv() function
instead.
@header{wx/utils.h}
*/
wxChar* wxGetEnv(const wxString& var);
//@{
/**
Copies the current host machine's name into the supplied buffer. Please note
@@ -486,16 +526,6 @@ wxString wxGetHostName();
bool wxGetHostName(char* buf, int sz);
//@}
/**
Returns the current value of the environment variable @a var in @e 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.
@header{wx/utils.h}
*/
bool wxGetEnv(const wxString& var, wxString* value);
/**
Under X only, returns the current display name. See also wxSetDisplayName().
@@ -723,17 +753,6 @@ bool wxGetEmailAddress(char* buf, int sz);
*/
void wxSleep(int secs);
/**
Sets the value of the environment variable @a var (adding it if necessary)
to @e value.
Returns @true on success.
@see wxUnsetEnv()
@header{wx/utils.h}
*/
bool wxSetEnv(const wxString& var, const wxString& value);
/**
Returns @true if the current platform is little endian (instead of big
endian).