diff --git a/eekboard/eekboard-context-service.c b/eekboard/eekboard-context-service.c index 5b0e7add..23b46482 100644 --- a/eekboard/eekboard-context-service.c +++ b/eekboard/eekboard-context-service.c @@ -135,13 +135,13 @@ eekboard_context_service_real_create_keyboard (EekboardContextService *self, return keyboard; } -static void +void eekboard_context_service_real_show_keyboard (EekboardContextService *self) { self->priv->visible = TRUE; } -static void +void eekboard_context_service_real_hide_keyboard (EekboardContextService *self) { self->priv->visible = FALSE; @@ -294,9 +294,6 @@ eekboard_context_service_class_init (EekboardContextServiceClass *klass) GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GParamSpec *pspec; - klass->show_keyboard = eekboard_context_service_real_show_keyboard; - klass->hide_keyboard = eekboard_context_service_real_hide_keyboard; - gobject_class->constructed = eekboard_context_service_constructed; gobject_class->set_property = eekboard_context_service_set_property; gobject_class->get_property = eekboard_context_service_get_property; @@ -446,7 +443,7 @@ eekboard_context_service_show_keyboard (EekboardContextService *context) g_return_if_fail (EEKBOARD_IS_CONTEXT_SERVICE(context)); if (!context->priv->visible) { - EEKBOARD_CONTEXT_SERVICE_GET_CLASS(context)->show_keyboard (context); + server_context_service_real_show_keyboard (context); } } @@ -456,7 +453,7 @@ eekboard_context_service_hide_keyboard (EekboardContextService *context) g_return_if_fail (EEKBOARD_IS_CONTEXT_SERVICE(context)); if (context->priv->visible) { - EEKBOARD_CONTEXT_SERVICE_GET_CLASS(context)->hide_keyboard (context); + server_context_service_real_hide_keyboard (context); } } diff --git a/eekboard/eekboard-context-service.h b/eekboard/eekboard-context-service.h index 38e4a9f2..16586ca0 100644 --- a/eekboard/eekboard-context-service.h +++ b/eekboard/eekboard-context-service.h @@ -63,8 +63,6 @@ struct _EekboardContextService { /** * EekboardContextServiceClass: * @create_keyboard: virtual function for create a keyboard from string - * @show_keyboard: virtual function for show a keyboard - * @hide_keyboard: virtual function for hide a keyboard * @enabled: class handler for #EekboardContextService::enabled signal * @disabled: class handler for #EekboardContextService::disabled signal */ @@ -75,8 +73,6 @@ struct _EekboardContextServiceClass { /*< public >*/ struct squeek_view *(*create_keyboard) (EekboardContextService *self, const gchar *keyboard_type); - void (*show_keyboard) (EekboardContextService *self); - void (*hide_keyboard) (EekboardContextService *self); /* signals */ void (*enabled) (EekboardContextService *self); @@ -94,6 +90,10 @@ void eekboard_context_service_enable (EekboardContextService *context); void eekboard_context_service_disable (EekboardContextService *context); void eekboard_context_service_show_keyboard (EekboardContextService *context); +void +eekboard_context_service_real_show_keyboard (EekboardContextService *self); +void +eekboard_context_service_real_hide_keyboard (EekboardContextService *self); void eekboard_context_service_hide_keyboard (EekboardContextService *context); void eekboard_context_service_destroy (EekboardContextService *context); diff --git a/src/server-context-service.c b/src/server-context-service.c index 137ae0cf..fd40d6d3 100644 --- a/src/server-context-service.c +++ b/src/server-context-service.c @@ -24,7 +24,7 @@ #include "eek/eek-gtk-keyboard.h" #include "eek/layersurface.h" #include "wayland.h" - +#include "eekboard/eekboard-context-service.h" #include "server-context-service.h" enum { @@ -238,7 +238,7 @@ make_widget (ServerContextService *context) gtk_widget_show (context->widget); } -static void +void server_context_service_real_show_keyboard (EekboardContextService *_context) { ServerContextService *context = SERVER_CONTEXT_SERVICE(_context); @@ -253,8 +253,7 @@ server_context_service_real_show_keyboard (EekboardContextService *_context) if (!context->widget) make_widget (context); - EEKBOARD_CONTEXT_SERVICE_CLASS (server_context_service_parent_class)-> - show_keyboard (_context); + eekboard_context_service_real_show_keyboard (_context); gtk_widget_show (GTK_WIDGET(context->window)); } @@ -267,7 +266,7 @@ on_hide (ServerContextService *context) return G_SOURCE_REMOVE; } -static void +void server_context_service_real_hide_keyboard (EekboardContextService *_context) { ServerContextService *context = SERVER_CONTEXT_SERVICE(_context); @@ -275,8 +274,7 @@ server_context_service_real_hide_keyboard (EekboardContextService *_context) if (!context->hiding) context->hiding = g_timeout_add (200, (GSourceFunc) on_hide, context); - EEKBOARD_CONTEXT_SERVICE_CLASS (server_context_service_parent_class)-> - hide_keyboard (_context); + eekboard_context_service_real_hide_keyboard (_context); } static void @@ -331,8 +329,6 @@ server_context_service_class_init (ServerContextServiceClass *klass) GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GParamSpec *pspec; - context_class->show_keyboard = server_context_service_real_show_keyboard; - context_class->hide_keyboard = server_context_service_real_hide_keyboard; context_class->destroyed = server_context_service_real_destroyed; gobject_class->set_property = server_context_service_set_property; diff --git a/src/server-context-service.h b/src/server-context-service.h index 2929640a..44b4f8c3 100644 --- a/src/server-context-service.h +++ b/src/server-context-service.h @@ -35,7 +35,8 @@ typedef struct _ServerContextService ServerContextService; EekboardContextService *server_context_service_new (); enum squeek_arrangement_kind server_context_service_get_layout_type(EekboardContextService*); - +void server_context_service_real_show_keyboard (EekboardContextService *context); +void server_context_service_real_hide_keyboard (EekboardContextService *context); G_END_DECLS #endif /* SERVER_CONTEXT_SERVICE_H */