| 1 | /* $Id: pmkbdhkp.h,v 1.2 2001-10-23 13:56:27 achimha Exp $ */
|
|---|
| 2 | /*
|
|---|
| 3 | * Window Menu wrapper functions for OS/2
|
|---|
| 4 | *
|
|---|
| 5 | *
|
|---|
| 6 | * Copyright 2001 Patrick Haller (patrick.haller@innotek.de)
|
|---|
| 7 | *
|
|---|
| 8 | *
|
|---|
| 9 | * Copyright (C) 1999-2000 Ulrich Mller.
|
|---|
| 10 | */
|
|---|
| 11 |
|
|---|
| 12 | #ifndef __PMKBDHK_PRIVATE_H__
|
|---|
| 13 | #define __PMKBDHK_PRIVATE_H__
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 | /*
|
|---|
| 17 | * HK_PREACCEL:
|
|---|
| 18 | * additional undocumented PM hook type,
|
|---|
| 19 | * for pre-accelerator table hooks
|
|---|
| 20 | * (see xwphook.c for details);
|
|---|
| 21 | * this definition taken out of the
|
|---|
| 22 | * ProgramCommander/2 source (thanks,
|
|---|
| 23 | * Roman Stangl).
|
|---|
| 24 | */
|
|---|
| 25 |
|
|---|
| 26 | #ifndef HK_PREACCEL
|
|---|
| 27 | #define HK_PREACCEL 17
|
|---|
| 28 | #endif
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 | /*
|
|---|
| 32 | * Note: this won't interfere with any WM_USER value,
|
|---|
| 33 | * WM_PENFIRST is 0x04c0
|
|---|
| 34 | */
|
|---|
| 35 | #ifndef WM_CHAR_SPECIAL
|
|---|
| 36 | #define WM_CHAR_SPECIAL 0x04bf
|
|---|
| 37 | #endif
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 | /*
|
|---|
| 41 | * These definitions come from user32\pmframe.h.
|
|---|
| 42 | * They're repeated here to avoid header conflicts
|
|---|
| 43 | * with the USER32 module
|
|---|
| 44 | */
|
|---|
| 45 |
|
|---|
| 46 | #ifndef WIN32_STDCLASS
|
|---|
| 47 | #define WIN32_STDCLASS "Win32WindowClass"
|
|---|
| 48 | #endif
|
|---|
| 49 |
|
|---|
| 50 | #ifndef WIN32_STDFRAMECLASS
|
|---|
| 51 | #define WIN32_STDFRAMECLASS "Win32FrameClass"
|
|---|
| 52 | #endif
|
|---|
| 53 |
|
|---|
| 54 | /* ******************************************************************
|
|---|
| 55 | * *
|
|---|
| 56 | * Structures *
|
|---|
| 57 | * *
|
|---|
| 58 | ********************************************************************/
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 | /*
|
|---|
| 62 | *@@ HOOKDATA:
|
|---|
| 63 | * global hook data structure. Only one instance
|
|---|
| 64 | * of this is in the shared data segment of
|
|---|
| 65 | * XWPHOOK.DLL, and a pointer to that structure
|
|---|
| 66 | * is returned to the daemon which initially loads
|
|---|
| 67 | * that DLL by hookInit and then stored by the
|
|---|
| 68 | * daemon. As a result, this structure is shared
|
|---|
| 69 | * between the hook and the daemon, and both can
|
|---|
| 70 | * access it at any time.
|
|---|
| 71 | *
|
|---|
| 72 | * This is statically initialized to 0 when the hook
|
|---|
| 73 | * DLL is loaded. hookInit will then set up most
|
|---|
| 74 | * fields in here.
|
|---|
| 75 | *
|
|---|
| 76 | * This contains setup data (the state of the
|
|---|
| 77 | * hook), some data which needs to be cached,
|
|---|
| 78 | * as well as the HOOKCONFIG structure which
|
|---|
| 79 | * is used to configure the hook and the daemon.
|
|---|
| 80 | * That sub-structure gets (re)loaded from OS2.INI
|
|---|
| 81 | * upon daemon startup and when XDM_HOOKCONFIG is
|
|---|
| 82 | * received by fnwpDaemonObject.
|
|---|
| 83 | */
|
|---|
| 84 |
|
|---|
| 85 | typedef struct _HOOKDATA
|
|---|
| 86 | {
|
|---|
| 87 | BOOL fPreAccelHooked; // pre-accelerator table hook installed?
|
|---|
| 88 |
|
|---|
| 89 | HAB habDaemonObject;
|
|---|
| 90 | // anchor block of hwndDaemonObject; cached for speed
|
|---|
| 91 |
|
|---|
| 92 | HMODULE hmodDLL;
|
|---|
| 93 | // XWPHOOK.DLL module handle
|
|---|
| 94 |
|
|---|
| 95 | HWND hwndPMDesktop;
|
|---|
| 96 | // desktop window handle (WinQueryDesktopWindow)
|
|---|
| 97 |
|
|---|
| 98 | HWND hwndWindowList;
|
|---|
| 99 | // window list handle
|
|---|
| 100 |
|
|---|
| 101 | ULONG pidPM;
|
|---|
| 102 | // process ID of first PMSHELL.EXE V0.9.7 (2001-01-21) [umoeller]
|
|---|
| 103 |
|
|---|
| 104 | // HWND hwndLockupFrame;
|
|---|
| 105 | // current lockup window, if any
|
|---|
| 106 | } HOOKDATA, *PHOOKDATA;
|
|---|
| 107 |
|
|---|
| 108 |
|
|---|
| 109 | /* ******************************************************************
|
|---|
| 110 | *
|
|---|
| 111 | * Hook DLL prototypes
|
|---|
| 112 | *
|
|---|
| 113 | ********************************************************************/
|
|---|
| 114 |
|
|---|
| 115 | PHOOKDATA EXPENTRY hookInit(HWND hwndDaemonObject);
|
|---|
| 116 |
|
|---|
| 117 | BOOL EXPENTRY hookKill(VOID);
|
|---|
| 118 |
|
|---|
| 119 | /* ******************************************************************
|
|---|
| 120 | *
|
|---|
| 121 | * Internal prototypes
|
|---|
| 122 | *
|
|---|
| 123 | ********************************************************************/
|
|---|
| 124 |
|
|---|
| 125 | extern HOOKDATA G_HookData;
|
|---|
| 126 |
|
|---|
| 127 | #endif //__PMKBDHK_PRIVATE_H__
|
|---|