Ignore:
Timestamp:
Aug 20, 2006, 8:15:41 AM (19 years ago)
Author:
bird
Message:

I hate tabs.

File:
1 edited

Legend:

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

    r2752 r2770  
    33 * Copyright (C) 2002 Chris Schoeneman
    44 * Copyright (C) 2006 Knut St. Osmundsen
    5  * 
     5 *
    66 * This package is free software; you can redistribute it and/or
    77 * modify it under the terms of the GNU General Public License
    88 * found in the file COPYING that should have accompanied this file.
    9  * 
     9 *
    1010 * This package is distributed in the hope that it will be useful,
    1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     
    2929class CPMClipboard : public IClipboard {
    3030public:
    31         CPMClipboard(HWND window);
    32         virtual ~CPMClipboard();
     31    CPMClipboard(HWND window);
     32    virtual ~CPMClipboard();
    3333
    34         //! Empty clipboard without ownership
    35         /*!
    36         Take ownership of the clipboard and clear all data from it.
    37         This must be called between a successful open() and close().
    38         Return false if the clipboard ownership could not be taken;
    39         the clipboard should not be emptied in this case.  Unlike
    40         empty(), isOwnedBySynergy() will return false when emptied
    41         this way.  This is useful when synergy wants to put data on
    42         clipboard but pretend (to itself) that some other app did it.
    43         When using empty(), synergy assumes the data came from the
    44         server and doesn't need to be sent back.  emptyUnowned()
    45         makes synergy send the data to the server.
    46         */
    47         bool                            emptyUnowned();
     34    //! Empty clipboard without ownership
     35    /*!
     36    Take ownership of the clipboard and clear all data from it.
     37    This must be called between a successful open() and close().
     38    Return false if the clipboard ownership could not be taken;
     39    the clipboard should not be emptied in this case.  Unlike
     40    empty(), isOwnedBySynergy() will return false when emptied
     41    this way.  This is useful when synergy wants to put data on
     42    clipboard but pretend (to itself) that some other app did it.
     43    When using empty(), synergy assumes the data came from the
     44    server and doesn't need to be sent back.  emptyUnowned()
     45    makes synergy send the data to the server.
     46    */
     47    bool                emptyUnowned();
    4848
    49         //! Test if clipboard is owned by synergy
    50         static bool                     isOwnedBySynergy();
     49    //! Test if clipboard is owned by synergy
     50    static bool         isOwnedBySynergy();
    5151
    52         // IClipboard overrides
    53         virtual bool            empty();
    54         virtual void            add(EFormat, const CString& data);
    55         virtual bool            open(Time) const;
    56         virtual void            close() const;
    57         virtual Time            getTime() const;
    58         virtual bool            has(EFormat) const;
    59         virtual CString         get(EFormat) const;
     52    // IClipboard overrides
     53    virtual bool        empty();
     54    virtual void        add(EFormat, const CString& data);
     55    virtual bool        open(Time) const;
     56    virtual void        close() const;
     57    virtual Time        getTime() const;
     58    virtual bool        has(EFormat) const;
     59    virtual CString     get(EFormat) const;
    6060
    6161private:
    62         void                            clearConverters();
     62    void                clearConverters();
    6363
    64         ULONG                           convertFormatToPM(EFormat) const;
    65         ULONG                           convertTextToPM(const CString& data) const;
    66         CString                         convertTextFromPM(ULONG) const;
     64    ULONG               convertFormatToPM(EFormat) const;
     65    ULONG               convertTextToPM(const CString& data) const;
     66    CString             convertTextFromPM(ULONG) const;
    6767
    68         static ATOM                     getOwnershipFormat();
     68    static ATOM         getOwnershipFormat();
    6969
    7070private:
    71         typedef std::vector<IPMClipboardConverter*> ConverterList;
     71    typedef std::vector<IPMClipboardConverter*> ConverterList;
    7272
    73         HWND                            m_window;
    74         mutable Time            m_time;
    75         ConverterList           m_converters;
    76         static ATOM                     s_ownershipFormat;
     73    HWND                m_window;
     74    mutable Time        m_time;
     75    ConverterList       m_converters;
     76    static ATOM         s_ownershipFormat;
    7777};
    7878
     
    8484class IPMClipboardConverter : public IInterface {
    8585public:
    86         // accessors
     86    // accessors
    8787
    88         // return the clipboard format this object converts from/to
    89         virtual IClipboard::EFormat
    90                                                 getFormat() const = 0;
     88    // return the clipboard format this object converts from/to
     89    virtual IClipboard::EFormat
     90                        getFormat() const = 0;
    9191
    92         // return the atom representing the PM clipboard format that
    93         // this object converts from/to
    94         virtual ULONG           getPMFormat() const = 0;
     92    // return the atom representing the PM clipboard format that
     93    // this object converts from/to
     94    virtual ULONG       getPMFormat() const = 0;
    9595
    96         // return the format info flags for the PM clipboard format
    97         // this object converts from/to
    98         virtual ULONG           getPMFormatInfo() const = 0;
     96    // return the format info flags for the PM clipboard format
     97    // this object converts from/to
     98    virtual ULONG       getPMFormatInfo() const = 0;
    9999
    100         // convert from the IClipboard format to the PM clipboard format.
    101         // the input data must be in the IClipboard format returned by
    102         // getFormat().  the return data will be in the PM clipboard
    103         // format returned by getPMFormat().
    104         virtual ULONG           fromIClipboard(const CString&) const = 0;
     100    // convert from the IClipboard format to the PM clipboard format.
     101    // the input data must be in the IClipboard format returned by
     102    // getFormat().  the return data will be in the PM clipboard
     103    // format returned by getPMFormat().
     104    virtual ULONG       fromIClipboard(const CString&) const = 0;
    105105
    106         // free PM clipboard data (failure case).
    107         virtual void            freePMData(ULONG) const = 0;
     106    // free PM clipboard data (failure case).
     107    virtual void        freePMData(ULONG) const = 0;
    108108
    109         // convert from the win32 clipboard format to the IClipboard format
    110         // (i.e., the reverse of fromIClipboard()).
    111         virtual CString         toIClipboard(ULONG data) const = 0;
     109    // convert from the win32 clipboard format to the IClipboard format
     110    // (i.e., the reverse of fromIClipboard()).
     111    virtual CString     toIClipboard(ULONG data) const = 0;
    112112};
    113113
Note: See TracChangeset for help on using the changeset viewer.