]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/clipbrd.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/clipbrd.cpp
3 // Purpose: Clipboard functionality
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ===========================================================================
14 // ===========================================================================
16 // ---------------------------------------------------------------------------
18 // ---------------------------------------------------------------------------
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
30 #include "wx/object.h"
34 #include "wx/bitmap.h"
40 #include "wx/metafile.h"
44 #include "wx/clipbrd.h"
48 #include "wx/palmos/private.h"
51 #include "wx/palmos/dib.h"
55 #include "wx/dataobj.h"
58 #if wxUSE_OLE && !defined(__WXWINCE__)
60 #define wxUSE_OLE_CLIPBOARD 1
61 #else // !wxUSE_DATAOBJ
62 // use Win clipboard API
63 #define wxUSE_OLE_CLIPBOARD 0
66 #if wxUSE_OLE_CLIPBOARD
68 #endif // wxUSE_OLE_CLIPBOARD
70 // ===========================================================================
72 // ===========================================================================
74 // ---------------------------------------------------------------------------
75 // old-style clipboard functions
76 // ---------------------------------------------------------------------------
78 static bool gs_wxClipboardIsOpen
= FALSE
;
80 bool wxOpenClipboard()
85 bool wxCloseClipboard()
90 bool wxEmptyClipboard()
95 bool wxIsClipboardOpened()
100 bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat
)
106 bool wxSetClipboardData(wxDataFormat dataFormat
,
108 int width
, int height
)
113 void *wxGetClipboardData(wxDataFormat dataFormat
, long *len
)
120 wxDataFormat
wxEnumClipboardFormats(wxDataFormat dataFormat
)
122 return (wxDataFormat::NativeFormat
)::EnumClipboardFormats(dataFormat
);
125 int wxRegisterClipboardFormat(wxChar
*formatName
)
127 return ::RegisterClipboardFormat(formatName
);
130 bool wxGetClipboardFormatName(wxDataFormat dataFormat
,
137 // ---------------------------------------------------------------------------
139 // ---------------------------------------------------------------------------
141 IMPLEMENT_DYNAMIC_CLASS(wxClipboard
, wxObject
)
143 wxClipboard::wxClipboard()
145 m_clearOnExit
= FALSE
;
149 wxClipboard::~wxClipboard()
157 void wxClipboard::Clear()
161 bool wxClipboard::Flush()
166 bool wxClipboard::Open()
168 return wxOpenClipboard();
171 bool wxClipboard::IsOpened() const
173 return wxIsClipboardOpened();
176 bool wxClipboard::SetData( wxDataObject
*data
)
181 bool wxClipboard::AddData( wxDataObject
*data
)
186 void wxClipboard::Close()
191 bool wxClipboard::IsSupported( wxDataFormat format
)
193 return wxIsClipboardFormatAvailable(format
);
196 bool wxClipboard::GetData( wxDataObject
& data
)
201 #endif // wxUSE_CLIPBOARD