]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/clipbrd.cpp
8a7cec26049c84c677d2871d325dc552483b9508
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"
34 #include "wx/object.h"
38 #include "wx/bitmap.h"
44 #include "wx/metafile.h"
48 #include "wx/clipbrd.h"
52 #include "wx/palmos/private.h"
55 #include "wx/palmos/dib.h"
59 #include "wx/dataobj.h"
62 #if wxUSE_OLE && !defined(__WXWINCE__)
64 #define wxUSE_OLE_CLIPBOARD 1
65 #else // !wxUSE_DATAOBJ
66 // use Win clipboard API
67 #define wxUSE_OLE_CLIPBOARD 0
70 #if wxUSE_OLE_CLIPBOARD
72 #endif // wxUSE_OLE_CLIPBOARD
74 // ===========================================================================
76 // ===========================================================================
78 // ---------------------------------------------------------------------------
79 // old-style clipboard functions
80 // ---------------------------------------------------------------------------
82 static bool gs_wxClipboardIsOpen
= FALSE
;
84 bool wxOpenClipboard()
89 bool wxCloseClipboard()
94 bool wxEmptyClipboard()
99 bool wxIsClipboardOpened()
104 bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat
)
110 bool wxSetClipboardData(wxDataFormat dataFormat
,
112 int width
, int height
)
117 void *wxGetClipboardData(wxDataFormat dataFormat
, long *len
)
124 wxDataFormat
wxEnumClipboardFormats(wxDataFormat dataFormat
)
126 return (wxDataFormat::NativeFormat
)::EnumClipboardFormats(dataFormat
);
129 int wxRegisterClipboardFormat(wxChar
*formatName
)
131 return ::RegisterClipboardFormat(formatName
);
134 bool wxGetClipboardFormatName(wxDataFormat dataFormat
,
141 // ---------------------------------------------------------------------------
143 // ---------------------------------------------------------------------------
145 IMPLEMENT_DYNAMIC_CLASS(wxClipboard
, wxObject
)
147 wxClipboard::wxClipboard()
149 m_clearOnExit
= FALSE
;
153 wxClipboard::~wxClipboard()
161 void wxClipboard::Clear()
165 bool wxClipboard::Flush()
170 bool wxClipboard::Open()
172 return wxOpenClipboard();
175 bool wxClipboard::IsOpened() const
177 return wxIsClipboardOpened();
180 bool wxClipboard::SetData( wxDataObject
*data
)
185 bool wxClipboard::AddData( wxDataObject
*data
)
190 void wxClipboard::Close()
195 bool wxClipboard::IsSupported( wxDataFormat format
)
197 return wxIsClipboardFormatAvailable(format
);
200 bool wxClipboard::GetData( wxDataObject
& data
)
205 #endif // wxUSE_CLIPBOARD