blob: dcd779ef2dadfce9ad5b87ec207555a3ea42b46e [file] [log] [blame]
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +00001/* Copyright (C) 2002-2003 RealVNC Ltd. All Rights Reserved.
2 *
3 * This is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This software is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this software; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 * USA.
17 */
18
19// -=- Input.h
20//
21// A number of routines that accept VNC-style input event data and perform
22// the appropriate actions under Win32
23
24#ifndef __RFB_WIN32_INPUT_H__
25#define __RFB_WIN32_INPUT_H__
26
27#include <rfb/Rect.h>
28#include <rfb/Configuration.h>
29#include <rdr/types.h>
30#include <map>
31#include <vector>
32
33namespace rfb {
34
35 class CMsgWriter;
36
37 namespace win32 {
38
39 // -=- Pointer event handling
40
41 class SPointer {
42 public:
43 SPointer();
44 // - Create a pointer event at a the given coordinates, with the
45 // specified button state. The event must be specified using
46 // Screen coordinates.
47 void pointerEvent(const Point& pos, rdr::U8 buttonmask);
48 protected:
49 Point last_position;
50 rdr::U8 last_buttonmask;
51 };
52
53 // -=- Keyboard event handling
54
55 class SKeyboard {
56 public:
57 SKeyboard();
58 void keyEvent(rdr::U32 key, bool down);
59 static BoolParameter deadKeyAware;
60 private:
61 std::map<rdr::U32,rdr::U8> vkMap;
62 std::map<rdr::U32,bool> extendedMap;
63 std::vector<rdr::U8> deadChars;
64 };
65
66 }; // win32
67
68}; // rfb
69
70#endif // __RFB_WIN32_INPUT_H__