EekboardContext

EekboardContext — client interface of eekboard input context service

Functions

Properties

gboolean visible Read

Signals

void destroyed Run Last
void disabled Run Last
void enabled Run Last
void key-activated Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── GDBusProxy
        ╰── EekboardContext

Implemented Interfaces

EekboardContext implements GDBusInterface, GInitable and GAsyncInitable.

Description

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

Functions

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.

Parameters

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 .

Parameters

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 .

Parameters

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 .

Parameters

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().

Parameters

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.

Parameters

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 .

Parameters

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 .

Parameters

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.

Parameters

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.

Parameters

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”.

Parameters

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.

Parameters

context

an EekboardContext

 

eekboard_context_set_fullscreen ()

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

Set the fullscreen mode of context .

Parameters

context

an EekboardContext

 

fullscreen

a flag to indicate fullscreen mode

 

cancellable

a GCancellable

 

Types and Values

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);
};

Members

enabled ()

class handler for “enabled” signal

 

disabled ()

class handler for “disabled” signal

 

destroyed ()

class handler for “destroyed” signal

 

key_activated ()

   

EekboardContextPrivate

typedef struct _EekboardContextPrivate EekboardContextPrivate;

Property Details

The “visible” property

  “visible”                  gboolean

Flag to indicate if keyboard is visible or not.

Owner: EekboardContext

Flags: Read

Default value: FALSE

Signal Details

The “destroyed” signal

void
user_function (EekboardContext *context,
               gpointer         user_data)

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

Parameters

context

an EekboardContext

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “disabled” signal

void
user_function (EekboardContext *context,
               gpointer         user_data)

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

Parameters

context

an EekboardContext

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “enabled” signal

void
user_function (EekboardContext *context,
               gpointer         user_data)

Emitted when context is enabled.

Parameters

context

an EekboardContext

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “key-activated” signal

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

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

Parameters

context

an EekboardContext

 

keycode

a keycode

 

symbol

an EekSymbol

 

modifiers

modifiers

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last