Skip to content

Commit

Permalink
expose candidate operation apis (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj authored Jun 23, 2023
1 parent 1c43fe5 commit 6772e2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rime_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -971,23 +971,23 @@ static bool do_with_candidate_on_current_page(
}


Bool RimeSelectCandidate(RimeSessionId session_id, size_t index) {
RIME_API Bool RimeSelectCandidate(RimeSessionId session_id, size_t index) {
return do_with_candidate(session_id, index, &Context::Select);
}

Bool RimeSelectCandidateOnCurrentPage(RimeSessionId session_id, size_t index) {
RIME_API Bool RimeSelectCandidateOnCurrentPage(RimeSessionId session_id, size_t index) {
return do_with_candidate_on_current_page(session_id, index, &Context::Select);
}

const char* RimeGetVersion() {
return RIME_VERSION;
}

Bool RimeDeleteCandidate(RimeSessionId session_id, size_t index) {
RIME_API Bool RimeDeleteCandidate(RimeSessionId session_id, size_t index) {
return do_with_candidate(session_id, index, &Context::DeleteCandidate);
}

Bool RimeDeleteCandidateOnCurrentPage(RimeSessionId session_id, size_t index) {
RIME_API Bool RimeDeleteCandidateOnCurrentPage(RimeSessionId session_id, size_t index) {
return do_with_candidate_on_current_page(
session_id, index, &Context::DeleteCandidate);
}
Expand Down
4 changes: 4 additions & 0 deletions src/rime_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ RIME_API void RimeCandidateListEnd(RimeCandidateListIterator* iterator);
RIME_API Bool RimeCandidateListFromIndex(RimeSessionId session_id,
RimeCandidateListIterator* iterator,
int index);
RIME_API Bool RimeSelectCandidate(RimeSessionId session_id, size_t index);
RIME_API Bool RimeSelectCandidateOnCurrentPage(RimeSessionId session_id, size_t index);
RIME_API Bool RimeDeleteCandidate(RimeSessionId session_id, size_t index);
RIME_API Bool RimeDeleteCandidateOnCurrentPage(RimeSessionId session_id, size_t index);

// Runtime options

Expand Down

0 comments on commit 6772e2d

Please sign in to comment.