Changeset 2752 for trunk/synergy/lib/platform/CPMClipboard.h
- Timestamp:
- Jul 29, 2006, 6:43:07 AM (19 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/synergy/lib/platform/CPMClipboard.h
r2751 r2752 2 2 * synergy -- mouse and keyboard sharing utility 3 3 * Copyright (C) 2002 Chris Schoeneman 4 * Copyright (C) 2006 Knut St. Osmundsen 4 5 * 5 6 * This package is free software; you can redistribute it and/or … … 13 14 */ 14 15 15 #ifndef C MSWINDOWSCLIPBOARD_H16 #define C MSWINDOWSCLIPBOARD_H16 #ifndef CPMCLIPBOARD_H 17 #define CPMCLIPBOARD_H 17 18 18 19 #include "IClipboard.h" 19 20 #include "stdvector.h" 20 #define WIN32_LEAN_AND_MEAN 21 #include <windows.h> 21 #define INCL_ERRORS 22 #define INCL_BASE 23 #define INCL_PM 24 #include <os2.h> 22 25 23 class I MSWindowsClipboardConverter;26 class IPMClipboardConverter; 24 27 25 28 //! Microsoft windows clipboard implementation 26 class C MSWindowsClipboard : public IClipboard {29 class CPMClipboard : public IClipboard { 27 30 public: 28 C MSWindowsClipboard(HWND window);29 virtual ~C MSWindowsClipboard();31 CPMClipboard(HWND window); 32 virtual ~CPMClipboard(); 30 33 31 34 //! Empty clipboard without ownership … … 59 62 void clearConverters(); 60 63 61 U INT convertFormatToWin32(EFormat) const;62 HANDLE convertTextToWin32(const CString& data) const;63 CString convertTextFrom Win32(HANDLE) const;64 ULONG convertFormatToPM(EFormat) const; 65 ULONG convertTextToPM(const CString& data) const; 66 CString convertTextFromPM(ULONG) const; 64 67 65 static UINTgetOwnershipFormat();68 static ATOM getOwnershipFormat(); 66 69 67 70 private: 68 typedef std::vector<I MSWindowsClipboardConverter*> ConverterList;71 typedef std::vector<IPMClipboardConverter*> ConverterList; 69 72 70 73 HWND m_window; 71 74 mutable Time m_time; 72 75 ConverterList m_converters; 73 static UINTs_ownershipFormat;76 static ATOM s_ownershipFormat; 74 77 }; 75 78 … … 79 82 converters. 80 83 */ 81 class I MSWindowsClipboardConverter : public IInterface {84 class IPMClipboardConverter : public IInterface { 82 85 public: 83 86 // accessors … … 87 90 getFormat() const = 0; 88 91 89 // return the atom representing the win32clipboard format that92 // return the atom representing the PM clipboard format that 90 93 // this object converts from/to 91 virtual U INT getWin32Format() const = 0;94 virtual ULONG getPMFormat() const = 0; 92 95 93 // convert from the IClipboard format to the win32 clipboard format. 96 // return the format info flags for the PM clipboard format 97 // this object converts from/to 98 virtual ULONG getPMFormatInfo() const = 0; 99 100 // convert from the IClipboard format to the PM clipboard format. 94 101 // the input data must be in the IClipboard format returned by 95 // getFormat(). the return data will be in the win32 clipboard 96 // format returned by getWin32Format(), allocated by GlobalAlloc(). 97 virtual HANDLE fromIClipboard(const CString&) const = 0; 102 // getFormat(). the return data will be in the PM clipboard 103 // format returned by getPMFormat(). 104 virtual ULONG fromIClipboard(const CString&) const = 0; 105 106 // free PM clipboard data (failure case). 107 virtual void freePMData(ULONG) const = 0; 98 108 99 109 // convert from the win32 clipboard format to the IClipboard format 100 110 // (i.e., the reverse of fromIClipboard()). 101 virtual CString toIClipboard( HANDLEdata) const = 0;111 virtual CString toIClipboard(ULONG data) const = 0; 102 112 }; 103 113
Note:
See TracChangeset
for help on using the changeset viewer.