Ignore:
Timestamp:
Jul 29, 2006, 6:43:07 AM (19 years ago)
Author:
bird
Message:

Two classes (CPMScreen and CPMKeyState) + the hook dll left (and debugging of course).

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/synergy/lib/platform/CPMClipboard.h

    r2751 r2752  
    22 * synergy -- mouse and keyboard sharing utility
    33 * Copyright (C) 2002 Chris Schoeneman
     4 * Copyright (C) 2006 Knut St. Osmundsen
    45 *
    56 * This package is free software; you can redistribute it and/or
     
    1314 */
    1415
    15 #ifndef CMSWINDOWSCLIPBOARD_H
    16 #define CMSWINDOWSCLIPBOARD_H
     16#ifndef CPMCLIPBOARD_H
     17#define CPMCLIPBOARD_H
    1718
    1819#include "IClipboard.h"
    1920#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>
    2225
    23 class IMSWindowsClipboardConverter;
     26class IPMClipboardConverter;
    2427
    2528//! Microsoft windows clipboard implementation
    26 class CMSWindowsClipboard : public IClipboard {
     29class CPMClipboard : public IClipboard {
    2730public:
    28         CMSWindowsClipboard(HWND window);
    29         virtual ~CMSWindowsClipboard();
     31        CPMClipboard(HWND window);
     32        virtual ~CPMClipboard();
    3033
    3134        //! Empty clipboard without ownership
     
    5962        void                            clearConverters();
    6063
    61         UINT                            convertFormatToWin32(EFormat) const;
    62         HANDLE                          convertTextToWin32(const CString& data) const;
    63         CString                         convertTextFromWin32(HANDLE) const;
     64        ULONG                           convertFormatToPM(EFormat) const;
     65        ULONG                           convertTextToPM(const CString& data) const;
     66        CString                         convertTextFromPM(ULONG) const;
    6467
    65         static UINT                     getOwnershipFormat();
     68        static ATOM                     getOwnershipFormat();
    6669
    6770private:
    68         typedef std::vector<IMSWindowsClipboardConverter*> ConverterList;
     71        typedef std::vector<IPMClipboardConverter*> ConverterList;
    6972
    7073        HWND                            m_window;
    7174        mutable Time            m_time;
    7275        ConverterList           m_converters;
    73         static UINT                     s_ownershipFormat;
     76        static ATOM                     s_ownershipFormat;
    7477};
    7578
     
    7982converters.
    8083*/
    81 class IMSWindowsClipboardConverter : public IInterface {
     84class IPMClipboardConverter : public IInterface {
    8285public:
    8386        // accessors
     
    8790                                                getFormat() const = 0;
    8891
    89         // return the atom representing the win32 clipboard format that
     92        // return the atom representing the PM clipboard format that
    9093        // this object converts from/to
    91         virtual UINT            getWin32Format() const = 0;
     94        virtual ULONG           getPMFormat() const = 0;
    9295
    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.
    94101        // 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;
    98108
    99109        // convert from the win32 clipboard format to the IClipboard format
    100110        // (i.e., the reverse of fromIClipboard()).
    101         virtual CString         toIClipboard(HANDLE data) const = 0;
     111        virtual CString         toIClipboard(ULONG data) const = 0;
    102112};
    103113
Note: See TracChangeset for help on using the changeset viewer.