Deprecate old wxMSW-specific clipboard functions
Formally deprecate these functions that shouldn't be used since a couple of decades already.
This commit is contained in:
parent
bbbc85e52f
commit
89930c9e5e
2 changed files with 22 additions and 11 deletions
|
|
@ -13,19 +13,20 @@
|
|||
|
||||
#if wxUSE_CLIPBOARD
|
||||
|
||||
// These functions superseded by wxClipboard, but retained in order to
|
||||
// implement wxClipboard, and for compatibility.
|
||||
// Deprecated wxMSW-only function superseded by wxClipboard, don't use them and
|
||||
// use that class instead.
|
||||
#ifdef WXWIN_COMPATIBILITY_3_2
|
||||
|
||||
// open/close the clipboard
|
||||
WXDLLIMPEXP_CORE bool wxOpenClipboard();
|
||||
WXDLLIMPEXP_CORE bool wxIsClipboardOpened();
|
||||
#define wxClipboardOpen wxIsClipboardOpened
|
||||
WXDLLIMPEXP_CORE bool wxCloseClipboard();
|
||||
wxDEPRECATED_MSG("Use wxClipboard") WXDLLIMPEXP_CORE bool wxOpenClipboard();
|
||||
wxDEPRECATED_MSG("Use wxClipboard") WXDLLIMPEXP_CORE bool wxIsClipboardOpened();
|
||||
wxDEPRECATED_MSG("Use wxClipboard") WXDLLIMPEXP_CORE bool wxClipboardOpen();
|
||||
wxDEPRECATED_MSG("Use wxClipboard") WXDLLIMPEXP_CORE bool wxCloseClipboard();
|
||||
wxDEPRECATED_MSG("Use wxClipboard") WXDLLIMPEXP_CORE bool wxEmptyClipboard();
|
||||
|
||||
// get/set data
|
||||
WXDLLIMPEXP_CORE bool wxEmptyClipboard();
|
||||
#endif // WXWIN_COMPATIBILITY_3_2
|
||||
|
||||
// clipboard formats
|
||||
// Non-deprecated but still wxMSW-specific functions working with clipboard
|
||||
// formats -- don't use them neither.
|
||||
WXDLLIMPEXP_CORE bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
|
||||
WXDLLIMPEXP_CORE wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat);
|
||||
WXDLLIMPEXP_CORE int wxRegisterClipboardFormat(wxChar *formatName);
|
||||
|
|
|
|||
|
|
@ -60,10 +60,13 @@
|
|||
// old-style clipboard functions using Windows API
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
static bool gs_wxClipboardIsOpen = false;
|
||||
static int gs_htmlcfid = 0;
|
||||
static int gs_pngcfid = 0;
|
||||
|
||||
#ifdef WXWIN_COMPATIBILITY_3_2
|
||||
|
||||
static bool gs_wxClipboardIsOpen = false;
|
||||
|
||||
bool wxOpenClipboard()
|
||||
{
|
||||
wxCHECK_MSG( !gs_wxClipboardIsOpen, true, wxT("clipboard already opened.") );
|
||||
|
|
@ -121,6 +124,13 @@ bool wxIsClipboardOpened()
|
|||
return gs_wxClipboardIsOpen;
|
||||
}
|
||||
|
||||
bool wxClipboardOpen()
|
||||
{
|
||||
return gs_wxClipboardIsOpen;
|
||||
}
|
||||
|
||||
#endif // WXWIN_COMPATIBILITY_3_2
|
||||
|
||||
bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat)
|
||||
{
|
||||
wxDataFormat::NativeFormat cf = dataFormat.GetFormatId();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue