Add "SetFullscreen" D-Bus method.
This commit is contained in:
@ -60,6 +60,7 @@ struct _EekboardContextPrivate
|
||||
GHashTable *keyboard_hash;
|
||||
gboolean keyboard_visible;
|
||||
gboolean enabled;
|
||||
gboolean fullscreen;
|
||||
};
|
||||
|
||||
static void
|
||||
@ -558,15 +559,17 @@ eekboard_context_set_group (EekboardContext *context,
|
||||
|
||||
g_return_if_fail (priv->keyboard);
|
||||
|
||||
eek_element_set_group (EEK_ELEMENT(priv->keyboard), group);
|
||||
g_dbus_proxy_call (G_DBUS_PROXY(context),
|
||||
"SetGroup",
|
||||
g_variant_new ("(i)", group),
|
||||
G_DBUS_CALL_FLAGS_NONE,
|
||||
-1,
|
||||
cancellable,
|
||||
context_async_ready_callback,
|
||||
NULL);
|
||||
if (eek_element_get_group (EEK_ELEMENT(priv->keyboard)) != group) {
|
||||
eek_element_set_group (EEK_ELEMENT(priv->keyboard), group);
|
||||
g_dbus_proxy_call (G_DBUS_PROXY(context),
|
||||
"SetGroup",
|
||||
g_variant_new ("(i)", group),
|
||||
G_DBUS_CALL_FLAGS_NONE,
|
||||
-1,
|
||||
cancellable,
|
||||
context_async_ready_callback,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -744,3 +747,26 @@ eekboard_context_is_enabled (EekboardContext *context)
|
||||
priv = EEKBOARD_CONTEXT_GET_PRIVATE (context);
|
||||
return priv->enabled;
|
||||
}
|
||||
|
||||
void
|
||||
eekboard_context_set_fullscreen (EekboardContext *context,
|
||||
gboolean fullscreen,
|
||||
GCancellable *cancellable)
|
||||
{
|
||||
EekboardContextPrivate *priv;
|
||||
|
||||
g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
|
||||
|
||||
priv = EEKBOARD_CONTEXT_GET_PRIVATE (context);
|
||||
if (priv->fullscreen != fullscreen) {
|
||||
g_dbus_proxy_call (G_DBUS_PROXY(context),
|
||||
"SetFullscreen",
|
||||
g_variant_new ("(b)", fullscreen),
|
||||
G_DBUS_CALL_FLAGS_NONE,
|
||||
-1,
|
||||
cancellable,
|
||||
context_async_ready_callback,
|
||||
NULL);
|
||||
}
|
||||
return priv->enabled;
|
||||
}
|
||||
|
||||
@ -73,39 +73,41 @@ struct _EekboardContextClass {
|
||||
gpointer pdummy[23];
|
||||
};
|
||||
|
||||
GType eekboard_context_get_type (void) G_GNUC_CONST;
|
||||
GType eekboard_context_get_type (void) G_GNUC_CONST;
|
||||
|
||||
EekboardContext *eekboard_context_new (GDBusConnection *connection,
|
||||
const gchar *object_path,
|
||||
GCancellable *cancellable);
|
||||
guint eekboard_context_add_keyboard (EekboardContext *context,
|
||||
EekKeyboard *keyboard,
|
||||
GCancellable *cancellable);
|
||||
void eekboard_context_remove_keyboard
|
||||
(EekboardContext *context,
|
||||
guint keyboard_id,
|
||||
GCancellable *cancellable);
|
||||
void eekboard_context_set_keyboard (EekboardContext *context,
|
||||
guint keyboard_id,
|
||||
GCancellable *cancellable);
|
||||
void eekboard_context_show_keyboard (EekboardContext *context,
|
||||
GCancellable *cancellable);
|
||||
void eekboard_context_hide_keyboard (EekboardContext *context,
|
||||
GCancellable *cancellable);
|
||||
void eekboard_context_set_group (EekboardContext *context,
|
||||
gint group,
|
||||
GCancellable *cancellable);
|
||||
void eekboard_context_press_key (EekboardContext *context,
|
||||
guint keycode,
|
||||
GCancellable *cancellable);
|
||||
void eekboard_context_release_key (EekboardContext *context,
|
||||
guint keycode,
|
||||
GCancellable *cancellable);
|
||||
EekboardContext *eekboard_context_new (GDBusConnection *connection,
|
||||
const gchar *object_path,
|
||||
GCancellable *cancellable);
|
||||
guint eekboard_context_add_keyboard (EekboardContext *context,
|
||||
EekKeyboard *keyboard,
|
||||
GCancellable *cancellable);
|
||||
void eekboard_context_remove_keyboard (EekboardContext *context,
|
||||
guint keyboard_id,
|
||||
GCancellable *cancellable);
|
||||
void eekboard_context_set_keyboard (EekboardContext *context,
|
||||
guint keyboard_id,
|
||||
GCancellable *cancellable);
|
||||
void eekboard_context_show_keyboard (EekboardContext *context,
|
||||
GCancellable *cancellable);
|
||||
void eekboard_context_hide_keyboard (EekboardContext *context,
|
||||
GCancellable *cancellable);
|
||||
void eekboard_context_set_group (EekboardContext *context,
|
||||
gint group,
|
||||
GCancellable *cancellable);
|
||||
void eekboard_context_press_key (EekboardContext *context,
|
||||
guint keycode,
|
||||
GCancellable *cancellable);
|
||||
void eekboard_context_release_key (EekboardContext *context,
|
||||
guint keycode,
|
||||
GCancellable *cancellable);
|
||||
gboolean eekboard_context_is_keyboard_visible
|
||||
(EekboardContext *context);
|
||||
void eekboard_context_set_enabled (EekboardContext *context,
|
||||
gboolean enabled);
|
||||
gboolean eekboard_context_is_enabled (EekboardContext *context);
|
||||
(EekboardContext *context);
|
||||
void eekboard_context_set_enabled (EekboardContext *context,
|
||||
gboolean enabled);
|
||||
gboolean eekboard_context_is_enabled (EekboardContext *context);
|
||||
void eekboard_context_set_fullscreen (EekboardContext *context,
|
||||
gboolean fullscreen,
|
||||
GCancellable *cancellable);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* EEKBOARD_CONTEXT_H */
|
||||
|
||||
Reference in New Issue
Block a user