summaryrefslogtreecommitdiffstats
path: root/winsup/w32api/include/winable.h
diff options
context:
space:
mode:
authorDimitri Papadopoulos <dimitri_at@users.sf.net>2003-09-26 14:46:33 +0000
committerDimitri Papadopoulos <dimitri_at@users.sf.net>2003-09-26 14:46:33 +0000
commit349a6402fe566a06f18ee2a1e2d412b8b8d9d304 (patch)
treee5d4c7a679194b7409a8c731b71aebd3e936c9e2 /winsup/w32api/include/winable.h
parentb6c1b88ad4ba53e6a96ff6665f0c49659ec61aee (diff)
downloadcygnal-349a6402fe566a06f18ee2a1e2d412b8b8d9d304.tar.gz
cygnal-349a6402fe566a06f18ee2a1e2d412b8b8d9d304.tar.bz2
cygnal-349a6402fe566a06f18ee2a1e2d412b8b8d9d304.zip
* include/winable.h (BlockInput): Add function.
* include/winable.h (WS_ACTIVECAPTION): Add constant. For use with WINDOWINFO structure. * include/winuser.h [_WIN32_WINNT >= 0x0500] (LockWorkStation): Add function. * include/winuser.h [_WIN32_WINNT >= 0x0501] (IsWinEventHookInstalled): Add function. * include/winuser.h [WINVER >= 0x0500] (UnhookWinEvent): Add function... * include/winable.h [WINVER < 0x0500] (UnhookWinEvent): ...and duplicate. * include/winuser.h [_WIN32_WINNT >= 0x0403] (SendInput): Guard function... * include/winable.h [_WIN32_WINNT < 0x0403] (SendInput): ...and duplicate. * include/winuser.h [WINVER >= 0x0500] (NotifyWinEvent): Guard function... * include/winable.h [WINVER < 0x0500] (NotifyWinEvent): ...and duplicate. * include/winuser.h [WINVER >= 0x0500] (MOUSEINPUT, KEYBDINPUT, HARDWAREINPUT, INPUT): Guard structures... * include/winable.h [WINVER < 0x0500] (MOUSEINPUT, KEYBDINPUT, HARDWAREINPUT, INPUT): ...and duplicate. * include/winuser.h [_WIN32_WINNT >= 0x0403] (INPUT_MOUSE, INPUT_KEYBOARD, INPUT_HARDWARE): Guard constants... * include/winable.h [_WIN32_WINNT < 0x0403] (INPUT_MOUSE, INPUT_KEYBOARD, INPUT_HARDWARE): ...and duplicate. * include/winuser.h: Move around some lines. Reformat according to recommended or dominant style. Remove FAR keyword. * include/winable.h: Move around some lines. * lib/user32.def (BlockInput, IsWinEventHookInstalled, LockWorkStation, UnhookWinEvent): Add functions.
Diffstat (limited to 'winsup/w32api/include/winable.h')
-rw-r--r--winsup/w32api/include/winable.h59
1 files changed, 50 insertions, 9 deletions
diff --git a/winsup/w32api/include/winable.h b/winsup/w32api/include/winable.h
index aa33511fd..022829353 100644
--- a/winsup/w32api/include/winable.h
+++ b/winsup/w32api/include/winable.h
@@ -8,12 +8,12 @@
extern "C" {
#endif
-#if (WINVER < 0x0500)
#if (_WIN32_WINNT < 0x0403)
-#define INPUT_MOUSE 0
-#define INPUT_KEYBOARD 1
-#define INPUT_HARDWARE 2
+#define INPUT_MOUSE 0x00000000
+#define INPUT_KEYBOARD 0x00000001
+#define INPUT_HARDWARE 0x00000002
#endif /* (_WIN32_WINNT < 0x04030) */
+#if (WINVER < 0x0500)
#define CHILDID_SELF 0
#define OBJID_WINDOW 0x00000000
#define OBJID_SYSMENU 0xFFFFFFFF
@@ -32,10 +32,43 @@ extern "C" {
#define GUI_INMENUMODE 0x00000004
#define GUI_SYSTEMMENUMODE 0x00000008
#define GUI_POPUPMENUMODE 0x00000010
-#define WINEVENT_OUTOFCONTEXT 0x0000
-#define WINEVENT_SKIPOWNTHREAD 0x0001
+#define WINEVENT_OUTOFCONTEXT 0x0000
+#define WINEVENT_SKIPOWNTHREAD 0x0001
#define WINEVENT_SKIPOWNPROCESS 0x0002
-#define WINEVENT_INCONTEXT 0x0004
+#define WINEVENT_INCONTEXT 0x0004
+#endif /* (WINVER < 0x0500) */
+#if (_WIN32_WINNT < 0x0403)
+typedef struct tagMOUSEINPUT {
+ LONG dx;
+ LONG dy;
+ DWORD mouseData;
+ DWORD dwFlags;
+ DWORD time;
+ ULONG_PTR dwExtraInfo;
+} MOUSEINPUT,*PMOUSEINPUT;
+typedef struct tagKEYBDINPUT {
+ WORD wVk;
+ WORD wScan;
+ DWORD dwFlags;
+ DWORD time;
+ ULONG_PTR dwExtraInfo;
+} KEYBDINPUT,*PKEYBDINPUT;
+typedef struct tagHARDWAREINPUT {
+ DWORD uMsg;
+ WORD wParamL;
+ WORD wParamH;
+} HARDWAREINPUT,*PHARDWAREINPUT;
+typedef struct tagINPUT {
+ DWORD type;
+ _ANONYMOUS_UNION union {
+ MOUSEINPUT mi;
+ KEYBDINPUT ki;
+ HARDWAREINPUT hi;
+ } DUMMYUNIONNAME;
+} INPUT,*PINPUT,*LPINPUT;
+#endif /* (_WIN32_WINNT < 0x0403) */
+#if (WINVER < 0x0500)
+typedef VOID (*WINEVENTPROC)(HWINEVENTHOOK,DWORD,HWND,LONG,LONG,DWORD,DWORD);
typedef struct tagGUITHREADINFO {
DWORD cbSize;
DWORD flags;
@@ -47,12 +80,20 @@ typedef struct tagGUITHREADINFO {
HWND hwndCaret;
RECT rcCaret;
} GUITHREADINFO,*PGUITHREADINFO,*LPGUITHREADINFO;
-typedef VOID (*WINEVENTPROC)(HWINEVENTHOOK,DWORD,HWND,LONG,LONG,DWORD,DWORD);
+#endif /* (WINVER < 0x0500) */
+
+BOOL WINAPI BlockInput(BOOL);
+#if (_WIN32_WINNT < 0x0403)
+UINT WINAPI SendInput(UINT,LPINPUT,int);
+#endif
+#if (WINVER < 0x0500)
BOOL WINAPI GetGUIThreadInfo(DWORD,LPGUITHREADINFO);
+void WINAPI NotifyWinEvent(DWORD,HWND,LONG,LONG);
HWINEVENTHOOK WINAPI SetWinEventHook(UINT,UINT,HMODULE,WINEVENTPROC,DWORD,DWORD,UINT);
+BOOL WINAPI UnhookWinEvent(HWINEVENTHOOK);
#endif /* (WINVER < 0x0500) */
#ifdef __cplusplus
}
#endif
-#endif /* _WINABLE_H */
+#endif