~ubuntu-branches/ubuntu/natty/synergy/natty

« back to all changes in this revision

Viewing changes to lib/synergy/IPrimaryScreenReceiver.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Lutz
  • Date: 2003-10-31 19:36:30 UTC
  • Revision ID: james.westby@ubuntu.com-20031031193630-knbv79x5az7qh49y
Tags: upstream-1.0.14
ImportĀ upstreamĀ versionĀ 1.0.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * synergy -- mouse and keyboard sharing utility
 
3
 * Copyright (C) 2002 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 IPRIMARYSCREENRECEIVER_H
 
16
#define IPRIMARYSCREENRECEIVER_H
 
17
 
 
18
#include "IInterface.h"
 
19
#include "KeyTypes.h"
 
20
#include "MouseTypes.h"
 
21
 
 
22
//! Primary screen event receiver interface
 
23
/*!
 
24
The interface for receiving notification of events on the primary
 
25
screen.  The server implements this interface to handle user input.
 
26
Platform dependent primary screen implementation will need to take
 
27
an IPrimaryScreenReceiver* and notify it of events.
 
28
*/
 
29
class IPrimaryScreenReceiver : public IInterface {
 
30
public:
 
31
        //! Notify of screen saver change
 
32
        /*!
 
33
        Called when the screensaver is activated or deactivated.
 
34
        */
 
35
        virtual void            onScreensaver(bool activated) = 0;
 
36
 
 
37
        //! Notify of one-shot timer expiration
 
38
        /*!
 
39
        Called when a one-shot timer expires.
 
40
        */
 
41
        virtual void            onOneShotTimerExpired(UInt32 id) = 0;
 
42
 
 
43
        // call to notify of events.  onMouseMovePrimary() returns
 
44
        // true iff the mouse enters a jump zone and jumps.
 
45
        //! Notify of key press
 
46
        virtual void            onKeyDown(KeyID, KeyModifierMask, KeyButton) = 0;
 
47
        //! Notify of key release
 
48
        virtual void            onKeyUp(KeyID, KeyModifierMask, KeyButton) = 0;
 
49
        //! Notify of key repeat
 
50
        virtual void            onKeyRepeat(KeyID, KeyModifierMask,
 
51
                                                        SInt32 count, KeyButton) = 0;
 
52
        //! Notify of mouse button press
 
53
        virtual void            onMouseDown(ButtonID) = 0;
 
54
        //! Notify of mouse button release
 
55
        virtual void            onMouseUp(ButtonID) = 0;
 
56
        //! Notify of mouse motion
 
57
        /*!
 
58
        Called when the mouse has moved while on the primary screen.  \c x
 
59
        and \c y are the absolute screen position of the mouse.  Return
 
60
        true iff the mouse enters a jump zone and jumps.
 
61
        */
 
62
        virtual bool            onMouseMovePrimary(SInt32 x, SInt32 y) = 0;
 
63
        //! Notify of mouse motion
 
64
        /*!
 
65
        Called when the mouse has moved while on the secondary screen.
 
66
        \c dx and \c dy are the relative motion from the last position.
 
67
        */
 
68
        virtual void            onMouseMoveSecondary(SInt32 dx, SInt32 dy) = 0;
 
69
        //! Notify of mouse wheen motion
 
70
        virtual void            onMouseWheel(SInt32 delta) = 0;
 
71
};
 
72
 
 
73
#endif