Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export symbols for librime-predict #744

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/rime/context.h
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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