Top | ![]() |
![]() |
![]() |
![]() |
A GObject wrapper for Gkbd that provides additional UI element support for keyboard layout flags and abbreviations, as well as Wfacilities to distinguish regional and hardware-based variants which might otherwise appear identical in a layout list.
XAppKbdLayoutController *
xapp_kbd_layout_controller_new (void
);
Creates a new XAppKbdLayoutController instance.
gboolean
xapp_kbd_layout_controller_get_enabled
(XAppKbdLayoutController *controller
);
Returns whether or not the layout controller is enabled
guint
xapp_kbd_layout_controller_get_current_group
(XAppKbdLayoutController *controller
);
Selects the previous group in the group list.
void xapp_kbd_layout_controller_set_current_group (XAppKbdLayoutController *controller
,guint group
);
Selects the given group number as active.
void
xapp_kbd_layout_controller_next_group (XAppKbdLayoutController *controller
);
Selects the next group in the group list.
void
xapp_kbd_layout_controller_previous_group
(XAppKbdLayoutController *controller
);
Selects the previous group in the group list.
gchar *
xapp_kbd_layout_controller_get_current_name
(XAppKbdLayoutController *controller
);
Returns the full name of the current keyboard layout.
gchar **
xapp_kbd_layout_controller_get_all_names
(XAppKbdLayoutController *controller
);
Returns an array of all full layout names
gchar *
xapp_kbd_layout_controller_get_current_icon_name
(XAppKbdLayoutController *controller
);
Returns the icon file name (no path or extension) to use for the current layout
gchar * xapp_kbd_layout_controller_get_icon_name_for_group (XAppKbdLayoutController *controller
,guint group
);
Returns the icon file name (no path or extension) to use for the specified layout.
gint
xapp_kbd_layout_controller_get_current_flag_id
(XAppKbdLayoutController *controller
);
Returns the duplicate id for the current layout
gint xapp_kbd_layout_controller_get_flag_id_for_group (XAppKbdLayoutController *controller
,guint group
);
gchar *
xapp_kbd_layout_controller_get_current_short_group_label
(XAppKbdLayoutController *controller
);
Returns the short group label (and subscript, if any) of the current layout
gchar * xapp_kbd_layout_controller_get_short_group_label_for_group (XAppKbdLayoutController *controller
,guint group
);
Returns the short group label and subscript of the specified layout.
gchar *
xapp_kbd_layout_controller_get_current_variant_label
(XAppKbdLayoutController *controller
);
Returns the variant label (and subscript, if any) of the current layout
gchar * xapp_kbd_layout_controller_get_variant_label_for_group (XAppKbdLayoutController *controller
,guint group
);
Returns the variant label and subscript of the specified layout.
void xapp_kbd_layout_controller_render_cairo_subscript (cairo_t *cr
,gdouble x
,gdouble y
,gdouble width
,gdouble height
,gint subscript
);
Renders a subscript number in the given work area. This should be called from within a "draw" or "paint" widget/actor function, where a valid cairo_t is provided to draw with.
cr |
a cairo_t |
|
x |
the x position of the drawing area |
|
y |
the y position of the drawing area |
|
width |
the width of the drawing area |
|
height |
the height of the drawing area |
|
subscript |
the number to render |
“enabled”
property“enabled” gboolean
Whether we're enabled (more than one keyboard layout is installed).
Owner: XAppKbdLayoutController
Flags: Read
Default value: FALSE
“config-changed”
signalvoid user_function (XAppKbdLayoutController *xappkbdlayoutcontroller, gpointer user_data)
Flags: Run Last
“layout-changed”
signalvoid user_function (XAppKbdLayoutController *xappkbdlayoutcontroller, guint arg1, gpointer user_data)
Flags: Run Last