source: trunk/synergy/lib/platform/CXWindowsClipboardHTMLConverter.cpp

Last change on this file was 2749, checked in by bird, 19 years ago

synergy v1.3.1 sources (zip).

File size: 1.4 KB
Line 
1/*
2 * synergy -- mouse and keyboard sharing utility
3 * Copyright (C) 2004 Chris Schoeneman
4 *
5 * This package is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * found in the file COPYING that should have accompanied this file.
8 *
9 * This package is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#include "CXWindowsClipboardHTMLConverter.h"
16#include "CUnicode.h"
17
18//
19// CXWindowsClipboardHTMLConverter
20//
21
22CXWindowsClipboardHTMLConverter::CXWindowsClipboardHTMLConverter(
23 Display* display, const char* name) :
24 m_atom(XInternAtom(display, name, False))
25{
26 // do nothing
27}
28
29CXWindowsClipboardHTMLConverter::~CXWindowsClipboardHTMLConverter()
30{
31 // do nothing
32}
33
34IClipboard::EFormat
35CXWindowsClipboardHTMLConverter::getFormat() const
36{
37 return IClipboard::kHTML;
38}
39
40Atom
41CXWindowsClipboardHTMLConverter::getAtom() const
42{
43 return m_atom;
44}
45
46int
47CXWindowsClipboardHTMLConverter::getDataSize() const
48{
49 return 8;
50}
51
52CString
53CXWindowsClipboardHTMLConverter::fromIClipboard(const CString& data) const
54{
55 return CUnicode::UTF8ToUTF16(data);
56}
57
58CString
59CXWindowsClipboardHTMLConverter::toIClipboard(const CString& data) const
60{
61 return CUnicode::UTF16ToUTF8(data);
62}
Note: See TracBrowser for help on using the repository browser.