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

/*
 * Copyright 2026 elementary, Inc. (https://elementary.io)
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 * Authored by: Leonhard Kargl <leo.kargl@proton.me>
 */

#include "gala.h"
#include <glib-object.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

#define GALA_TYPE_GESTURE (gala_gesture_get_type ())
#define GALA_GESTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_TYPE_GESTURE, GalaGesture))
#define GALA_GESTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_TYPE_GESTURE, GalaGestureClass))
#define GALA_IS_GESTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_TYPE_GESTURE))
#define GALA_IS_GESTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_TYPE_GESTURE))
#define GALA_GESTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_TYPE_GESTURE, GalaGestureClass))

typedef struct _GalaGesture GalaGesture;
typedef struct _GalaGestureClass GalaGestureClass;

 G_GNUC_INTERNAL gpointer gala_gesture_ref (gpointer instance);
 G_GNUC_INTERNAL void gala_gesture_unref (gpointer instance);
 G_GNUC_INTERNAL GParamSpec* gala_param_spec_gesture (const gchar* name,
                                     const gchar* nick,
                                     const gchar* blurb,
                                     GType object_type,
                                     GParamFlags flags);
 G_GNUC_INTERNAL void gala_value_set_gesture (GValue* value,
                             gpointer v_object) G_GNUC_UNUSED ;
 G_GNUC_INTERNAL void gala_value_take_gesture (GValue* value,
                              gpointer v_object);
 G_GNUC_INTERNAL gpointer gala_value_get_gesture (const GValue* value) G_GNUC_UNUSED ;
 G_GNUC_INTERNAL GType gala_gesture_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
 G_GNUC_INTERNAL gboolean gala_gesture_trigger_triggers (GalaGestureTrigger* self,
                                        GalaGesture* gesture);
 G_GNUC_INTERNAL void gala_gesture_trigger_enable_backends (GalaGestureTrigger* self,
                                           GalaGestureController* controller);
static GType gala_gesture_trigger_get_type_once (void);

gboolean
gala_gesture_trigger_triggers (GalaGestureTrigger* self,
                               GalaGesture* gesture)
{
	GalaGestureTriggerIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GALA_GESTURE_TRIGGER_GET_INTERFACE (self);
	if (_iface_->triggers) {
		return _iface_->triggers (self, gesture);
	}
	return FALSE;
}

void
gala_gesture_trigger_enable_backends (GalaGestureTrigger* self,
                                      GalaGestureController* controller)
{
	GalaGestureTriggerIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GALA_GESTURE_TRIGGER_GET_INTERFACE (self);
	if (_iface_->enable_backends) {
		_iface_->enable_backends (self, controller);
	}
}

static void
gala_gesture_trigger_default_init (GalaGestureTriggerIface * iface,
                                   gpointer iface_data)
{
}

/**
 * Decides whether a gesture should be recognized. It also automatically enables
 * the necessary backends for the type of gesture.
 */
 G_GNUC_NO_INLINE static GType
gala_gesture_trigger_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaGestureTriggerIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_gesture_trigger_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gala_gesture_trigger_type_id;
	gala_gesture_trigger_type_id = g_type_register_static (G_TYPE_INTERFACE, "GalaGestureTrigger", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gala_gesture_trigger_type_id, G_TYPE_OBJECT);
	return gala_gesture_trigger_type_id;
}

GType
gala_gesture_trigger_get_type (void)
{
	static gsize gala_gesture_trigger_type_id__once = 0;
	if (g_once_init_enter (&gala_gesture_trigger_type_id__once)) {
		GType gala_gesture_trigger_type_id;
		gala_gesture_trigger_type_id = gala_gesture_trigger_get_type_once ();
		g_once_init_leave (&gala_gesture_trigger_type_id__once, gala_gesture_trigger_type_id);
	}
	return gala_gesture_trigger_type_id__once;
}

