forked from fcitx/fcitx5-rime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrimeservice.h
41 lines (32 loc) · 1.09 KB
/
rimeservice.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* SPDX-FileCopyrightText: 2021~2021 CSSlayer <[email protected]>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*
*/
#ifndef _FCITX5_RIME_RIMESERVICE_H_
#define _FCITX5_RIME_RIMESERVICE_H_
#include <fcitx-utils/dbus/message.h>
#include <fcitx-utils/dbus/objectvtable.h>
namespace fcitx {
class RimeEngine;
class RimeState;
class RimeService : public dbus::ObjectVTable<RimeService> {
public:
RimeService(RimeEngine *engine);
void setAsciiMode(bool asciiMode);
bool isAsciiMode();
void setSchema(const std::string &schema);
std::string currentSchema();
std::vector<std::string> listAllSchemas();
private:
RimeState *currentState();
FCITX_OBJECT_VTABLE_METHOD(setAsciiMode, "SetAsciiMode", "b", "");
FCITX_OBJECT_VTABLE_METHOD(isAsciiMode, "IsAsciiMode", "", "b");
FCITX_OBJECT_VTABLE_METHOD(setSchema, "SetSchema", "s", "");
FCITX_OBJECT_VTABLE_METHOD(currentSchema, "GetCurrentSchema", "", "s");
FCITX_OBJECT_VTABLE_METHOD(listAllSchemas, "ListAllSchemas", "", "as");
RimeEngine *engine_;
};
} // namespace fcitx
#endif // _FCITX5_RIME_RIMESERVICE_H_