Commit bb85885e authored by Daiki Ueno's avatar Daiki Ueno
Browse files

Revamp server-client API.

parent dd085be7
......@@ -41,6 +41,7 @@ eek/*.typelib
eekboard/*.pc
eekboard/*.gir
eekboard/*.typelib
eekboard/eekboard-marshalers.[ch]
tests/eek-simple-test
tests/eek-xkb-test
tests/eek-xml-test
......
......@@ -21,7 +21,7 @@ import gobject
from context import Context
class Eekboard(gobject.GObject):
__gtype_name__ = "PYEekboardEekboard"
__gtype_name__ = "PYEekboardClient"
__gsignals__ = {
'destroyed': (
gobject.SIGNAL_RUN_LAST,
......@@ -32,18 +32,18 @@ class Eekboard(gobject.GObject):
def __init__(self):
super(Eekboard, self).__init__()
self.__connection = Gio.bus_get_sync(Gio.BusType.SESSION, None)
self.__eekboard = gi.repository.Eekboard.Eekboard.new(self.__connection, None);
self.__eekboard.connect('destroyed', lambda *args: self.emit('destroyed'))
self.__client = gi.repository.Eekboard.Client.new(self.__connection, None);
self.__client.connect('destroyed', lambda *args: self.emit('destroyed'))
def create_context(self, client_name):
context = self.__eekboard.create_context(client_name, None)
context = self.__client.create_context(client_name, None)
return Context(context)
def push_context(self, context):
self.__eekboard.push_context(context.get_giobject(), None)
self.__client.push_context(context.get_giobject(), None)
def pop_context(self):
self.__eekboard.pop_context(None)
self.__client.pop_context(None)
def destroy_context(self, context):
self.__eekboard.destroy_context(context.get_giobject(), None)
self.__client.destroy_context(context.get_giobject(), None)
......@@ -18,29 +18,43 @@
lib_LTLIBRARIES = libeekboard.la
libeekboard_headers = \
eekboard.h \
eekboard-eekboard.h \
eekboard-context.h
libeekboard_private_headers = \
libeekboard_headers = \
eekboard-service.h \
eekboard-context-service.h \
eekboard-client.h \
eekboard-context.h \
eekboard-xklutil.h
libeekboard_private_headers = \
eekboard-marshalers.h
libeekboard_sources = \
eekboard-eekboard.c \
eekboard-context.c
eekboard-service.c \
eekboard-context-service.c \
eekboard-client.c \
eekboard-context.c \
eekboard-xklutil.c
libeekboard_marshalers_sources = \
eekboard-marshalers.c \
eekboard-marshalers.c \
eekboard-marshalers.h
BUILT_SOURCES = \
BUILT_SOURCES = \
$(libeekboard_marshalers_sources)
libeekboard_la_SOURCES = \
$(libeekboard_sources) \
libeekboard_la_SOURCES = \
$(libeekboard_sources) \
eekboard-marshalers.c
libeekboard_la_CFLAGS = -DEEKBOARD_COMPILATION=1 -I$(top_srcdir) $(GIO2_CFLAGS)
libeekboard_la_LIBADD = $(top_builddir)/eek/libeek.la $(GIO2_LIBS)
libeekboard_la_CFLAGS = \
-DEEKBOARD_COMPILATION=1 \
-DKEYBOARDDIR=\"$(pkgdatadir)/keyboards\" \
-I$(top_srcdir) \
$(GIO2_CFLAGS) \
$(LIBXKLAVIER_CFLAGS)
libeekboard_la_LIBADD = \
$(top_builddir)/eek/libeek.la \
$(top_builddir)/eek/libeek-xkl.la \
$(GIO2_LIBS) \
$(LIBXKLAVIER_LIBS)
eekboarddir = $(includedir)/eekboard-$(EEK_API_VERSION)/eekboard
eekboard_HEADERS = $(libeekboard_headers)
......
......@@ -17,17 +17,17 @@
*/
/**
* SECTION:eekboard-eekboard
* SECTION:eekboard-client
* @short_description: D-Bus proxy of eekboard-server
*
* The #EekboardEekboard class provides a client side access to eekboard-server.
* The #EekboardClient class provides a client side access to eekboard-server.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
#include "eekboard/eekboard-eekboard.h"
#include "eekboard/eekboard-client.h"
enum {
DESTROYED,
......@@ -36,53 +36,53 @@ enum {
static guint signals[LAST_SIGNAL] = { 0, };
G_DEFINE_TYPE (EekboardEekboard, eekboard_eekboard, G_TYPE_DBUS_PROXY);
G_DEFINE_TYPE (EekboardClient, eekboard_client, G_TYPE_DBUS_PROXY);
#define EEKBOARD_EEKBOARD_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEKBOARD_TYPE_EEKBOARD, EekboardEekboardPrivate))
#define EEKBOARD_CLIENT_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEKBOARD_TYPE_CLIENT, EekboardClientPrivate))
struct _EekboardEekboardPrivate
struct _EekboardClientPrivate
{
GHashTable *context_hash;
};
static void
eekboard_eekboard_real_destroyed (EekboardEekboard *self)
eekboard_client_real_destroyed (EekboardClient *self)
{
EekboardEekboardPrivate *priv = EEKBOARD_EEKBOARD_GET_PRIVATE(self);
EekboardClientPrivate *priv = EEKBOARD_CLIENT_GET_PRIVATE(self);
// g_debug ("eekboard_eekboard_real_destroyed");
// g_debug ("eekboard_client_real_destroyed");
g_hash_table_remove_all (priv->context_hash);
}
static void
eekboard_eekboard_dispose (GObject *object)
eekboard_client_dispose (GObject *object)
{
EekboardEekboardPrivate *priv = EEKBOARD_EEKBOARD_GET_PRIVATE(object);
EekboardClientPrivate *priv = EEKBOARD_CLIENT_GET_PRIVATE(object);
if (priv->context_hash) {
g_hash_table_destroy (priv->context_hash);
priv->context_hash = NULL;
}
G_OBJECT_CLASS (eekboard_eekboard_parent_class)->dispose (object);
G_OBJECT_CLASS (eekboard_client_parent_class)->dispose (object);
}
static void
eekboard_eekboard_class_init (EekboardEekboardClass *klass)
eekboard_client_class_init (EekboardClientClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (gobject_class,
sizeof (EekboardEekboardPrivate));
sizeof (EekboardClientPrivate));
klass->destroyed = eekboard_eekboard_real_destroyed;
klass->destroyed = eekboard_client_real_destroyed;
gobject_class->dispose = eekboard_eekboard_dispose;
gobject_class->dispose = eekboard_client_dispose;
/**
* EekboardEekboard::destroyed:
* @eekboard: an #EekboardEekboard
* EekboardClient::destroyed:
* @eekboard: an #EekboardClient
*
* The ::destroyed signal is emitted each time the name of remote
* end is vanished.
......@@ -91,7 +91,7 @@ eekboard_eekboard_class_init (EekboardEekboardClass *klass)
g_signal_new (I_("destroyed"),
G_TYPE_FROM_CLASS(gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(EekboardEekboardClass, destroyed),
G_STRUCT_OFFSET(EekboardClientClass, destroyed),
NULL,
NULL,
g_cclosure_marshal_VOID__VOID,
......@@ -100,11 +100,11 @@ eekboard_eekboard_class_init (EekboardEekboardClass *klass)
}
static void
eekboard_eekboard_init (EekboardEekboard *self)
eekboard_client_init (EekboardClient *self)
{
EekboardEekboardPrivate *priv;
EekboardClientPrivate *priv;
priv = self->priv = EEKBOARD_EEKBOARD_GET_PRIVATE(self);
priv = self->priv = EEKBOARD_CLIENT_GET_PRIVATE(self);
priv->context_hash =
g_hash_table_new_full (g_str_hash,
g_str_equal,
......@@ -117,19 +117,19 @@ eekboard_name_vanished_callback (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
EekboardEekboard *eekboard = user_data;
EekboardClient *eekboard = user_data;
g_signal_emit_by_name (eekboard, "destroyed", NULL);
}
/**
* eekboard_eekboard_new:
* eekboard_client_new:
* @connection: a #GDBusConnection
* @cancellable: a #GCancellable
*
* Create a D-Bus proxy of eekboard-eekboard.
*/
EekboardEekboard *
eekboard_eekboard_new (GDBusConnection *connection,
EekboardClient *
eekboard_client_new (GDBusConnection *connection,
GCancellable *cancellable)
{
GInitable *initable;
......@@ -139,16 +139,16 @@ eekboard_eekboard_new (GDBusConnection *connection,
error = NULL;
initable =
g_initable_new (EEKBOARD_TYPE_EEKBOARD,
g_initable_new (EEKBOARD_TYPE_CLIENT,
cancellable,
&error,
"g-connection", connection,
"g-name", "org.fedorahosted.Eekboard.Server",
"g-interface-name", "org.fedorahosted.Eekboard.Server",
"g-object-path", "/org/fedorahosted/Eekboard/Server",
"g-name", "org.fedorahosted.Eekboard",
"g-interface-name", "org.fedorahosted.Eekboard",
"g-object-path", "/org/fedorahosted/Eekboard",
NULL);
if (initable != NULL) {
EekboardEekboard *eekboard = EEKBOARD_EEKBOARD (initable);
EekboardClient *eekboard = EEKBOARD_CLIENT (initable);
gchar *name_owner = g_dbus_proxy_get_name_owner (G_DBUS_PROXY(eekboard));
if (name_owner == NULL) {
g_object_unref (eekboard);
......@@ -174,16 +174,16 @@ static void
on_context_destroyed (EekboardContext *context,
gpointer user_data)
{
EekboardEekboard *eekboard = user_data;
EekboardEekboardPrivate *priv = EEKBOARD_EEKBOARD_GET_PRIVATE(eekboard);
EekboardClient *eekboard = user_data;
EekboardClientPrivate *priv = EEKBOARD_CLIENT_GET_PRIVATE(eekboard);
g_hash_table_remove (priv->context_hash,
g_dbus_proxy_get_object_path (G_DBUS_PROXY(context)));
}
/**
* eekboard_eekboard_create_context:
* @eekboard: an #EekboardEekboard
* eekboard_client_create_context:
* @eekboard: an #EekboardClient
* @client_name: name of the client
* @cancellable: a #GCancellable
*
......@@ -192,14 +192,14 @@ on_context_destroyed (EekboardContext *context,
* Return value: (transfer full): a newly created #EekboardContext.
*/
EekboardContext *
eekboard_eekboard_create_context (EekboardEekboard *eekboard,
eekboard_client_create_context (EekboardClient *eekboard,
const gchar *client_name,
GCancellable *cancellable)
{
GVariant *variant;
const gchar *object_path;
EekboardContext *context;
EekboardEekboardPrivate *priv;
EekboardClientPrivate *priv;
GError *error;
GDBusConnection *connection;
......@@ -225,7 +225,7 @@ eekboard_eekboard_create_context (EekboardEekboard *eekboard,
return NULL;
}
priv = EEKBOARD_EEKBOARD_GET_PRIVATE(eekboard);
priv = EEKBOARD_CLIENT_GET_PRIVATE(eekboard);
g_hash_table_insert (priv->context_hash,
g_strdup (object_path),
g_object_ref (context));
......@@ -250,19 +250,19 @@ eekboard_async_ready_callback (GObject *source_object,
}
/**
* eekboard_eekboard_push_context:
* @eekboard: an #EekboardEekboard
* eekboard_client_push_context:
* @eekboard: an #EekboardClient
* @context: an #EekboardContext
* @cancellable: a #GCancellable
*
* Enable the input context @context and disable the others.
*/
void
eekboard_eekboard_push_context (EekboardEekboard *eekboard,
eekboard_client_push_context (EekboardClient *eekboard,
EekboardContext *context,
GCancellable *cancellable)
{
EekboardEekboardPrivate *priv;
EekboardClientPrivate *priv;
const gchar *object_path;
g_return_if_fail (EEKBOARD_IS_EEKBOARD(eekboard));
......@@ -270,7 +270,7 @@ eekboard_eekboard_push_context (EekboardEekboard *eekboard,
object_path = g_dbus_proxy_get_object_path (G_DBUS_PROXY(context));
priv = EEKBOARD_EEKBOARD_GET_PRIVATE(eekboard);
priv = EEKBOARD_CLIENT_GET_PRIVATE(eekboard);
context = g_hash_table_lookup (priv->context_hash, object_path);
if (!context)
return;
......@@ -287,14 +287,14 @@ eekboard_eekboard_push_context (EekboardEekboard *eekboard,
}
/**
* eekboard_eekboard_pop_context:
* @eekboard: an #EekboardEekboard
* eekboard_client_pop_context:
* @eekboard: an #EekboardClient
* @cancellable: a #GCancellable
*
* Disable the current input context and enable the previous one.
*/
void
eekboard_eekboard_pop_context (EekboardEekboard *eekboard,
eekboard_client_pop_context (EekboardClient *eekboard,
GCancellable *cancellable)
{
g_return_if_fail (EEKBOARD_IS_EEKBOARD(eekboard));
......@@ -310,25 +310,25 @@ eekboard_eekboard_pop_context (EekboardEekboard *eekboard,
}
/**
* eekboard_eekboard_destroy_context:
* @eekboard: an #EekboardEekboard
* eekboard_client_destroy_context:
* @eekboard: an #EekboardClient
* @context: an #EekboardContext
* @cancellable: a #GCancellable
*
* Remove @context from @eekboard.
*/
void
eekboard_eekboard_destroy_context (EekboardEekboard *eekboard,
eekboard_client_destroy_context (EekboardClient *eekboard,
EekboardContext *context,
GCancellable *cancellable)
{
EekboardEekboardPrivate *priv;
EekboardClientPrivate *priv;
const gchar *object_path;
g_return_if_fail (EEKBOARD_IS_EEKBOARD(eekboard));
g_return_if_fail (EEKBOARD_IS_CONTEXT(context));
priv = EEKBOARD_EEKBOARD_GET_PRIVATE(eekboard);
priv = EEKBOARD_CLIENT_GET_PRIVATE(eekboard);
object_path = g_dbus_proxy_get_object_path (G_DBUS_PROXY(context));
g_hash_table_remove (priv->context_hash, object_path);
......
......@@ -15,67 +15,61 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EEKBOARD_CLIENT_H
#define EEKBOARD_CLIENT_H 1
#if !defined(__EEKBOARD_H_INSIDE__) && !defined(EEKBOARD_COMPILATION)
#error "Only <eekboard/eekboard.h> can be included directly."
#endif
#ifndef EEKBOARD_EEKBOARD_H
#define EEKBOARD_EEKBOARD_H 1
#define __EEKBOARD_CLIENT_H_INSIDE__ 1
#include <gio/gio.h>
#include "eekboard/eekboard-context.h"
G_BEGIN_DECLS
#define EEKBOARD_TYPE_EEKBOARD (eekboard_eekboard_get_type())
#define EEKBOARD_EEKBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEKBOARD_TYPE_EEKBOARD, EekboardEekboard))
#define EEKBOARD_EEKBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEKBOARD_TYPE_EEKBOARD, EekboardEekboardClass))
#define EEKBOARD_IS_EEKBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEKBOARD_TYPE_EEKBOARD))
#define EEKBOARD_IS_EEKBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEKBOARD_TYPE_EEKBOARD))
#define EEKBOARD_EEKBOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEKBOARD_TYPE_EEKBOARD, EekboardEekboardClass))
#define EEKBOARD_TYPE_CLIENT (eekboard_client_get_type())
#define EEKBOARD_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEKBOARD_TYPE_CLIENT, EekboardClient))
#define EEKBOARD_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEKBOARD_TYPE_CLIENT, EekboardClientClass))
#define EEKBOARD_IS_EEKBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEKBOARD_TYPE_CLIENT))
#define EEKBOARD_IS_EEKBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEKBOARD_TYPE_CLIENT))
#define EEKBOARD_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEKBOARD_TYPE_CLIENT, EekboardClientClass))
typedef struct _EekboardEekboard EekboardEekboard;
typedef struct _EekboardEekboardClass EekboardEekboardClass;
typedef struct _EekboardEekboardPrivate EekboardEekboardPrivate;
typedef struct _EekboardClient EekboardClient;
typedef struct _EekboardClientClass EekboardClientClass;
typedef struct _EekboardClientPrivate EekboardClientPrivate;
struct _EekboardEekboard {
struct _EekboardClient {
/*< private >*/
GDBusProxy parent;
EekboardEekboardPrivate *priv;
EekboardClientPrivate *priv;
};
struct _EekboardEekboardClass {
struct _EekboardClientClass {
/*< private >*/
GDBusProxyClass parent_class;
/* signals */
void (* destroyed) (EekboardEekboard *self);
void (* destroyed) (EekboardClient *self);
/*< private >*/
/* padding */
gpointer pdummy[23];
};
GType eekboard_eekboard_get_type (void) G_GNUC_CONST;
GType eekboard_client_get_type (void) G_GNUC_CONST;
EekboardEekboard *eekboard_eekboard_new (GDBusConnection *connection,
GCancellable *cancellable);
EekboardContext *eekboard_eekboard_create_context
(EekboardEekboard *eekboard,
const gchar *client_name,
GCancellable *cancellable);
void eekboard_eekboard_push_context
(EekboardEekboard *eekboard,
EekboardContext *context,
GCancellable *cancellable);
void eekboard_eekboard_pop_context (EekboardEekboard *eekboard,
GCancellable *cancellable);
void eekboard_eekboard_destroy_context
(EekboardEekboard *eekboard,
EekboardContext *context,
GCancellable *cancellable);
EekboardClient *eekboard_client_new (GDBusConnection *connection,
GCancellable *cancellable);
EekboardContext *eekboard_client_create_context (EekboardClient *eekboard,
const gchar *client_name,
GCancellable *cancellable);
void eekboard_client_push_context (EekboardClient *eekboard,
EekboardContext *context,
GCancellable *cancellable);
void eekboard_client_pop_context (EekboardClient *eekboard,
GCancellable *cancellable);
void eekboard_client_destroy_context (EekboardClient *eekboard,
EekboardContext *context,
GCancellable *cancellable);
G_END_DECLS
#endif /* EEKBOARD_EEKBOARD_H */
#endif /* EEKBOARD_CLIENT_H */
/*
* Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
* Copyright (C) 2010-2011 Red Hat, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if !defined(__EEKBOARD_SERVICE_H_INSIDE__) && !defined(EEKBOARD_COMPILATION)
#error "Only <eekboard/eekboard-service.h> can be included directly."
#endif
#ifndef EEKBOARD_CONTEXT_SERVICE_H
#define EEKBOARD_CONTEXT_SERVICE_H 1
#include <eek/eek.h>
G_BEGIN_DECLS
#define EEKBOARD_CONTEXT_SERVICE_PATH "/org/fedorahosted/Eekboard/Context_%d"
#define EEKBOARD_CONTEXT_SERVICE_INTERFACE "org.fedorahosted.Eekboard.Context"
#define EEKBOARD_TYPE_CONTEXT_SERVICE (eekboard_context_service_get_type())
#define EEKBOARD_CONTEXT_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEKBOARD_TYPE_CONTEXT_SERVICE, EekboardContextService))
#define EEKBOARD_CONTEXT_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEKBOARD_TYPE_CONTEXT_SERVICE, EekboardContextServiceClass))
#define EEKBOARD_IS_CONTEXT_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEKBOARD_TYPE_CONTEXT_SERVICE))
#define EEKBOARD_IS_CONTEXT_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEKBOARD_TYPE_CONTEXT_SERVICE))
#define EEKBOARD_CONTEXT_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEKBOARD_TYPE_CONTEXT_SERVICE, EekboardContextServiceClass))
typedef struct _EekboardContextService EekboardContextService;
typedef struct _EekboardContextServiceClass EekboardContextServiceClass;
typedef struct _EekboardContextServicePrivate EekboardContextServicePrivate;
struct _EekboardContextService {
GObject parent;
EekboardContextServicePrivate *priv;
};
struct _EekboardContextServiceClass {
/*< private >*/
GObjectClass parent_class;
EekKeyboard *(*create_keyboard) (EekboardContextService *self,
const gchar *keyboard_type);
void (*show_keyboard) (EekboardContextService *self);
void (*hide_keyboard) (EekboardContextService *self);
/* signals */
void (*enabled) (EekboardContextService *self);
void (*disabled) (EekboardContextService *self);
/*< private >*/
/* padding */
gpointer pdummy[24];
};
GType eekboard_context_service_get_type
(void) G_GNUC_CONST;
void eekboard_context_service_enable
(EekboardContextService *context);
void eekboard_context_service_disable
(EekboardContextService *context);
const EekKeyboard *eekboard_context_service_get_keyboard
(EekboardContextService *context);
gboolean eekboard_context_service_get_fullscreen
(EekboardContextService *context);
const gchar * eekboard_context_service_get_client_name
(EekboardContextService *context);
G_END_DECLS
#endif /* EEKBOARD_CONTEXT_SERVICE_H */
......@@ -45,7 +45,7 @@ static guint signals[LAST_SIGNAL] = { 0, };
enum {
PROP_0,
PROP_KEYBOARD_VISIBLE,
PROP_VISIBLE,
PROP_LAST
};
......@@ -56,7 +56,7 @@ G_DEFINE_TYPE (EekboardContext, eekboard_context, G_TYPE_DBUS_PROXY);
struct _EekboardContextPrivate
{
gboolean keyboard_visible;
gboolean visible;
gboolean enabled;
gboolean fullscreen;
gint group;
......@@ -99,13 +99,13 @@ eekboard_context_real_g_signal (GDBusProxy *self,
return;
}
if (g_strcmp0 (signal_name, "KeyboardVisibilityChanged") == 0) {
gboolean keyboard_visible = FALSE;
if (g_strcmp0 (signal_name, "VisibilityChanged") == 0) {
gboolean visible = FALSE;
g_variant_get (parameters, "(b)", &keyboard_visible);
if (keyboard_visible != priv->keyboard_visible) {
priv->keyboard_visible = keyboard_visible;
g_object_notify (G_OBJECT(context), "keyboard-visible");
g_variant_get (parameters, "(b)", &visible);
if (visible != priv->visible) {
priv->visible = visible;
g_object_notify (G_OBJECT(context), "visible");
}
return;
}
......@@ -159,8 +159,8 @@ eekboard_context_get_property (GObject *object,
{
EekboardContextPrivate *priv = EEKBOARD_CONTEXT_GET_PRIVATE(object);
switch (prop_id) {
case PROP_KEYBOARD_VISIBLE:
g_value_set_boolean (value, priv->keyboard_visible);
case PROP_VISIBLE:
g_value_set_boolean (value, priv->visible);
break;
default:
g_object_get_property (object,
......@@ -190,17 +190,17 @@ eekboard_context_class_init (EekboardContextClass *klass)
gobject_class->get_property = eekboard_context_get_property;
/**
* EekboardContext:keyboard-visible:
* EekboardContext:visible: