OS X clipboard implementation. More...
#include <COSXClipboard.h>
Inherits IClipboard.
Public Member Functions | |
| virtual bool | empty () |
| Empty clipboard. | |
| virtual void | add (EFormat, const CString &data) |
| Add data. | |
| virtual bool | open (Time) const |
| virtual void | close () const |
| Close clipboard. | |
| virtual Time | getTime () const |
| Get time. | |
| virtual bool | has (EFormat) const |
| Check for data. | |
| virtual CString | get (EFormat) const |
| Get data. | |
| bool | synchronize () |
Static Public Member Functions | |
| static bool | isOwnedBySynergy () |
| Test if clipboard is owned by synergy. | |
OS X clipboard implementation.
Definition at line 29 of file COSXClipboard.h.
| void COSXClipboard::add | ( | EFormat | , | |
| const CString & | data | |||
| ) | [virtual] |
Add data.
Add data in the given format to the clipboard. May only be called after a successful empty().
Implements IClipboard.
Definition at line 89 of file COSXClipboard.cpp.
References empty(), IOSXClipboardConverter::fromIClipboard(), IOSXClipboardConverter::getFormat(), and IOSXClipboardConverter::getOSXFormat().
| void COSXClipboard::close | ( | ) | const [virtual] |
Close clipboard.
Close the clipboard. close() must match a preceding successful open(). This signals that the clipboard has been filled with all the necessary data or all data has been read. It does not mean the clipboard ownership should be released (if it was taken).
Implements IClipboard.
Definition at line 141 of file COSXClipboard.cpp.
| bool COSXClipboard::empty | ( | ) | [virtual] |
Empty clipboard.
Take ownership of the clipboard and clear all data from it. This must be called between a successful open() and close(). Return false if the clipboard ownership could not be taken; the clipboard should not be emptied in this case.
Implements IClipboard.
Definition at line 58 of file COSXClipboard.cpp.
Referenced by add().
| CString COSXClipboard::get | ( | EFormat | ) | const [virtual] |
Get data.
Return the data in the given format. Returns the empty string if there is no data in that format. Must be called between a successful open() and close().
Implements IClipboard.
Definition at line 181 of file COSXClipboard.cpp.
References IOSXClipboardConverter::getFormat(), IOSXClipboardConverter::getOSXFormat(), and IOSXClipboardConverter::toIClipboard().
| IClipboard::Time COSXClipboard::getTime | ( | ) | const [virtual] |
Get time.
Return the timestamp passed to the last successful open().
Implements IClipboard.
Definition at line 148 of file COSXClipboard.cpp.
| bool COSXClipboard::has | ( | EFormat | ) | const [virtual] |
Check for data.
Return true iff the clipboard contains data in the given format. Must be called between a successful open() and close().
Implements IClipboard.
Definition at line 154 of file COSXClipboard.cpp.
References IOSXClipboardConverter::getFormat(), and IOSXClipboardConverter::getOSXFormat().
1.7.1