| 1 |
// -*- coding:unix; mode:c++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*- |
| 2 |
/*------------------------------------------------------------------------------ |
| 3 |
UniKey - Open-source Vietnamese Keyboard |
| 4 |
Copyright (C) 1998-2004 Pham Kim Long |
| 5 |
Contact: |
| 6 |
[email protected] |
| 7 |
http://unikey.org |
| 8 |
|
| 9 |
This program is free software; you can redistribute it and/or |
| 10 |
modify it under the terms of the GNU General Public License |
| 11 |
as published by the Free Software Foundation; either version 2 |
| 12 |
of the License, or (at your option) any later version. |
| 13 |
|
| 14 |
This program is distributed in the hope that it will be useful, |
| 15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 |
GNU General Public License for more details. |
| 18 |
|
| 19 |
You should have received a copy of the GNU General Public License |
| 20 |
along with this program; if not, write to the Free Software |
| 21 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. |
| 22 |
--------------------------------------------------------------------------------*/ |
| 23 |
#ifndef __KEY_CONS_H |
| 24 |
#define __KEY_CONS_H |
| 25 |
|
| 26 |
// macro table constants |
| 27 |
#define MAX_MACRO_KEY_LEN 16 |
| 28 |
//#define MAX_MACRO_TEXT_LEN 256 |
| 29 |
#define MAX_MACRO_TEXT_LEN 1024 |
| 30 |
#define MAX_MACRO_ITEMS 1024 |
| 31 |
#define MAX_MACRO_LINE (MAX_MACRO_TEXT_LEN + MAX_MACRO_KEY_LEN) |
| 32 |
|
| 33 |
#define MACRO_MEM_SIZE (1024*128) //128 KB |
| 34 |
|
| 35 |
#define CP_US_ANSI 1252 |
| 36 |
|
| 37 |
typedef enum {UkTelex, UkVni, UkViqr, UkMsVi, UkUsrIM, UkSimpleTelex, UkSimpleTelex2} UkInputMethod; |
| 38 |
typedef struct _UnikeyOptions UnikeyOptions; |
| 39 |
|
| 40 |
struct _UnikeyOptions |
| 41 |
{ |
| 42 |
int freeMarking; |
| 43 |
int modernStyle; |
| 44 |
int macroEnabled; |
| 45 |
int useUnicodeClipboard; |
| 46 |
int alwaysMacro; |
| 47 |
int strictSpellCheck; |
| 48 |
int useIME; //for Win32 only |
| 49 |
int spellCheckEnabled; |
| 50 |
int autoNonVnRestore; |
| 51 |
}; |
| 52 |
|
| 53 |
#define UKOPT_FLAG_ALL 0xFFFFFFFF |
| 54 |
#define UKOPT_FLAG_FREE_STYLE 0x00000001 |
| 55 |
//#define UKOPT_FLAG_MANUAL_TONE 0x00000002 |
| 56 |
#define UKOPT_FLAG_MODERN 0x00000004 |
| 57 |
#define UKOPT_FLAG_MACRO_ENABLED 0x00000008 |
| 58 |
#define UKOPT_FLAG_USE_CLIPBOARD 0x00000010 |
| 59 |
#define UKOPT_FLAG_ALWAYS_MACRO 0x00000020 |
| 60 |
#define UKOPT_FLAG_STRICT_SPELL 0x00000040 |
| 61 |
#define UKOPT_FLAG_USE_IME 0x00000080 |
| 62 |
#define UKOPT_FLAG_SPELLCHECK_ENABLED 0x00000100 |
| 63 |
|
| 64 |
#if defined(WIN32) |
| 65 |
typedef struct _UnikeySysInfo UnikeySysInfo; |
| 66 |
struct _UnikeySysInfo |
| 67 |
{ |
| 68 |
int switchKey; |
| 69 |
HHOOK keyHook; |
| 70 |
HHOOK mouseHook; |
| 71 |
HWND hMainDlg; |
| 72 |
UINT iconMsgId; |
| 73 |
HICON hVietIcon,hEnIcon; |
| 74 |
int unicodePlatform; |
| 75 |
DWORD winMajorVersion, winMinorVersion; |
| 76 |
}; |
| 77 |
#endif |
| 78 |
|
| 79 |
typedef enum {UkCharOutput, UkKeyOutput} UkOutputType; |
| 80 |
|
| 81 |
#endif |