clutter/backend: Add bell-notify

We'll need a way to trigger a bell from within clutter for keyboard
accessibility features, add the necessary hooks to be able to call a
backend bell-notify method.

https://bugzilla.gnome.org/show_bug.cgi?id=788564
This commit is contained in:
Olivier Fourdan 2017-10-12 15:03:48 +02:00
parent 0461eed0cb
commit 2ffe597617
3 changed files with 15 additions and 0 deletions

View File

@ -100,6 +100,8 @@ struct _ClutterBackendClass
PangoDirection (* get_keymap_direction) (ClutterBackend *backend); PangoDirection (* get_keymap_direction) (ClutterBackend *backend);
void (* bell_notify) (ClutterBackend *backend);
/* signals */ /* signals */
void (* resolution_changed) (ClutterBackend *backend); void (* resolution_changed) (ClutterBackend *backend);
void (* font_changed) (ClutterBackend *backend); void (* font_changed) (ClutterBackend *backend);

View File

@ -1363,3 +1363,13 @@ clutter_set_allowed_drivers (const char *drivers)
allowed_drivers = g_strdup (drivers); allowed_drivers = g_strdup (drivers);
} }
void
clutter_backend_bell_notify (ClutterBackend *backend)
{
ClutterBackendClass *klass;
klass = CLUTTER_BACKEND_GET_CLASS (backend);
if (klass->bell_notify)
klass->bell_notify (backend);
}

View File

@ -74,6 +74,9 @@ const cairo_font_options_t * clutter_backend_get_font_options (Clutter
CLUTTER_AVAILABLE_IN_1_8 CLUTTER_AVAILABLE_IN_1_8
CoglContext * clutter_backend_get_cogl_context (ClutterBackend *backend); CoglContext * clutter_backend_get_cogl_context (ClutterBackend *backend);
CLUTTER_AVAILABLE_IN_ALL
void clutter_backend_bell_notify (ClutterBackend *backend);
G_END_DECLS G_END_DECLS
#endif /* __CLUTTER_BACKEND_H__ */ #endif /* __CLUTTER_BACKEND_H__ */