// the trace mask we use with wxLogTrace() - call
// wxLog::AddTraceMask(TRACE_CLIPBOARD) to enable the trace messages from here
// (there will be a *lot* of them!)
static const wxChar *TRACE_CLIPBOARD = _T("clipboard");
// the trace mask we use with wxLogTrace() - call
// wxLog::AddTraceMask(TRACE_CLIPBOARD) to enable the trace messages from here
// (there will be a *lot* of them!)
static const wxChar *TRACE_CLIPBOARD = _T("clipboard");
//-----------------------------------------------------------------------------
// reminder
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// reminder
//-----------------------------------------------------------------------------
wxLogTrace( TRACE_CLIPBOARD,
_T("got unsupported clipboard target") );
wxLogTrace( TRACE_CLIPBOARD,
_T("got unsupported clipboard target") );
/* make sure we got the data in the correct format */
if (!data_object->IsSupportedFormat( format ) )
{
/* make sure we got the data in the correct format */
if (!data_object->IsSupportedFormat( format ) )
{
if so, copy data to target object */
if (selection_data->type != GDK_SELECTION_TYPE_STRING)
{
if so, copy data to target object */
if (selection_data->type != GDK_SELECTION_TYPE_STRING)
{
return;
}
data_object->SetData( format, (size_t) selection_data->length, (const char*) selection_data->data );
return;
}
data_object->SetData( format, (size_t) selection_data->length, (const char*) selection_data->data );
{
const wchar_t *wstr = (const wchar_t *)d;
size_t len = wxConvCurrent->WC2MB(NULL, wstr, 0);
{
const wchar_t *wstr = (const wchar_t *)d;
size_t len = wxConvCurrent->WC2MB(NULL, wstr, 0);
if (!g_clipboardAtom) g_clipboardAtom = XInternAtom( (Display*) wxGetDisplay(), "CLIPBOARD", False );
if (!g_targetsAtom) g_targetsAtom = XInternAtom( (Display*) wxGetDisplay(), "TARGETS", False );
#endif
if (!g_clipboardAtom) g_clipboardAtom = XInternAtom( (Display*) wxGetDisplay(), "CLIPBOARD", False );
if (!g_targetsAtom) g_targetsAtom = XInternAtom( (Display*) wxGetDisplay(), "TARGETS", False );
#endif
gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom,
(guint32) GDK_CURRENT_TIME );
gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom,
(guint32) GDK_CURRENT_TIME );
gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY,
(guint32) GDK_CURRENT_TIME );
gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY,
(guint32) GDK_CURRENT_TIME );
#if 0
/* Tell the world we offer clipboard data */
res = (gtk_selection_owner_set( m_clipboardWidget,
#if 0
/* Tell the world we offer clipboard data */
res = (gtk_selection_owner_set( m_clipboardWidget,
also, we have to wait for the "answer" from the
clipboard owner which is an asynchronous process.
also, we have to wait for the "answer" from the
clipboard owner which is an asynchronous process.
/* get formats from wxDataObjects */
wxDataFormat *array = new wxDataFormat[ data.GetFormatCount() ];
/* get formats from wxDataObjects */
wxDataFormat *array = new wxDataFormat[ data.GetFormatCount() ];
also, we have to wait for the "answer" from the
clipboard owner which is an asynchronous process.
also, we have to wait for the "answer" from the
clipboard owner which is an asynchronous process.
is supported.
also, we have to wait for the "answer" from the
clipboard owner which is an asynchronous process.
is supported.
also, we have to wait for the "answer" from the
clipboard owner which is an asynchronous process.
wxLogTrace( TRACE_CLIPBOARD,
wxT("wxClipboard::GetData: format found, start convert") );
wxLogTrace( TRACE_CLIPBOARD,
wxT("wxClipboard::GetData: format found, start convert") );