diff --git a/src/server-context-service.c b/src/server-context-service.c index 48f1deeb..f8033543 100644 --- a/src/server-context-service.c +++ b/src/server-context-service.c @@ -34,8 +34,6 @@ enum { PROP_LAST }; -typedef struct _ServerContextServiceClass ServerContextServiceClass; - struct _ServerContextService { GObject parent; @@ -52,10 +50,6 @@ struct _ServerContextService { guint last_requested_height; }; -struct _ServerContextServiceClass { - GObjectClass parent_class; -}; - G_DEFINE_TYPE(ServerContextService, server_context_service, G_TYPE_OBJECT); static void diff --git a/src/server-context-service.h b/src/server-context-service.h index a69f85ae..de6b8dc8 100644 --- a/src/server-context-service.h +++ b/src/server-context-service.h @@ -25,17 +25,9 @@ G_BEGIN_DECLS #define SERVER_TYPE_CONTEXT_SERVICE (server_context_service_get_type()) -#define SERVER_CONTEXT_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SERVER_TYPE_CONTEXT_SERVICE, ServerContextService)) -#define SERVER_CONTEXT_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SERVER_TYPE_CONTEXT_SERVICE, ServerContextServiceClass)) -#define SERVER_IS_CONTEXT_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SERVER_TYPE_CONTEXT_SERVICE)) -#define SERVER_IS_CONTEXT_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SERVER_TYPE_CONTEXT_SERVICE)) -#define SERVER_CONTEXT_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SERVER_TYPE_CONTEXT_SERVICE, ServerContextServiceClass)) /** Manages the lifecycle of the window displaying layouts. */ -typedef struct _ServerContextService ServerContextService; - -GType server_context_service_get_type - (void) G_GNUC_CONST; +G_DECLARE_FINAL_TYPE (ServerContextService, server_context_service, SERVER, CONTEXT_SERVICE, GObject) ServerContextService *server_context_service_new(EekboardContextService *state, struct submission *submission, struct squeek_layout_state *layout, struct ui_manager *uiman); enum squeek_arrangement_kind server_context_service_get_layout_type(ServerContextService *);