You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

71 lines
4.6 KiB

  1. #ifndef __XAPP_KBD_LAYOUT_CONTROLLER_H__
  2. #define __XAPP_KBD_LAYOUT_CONTROLLER_H__
  3. #include <stdio.h>
  4. #include <gdk-pixbuf/gdk-pixbuf.h>
  5. #include <glib-object.h>
  6. #include <cairo.h>
  7. G_BEGIN_DECLS
  8. #define XAPP_TYPE_KBD_LAYOUT_CONTROLLER (xapp_kbd_layout_controller_get_type ())
  9. #define XAPP_KBD_LAYOUT_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XAPP_TYPE_KBD_LAYOUT_CONTROLLER, XAppKbdLayoutController))
  10. #define XAPP_KBD_LAYOUT_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XAPP_TYPE_KBD_LAYOUT_CONTROLLER, XAppKbdLayoutControllerClass))
  11. #define XAPP_IS_KBD_LAYOUT_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XAPP_TYPE_KBD_LAYOUT_CONTROLLER))
  12. #define XAPP_IS_KBD_LAYOUT_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XAPP_TYPE_KBD_LAYOUT_CONTROLLER))
  13. #define XAPP_KBD_LAYOUT_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XAPP_TYPE_KBD_LAYOUT_CONTROLLER, XAppKbdLayoutControllerClass))
  14. typedef struct _XAppKbdLayoutControllerPrivate XAppKbdLayoutControllerPrivate;
  15. typedef struct _XAppKbdLayoutController XAppKbdLayoutController;
  16. typedef struct _XAppKbdLayoutControllerClass XAppKbdLayoutControllerClass;
  17. struct _XAppKbdLayoutController
  18. {
  19. GObject parent_object;
  20. XAppKbdLayoutControllerPrivate *priv;
  21. };
  22. struct _XAppKbdLayoutControllerClass
  23. {
  24. GObjectClass parent_class;
  25. };
  26. GType xapp_kbd_layout_controller_get_type (void);
  27. XAppKbdLayoutController *xapp_kbd_layout_controller_new (void);
  28. gboolean xapp_kbd_layout_controller_get_enabled (XAppKbdLayoutController *controller);
  29. guint xapp_kbd_layout_controller_get_current_group (XAppKbdLayoutController *controller);
  30. void xapp_kbd_layout_controller_set_current_group (XAppKbdLayoutController *controller,
  31. guint group);
  32. void xapp_kbd_layout_controller_next_group (XAppKbdLayoutController *controller);
  33. void xapp_kbd_layout_controller_previous_group (XAppKbdLayoutController *controller);
  34. gchar *xapp_kbd_layout_controller_get_current_name (XAppKbdLayoutController *controller);
  35. gchar **xapp_kbd_layout_controller_get_all_names (XAppKbdLayoutController *controller);
  36. gchar *xapp_kbd_layout_controller_get_current_icon_name (XAppKbdLayoutController *controller);
  37. gchar *xapp_kbd_layout_controller_get_icon_name_for_group (XAppKbdLayoutController *controller,
  38. guint group);
  39. gint xapp_kbd_layout_controller_get_current_flag_id (XAppKbdLayoutController *controller);
  40. gint xapp_kbd_layout_controller_get_flag_id_for_group (XAppKbdLayoutController *controller,
  41. guint group);
  42. gchar *xapp_kbd_layout_controller_get_current_short_group_label (XAppKbdLayoutController *controller);
  43. gchar *xapp_kbd_layout_controller_get_short_group_label_for_group (XAppKbdLayoutController *controller,
  44. guint group);
  45. gchar *xapp_kbd_layout_controller_get_current_variant_label (XAppKbdLayoutController *controller);
  46. gchar *xapp_kbd_layout_controller_get_variant_label_for_group (XAppKbdLayoutController *controller,
  47. guint group);
  48. /* Class function */
  49. void xapp_kbd_layout_controller_render_cairo_subscript (cairo_t *cr,
  50. gdouble x,
  51. gdouble y,
  52. gdouble width,
  53. gdouble height,
  54. gint subscript);
  55. G_END_DECLS
  56. #endif /* __XAPP_KBD_LAYOUT_CONTROLLER_H__ */