mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
clutter: Add ClutterBackend IM setter/getter
The input method will be global to Clutter, these methods allow setting one up.
This commit is contained in:
parent
6e3b0eb430
commit
ca654ac544
@ -58,6 +58,8 @@ struct _ClutterBackend
|
|||||||
gint32 units_serial;
|
gint32 units_serial;
|
||||||
|
|
||||||
GList *event_translators;
|
GList *event_translators;
|
||||||
|
|
||||||
|
ClutterInputMethod *input_method;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _ClutterBackendClass
|
struct _ClutterBackendClass
|
||||||
|
@ -127,6 +127,7 @@ clutter_backend_finalize (GObject *gobject)
|
|||||||
|
|
||||||
g_free (backend->font_name);
|
g_free (backend->font_name);
|
||||||
clutter_backend_set_font_options (backend, NULL);
|
clutter_backend_set_font_options (backend, NULL);
|
||||||
|
g_clear_object (&backend->input_method);
|
||||||
|
|
||||||
G_OBJECT_CLASS (clutter_backend_parent_class)->finalize (gobject);
|
G_OBJECT_CLASS (clutter_backend_parent_class)->finalize (gobject);
|
||||||
}
|
}
|
||||||
@ -1373,3 +1374,31 @@ clutter_backend_bell_notify (ClutterBackend *backend)
|
|||||||
if (klass->bell_notify)
|
if (klass->bell_notify)
|
||||||
klass->bell_notify (backend);
|
klass->bell_notify (backend);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_backend_get_input_method:
|
||||||
|
* @backend: the #CLutterBackend
|
||||||
|
*
|
||||||
|
* Returns the input method used by Clutter
|
||||||
|
*
|
||||||
|
* Returns: (transfer none): the input method
|
||||||
|
**/
|
||||||
|
ClutterInputMethod *
|
||||||
|
clutter_backend_get_input_method (ClutterBackend *backend)
|
||||||
|
{
|
||||||
|
return backend->input_method;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_backend_set_input_method:
|
||||||
|
* @backend: the #ClutterBackend
|
||||||
|
* @method: the input method
|
||||||
|
*
|
||||||
|
* Sets the input method to be used by Clutter
|
||||||
|
**/
|
||||||
|
void
|
||||||
|
clutter_backend_set_input_method (ClutterBackend *backend,
|
||||||
|
ClutterInputMethod *method)
|
||||||
|
{
|
||||||
|
g_set_object (&backend->input_method, method);
|
||||||
|
}
|
||||||
|
@ -77,6 +77,12 @@ CoglContext * clutter_backend_get_cogl_context (Clutter
|
|||||||
CLUTTER_AVAILABLE_IN_ALL
|
CLUTTER_AVAILABLE_IN_ALL
|
||||||
void clutter_backend_bell_notify (ClutterBackend *backend);
|
void clutter_backend_bell_notify (ClutterBackend *backend);
|
||||||
|
|
||||||
|
CLUTTER_AVAILABLE_IN_MUTTER
|
||||||
|
ClutterInputMethod * clutter_backend_get_input_method (ClutterBackend *backend);
|
||||||
|
|
||||||
|
CLUTTER_AVAILABLE_IN_MUTTER
|
||||||
|
void clutter_backend_set_input_method (ClutterBackend *backend,
|
||||||
|
ClutterInputMethod *method);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __CLUTTER_BACKEND_H__ */
|
#endif /* __CLUTTER_BACKEND_H__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user