From 5f699c22f547392521f8256317b9ca191b439d42 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 7 Feb 1999 00:14:10 +0000 Subject: [PATCH] GetData() now takes a pointer and not a reference, IsSupported() takes a format and not a data object git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/clipbrd.h | 4 ++-- include/wx/gtk1/clipbrd.h | 4 ++-- src/gtk/clipbrd.cpp | 12 ++++++------ src/gtk1/clipbrd.cpp | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/wx/gtk/clipbrd.h b/include/wx/gtk/clipbrd.h index 913379cac7..2a4f2bd8a5 100644 --- a/include/wx/gtk/clipbrd.h +++ b/include/wx/gtk/clipbrd.h @@ -63,10 +63,10 @@ public: virtual bool AddData( wxDataObject *data ); // ask if data in correct format is available - virtual bool IsSupported( wxDataObject &data ); + virtual bool IsSupported( wxDataFormat format ); // fill data with data on the clipboard (if available) - virtual bool GetData( wxDataObject &data ); + virtual bool GetData( wxDataObject *data ); // clears wxTheClipboard and the system's clipboard if possible virtual void Clear(); diff --git a/include/wx/gtk1/clipbrd.h b/include/wx/gtk1/clipbrd.h index 913379cac7..2a4f2bd8a5 100644 --- a/include/wx/gtk1/clipbrd.h +++ b/include/wx/gtk1/clipbrd.h @@ -63,10 +63,10 @@ public: virtual bool AddData( wxDataObject *data ); // ask if data in correct format is available - virtual bool IsSupported( wxDataObject &data ); + virtual bool IsSupported( wxDataFormat format ); // fill data with data on the clipboard (if available) - virtual bool GetData( wxDataObject &data ); + virtual bool GetData( wxDataObject *data ); // clears wxTheClipboard and the system's clipboard if possible virtual void Clear(); diff --git a/src/gtk/clipbrd.cpp b/src/gtk/clipbrd.cpp index 99ce0ac8b8..b5b3c3cec7 100644 --- a/src/gtk/clipbrd.cpp +++ b/src/gtk/clipbrd.cpp @@ -422,13 +422,13 @@ void wxClipboard::Close() m_open = FALSE; } -bool wxClipboard::IsSupported( wxDataObject &data ) +bool wxClipboard::IsSupported( wxDataFormat format ) { wxCHECK_MSG( m_open, FALSE, "clipboard not open" ); /* store requested format to be asked for by callbacks */ - m_targetRequested = data.GetFormat().GetAtom(); + m_targetRequested = format.GetAtom(); wxCHECK_MSG( m_targetRequested, FALSE, "invalid clipboard format" ); @@ -458,21 +458,21 @@ bool wxClipboard::IsSupported( wxDataObject &data ) return TRUE; } -bool wxClipboard::GetData( wxDataObject &data ) +bool wxClipboard::GetData( wxDataObject *data ) { wxCHECK_MSG( m_open, FALSE, "clipboard not open" ); /* is data supported by clipboard ? */ - if (!IsSupported( data )) return FALSE; + if (!IsSupported( data->GetFormat() )) return FALSE; /* store pointer to data object to be filled up by callbacks */ - m_receivedData = &data; + m_receivedData = data; /* store requested format to be asked for by callbacks */ - m_targetRequested = data.GetFormat().GetAtom(); + m_targetRequested = data->GetFormat().GetAtom(); wxCHECK_MSG( m_targetRequested, FALSE, "invalid clipboard format" ); diff --git a/src/gtk1/clipbrd.cpp b/src/gtk1/clipbrd.cpp index 99ce0ac8b8..b5b3c3cec7 100644 --- a/src/gtk1/clipbrd.cpp +++ b/src/gtk1/clipbrd.cpp @@ -422,13 +422,13 @@ void wxClipboard::Close() m_open = FALSE; } -bool wxClipboard::IsSupported( wxDataObject &data ) +bool wxClipboard::IsSupported( wxDataFormat format ) { wxCHECK_MSG( m_open, FALSE, "clipboard not open" ); /* store requested format to be asked for by callbacks */ - m_targetRequested = data.GetFormat().GetAtom(); + m_targetRequested = format.GetAtom(); wxCHECK_MSG( m_targetRequested, FALSE, "invalid clipboard format" ); @@ -458,21 +458,21 @@ bool wxClipboard::IsSupported( wxDataObject &data ) return TRUE; } -bool wxClipboard::GetData( wxDataObject &data ) +bool wxClipboard::GetData( wxDataObject *data ) { wxCHECK_MSG( m_open, FALSE, "clipboard not open" ); /* is data supported by clipboard ? */ - if (!IsSupported( data )) return FALSE; + if (!IsSupported( data->GetFormat() )) return FALSE; /* store pointer to data object to be filled up by callbacks */ - m_receivedData = &data; + m_receivedData = data; /* store requested format to be asked for by callbacks */ - m_targetRequested = data.GetFormat().GetAtom(); + m_targetRequested = data->GetFormat().GetAtom(); wxCHECK_MSG( m_targetRequested, FALSE, "invalid clipboard format" ); -- 2.45.2