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 32 // Character Count of a layout ID like "00000409" 33 #define CCH_LAYOUT_ID 8 34 35 // Maximum Character Count of a ULONG in decimal 36 #define CCH_ULONG_DEC 10 37 38 #define MAX_STR_LEN 256 39 40 /* settings_page.c */ 41 INT_PTR CALLBACK 42 SettingsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 43 44 /* advanced_settings_page.c */ 45 INT_PTR CALLBACK 46 AdvancedSettingsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 47 48 /* add_dialog.c */ 49 INT_PTR CALLBACK 50 AddDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); 51 52 /* edit_dialog.c */ 53 INT_PTR CALLBACK 54 EditDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 55 56 /* key_settings_dialog.c */ 57 58 typedef struct 59 { 60 DWORD dwAttributes; 61 DWORD dwLanguage; 62 DWORD dwLayout; 63 } KEY_SETTINGS; 64 65 INT_PTR CALLBACK 66 KeySettingsDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 67 68 DWORD 69 ReadAttributes(VOID); 70 71 /* key_sequence_dialog.c */ 72 INT_PTR CALLBACK 73 ChangeKeySeqDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 74 75 76 static inline DWORD 77 DWORDfromString(const WCHAR *pszString) 78 { 79 WCHAR *pszEnd; 80 81 return wcstoul(pszString, &pszEnd, 16); 82 } 83 84 #define IME_MASK (0xE0000000UL) 85 #define SUBST_MASK (0xD0000000UL) 86 #define SPECIAL_MASK (0xF0000000UL) 87 88 #define IS_IME_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == IME_MASK) 89 #define IS_SPECIAL_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == SPECIAL_MASK) 90 #define SPECIALIDFROMHKL(hKL) ((WORD)(HIWORD(hKL) & 0x0FFF)) 91 92 #define IS_IME_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == IME_MASK) 93 #define IS_SUBST_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == SUBST_MASK) 94 95 VOID GetSystemLibraryPath(LPWSTR pszPath, INT cchPath, LPCWSTR pszFileName); 96 97 #endif /* _INPUT_H */ 98