/* gitg-ext-selectable.c generated by valac 0.56.19, the Vala compiler
 * generated from gitg-ext-selectable.vala, do not modify */

/*
 * This file is part of gitg
 *
 * Copyright (C) 2014 - Jesse van den Kieboom
 *
 * gitg is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * gitg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with gitg. If not, see <http://www.gnu.org/licenses/>.
 */

#include "libgitg-ext.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 GType gitg_ext_selectable_get_type_once (void);

 G_GNUC_NO_INLINE static GType
gitg_ext_selection_mode_get_type_once (void)
{
	static const GEnumValue values[] = {{GITG_EXT_SELECTION_MODE_NORMAL, "GITG_EXT_SELECTION_MODE_NORMAL", "normal"}, {GITG_EXT_SELECTION_MODE_SELECTION, "GITG_EXT_SELECTION_MODE_SELECTION", "selection"}, {0, NULL, NULL}};
	GType gitg_ext_selection_mode_type_id;
	gitg_ext_selection_mode_type_id = g_enum_register_static ("GitgExtSelectionMode", values);
	return gitg_ext_selection_mode_type_id;
}

GType
gitg_ext_selection_mode_get_type (void)
{
	static gsize gitg_ext_selection_mode_type_id__once = 0;
	if (g_once_init_enter (&gitg_ext_selection_mode_type_id__once)) {
		GType gitg_ext_selection_mode_type_id;
		gitg_ext_selection_mode_type_id = gitg_ext_selection_mode_get_type_once ();
		g_once_init_leave (&gitg_ext_selection_mode_type_id__once, gitg_ext_selection_mode_type_id);
	}
	return gitg_ext_selection_mode_type_id__once;
}

GitgExtSelectionMode
gitg_ext_selectable_get_selectable_mode (GitgExtSelectable* self)
{
	GitgExtSelectableIface* _iface_;
	g_return_val_if_fail (self != NULL, 0);
	_iface_ = GITG_EXT_SELECTABLE_GET_INTERFACE (self);
	if (_iface_->get_selectable_mode) {
		return _iface_->get_selectable_mode (self);
	}
	return 0;
}

void
gitg_ext_selectable_set_selectable_mode (GitgExtSelectable* self,
                                         GitgExtSelectionMode value)
{
	GitgExtSelectableIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GITG_EXT_SELECTABLE_GET_INTERFACE (self);
	if (_iface_->set_selectable_mode) {
		_iface_->set_selectable_mode (self, value);
	}
}

gboolean
gitg_ext_selectable_get_selectable_available (GitgExtSelectable* self)
{
	GitgExtSelectableIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GITG_EXT_SELECTABLE_GET_INTERFACE (self);
	if (_iface_->get_selectable_available) {
		return _iface_->get_selectable_available (self);
	}
	return FALSE;
}

gchar*
gitg_ext_selectable_get_selectable_mode_tooltip (GitgExtSelectable* self)
{
	GitgExtSelectableIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GITG_EXT_SELECTABLE_GET_INTERFACE (self);
	if (_iface_->get_selectable_mode_tooltip) {
		return _iface_->get_selectable_mode_tooltip (self);
	}
	return NULL;
}

GtkWidget*
gitg_ext_selectable_get_action_widget (GitgExtSelectable* self)
{
	GitgExtSelectableIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GITG_EXT_SELECTABLE_GET_INTERFACE (self);
	if (_iface_->get_action_widget) {
		return _iface_->get_action_widget (self);
	}
	return NULL;
}

static void
gitg_ext_selectable_default_init (GitgExtSelectableIface * iface,
                                  gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_enum ("selectable-mode", "selectable-mode", "selectable-mode", GITG_EXT_TYPE_SELECTION_MODE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_interface_install_property (iface, g_param_spec_boolean ("selectable-available", "selectable-available", "selectable-available", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_string ("selectable-mode-tooltip", "selectable-mode-tooltip", "selectable-mode-tooltip", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_object ("action-widget", "action-widget", "action-widget", gtk_widget_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

/**
 * gitg Selectable interface.
 *
 * The Selectable interface can be implemented when an activity supports a
 * selection mode.
 */
 G_GNUC_NO_INLINE static GType
gitg_ext_selectable_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GitgExtSelectableIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_ext_selectable_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gitg_ext_selectable_type_id;
	gitg_ext_selectable_type_id = g_type_register_static (G_TYPE_INTERFACE, "GitgExtSelectable", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gitg_ext_selectable_type_id, G_TYPE_OBJECT);
	g_type_interface_add_prerequisite (gitg_ext_selectable_type_id, GITG_EXT_TYPE_ACTIVITY);
	return gitg_ext_selectable_type_id;
}

GType
gitg_ext_selectable_get_type (void)
{
	static gsize gitg_ext_selectable_type_id__once = 0;
	if (g_once_init_enter (&gitg_ext_selectable_type_id__once)) {
		GType gitg_ext_selectable_type_id;
		gitg_ext_selectable_type_id = gitg_ext_selectable_get_type_once ();
		g_once_init_leave (&gitg_ext_selectable_type_id__once, gitg_ext_selectable_type_id);
	}
	return gitg_ext_selectable_type_id__once;
}

