1 | /**
|
---|
2 | * This file has no copyright assigned and is placed in the Public Domain.
|
---|
3 | * This file is part of the mingw-w64 runtime package.
|
---|
4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
---|
5 | */
|
---|
6 | #ifndef __FTSIFACE_H__
|
---|
7 | #define __FTSIFACE_H__
|
---|
8 |
|
---|
9 | #ifdef __cplusplus
|
---|
10 | extern "C" {
|
---|
11 | #endif
|
---|
12 |
|
---|
13 | typedef HANDLE HINDEX;
|
---|
14 | typedef HANDLE HSEARCHER;
|
---|
15 | typedef HANDLE HCOMPRESSOR;
|
---|
16 | typedef HANDLE HHILITER;
|
---|
17 | typedef INT ERRORCODE;
|
---|
18 | typedef struct { int base; int limit; } HILITE;
|
---|
19 |
|
---|
20 | #define NO_TITLE UINT(-1)
|
---|
21 | #define NOT_INDEXER UINT(-2)
|
---|
22 | #define NOT_SEARCHER UINT(-3)
|
---|
23 | #define NOT_COMPRESSOR UINT(-4)
|
---|
24 | #define CANNOT_SAVE UINT(-5)
|
---|
25 | #define OUT_OF_MEMORY UINT(-6)
|
---|
26 | #define CANNOT_OPEN UINT(-7)
|
---|
27 | #define CANNOT_LOAD UINT(-8)
|
---|
28 | #define INVALID_INDEX UINT(-9)
|
---|
29 | #define ALREADY_WEIGHED UINT(-10)
|
---|
30 | #define NO_TEXT_SCANNED UINT(-11)
|
---|
31 | #define ALIGNMENT_ERROR UINT(-12)
|
---|
32 | #define INVALID_PHRASE_TABLE UINT(-13)
|
---|
33 | #define INVALID_LCID UINT(-14)
|
---|
34 | #define NO_INDICES_LOADED UINT(-15)
|
---|
35 | #define INDEX_LOADED_ALREADY UINT(-16)
|
---|
36 | #define GROUP_LOADED_ALREADY UINT(-17)
|
---|
37 | #define DIALOG_ALREADY_ACTIVE UINT(-18)
|
---|
38 | #define EMPTY_PHRASE_TABLE UINT(-19)
|
---|
39 | #define OUT_OF_DISK UINT(-20)
|
---|
40 | #define DISK_READ_ERROR UINT(-21)
|
---|
41 | #define DISK_WRITE_ERROR UINT(-22)
|
---|
42 | #define SEARCH_ABORTED UINT(-23)
|
---|
43 | #define UNKNOWN_EXCEPTION UINT(-24)
|
---|
44 | #define SYSTEM_ERROR UINT(-25)
|
---|
45 | #define NOT_HILITER UINT(-26)
|
---|
46 | #define INVALID_CHARSET UINT(-27)
|
---|
47 | #define INVALID_SOURCE_NAME UINT(-28)
|
---|
48 | #define INVALID_TIMESTAMP UINT(-29)
|
---|
49 |
|
---|
50 | #define ERR_NO_DISK_SPACE 0xE0000001
|
---|
51 | #define ERR_DISK_CREATE_ERROR 0xE0000002
|
---|
52 | #define ERR_DISK_OPEN_ERROR 0xE0000003
|
---|
53 | #define ERR_DISK_READ_ERROR 0xE0000004
|
---|
54 | #define ERR_DISK_WRITE_ERROR 0xE0000005
|
---|
55 | #define ERR_SYSTEM_ERROR 0xE0000006
|
---|
56 | #define ERR_ABORT_SEARCH 0xE0000007
|
---|
57 | #define ERR_INVALID_TIMESTAMP 0xE0000008
|
---|
58 | #define ERR_INVALID_SOURCE_NAME 0xE0000009
|
---|
59 | #define ERR_FILE_MAP_FAILED 0xE000000A
|
---|
60 | #define ERR_INVALID_FILE_TYPE 0xE000000B
|
---|
61 | #define ERR_DAMAGED_FILE 0xE000000C
|
---|
62 | #define ERR_FUTURE_VERSION 0xE000000D
|
---|
63 |
|
---|
64 | #define TOPIC_SEARCH 0x00000001
|
---|
65 | #define PHRASE_SEARCH 0x00000002
|
---|
66 | #define PHRASE_FEEDBACK 0x00000004
|
---|
67 | #define VECTOR_SEARCH 0x00000008
|
---|
68 | #define WINHELP_INDEX 0x00000010
|
---|
69 | #define USE_VA_ADDR 0x00000020
|
---|
70 | #define USE_QWORD_JUMP 0x00000040
|
---|
71 |
|
---|
72 | #define USE_DEFAULT UINT(-1)
|
---|
73 |
|
---|
74 | HINDEX WINAPI NewIndex(const PBYTE pbSourceName,UINT uiTime1,UINT uiTime2,UINT iCharsetDefault,UINT lcidDefault,UINT fdwOptions);
|
---|
75 | ERRORCODE WINAPI ScanTopicTitle(HINDEX hinx,PBYTE pbTitle,UINT cbTitle,UINT iTopic,HANDLE hTopic,UINT iCharset,UINT lcid);
|
---|
76 | ERRORCODE WINAPI ScanTopicText (HINDEX hinx,PBYTE pbText,UINT cbText,UINT iCharset,UINT lcid);
|
---|
77 | ERRORCODE WINAPI SaveIndex (HINDEX hinx,PSZ pszFileName);
|
---|
78 | ERRORCODE WINAPI DeleteIndex (HINDEX hinx);
|
---|
79 |
|
---|
80 | typedef void (WINAPI *ANIMATOR)(void);
|
---|
81 |
|
---|
82 | ERRORCODE WINAPI RegisterAnimator(ANIMATOR pAnimator,HWND hwndAnimator);
|
---|
83 | WINBOOL WINAPI IsValidIndex(PSZ pszFileName,UINT dwOptions);
|
---|
84 | void WINAPI SetDirectoryLocator(HWND hwndLocator);
|
---|
85 | HSEARCHER WINAPI NewSearcher();
|
---|
86 | INT WINAPI OpenIndex(HSEARCHER hsrch,PSZ pszIndexFileName,PBYTE pbSourceName,PUINT pcbSourceNameLimit,PUINT pTime1,PUINT pTime2);
|
---|
87 | ERRORCODE WINAPI DiscardIndex (HSEARCHER hsrch,INT iIndex);
|
---|
88 | ERRORCODE WINAPI QueryOptions (HSEARCHER hsrch,INT iIndex,PUINT pfdwOptions);
|
---|
89 | ERRORCODE WINAPI SaveGroup (HSEARCHER hsrch,PSZ pszFileName);
|
---|
90 | ERRORCODE WINAPI LoadGroup (HSEARCHER hsrch,PSZ pszFileName);
|
---|
91 | HWND WINAPI OpenDialog (HSEARCHER hsrch,HWND hwndParent);
|
---|
92 | ERRORCODE WINAPI DeleteSearcher(HSEARCHER hsrch);
|
---|
93 |
|
---|
94 | #define MSG_FTS_JUMP_HASH (WM_USER + 32)
|
---|
95 | #define MSG_FTS_JUMP_VA (WM_USER + 33)
|
---|
96 | #define MSG_FTS_GET_TITLE (WM_USER + 34)
|
---|
97 | #define MSG_FTS_JUMP_QWORD (WM_USER + 35)
|
---|
98 | #define MSG_REINDEX_REQUEST (WM_USER + 36)
|
---|
99 | #define MSG_FTS_WHERE_IS_IT (WM_USER + 37)
|
---|
100 | #define MSG_GET_DEFFONT (WM_USER + 45)
|
---|
101 |
|
---|
102 | typedef struct _QWordAddress {
|
---|
103 | UINT iSerial;
|
---|
104 | HANDLE hTopic;
|
---|
105 | } QWordAddress,*PQWordAddress;
|
---|
106 |
|
---|
107 | HCOMPRESSOR WINAPI NewCompressor(UINT iCharsetDefault);
|
---|
108 | ERRORCODE WINAPI ScanText(HCOMPRESSOR hcmp,PBYTE pbText,UINT cbText,UINT iCharset);
|
---|
109 | ERRORCODE WINAPI GetPhraseTable(HCOMPRESSOR hcmp,PUINT pcPhrases,PBYTE *ppbImages,PUINT pcbImages,PBYTE *ppacbImageCompressed,PUINT pcbCompressed);
|
---|
110 | ERRORCODE WINAPI SetPhraseTable(HCOMPRESSOR hcmp,PBYTE pbImages,UINT cbImages,PBYTE pacbImageCompressed,UINT cbCompressed);
|
---|
111 | INT WINAPI CompressText (HCOMPRESSOR hcmp,PBYTE pbText,UINT cbText,PBYTE *ppbCompressed,UINT iCharset);
|
---|
112 | INT WINAPI DecompressText(HCOMPRESSOR hcmp,PBYTE pbCompressed,UINT cbCompressed,PBYTE pbText);
|
---|
113 | ERRORCODE WINAPI DeleteCompressor(HCOMPRESSOR hcmp);
|
---|
114 | HHILITER WINAPI NewHiliter(HSEARCHER hSearch);
|
---|
115 | ERRORCODE WINAPI DeleteHiliter(HHILITER hhil);
|
---|
116 | ERRORCODE WINAPI ScanDisplayText(HHILITER hhil,PBYTE pbText,int cbText,UINT iCharset,LCID lcid);
|
---|
117 | ERRORCODE WINAPI ClearDisplayText(HHILITER hhil);
|
---|
118 | int WINAPI CountHilites(HHILITER hhil,int base,int limit);
|
---|
119 | int WINAPI QueryHilites(HHILITER hhil,int base,int limit,int cHilites,HILITE *paHilites);
|
---|
120 |
|
---|
121 | #ifdef __cplusplus
|
---|
122 | }
|
---|
123 | #endif
|
---|
124 | #endif
|
---|