1 #ifndef _INPUT_H 2 #define _INPUT_H 3 4 #include <stdlib.h> 5 #include <wchar.h> 6 7 #define WIN32_NO_STATUS 8 #include <windef.h> 9 #include <winbase.h> 10 #include <winnls.h> 11 #include <winreg.h> 12 #include <winuser.h> 13 #include <wingdi.h> 14 #include <commctrl.h> 15 #include <windowsx.h> 16 #include <setupapi.h> 17 #include <strsafe.h> 18 #include <cpl.h> 19 20 #include "resource.h" 21 22 typedef struct 23 { 24 int idIcon; 25 int idName; 26 int idDescription; 27 APPLET_PROC AppletProc; 28 } APPLET, *PAPPLET; 29 30 extern HINSTANCE hApplet; 31 extern BOOL g_bRebootNeeded; 32 33 // Character Count of a layout ID like "00000409" 34 #define CCH_LAYOUT_ID 8 35 36 // Maximum Character Count of a ULONG in decimal 37 #define CCH_ULONG_DEC 10 38 39 #define MAX_STR_LEN 256 40 41 /* settings_page.c */ 42 INT_PTR CALLBACK 43 SettingsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 44 BOOL EnableProcessPrivileges(LPCWSTR lpPrivilegeName, BOOL bEnable); 45 46 /* advanced_settings_page.c */ 47 INT_PTR CALLBACK 48 AdvancedSettingsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 49 50 /* add_dialog.c */ 51 INT_PTR CALLBACK 52 AddDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); 53 54 /* edit_dialog.c */ 55 INT_PTR CALLBACK 56 EditDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 57 58 /* key_settings_dialog.c */ 59 60 typedef struct 61 { 62 DWORD dwAttributes; 63 DWORD dwLanguage; 64 DWORD dwLayout; 65 } KEY_SETTINGS; 66 67 INT_PTR CALLBACK 68 KeySettingsDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 69 70 DWORD 71 ReadAttributes(VOID); 72 73 /* key_sequence_dialog.c */ 74 INT_PTR CALLBACK 75 ChangeKeySeqDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 76 77 78 static inline DWORD 79 DWORDfromString(const WCHAR *pszString) 80 { 81 WCHAR *pszEnd; 82 83 return wcstoul(pszString, &pszEnd, 16); 84 } 85 86 #define IME_MASK (0xE0000000UL) 87 #define SUBST_MASK (0xD0000000UL) 88 #define SPECIAL_MASK (0xF0000000UL) 89 90 #define IS_IME_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == IME_MASK) 91 #define IS_SPECIAL_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == SPECIAL_MASK) 92 #define SPECIALIDFROMHKL(hKL) ((WORD)(HIWORD(hKL) & 0x0FFF)) 93 94 #define IS_IME_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == IME_MASK) 95 #define IS_SUBST_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == SUBST_MASK) 96 97 VOID GetSystemLibraryPath(LPWSTR pszPath, INT cchPath, LPCWSTR pszFileName); 98 99 #endif /* _INPUT_H */ 100