/* preferences-subpage.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from preferences-subpage.vala, do not modify */

/* This file is part of GNOME Games. License: GPL-3.0+.*/

#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib.h>
#include <string.h>
#include "gnome-games.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

#define GAMES_TYPE_PREFERENCES_SUBPAGE (games_preferences_subpage_get_type ())
#define GAMES_PREFERENCES_SUBPAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_PREFERENCES_SUBPAGE, GamesPreferencesSubpage))
#define GAMES_IS_PREFERENCES_SUBPAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_PREFERENCES_SUBPAGE))
#define GAMES_PREFERENCES_SUBPAGE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_PREFERENCES_SUBPAGE, GamesPreferencesSubpageIface))

typedef struct _GamesPreferencesSubpage GamesPreferencesSubpage;
typedef struct _GamesPreferencesSubpageIface GamesPreferencesSubpageIface;
enum  {
	GAMES_PREFERENCES_SUBPAGE_BACK_SIGNAL,
	GAMES_PREFERENCES_SUBPAGE_NUM_SIGNALS
};
static guint games_preferences_subpage_signals[GAMES_PREFERENCES_SUBPAGE_NUM_SIGNALS] = {0};

struct _GamesPreferencesSubpageIface {
	GTypeInterface parent_iface;
	gboolean (*get_allow_back) (GamesPreferencesSubpage* self);
	void (*set_allow_back) (GamesPreferencesSubpage* self, gboolean value);
};

VALA_EXTERN GType games_preferences_subpage_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gboolean games_preferences_subpage_get_allow_back (GamesPreferencesSubpage* self);
VALA_EXTERN void games_preferences_subpage_set_allow_back (GamesPreferencesSubpage* self,
                                               gboolean value);
static GType games_preferences_subpage_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

gboolean
games_preferences_subpage_get_allow_back (GamesPreferencesSubpage* self)
{
	GamesPreferencesSubpageIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GAMES_PREFERENCES_SUBPAGE_GET_INTERFACE (self);
	if (_iface_->get_allow_back) {
		return _iface_->get_allow_back (self);
	}
	return FALSE;
}

void
games_preferences_subpage_set_allow_back (GamesPreferencesSubpage* self,
                                          gboolean value)
{
	GamesPreferencesSubpageIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GAMES_PREFERENCES_SUBPAGE_GET_INTERFACE (self);
	if (_iface_->set_allow_back) {
		_iface_->set_allow_back (self, value);
	}
}

static void
games_preferences_subpage_default_init (GamesPreferencesSubpageIface * iface,
                                        gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_boolean ("allow-back", "allow-back", "allow-back", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	games_preferences_subpage_signals[GAMES_PREFERENCES_SUBPAGE_BACK_SIGNAL] = g_signal_new ("back", GAMES_TYPE_PREFERENCES_SUBPAGE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static GType
games_preferences_subpage_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GamesPreferencesSubpageIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) games_preferences_subpage_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType games_preferences_subpage_type_id;
	games_preferences_subpage_type_id = g_type_register_static (G_TYPE_INTERFACE, "GamesPreferencesSubpage", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (games_preferences_subpage_type_id, gtk_widget_get_type ());
	return games_preferences_subpage_type_id;
}

GType
games_preferences_subpage_get_type (void)
{
	static volatile gsize games_preferences_subpage_type_id__once = 0;
	if (g_once_init_enter (&games_preferences_subpage_type_id__once)) {
		GType games_preferences_subpage_type_id;
		games_preferences_subpage_type_id = games_preferences_subpage_get_type_once ();
		g_once_init_leave (&games_preferences_subpage_type_id__once, games_preferences_subpage_type_id);
	}
	return games_preferences_subpage_type_id__once;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

