os/boardsupport/emulator/emulatorbsp/specific/multitouchwindowsheader.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// wins\specific\multitouchwindowsheader.h
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
/** 
sl@0
    18
 * This header file includes some Windows API declarations
sl@0
    19
 */
sl@0
    20
#ifndef MULTITOUCHWINDOWSHEADER_H
sl@0
    21
#define MULTITOUCHWINDOWSHEADER_H
sl@0
    22
sl@0
    23
#pragma warning(disable:4201) // ignore the anonymous struct warning in this file
sl@0
    24
#define _ANONYMOUS_UNION
sl@0
    25
#define _ANONYMOUS_STRUCT
sl@0
    26
sl@0
    27
#undef WM_MOUSEWHEEL
sl@0
    28
#define WM_MOUSEWHEEL 0x020A
sl@0
    29
sl@0
    30
#define RID_INPUT  0x10000003
sl@0
    31
#define RID_HEADER 0x10000005
sl@0
    32
#define RIDEV_REMOVE       0x00000001
sl@0
    33
#define RIDEV_PAGEONLY     0x00000020
sl@0
    34
#define RIDEV_NOLEGACY     0x00000030
sl@0
    35
#define MOUSE_MOVE_ABSOLUTE      0x00000001
sl@0
    36
#define RI_MOUSE_LEFT_BUTTON_DOWN   0x0001
sl@0
    37
#define RI_MOUSE_LEFT_BUTTON_UP     0x0002
sl@0
    38
#define RI_MOUSE_RIGHT_BUTTON_DOWN  0x0004
sl@0
    39
#define RI_MOUSE_RIGHT_BUTTON_UP    0x0008
sl@0
    40
#define RI_MOUSE_WHEEL              0x0400
sl@0
    41
#define RIM_TYPEMOUSE    0x00000000
sl@0
    42
sl@0
    43
DECLARE_HANDLE(HRAWINPUT);
sl@0
    44
typedef struct tagRAWINPUTHEADER {
sl@0
    45
	DWORD dwType;
sl@0
    46
	DWORD dwSize;
sl@0
    47
	HANDLE hDevice;
sl@0
    48
	WPARAM wParam;
sl@0
    49
} RAWINPUTHEADER,*PRAWINPUTHEADER;
sl@0
    50
sl@0
    51
typedef struct tagRAWMOUSE {
sl@0
    52
	USHORT usFlags;
sl@0
    53
	_ANONYMOUS_UNION union {
sl@0
    54
		ULONG ulButtons;
sl@0
    55
		_ANONYMOUS_STRUCT struct {
sl@0
    56
			USHORT usButtonFlags;
sl@0
    57
			USHORT usButtonData;
sl@0
    58
		};
sl@0
    59
	};
sl@0
    60
	ULONG ulRawButtons;
sl@0
    61
	LONG lLastX;
sl@0
    62
	LONG lLastY;
sl@0
    63
	ULONG ulExtraInformation;
sl@0
    64
} RAWMOUSE,*PRAWMOUSE,*LPRAWMOUSE;
sl@0
    65
sl@0
    66
typedef struct tagRAWKEYBOARD {
sl@0
    67
	USHORT MakeCode;
sl@0
    68
	USHORT Flags;
sl@0
    69
	USHORT Reserved;
sl@0
    70
	USHORT VKey;
sl@0
    71
	UINT Message;
sl@0
    72
	ULONG ExtraInformation;
sl@0
    73
} RAWKEYBOARD,*PRAWKEYBOARD,*LPRAWKEYBOARD;
sl@0
    74
sl@0
    75
typedef struct tagRAWHID {
sl@0
    76
	DWORD dwSizeHid;
sl@0
    77
	DWORD dwCount;
sl@0
    78
	BYTE bRawData;
sl@0
    79
} RAWHID,*PRAWHID,*LPRAWHID;
sl@0
    80
sl@0
    81
typedef struct tagRAWINPUT {
sl@0
    82
	RAWINPUTHEADER header;
sl@0
    83
	union {
sl@0
    84
		RAWMOUSE    mouse;
sl@0
    85
		RAWKEYBOARD keyboard;
sl@0
    86
		RAWHID      hid;
sl@0
    87
	} data;
sl@0
    88
} RAWINPUT,*PRAWINPUT,*LPRAWINPUT;
sl@0
    89
sl@0
    90
typedef struct tagRAWINPUTDEVICE {
sl@0
    91
	USHORT usUsagePage;
sl@0
    92
	USHORT usUsage;
sl@0
    93
	DWORD dwFlags;
sl@0
    94
	HWND hwndTarget;
sl@0
    95
} RAWINPUTDEVICE,*PRAWINPUTDEVICE,*LPRAWINPUTDEVICE;
sl@0
    96
sl@0
    97
typedef const RAWINPUTDEVICE *PCRAWINPUTDEVICE;
sl@0
    98
sl@0
    99
typedef struct tagRAWINPUTDEVICELIST {
sl@0
   100
	HANDLE hDevice;
sl@0
   101
	DWORD dwType;
sl@0
   102
} RAWINPUTDEVICELIST,*PRAWINPUTDEVICELIST;
sl@0
   103
sl@0
   104
typedef WINUSERAPI BOOL (WINAPI *TYPEOF_RegisterRawInputDevices)(PCRAWINPUTDEVICE,UINT,UINT);
sl@0
   105
typedef WINUSERAPI UINT (WINAPI *TYPEOF_GetRawInputData)(HRAWINPUT,UINT,LPVOID,PUINT,UINT);
sl@0
   106
typedef WINUSERAPI UINT (WINAPI *TYPEOF_GetRawInputDeviceList)(PRAWINPUTDEVICELIST,PUINT,UINT);
sl@0
   107
sl@0
   108
#endif