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

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

#include "gnome-games.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.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 inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

gchar*
games_screen_layout_get_icon (GamesScreenLayout self)
{
	gchar* result;
	switch (self) {
		case GAMES_SCREEN_LAYOUT_TOP_BOTTOM:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("screen-layout-top-bottom-symbolic");
			result = _tmp0_;
			return result;
		}
		case GAMES_SCREEN_LAYOUT_LEFT_RIGHT:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("screen-layout-left-right-symbolic");
			result = _tmp1_;
			return result;
		}
		case GAMES_SCREEN_LAYOUT_RIGHT_LEFT:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("screen-layout-right-left-symbolic");
			result = _tmp2_;
			return result;
		}
		case GAMES_SCREEN_LAYOUT_QUICK_SWITCH:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("screen-layout-quick-switch-symbolic");
			result = _tmp3_;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

gchar*
games_screen_layout_get_title (GamesScreenLayout self)
{
	gchar* result;
	switch (self) {
		case GAMES_SCREEN_LAYOUT_TOP_BOTTOM:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup (_ ("Vertical"));
			result = _tmp0_;
			return result;
		}
		case GAMES_SCREEN_LAYOUT_LEFT_RIGHT:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup (_ ("Side by side, right-handed"));
			result = _tmp1_;
			return result;
		}
		case GAMES_SCREEN_LAYOUT_RIGHT_LEFT:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup (_ ("Side by side, left-handed"));
			result = _tmp2_;
			return result;
		}
		case GAMES_SCREEN_LAYOUT_QUICK_SWITCH:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup (_ ("Single screen"));
			result = _tmp3_;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

GamesScreenLayout*
games_screen_layout_get_layouts (gint* result_length1)
{
	GamesScreenLayout* _tmp0_;
	GamesScreenLayout* _tmp1_;
	gint _tmp1__length1;
	GamesScreenLayout* result;
	_tmp0_ = g_new0 (GamesScreenLayout, 4);
	_tmp0_[0] = GAMES_SCREEN_LAYOUT_TOP_BOTTOM;
	_tmp0_[1] = GAMES_SCREEN_LAYOUT_LEFT_RIGHT;
	_tmp0_[2] = GAMES_SCREEN_LAYOUT_RIGHT_LEFT;
	_tmp0_[3] = GAMES_SCREEN_LAYOUT_QUICK_SWITCH;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = 4;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

static GType
games_screen_layout_get_type_once (void)
{
	static const GEnumValue values[] = {{GAMES_SCREEN_LAYOUT_TOP_BOTTOM, "GAMES_SCREEN_LAYOUT_TOP_BOTTOM", "top-bottom"}, {GAMES_SCREEN_LAYOUT_LEFT_RIGHT, "GAMES_SCREEN_LAYOUT_LEFT_RIGHT", "left-right"}, {GAMES_SCREEN_LAYOUT_RIGHT_LEFT, "GAMES_SCREEN_LAYOUT_RIGHT_LEFT", "right-left"}, {GAMES_SCREEN_LAYOUT_QUICK_SWITCH, "GAMES_SCREEN_LAYOUT_QUICK_SWITCH", "quick-switch"}, {0, NULL, NULL}};
	GType games_screen_layout_type_id;
	games_screen_layout_type_id = g_enum_register_static ("GamesScreenLayout", values);
	return games_screen_layout_type_id;
}

GType
games_screen_layout_get_type (void)
{
	static volatile gsize games_screen_layout_type_id__once = 0;
	if (g_once_init_enter (&games_screen_layout_type_id__once)) {
		GType games_screen_layout_type_id;
		games_screen_layout_type_id = games_screen_layout_get_type_once ();
		g_once_init_leave (&games_screen_layout_type_id__once, games_screen_layout_type_id);
	}
	return games_screen_layout_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;
}

