5 * Created by Toshi Nagata on 08/11/26.
6 * Copyright 2008 Toshi Nagata. All rights reserved.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation version 2 of the License.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
18 #include "MyClipboardData.h"
21 MyClipboardData::MyClipboardData(const char *type):
24 wxString ftype(type, WX_DEFAULT_CONV);
25 wxDataFormat customFormat((const wxChar *)ftype);
28 SetFormat(customFormat);
31 MyClipboardData::~MyClipboardData()
38 MyClipboardData::GetDataSize() const
44 MyClipboardData::GetDataHere(void *buf) const
47 memmove(buf, buffer, length);
53 MyClipboardData::SetData(size_t len, const void *buf)
57 p = (char *)malloc(len);
59 p = (char *)realloc(buffer, len);