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

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

#include "gnome-games.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

static GamesPlatform** games_runner_factory_real_get_platforms (GamesRunnerFactory* self,
                                                         gint* result_length1);
static GType games_runner_factory_get_type_once (void);

static GamesPlatform**
games_runner_factory_real_get_platforms (GamesRunnerFactory* self,
                                         gint* result_length1)
{
	GamesPlatform** _tmp0_;
	GamesPlatform** _tmp1_;
	gint _tmp1__length1;
	GamesPlatform** result;
	_tmp0_ = g_new0 (GamesPlatform*, 0 + 1);
	_tmp1_ = _tmp0_;
	_tmp1__length1 = 0;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

GamesPlatform**
games_runner_factory_get_platforms (GamesRunnerFactory* self,
                                    gint* result_length1)
{
	GamesRunnerFactoryIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GAMES_RUNNER_FACTORY_GET_INTERFACE (self);
	if (_iface_->get_platforms) {
		return _iface_->get_platforms (self, result_length1);
	}
	return NULL;
}

GamesRunner*
games_runner_factory_create_runner (GamesRunnerFactory* self,
                                    GamesGame* game,
                                    GError** error)
{
	GamesRunnerFactoryIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GAMES_RUNNER_FACTORY_GET_INTERFACE (self);
	if (_iface_->create_runner) {
		return _iface_->create_runner (self, game, error);
	}
	return NULL;
}

static void
games_runner_factory_default_init (GamesRunnerFactoryIface * iface,
                                   gpointer iface_data)
{
	iface->get_platforms = games_runner_factory_real_get_platforms;
}

static GType
games_runner_factory_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GamesRunnerFactoryIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) games_runner_factory_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType games_runner_factory_type_id;
	games_runner_factory_type_id = g_type_register_static (G_TYPE_INTERFACE, "GamesRunnerFactory", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (games_runner_factory_type_id, G_TYPE_OBJECT);
	return games_runner_factory_type_id;
}

GType
games_runner_factory_get_type (void)
{
	static volatile gsize games_runner_factory_type_id__once = 0;
	if (g_once_init_enter (&games_runner_factory_type_id__once)) {
		GType games_runner_factory_type_id;
		games_runner_factory_type_id = games_runner_factory_get_type_once ();
		g_once_init_leave (&games_runner_factory_type_id__once, games_runner_factory_type_id);
	}
	return games_runner_factory_type_id__once;
}

