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