]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/clipbrd.cpp
c732ccdc9a2a9b9c45471053a3115aae4fe01a32
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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21 #pragma implementation "clipbrd.h"
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
38 #include "wx/object.h"
42 #include "wx/bitmap.h"
48 #include "wx/metafile.h"
52 #include "wx/clipbrd.h"
56 #include "wx/palmos/private.h"
59 #include "wx/palmos/dib.h"
63 #include "wx/dataobj.h"
66 #if wxUSE_OLE && !defined(__WXWINCE__)
68 #define wxUSE_OLE_CLIPBOARD 1
69 #else // !wxUSE_DATAOBJ
70 // use Win clipboard API
71 #define wxUSE_OLE_CLIPBOARD 0
74 #if wxUSE_OLE_CLIPBOARD
76 #endif // wxUSE_OLE_CLIPBOARD
78 // ===========================================================================
80 // ===========================================================================
82 // ---------------------------------------------------------------------------
83 // old-style clipboard functions
84 // ---------------------------------------------------------------------------
86 static bool gs_wxClipboardIsOpen
= FALSE
;
88 bool wxOpenClipboard()
93 bool wxCloseClipboard()
98 bool wxEmptyClipboard()
103 bool wxIsClipboardOpened()
108 bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat
)
114 bool wxSetClipboardData(wxDataFormat dataFormat
,
116 int width
, int height
)
121 void *wxGetClipboardData(wxDataFormat dataFormat
, long *len
)
128 wxDataFormat
wxEnumClipboardFormats(wxDataFormat dataFormat
)
130 return (wxDataFormat::NativeFormat
)::EnumClipboardFormats(dataFormat
);
133 int wxRegisterClipboardFormat(wxChar
*formatName
)
135 return ::RegisterClipboardFormat(formatName
);
138 bool wxGetClipboardFormatName(wxDataFormat dataFormat
,
145 // ---------------------------------------------------------------------------
147 // ---------------------------------------------------------------------------
149 IMPLEMENT_DYNAMIC_CLASS(wxClipboard
, wxObject
)
151 wxClipboard::wxClipboard()
153 m_clearOnExit
= FALSE
;
157 wxClipboard::~wxClipboard()
165 void wxClipboard::Clear()
169 bool wxClipboard::Flush()
174 bool wxClipboard::Open()
176 return wxOpenClipboard();
179 bool wxClipboard::IsOpened() const
181 return wxIsClipboardOpened();
184 bool wxClipboard::SetData( wxDataObject
*data
)
189 bool wxClipboard::AddData( wxDataObject
*data
)
194 void wxClipboard::Close()
199 bool wxClipboard::IsSupported( wxDataFormat format
)
201 return wxIsClipboardFormatAvailable(format
);
204 bool wxClipboard::GetData( wxDataObject
& data
)
209 #endif // wxUSE_CLIPBOARD