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

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

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

enum  {
	GAMES_RUNNER_SNAPSHOT_CREATED_SIGNAL,
	GAMES_RUNNER_STOPPED_SIGNAL,
	GAMES_RUNNER_CRASH_SIGNAL,
	GAMES_RUNNER_NUM_SIGNALS
};
static guint games_runner_signals[GAMES_RUNNER_NUM_SIGNALS] = {0};

static GType games_runner_get_type_once (void);

GtkWidget*
games_runner_get_display (GamesRunner* self)
{
	GamesRunnerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->get_display) {
		return _iface_->get_display (self);
	}
	return NULL;
}

GamesHeaderBarWidget*
games_runner_get_extra_widget (GamesRunner* self)
{
	GamesRunnerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->get_extra_widget) {
		return _iface_->get_extra_widget (self);
	}
	return NULL;
}

void
games_runner_prepare (GamesRunner* self,
                      GError** error)
{
	GamesRunnerIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->prepare) {
		_iface_->prepare (self, error);
	}
}

void
games_runner_start (GamesRunner* self,
                    GError** error)
{
	GamesRunnerIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->start) {
		_iface_->start (self, error);
	}
}

void
games_runner_resume (GamesRunner* self)
{
	GamesRunnerIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->resume) {
		_iface_->resume (self);
	}
}

void
games_runner_pause (GamesRunner* self)
{
	GamesRunnerIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->pause) {
		_iface_->pause (self);
	}
}

void
games_runner_stop (GamesRunner* self)
{
	GamesRunnerIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->stop) {
		_iface_->stop (self);
	}
}

GamesSnapshot*
games_runner_try_create_snapshot (GamesRunner* self,
                                  gboolean is_automatic)
{
	GamesRunnerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->try_create_snapshot) {
		return _iface_->try_create_snapshot (self, is_automatic);
	}
	return NULL;
}

void
games_runner_delete_snapshot (GamesRunner* self,
                              GamesSnapshot* snapshot)
{
	GamesRunnerIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->delete_snapshot) {
		_iface_->delete_snapshot (self, snapshot);
	}
}

void
games_runner_preview_snapshot (GamesRunner* self,
                               GamesSnapshot* snapshot)
{
	GamesRunnerIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->preview_snapshot) {
		_iface_->preview_snapshot (self, snapshot);
	}
}

void
games_runner_preview_current_state (GamesRunner* self)
{
	GamesRunnerIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->preview_current_state) {
		_iface_->preview_current_state (self);
	}
}

void
games_runner_load_previewed_snapshot (GamesRunner* self,
                                      GError** error)
{
	GamesRunnerIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->load_previewed_snapshot) {
		_iface_->load_previewed_snapshot (self, error);
	}
}

GamesSnapshot**
games_runner_get_snapshots (GamesRunner* self,
                            gint* result_length1)
{
	GamesRunnerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->get_snapshots) {
		return _iface_->get_snapshots (self, result_length1);
	}
	return NULL;
}

GamesInputMode*
games_runner_get_available_input_modes (GamesRunner* self,
                                        gint* result_length1)
{
	GamesRunnerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->get_available_input_modes) {
		return _iface_->get_available_input_modes (self, result_length1);
	}
	return NULL;
}

gboolean
games_runner_key_press_event (GamesRunner* self,
                              guint keyval,
                              GdkModifierType state)
{
	GamesRunnerIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->key_press_event) {
		return _iface_->key_press_event (self, keyval, state);
	}
	return FALSE;
}

gboolean
games_runner_gamepad_button_press_event (GamesRunner* self,
                                         guint16 button)
{
	GamesRunnerIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->gamepad_button_press_event) {
		return _iface_->gamepad_button_press_event (self, button);
	}
	return FALSE;
}

gboolean
games_runner_get_can_fullscreen (GamesRunner* self)
{
	GamesRunnerIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->get_can_fullscreen) {
		return _iface_->get_can_fullscreen (self);
	}
	return FALSE;
}

gboolean
games_runner_get_can_resume (GamesRunner* self)
{
	GamesRunnerIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->get_can_resume) {
		return _iface_->get_can_resume (self);
	}
	return FALSE;
}

gboolean
games_runner_get_supports_snapshots (GamesRunner* self)
{
	GamesRunnerIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->get_supports_snapshots) {
		return _iface_->get_supports_snapshots (self);
	}
	return FALSE;
}

gboolean
games_runner_get_is_integrated (GamesRunner* self)
{
	GamesRunnerIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->get_is_integrated) {
		return _iface_->get_is_integrated (self);
	}
	return FALSE;
}

GamesMediaSet*
games_runner_get_media_set (GamesRunner* self)
{
	GamesRunnerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->get_media_set) {
		return _iface_->get_media_set (self);
	}
	return NULL;
}

GamesInputMode
games_runner_get_input_mode (GamesRunner* self)
{
	GamesRunnerIface* _iface_;
	g_return_val_if_fail (self != NULL, 0);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->get_input_mode) {
		return _iface_->get_input_mode (self);
	}
	return 0;
}

void
games_runner_set_input_mode (GamesRunner* self,
                             GamesInputMode value)
{
	GamesRunnerIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GAMES_RUNNER_GET_INTERFACE (self);
	if (_iface_->set_input_mode) {
		_iface_->set_input_mode (self, value);
	}
}

static void
games_runner_default_init (GamesRunnerIface * iface,
                           gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_boolean ("can-fullscreen", "can-fullscreen", "can-fullscreen", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_boolean ("can-resume", "can-resume", "can-resume", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_boolean ("supports-snapshots", "supports-snapshots", "supports-snapshots", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_boolean ("is-integrated", "is-integrated", "is-integrated", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_object ("media-set", "media-set", "media-set", GAMES_TYPE_MEDIA_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_enum ("input-mode", "input-mode", "input-mode", GAMES_TYPE_INPUT_MODE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	games_runner_signals[GAMES_RUNNER_SNAPSHOT_CREATED_SIGNAL] = g_signal_new ("snapshot-created", GAMES_TYPE_RUNNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	games_runner_signals[GAMES_RUNNER_STOPPED_SIGNAL] = g_signal_new ("stopped", GAMES_TYPE_RUNNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	games_runner_signals[GAMES_RUNNER_CRASH_SIGNAL] = g_signal_new ("crash", GAMES_TYPE_RUNNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
}

static GType
games_runner_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GamesRunnerIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) games_runner_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType games_runner_type_id;
	games_runner_type_id = g_type_register_static (G_TYPE_INTERFACE, "GamesRunner", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (games_runner_type_id, G_TYPE_OBJECT);
	return games_runner_type_id;
}

GType
games_runner_get_type (void)
{
	static volatile gsize games_runner_type_id__once = 0;
	if (g_once_init_enter (&games_runner_type_id__once)) {
		GType games_runner_type_id;
		games_runner_type_id = games_runner_get_type_once ();
		g_once_init_leave (&games_runner_type_id__once, games_runner_type_id);
	}
	return games_runner_type_id__once;
}

