EekboardContext

EekboardContext — client interface of eekboard input context service

Synopsis

struct              EekboardContext;
struct              EekboardContextClass;
EekboardContext *   eekboard_context_new                (GDBusConnection *connection,
                                                         const gchar *object_path,
                                                         GCancellable *cancellable);
guint               eekboard_context_add_keyboard       (EekboardContext *context,
                                                         const gchar *keyboard,
                                                         GCancellable *cancellable);
void                eekboard_context_remove_keyboard    (EekboardContext *context,
                                                         guint keyboard_id,
                                                         GCancellable *cancellable);
void                eekboard_context_set_keyboard       (EekboardContext *context,
                                                         guint keyboard_id,
                                                         GCancellable *cancellable);
void                eekboard_context_show_keyboard      (EekboardContext *context,
                                                         GCancellable *cancellable);
void                eekboard_context_hide_keyboard      (EekboardContext *context,
                                                         GCancellable *cancellable);
void                eekboard_context_set_group          (EekboardContext *context,
                                                         gint group,
                                                         GCancellable *cancellable);
gint                eekboard_context_get_group          (EekboardContext *context,
                                                         GCancellable *cancellable);
void                eekboard_context_press_keycode      (EekboardContext *context,
                                                         guint keycode,
                                                         GCancellable *cancellable);
void                eekboard_context_release_keycode    (EekboardContext *context,
                                                         guint keycode,
                                                         GCancellable *cancellable);
void                eekboard_context_set_enabled        (EekboardContext *context,
                                                         gboolean enabled);
gboolean            eekboard_context_is_enabled         (EekboardContext *context);
void                eekboard_context_set_fullscreen     (EekboardContext *context,
                                                         gboolean fullscreen,
                                                         GCancellable *cancellable);
                    EekboardContextPrivate;

Object Hierarchy

  GObject
   +----GDBusProxy
         +----EekboardContext

Implemented Interfaces

EekboardContext implements GDBusInterface, GInitable and GAsyncInitable.

Properties

  "visible"                  gboolean              : Read

Signals

  "destroyed"                                      : Run Last
  "disabled"                                       : Run Last
  "enabled"                                        : Run Last
  "key-activated"                                  : Run Last

Description

The EekboardContext class provides a client access to remote input context.

Details

struct EekboardContext

struct EekboardContext;

The EekboardContext structure contains only private data and should only be accessed using the provided API.


struct EekboardContextClass

struct EekboardContextClass {
    /* signals */
    void (*enabled)       (EekboardContext *self);
    void (*disabled)      (EekboardContext *self);
    void (*destroyed)     (EekboardContext *self);

    void (*key_activated) (EekboardContext *self,
                           guint            keycode,
                           EekSymbol       *symbol,
                           guint            modifiers);
};

enabled ()

class handler for "enabled" signal

disabled ()

class handler for "disabled" signal

destroyed ()

class handler for "destroyed" signal

key_activated ()


eekboard_context_new ()

EekboardContext *   eekboard_context_new                (GDBusConnection *connection,
                                                         const gchar *object_path,
                                                         GCancellable *cancellable);

Create a D-Bus proxy of an input context maintained by eekboard-server. This function is seldom called from applications since eekboard_server_create_context() calls it implicitly.

connection :

a GDBusConnection

object_path :

object path

cancellable :

a GCancellable

eekboard_context_add_keyboard ()

guint               eekboard_context_add_keyboard       (EekboardContext *context,
                                                         const gchar *keyboard,
                                                         GCancellable *cancellable);

Register keyboard in context.

context :

an EekboardContext

keyboard :

a string representing keyboard

cancellable :

a GCancellable

eekboard_context_remove_keyboard ()

void                eekboard_context_remove_keyboard    (EekboardContext *context,
                                                         guint keyboard_id,
                                                         GCancellable *cancellable);

Unregister the keyboard with keyboard_id in context.

context :

an EekboardContext

keyboard_id :

keyboard ID

cancellable :

a GCancellable

eekboard_context_set_keyboard ()

void                eekboard_context_set_keyboard       (EekboardContext *context,
                                                         guint keyboard_id,
                                                         GCancellable *cancellable);

Select a keyboard with ID keyboard_id in context.

context :

an EekboardContext

keyboard_id :

keyboard ID

cancellable :

a GCancellable

eekboard_context_show_keyboard ()

void                eekboard_context_show_keyboard      (EekboardContext *context,
                                                         GCancellable *cancellable);

Request eekboard-server to show a keyboard set by eekboard_context_set_keyboard().

context :

an EekboardContext

cancellable :

a GCancellable

eekboard_context_hide_keyboard ()

void                eekboard_context_hide_keyboard      (EekboardContext *context,
                                                         GCancellable *cancellable);

Request eekboard-server to hide a keyboard.

context :

an EekboardContext

cancellable :

a GCancellable

eekboard_context_set_group ()

void                eekboard_context_set_group          (EekboardContext *context,
                                                         gint group,
                                                         GCancellable *cancellable);

Set the keyboard group of context.

context :

an EekboardContext

group :

group number

cancellable :

a GCancellable

eekboard_context_get_group ()

gint                eekboard_context_get_group          (EekboardContext *context,
                                                         GCancellable *cancellable);

Get the keyboard group of context.

context :

an EekboardContext

cancellable :

a GCancellable

eekboard_context_press_keycode ()

void                eekboard_context_press_keycode      (EekboardContext *context,
                                                         guint keycode,
                                                         GCancellable *cancellable);

Tell eekboard-server that a key identified by keycode is pressed.

context :

an EekboardContext

keycode :

keycode number

cancellable :

a GCancellable

eekboard_context_release_keycode ()

void                eekboard_context_release_keycode    (EekboardContext *context,
                                                         guint keycode,
                                                         GCancellable *cancellable);

Tell eekboard-server that a key identified by keycode is released.

context :

an EekboardContext

keycode :

keycode number

cancellable :

a GCancellable

eekboard_context_set_enabled ()

void                eekboard_context_set_enabled        (EekboardContext *context,
                                                         gboolean enabled);

Set context enabled or disabled. This function is seldom called since the flag is set via D-Bus signal "enabled" and "disabled".

context :

an EekboardContext

enabled :

flag to indicate if context is enabled

eekboard_context_is_enabled ()

gboolean            eekboard_context_is_enabled         (EekboardContext *context);

Check if context is enabled.

context :

an EekboardContext

eekboard_context_set_fullscreen ()

void                eekboard_context_set_fullscreen     (EekboardContext *context,
                                                         gboolean fullscreen,
                                                         GCancellable *cancellable);

Set the fullscreen mode of context.

context :

an EekboardContext

fullscreen :

a flag to indicate fullscreen mode

cancellable :

a GCancellable

EekboardContextPrivate

typedef struct _EekboardContextPrivate EekboardContextPrivate;

Property Details

The "visible" property

  "visible"                  gboolean              : Read

Flag to indicate if keyboard is visible or not.

Default value: FALSE

Signal Details

The "destroyed" signal

void                user_function                      (EekboardContext *context,
                                                        gpointer         user_data)      : Run Last

The ::destroyed signal is emitted each time the name of remote end is vanished.

context :

an EekboardContext

user_data :

user data set when the signal handler was connected.

The "disabled" signal

void                user_function                      (EekboardContext *context,
                                                        gpointer         user_data)      : Run Last

The ::disabled signal is emitted each time context is disabled.

context :

an EekboardContext

user_data :

user data set when the signal handler was connected.

The "enabled" signal

void                user_function                      (EekboardContext *context,
                                                        gpointer         user_data)      : Run Last

Emitted when context is enabled.

context :

an EekboardContext

user_data :

user data set when the signal handler was connected.

The "key-activated" signal

void                user_function                      (EekboardContext *context,
                                                        guint            keycode,
                                                        GObject         *symbol,
                                                        guint            modifiers,
                                                        gpointer         user_data)      : Run Last

The ::key-activated signal is emitted each time a key is pressed in context.

context :

an EekboardContext

keycode :

a keycode

symbol :

an EekSymbol

modifiers :

modifiers

user_data :

user data set when the signal handler was connected.