📄 msime.pas
字号:
IFED_UCT_USER_DEFINED,
IFED_UCT_MAX
);
PIMEUCT = ^IMEUCT;
// WoRD found in a dictionary
_IMEWRD = packed record
pwchReading: PWideChar;
pwchDisplay: PWideChar;
ulPos: Longword;
//nPos1, nPos2: Word;
rgulAttrs: array[0..1] of Longword; //attributes
cbComment: Integer; //size of user comment
uct: IMEUCT; //type of user comment
pvComment: Pointer; //user comment
end;
IMEWRD = _IMEWRD;
PIMEWRD = ^IMEWRD;
const
POS_UNDEFINED = 0;
JPOS_MEISHI_FUTSU = 100;
JPOS_MEISHI_SAHEN = 101;
JPOS_MEISHI_ZAHEN = 102;
JPOS_MEISHI_KEIYOUDOUSHI = 103;
JPOS_HUKUSIMEISHI = 104;
JPOS_MEISA_KEIDOU = 105;
JPOS_JINMEI = 106;
JPOS_JINMEI_SEI = 107;
JPOS_JINMEI_MEI = 108;
JPOS_CHIMEI = 109;
JPOS_CHIMEI_KUNI = 110;
JPOS_CHIMEI_KEN = 111;
JPOS_CHIMEI_GUN = 112;
JPOS_CHIMEI_KU = 113;
JPOS_CHIMEI_SHI = 114;
JPOS_CHIMEI_MACHI = 115;
JPOS_CHIMEI_MURA = 116;
JPOS_CHIMEI_EKI = 117;
JPOS_SONOTA = 118;
JPOS_SHAMEI = 119;
JPOS_SOSHIKI = 120;
JPOS_KENCHIKU = 121;
JPOS_BUPPIN = 122;
JPOS_DAIMEISHI = 123;
JPOS_DAIMEISHI_NINSHOU = 124;
JPOS_DAIMEISHI_SHIJI = 125;
JPOS_KAZU = 126;
JPOS_KAZU_SURYOU = 127;
JPOS_KAZU_SUSHI = 128;
JPOS_5DAN_AWA = 200;
JPOS_5DAN_KA = 201;
JPOS_5DAN_GA = 202;
JPOS_5DAN_SA = 203;
JPOS_5DAN_TA = 204;
JPOS_5DAN_NA = 205;
JPOS_5DAN_BA = 206;
JPOS_5DAN_MA = 207;
JPOS_5DAN_RA = 208;
JPOS_5DAN_AWAUON = 209;
JPOS_5DAN_KASOKUON = 210;
JPOS_5DAN_RAHEN = 211;
JPOS_4DAN_HA = 212;
JPOS_1DAN = 213;
JPOS_TOKUSHU_KAHEN = 214;
JPOS_TOKUSHU_SAHENSURU = 215;
JPOS_TOKUSHU_SAHEN = 216;
JPOS_TOKUSHU_ZAHEN = 217;
JPOS_TOKUSHU_NAHEN = 218;
JPOS_KURU_KI = 219;
JPOS_KURU_KITA = 220;
JPOS_KURU_KITARA = 221;
JPOS_KURU_KITARI = 222;
JPOS_KURU_KITAROU = 223;
JPOS_KURU_KITE = 224;
JPOS_KURU_KUREBA = 225;
JPOS_KURU_KO = 226;
JPOS_KURU_KOI = 227;
JPOS_KURU_KOYOU = 228;
JPOS_SURU_SA = 229;
JPOS_SURU_SI = 230;
JPOS_SURU_SITA = 231;
JPOS_SURU_SITARA = 232;
JPOS_SURU_SIATRI = 233;
JPOS_SURU_SITAROU = 234;
JPOS_SURU_SITE = 235;
JPOS_SURU_SIYOU = 236;
JPOS_SURU_SUREBA = 237;
JPOS_SURU_SE = 238;
JPOS_SURU_SEYO = 239;
JPOS_KEIYOU = 300;
JPOS_KEIYOU_GARU = 301;
JPOS_KEIYOU_GE = 302;
JPOS_KEIYOU_ME = 303;
JPOS_KEIYOU_YUU = 304;
JPOS_KEIYOU_U = 305;
JPOS_KEIDOU = 400;
JPOS_KEIDOU_NO = 401;
JPOS_KEIDOU_TARU = 402;
JPOS_KEIDOU_GARU = 403;
JPOS_FUKUSHI = 500;
JPOS_FUKUSHI_SAHEN = 501;
JPOS_FUKUSHI_NI = 502;
JPOS_FUKUSHI_NANO = 503;
JPOS_FUKUSHI_DA = 504;
JPOS_FUKUSHI_TO = 505;
JPOS_FUKUSHI_TOSURU = 506;
JPOS_RENTAISHI = 600;
JPOS_RENTAISHI_SHIJI = 601;
JPOS_SETSUZOKUSHI = 650;
JPOS_KANDOUSHI = 670;
JPOS_SETTOU = 700;
JPOS_SETTOU_KAKU = 701;
JPOS_SETTOU_SAI = 702;
JPOS_SETTOU_FUKU = 703;
JPOS_SETTOU_MI = 704;
JPOS_SETTOU_DAISHOU = 705;
JPOS_SETTOU_KOUTEI = 706;
JPOS_SETTOU_CHOUTAN = 707;
JPOS_SETTOU_SHINKYU = 708;
JPOS_SETTOU_JINMEI = 709;
JPOS_SETTOU_CHIMEI = 710;
JPOS_SETTOU_SONOTA = 711;
JPOS_SETTOU_JOSUSHI = 712;
JPOS_SETTOU_TEINEI_O = 713;
JPOS_SETTOU_TEINEI_GO = 714;
JPOS_SETTOU_TEINEI_ON = 715;
JPOS_SETSUBI = 800;
JPOS_SETSUBI_TEKI = 801;
JPOS_SETSUBI_SEI = 802;
JPOS_SETSUBI_KA = 803;
JPOS_SETSUBI_CHU = 804;
JPOS_SETSUBI_FU = 805;
JPOS_SETSUBI_RYU = 806;
JPOS_SETSUBI_YOU = 807;
JPOS_SETSUBI_KATA = 808;
JPOS_SETSUBI_MEISHIRENDAKU = 809;
JPOS_SETSUBI_JINMEI = 810;
JPOS_SETSUBI_CHIMEI = 811;
JPOS_SETSUBI_KUNI = 812;
JPOS_SETSUBI_KEN = 813;
JPOS_SETSUBI_GUN = 814;
JPOS_SETSUBI_KU = 815;
JPOS_SETSUBI_SHI = 816;
JPOS_SETSUBI_MACHI = 817;
JPOS_SETSUBI_CHOU = 818;
JPOS_SETSUBI_MURA = 819;
JPOS_SETSUBI_SON = 820;
JPOS_SETSUBI_EKI = 821;
JPOS_SETSUBI_SONOTA = 822;
JPOS_SETSUBI_SHAMEI = 823;
JPOS_SETSUBI_SOSHIKI = 824;
JPOS_SETSUBI_KENCHIKU = 825;
JPOS_RENYOU_SETSUBI = 826;
JPOS_SETSUBI_JOSUSHI = 827;
JPOS_SETSUBI_JOSUSHIPLUS = 828;
JPOS_SETSUBI_JIKAN = 829;
JPOS_SETSUBI_JIKANPLUS = 830;
JPOS_SETSUBI_TEINEI = 831;
JPOS_SETSUBI_SAN = 832;
JPOS_SETSUBI_KUN = 833;
JPOS_SETSUBI_SAMA = 834;
JPOS_SETSUBI_DONO = 835;
JPOS_SETSUBI_FUKUSU = 836;
JPOS_SETSUBI_TACHI = 837;
JPOS_SETSUBI_RA = 838;
JPOS_TANKANJI = 900;
JPOS_TANKANJI_KAO = 901;
JPOS_KANYOUKU = 902;
JPOS_DOKURITSUGO = 903;
JPOS_FUTEIGO = 904;
JPOS_KIGOU = 905;
JPOS_EIJI = 906;
JPOS_KUTEN = 907;
JPOS_TOUTEN = 908;
JPOS_KANJI = 909;
JPOS_OPENBRACE = 910;
JPOS_CLOSEBRACE = 911;
JPOS_YOKUSEI = 912;
type
{$ifndef UNDER_CE} // OS #7555 for Arms compiler work around
_POSTBL = packed record
nPos: Word;
szName: Byte;
end;
{$else}
_POSTBL = packed record
nPos: DWORD;
szName: Byte;
end;
{$endif}
POSTBL = _POSTBL;
PPOSTBL = ^POSTBL;
// DePendency Info
_IMEDP = packed record
wrdModifier: IMEWRD; //kakari-go
wrdModifiee: IMEWRD; //uke-go
relID: IMEREL;
end;
IMEDP = _IMEDP;
PIMEDP = ^IMEDP;
//typedef BOOL (WINAPI *PFNLOG)(IMEDP *, HRESULT);
PFNLOG = function(p1: PIMEDP; p2: HRESULT): BOOL; stdcall;
//HRESULT values
const
IPRG_S_LONGER_WORD = SEVERITY_SUCCESS shl 31 or FACILITY_ITF shl 16 or $7400;
IPRG_S_NO_ENTRY = SEVERITY_SUCCESS shl 31 or FACILITY_ITF shl 16 or $7401;
type
IMEDICAT = DWORD;
const
dicatNone = $00000000;
dicatGeneral = $00000001;
dicatNamePlace = $00000002;
dicatSpeech = $00000004;
dicatReverse = $00000008;
dicatEnglish = $00000010;
dicatALL = $0000001f;
type
IMEIDXTP = DWORD;
const
idxtpHiraKanji = $0001;
idxtpKanjiHira = $0002;
idxtpMix = idxtpHiraKanji or idxtpKanjiHira;
//MojiKind
mojikindSJIS = $0000;
mojikindUNICODE = $0001;
verIImeActiveDict = $0108;
type
_IMEDDISC = (
ddiscNone, //do not disclose data
ddiscAll, //show all contents
ddiscPartial //show partial data
);
IMEDDISC = _IMEDDISC;
_IMESHF = packed record
cbShf: Word; //size of this struct
verDic: Word; //dictionary version
szTitle: array[0..48 - 1] of Char; //dictionary title
szDescription: array[0..256 - 1] of Char; //dictionary description
szCopyright: array[0..128 - 1] of Char; //dictionary copyright info
end;
IMESHF = _IMESHF;
PIMESHF = ^IMESHF;
// Shared Header dictionary File
_IMESHF2 = packed record
cbShf: Word; //size of this struct
verDic: Word; //dictionary version
szTitle: array[0..48 - 1] of WideChar; //dictionary title
szDescription: array[0..256 - 1] of WideChar; //dictionary description
szCopyright: array[0..128 - 1] of WideChar; //dictionary copyright info
end;
IMESHF2 = _IMESHF2;
PIMESHF2 = ^IMESHF2;
const
cwchHeadingLen = 32;
type
//Dictionary Info
_IMEDINFO = packed record
shf: IMESHF2; //header
ver: DWORD; //IImeActiveDict version number
ddisc: IMEDDISC; //disclosure permission type
filestamp: FILETIME; //file stamp at creation
dicat: IMEDICAT; //dictionary category
idxtp: IMEIDXTP; //index type
wszHeading: array [0..cwchHeadingLen - 1] of WideChar; // Heading string which will be shown in candidate box.
fSkipInitialSearch: BOOL; // If TRUE, this dictionary will be skipped during initial search.
// This means, this dictionary cannot affect on clause breaking.
end;
IMEDINFO = _IMEDINFO;
PIMEDINFO = ^IMEDINFO;
const
cwchWordMax = 64;
type
IMESTMP = DWORD; //word stamp
//Active Dictionary Tango
_IMEPDT = packed record
idxtp: IMEIDXTP; //index type
cwchInput: Integer; //input string length
cwchOutput: Integer; //output string length
wszInput: array[0..cwchWordMax - 1] of WideChar; //input string
wszOutput: array[0..cwchWordMax - 1] of WideChar; //output string
nPos: DWORD; //part of speech
stmp: IMESTMP; //word time stamp
dwWordId: DWORD;
//WordId : 20; //word ID
//fComment : 1; //TRUE when this entry has word comment.
//dwFree : 11;
wMojiKind: Word; //moji kind
end;
IMEPDT = _IMEPDT;
PIMEPDT = ^IMEPDT;
///////////////////////////////
// The IImeActiveDict interface
///////////////////////////////
IImeActiveDict = interface(IUnknown)
// IImeActiveDict members
function Inquire(
pdinfo: PIMEDINFO //(out) dictionary info
): HResult; stdcall;
function Open(
pdinfo: PIMEDINFO //(out) dictionary info
): HResult; stdcall;
function Close: HResult; stdcall;
function SearchWord(
ppdt: PIMEPDT; //(in/out) tango
fFirst: BOOL; //(in) first time flag
fWildCard: BOOL //(in) wildcard flag
): HResult; stdcall;
function GetComment(
dwWID: DWORD; //(in) word id of tango with the user comment
pv: Pointer; //(out) pointer to buffer, can be NULL.
pdwSetID: PDWORD; //(out) SetID
pcb: PInteger; //(in) if pv is not NULL, *pcb is the size of buffer
//(out) if pv is NULL returns size of buffer needed, otherwise
// returns the size of comment placed in *pv
puct: PIMEUCT; //(out) returns the type of user comment
pwMojiKind: PWORD //(out) Moji Kind
): HResult; stdcall;
function OpenProperty(
hwnd: HWND //(in) parent window handle
): HResult; stdcall;
end;
// Interface ID for IImeActiveDict
const
IID_IImeActiveDict: TGUID = '{1D5FC416-692B-4B49-8110-A176D2442C47}';
// The following API replaces CoCreateInstance() since we don't support class ID at this time.
type
PFNCREATE = function(p1: Pointer; p2: Integer): HRESULT; stdcall;
//DLLExport HRESULT WINAPI CreateIImeActiveDictInstance(VOID **ppvObj, int nid);
CreateIImeActiveDictInstance = function(var p1; p2: Integer): HRESULT; stdcall;
//////////////////////////////
// The IFEDictionary interface
//////////////////////////////
IFEDictionary = interface(IUnknown)
// IFEDictionary members
function Open(
pchDictPath: PChar; //(in) dictionary path
pshf: PIMESHF //(out) dictionary header
): HResult; stdcall;
function Close: HResult; stdcall;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -