diff --git a/src/rime/context.h b/src/rime/context.h index 988a5817d3..e31ea3cd53 100644 --- a/src/rime/context.h +++ b/src/rime/context.h @@ -16,7 +16,7 @@ namespace rime { class Candidate; class KeyEvent; -class Context { +class RIME_API Context { public: using Notifier = signal; using OptionUpdateNotifier = signal; @@ -28,11 +28,11 @@ class Context { Context() = default; ~Context() = default; - RIME_API bool Commit(); + bool Commit(); string GetCommitText() const; string GetScriptText() const; Preedit GetPreedit() const; - RIME_API bool IsComposing() const; + bool IsComposing() const; bool HasMenu() const; an GetSelectedCandidate() const; diff --git a/src/rime/dict/mapped_file.h b/src/rime/dict/mapped_file.h index f2ac1ffa7e..03352f0314 100644 --- a/src/rime/dict/mapped_file.h +++ b/src/rime/dict/mapped_file.h @@ -81,10 +81,10 @@ struct List { class MappedFileImpl; -class MappedFile : boost::noncopyable { +class RIME_API MappedFile : boost::noncopyable { protected: explicit MappedFile(const string& file_name); - RIME_API virtual ~MappedFile(); + virtual ~MappedFile(); bool Create(size_t capacity); bool OpenReadOnly(); @@ -108,8 +108,8 @@ class MappedFile : boost::noncopyable { public: bool Exists() const; bool IsOpen() const; - RIME_API void Close(); - RIME_API bool Remove(); + void Close(); + bool Remove(); template T* Find(size_t offset); diff --git a/src/rime/dict/string_table.h b/src/rime/dict/string_table.h index d9c70b6e5f..4e8872bd44 100644 --- a/src/rime/dict/string_table.h +++ b/src/rime/dict/string_table.h @@ -10,6 +10,7 @@ #include #include +#include #include namespace rime { @@ -18,7 +19,7 @@ using StringId = marisa::UInt32; const StringId kInvalidStringId = (StringId)(-1); -class StringTable { +class RIME_API StringTable { public: StringTable() = default; virtual ~StringTable() = default; @@ -37,7 +38,7 @@ class StringTable { marisa::Trie trie_; }; -class StringTableBuilder : public StringTable { +class RIME_API StringTableBuilder : public StringTable { public: void Add(const string& key, double weight = 1.0, diff --git a/src/rime/segmentation.h b/src/rime/segmentation.h index b30e00b448..4019844645 100644 --- a/src/rime/segmentation.h +++ b/src/rime/segmentation.h @@ -53,17 +53,17 @@ struct Segment { an GetSelectedCandidate() const; }; -class Segmentation : public vector { +class RIME_API Segmentation : public vector { public: - RIME_API Segmentation(); + Segmentation(); virtual ~Segmentation() {} - RIME_API void Reset(const string& input); + void Reset(const string& input); void Reset(size_t num_segments); bool AddSegment(Segment segment); bool Forward(); bool Trim(); - RIME_API bool HasFinishedSegmentation() const; + bool HasFinishedSegmentation() const; size_t GetCurrentStartPosition() const; size_t GetCurrentEndPosition() const; size_t GetCurrentSegmentLength() const; diff --git a/src/rime/service.h b/src/rime/service.h index 3a8b47b880..2b3111afac 100644 --- a/src/rime/service.h +++ b/src/rime/service.h @@ -56,7 +56,7 @@ class Session { class ResourceResolver; struct ResourceType; -class Service { +class RIME_API Service { public: ~Service(); @@ -84,7 +84,7 @@ class Service { Deployer& deployer() { return deployer_; } bool disabled() { return !started_ || deployer_.IsMaintenanceMode(); } - RIME_API static Service& instance(); + static Service& instance(); private: Service(); diff --git a/src/rime/translation.h b/src/rime/translation.h index dfc3d206e9..454eb2740e 100644 --- a/src/rime/translation.h +++ b/src/rime/translation.h @@ -51,7 +51,7 @@ class UniqueTranslation : public Translation { an candidate_; }; -class FifoTranslation : public Translation { +class RIME_API FifoTranslation : public Translation { public: FifoTranslation();