Skip to content

Commit

Permalink
export symbols for librime-predict (rime#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj authored and graphemecluster committed Oct 23, 2023
1 parent 2a849c6 commit 72893fe
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
6 changes: 3 additions & 3 deletions src/rime/context.h
Expand Up @@ -16,7 +16,7 @@ namespace rime {
class Candidate;
class KeyEvent;

class Context {
class RIME_API Context {
public:
using Notifier = signal<void(Context* ctx)>;
using OptionUpdateNotifier = signal<void(Context* ctx, const string& option)>;
Expand All @@ -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<Candidate> GetSelectedCandidate() const;

Expand Down
8 changes: 4 additions & 4 deletions src/rime/dict/mapped_file.h
Expand Up @@ -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();
Expand All @@ -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 <class T>
T* Find(size_t offset);
Expand Down
5 changes: 3 additions & 2 deletions src/rime/dict/string_table.h
Expand Up @@ -10,6 +10,7 @@

#include <utility>
#include <marisa.h>
#include <rime_api.h>
#include <rime/common.h>

namespace rime {
Expand All @@ -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;
Expand All @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions src/rime/segmentation.h
Expand Up @@ -53,17 +53,17 @@ struct Segment {
an<Candidate> GetSelectedCandidate() const;
};

class Segmentation : public vector<Segment> {
class RIME_API Segmentation : public vector<Segment> {
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;
Expand Down
4 changes: 2 additions & 2 deletions src/rime/service.h
Expand Up @@ -56,7 +56,7 @@ class Session {
class ResourceResolver;
struct ResourceType;

class Service {
class RIME_API Service {
public:
~Service();

Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/rime/translation.h
Expand Up @@ -51,7 +51,7 @@ class UniqueTranslation : public Translation {
an<Candidate> candidate_;
};

class FifoTranslation : public Translation {
class RIME_API FifoTranslation : public Translation {
public:
FifoTranslation();

Expand Down

0 comments on commit 72893fe

Please sign in to comment.