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