/*
 * This file was generated automatically by ExtUtils::ParseXS version 3.34 from the
 * contents of GtkLabel.xs. Do not edit this file, edit GtkLabel.xs instead.
 *
 *    ANY CHANGES MADE HERE WILL BE LOST!
 *
 */

#line 1 "xs/GtkLabel.xs"
/*
 * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the 
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
 * Boston, MA  02110-1301  USA.
 *
 * $Id$
 */

#include "gtk2perl.h"


#line 35 "xs/GtkLabel.c"
#ifndef PERL_UNUSED_VAR
#  define PERL_UNUSED_VAR(var) if (0) var = var
#endif

#ifndef dVAR
#  define dVAR		dNOOP
#endif


/* This stuff is not part of the API! You have been warned. */
#ifndef PERL_VERSION_DECIMAL
#  define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
#endif
#ifndef PERL_DECIMAL_VERSION
#  define PERL_DECIMAL_VERSION \
	  PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
#endif
#ifndef PERL_VERSION_GE
#  define PERL_VERSION_GE(r,v,s) \
	  (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
#endif
#ifndef PERL_VERSION_LE
#  define PERL_VERSION_LE(r,v,s) \
	  (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
#endif

/* XS_INTERNAL is the explicit static-linkage variant of the default
 * XS macro.
 *
 * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
 * "STATIC", ie. it exports XSUB symbols. You probably don't want that
 * for anything but the BOOT XSUB.
 *
 * See XSUB.h in core!
 */


/* TODO: This might be compatible further back than 5.10.0. */
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1)
#  undef XS_EXTERNAL
#  undef XS_INTERNAL
#  if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
#    define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
#    define XS_INTERNAL(name) STATIC XSPROTO(name)
#  endif
#  if defined(__SYMBIAN32__)
#    define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)
#    define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name)
#  endif
#  ifndef XS_EXTERNAL
#    if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
#      define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
#      define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__)
#    else
#      ifdef __cplusplus
#        define XS_EXTERNAL(name) extern "C" XSPROTO(name)
#        define XS_INTERNAL(name) static XSPROTO(name)
#      else
#        define XS_EXTERNAL(name) XSPROTO(name)
#        define XS_INTERNAL(name) STATIC XSPROTO(name)
#      endif
#    endif
#  endif
#endif

/* perl >= 5.10.0 && perl <= 5.15.1 */


/* The XS_EXTERNAL macro is used for functions that must not be static
 * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
 * macro defined, the best we can do is assume XS is the same.
 * Dito for XS_INTERNAL.
 */
#ifndef XS_EXTERNAL
#  define XS_EXTERNAL(name) XS(name)
#endif
#ifndef XS_INTERNAL
#  define XS_INTERNAL(name) XS(name)
#endif

/* Now, finally, after all this mess, we want an ExtUtils::ParseXS
 * internal macro that we're free to redefine for varying linkage due
 * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
 * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
 */

#undef XS_EUPXS
#if defined(PERL_EUPXS_ALWAYS_EXPORT)
#  define XS_EUPXS(name) XS_EXTERNAL(name)
#else
   /* default to internal */
#  define XS_EUPXS(name) XS_INTERNAL(name)
#endif

#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)

/* prototype to pass -Wmissing-prototypes */
STATIC void
S_croak_xs_usage(const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(const CV *const cv, const char *const params)
{
    const GV *const gv = CvGV(cv);

    PERL_ARGS_ASSERT_CROAK_XS_USAGE;

    if (gv) {
        const char *const gvname = GvNAME(gv);
        const HV *const stash = GvSTASH(gv);
        const char *const hvname = stash ? HvNAME(stash) : NULL;

        if (hvname)
	    Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params);
        else
	    Perl_croak_nocontext("Usage: %s(%s)", gvname, params);
    } else {
        /* Pants. I don't think that it should be possible to get here. */
	Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params);
    }
}
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE

#define croak_xs_usage        S_croak_xs_usage

#endif

/* NOTE: the prototype of newXSproto() is different in versions of perls,
 * so we define a portable version of newXSproto()
 */
#ifdef newXS_flags
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
#else
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
#endif /* !defined(newXS_flags) */

#if PERL_VERSION_LE(5, 21, 5)
#  define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file)
#else
#  define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b)
#endif

#line 179 "xs/GtkLabel.c"

XS_EUPXS(XS_Gtk2__Label_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_new)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "class, str=NULL");
    {
	const gchar_ornull *	str;
	GtkWidget *	RETVAL;

	if (items < 2)
	    str = NULL;
	else {
	    /* same as SvGChar(), but allows undef as NULL */
	    if (gperl_sv_is_defined (ST(1))) {
		    sv_utf8_upgrade (ST(1));
		    str = (const gchar_ornull *)SvPV_nolen (ST(1));
	    } else {
		    str = NULL;
	    }
;
	}

	RETVAL = gtk_label_new(str);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkWidget (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_new_with_mnemonic); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_new_with_mnemonic)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, str");
    {
	const gchar *	str;
	GtkWidget *	RETVAL;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	str = (const gchar *)SvPV_nolen (ST(1))
;

	RETVAL = gtk_label_new_with_mnemonic(str);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkWidget (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_set_text); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_text)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, str");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	const gchar_ornull *	str;

	/* same as SvGChar(), but allows undef as NULL */
	if (gperl_sv_is_defined (ST(1))) {
		sv_utf8_upgrade (ST(1));
		str = (const gchar_ornull *)SvPV_nolen (ST(1));
	} else {
		str = NULL;
	}
;

	gtk_label_set_text(label, str);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_text); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_text)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	const gchar_ornull *	RETVAL;

	RETVAL = gtk_label_get_text(label);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    /* newSVGChar() allows NULL, but T_GCHAR does not. allow NULL. */
	    if (RETVAL) {
		    sv_setpv ((SV*)RETVALSV, RETVAL);
		    SvUTF8_on (RETVALSV);
	    } else {
		    SvSetSV (RETVALSV, &PL_sv_undef);
	    }
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_set_attributes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_attributes)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, attrs");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	PangoAttrList *	attrs = SvPangoAttrList (ST(1))
;

	gtk_label_set_attributes(label, attrs);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_attributes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_attributes)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	PangoAttrList *	RETVAL;
	GtkLabel *	label = SvGtkLabel (ST(0))
;
#line 57 "xs/GtkLabel.xs"
	RETVAL = gtk_label_get_attributes (label);
	if (!RETVAL)
		XSRETURN_UNDEF;
#line 330 "xs/GtkLabel.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVPangoAttrList (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_set_label); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_label)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, str");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	const gchar *	str;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	str = (const gchar *)SvPV_nolen (ST(1))
;

	gtk_label_set_label(label, str);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_label); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_label)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	const gchar *	RETVAL;

	RETVAL = gtk_label_get_label(label);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    /* same as newSVGChar(), but not in a function */
	    sv_setpv ((SV*)RETVALSV, RETVAL);
	    SvUTF8_on (RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_set_markup); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_markup)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, str");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	const gchar *	str;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	str = (const gchar *)SvPV_nolen (ST(1))
;

	gtk_label_set_markup(label, str);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_set_use_markup); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_use_markup)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, setting");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	gboolean	setting = (bool)SvTRUE(ST(1))
;

	gtk_label_set_use_markup(label, setting);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_use_markup); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_use_markup)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	gboolean	RETVAL;

	RETVAL = gtk_label_get_use_markup(label);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_set_use_underline); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_use_underline)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, setting");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	gboolean	setting = (bool)SvTRUE(ST(1))
;

	gtk_label_set_use_underline(label, setting);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_use_underline); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_use_underline)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	gboolean	RETVAL;

	RETVAL = gtk_label_get_use_underline(label);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_set_markup_with_mnemonic); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_markup_with_mnemonic)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, str");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	const gchar *	str;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	str = (const gchar *)SvPV_nolen (ST(1))
;

	gtk_label_set_markup_with_mnemonic(label, str);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_mnemonic_keyval); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_mnemonic_keyval)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	guint	RETVAL;
	dXSTARG;

	RETVAL = gtk_label_get_mnemonic_keyval(label);
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_set_mnemonic_widget); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_mnemonic_widget)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, widget");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(1))
;

	gtk_label_set_mnemonic_widget(label, widget);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_mnemonic_widget); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_mnemonic_widget)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	GtkWidget_ornull *	RETVAL;

	RETVAL = gtk_label_get_mnemonic_widget(label);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkWidget_ornull (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_set_text_with_mnemonic); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_text_with_mnemonic)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, str");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	const gchar *	str;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	str = (const gchar *)SvPV_nolen (ST(1))
;

	gtk_label_set_text_with_mnemonic(label, str);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_set_justify); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_justify)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, jtype");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	GtkJustification	jtype = SvGtkJustification (ST(1))
;

	gtk_label_set_justify(label, jtype);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_justify); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_justify)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	GtkJustification	RETVAL;

	RETVAL = gtk_label_get_justify(label);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkJustification (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_set_pattern); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_pattern)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, pattern");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	const gchar *	pattern;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	pattern = (const gchar *)SvPV_nolen (ST(1))
;

	gtk_label_set_pattern(label, pattern);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_set_line_wrap); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_line_wrap)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, wrap");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	gboolean	wrap = (bool)SvTRUE(ST(1))
;

	gtk_label_set_line_wrap(label, wrap);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_line_wrap); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_line_wrap)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	gboolean	RETVAL;

	RETVAL = gtk_label_get_line_wrap(label);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_set_selectable); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_selectable)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, setting");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	gboolean	setting = (bool)SvTRUE(ST(1))
;

	gtk_label_set_selectable(label, setting);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_selectable); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_selectable)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	gboolean	RETVAL;

	RETVAL = gtk_label_get_selectable(label);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_select_region); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_select_region)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 3)
       croak_xs_usage(cv,  "label, start_offset=-1, end_offset=-1");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	gint	start_offset;
	gint	end_offset;

	if (items < 2)
	    start_offset = -1;
	else {
	    start_offset = (gint)SvIV(ST(1))
;
	}

	if (items < 3)
	    end_offset = -1;
	else {
	    end_offset = (gint)SvIV(ST(2))
;
	}

	gtk_label_select_region(label, start_offset, end_offset);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_selection_bounds); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_selection_bounds)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
#line 172 "xs/GtkLabel.xs"
	gint start, end;
#line 767 "xs/GtkLabel.c"
#line 174 "xs/GtkLabel.xs"
	if (!gtk_label_get_selection_bounds (label, &start, &end))
		XSRETURN_UNDEF;
	EXTEND (SP, 2);
	PUSHs (sv_2mortal (newSViv (start)));
	PUSHs (sv_2mortal (newSViv (end)));
#line 774 "xs/GtkLabel.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Label_get_layout); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_layout)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	PangoLayout *	RETVAL;

	RETVAL = gtk_label_get_layout(label);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVPangoLayout (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_get_layout_offsets); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_layout_offsets)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	gint	x;
	gint	y;

	gtk_label_get_layout_offsets(label, &x, &y);
	XSprePUSH;	EXTEND(SP,2);
	PUSHs(sv_newmortal());
	sv_setiv(ST(0), (IV)x);
	PUSHs(sv_newmortal());
	sv_setiv(ST(1), (IV)y);
    }
    XSRETURN(2);
}

#if GTK_CHECK_VERSION (2, 6, 0)
#define XSubPPtmpAAAA 1


XS_EUPXS(XS_Gtk2__Label_set_ellipsize); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_ellipsize)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, mode");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	PangoEllipsizeMode	mode = SvPangoEllipsizeMode (ST(1))
;

	gtk_label_set_ellipsize(label, mode);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_ellipsize); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_ellipsize)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	PangoEllipsizeMode	RETVAL;
	GtkLabel *	label = SvGtkLabel (ST(0))
;

	RETVAL = gtk_label_get_ellipsize(label);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVPangoEllipsizeMode (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_set_width_chars); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_width_chars)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, n_chars");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	gint	n_chars = (gint)SvIV(ST(1))
;

	gtk_label_set_width_chars(label, n_chars);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_width_chars); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_width_chars)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	gint	RETVAL;
	dXSTARG;
	GtkLabel *	label = SvGtkLabel (ST(0))
;

	RETVAL = gtk_label_get_width_chars(label);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_set_max_width_chars); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_max_width_chars)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, n_chars");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	gint	n_chars = (gint)SvIV(ST(1))
;

	gtk_label_set_max_width_chars(label, n_chars);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_max_width_chars); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_max_width_chars)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	gint	RETVAL;
	dXSTARG;
	GtkLabel *	label = SvGtkLabel (ST(0))
;

	RETVAL = gtk_label_get_max_width_chars(label);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_set_angle); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_angle)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, angle");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	gdouble	angle = (double)SvNV(ST(1))
;

	gtk_label_set_angle(label, angle);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_angle); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_angle)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	gdouble	RETVAL;
	dXSTARG;
	GtkLabel *	label = SvGtkLabel (ST(0))
;

	RETVAL = gtk_label_get_angle(label);
	XSprePUSH; PUSHn((double)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_set_single_line_mode); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_single_line_mode)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, single_line_mode");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	gboolean	single_line_mode = (bool)SvTRUE(ST(1))
;

	gtk_label_set_single_line_mode(label, single_line_mode);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_single_line_mode); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_single_line_mode)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	gboolean	RETVAL;
	GtkLabel *	label = SvGtkLabel (ST(0))
;

	RETVAL = gtk_label_get_single_line_mode(label);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

#endif
#if GTK_CHECK_VERSION (2, 9, 4)
#define XSubPPtmpAAAB 1


XS_EUPXS(XS_Gtk2__Label_set_line_wrap_mode); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_line_wrap_mode)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, wrap_mode");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	PangoWrapMode	wrap_mode = SvPangoWrapMode (ST(1))
;

	gtk_label_set_line_wrap_mode(label, wrap_mode);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_line_wrap_mode); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_line_wrap_mode)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	PangoWrapMode	RETVAL;
	GtkLabel *	label = SvGtkLabel (ST(0))
;

	RETVAL = gtk_label_get_line_wrap_mode(label);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVPangoWrapMode (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif
#if GTK_CHECK_VERSION (2, 18, 0)
#define XSubPPtmpAAAC 1


XS_EUPXS(XS_Gtk2__Label_get_current_uri); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_current_uri)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	const gchar *	RETVAL;
	GtkLabel *	label = SvGtkLabel (ST(0))
;

	RETVAL = gtk_label_get_current_uri(label);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    /* same as newSVGChar(), but not in a function */
	    sv_setpv ((SV*)RETVALSV, RETVAL);
	    SvUTF8_on (RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Label_set_track_visited_links); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_set_track_visited_links)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "label, track_links");
    {
	GtkLabel *	label = SvGtkLabel (ST(0))
;
	gboolean	track_links = (bool)SvTRUE(ST(1))
;

	gtk_label_set_track_visited_links(label, track_links);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Label_get_track_visited_links); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Label_get_track_visited_links)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "label");
    {
	gboolean	RETVAL;
	GtkLabel *	label = SvGtkLabel (ST(0))
;

	RETVAL = gtk_label_get_track_visited_links(label);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

#endif
#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Gtk2__Label); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Gtk2__Label)
{
#if PERL_VERSION_LE(5, 21, 5)
    dVAR; dXSARGS;
#else
    dVAR; dXSBOOTARGSXSAPIVERCHK;
#endif
#if (PERL_REVISION == 5 && PERL_VERSION < 9)
    char* file = __FILE__;
#else
    const char* file = __FILE__;
#endif

    PERL_UNUSED_VAR(file);

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
#if PERL_VERSION_LE(5, 21, 5)
    XS_VERSION_BOOTCHECK;
#  ifdef XS_APIVERSION_BOOTCHECK
    XS_APIVERSION_BOOTCHECK;
#  endif
#endif

        newXS_deffile("Gtk2::Label::new", XS_Gtk2__Label_new);
        newXS_deffile("Gtk2::Label::new_with_mnemonic", XS_Gtk2__Label_new_with_mnemonic);
        newXS_deffile("Gtk2::Label::set_text", XS_Gtk2__Label_set_text);
        newXS_deffile("Gtk2::Label::get_text", XS_Gtk2__Label_get_text);
        newXS_deffile("Gtk2::Label::set_attributes", XS_Gtk2__Label_set_attributes);
        newXS_deffile("Gtk2::Label::get_attributes", XS_Gtk2__Label_get_attributes);
        newXS_deffile("Gtk2::Label::set_label", XS_Gtk2__Label_set_label);
        newXS_deffile("Gtk2::Label::get_label", XS_Gtk2__Label_get_label);
        newXS_deffile("Gtk2::Label::set_markup", XS_Gtk2__Label_set_markup);
        newXS_deffile("Gtk2::Label::set_use_markup", XS_Gtk2__Label_set_use_markup);
        newXS_deffile("Gtk2::Label::get_use_markup", XS_Gtk2__Label_get_use_markup);
        newXS_deffile("Gtk2::Label::set_use_underline", XS_Gtk2__Label_set_use_underline);
        newXS_deffile("Gtk2::Label::get_use_underline", XS_Gtk2__Label_get_use_underline);
        newXS_deffile("Gtk2::Label::set_markup_with_mnemonic", XS_Gtk2__Label_set_markup_with_mnemonic);
        newXS_deffile("Gtk2::Label::get_mnemonic_keyval", XS_Gtk2__Label_get_mnemonic_keyval);
        newXS_deffile("Gtk2::Label::set_mnemonic_widget", XS_Gtk2__Label_set_mnemonic_widget);
        newXS_deffile("Gtk2::Label::get_mnemonic_widget", XS_Gtk2__Label_get_mnemonic_widget);
        newXS_deffile("Gtk2::Label::set_text_with_mnemonic", XS_Gtk2__Label_set_text_with_mnemonic);
        newXS_deffile("Gtk2::Label::set_justify", XS_Gtk2__Label_set_justify);
        newXS_deffile("Gtk2::Label::get_justify", XS_Gtk2__Label_get_justify);
        newXS_deffile("Gtk2::Label::set_pattern", XS_Gtk2__Label_set_pattern);
        newXS_deffile("Gtk2::Label::set_line_wrap", XS_Gtk2__Label_set_line_wrap);
        newXS_deffile("Gtk2::Label::get_line_wrap", XS_Gtk2__Label_get_line_wrap);
        newXS_deffile("Gtk2::Label::set_selectable", XS_Gtk2__Label_set_selectable);
        newXS_deffile("Gtk2::Label::get_selectable", XS_Gtk2__Label_get_selectable);
        newXS_deffile("Gtk2::Label::select_region", XS_Gtk2__Label_select_region);
        newXS_deffile("Gtk2::Label::get_selection_bounds", XS_Gtk2__Label_get_selection_bounds);
        newXS_deffile("Gtk2::Label::get_layout", XS_Gtk2__Label_get_layout);
        newXS_deffile("Gtk2::Label::get_layout_offsets", XS_Gtk2__Label_get_layout_offsets);
#if XSubPPtmpAAAA
        newXS_deffile("Gtk2::Label::set_ellipsize", XS_Gtk2__Label_set_ellipsize);
        newXS_deffile("Gtk2::Label::get_ellipsize", XS_Gtk2__Label_get_ellipsize);
        newXS_deffile("Gtk2::Label::set_width_chars", XS_Gtk2__Label_set_width_chars);
        newXS_deffile("Gtk2::Label::get_width_chars", XS_Gtk2__Label_get_width_chars);
        newXS_deffile("Gtk2::Label::set_max_width_chars", XS_Gtk2__Label_set_max_width_chars);
        newXS_deffile("Gtk2::Label::get_max_width_chars", XS_Gtk2__Label_get_max_width_chars);
        newXS_deffile("Gtk2::Label::set_angle", XS_Gtk2__Label_set_angle);
        newXS_deffile("Gtk2::Label::get_angle", XS_Gtk2__Label_get_angle);
        newXS_deffile("Gtk2::Label::set_single_line_mode", XS_Gtk2__Label_set_single_line_mode);
        newXS_deffile("Gtk2::Label::get_single_line_mode", XS_Gtk2__Label_get_single_line_mode);
#endif
#if XSubPPtmpAAAB
        newXS_deffile("Gtk2::Label::set_line_wrap_mode", XS_Gtk2__Label_set_line_wrap_mode);
        newXS_deffile("Gtk2::Label::get_line_wrap_mode", XS_Gtk2__Label_get_line_wrap_mode);
#endif
#if XSubPPtmpAAAC
        newXS_deffile("Gtk2::Label::get_current_uri", XS_Gtk2__Label_get_current_uri);
        newXS_deffile("Gtk2::Label::set_track_visited_links", XS_Gtk2__Label_set_track_visited_links);
        newXS_deffile("Gtk2::Label::get_track_visited_links", XS_Gtk2__Label_get_track_visited_links);
#endif

    /* Initialisation Section */

#if XSubPPtmpAAAA
#endif
#if XSubPPtmpAAAB
#endif
#if XSubPPtmpAAAC
#endif
#line 1215 "xs/GtkLabel.c"

    /* End of Initialisation Section */

#if PERL_VERSION_LE(5, 21, 5)
#  if PERL_VERSION_GE(5, 9, 0)
    if (PL_unitcheckav)
        call_list(PL_scopestack_ix, PL_unitcheckav);
#  endif
    XSRETURN_YES;
#else
    Perl_xs_boot_epilog(aTHX_ ax);
#endif
}

