librime: rime_api_impl.h File Reference

| librime 1.2 Rime Input Method Engine, the core library

Classes | Functions
rime_api_impl.h File Reference
`#include "rime_api.h"`
`#include <rime/common.h>`
`#include <rime/composition.h>`
`#include <rime/config.h>`
`#include <rime/context.h>`
`#include <rime/deployer.h>`
`#include <rime/key_event.h>`
`#include <rime/menu.h>`
`#include <rime/module.h>`
`#include <rime/registry.h>`
`#include <rime/schema.h>`
`#include <rime/service.h>`
`#include <rime/setup.h>`
`#include <rime/signature.h>`
`#include <rime/switches.h>`
Include dependency graph for rime_api_impl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | RimeConfigIteratorImpl< T >

## Functions
void | rime_declare_module_dependencies ()
RIME_DEPRECATED void | RimeSetup (RimeTraits *traits)
| Call this function before accessing any other API.
RIME_DEPRECATED void | RimeSetNotificationHandler (RimeNotificationHandler handler, void *context_object)
| Receive notifications.
RIME_DEPRECATED void | RimeInitialize (RimeTraits *traits)
RIME_DEPRECATED void | RimeFinalize ()
RIME_DEPRECATED Bool | RimeStartMaintenance (Bool full_check)
RIME_DEPRECATED Bool | RimeStartMaintenanceOnWorkspaceChange ()
RIME_DEPRECATED Bool | RimeIsMaintenancing ()
RIME_DEPRECATED void | RimeJoinMaintenanceThread ()
RIME_DEPRECATED void | RimeDeployerInitialize (RimeTraits *traits)
RIME_DEPRECATED Bool | RimePrebuildAllSchemas ()
RIME_DEPRECATED Bool | RimeDeployWorkspace ()
RIME_DEPRECATED Bool | RimeDeploySchema (const char *schema_file)
RIME_DEPRECATED Bool | RimeDeployConfigFile (const char *file_name, const char *version_key)
RIME_DEPRECATED Bool | RimeSyncUserData ()
RIME_DEPRECATED RimeSessionId | RimeCreateSession ()
RIME_DEPRECATED Bool | RimeFindSession (RimeSessionId session_id)
RIME_DEPRECATED Bool | RimeDestroySession (RimeSessionId session_id)
RIME_DEPRECATED void | RimeCleanupStaleSessions ()
RIME_DEPRECATED void | RimeCleanupAllSessions ()
RIME_DEPRECATED Bool | RimeProcessKey (RimeSessionId session_id, int keycode, int mask)
RIME_DEPRECATED Bool | RimeCommitComposition (RimeSessionId session_id)
| return True if there is unread commit text
RIME_DEPRECATED void | RimeClearComposition (RimeSessionId session_id)
RIME_DEPRECATED Bool | RimeGetContext (RimeSessionId session_id, RIME_FLAVORED(RimeContext) *context)
RIME_DEPRECATED Bool | RimeFreeContext (RIME_FLAVORED(RimeContext) *context)
RIME_DEPRECATED Bool | RimeGetCommit (RimeSessionId session_id, RimeCommit *commit)
RIME_DEPRECATED Bool | RimeFreeCommit (RimeCommit *commit)
RIME_DEPRECATED Bool | RimeGetStatus (RimeSessionId session_id, RIME_FLAVORED(RimeStatus) *status)
RIME_DEPRECATED Bool | RimeFreeStatus (RIME_FLAVORED(RimeStatus) *status)
RIME_DEPRECATED Bool | RimeCandidateListFromIndex (RimeSessionId session_id, RimeCandidateListIterator *iterator, int index)
RIME_DEPRECATED Bool | RimeCandidateListBegin (RimeSessionId session_id, RimeCandidateListIterator *iterator)
RIME_DEPRECATED Bool | RimeCandidateListNext (RimeCandidateListIterator *iterator)
RIME_DEPRECATED void | RimeCandidateListEnd (RimeCandidateListIterator *iterator)
RIME_DEPRECATED void | RimeSetOption (RimeSessionId session_id, const char *option, Bool value)
RIME_DEPRECATED Bool | RimeGetOption (RimeSessionId session_id, const char *option)
RIME_DEPRECATED void | RimeSetProperty (RimeSessionId session_id, const char *prop, const char *value)
RIME_DEPRECATED Bool | RimeGetProperty (RimeSessionId session_id, const char *prop, char *value, size_t buffer_size)
RIME_DEPRECATED Bool | RimeGetSchemaList (RimeSchemaList *output)
RIME_DEPRECATED void | RimeFreeSchemaList (RimeSchemaList *schema_list)
RIME_DEPRECATED Bool | RimeGetCurrentSchema (RimeSessionId session_id, char *schema_id, size_t buffer_size)
RIME_DEPRECATED Bool | RimeSelectSchema (RimeSessionId session_id, const char *schema_id)
RIME_DEPRECATED Bool | RimeSchemaOpen (const char *schema_id, RimeConfig *config)
RIME_DEPRECATED Bool | RimeConfigOpen (const char *config_id, RimeConfig *config)
RIME_DEPRECATED Bool | RimeUserConfigOpen (const char *config_id, RimeConfig *config)
RIME_DEPRECATED Bool | RimeConfigClose (RimeConfig *config)
RIME_DEPRECATED Bool | RimeConfigGetBool (RimeConfig *config, const char *key, Bool *value)
RIME_DEPRECATED Bool | RimeConfigGetInt (RimeConfig *config, const char *key, int *value)
RIME_DEPRECATED Bool | RimeConfigGetDouble (RimeConfig *config, const char *key, double *value)
RIME_DEPRECATED Bool | RimeConfigGetString (RimeConfig *config, const char *key, char *value, size_t buffer_size)
RIME_DEPRECATED const char * | RimeConfigGetCString (RimeConfig *config, const char *key)
RIME_DEPRECATED Bool | RimeConfigUpdateSignature (RimeConfig *config, const char *signer)
RIME_DEPRECATED Bool | RimeConfigBeginList (RimeConfigIterator *iterator, RimeConfig *config, const char *key)
RIME_DEPRECATED Bool | RimeConfigBeginMap (RimeConfigIterator *iterator, RimeConfig *config, const char *key)
RIME_DEPRECATED Bool | RimeConfigNext (RimeConfigIterator *iterator)
RIME_DEPRECATED void | RimeConfigEnd (RimeConfigIterator *iterator)
RIME_DEPRECATED Bool | RimeSimulateKeySequence (RimeSessionId session_id, const char *key_sequence)
RIME_DEPRECATED Bool | RimeRunTask (const char *task_name)
| Run a registered task.
RIME_DEPRECATED const char * | RimeGetSharedDataDir ()
RIME_DEPRECATED const char * | RimeGetUserDataDir ()
RIME_DEPRECATED const char * | RimeGetPrebuiltDataDir ()
RIME_DEPRECATED const char * | RimeGetStagingDir ()
RIME_DEPRECATED const char * | RimeGetSyncDir ()
RIME_DEPRECATED const char * | RimeGetUserId ()
RIME_DEPRECATED void | RimeGetUserDataSyncDir (char *dir, size_t buffer_size)
RIME_DEPRECATED Bool | RimeConfigInit (RimeConfig *config)
RIME_DEPRECATED Bool | RimeConfigLoadString (RimeConfig *config, const char *yaml)
RIME_DEPRECATED Bool | RimeConfigGetItem (RimeConfig *config, const char *key, RimeConfig *value)
RIME_DEPRECATED Bool | RimeConfigSetItem (RimeConfig *config, const char *key, RimeConfig *value)
RIME_DEPRECATED Bool | RimeConfigSetBool (RimeConfig *config, const char *key, Bool value)
RIME_DEPRECATED Bool | RimeConfigSetInt (RimeConfig *config, const char *key, int value)
RIME_DEPRECATED Bool | RimeConfigSetDouble (RimeConfig *config, const char *key, double value)
RIME_DEPRECATED Bool | RimeConfigSetString (RimeConfig *config, const char *key, const char *value)
RIME_DEPRECATED Bool | RimeConfigClear (RimeConfig *config, const char *key)
RIME_DEPRECATED Bool | RimeConfigCreateList (RimeConfig *config, const char *key)
RIME_DEPRECATED Bool | RimeConfigCreateMap (RimeConfig *config, const char *key)
RIME_DEPRECATED size_t | RimeConfigListSize (RimeConfig *config, const char *key)
RIME_DEPRECATED Bool | RimeSelectCandidate (RimeSessionId session_id, size_t index)
RIME_DEPRECATED Bool | RimeSelectCandidateOnCurrentPage (RimeSessionId session_id, size_t index)
RIME_DEPRECATED Bool | RimeDeleteCandidate (RimeSessionId session_id, size_t index)
RIME_DEPRECATED Bool | RimeDeleteCandidateOnCurrentPage (RimeSessionId session_id, size_t index)
RIME_DEPRECATED Bool | RimeSetInput (RimeSessionId session_id, const char *input)
void | RimeGetSharedDataDirSecure (char *dir, size_t buffer_size)
void | RimeGetUserDataDirSecure (char *dir, size_t buffer_size)
void | RimeGetPrebuiltDataDirSecure (char *dir, size_t buffer_size)
void | RimeGetStagingDirSecure (char *dir, size_t buffer_size)
void | RimeGetSyncDirSecure (char *dir, size_t buffer_size)
const char * | RimeGetVersion ()
RIME_API | RIME_FLAVORED (RimeApi) *RIME_FLAVORED(rime_get_api)()
| API entry.

## Function Documentation

## ◆ rime_declare_module_dependencies()

void rime_declare_module_dependencies | ( |  | ) |

## ◆ RIME_FLAVORED()

RIME_API RIME_FLAVORED | ( | RimeApi |  | ) |

API entry.

Acquire the version controlled RimeApi structure.

## ◆ RimeCandidateListBegin()

RIME_DEPRECATED Bool RimeCandidateListBegin | ( | RimeSessionId | session_id,
|  | RimeCandidateListIterator * | iterator )

## ◆ RimeCandidateListEnd()

RIME_DEPRECATED void RimeCandidateListEnd | ( | RimeCandidateListIterator * | iterator | ) |

## ◆ RimeCandidateListFromIndex()

RIME_DEPRECATED Bool RimeCandidateListFromIndex | ( | RimeSessionId | session_id,
|  | RimeCandidateListIterator * | iterator,
|  | int | index )

## ◆ RimeCandidateListNext()

RIME_DEPRECATED Bool RimeCandidateListNext | ( | RimeCandidateListIterator * | iterator | ) |

## ◆ RimeCleanupAllSessions()

RIME_DEPRECATED void RimeCleanupAllSessions | ( | void |  | ) |

## ◆ RimeCleanupStaleSessions()

RIME_DEPRECATED void RimeCleanupStaleSessions | ( | void |  | ) |

## ◆ RimeClearComposition()

RIME_DEPRECATED void RimeClearComposition | ( | RimeSessionId | session_id | ) |

## ◆ RimeCommitComposition()

RIME_DEPRECATED Bool RimeCommitComposition | ( | RimeSessionId | session_id | ) |

return True if there is unread commit text

## ◆ RimeConfigBeginList()

RIME_DEPRECATED Bool RimeConfigBeginList | ( | RimeConfigIterator * | iterator,
|  | RimeConfig * | config,
|  | const char * | key )

## ◆ RimeConfigBeginMap()

RIME_DEPRECATED Bool RimeConfigBeginMap | ( | RimeConfigIterator * | iterator,
|  | RimeConfig * | config,
|  | const char * | key )

## ◆ RimeConfigClear()

RIME_DEPRECATED Bool RimeConfigClear | ( | RimeConfig * | config,
|  | const char * | key )

## ◆ RimeConfigClose()

RIME_DEPRECATED Bool RimeConfigClose | ( | RimeConfig * | config | ) |

## ◆ RimeConfigCreateList()

RIME_DEPRECATED Bool RimeConfigCreateList | ( | RimeConfig * | config,
|  | const char * | key )

## ◆ RimeConfigCreateMap()

RIME_DEPRECATED Bool RimeConfigCreateMap | ( | RimeConfig * | config,
|  | const char * | key )

## ◆ RimeConfigEnd()

RIME_DEPRECATED void RimeConfigEnd | ( | RimeConfigIterator * | iterator | ) |

## ◆ RimeConfigGetBool()

RIME_DEPRECATED Bool RimeConfigGetBool | ( | RimeConfig * | config,
|  | const char * | key,
|  | Bool * | value )

## ◆ RimeConfigGetCString()

RIME_DEPRECATED const char * RimeConfigGetCString | ( | RimeConfig * | config,
|  | const char * | key )

## ◆ RimeConfigGetDouble()

RIME_DEPRECATED Bool RimeConfigGetDouble | ( | RimeConfig * | config,
|  | const char * | key,
|  | double * | value )

## ◆ RimeConfigGetInt()

RIME_DEPRECATED Bool RimeConfigGetInt | ( | RimeConfig * | config,
|  | const char * | key,
|  | int * | value )

## ◆ RimeConfigGetItem()

RIME_DEPRECATED Bool RimeConfigGetItem | ( | RimeConfig * | config,
|  | const char * | key,
|  | RimeConfig * | value )

## ◆ RimeConfigGetString()

RIME_DEPRECATED Bool RimeConfigGetString | ( | RimeConfig * | config,
|  | const char * | key,
|  | char * | value,
|  | size_t | buffer_size )

## ◆ RimeConfigInit()

RIME_DEPRECATED Bool RimeConfigInit | ( | RimeConfig * | config | ) |

## ◆ RimeConfigListSize()

RIME_DEPRECATED size_t RimeConfigListSize | ( | RimeConfig * | config,
|  | const char * | key )

## ◆ RimeConfigLoadString()

RIME_DEPRECATED Bool RimeConfigLoadString | ( | RimeConfig * | config,
|  | const char * | yaml )

## ◆ RimeConfigNext()

RIME_DEPRECATED Bool RimeConfigNext | ( | RimeConfigIterator * | iterator | ) |

## ◆ RimeConfigOpen()

RIME_DEPRECATED Bool RimeConfigOpen | ( | const char * | config_id,
|  | RimeConfig * | config )

## ◆ RimeConfigSetBool()

RIME_DEPRECATED Bool RimeConfigSetBool | ( | RimeConfig * | config,
|  | const char * | key,
|  | Bool | value )

## ◆ RimeConfigSetDouble()

RIME_DEPRECATED Bool RimeConfigSetDouble | ( | RimeConfig * | config,
|  | const char * | key,
|  | double | value )

## ◆ RimeConfigSetInt()

RIME_DEPRECATED Bool RimeConfigSetInt | ( | RimeConfig * | config,
|  | const char * | key,
|  | int | value )

## ◆ RimeConfigSetItem()

RIME_DEPRECATED Bool RimeConfigSetItem | ( | RimeConfig * | config,
|  | const char * | key,
|  | RimeConfig * | value )

## ◆ RimeConfigSetString()

RIME_DEPRECATED Bool RimeConfigSetString | ( | RimeConfig * | config,
|  | const char * | key,
|  | const char * | value )

## ◆ RimeConfigUpdateSignature()

RIME_DEPRECATED Bool RimeConfigUpdateSignature | ( | RimeConfig * | config,
|  | const char * | signer )

## ◆ RimeCreateSession()

RIME_DEPRECATED RimeSessionId RimeCreateSession | ( | void |  | ) |

## ◆ RimeDeleteCandidate()

RIME_DEPRECATED Bool RimeDeleteCandidate | ( | RimeSessionId | session_id,
|  | size_t | index )

## ◆ RimeDeleteCandidateOnCurrentPage()

RIME_DEPRECATED Bool RimeDeleteCandidateOnCurrentPage | ( | RimeSessionId | session_id,
|  | size_t | index )

## ◆ RimeDeployConfigFile()

RIME_DEPRECATED Bool RimeDeployConfigFile | ( | const char * | file_name,
|  | const char * | version_key )

## ◆ RimeDeployerInitialize()

RIME_DEPRECATED void RimeDeployerInitialize | ( | RimeTraits * | traits | ) |

## ◆ RimeDeploySchema()

RIME_DEPRECATED Bool RimeDeploySchema | ( | const char * | schema_file | ) |

## ◆ RimeDeployWorkspace()

RIME_DEPRECATED Bool RimeDeployWorkspace | ( | void |  | ) |

## ◆ RimeDestroySession()

RIME_DEPRECATED Bool RimeDestroySession | ( | RimeSessionId | session_id | ) |

## ◆ RimeFinalize()

RIME_DEPRECATED void RimeFinalize | ( | void |  | ) |

## ◆ RimeFindSession()

RIME_DEPRECATED Bool RimeFindSession | ( | RimeSessionId | session_id | ) |

## ◆ RimeFreeCommit()

RIME_DEPRECATED Bool RimeFreeCommit | ( | RimeCommit * | commit | ) |

## ◆ RimeFreeContext()

RIME_DEPRECATED Bool RimeFreeContext | ( | RIME_FLAVORED(RimeContext) * | context | ) |

## ◆ RimeFreeSchemaList()

RIME_DEPRECATED void RimeFreeSchemaList | ( | RimeSchemaList * | schema_list | ) |

## ◆ RimeFreeStatus()

RIME_DEPRECATED Bool RimeFreeStatus | ( | RIME_FLAVORED(RimeStatus) * | status | ) |

## ◆ RimeGetCommit()

RIME_DEPRECATED Bool RimeGetCommit | ( | RimeSessionId | session_id,
|  | RimeCommit * | commit )

## ◆ RimeGetContext()

RIME_DEPRECATED Bool RimeGetContext | ( | RimeSessionId | session_id,
|  | RIME_FLAVORED(RimeContext) * | context )

## ◆ RimeGetCurrentSchema()

RIME_DEPRECATED Bool RimeGetCurrentSchema | ( | RimeSessionId | session_id,
|  | char * | schema_id,
|  | size_t | buffer_size )

## ◆ RimeGetOption()

RIME_DEPRECATED Bool RimeGetOption | ( | RimeSessionId | session_id,
|  | const char * | option )

## ◆ RimeGetPrebuiltDataDir()

RIME_DEPRECATED const char * RimeGetPrebuiltDataDir | ( |  | ) |

## ◆ RimeGetPrebuiltDataDirSecure()

void RimeGetPrebuiltDataDirSecure | ( | char * | dir,
|  | size_t | buffer_size )

## ◆ RimeGetProperty()

RIME_DEPRECATED Bool RimeGetProperty | ( | RimeSessionId | session_id,
|  | const char * | prop,
|  | char * | value,
|  | size_t | buffer_size )

## ◆ RimeGetSchemaList()

RIME_DEPRECATED Bool RimeGetSchemaList | ( | RimeSchemaList * | output | ) |

## ◆ RimeGetSharedDataDir()

RIME_DEPRECATED const char * RimeGetSharedDataDir | ( | void |  | ) |

Deprecated
  use RimeApi::get_shared_data_dir_s instead.

## ◆ RimeGetSharedDataDirSecure()

void RimeGetSharedDataDirSecure | ( | char * | dir,
|  | size_t | buffer_size )

## ◆ RimeGetStagingDir()

RIME_DEPRECATED const char * RimeGetStagingDir | ( |  | ) |

## ◆ RimeGetStagingDirSecure()

void RimeGetStagingDirSecure | ( | char * | dir,
|  | size_t | buffer_size )

## ◆ RimeGetStatus()

RIME_DEPRECATED Bool RimeGetStatus | ( | RimeSessionId | session_id,
|  | RIME_FLAVORED(RimeStatus) * | status )

## ◆ RimeGetSyncDir()

RIME_DEPRECATED const char * RimeGetSyncDir | ( | void |  | ) |

Deprecated
  use RimeApi::get_sync_dir_s instead.

## ◆ RimeGetSyncDirSecure()

void RimeGetSyncDirSecure | ( | char * | dir,
|  | size_t | buffer_size )

## ◆ RimeGetUserDataDir()

RIME_DEPRECATED const char * RimeGetUserDataDir | ( | void |  | ) |

Deprecated
  use RimeApi::get_user_data_dir_s instead.

## ◆ RimeGetUserDataDirSecure()

void RimeGetUserDataDirSecure | ( | char * | dir,
|  | size_t | buffer_size )

## ◆ RimeGetUserDataSyncDir()

RIME_DEPRECATED void RimeGetUserDataSyncDir | ( | char * | dir,
|  | size_t | buffer_size )

## ◆ RimeGetUserId()

RIME_DEPRECATED const char * RimeGetUserId | ( | void |  | ) |

## ◆ RimeGetVersion()

const char * RimeGetVersion | ( |  | ) |

## ◆ RimeInitialize()

RIME_DEPRECATED void RimeInitialize | ( | RimeTraits * | traits | ) |

## ◆ RimeIsMaintenancing()

RIME_DEPRECATED Bool RimeIsMaintenancing | ( | void |  | ) |

## ◆ RimeJoinMaintenanceThread()

RIME_DEPRECATED void RimeJoinMaintenanceThread | ( | void |  | ) |

## ◆ RimePrebuildAllSchemas()

RIME_DEPRECATED Bool RimePrebuildAllSchemas | ( | void |  | ) |

## ◆ RimeProcessKey()

RIME_DEPRECATED Bool RimeProcessKey | ( | RimeSessionId | session_id,
|  | int | keycode,
|  | int | mask )

## ◆ RimeRunTask()

RIME_DEPRECATED Bool RimeRunTask | ( | const char * | task_name | ) |

Run a registered task.

## ◆ RimeSchemaOpen()

RIME_DEPRECATED Bool RimeSchemaOpen | ( | const char * | schema_id,
|  | RimeConfig * | config )

## ◆ RimeSelectCandidate()

RIME_DEPRECATED Bool RimeSelectCandidate | ( | RimeSessionId | session_id,
|  | size_t | index )

## ◆ RimeSelectCandidateOnCurrentPage()

RIME_DEPRECATED Bool RimeSelectCandidateOnCurrentPage | ( | RimeSessionId | session_id,
|  | size_t | index )

## ◆ RimeSelectSchema()

RIME_DEPRECATED Bool RimeSelectSchema | ( | RimeSessionId | session_id,
|  | const char * | schema_id )

## ◆ RimeSetInput()

RIME_DEPRECATED Bool RimeSetInput | ( | RimeSessionId | session_id,
|  | const char * | input )

## ◆ RimeSetNotificationHandler()

RIME_DEPRECATED void RimeSetNotificationHandler | ( | RimeNotificationHandler | handler,
|  | void * | context_object )

Receive notifications.

## ◆ RimeSetOption()

RIME_DEPRECATED void RimeSetOption | ( | RimeSessionId | session_id,
|  | const char * | option,
|  | Bool | value )

## ◆ RimeSetProperty()

RIME_DEPRECATED void RimeSetProperty | ( | RimeSessionId | session_id,
|  | const char * | prop,
|  | const char * | value )

## ◆ RimeSetup()

RIME_DEPRECATED void RimeSetup | ( | RimeTraits * | traits | ) |

Call this function before accessing any other API.

## ◆ RimeSimulateKeySequence()

RIME_DEPRECATED Bool RimeSimulateKeySequence | ( | RimeSessionId | session_id,
|  | const char * | key_sequence )

## ◆ RimeStartMaintenance()

RIME_DEPRECATED Bool RimeStartMaintenance | ( | Bool | full_check | ) |

## ◆ RimeStartMaintenanceOnWorkspaceChange()

RIME_DEPRECATED Bool RimeStartMaintenanceOnWorkspaceChange | ( | void |  | ) |

Deprecated
  Use RimeStartMaintenance(full_check = False) instead.

## ◆ RimeSyncUserData()

RIME_DEPRECATED Bool RimeSyncUserData | ( | void |  | ) |

## ◆ RimeUserConfigOpen()

RIME_DEPRECATED Bool RimeUserConfigOpen | ( | const char * | config_id,
|  | RimeConfig * | config )