]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/palmos/clipbrd.cpp
Updated list of subprojects.
[wxWidgets.git] / src / palmos / clipbrd.cpp
... / ...
CommitLineData
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#if wxUSE_CLIPBOARD
28
29#include "wx/clipbrd.h"
30
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"
39 #include "wx/log.h"
40 #include "wx/dataobj.h"
41#endif
42
43#if wxUSE_METAFILE
44 #include "wx/metafile.h"
45#endif
46
47#include <string.h>
48
49#include "wx/palmos/private.h"
50
51#if wxUSE_WXDIB
52 #include "wx/palmos/dib.h"
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
75static bool gs_wxClipboardIsOpen = false;
76
77bool wxOpenClipboard()
78{
79 return false;
80}
81
82bool wxCloseClipboard()
83{
84 return false;
85}
86
87bool wxEmptyClipboard()
88{
89 return false;
90}
91
92bool wxIsClipboardOpened()
93{
94 return false;
95}
96
97bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat)
98{
99 return false;
100}
101
102
103bool wxSetClipboardData(wxDataFormat dataFormat,
104 const void *data,
105 int width, int height)
106{
107 return false;
108}
109
110void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
111{
112 void *retval = NULL;
113
114 return retval;
115}
116
117wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat)
118{
119 return (wxDataFormat::NativeFormat)::EnumClipboardFormats(dataFormat);
120}
121
122int wxRegisterClipboardFormat(wxChar *formatName)
123{
124 return ::RegisterClipboardFormat(formatName);
125}
126
127bool wxGetClipboardFormatName(wxDataFormat dataFormat,
128 wxChar *formatName,
129 int maxCount)
130{
131 return false;
132}
133
134// ---------------------------------------------------------------------------
135// wxClipboard
136// ---------------------------------------------------------------------------
137
138IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject)
139
140wxClipboard::wxClipboard()
141{
142 m_clearOnExit = false;
143 m_isOpened = false;
144}
145
146wxClipboard::~wxClipboard()
147{
148 if ( m_clearOnExit )
149 {
150 Clear();
151 }
152}
153
154void wxClipboard::Clear()
155{
156}
157
158bool wxClipboard::Flush()
159{
160 return false;
161}
162
163bool wxClipboard::Open()
164{
165 return wxOpenClipboard();
166}
167
168bool wxClipboard::IsOpened() const
169{
170 return wxIsClipboardOpened();
171}
172
173bool wxClipboard::SetData( wxDataObject *data )
174{
175 return false;
176}
177
178bool wxClipboard::AddData( wxDataObject *data )
179{
180 return false;
181}
182
183void wxClipboard::Close()
184{
185 wxCloseClipboard();
186}
187
188bool wxClipboard::IsSupported( wxDataFormat format )
189{
190 return wxIsClipboardFormatAvailable(format);
191}
192
193bool wxClipboard::GetData( wxDataObject& data )
194{
195 return false;
196}
197
198#endif // wxUSE_CLIPBOARD