]>
Commit | Line | Data |
---|---|---|
ffecfa5a | 1 | ///////////////////////////////////////////////////////////////////////////// |
e2731512 | 2 | // Name: src/palmos/clipbrd.cpp |
ffecfa5a | 3 | // Purpose: Clipboard functionality |
e2731512 | 4 | // Author: William Osborne - minimal working wxPalmOS port |
ffecfa5a JS |
5 | // Modified by: |
6 | // Created: 10/13/04 | |
e2731512 | 7 | // RCS-ID: $Id$ |
ffecfa5a JS |
8 | // Copyright: (c) William Osborne |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | // =========================================================================== | |
13 | // declarations | |
14 | // =========================================================================== | |
15 | ||
16 | // --------------------------------------------------------------------------- | |
17 | // headers | |
18 | // --------------------------------------------------------------------------- | |
19 | ||
ffecfa5a JS |
20 | // For compilers that support precompilation, includes "wx.h". |
21 | #include "wx/wxprec.h" | |
22 | ||
23 | #ifdef __BORLANDC__ | |
24 | #pragma hdrstop | |
25 | #endif | |
26 | ||
ffecfa5a JS |
27 | #if wxUSE_CLIPBOARD |
28 | ||
e4db172a WS |
29 | #include "wx/clipbrd.h" |
30 | ||
ffecfa5a JS |
31 | #ifndef WX_PRECOMP |
32 | #include "wx/object.h" | |
33 | #include "wx/event.h" | |
34 | #include "wx/app.h" | |
35 | #include "wx/frame.h" | |
36 | #include "wx/bitmap.h" | |
37 | #include "wx/utils.h" | |
38 | #include "wx/intl.h" | |
e4db172a | 39 | #include "wx/log.h" |
28f92d74 | 40 | #include "wx/dataobj.h" |
ffecfa5a JS |
41 | #endif |
42 | ||
43 | #if wxUSE_METAFILE | |
44 | #include "wx/metafile.h" | |
45 | #endif | |
46 | ||
ffecfa5a JS |
47 | #include <string.h> |
48 | ||
49 | #include "wx/palmos/private.h" | |
50 | ||
51 | #if wxUSE_WXDIB | |
28f92d74 | 52 | #include "wx/palmos/dib.h" |
ffecfa5a JS |
53 | #endif |
54 | ||
55 | #if wxUSE_OLE && !defined(__WXWINCE__) | |
56 | // use OLE clipboard | |
57 | #define wxUSE_OLE_CLIPBOARD 1 | |
58 | #else // !wxUSE_DATAOBJ | |
59 | // use Win clipboard API | |
60 | #define wxUSE_OLE_CLIPBOARD 0 | |
61 | #endif | |
62 | ||
63 | #if wxUSE_OLE_CLIPBOARD | |
64 | #include <ole2.h> | |
65 | #endif // wxUSE_OLE_CLIPBOARD | |
66 | ||
67 | // =========================================================================== | |
68 | // implementation | |
69 | // =========================================================================== | |
70 | ||
71 | // --------------------------------------------------------------------------- | |
72 | // old-style clipboard functions | |
73 | // --------------------------------------------------------------------------- | |
74 | ||
28f92d74 | 75 | static bool gs_wxClipboardIsOpen = false; |
ffecfa5a JS |
76 | |
77 | bool wxOpenClipboard() | |
78 | { | |
79 | return false; | |
80 | } | |
81 | ||
82 | bool wxCloseClipboard() | |
83 | { | |
84 | return false; | |
85 | } | |
86 | ||
87 | bool wxEmptyClipboard() | |
88 | { | |
89 | return false; | |
90 | } | |
91 | ||
92 | bool wxIsClipboardOpened() | |
93 | { | |
94 | return false; | |
95 | } | |
96 | ||
97 | bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat) | |
98 | { | |
99 | return false; | |
100 | } | |
101 | ||
102 | ||
103 | bool wxSetClipboardData(wxDataFormat dataFormat, | |
104 | const void *data, | |
105 | int width, int height) | |
106 | { | |
107 | return false; | |
108 | } | |
109 | ||
110 | void *wxGetClipboardData(wxDataFormat dataFormat, long *len) | |
111 | { | |
112 | void *retval = NULL; | |
113 | ||
114 | return retval; | |
115 | } | |
116 | ||
117 | wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat) | |
118 | { | |
119 | return (wxDataFormat::NativeFormat)::EnumClipboardFormats(dataFormat); | |
120 | } | |
121 | ||
122 | int wxRegisterClipboardFormat(wxChar *formatName) | |
123 | { | |
124 | return ::RegisterClipboardFormat(formatName); | |
125 | } | |
126 | ||
127 | bool wxGetClipboardFormatName(wxDataFormat dataFormat, | |
128 | wxChar *formatName, | |
129 | int maxCount) | |
130 | { | |
131 | return false; | |
132 | } | |
133 | ||
134 | // --------------------------------------------------------------------------- | |
135 | // wxClipboard | |
136 | // --------------------------------------------------------------------------- | |
137 | ||
138 | IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject) | |
139 | ||
140 | wxClipboard::wxClipboard() | |
141 | { | |
28f92d74 WS |
142 | m_clearOnExit = false; |
143 | m_isOpened = false; | |
ffecfa5a JS |
144 | } |
145 | ||
146 | wxClipboard::~wxClipboard() | |
147 | { | |
148 | if ( m_clearOnExit ) | |
149 | { | |
150 | Clear(); | |
151 | } | |
152 | } | |
153 | ||
154 | void wxClipboard::Clear() | |
155 | { | |
156 | } | |
157 | ||
158 | bool wxClipboard::Flush() | |
159 | { | |
160 | return false; | |
161 | } | |
162 | ||
163 | bool wxClipboard::Open() | |
164 | { | |
165 | return wxOpenClipboard(); | |
166 | } | |
167 | ||
168 | bool wxClipboard::IsOpened() const | |
169 | { | |
170 | return wxIsClipboardOpened(); | |
171 | } | |
172 | ||
173 | bool wxClipboard::SetData( wxDataObject *data ) | |
174 | { | |
175 | return false; | |
176 | } | |
177 | ||
178 | bool wxClipboard::AddData( wxDataObject *data ) | |
179 | { | |
180 | return false; | |
181 | } | |
182 | ||
183 | void wxClipboard::Close() | |
184 | { | |
185 | wxCloseClipboard(); | |
186 | } | |
187 | ||
188 | bool wxClipboard::IsSupported( wxDataFormat format ) | |
189 | { | |
190 | return wxIsClipboardFormatAvailable(format); | |
191 | } | |
192 | ||
193 | bool wxClipboard::GetData( wxDataObject& data ) | |
194 | { | |
195 | return false; | |
196 | } | |
197 | ||
198 | #endif // wxUSE_CLIPBOARD |