backend: Add private accessor for the keymap direction

We need to ask the backend (wherever possible) for the direction of the
current keymap.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
This commit is contained in:
Emmanuele Bassi 2014-03-03 23:22:13 +00:00
parent 6faf6dfe42
commit a000349978
2 changed files with 16 additions and 0 deletions

View File

@ -93,6 +93,8 @@ struct _ClutterBackendClass
gpointer native,
ClutterEvent *event);
PangoDirection (* get_keymap_direction) (ClutterBackend *backend);
/* signals */
void (* resolution_changed) (ClutterBackend *backend);
void (* font_changed) (ClutterBackend *backend);
@ -138,6 +140,8 @@ gfloat _clutter_backend_get_units_per_em (Clutter
PangoFontDescription *font_desc);
gint32 _clutter_backend_get_units_serial (ClutterBackend *backend);
PangoDirection _clutter_backend_get_keymap_direction (ClutterBackend *backend);
G_END_DECLS
#endif /* __CLUTTER_BACKEND_PRIVATE_H__ */

View File

@ -1404,3 +1404,15 @@ clutter_set_windowing_backend (const char *backend_type)
allowed_backend = g_intern_string (backend_type);
}
PangoDirection
_clutter_backend_get_keymap_direction (ClutterBackend *backend)
{
ClutterBackendClass *klass;
klass = CLUTTER_BACKEND_GET_CLASS (backend);
if (klass->get_keymap_direction != NULL)
return klass->get_keymap_direction (backend);
return PANGO_DIRECTION_NEUTRAL;
}