Debian Codegraph @

unikey/keycons.h

raw
1 /*
2 * SPDX-FileCopyrightText: 1998-2004 Pham Kim Long <[email protected]>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 #ifndef __KEY_CONS_H
7 #define __KEY_CONS_H
8
9 // macro table constants
10 #define MAX_MACRO_KEY_LEN 16
11 // #define MAX_MACRO_TEXT_LEN 256
12 #define MAX_MACRO_TEXT_LEN 1024
13 #define MAX_MACRO_ITEMS 1024
14 #define MAX_MACRO_LINE (MAX_MACRO_TEXT_LEN + MAX_MACRO_KEY_LEN)
15
16 #define MACRO_MEM_SIZE (1024 * 128) // 128 KB
17
18 #define CP_US_ANSI 1252
19
20 enum UkInputMethod {
21 UkTelex,
22 UkVni,
23 UkViqr,
24 UkMsVi,
25 UkUsrIM,
26 UkSimpleTelex,
27 UkSimpleTelex2
28 };
29
30 struct UnikeyOptions {
31 int freeMarking;
32 int modernStyle;
33 int macroEnabled;
34 int useUnicodeClipboard;
35 int alwaysMacro;
36 int strictSpellCheck;
37 int useIME; // for Win32 only
38 int spellCheckEnabled;
39 int autoNonVnRestore;
40 };
41
42 #define UKOPT_FLAG_ALL 0xFFFFFFFF
43 #define UKOPT_FLAG_FREE_STYLE 0x00000001
44 // #define UKOPT_FLAG_MANUAL_TONE 0x00000002
45 #define UKOPT_FLAG_MODERN 0x00000004
46 #define UKOPT_FLAG_MACRO_ENABLED 0x00000008
47 #define UKOPT_FLAG_USE_CLIPBOARD 0x00000010
48 #define UKOPT_FLAG_ALWAYS_MACRO 0x00000020
49 #define UKOPT_FLAG_STRICT_SPELL 0x00000040
50 #define UKOPT_FLAG_USE_IME 0x00000080
51 #define UKOPT_FLAG_SPELLCHECK_ENABLED 0x00000100
52
53 #if defined(WIN32)
54 typedef struct _UnikeySysInfo UnikeySysInfo;
55 struct _UnikeySysInfo {
56 int switchKey;
57 HHOOK keyHook;
58 HHOOK mouseHook;
59 HWND hMainDlg;
60 UINT iconMsgId;
61 HICON hVietIcon, hEnIcon;
62 int unicodePlatform;
63 DWORD winMajorVersion, winMinorVersion;
64 };
65 #endif
66
67 typedef enum { UkCharOutput, UkKeyOutput } UkOutputType;
68
69 #endif