| 1 | /*
|
|---|
| 2 | * synergy -- mouse and keyboard sharing utility
|
|---|
| 3 | * Copyright (C) 2003 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 | #ifndef IARCHTASKBARRECEIVER_H
|
|---|
| 16 | #define IARCHTASKBARRECEIVER_H
|
|---|
| 17 |
|
|---|
| 18 | #include "IInterface.h"
|
|---|
| 19 | #include "stdstring.h"
|
|---|
| 20 |
|
|---|
| 21 | //! Interface for architecture dependent task bar event handling
|
|---|
| 22 | /*!
|
|---|
| 23 | This interface defines the task bar icon event handlers required
|
|---|
| 24 | by synergy. Each architecture must implement this interface
|
|---|
| 25 | though each operation can be a no-op.
|
|---|
| 26 | */
|
|---|
| 27 | class IArchTaskBarReceiver : public IInterface {
|
|---|
| 28 | public:
|
|---|
| 29 | // Icon data is architecture dependent
|
|---|
| 30 | typedef void* Icon;
|
|---|
| 31 |
|
|---|
| 32 | //! @name manipulators
|
|---|
| 33 | //@{
|
|---|
| 34 |
|
|---|
| 35 | //! Show status window
|
|---|
| 36 | /*!
|
|---|
| 37 | Open a window displaying current status. This should return
|
|---|
| 38 | immediately without waiting for the window to be closed.
|
|---|
| 39 | */
|
|---|
| 40 | virtual void showStatus() = 0;
|
|---|
| 41 |
|
|---|
| 42 | //! Popup menu
|
|---|
| 43 | /*!
|
|---|
| 44 | Popup a menu of operations at or around \c x,y and perform the
|
|---|
| 45 | chosen operation.
|
|---|
| 46 | */
|
|---|
| 47 | virtual void runMenu(int x, int y) = 0;
|
|---|
| 48 |
|
|---|
| 49 | //! Perform primary action
|
|---|
| 50 | /*!
|
|---|
| 51 | Perform the primary (default) action.
|
|---|
| 52 | */
|
|---|
| 53 | virtual void primaryAction() = 0;
|
|---|
| 54 |
|
|---|
| 55 | //@}
|
|---|
| 56 | //! @name accessors
|
|---|
| 57 | //@{
|
|---|
| 58 |
|
|---|
| 59 | //! Lock receiver
|
|---|
| 60 | /*!
|
|---|
| 61 | Locks the receiver from changing state. The receiver should be
|
|---|
| 62 | locked when querying it's state to ensure consistent results.
|
|---|
| 63 | Each call to \c lock() must have a matching \c unlock() and
|
|---|
| 64 | locks cannot be nested.
|
|---|
| 65 | */
|
|---|
| 66 | virtual void lock() const = 0;
|
|---|
| 67 |
|
|---|
| 68 | //! Unlock receiver
|
|---|
| 69 | virtual void unlock() const = 0;
|
|---|
| 70 |
|
|---|
| 71 | //! Get icon
|
|---|
| 72 | /*!
|
|---|
| 73 | Returns the icon to display in the task bar. The interface
|
|---|
| 74 | to set the icon is left to subclasses. Getting and setting
|
|---|
| 75 | the icon must be thread safe.
|
|---|
| 76 | */
|
|---|
| 77 | virtual const Icon getIcon() const = 0;
|
|---|
| 78 |
|
|---|
| 79 | //! Get tooltip
|
|---|
| 80 | /*!
|
|---|
| 81 | Returns the tool tip to display in the task bar. The interface
|
|---|
| 82 | to set the tooltip is left to sublclasses. Getting and setting
|
|---|
| 83 | the icon must be thread safe.
|
|---|
| 84 | */
|
|---|
| 85 | virtual std::string getToolTip() const = 0;
|
|---|
| 86 |
|
|---|
| 87 | //@}
|
|---|
| 88 | };
|
|---|
| 89 |
|
|---|
| 90 | #endif
|
|---|