librime: rime_api_deprecated.h Source File

| librime 1.2 Rime Input Method Engine, the core library

rime_api_deprecated.h
Go to the documentation of this file.
1#ifndef RIME_API_DEPRECATED_H_
2#define RIME_API_DEPRECATED_H_
3
4#include "rime_api.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
11
14#define RIME_MAX_NUM_CANDIDATES 10
15
16// Setup
17
21 RIME_DEPRECATED void RimeSetup(RimeTraits* traits);
22
29 RIME_DEPRECATED void RimeSetupLogging(const char* app_name);
30
32 RIME_DEPRECATED void RimeSetNotificationHandler(RimeNotificationHandler handler,
33 void* context_object);
34
35// Entry and exit
36
37 RIME_DEPRECATED void RimeInitialize(RimeTraits* traits);
38 RIME_DEPRECATED void RimeFinalize(void);
39
40 RIME_DEPRECATED Bool RimeStartMaintenance(Bool full_check);
41
43 RIME_DEPRECATED Bool RimeStartMaintenanceOnWorkspaceChange(void);
44 RIME_DEPRECATED Bool RimeIsMaintenancing(void);
45 RIME_DEPRECATED void RimeJoinMaintenanceThread(void);
46
47// Deployment
48
49 RIME_DEPRECATED void RimeDeployerInitialize(RimeTraits* traits);
50 RIME_DEPRECATED Bool RimePrebuildAllSchemas(void);
51 RIME_DEPRECATED Bool RimeDeployWorkspace(void);
52 RIME_DEPRECATED Bool RimeDeploySchema(const char* schema_file);
53 RIME_DEPRECATED Bool RimeDeployConfigFile(const char* file_name,
54 const char* version_key);
55
56 RIME_DEPRECATED Bool RimeSyncUserData(void);
57
58// Session management
59
60 RIME_DEPRECATED RimeSessionId RimeCreateSession(void);
61 RIME_DEPRECATED Bool RimeFindSession(RimeSessionId session_id);
62 RIME_DEPRECATED Bool RimeDestroySession(RimeSessionId session_id);
63 RIME_DEPRECATED void RimeCleanupStaleSessions(void);
64 RIME_DEPRECATED void RimeCleanupAllSessions(void);
65
66// Input
67
68 RIME_DEPRECATED Bool RimeProcessKey(RimeSessionId session_id,
69 int keycode,
70 int mask);
74 RIME_DEPRECATED Bool RimeCommitComposition(RimeSessionId session_id);
75 RIME_DEPRECATED void RimeClearComposition(RimeSessionId session_id);
76
77// Output
78
79 RIME_DEPRECATED Bool RimeGetCommit(RimeSessionId session_id,
80 RimeCommit* commit);
81 RIME_DEPRECATED Bool RimeFreeCommit(RimeCommit* commit);
82 RIME_DEPRECATED Bool RimeGetContext(RimeSessionId session_id,
83 RIME_FLAVORED(RimeContext) * context);
84 RIME_DEPRECATED Bool RimeFreeContext(RIME_FLAVORED(RimeContext) * context);
85 RIME_DEPRECATED Bool RimeGetStatus(RimeSessionId session_id,
86 RIME_FLAVORED(RimeStatus) * status);
87 RIME_DEPRECATED Bool RimeFreeStatus(RIME_FLAVORED(RimeStatus) * status);
88
89// Accessing candidate list
90 RIME_DEPRECATED Bool
91 RimeCandidateListBegin(RimeSessionId session_id,
92 RimeCandidateListIterator* iterator);
93 RIME_DEPRECATED Bool RimeCandidateListNext(RimeCandidateListIterator* iterator);
94 RIME_DEPRECATED void RimeCandidateListEnd(RimeCandidateListIterator* iterator);
95 RIME_DEPRECATED Bool
96 RimeCandidateListFromIndex(RimeSessionId session_id,
97 RimeCandidateListIterator* iterator,
98 int index);
99 RIME_DEPRECATED Bool RimeSelectCandidate(RimeSessionId session_id,
100 size_t index);
101 RIME_DEPRECATED Bool RimeSelectCandidateOnCurrentPage(RimeSessionId session_id,
102 size_t index);
103 RIME_DEPRECATED Bool RimeDeleteCandidate(RimeSessionId session_id,
104 size_t index);
105 RIME_DEPRECATED Bool RimeDeleteCandidateOnCurrentPage(RimeSessionId session_id,
106 size_t index);
107
108// Runtime options
109
110 RIME_DEPRECATED void RimeSetOption(RimeSessionId session_id,
111 const char* option,
112 Bool value);
113 RIME_DEPRECATED Bool RimeGetOption(RimeSessionId session_id,
114 const char* option);
115
116 RIME_DEPRECATED void RimeSetProperty(RimeSessionId session_id,
117 const char* prop,
118 const char* value);
119 RIME_DEPRECATED Bool RimeGetProperty(RimeSessionId session_id,
120 const char* prop,
121 char* value,
122 size_t buffer_size);
123
124 RIME_DEPRECATED Bool RimeGetSchemaList(RimeSchemaList* schema_list);
125 RIME_DEPRECATED void RimeFreeSchemaList(RimeSchemaList* schema_list);
126 RIME_DEPRECATED Bool RimeGetCurrentSchema(RimeSessionId session_id,
127 char* schema_id,
128 size_t buffer_size);
129 RIME_DEPRECATED Bool RimeSelectSchema(RimeSessionId session_id,
130 const char* schema_id);
131
132// Configuration
133
134// <schema_id>.schema.yaml
135 RIME_DEPRECATED Bool RimeSchemaOpen(const char* schema_id, RimeConfig* config);
136// <config_id>.yaml
137 RIME_DEPRECATED Bool RimeConfigOpen(const char* config_id, RimeConfig* config);
138// access config files in user data directory, eg. user.yaml and
139// installation.yaml
140 RIME_DEPRECATED Bool RimeUserConfigOpen(const char* config_id,
141 RimeConfig* config);
142 RIME_DEPRECATED Bool RimeConfigClose(RimeConfig* config);
143 RIME_DEPRECATED Bool RimeConfigInit(RimeConfig* config);
144 RIME_DEPRECATED Bool RimeConfigLoadString(RimeConfig* config, const char* yaml);
145// Access config values
146 RIME_DEPRECATED Bool RimeConfigGetBool(RimeConfig* config,
147 const char* key,
148 Bool* value);
149 RIME_DEPRECATED Bool RimeConfigGetInt(RimeConfig* config,
150 const char* key,
151 int* value);
152 RIME_DEPRECATED Bool RimeConfigGetDouble(RimeConfig* config,
153 const char* key,
154 double* value);
155 RIME_DEPRECATED Bool RimeConfigGetString(RimeConfig* config,
156 const char* key,
157 char* value,
158 size_t buffer_size);
159 RIME_DEPRECATED const char* RimeConfigGetCString(RimeConfig* config,
160 const char* key);
161 RIME_DEPRECATED Bool RimeConfigSetBool(RimeConfig* config,
162 const char* key,
163 Bool value);
164 RIME_DEPRECATED Bool RimeConfigSetInt(RimeConfig* config,
165 const char* key,
166 int value);
167 RIME_DEPRECATED Bool RimeConfigSetDouble(RimeConfig* config,
168 const char* key,
169 double value);
170 RIME_DEPRECATED Bool RimeConfigSetString(RimeConfig* config,
171 const char* key,
172 const char* value);
173// Manipulate complex structures
174 RIME_DEPRECATED Bool RimeConfigGetItem(RimeConfig* config,
175 const char* key,
176 RimeConfig* value);
177 RIME_DEPRECATED Bool RimeConfigSetItem(RimeConfig* config,
178 const char* key,
179 RimeConfig* value);
180 RIME_DEPRECATED Bool RimeConfigClear(RimeConfig* config, const char* key);
181 RIME_DEPRECATED Bool RimeConfigCreateList(RimeConfig* config, const char* key);
182 RIME_DEPRECATED Bool RimeConfigCreateMap(RimeConfig* config, const char* key);
183 RIME_DEPRECATED size_t RimeConfigListSize(RimeConfig* config, const char* key);
184 RIME_DEPRECATED Bool RimeConfigBeginList(RimeConfigIterator* iterator,
185 RimeConfig* config,
186 const char* key);
187 RIME_DEPRECATED Bool RimeConfigBeginMap(RimeConfigIterator* iterator,
188 RimeConfig* config,
189 const char* key);
190 RIME_DEPRECATED Bool RimeConfigNext(RimeConfigIterator* iterator);
191 RIME_DEPRECATED void RimeConfigEnd(RimeConfigIterator* iterator);
192// Utilities
193 RIME_DEPRECATED Bool RimeConfigUpdateSignature(RimeConfig* config,
194 const char* signer);
195
196// Testing
197
198 RIME_DEPRECATED Bool RimeSimulateKeySequence(RimeSessionId session_id,
199 const char* key_sequence);
200
201 RIME_DEPRECATED Bool RimeSetInput(RimeSessionId session_id, const char* input);
202
204 RIME_DEPRECATED Bool RimeRunTask(const char* task_name);
205
207 RIME_DEPRECATED const char* RimeGetSharedDataDir(void);
209 RIME_DEPRECATED const char* RimeGetUserDataDir(void);
211 RIME_DEPRECATED const char* RimeGetSyncDir(void);
212
213 RIME_DEPRECATED const char* RimeGetUserId(void);
214
215#ifdef __cplusplus
216}
217#endif
218
219#endif // RIME_API_DEPRECATED_H_
RimeSetupLogging
RIME_DEPRECATED void RimeSetupLogging(const char *app_name)
Pass a C-string constant in the format "rime.x" where 'x' is the name of your application.
Definition rime_api.cc:18
rime_api.h
RimeCandidateListIterator
struct rime_candidate_list_iterator_t RimeCandidateListIterator
RimeSessionId
uintptr_t RimeSessionId
Definition rime_api.h:57
RIME_DEPRECATED
#define RIME_DEPRECATED
Definition rime_api.h:38
RimeSchemaList
struct rime_schema_list_t RimeSchemaList
RimeConfigIterator
struct rime_config_iterator_t RimeConfigIterator
RimeConfig
struct rime_config_t RimeConfig
Bool
#define Bool
Definition rime_api.h:46
RimeNotificationHandler
void(*) RimeNotificationHandler(void *context_object, RimeSessionId session_id, const char *message_type, const char *message_value)
Definition rime_api.h:231
RIME_FLAVORED
#define RIME_FLAVORED(name)
Definition rime_api.h:42
RimeCommit
struct rime_commit_t RimeCommit
Should be initialized by calling RIME_STRUCT_INIT(Type, var);.
RimeTraits
struct rime_traits_t RimeTraits
Rime traits structure.
RimeConfigGetDouble
RIME_DEPRECATED Bool RimeConfigGetDouble(RimeConfig *config, const char *key, double *value)
Definition rime_api_impl.h:613
RimeDestroySession
RIME_DEPRECATED Bool RimeDestroySession(RimeSessionId session_id)
Definition rime_api_impl.h:157
RimeFreeContext
RIME_DEPRECATED Bool RimeFreeContext(RIME_FLAVORED(RimeContext) *context)
Definition rime_api_impl.h:285
RimeCommitComposition
RIME_DEPRECATED Bool RimeCommitComposition(RimeSessionId session_id)
return True if there is unread commit text
Definition rime_api_impl.h:180
RimeSelectCandidateOnCurrentPage
RIME_DEPRECATED Bool RimeSelectCandidateOnCurrentPage(RimeSessionId session_id, size_t index)
Definition rime_api_impl.h:1045
RimeGetSyncDir
RIME_DEPRECATED const char * RimeGetSyncDir(void)
Definition rime_api_impl.h:820
RimeSelectSchema
RIME_DEPRECATED Bool RimeSelectSchema(RimeSessionId session_id, const char *schema_id)
Definition rime_api_impl.h:540
RimeSelectCandidate
RIME_DEPRECATED Bool RimeSelectCandidate(RimeSessionId session_id, size_t index)
Definition rime_api_impl.h:1040
RimeCandidateListBegin
RIME_DEPRECATED Bool RimeCandidateListBegin(RimeSessionId session_id, RimeCandidateListIterator *iterator)
Definition rime_api_impl.h:391
RimeGetStatus
RIME_DEPRECATED Bool RimeGetStatus(RimeSessionId session_id, RIME_FLAVORED(RimeStatus) *status)
Definition rime_api_impl.h:335
RimeDeployConfigFile
RIME_DEPRECATED Bool RimeDeployConfigFile(const char *file_name, const char *version_key)
Definition rime_api_impl.h:131
RimeCandidateListNext
RIME_DEPRECATED Bool RimeCandidateListNext(RimeCandidateListIterator *iterator)
Definition rime_api_impl.h:397
RimeSyncUserData
RIME_DEPRECATED Bool RimeSyncUserData(void)
Definition rime_api_impl.h:138
RimeDeployerInitialize
RIME_DEPRECATED void RimeDeployerInitialize(RimeTraits *traits)
Definition rime_api_impl.h:107
RimeSetup
RIME_DEPRECATED void RimeSetup(RimeTraits *traits)
Call this function before accessing any other API.
Definition rime_api_impl.h:25
RimeFreeStatus
RIME_DEPRECATED Bool RimeFreeStatus(RIME_FLAVORED(RimeStatus) *status)
Definition rime_api_impl.h:361
RimeConfigGetItem
RIME_DEPRECATED Bool RimeConfigGetItem(RimeConfig *config, const char *key, RimeConfig *value)
Definition rime_api_impl.h:858
RimeGetUserId
RIME_DEPRECATED const char * RimeGetUserId(void)
Definition rime_api_impl.h:827
RimeConfigCreateMap
RIME_DEPRECATED Bool RimeConfigCreateMap(RimeConfig *config, const char *key)
Definition rime_api_impl.h:953
RimeFreeCommit
RIME_DEPRECATED Bool RimeFreeCommit(RimeCommit *commit)
Definition rime_api_impl.h:327
RimeDeploySchema
RIME_DEPRECATED Bool RimeDeploySchema(const char *schema_file)
Definition rime_api_impl.h:126
RimePrebuildAllSchemas
RIME_DEPRECATED Bool RimePrebuildAllSchemas(void)
Definition rime_api_impl.h:113
RimeDeleteCandidate
RIME_DEPRECATED Bool RimeDeleteCandidate(RimeSessionId session_id, size_t index)
Definition rime_api_impl.h:1051
RimeCleanupAllSessions
RIME_DEPRECATED void RimeCleanupAllSessions(void)
Definition rime_api_impl.h:165
RimeStartMaintenanceOnWorkspaceChange
RIME_DEPRECATED Bool RimeStartMaintenanceOnWorkspaceChange(void)
Definition rime_api_impl.h:91
RimeConfigSetBool
RIME_DEPRECATED Bool RimeConfigSetBool(RimeConfig *config, const char *key, Bool value)
Definition rime_api_impl.h:891
RimeConfigListSize
RIME_DEPRECATED size_t RimeConfigListSize(RimeConfig *config, const char *key)
Definition rime_api_impl.h:962
RimeCandidateListFromIndex
RIME_DEPRECATED Bool RimeCandidateListFromIndex(RimeSessionId session_id, RimeCandidateListIterator *iterator, int index)
Definition rime_api_impl.h:373
RimeConfigBeginList
RIME_DEPRECATED Bool RimeConfigBeginList(RimeConfigIterator *iterator, RimeConfig *config, const char *key)
Definition rime_api_impl.h:679
RimeConfigInit
RIME_DEPRECATED Bool RimeConfigInit(RimeConfig *config)
Definition rime_api_impl.h:838
RimeSetInput
RIME_DEPRECATED Bool RimeSetInput(RimeSessionId session_id, const char *input)
Definition rime_api_impl.h:1072
RimeFinalize
RIME_DEPRECATED void RimeFinalize(void)
Definition rime_api_impl.h:58
RimeSimulateKeySequence
RIME_DEPRECATED Bool RimeSimulateKeySequence(RimeSessionId session_id, const char *key_sequence)
Definition rime_api_impl.h:768
RimeIsMaintenancing
RIME_DEPRECATED Bool RimeIsMaintenancing(void)
Definition rime_api_impl.h:95
RimeProcessKey
RIME_DEPRECATED Bool RimeProcessKey(RimeSessionId session_id, int keycode, int mask)
Definition rime_api_impl.h:171
RimeGetProperty
RIME_DEPRECATED Bool RimeGetProperty(RimeSessionId session_id, const char *prop, char *value, size_t buffer_size)
Definition rime_api_impl.h:458
RimeGetCommit
RIME_DEPRECATED Bool RimeGetCommit(RimeSessionId session_id, RimeCommit *commit)
Definition rime_api_impl.h:309
RimeConfigUpdateSignature
RIME_DEPRECATED Bool RimeConfigUpdateSignature(RimeConfig *config, const char *signer)
Definition rime_api_impl.h:652
RimeDeleteCandidateOnCurrentPage
RIME_DEPRECATED Bool RimeDeleteCandidateOnCurrentPage(RimeSessionId session_id, size_t index)
Definition rime_api_impl.h:1056
RimeSetOption
RIME_DEPRECATED void RimeSetOption(RimeSessionId session_id, const char *option, Bool value)
Definition rime_api_impl.h:423
RimeConfigLoadString
RIME_DEPRECATED Bool RimeConfigLoadString(RimeConfig *config, const char *yaml)
Definition rime_api_impl.h:845
RimeGetContext
RIME_DEPRECATED Bool RimeGetContext(RimeSessionId session_id, RIME_FLAVORED(RimeContext) *context)
Definition rime_api_impl.h:209
RimeGetSchemaList
RIME_DEPRECATED Bool RimeGetSchemaList(RimeSchemaList *schema_list)
Definition rime_api_impl.h:475
RimeConfigBeginMap
RIME_DEPRECATED Bool RimeConfigBeginMap(RimeConfigIterator *iterator, RimeConfig *config, const char *key)
Definition rime_api_impl.h:699
RimeFreeSchemaList
RIME_DEPRECATED void RimeFreeSchemaList(RimeSchemaList *schema_list)
Definition rime_api_impl.h:513
RimeConfigEnd
RIME_DEPRECATED void RimeConfigEnd(RimeConfigIterator *iterator)
Definition rime_api_impl.h:757
RimeDeployWorkspace
RIME_DEPRECATED Bool RimeDeployWorkspace(void)
Definition rime_api_impl.h:118
RimeConfigGetString
RIME_DEPRECATED Bool RimeConfigGetString(RimeConfig *config, const char *key, char *value, size_t buffer_size)
Definition rime_api_impl.h:622
RimeSchemaOpen
RIME_DEPRECATED Bool RimeSchemaOpen(const char *schema_id, RimeConfig *config)
Definition rime_api_impl.h:568
RimeConfigGetBool
RIME_DEPRECATED Bool RimeConfigGetBool(RimeConfig *config, const char *key, Bool *value)
Definition rime_api_impl.h:590
RimeClearComposition
RIME_DEPRECATED void RimeClearComposition(RimeSessionId session_id)
Definition rime_api_impl.h:187
RimeConfigClear
RIME_DEPRECATED Bool RimeConfigClear(RimeConfig *config, const char *key)
Definition rime_api_impl.h:935
RimeInitialize
RIME_DEPRECATED void RimeInitialize(RimeTraits *traits)
Definition rime_api_impl.h:51
RimeCandidateListEnd
RIME_DEPRECATED void RimeCandidateListEnd(RimeCandidateListIterator *iterator)
Definition rime_api_impl.h:413
RimeGetUserDataDir
RIME_DEPRECATED const char * RimeGetUserDataDir(void)
Definition rime_api_impl.h:799
RimeJoinMaintenanceThread
RIME_DEPRECATED void RimeJoinMaintenanceThread(void)
Definition rime_api_impl.h:100
RimeConfigSetInt
RIME_DEPRECATED Bool RimeConfigSetInt(RimeConfig *config, const char *key, int value)
Definition rime_api_impl.h:902
RimeConfigOpen
RIME_DEPRECATED Bool RimeConfigOpen(const char *config_id, RimeConfig *config)
Definition rime_api_impl.h:572
RimeConfigGetInt
RIME_DEPRECATED Bool RimeConfigGetInt(RimeConfig *config, const char *key, int *value)
Definition rime_api_impl.h:604
RimeConfigSetString
RIME_DEPRECATED Bool RimeConfigSetString(RimeConfig *config, const char *key, const char *value)
Definition rime_api_impl.h:924
RimeConfigGetCString
RIME_DEPRECATED const char * RimeConfigGetCString(RimeConfig *config, const char *key)
Definition rime_api_impl.h:639
RimeCreateSession
RIME_DEPRECATED RimeSessionId RimeCreateSession(void)
Definition rime_api_impl.h:149
RimeConfigNext
RIME_DEPRECATED Bool RimeConfigNext(RimeConfigIterator *iterator)
Definition rime_api_impl.h:719
RimeStartMaintenance
RIME_DEPRECATED Bool RimeStartMaintenance(Bool full_check)
Definition rime_api_impl.h:65
RimeConfigCreateList
RIME_DEPRECATED Bool RimeConfigCreateList(RimeConfig *config, const char *key)
Definition rime_api_impl.h:944
RimeCleanupStaleSessions
RIME_DEPRECATED void RimeCleanupStaleSessions(void)
Definition rime_api_impl.h:161
RimeConfigSetDouble
RIME_DEPRECATED Bool RimeConfigSetDouble(RimeConfig *config, const char *key, double value)
Definition rime_api_impl.h:913
RimeFindSession
RIME_DEPRECATED Bool RimeFindSession(RimeSessionId session_id)
Definition rime_api_impl.h:153
RimeGetOption
RIME_DEPRECATED Bool RimeGetOption(RimeSessionId session_id, const char *option)
Definition rime_api_impl.h:435
RimeRunTask
RIME_DEPRECATED Bool RimeRunTask(const char *task_name)
Run a registered task.
Definition rime_api_impl.h:785
RimeUserConfigOpen
RIME_DEPRECATED Bool RimeUserConfigOpen(const char *config_id, RimeConfig *config)
Definition rime_api_impl.h:576
RimeConfigSetItem
RIME_DEPRECATED Bool RimeConfigSetItem(RimeConfig *config, const char *key, RimeConfig *value)
Definition rime_api_impl.h:874
RimeGetSharedDataDir
RIME_DEPRECATED const char * RimeGetSharedDataDir(void)
Definition rime_api_impl.h:792
RimeSetProperty
RIME_DEPRECATED void RimeSetProperty(RimeSessionId session_id, const char *prop, const char *value)
Definition rime_api_impl.h:446
RimeGetCurrentSchema
RIME_DEPRECATED Bool RimeGetCurrentSchema(RimeSessionId session_id, char *schema_id, size_t buffer_size)
Definition rime_api_impl.h:527
RimeSetNotificationHandler
RIME_DEPRECATED void RimeSetNotificationHandler(RimeNotificationHandler handler, void *context_object)
Receive notifications.
Definition rime_api_impl.h:39
RimeConfigClose
RIME_DEPRECATED Bool RimeConfigClose(RimeConfig *config)
Definition rime_api_impl.h:581