/* OSKWindow.c generated by valac 0.56.19, the Vala compiler
 * generated from OSKWindow.vala, do not modify */

/*
 * Copyright 2026 elementary, Inc. (https://elementary.io)
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 * Authored by: Leonhard Kargl <leo.kargl@proton.me>
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <granite-7.h>
#include <glib.h>
#include <gdk/gdk.h>
#include <cairo-gobject.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define GALA_DAEMON_TYPE_OSK_WINDOW (gala_daemon_osk_window_get_type ())
#define GALA_DAEMON_OSK_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_DAEMON_TYPE_OSK_WINDOW, GalaDaemonOSKWindow))
#define GALA_DAEMON_OSK_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_DAEMON_TYPE_OSK_WINDOW, GalaDaemonOSKWindowClass))
#define GALA_DAEMON_IS_OSK_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_DAEMON_TYPE_OSK_WINDOW))
#define GALA_DAEMON_IS_OSK_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_DAEMON_TYPE_OSK_WINDOW))
#define GALA_DAEMON_OSK_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_DAEMON_TYPE_OSK_WINDOW, GalaDaemonOSKWindowClass))

typedef struct _GalaDaemonOSKWindow GalaDaemonOSKWindow;
typedef struct _GalaDaemonOSKWindowClass GalaDaemonOSKWindowClass;
typedef struct _GalaDaemonOSKWindowPrivate GalaDaemonOSKWindowPrivate;

#define GALA_DAEMON_TYPE_MODEL_MANAGER (gala_daemon_model_manager_get_type ())
#define GALA_DAEMON_MODEL_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_DAEMON_TYPE_MODEL_MANAGER, GalaDaemonModelManager))
#define GALA_DAEMON_MODEL_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_DAEMON_TYPE_MODEL_MANAGER, GalaDaemonModelManagerClass))
#define GALA_DAEMON_IS_MODEL_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_DAEMON_TYPE_MODEL_MANAGER))
#define GALA_DAEMON_IS_MODEL_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_DAEMON_TYPE_MODEL_MANAGER))
#define GALA_DAEMON_MODEL_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_DAEMON_TYPE_MODEL_MANAGER, GalaDaemonModelManagerClass))

typedef struct _GalaDaemonModelManager GalaDaemonModelManager;
typedef struct _GalaDaemonModelManagerClass GalaDaemonModelManagerClass;

#define GALA_DAEMON_TYPE_INPUT_MANAGER (gala_daemon_input_manager_get_type ())
#define GALA_DAEMON_INPUT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_DAEMON_TYPE_INPUT_MANAGER, GalaDaemonInputManager))
#define GALA_DAEMON_INPUT_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_DAEMON_TYPE_INPUT_MANAGER, GalaDaemonInputManagerClass))
#define GALA_DAEMON_IS_INPUT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_DAEMON_TYPE_INPUT_MANAGER))
#define GALA_DAEMON_IS_INPUT_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_DAEMON_TYPE_INPUT_MANAGER))
#define GALA_DAEMON_INPUT_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_DAEMON_TYPE_INPUT_MANAGER, GalaDaemonInputManagerClass))

typedef struct _GalaDaemonInputManager GalaDaemonInputManager;
typedef struct _GalaDaemonInputManagerClass GalaDaemonInputManagerClass;

#define GALA_DAEMON_TYPE_IBUS_SERVICE (gala_daemon_ibus_service_get_type ())
#define GALA_DAEMON_IBUS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_DAEMON_TYPE_IBUS_SERVICE, GalaDaemonIBusService))
#define GALA_DAEMON_IBUS_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_DAEMON_TYPE_IBUS_SERVICE, GalaDaemonIBusServiceClass))
#define GALA_DAEMON_IS_IBUS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_DAEMON_TYPE_IBUS_SERVICE))
#define GALA_DAEMON_IS_IBUS_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_DAEMON_TYPE_IBUS_SERVICE))
#define GALA_DAEMON_IBUS_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_DAEMON_TYPE_IBUS_SERVICE, GalaDaemonIBusServiceClass))

typedef struct _GalaDaemonIBusService GalaDaemonIBusService;
typedef struct _GalaDaemonIBusServiceClass GalaDaemonIBusServiceClass;

#define GALA_DAEMON_TYPE_KEYBOARD (gala_daemon_keyboard_get_type ())
#define GALA_DAEMON_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_DAEMON_TYPE_KEYBOARD, GalaDaemonKeyboard))
#define GALA_DAEMON_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_DAEMON_TYPE_KEYBOARD, GalaDaemonKeyboardClass))
#define GALA_DAEMON_IS_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_DAEMON_TYPE_KEYBOARD))
#define GALA_DAEMON_IS_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_DAEMON_TYPE_KEYBOARD))
#define GALA_DAEMON_KEYBOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_DAEMON_TYPE_KEYBOARD, GalaDaemonKeyboardClass))

typedef struct _GalaDaemonKeyboard GalaDaemonKeyboard;
typedef struct _GalaDaemonKeyboardClass GalaDaemonKeyboardClass;
enum  {
	GALA_DAEMON_OSK_WINDOW_0_PROPERTY,
	GALA_DAEMON_OSK_WINDOW_MODEL_MANAGER_PROPERTY,
	GALA_DAEMON_OSK_WINDOW_INPUT_MANAGER_PROPERTY,
	GALA_DAEMON_OSK_WINDOW_IBUS_SERVICE_PROPERTY,
	GALA_DAEMON_OSK_WINDOW_NUM_PROPERTIES
};
static GParamSpec* gala_daemon_osk_window_properties[GALA_DAEMON_OSK_WINDOW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _GalaDaemonOSKWindow {
	GtkWindow parent_instance;
	GalaDaemonOSKWindowPrivate * priv;
};

struct _GalaDaemonOSKWindowClass {
	GtkWindowClass parent_class;
};

struct _GalaDaemonOSKWindowPrivate {
	GalaDaemonModelManager* _model_manager;
	GalaDaemonInputManager* _input_manager;
	GalaDaemonIBusService* _ibus_service;
	GalaDaemonKeyboard* keyboard;
};

static gint GalaDaemonOSKWindow_private_offset;
static gpointer gala_daemon_osk_window_parent_class = NULL;

VALA_EXTERN GType gala_daemon_osk_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaDaemonOSKWindow, g_object_unref)
VALA_EXTERN GType gala_daemon_model_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaDaemonModelManager, g_object_unref)
VALA_EXTERN GType gala_daemon_input_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaDaemonInputManager, g_object_unref)
VALA_EXTERN GType gala_daemon_ibus_service_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaDaemonIBusService, g_object_unref)
VALA_EXTERN GType gala_daemon_keyboard_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaDaemonKeyboard, g_object_unref)
VALA_EXTERN GalaDaemonOSKWindow* gala_daemon_osk_window_new (GalaDaemonModelManager* model_manager,
                                                 GalaDaemonInputManager* input_manager,
                                                 GalaDaemonIBusService* ibus_service);
VALA_EXTERN GalaDaemonOSKWindow* gala_daemon_osk_window_construct (GType object_type,
                                                       GalaDaemonModelManager* model_manager,
                                                       GalaDaemonInputManager* input_manager,
                                                       GalaDaemonIBusService* ibus_service);
static void gala_daemon_osk_window_update_size (GalaDaemonOSKWindow* self);
VALA_EXTERN void gala_daemon_osk_window_reset (GalaDaemonOSKWindow* self);
VALA_EXTERN void gala_daemon_keyboard_reset (GalaDaemonKeyboard* self);
VALA_EXTERN GalaDaemonModelManager* gala_daemon_osk_window_get_model_manager (GalaDaemonOSKWindow* self);
static void gala_daemon_osk_window_set_model_manager (GalaDaemonOSKWindow* self,
                                               GalaDaemonModelManager* value);
VALA_EXTERN GalaDaemonInputManager* gala_daemon_osk_window_get_input_manager (GalaDaemonOSKWindow* self);
static void gala_daemon_osk_window_set_input_manager (GalaDaemonOSKWindow* self,
                                               GalaDaemonInputManager* value);
VALA_EXTERN GalaDaemonIBusService* gala_daemon_osk_window_get_ibus_service (GalaDaemonOSKWindow* self);
static void gala_daemon_osk_window_set_ibus_service (GalaDaemonOSKWindow* self,
                                              GalaDaemonIBusService* value);
static GObject * gala_daemon_osk_window_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties);
VALA_EXTERN GalaDaemonKeyboard* gala_daemon_keyboard_new (GalaDaemonModelManager* model_manager,
                                              GalaDaemonInputManager* input_manager);
VALA_EXTERN GalaDaemonKeyboard* gala_daemon_keyboard_construct (GType object_type,
                                                    GalaDaemonModelManager* model_manager,
                                                    GalaDaemonInputManager* input_manager);
static void _gala_daemon_osk_window_update_size_gtk_widget_realize (GtkWidget* _sender,
                                                             gpointer self);
static void gala_daemon_osk_window_finalize (GObject * obj);
static GType gala_daemon_osk_window_get_type_once (void);
static void _vala_gala_daemon_osk_window_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_gala_daemon_osk_window_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);

static inline gpointer
gala_daemon_osk_window_get_instance_private (GalaDaemonOSKWindow* self)
{
	return G_STRUCT_MEMBER_P (self, GalaDaemonOSKWindow_private_offset);
}

GalaDaemonOSKWindow*
gala_daemon_osk_window_construct (GType object_type,
                                  GalaDaemonModelManager* model_manager,
                                  GalaDaemonInputManager* input_manager,
                                  GalaDaemonIBusService* ibus_service)
{
	GalaDaemonOSKWindow * self = NULL;
	g_return_val_if_fail (model_manager != NULL, NULL);
	g_return_val_if_fail (input_manager != NULL, NULL);
	g_return_val_if_fail (ibus_service != NULL, NULL);
	self = (GalaDaemonOSKWindow*) g_object_new (object_type, "model-manager", model_manager, "input-manager", input_manager, "ibus-service", ibus_service, NULL);
	return self;
}

GalaDaemonOSKWindow*
gala_daemon_osk_window_new (GalaDaemonModelManager* model_manager,
                            GalaDaemonInputManager* input_manager,
                            GalaDaemonIBusService* ibus_service)
{
	return gala_daemon_osk_window_construct (GALA_DAEMON_TYPE_OSK_WINDOW, model_manager, input_manager, ibus_service);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
gala_daemon_osk_window_update_size (GalaDaemonOSKWindow* self)
{
	GdkDisplay* display = NULL;
	GdkDisplay* _tmp0_;
	GdkDisplay* _tmp1_;
	GdkMonitor* monitor = NULL;
	GdkSurface* _tmp2_;
	GdkMonitor* _tmp3_;
	GdkMonitor* _tmp4_;
	GdkRectangle monitor_geom = {0};
	GdkRectangle _tmp5_ = {0};
	GdkRectangle _tmp6_;
	GdkRectangle _tmp7_;
	GdkRectangle _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gdk_display_get_default ();
	_tmp1_ = _g_object_ref0 (_tmp0_);
	display = _tmp1_;
	_tmp2_ = gtk_native_get_surface ((GtkNative*) self);
	_tmp3_ = gdk_display_get_monitor_at_surface (display, _tmp2_);
	_tmp4_ = _g_object_ref0 (_tmp3_);
	monitor = _tmp4_;
	gdk_monitor_get_geometry (monitor, &_tmp5_);
	_tmp6_ = _tmp5_;
	monitor_geom = _tmp6_;
	_tmp7_ = monitor_geom;
	g_object_set ((GtkWindow*) self, "default-width", _tmp7_.width, NULL);
	_tmp8_ = monitor_geom;
	g_object_set ((GtkWindow*) self, "default-height", _tmp8_.height / 3, NULL);
	_g_object_unref0 (monitor);
	_g_object_unref0 (display);
}

void
gala_daemon_osk_window_reset (GalaDaemonOSKWindow* self)
{
	GalaDaemonKeyboard* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->keyboard;
	gala_daemon_keyboard_reset (_tmp0_);
}

GalaDaemonModelManager*
gala_daemon_osk_window_get_model_manager (GalaDaemonOSKWindow* self)
{
	GalaDaemonModelManager* result;
	GalaDaemonModelManager* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_model_manager;
	result = _tmp0_;
	return result;
}

static void
gala_daemon_osk_window_set_model_manager (GalaDaemonOSKWindow* self,
                                          GalaDaemonModelManager* value)
{
	GalaDaemonModelManager* old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_daemon_osk_window_get_model_manager (self);
	if (old_value != value) {
		GalaDaemonModelManager* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_model_manager);
		self->priv->_model_manager = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gala_daemon_osk_window_properties[GALA_DAEMON_OSK_WINDOW_MODEL_MANAGER_PROPERTY]);
	}
}

GalaDaemonInputManager*
gala_daemon_osk_window_get_input_manager (GalaDaemonOSKWindow* self)
{
	GalaDaemonInputManager* result;
	GalaDaemonInputManager* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_input_manager;
	result = _tmp0_;
	return result;
}

static void
gala_daemon_osk_window_set_input_manager (GalaDaemonOSKWindow* self,
                                          GalaDaemonInputManager* value)
{
	GalaDaemonInputManager* old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_daemon_osk_window_get_input_manager (self);
	if (old_value != value) {
		GalaDaemonInputManager* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_input_manager);
		self->priv->_input_manager = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gala_daemon_osk_window_properties[GALA_DAEMON_OSK_WINDOW_INPUT_MANAGER_PROPERTY]);
	}
}

GalaDaemonIBusService*
gala_daemon_osk_window_get_ibus_service (GalaDaemonOSKWindow* self)
{
	GalaDaemonIBusService* result;
	GalaDaemonIBusService* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_ibus_service;
	result = _tmp0_;
	return result;
}

static void
gala_daemon_osk_window_set_ibus_service (GalaDaemonOSKWindow* self,
                                         GalaDaemonIBusService* value)
{
	GalaDaemonIBusService* old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_daemon_osk_window_get_ibus_service (self);
	if (old_value != value) {
		GalaDaemonIBusService* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_ibus_service);
		self->priv->_ibus_service = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gala_daemon_osk_window_properties[GALA_DAEMON_OSK_WINDOW_IBUS_SERVICE_PROPERTY]);
	}
}

static void
_gala_daemon_osk_window_update_size_gtk_widget_realize (GtkWidget* _sender,
                                                        gpointer self)
{
	gala_daemon_osk_window_update_size ((GalaDaemonOSKWindow*) self);
}

static GObject *
gala_daemon_osk_window_constructor (GType type,
                                    guint n_construct_properties,
                                    GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GalaDaemonOSKWindow * self;
	GalaDaemonModelManager* _tmp0_;
	GalaDaemonInputManager* _tmp1_;
	GalaDaemonKeyboard* _tmp2_;
	GalaDaemonKeyboard* _tmp3_;
	GtkGrid* _tmp4_ = NULL;
	GtkGrid* _tmp5_;
	parent_class = G_OBJECT_CLASS (gala_daemon_osk_window_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GALA_DAEMON_TYPE_OSK_WINDOW, GalaDaemonOSKWindow);
	_tmp0_ = self->priv->_model_manager;
	_tmp1_ = self->priv->_input_manager;
	_tmp2_ = gala_daemon_keyboard_new (_tmp0_, _tmp1_);
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->keyboard);
	self->priv->keyboard = _tmp2_;
	_tmp3_ = self->priv->keyboard;
	gtk_window_set_child ((GtkWindow*) self, (GtkWidget*) _tmp3_);
	_tmp4_ = (GtkGrid*) gtk_grid_new ();
	gtk_widget_set_visible ((GtkWidget*) _tmp4_, FALSE);
	g_object_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	gtk_window_set_titlebar ((GtkWindow*) self, (GtkWidget*) _tmp5_);
	_g_object_unref0 (_tmp5_);
	gtk_window_set_title ((GtkWindow*) self, "OSK");
	gtk_widget_add_css_class ((GtkWidget*) self, "keyboard");
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "realize", (GCallback) _gala_daemon_osk_window_update_size_gtk_widget_realize, self, 0);
	return obj;
}

static void
gala_daemon_osk_window_class_init (GalaDaemonOSKWindowClass * klass,
                                   gpointer klass_data)
{
	gala_daemon_osk_window_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GalaDaemonOSKWindow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gala_daemon_osk_window_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gala_daemon_osk_window_set_property;
	G_OBJECT_CLASS (klass)->constructor = gala_daemon_osk_window_constructor;
	G_OBJECT_CLASS (klass)->finalize = gala_daemon_osk_window_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DAEMON_OSK_WINDOW_MODEL_MANAGER_PROPERTY, gala_daemon_osk_window_properties[GALA_DAEMON_OSK_WINDOW_MODEL_MANAGER_PROPERTY] = g_param_spec_object ("model-manager", "model-manager", "model-manager", GALA_DAEMON_TYPE_MODEL_MANAGER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DAEMON_OSK_WINDOW_INPUT_MANAGER_PROPERTY, gala_daemon_osk_window_properties[GALA_DAEMON_OSK_WINDOW_INPUT_MANAGER_PROPERTY] = g_param_spec_object ("input-manager", "input-manager", "input-manager", GALA_DAEMON_TYPE_INPUT_MANAGER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DAEMON_OSK_WINDOW_IBUS_SERVICE_PROPERTY, gala_daemon_osk_window_properties[GALA_DAEMON_OSK_WINDOW_IBUS_SERVICE_PROPERTY] = g_param_spec_object ("ibus-service", "ibus-service", "ibus-service", GALA_DAEMON_TYPE_IBUS_SERVICE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
gala_daemon_osk_window_instance_init (GalaDaemonOSKWindow * self,
                                      gpointer klass)
{
	self->priv = gala_daemon_osk_window_get_instance_private (self);
}

static void
gala_daemon_osk_window_finalize (GObject * obj)
{
	GalaDaemonOSKWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GALA_DAEMON_TYPE_OSK_WINDOW, GalaDaemonOSKWindow);
	_g_object_unref0 (self->priv->_model_manager);
	_g_object_unref0 (self->priv->_input_manager);
	_g_object_unref0 (self->priv->_ibus_service);
	_g_object_unref0 (self->priv->keyboard);
	G_OBJECT_CLASS (gala_daemon_osk_window_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
gala_daemon_osk_window_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaDaemonOSKWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_daemon_osk_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GalaDaemonOSKWindow), 0, (GInstanceInitFunc) gala_daemon_osk_window_instance_init, NULL };
	GType gala_daemon_osk_window_type_id;
	gala_daemon_osk_window_type_id = g_type_register_static (gtk_window_get_type (), "GalaDaemonOSKWindow", &g_define_type_info, G_TYPE_FLAG_NONE);
	GalaDaemonOSKWindow_private_offset = g_type_add_instance_private (gala_daemon_osk_window_type_id, sizeof (GalaDaemonOSKWindowPrivate));
	return gala_daemon_osk_window_type_id;
}

GType
gala_daemon_osk_window_get_type (void)
{
	static gsize gala_daemon_osk_window_type_id__once = 0;
	if (g_once_init_enter (&gala_daemon_osk_window_type_id__once)) {
		GType gala_daemon_osk_window_type_id;
		gala_daemon_osk_window_type_id = gala_daemon_osk_window_get_type_once ();
		g_once_init_leave (&gala_daemon_osk_window_type_id__once, gala_daemon_osk_window_type_id);
	}
	return gala_daemon_osk_window_type_id__once;
}

static void
_vala_gala_daemon_osk_window_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	GalaDaemonOSKWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GALA_DAEMON_TYPE_OSK_WINDOW, GalaDaemonOSKWindow);
	switch (property_id) {
		case GALA_DAEMON_OSK_WINDOW_MODEL_MANAGER_PROPERTY:
		g_value_set_object (value, gala_daemon_osk_window_get_model_manager (self));
		break;
		case GALA_DAEMON_OSK_WINDOW_INPUT_MANAGER_PROPERTY:
		g_value_set_object (value, gala_daemon_osk_window_get_input_manager (self));
		break;
		case GALA_DAEMON_OSK_WINDOW_IBUS_SERVICE_PROPERTY:
		g_value_set_object (value, gala_daemon_osk_window_get_ibus_service (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gala_daemon_osk_window_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	GalaDaemonOSKWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GALA_DAEMON_TYPE_OSK_WINDOW, GalaDaemonOSKWindow);
	switch (property_id) {
		case GALA_DAEMON_OSK_WINDOW_MODEL_MANAGER_PROPERTY:
		gala_daemon_osk_window_set_model_manager (self, g_value_get_object (value));
		break;
		case GALA_DAEMON_OSK_WINDOW_INPUT_MANAGER_PROPERTY:
		gala_daemon_osk_window_set_input_manager (self, g_value_get_object (value));
		break;
		case GALA_DAEMON_OSK_WINDOW_IBUS_SERVICE_PROPERTY:
		gala_daemon_osk_window_set_ibus_service (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

