/* triggerSelectButton.c generated by valac 0.56.19, the Vala compiler
 * generated from triggerSelectButton.vala, do not modify */

/*///////////////////////////////////////////////////////////////////////*/
/* Copyright 2011-2021 Simon Schneegans*/
/**/
/* Permission is hereby granted, free of charge, to any person obtaining*/
/* a copy of this software and associated documentation files (the*/
/* "Software"), to deal in the Software without restriction, including*/
/* without limitation the rights to use, copy, modify, merge, publish,*/
/* distribute, sublicense, and/or sell copies of the Software, and to*/
/* permit persons to whom the Software is furnished to do so, subject to*/
/* the following conditions:*/
/* */
/* The above copyright notice and this permission notice shall be*/
/* included in all copies or substantial portions of the Software.*/
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,*/
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF*/
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY*/
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,*/
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE*/
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/
/*///////////////////////////////////////////////////////////////////////*/

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <gdk/gdk.h>
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <cairo-gobject.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define GNOME_PIE_TYPE_TRIGGER_SELECT_BUTTON (gnome_pie_trigger_select_button_get_type ())
#define GNOME_PIE_TRIGGER_SELECT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_TRIGGER_SELECT_BUTTON, GnomePieTriggerSelectButton))
#define GNOME_PIE_TRIGGER_SELECT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_TRIGGER_SELECT_BUTTON, GnomePieTriggerSelectButtonClass))
#define GNOME_PIE_IS_TRIGGER_SELECT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_TRIGGER_SELECT_BUTTON))
#define GNOME_PIE_IS_TRIGGER_SELECT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_TRIGGER_SELECT_BUTTON))
#define GNOME_PIE_TRIGGER_SELECT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_TRIGGER_SELECT_BUTTON, GnomePieTriggerSelectButtonClass))

typedef struct _GnomePieTriggerSelectButton GnomePieTriggerSelectButton;
typedef struct _GnomePieTriggerSelectButtonClass GnomePieTriggerSelectButtonClass;
typedef struct _GnomePieTriggerSelectButtonPrivate GnomePieTriggerSelectButtonPrivate;

#define GNOME_PIE_TYPE_TRIGGER (gnome_pie_trigger_get_type ())
#define GNOME_PIE_TRIGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_TRIGGER, GnomePieTrigger))
#define GNOME_PIE_TRIGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_TRIGGER, GnomePieTriggerClass))
#define GNOME_PIE_IS_TRIGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_TRIGGER))
#define GNOME_PIE_IS_TRIGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_TRIGGER))
#define GNOME_PIE_TRIGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_TRIGGER, GnomePieTriggerClass))

typedef struct _GnomePieTrigger GnomePieTrigger;
typedef struct _GnomePieTriggerClass GnomePieTriggerClass;
enum  {
	GNOME_PIE_TRIGGER_SELECT_BUTTON_0_PROPERTY,
	GNOME_PIE_TRIGGER_SELECT_BUTTON_NUM_PROPERTIES
};
static GParamSpec* gnome_pie_trigger_select_button_properties[GNOME_PIE_TRIGGER_SELECT_BUTTON_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	GNOME_PIE_TRIGGER_SELECT_BUTTON_ON_SELECT_SIGNAL,
	GNOME_PIE_TRIGGER_SELECT_BUTTON_NUM_SIGNALS
};
static guint gnome_pie_trigger_select_button_signals[GNOME_PIE_TRIGGER_SELECT_BUTTON_NUM_SIGNALS] = {0};

struct _GnomePieTriggerSelectButton {
	GtkToggleButton parent_instance;
	GnomePieTriggerSelectButtonPrivate * priv;
};

struct _GnomePieTriggerSelectButtonClass {
	GtkToggleButtonClass parent_class;
};

struct _GnomePieTriggerSelectButtonPrivate {
	GnomePieTrigger* trigger;
	gboolean enable_mouse;
	GdkModifierType lock_modifiers;
};

static gint GnomePieTriggerSelectButton_private_offset;
static gpointer gnome_pie_trigger_select_button_parent_class = NULL;

VALA_EXTERN GType gnome_pie_trigger_select_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieTriggerSelectButton, g_object_unref)
VALA_EXTERN GType gnome_pie_trigger_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieTrigger, g_object_unref)
VALA_EXTERN GnomePieTriggerSelectButton* gnome_pie_trigger_select_button_new (gboolean enable_mouse);
VALA_EXTERN GnomePieTriggerSelectButton* gnome_pie_trigger_select_button_construct (GType object_type,
                                                                        gboolean enable_mouse);
static void __lambda54_ (GnomePieTriggerSelectButton* self);
VALA_EXTERN void gnome_pie_focus_grabber_grab (GdkWindow* window);
static void ___lambda54__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                             gpointer self);
static gboolean gnome_pie_trigger_select_button_on_button_press (GnomePieTriggerSelectButton* self,
                                                          GdkEventButton* event);
static gboolean _gnome_pie_trigger_select_button_on_button_press_gtk_widget_button_press_event (GtkWidget* _sender,
                                                                                         GdkEventButton* event,
                                                                                         gpointer self);
static gboolean gnome_pie_trigger_select_button_on_key_press (GnomePieTriggerSelectButton* self,
                                                       GdkEventKey* event);
static gboolean _gnome_pie_trigger_select_button_on_key_press_gtk_widget_key_press_event (GtkWidget* _sender,
                                                                                   GdkEventKey* event,
                                                                                   gpointer self);
VALA_EXTERN void gnome_pie_trigger_select_button_set_trigger (GnomePieTriggerSelectButton* self,
                                                  GnomePieTrigger* trigger);
VALA_EXTERN GnomePieTrigger* gnome_pie_trigger_new (void);
VALA_EXTERN GnomePieTrigger* gnome_pie_trigger_construct (GType object_type);
VALA_EXTERN const gchar* gnome_pie_trigger_get_label (GnomePieTrigger* self);
static void gnome_pie_trigger_select_button_cancel (GnomePieTriggerSelectButton* self);
VALA_EXTERN void gnome_pie_focus_grabber_ungrab (void);
static void gnome_pie_trigger_select_button_update_trigger (GnomePieTriggerSelectButton* self,
                                                     GnomePieTrigger* trigger);
VALA_EXTERN const gchar* gnome_pie_trigger_get_name (GnomePieTrigger* self);
VALA_EXTERN GnomePieTrigger* gnome_pie_trigger_new_from_values (guint key_sym,
                                                    GdkModifierType modifiers,
                                                    gboolean with_mouse,
                                                    gboolean turbo,
                                                    gboolean delayed,
                                                    gboolean centered,
                                                    gboolean warp,
                                                    gint shape);
VALA_EXTERN GnomePieTrigger* gnome_pie_trigger_construct_from_values (GType object_type,
                                                          guint key_sym,
                                                          GdkModifierType modifiers,
                                                          gboolean with_mouse,
                                                          gboolean turbo,
                                                          gboolean delayed,
                                                          gboolean centered,
                                                          gboolean warp,
                                                          gint shape);
VALA_EXTERN gint gnome_pie_trigger_get_key_code (GnomePieTrigger* self);
static void gnome_pie_trigger_select_button_finalize (GObject * obj);
static GType gnome_pie_trigger_select_button_get_type_once (void);

static inline gpointer
gnome_pie_trigger_select_button_get_instance_private (GnomePieTriggerSelectButton* self)
{
	return G_STRUCT_MEMBER_P (self, GnomePieTriggerSelectButton_private_offset);
}

static void
__lambda54_ (GnomePieTriggerSelectButton* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	_tmp0_ = gtk_toggle_button_get_active ((GtkToggleButton*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		GdkWindow* _tmp2_;
		gtk_button_set_label ((GtkButton*) self, _ ("Press a hotkey ..."));
		gtk_grab_add ((GtkWidget*) self);
		_tmp2_ = gtk_widget_get_window ((GtkWidget*) self);
		gnome_pie_focus_grabber_grab (_tmp2_);
	}
}

static void
___lambda54__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                        gpointer self)
{
	__lambda54_ ((GnomePieTriggerSelectButton*) self);
}

static gboolean
_gnome_pie_trigger_select_button_on_button_press_gtk_widget_button_press_event (GtkWidget* _sender,
                                                                                GdkEventButton* event,
                                                                                gpointer self)
{
	gboolean result;
	result = gnome_pie_trigger_select_button_on_button_press ((GnomePieTriggerSelectButton*) self, event);
	return result;
}

static gboolean
_gnome_pie_trigger_select_button_on_key_press_gtk_widget_key_press_event (GtkWidget* _sender,
                                                                          GdkEventKey* event,
                                                                          gpointer self)
{
	gboolean result;
	result = gnome_pie_trigger_select_button_on_key_press ((GnomePieTriggerSelectButton*) self, event);
	return result;
}

GnomePieTriggerSelectButton*
gnome_pie_trigger_select_button_construct (GType object_type,
                                           gboolean enable_mouse)
{
	GnomePieTriggerSelectButton * self = NULL;
	GnomePieTrigger* _tmp0_;
	GnomePieTrigger* _tmp1_;
	self = (GnomePieTriggerSelectButton*) g_object_new (object_type, NULL);
	self->priv->enable_mouse = enable_mouse;
	g_signal_connect_object ((GtkToggleButton*) self, "toggled", (GCallback) ___lambda54__gtk_toggle_button_toggled, self, 0);
	g_signal_connect_object ((GtkWidget*) self, "button-press-event", (GCallback) _gnome_pie_trigger_select_button_on_button_press_gtk_widget_button_press_event, self, 0);
	g_signal_connect_object ((GtkWidget*) self, "key-press-event", (GCallback) _gnome_pie_trigger_select_button_on_key_press_gtk_widget_key_press_event, self, 0);
	_tmp0_ = gnome_pie_trigger_new ();
	_tmp1_ = _tmp0_;
	gnome_pie_trigger_select_button_set_trigger (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	return self;
}

GnomePieTriggerSelectButton*
gnome_pie_trigger_select_button_new (gboolean enable_mouse)
{
	return gnome_pie_trigger_select_button_construct (GNOME_PIE_TYPE_TRIGGER_SELECT_BUTTON, enable_mouse);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

void
gnome_pie_trigger_select_button_set_trigger (GnomePieTriggerSelectButton* self,
                                             GnomePieTrigger* trigger)
{
	GnomePieTrigger* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (trigger != NULL);
	_tmp0_ = _g_object_ref0 (trigger);
	_g_object_unref0 (self->priv->trigger);
	self->priv->trigger = _tmp0_;
	_tmp1_ = gnome_pie_trigger_get_label (trigger);
	_tmp2_ = _tmp1_;
	gtk_button_set_label ((GtkButton*) self, _tmp2_);
}

static void
gnome_pie_trigger_select_button_cancel (GnomePieTriggerSelectButton* self)
{
	GnomePieTrigger* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->trigger;
	_tmp1_ = gnome_pie_trigger_get_label (_tmp0_);
	_tmp2_ = _tmp1_;
	gtk_button_set_label ((GtkButton*) self, _tmp2_);
	gtk_toggle_button_set_active ((GtkToggleButton*) self, FALSE);
	gtk_grab_remove ((GtkWidget*) self);
	gnome_pie_focus_grabber_ungrab ();
}

static void
gnome_pie_trigger_select_button_update_trigger (GnomePieTriggerSelectButton* self,
                                                GnomePieTrigger* trigger)
{
	GnomePieTrigger* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (trigger != NULL);
	_tmp0_ = self->priv->trigger;
	_tmp1_ = gnome_pie_trigger_get_name (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = gnome_pie_trigger_get_name (trigger);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (_tmp2_, _tmp4_) != 0) {
		GnomePieTrigger* _tmp5_;
		gnome_pie_trigger_select_button_set_trigger (self, trigger);
		_tmp5_ = self->priv->trigger;
		g_signal_emit (self, gnome_pie_trigger_select_button_signals[GNOME_PIE_TRIGGER_SELECT_BUTTON_ON_SELECT_SIGNAL], 0, _tmp5_);
	}
	gnome_pie_trigger_select_button_cancel (self);
}

static gboolean
gnome_pie_trigger_select_button_on_key_press (GnomePieTriggerSelectButton* self,
                                              GdkEventKey* event)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = gtk_toggle_button_get_active ((GtkToggleButton*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		const gchar* _tmp2_;
		_tmp2_ = gdk_keyval_name (event->keyval);
		if (g_strcmp0 (_tmp2_, "Escape") == 0) {
			gnome_pie_trigger_select_button_cancel (self);
		} else {
			const gchar* _tmp3_;
			_tmp3_ = gdk_keyval_name (event->keyval);
			if (g_strcmp0 (_tmp3_, "BackSpace") == 0) {
				GnomePieTrigger* _tmp4_;
				GnomePieTrigger* _tmp5_;
				_tmp4_ = gnome_pie_trigger_new ();
				_tmp5_ = _tmp4_;
				gnome_pie_trigger_select_button_update_trigger (self, _tmp5_);
				_g_object_unref0 (_tmp5_);
			} else {
				if (event->is_modifier == ((guint) 0)) {
					GdkModifierType state = 0U;
					GnomePieTrigger* _tmp6_;
					GnomePieTrigger* _tmp7_;
					state = event->state & (~self->priv->lock_modifiers);
					_tmp6_ = gnome_pie_trigger_new_from_values (event->keyval, state, FALSE, FALSE, FALSE, FALSE, FALSE, 5);
					_tmp7_ = _tmp6_;
					gnome_pie_trigger_select_button_update_trigger (self, _tmp7_);
					_g_object_unref0 (_tmp7_);
				}
			}
		}
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}

static gboolean
gnome_pie_trigger_select_button_on_button_press (GnomePieTriggerSelectButton* self,
                                                 GdkEventButton* event)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_;
	gboolean _tmp10_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = gtk_toggle_button_get_active ((GtkToggleButton*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		GtkAllocation rect = {0};
		GtkAllocation _tmp2_ = {0};
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_ = FALSE;
		gtk_widget_get_allocation ((GtkWidget*) self, &_tmp2_);
		rect = _tmp2_;
		if (event->x < ((gdouble) 0)) {
			_tmp5_ = TRUE;
		} else {
			GtkAllocation _tmp6_;
			_tmp6_ = rect;
			_tmp5_ = event->x > ((gdouble) _tmp6_.width);
		}
		if (_tmp5_) {
			_tmp4_ = TRUE;
		} else {
			_tmp4_ = event->y < ((gdouble) 0);
		}
		if (_tmp4_) {
			_tmp3_ = TRUE;
		} else {
			GtkAllocation _tmp7_;
			_tmp7_ = rect;
			_tmp3_ = event->y > ((gdouble) _tmp7_.height);
		}
		if (_tmp3_) {
			gnome_pie_trigger_select_button_cancel (self);
			result = TRUE;
			return result;
		}
	}
	_tmp9_ = gtk_toggle_button_get_active ((GtkToggleButton*) self);
	_tmp10_ = _tmp9_;
	if (_tmp10_) {
		_tmp8_ = self->priv->enable_mouse;
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		GdkModifierType state = 0U;
		GnomePieTrigger* new_trigger = NULL;
		GnomePieTrigger* _tmp11_;
		GnomePieTrigger* _tmp12_;
		gint _tmp13_;
		gint _tmp14_;
		state = event->state & (~self->priv->lock_modifiers);
		_tmp11_ = gnome_pie_trigger_new_from_values ((guint) ((gint) event->button), state, TRUE, FALSE, FALSE, FALSE, FALSE, 5);
		new_trigger = _tmp11_;
		_tmp12_ = new_trigger;
		_tmp13_ = gnome_pie_trigger_get_key_code (_tmp12_);
		_tmp14_ = _tmp13_;
		if (_tmp14_ != 1) {
			GnomePieTrigger* _tmp15_;
			_tmp15_ = new_trigger;
			gnome_pie_trigger_select_button_update_trigger (self, _tmp15_);
		} else {
			gnome_pie_trigger_select_button_cancel (self);
		}
		result = TRUE;
		_g_object_unref0 (new_trigger);
		return result;
	} else {
		gboolean _tmp16_;
		gboolean _tmp17_;
		_tmp16_ = gtk_toggle_button_get_active ((GtkToggleButton*) self);
		_tmp17_ = _tmp16_;
		if (_tmp17_) {
			gnome_pie_trigger_select_button_cancel (self);
			result = TRUE;
			return result;
		}
	}
	result = FALSE;
	return result;
}

static void
gnome_pie_trigger_select_button_class_init (GnomePieTriggerSelectButtonClass * klass,
                                            gpointer klass_data)
{
	gnome_pie_trigger_select_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GnomePieTriggerSelectButton_private_offset);
	G_OBJECT_CLASS (klass)->finalize = gnome_pie_trigger_select_button_finalize;
	gnome_pie_trigger_select_button_signals[GNOME_PIE_TRIGGER_SELECT_BUTTON_ON_SELECT_SIGNAL] = g_signal_new ("on-select", GNOME_PIE_TYPE_TRIGGER_SELECT_BUTTON, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GNOME_PIE_TYPE_TRIGGER);
}

static void
gnome_pie_trigger_select_button_instance_init (GnomePieTriggerSelectButton * self,
                                               gpointer klass)
{
	self->priv = gnome_pie_trigger_select_button_get_instance_private (self);
	self->priv->trigger = NULL;
	self->priv->enable_mouse = FALSE;
	self->priv->lock_modifiers = ((GDK_MOD2_MASK | GDK_MOD4_MASK) | GDK_MOD5_MASK) | GDK_LOCK_MASK;
}

static void
gnome_pie_trigger_select_button_finalize (GObject * obj)
{
	GnomePieTriggerSelectButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GNOME_PIE_TYPE_TRIGGER_SELECT_BUTTON, GnomePieTriggerSelectButton);
	_g_object_unref0 (self->priv->trigger);
	G_OBJECT_CLASS (gnome_pie_trigger_select_button_parent_class)->finalize (obj);
}

static GType
gnome_pie_trigger_select_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GnomePieTriggerSelectButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gnome_pie_trigger_select_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GnomePieTriggerSelectButton), 0, (GInstanceInitFunc) gnome_pie_trigger_select_button_instance_init, NULL };
	GType gnome_pie_trigger_select_button_type_id;
	gnome_pie_trigger_select_button_type_id = g_type_register_static (gtk_toggle_button_get_type (), "GnomePieTriggerSelectButton", &g_define_type_info, 0);
	GnomePieTriggerSelectButton_private_offset = g_type_add_instance_private (gnome_pie_trigger_select_button_type_id, sizeof (GnomePieTriggerSelectButtonPrivate));
	return gnome_pie_trigger_select_button_type_id;
}

GType
gnome_pie_trigger_select_button_get_type (void)
{
	static volatile gsize gnome_pie_trigger_select_button_type_id__once = 0;
	if (g_once_init_enter (&gnome_pie_trigger_select_button_type_id__once)) {
		GType gnome_pie_trigger_select_button_type_id;
		gnome_pie_trigger_select_button_type_id = gnome_pie_trigger_select_button_get_type_once ();
		g_once_init_leave (&gnome_pie_trigger_select_button_type_id__once, gnome_pie_trigger_select_button_type_id);
	}
	return gnome_pie_trigger_select_button_type_id__once;
}

