comparison src/video/qnxgf/SDL_hiddi_mouse.h @ 3109:7b3a09fb9c8b

Support for HID devices (mice and keyboards only for now) has been added
author Mike Gorchak <lestat@i.com.ua>
date Tue, 28 Apr 2009 04:33:30 +0000
parents
children 7f684f249ec9
comparison
equal deleted inserted replaced
3108:aa1897bee1e9 3109:7b3a09fb9c8b
1 /*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2009 Sam Lantinga
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19 Sam Lantinga
20 slouken@libsdl.org
21
22 QNX Graphics Framework SDL driver
23 Copyright (C) 2009 Mike Gorchak
24 (mike@malva.ua, lestat@i.com.ua)
25 */
26
27 #ifndef __SDL_HIDDI_MOUSE_H__
28 #define __SDL_HIDDI_MOUSE_H__
29
30 #include <inttypes.h>
31
32 /* USB keyboard multimedia keys are generating this packet */
33 typedef struct mouse_packet2
34 {
35 uint8_t buttons;
36 int8_t wheel;
37 } mouse_packet2;
38
39 /* PS/2 mice are generating this packet */
40 typedef struct mouse_packet4
41 {
42 uint8_t buttons;
43 int8_t horizontal;
44 int8_t vertical;
45 int8_t wheel;
46 } mouse_packet4;
47
48 /* USB keyboard with mice wheel onboard generating this packet */
49 typedef struct mouse_packet5
50 {
51 uint8_t buttons;
52 int8_t horizontal;
53 int8_t vertical;
54 int8_t wheel;
55 uint8_t state;
56 } mouse_packet5;
57
58 /* USB multi-button mice are generating this packet */
59 typedef struct mouse_packet8
60 {
61 uint8_t buttons;
62 int8_t horizontal;
63 int8_t vertical;
64 int8_t wheel;
65 int16_t horizontal_precision;
66 int16_t vertical_precision;
67 } mouse_packet8;
68
69 #endif /* __SDL_HIDDI_MOUSE_H__ */