source: trunk/synergy/lib/platform/CXWindowsClipboardUCS2Converter.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) 2002 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 "CXWindowsClipboardUCS2Converter.h"
16#include "CUnicode.h"
17
18//
19// CXWindowsClipboardUCS2Converter
20//
21
22CXWindowsClipboardUCS2Converter::CXWindowsClipboardUCS2Converter(
23 Display* display, const char* name) :
24 m_atom(XInternAtom(display, name, False))
25{
26 // do nothing
27}
28
29CXWindowsClipboardUCS2Converter::~CXWindowsClipboardUCS2Converter()
30{
31 // do nothing
32}
33
34IClipboard::EFormat
35CXWindowsClipboardUCS2Converter::getFormat() const
36{
37 return IClipboard::kText;
38}
39
40Atom
41CXWindowsClipboardUCS2Converter::getAtom() const
42{
43 return m_atom;
44}
45
46int
47CXWindowsClipboardUCS2Converter::getDataSize() const
48{
49 return 16;
50}
51
52CString
53CXWindowsClipboardUCS2Converter::fromIClipboard(const CString& data) const
54{
55 return CUnicode::UTF8ToUCS2(data);
56}
57
58CString
59CXWindowsClipboardUCS2Converter::toIClipboard(const CString& data) const
60{
61 return CUnicode::UCS2ToUTF8(data);
62}
Note: See TracBrowser for help on using the repository browser.