IBusHotkeyProfile

IBusHotkeyProfile — Hotkeys and associated events.

Stability Level

Stable, unless otherwise indicated

Functions

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── IBusObject
            ╰── IBusSerializable
                ╰── IBusHotkeyProfile

Description

An IBusHotkeyProfile associates a hotkey and an event.

Functions

ibus_hotkey_profile_add_hotkey ()

gboolean
ibus_hotkey_profile_add_hotkey (IBusHotkeyProfile *profile,
                                guint keyval,
                                guint modifiers,
                                GQuark event);

Adds a hotkey and its associated event to an IBusHotkeyProfile.

Parameters

profile

An IBusHotkeyProfile.

 

keyval

Keycode of the hotkey.

 

modifiers

Modifiers of the hotkey.

 

event

The event to be associated.

 

Returns

Always TRUE.


ibus_hotkey_profile_add_hotkey_from_string ()

gboolean
ibus_hotkey_profile_add_hotkey_from_string
                               (IBusHotkeyProfile *profile,
                                const gchar *str,
                                GQuark event);

Adds a hotkey and its associated event to an IBusHotkeyProfile. The hotkey is in string format, such like

Control+Shift+A.

Parameters

profile

An IBusHotkeyProfile.

 

str

Key in string representation. '+' is the separator.

 

event

The event to be associated.

 

Returns

FALSE if str contains invalid symbol; TRUE otherwise.


ibus_hotkey_profile_remove_hotkey ()

gboolean
ibus_hotkey_profile_remove_hotkey (IBusHotkeyProfile *profile,
                                   guint keyval,
                                   guint modifiers);

Removes the hotkey for an IBusHotkeyProfile.

Parameters

profile

An IBusHotkeyProfile.

 

keyval

Keycode of the hotkey.

 

modifiers

Modifiers of the hotkey.

 

Returns

FALSE if the key is not in profile , TRUE otherwise.


ibus_hotkey_profile_remove_hotkey_by_event ()

gboolean
ibus_hotkey_profile_remove_hotkey_by_event
                               (IBusHotkeyProfile *profile,
                                GQuark event);

Removes the hotkey for an IBusHotkeyProfile by event.

Parameters

profile

An IBusHotkeyProfile.

 

event

The associated event.

 

Returns

FALSE if no such event in profile , TRUE otherwise.


ibus_hotkey_profile_filter_key_event ()

GQuark
ibus_hotkey_profile_filter_key_event (IBusHotkeyProfile *profile,
                                      guint keyval,
                                      guint modifiers,
                                      guint prev_keyval,
                                      guint prev_modifiers,
                                      gpointer user_data);

Emits a ::trigger signal when a hotkey is in a profile.

Parameters

profile

An IBusHotkeyProfile.

 

keyval

Keycode of the hotkey.

 

modifiers

Modifiers of the hotkey.

 

prev_keyval

Keycode of the hotkey.

 

prev_modifiers

Modifiers of the hotkey.

 

user_data

user data for signal "trigger".

 

Returns

0 if releasing a hotkey and the hotkey is not in the profile; an associated event otherwise.

See also: ::trigger


ibus_hotkey_profile_lookup_hotkey ()

GQuark
ibus_hotkey_profile_lookup_hotkey (IBusHotkeyProfile *profile,
                                   guint keyval,
                                   guint modifiers);

Parameters

profile

An IBusHotkeyProfile.

 

keyval

Keycode of the hotkey.

 

modifiers

Modifiers of the hotkey.

 

Returns

The event associated to the hotkey or 0 if the hotkey is not in the profile.

Types and Values

struct IBusHotkeyProfile

struct IBusHotkeyProfile;

An opaque data type representing an IBusHotkeyProfile.

Signal Details

The “trigger” signal

void
user_function (IBusHotkeyProfile *profile,
               guint              event,
               gpointer           user_data,
               gpointer           user_data)

Emitted when a hotkey is pressed and the hotkey is in profile. Implement the member function trigger() in extended class to receive this signal.

The last parameter, user_data is not actually a valid parameter. It is displayed because of GtkDoc bug.

Parameters

profile

An IBusHotkeyProfile.

 

event

An event in GQuark.

 

user_data

User data for callback.

 

user_data

user data set when the signal handler was connected.

 

Flags: Has Details