File: fcitxgclient.h

package info (click to toggle)
fcitx5-gtk 5.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 608 kB
  • sloc: cpp: 6,313; ansic: 1,268; makefile: 5
file content (75 lines) | stat: -rw-r--r-- 2,901 bytes parent folder | download | duplicates (4)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
 * SPDX-FileCopyrightText: 2012~2012 CSSlayer <wengxt@gmail.com>
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#ifndef CLIENT_IM_H
#define CLIENT_IM_H

#include "fcitxgwatcher.h"
#include <glib-object.h>

G_BEGIN_DECLS

/*
 * Type macros
 */

/* define GOBJECT macros */
#define FCITX_G_TYPE_CLIENT (fcitx_g_client_get_type())

G_DECLARE_FINAL_TYPE(FcitxGClient, fcitx_g_client, FCITX_G, CLIENT, GObject)

typedef struct _FcitxGClientPrivate FcitxGClientPrivate;
typedef struct _FcitxGPreeditItem FcitxGPreeditItem;
typedef struct _FcitxGCandidateItem FcitxGCandidateItem;

struct _FcitxGPreeditItem {
    gchar *string;
    gint32 type;
};

struct _FcitxGCandidateItem {
    gchar *label;
    gchar *candidate;
};

FcitxGClient *fcitx_g_client_new();
FcitxGClient *fcitx_g_client_new_with_watcher(FcitxGWatcher *watcher);
gboolean fcitx_g_client_is_valid(FcitxGClient *self);
gboolean fcitx_g_client_process_key_sync(FcitxGClient *self, guint32 keyval,
                                         guint32 keycode, guint32 state,
                                         gboolean isRelease, guint32 t);
void fcitx_g_client_process_key(FcitxGClient *self, guint32 keyval,
                                guint32 keycode, guint32 state,
                                gboolean isRelease, guint32 t,
                                gint timeout_msec, GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);
gboolean fcitx_g_client_process_key_finish(FcitxGClient *self,
                                           GAsyncResult *res);
const guint8 *fcitx_g_client_get_uuid(FcitxGClient *self);
void fcitx_g_client_focus_in(FcitxGClient *self);
void fcitx_g_client_focus_out(FcitxGClient *self);
void fcitx_g_client_set_display(FcitxGClient *self, const gchar *display);
void fcitx_g_client_set_program(FcitxGClient *self, const gchar *program);
void fcitx_g_client_set_use_batch_process_key_event(FcitxGClient *self,
                                                    gboolean batch);
void fcitx_g_client_set_cursor_rect(FcitxGClient *self, gint x, gint y, gint w,
                                    gint h);
void fcitx_g_client_set_cursor_rect_with_scale_factor(FcitxGClient *self,
                                                      gint x, gint y, gint w,
                                                      gint h, gdouble scale);
void fcitx_g_client_set_surrounding_text(FcitxGClient *self, gchar *text,
                                         guint cursor, guint anchor);
void fcitx_g_client_set_capability(FcitxGClient *self, guint64 flags);
void fcitx_g_client_prev_page(FcitxGClient *self);
void fcitx_g_client_next_page(FcitxGClient *self);
void fcitx_g_client_select_candidate(FcitxGClient *self, int index);

void fcitx_g_client_reset(FcitxGClient *self);

G_END_DECLS

#endif // CLIENT_IM_H