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

/*
* Copyright (c) 2010 Michal Hruby <michal.mhr@gmail.com>
*               2017 elementary LLC.
*
* This program 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.
*
* This program 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 this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* Authored by: Michal Hruby <michal.mhr@gmail.com>
*              Alberto Aldegheri <albyrock87+dev@gmail.com>
*/

#include "slingshot.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 synapse_text_match_get_type_once (void);

static GType
synapse_text_origin_get_type_once (void)
{
	static const GEnumValue values[] = {{SYNAPSE_TEXT_ORIGIN_UNKNOWN, "SYNAPSE_TEXT_ORIGIN_UNKNOWN", "unknown"}, {SYNAPSE_TEXT_ORIGIN_CLIPBOARD, "SYNAPSE_TEXT_ORIGIN_CLIPBOARD", "clipboard"}, {0, NULL, NULL}};
	GType synapse_text_origin_type_id;
	synapse_text_origin_type_id = g_enum_register_static ("SynapseTextOrigin", values);
	return synapse_text_origin_type_id;
}

GType
synapse_text_origin_get_type (void)
{
	static volatile gsize synapse_text_origin_type_id__once = 0;
	if (g_once_init_enter (&synapse_text_origin_type_id__once)) {
		GType synapse_text_origin_type_id;
		synapse_text_origin_type_id = synapse_text_origin_get_type_once ();
		g_once_init_leave (&synapse_text_origin_type_id__once, synapse_text_origin_type_id);
	}
	return synapse_text_origin_type_id__once;
}

SynapseTextOrigin
synapse_text_match_get_text_origin (SynapseTextMatch* self)
{
	SynapseTextMatchIface* _iface_;
	g_return_val_if_fail (self != NULL, 0);
	_iface_ = SYNAPSE_TEXT_MATCH_GET_INTERFACE (self);
	if (_iface_->get_text_origin) {
		return _iface_->get_text_origin (self);
	}
	return 0;
}

void
synapse_text_match_set_text_origin (SynapseTextMatch* self,
                                    SynapseTextOrigin value)
{
	SynapseTextMatchIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SYNAPSE_TEXT_MATCH_GET_INTERFACE (self);
	if (_iface_->set_text_origin) {
		_iface_->set_text_origin (self, value);
	}
}

const gchar*
synapse_text_match_get_text (SynapseTextMatch* self)
{
	SynapseTextMatchIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SYNAPSE_TEXT_MATCH_GET_INTERFACE (self);
	if (_iface_->get_text) {
		return _iface_->get_text (self);
	}
	return NULL;
}

void
synapse_text_match_set_text (SynapseTextMatch* self,
                             const gchar* value)
{
	SynapseTextMatchIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SYNAPSE_TEXT_MATCH_GET_INTERFACE (self);
	if (_iface_->set_text) {
		_iface_->set_text (self, value);
	}
}

static void
synapse_text_match_default_init (SynapseTextMatchIface * iface,
                                 gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_enum ("text-origin", "text-origin", "text-origin", SYNAPSE_TYPE_TEXT_ORIGIN, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_interface_install_property (iface, g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
}

static GType
synapse_text_match_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SynapseTextMatchIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) synapse_text_match_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType synapse_text_match_type_id;
	synapse_text_match_type_id = g_type_register_static (G_TYPE_INTERFACE, "SynapseTextMatch", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (synapse_text_match_type_id, SYNAPSE_TYPE_MATCH);
	return synapse_text_match_type_id;
}

GType
synapse_text_match_get_type (void)
{
	static volatile gsize synapse_text_match_type_id__once = 0;
	if (g_once_init_enter (&synapse_text_match_type_id__once)) {
		GType synapse_text_match_type_id;
		synapse_text_match_type_id = synapse_text_match_get_type_once ();
		g_once_init_leave (&synapse_text_match_type_id__once, synapse_text_match_type_id);
	}
	return synapse_text_match_type_id__once;
}

