Skip to content

Commit

Permalink
(rime_proto.capnp): set a C++ namespace to avoid name conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Sep 5, 2020
1 parent 4a10263 commit 77dea83
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/rime_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <rime/setup.h>
#include <rime/signature.h>
#include <rime_api.h>
#include <rime_proto.capnp.h>

using namespace rime;
using namespace std::placeholders;
Expand Down
13 changes: 8 additions & 5 deletions src/rime_proto.capnp
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
@0xde912f558dde6b99;

struct RimeCommit {
using Cxx = import "/capnp/c++.capnp";
$Cxx.namespace("rime::proto");

struct Commit {
# Text to commit to input field.
text @0 :Text;
}

struct RimeCandidate {
struct Candidate {
text @0 :Text;
comment @1 :Text;
}

struct RimeContext {
struct Context {
# Input context.

struct Composition {
Expand All @@ -29,7 +32,7 @@ struct RimeContext {
pageNo @1 :Int32;
isLastPage @2 :Bool;
highlightedCandidateIndex @3 :Int32;
candidates @4 :List(RimeCandidate);
candidates @4 :List(Candidate);
selectKeys @5 :Text;
selectLabels @6 :List(Text);
}
Expand All @@ -38,7 +41,7 @@ struct RimeContext {
menu @1 :Menu;
}

struct RimeStatus {
struct Status {
schemaId @0 :Text;
schemaName @1 :Text;
isDisabled @2 :Bool;
Expand Down

0 comments on commit 77dea83

Please sign in to comment.