1 #ifndef _WINABLE_H 2 #define _WINABLE_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 #if (_WIN32_WINNT < 0x0403) 9 #define INPUT_MOUSE 0x00000000 10 #define INPUT_KEYBOARD 0x00000001 11 #define INPUT_HARDWARE 0x00000002 12 #endif /* (_WIN32_WINNT < 0x04030) */ 13 #if (WINVER < 0x0500) 14 #define CHILDID_SELF 0 15 #define OBJID_WINDOW 0x00000000 16 #define OBJID_SYSMENU 0xFFFFFFFF 17 #define OBJID_TITLEBAR 0xFFFFFFFE 18 #define OBJID_MENU 0xFFFFFFFD 19 #define OBJID_CLIENT 0xFFFFFFFC 20 #define OBJID_VSCROLL 0xFFFFFFFB 21 #define OBJID_HSCROLL 0xFFFFFFFA 22 #define OBJID_SIZEGRIP 0xFFFFFFF9 23 #define OBJID_CARET 0xFFFFFFF8 24 #define OBJID_CURSOR 0xFFFFFFF7 25 #define OBJID_ALERT 0xFFFFFFF6 26 #define OBJID_SOUND 0xFFFFFFF5 27 #define GUI_CARETBLINKING 0x00000001 28 #define GUI_INMOVESIZE 0x00000002 29 #define GUI_INMENUMODE 0x00000004 30 #define GUI_SYSTEMMENUMODE 0x00000008 31 #define GUI_POPUPMENUMODE 0x00000010 32 #define WINEVENT_OUTOFCONTEXT 0x0000 33 #define WINEVENT_SKIPOWNTHREAD 0x0001 34 #define WINEVENT_SKIPOWNPROCESS 0x0002 35 #define WINEVENT_INCONTEXT 0x0004 36 #endif /* (WINVER < 0x0500) */ 37 #if (_WIN32_WINNT < 0x0403) 38 typedef struct tagMOUSEINPUT { 39 LONG dx; 40 LONG dy; 41 DWORD mouseData; 42 DWORD dwFlags; 43 DWORD time; 44 ULONG_PTR dwExtraInfo; 45 } MOUSEINPUT,*PMOUSEINPUT; 46 typedef struct tagKEYBDINPUT { 47 WORD wVk; 48 WORD wScan; 49 DWORD dwFlags; 50 DWORD time; 51 ULONG_PTR dwExtraInfo; 52 } KEYBDINPUT,*PKEYBDINPUT; 53 typedef struct tagHARDWAREINPUT { 54 DWORD uMsg; 55 WORD wParamL; 56 WORD wParamH; 57 } HARDWAREINPUT,*PHARDWAREINPUT; 58 typedef struct tagINPUT { 59 DWORD type; 60 _ANONYMOUS_UNION union { 61 MOUSEINPUT mi; 62 KEYBDINPUT ki; 63 HARDWAREINPUT hi; 64 } DUMMYUNIONNAME; 65 } INPUT,*PINPUT,*LPINPUT; 66 #endif /* (_WIN32_WINNT < 0x0403) */ 67 #if (WINVER < 0x0500) 68 typedef VOID (CALLBACK* WINEVENTPROC)(HWINEVENTHOOK,DWORD,HWND,LONG,LONG,DWORD,DWORD); 69 typedef struct tagGUITHREADINFO { 70 DWORD cbSize; 71 DWORD flags; 72 HWND hwndActive; 73 HWND hwndFocus; 74 HWND hwndCapture; 75 HWND hwndMenuOwner; 76 HWND hwndMoveSize; 77 HWND hwndCaret; 78 RECT rcCaret; 79 } GUITHREADINFO,*PGUITHREADINFO,*LPGUITHREADINFO; 80 #endif /* (WINVER < 0x0500) */ 81 82 BOOL WINAPI BlockInput(BOOL); 83 #if (_WIN32_WINNT < 0x0403) 84 UINT WINAPI SendInput(UINT,LPINPUT,int); 85 #endif 86 #if (WINVER < 0x0500) 87 BOOL WINAPI GetGUIThreadInfo(DWORD,LPGUITHREADINFO); 88 void WINAPI NotifyWinEvent(DWORD,HWND,LONG,LONG); 89 HWINEVENTHOOK WINAPI SetWinEventHook(UINT,UINT,HMODULE,WINEVENTPROC,DWORD,DWORD,UINT); 90 BOOL WINAPI UnhookWinEvent(HWINEVENTHOOK); 91 #endif /* (WINVER < 0x0500) */ 92 93 #ifdef __cplusplus 94 } 95 #endif 96 #endif 97