|
SDL
2.0
|
#include "../../SDL_internal.h"#include <unistd.h>#include "SDL_fcitx.h"#include "SDL_keycode.h"#include "SDL_keyboard.h"#include "../../events/SDL_keyboard_c.h"#include "SDL_dbus.h"#include "SDL_syswm.h"#include "SDL_hints.h"
Include dependency graph for SDL_fcitx.c:Go to the source code of this file.
Data Structures | |
| struct | FcitxClient |
Macros | |
| #define | FCITX_DBUS_SERVICE "org.freedesktop.portal.Fcitx" |
| #define | FCITX_IM_DBUS_PATH "/org/freedesktop/portal/inputmethod" |
| #define | FCITX_IM_DBUS_INTERFACE "org.fcitx.Fcitx.InputMethod1" |
| #define | FCITX_IC_DBUS_INTERFACE "org.fcitx.Fcitx.InputContext1" |
| #define | DBUS_TIMEOUT 500 |
Functions | |
| static char * | GetAppName () |
| size_t | Fcitx_GetPreeditString (SDL_DBusContext *dbus, DBusMessage *msg, char **ret) |
| static DBusHandlerResult | DBus_MessageFilter (DBusConnection *conn, DBusMessage *msg, void *data) |
| static void | FcitxClientICCallMethod (FcitxClient *client, const char *method) |
| static void | Fcitx_SetCapabilities (void *data, const char *name, const char *old_val, const char *internal_editing) |
| static SDL_bool | FcitxCreateInputContext (SDL_DBusContext *dbus, const char *appname, char **ic_path) |
| static SDL_bool | FcitxClientCreateIC (FcitxClient *client) |
| static Uint32 | Fcitx_ModState (void) |
| SDL_bool | SDL_Fcitx_Init () |
| void | SDL_Fcitx_Quit () |
| void | SDL_Fcitx_SetFocus (SDL_bool focused) |
| void | SDL_Fcitx_Reset (void) |
| SDL_bool | SDL_Fcitx_ProcessKeyEvent (Uint32 keysym, Uint32 keycode) |
| void | SDL_Fcitx_UpdateTextRect (SDL_Rect *rect) |
| void | SDL_Fcitx_PumpEvents (void) |
Variables | |
| static FcitxClient | fcitx_client |
| #define DBUS_TIMEOUT 500 |
Definition at line 43 of file SDL_fcitx.c.
| #define FCITX_DBUS_SERVICE "org.freedesktop.portal.Fcitx" |
Definition at line 36 of file SDL_fcitx.c.
| #define FCITX_IC_DBUS_INTERFACE "org.fcitx.Fcitx.InputContext1" |
Definition at line 41 of file SDL_fcitx.c.
| #define FCITX_IM_DBUS_INTERFACE "org.fcitx.Fcitx.InputMethod1" |
Definition at line 40 of file SDL_fcitx.c.
| #define FCITX_IM_DBUS_PATH "/org/freedesktop/portal/inputmethod" |
Definition at line 38 of file SDL_fcitx.c.
|
static |
Definition at line 136 of file SDL_fcitx.c.
References cursor, Fcitx_GetPreeditString(), FCITX_IC_DBUS_INTERFACE, i, NULL, SDL_Fcitx_UpdateTextRect(), SDL_free, SDL_SendEditingText(), SDL_SendKeyboardText(), SDL_strlen, SDL_TEXTEDITINGEVENT_TEXT_SIZE, SDL_TEXTINPUTEVENT_TEXT_SIZE, SDL_utf8strlcpy, SDL_utf8strlen, and text.
Referenced by FcitxClientCreateIC().
| size_t Fcitx_GetPreeditString | ( | SDL_DBusContext * | dbus, |
| DBusMessage * | msg, | ||
| char ** | ret | ||
| ) |
Definition at line 87 of file SDL_fcitx.c.
References NULL, SDL_malloc, SDL_strlcpy, SDL_strlen, sub, and text.
Referenced by DBus_MessageFilter().
Definition at line 283 of file SDL_fcitx.c.
References KMOD_ALT, KMOD_CAPS, KMOD_CTRL, KMOD_LGUI, KMOD_MODE, KMOD_NUM, KMOD_RGUI, KMOD_SHIFT, and SDL_GetModState.
Referenced by SDL_Fcitx_ProcessKeyEvent().
|
static |
Definition at line 201 of file SDL_fcitx.c.
References FCITX_DBUS_SERVICE, FCITX_IC_DBUS_INTERFACE, and FcitxClient::ic_path.
Referenced by FcitxClientCreateIC().
|
static |
Definition at line 250 of file SDL_fcitx.c.
References FcitxClient::dbus, DBus_MessageFilter(), Fcitx_SetCapabilities(), FcitxCreateInputContext(), GetAppName(), FcitxClient::ic_path, NULL, SDL_AddHintCallback, SDL_FALSE, SDL_free, SDL_HINT_IME_INTERNAL_EDITING, SDL_strdup, and SDL_TRUE.
Referenced by SDL_Fcitx_Init().
|
static |
Definition at line 192 of file SDL_fcitx.c.
References FCITX_DBUS_SERVICE, FCITX_IC_DBUS_INTERFACE, and FcitxClient::ic_path.
Referenced by SDL_Fcitx_Quit(), SDL_Fcitx_Reset(), and SDL_Fcitx_SetFocus().
|
static |
Definition at line 221 of file SDL_fcitx.c.
References FCITX_DBUS_SERVICE, FCITX_IM_DBUS_INTERFACE, FCITX_IM_DBUS_PATH, NULL, retval, SDL_FALSE, SDL_TRUE, and sub.
Referenced by FcitxClientCreateIC().
|
static |
Definition at line 59 of file SDL_fcitx.c.
References SDL_snprintf, SDL_strdup, and SDL_strrchr.
Referenced by FcitxClientCreateIC().
Definition at line 301 of file SDL_fcitx.c.
References FcitxClient::cursor_rect, FcitxClient::dbus, fcitx_client, FcitxClientCreateIC(), SDL_Rect::h, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by InitIME().
Definition at line 341 of file SDL_fcitx.c.
References fcitx_client, FCITX_DBUS_SERVICE, FCITX_IC_DBUS_INTERFACE, Fcitx_ModState(), FcitxClient::ic_path, NULL, SDL_FALSE, SDL_Fcitx_UpdateTextRect(), SDL_TRUE, and state.
Referenced by InitIME().
Definition at line 416 of file SDL_fcitx.c.
References FcitxClient::dbus, and fcitx_client.
Referenced by InitIME().
Definition at line 314 of file SDL_fcitx.c.
References fcitx_client, FcitxClientICCallMethod(), FcitxClient::ic_path, NULL, and SDL_free.
Referenced by InitIME().
Definition at line 334 of file SDL_fcitx.c.
References fcitx_client, and FcitxClientICCallMethod().
Referenced by InitIME().
Definition at line 324 of file SDL_fcitx.c.
References fcitx_client, and FcitxClientICCallMethod().
Referenced by InitIME().
Definition at line 365 of file SDL_fcitx.c.
References cursor, FcitxClient::cursor_rect, SDL_VideoDisplay::driverdata, fcitx_client, FCITX_DBUS_SERVICE, FCITX_IC_DBUS_INTERFACE, FcitxClient::ic_path, SDL_SysWMinfo::info, NULL, rect, SDL_DisplayData::screen, SDL_GetDisplayForWindow(), SDL_GetKeyboardFocus, SDL_GetWindowPosition, SDL_GetWindowSize, SDL_GetWindowWMInfo, SDL_memcpy, SDL_SYSWM_X11, SDL_VERSION, SDL_SysWMinfo::subsystem, unused, SDL_SysWMinfo::version, and SDL_SysWMinfo::x11.
Referenced by DBus_MessageFilter(), InitIME(), and SDL_Fcitx_ProcessKeyEvent().
|
static |
Definition at line 56 of file SDL_fcitx.c.
Referenced by SDL_Fcitx_Init(), SDL_Fcitx_ProcessKeyEvent(), SDL_Fcitx_PumpEvents(), SDL_Fcitx_Quit(), SDL_Fcitx_Reset(), SDL_Fcitx_SetFocus(), and SDL_Fcitx_UpdateTextRect().