|
librime 1.2
Rime Input Method Engine, the core library
|
#include <stddef.h>#include <stdint.h>

Go to the source code of this file.
Classes | |
| struct | rime_traits_t |
| Rime traits structure. More... | |
| struct | RimeComposition |
| struct | rime_candidate_t |
| struct | RIME_FLAVORED |
| struct | rime_commit_t |
| Should be initialized by calling RIME_STRUCT_INIT(Type, var);. More... | |
| struct | rime_candidate_list_iterator_t |
| struct | rime_config_t |
| struct | rime_config_iterator_t |
| struct | rime_schema_list_item_t |
| struct | rime_schema_list_t |
| struct | rime_string_slice_t |
| struct | rime_custom_api_t |
| Extend the structure to publish custom data/functions in your specific module. More... | |
| struct | rime_module_t |
Macros | |
| #define | RIME_DLL |
| #define | RIME_API |
| #define | RIME_DEPRECATED RIME_API |
| #define | RIME_FLAVORED(name) |
| #define | Bool int |
| #define | False 0 |
| #define | True 1 |
| #define | RIME_STRUCT_INIT(Type, var) |
| #define | RIME_STRUCT_HAS_MEMBER(var, member) |
| #define | RIME_STRUCT_CLEAR(var) |
| #define | RIME_STRUCT(Type, var) |
| Define a variable of Type. | |
| #define | RIME_PROVIDED(p, member) |
| #define | RIME_PROTO_BUILDER void |
| For passing pointer to capnproto builder as opaque pointer through C API. | |
| #define | RIME_API_AVAILABLE(api, func) |
| Clients should test if an api function is available in the current version before calling it. | |
| #define | RIME_REGISTER_MODULE(name) |
| Automatically register a rime module when the library is loaded. | |
| #define | RIME_REGISTER_CUSTOM_MODULE(name) |
| Customize the module by assigning additional functions, eg. | |
| #define | RIME_MODULE_LIST(var, ...) |
| Defines a constant for a list of module names. | |
| #define | RIME_REGISTER_MODULE_GROUP(name, ...) |
| Register a phony module which, when loaded, will load a list of modules. | |
Typedefs | |
| typedef uintptr_t | RimeSessionId |
| typedef struct rime_traits_t | RimeTraits |
| Rime traits structure. | |
| typedef struct rime_candidate_t | RimeCandidate |
| typedef struct rime_commit_t | RimeCommit |
| Should be initialized by calling RIME_STRUCT_INIT(Type, var);. | |
| typedef struct rime_candidate_list_iterator_t | RimeCandidateListIterator |
| typedef struct rime_config_t | RimeConfig |
| typedef struct rime_config_iterator_t | RimeConfigIterator |
| typedef struct rime_schema_list_item_t | RimeSchemaListItem |
| typedef struct rime_schema_list_t | RimeSchemaList |
| typedef struct rime_string_slice_t | RimeStringSlice |
| typedef void(*) | RimeNotificationHandler(void *context_object, RimeSessionId session_id, const char *message_type, const char *message_value) |
| typedef struct rime_custom_api_t | RimeCustomApi |
| Extend the structure to publish custom data/functions in your specific module. | |
| typedef struct rime_module_t | RimeModule |
Functions | |
| struct | RIME_FLAVORED (rime_context_t) |
| Should be initialized by calling RIME_STRUCT_INIT(Type, var);. | |
| RIME_FLAVORED (RimeContext) | |
| struct | RIME_FLAVORED (rime_status_t) |
| Should be initialized by calling RIME_STRUCT_INIT(Type, var);. | |
| RIME_FLAVORED (RimeStatus) | |
| RIME_API Bool | RimeRegisterModule (RimeModule *module) |
| RIME_API RimeModule * | RimeFindModule (const char *module_name) |
| struct | RIME_FLAVORED (rime_api_t) |
| The API structure RimeApi is for rime v1.0+. | |
| RIME_FLAVORED (RimeApi) *RIME_FLAVORED(rime_get_api)(void) | |
| API entry. | |
| #define Bool int |
| #define False 0 |
| #define RIME_API |
| #define RIME_API_AVAILABLE | ( | api, | |
| func ) |
Clients should test if an api function is available in the current version before calling it.
| #define RIME_DEPRECATED RIME_API |
| #define RIME_DLL |
| #define RIME_FLAVORED | ( | name | ) |
| #define RIME_MODULE_LIST | ( | var, | |
| ... ) |
Defines a constant for a list of module names.
| #define RIME_PROTO_BUILDER void |
For passing pointer to capnproto builder as opaque pointer through C API.
| #define RIME_PROVIDED | ( | p, | |
| member ) |
| #define RIME_REGISTER_CUSTOM_MODULE | ( | name | ) |
Customize the module by assigning additional functions, eg.
module->get_api.
| #define RIME_REGISTER_MODULE | ( | name | ) |
Automatically register a rime module when the library is loaded.
Clients should define functions called rime_<module_name>initialize(), and rime<module_name>_finalize().
| #define RIME_REGISTER_MODULE_GROUP | ( | name, | |
| ... ) |
Register a phony module which, when loaded, will load a list of modules.
| #define RIME_STRUCT | ( | Type, | |
| var ) |
Define a variable of Type.
| #define RIME_STRUCT_CLEAR | ( | var | ) |
| #define RIME_STRUCT_HAS_MEMBER | ( | var, | |
| member ) |
| #define RIME_STRUCT_INIT | ( | Type, | |
| var ) |
| #define True 1 |
| typedef struct rime_candidate_t RimeCandidate |
| typedef struct rime_candidate_list_iterator_t RimeCandidateListIterator |
| typedef struct rime_commit_t RimeCommit |
Should be initialized by calling RIME_STRUCT_INIT(Type, var);.
| typedef struct rime_config_t RimeConfig |
| typedef struct rime_config_iterator_t RimeConfigIterator |
| typedef struct rime_custom_api_t RimeCustomApi |
Extend the structure to publish custom data/functions in your specific module.
| typedef struct rime_module_t RimeModule |
| typedef void(*) RimeNotificationHandler(void *context_object, RimeSessionId session_id, const char *message_type, const char *message_value) |
on deployment:
handler will be called with context_object as the first parameter every time an event occurs in librime, until RimeFinalize() is called. when handler is NULL, notification is disabled.
| typedef struct rime_schema_list_t RimeSchemaList |
| typedef struct rime_schema_list_item_t RimeSchemaListItem |
| typedef uintptr_t RimeSessionId |
| typedef struct rime_string_slice_t RimeStringSlice |
| typedef struct rime_traits_t RimeTraits |
Rime traits structure.
Should be initialized by calling RIME_STRUCT_INIT(Type, var)
| struct RIME_FLAVORED | ( | rime_api_t | ) |
The API structure RimeApi is for rime v1.0+.
setup Call this function before accessing any other API functions.
Set up the notification callbacks Receive notifications
handler will be called with context_object as the first parameter every time an event occurs in librime, until RimeFinalize() is called. when handler is NULL, notification is disabled.
initialize an empty config object
should call config_close() to free the object
deserialize config from a yaml string
get raw input
NULL is returned if session does not exist. the returned pointer to input string will become invalid upon editing.
caret position in terms of raw input
select a candidate at the given index in candidate list.
get the version of librime
set caret position in terms of raw input
select a candidate from current page.
access candidate list.
access config files in user data directory, eg. user.yaml and installation.yaml
prebuilt data directory.
staging directory, stores data files deployed to a Rime client.
delete a candidate at the given index in candidate list.
delete a candidate from current page.
highlight a selection without committing
highlight a selection without committing
| struct RIME_FLAVORED | ( | rime_context_t | ) |
Should be initialized by calling RIME_STRUCT_INIT(Type, var);.
| struct RIME_FLAVORED | ( | rime_status_t | ) |
Should be initialized by calling RIME_STRUCT_INIT(Type, var);.
| RIME_API RIME_FLAVORED | ( | RimeApi | ) |
API entry.
Acquire the version controlled RimeApi structure.
| RIME_FLAVORED | ( | RimeContext | ) |
| RIME_FLAVORED | ( | RimeStatus | ) |
| RIME_API RimeModule * RimeFindModule | ( | const char * | module_name | ) |
| RIME_API Bool RimeRegisterModule | ( | RimeModule * | module | ) |