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

/* SPDX-FileCopyrightText: 2025 Mahjongg Contributors*/
/* SPDX-License-Identifier: GPL-2.0-or-later*/

#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <glib.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 TYPE_RULES_DIALOG (rules_dialog_get_type ())
#define RULES_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RULES_DIALOG, RulesDialog))
#define RULES_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RULES_DIALOG, RulesDialogClass))
#define IS_RULES_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RULES_DIALOG))
#define IS_RULES_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RULES_DIALOG))
#define RULES_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RULES_DIALOG, RulesDialogClass))

typedef struct _RulesDialog RulesDialog;
typedef struct _RulesDialogClass RulesDialogClass;
typedef struct _RulesDialogPrivate RulesDialogPrivate;
enum  {
	RULES_DIALOG_0_PROPERTY,
	RULES_DIALOG_NUM_PROPERTIES
};
static GParamSpec* rules_dialog_properties[RULES_DIALOG_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

struct _RulesDialog {
	AdwPreferencesDialog parent_instance;
	RulesDialogPrivate * priv;
};

struct _RulesDialogClass {
	AdwPreferencesDialogClass parent_class;
};

struct _RulesDialogPrivate {
	GtkImage* game_image;
};

static gint RulesDialog_private_offset;
static gpointer rules_dialog_parent_class = NULL;

VALA_EXTERN GType rules_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RulesDialog, g_object_unref)
VALA_EXTERN RulesDialog* rules_dialog_new (void);
VALA_EXTERN RulesDialog* rules_dialog_construct (GType object_type);
static void rules_dialog_finalize (GObject * obj);
static GType rules_dialog_get_type_once (void);

static inline gpointer
rules_dialog_get_instance_private (RulesDialog* self)
{
	return G_STRUCT_MEMBER_P (self, RulesDialog_private_offset);
}

RulesDialog*
rules_dialog_construct (GType object_type)
{
	RulesDialog * self = NULL;
	GtkImage* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	self = (RulesDialog*) g_object_new (object_type, NULL);
	_tmp0_ = self->priv->game_image;
	_tmp1_ = g_strdup_printf ("%s-symbolic", APP_ID);
	_tmp2_ = _tmp1_;
	g_object_set (_tmp0_, "icon-name", _tmp2_, NULL);
	_g_free0 (_tmp2_);
	return self;
}

RulesDialog*
rules_dialog_new (void)
{
	return rules_dialog_construct (TYPE_RULES_DIALOG);
}

static void
rules_dialog_class_init (RulesDialogClass * klass,
                         gpointer klass_data)
{
	rules_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &RulesDialog_private_offset);
	G_OBJECT_CLASS (klass)->finalize = rules_dialog_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Mahjongg/ui/rules-dialog.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "game_image", FALSE, RulesDialog_private_offset + G_STRUCT_OFFSET (RulesDialogPrivate, game_image));
}

static void
rules_dialog_instance_init (RulesDialog * self,
                            gpointer klass)
{
	self->priv = rules_dialog_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
rules_dialog_finalize (GObject * obj)
{
	RulesDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_RULES_DIALOG, RulesDialog);
	G_OBJECT_CLASS (rules_dialog_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
rules_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (RulesDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rules_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RulesDialog), 0, (GInstanceInitFunc) rules_dialog_instance_init, NULL };
	GType rules_dialog_type_id;
	rules_dialog_type_id = g_type_register_static (adw_preferences_dialog_get_type (), "RulesDialog", &g_define_type_info, 0);
	RulesDialog_private_offset = g_type_add_instance_private (rules_dialog_type_id, sizeof (RulesDialogPrivate));
	return rules_dialog_type_id;
}

GType
rules_dialog_get_type (void)
{
	static gsize rules_dialog_type_id__once = 0;
	if (g_once_init_enter (&rules_dialog_type_id__once)) {
		GType rules_dialog_type_id;
		rules_dialog_type_id = rules_dialog_get_type_once ();
		g_once_init_leave (&rules_dialog_type_id__once, rules_dialog_type_id);
	}
	return rules_dialog_type_id__once;
}

