os/boardsupport/emulator/emulatorbsp/specific/multitouchwindowsheader.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/boardsupport/emulator/emulatorbsp/specific/multitouchwindowsheader.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,108 @@
     1.4 +// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// wins\specific\multitouchwindowsheader.h
    1.18 +// 
    1.19 +//
    1.20 +/** 
    1.21 + * This header file includes some Windows API declarations
    1.22 + */
    1.23 +#ifndef MULTITOUCHWINDOWSHEADER_H
    1.24 +#define MULTITOUCHWINDOWSHEADER_H
    1.25 +
    1.26 +#pragma warning(disable:4201) // ignore the anonymous struct warning in this file
    1.27 +#define _ANONYMOUS_UNION
    1.28 +#define _ANONYMOUS_STRUCT
    1.29 +
    1.30 +#undef WM_MOUSEWHEEL
    1.31 +#define WM_MOUSEWHEEL 0x020A
    1.32 +
    1.33 +#define RID_INPUT  0x10000003
    1.34 +#define RID_HEADER 0x10000005
    1.35 +#define RIDEV_REMOVE       0x00000001
    1.36 +#define RIDEV_PAGEONLY     0x00000020
    1.37 +#define RIDEV_NOLEGACY     0x00000030
    1.38 +#define MOUSE_MOVE_ABSOLUTE      0x00000001
    1.39 +#define RI_MOUSE_LEFT_BUTTON_DOWN   0x0001
    1.40 +#define RI_MOUSE_LEFT_BUTTON_UP     0x0002
    1.41 +#define RI_MOUSE_RIGHT_BUTTON_DOWN  0x0004
    1.42 +#define RI_MOUSE_RIGHT_BUTTON_UP    0x0008
    1.43 +#define RI_MOUSE_WHEEL              0x0400
    1.44 +#define RIM_TYPEMOUSE    0x00000000
    1.45 +
    1.46 +DECLARE_HANDLE(HRAWINPUT);
    1.47 +typedef struct tagRAWINPUTHEADER {
    1.48 +	DWORD dwType;
    1.49 +	DWORD dwSize;
    1.50 +	HANDLE hDevice;
    1.51 +	WPARAM wParam;
    1.52 +} RAWINPUTHEADER,*PRAWINPUTHEADER;
    1.53 +
    1.54 +typedef struct tagRAWMOUSE {
    1.55 +	USHORT usFlags;
    1.56 +	_ANONYMOUS_UNION union {
    1.57 +		ULONG ulButtons;
    1.58 +		_ANONYMOUS_STRUCT struct {
    1.59 +			USHORT usButtonFlags;
    1.60 +			USHORT usButtonData;
    1.61 +		};
    1.62 +	};
    1.63 +	ULONG ulRawButtons;
    1.64 +	LONG lLastX;
    1.65 +	LONG lLastY;
    1.66 +	ULONG ulExtraInformation;
    1.67 +} RAWMOUSE,*PRAWMOUSE,*LPRAWMOUSE;
    1.68 +
    1.69 +typedef struct tagRAWKEYBOARD {
    1.70 +	USHORT MakeCode;
    1.71 +	USHORT Flags;
    1.72 +	USHORT Reserved;
    1.73 +	USHORT VKey;
    1.74 +	UINT Message;
    1.75 +	ULONG ExtraInformation;
    1.76 +} RAWKEYBOARD,*PRAWKEYBOARD,*LPRAWKEYBOARD;
    1.77 +
    1.78 +typedef struct tagRAWHID {
    1.79 +	DWORD dwSizeHid;
    1.80 +	DWORD dwCount;
    1.81 +	BYTE bRawData;
    1.82 +} RAWHID,*PRAWHID,*LPRAWHID;
    1.83 +
    1.84 +typedef struct tagRAWINPUT {
    1.85 +	RAWINPUTHEADER header;
    1.86 +	union {
    1.87 +		RAWMOUSE    mouse;
    1.88 +		RAWKEYBOARD keyboard;
    1.89 +		RAWHID      hid;
    1.90 +	} data;
    1.91 +} RAWINPUT,*PRAWINPUT,*LPRAWINPUT;
    1.92 +
    1.93 +typedef struct tagRAWINPUTDEVICE {
    1.94 +	USHORT usUsagePage;
    1.95 +	USHORT usUsage;
    1.96 +	DWORD dwFlags;
    1.97 +	HWND hwndTarget;
    1.98 +} RAWINPUTDEVICE,*PRAWINPUTDEVICE,*LPRAWINPUTDEVICE;
    1.99 +
   1.100 +typedef const RAWINPUTDEVICE *PCRAWINPUTDEVICE;
   1.101 +
   1.102 +typedef struct tagRAWINPUTDEVICELIST {
   1.103 +	HANDLE hDevice;
   1.104 +	DWORD dwType;
   1.105 +} RAWINPUTDEVICELIST,*PRAWINPUTDEVICELIST;
   1.106 +
   1.107 +typedef WINUSERAPI BOOL (WINAPI *TYPEOF_RegisterRawInputDevices)(PCRAWINPUTDEVICE,UINT,UINT);
   1.108 +typedef WINUSERAPI UINT (WINAPI *TYPEOF_GetRawInputData)(HRAWINPUT,UINT,LPVOID,PUINT,UINT);
   1.109 +typedef WINUSERAPI UINT (WINAPI *TYPEOF_GetRawInputDeviceList)(PRAWINPUTDEVICELIST,PUINT,UINT);
   1.110 +
   1.111 +#endif