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

#line 1 "xs/PangoFont.xs"
/*
 * Copyright (c) 2003-2005, 2014 by the gtk2-perl team (see the AUTHORS
 * file for a full list of 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 LICENSE file in the top-level directory of this distribution for
 * the full license terms.
 *
 */

#include "pango-perl.h"

#line 31 "xs/PangoFont.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(pTHX_ const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(pTHX_ 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(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params);
        else
            Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params);
    } else {
        /* Pants. I don't think that it should be possible to get here. */
        Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
    }
}
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE

#ifdef PERL_IMPLICIT_CONTEXT
#define croak_xs_usage(a,b)    S_croak_xs_usage(aTHX_ a,b)
#else
#define croak_xs_usage        S_croak_xs_usage
#endif

#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) */

#line 173 "xs/PangoFont.c"

XS_EUPXS(XS_Pango_scale); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango_scale)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "class");
    {
	double	RETVAL;
	dXSTARG;
#line 38 "xs/PangoFont.xs"
	switch (ix) {
		case 0: RETVAL = (double)PANGO_SCALE; break;
		case 1: RETVAL = PANGO_SCALE_XX_SMALL; break;
		case 2: RETVAL = PANGO_SCALE_X_SMALL; break;
		case 3: RETVAL = PANGO_SCALE_SMALL; break;
		case 4: RETVAL = PANGO_SCALE_MEDIUM; break;
		case 5: RETVAL = PANGO_SCALE_LARGE; break;
		case 6: RETVAL = PANGO_SCALE_X_LARGE; break;
		case 7: RETVAL = PANGO_SCALE_XX_LARGE; break;
		default:
			RETVAL = 0.0;
			g_assert_not_reached ();
	}
#line 199 "xs/PangoFont.c"
	XSprePUSH; PUSHn((double)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango_PANGO_PIXELS); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango_PANGO_PIXELS)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "class, d");
    {
	double	d = (double)SvNV(ST(1))
;
	double	RETVAL;
	dXSTARG;

	RETVAL = PANGO_PIXELS(d);
	XSprePUSH; PUSHn((double)RETVAL);
#line 62 "xs/PangoFont.xs"
	PERL_UNUSED_VAR (ix);
#line 223 "xs/PangoFont.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontDescription_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_new)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "class");
    {
	PangoFontDescription_own *	RETVAL;

	RETVAL = pango_font_description_new(/* void */);
	ST(0) = newSVPangoFontDescription_own (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontDescription_hash); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_hash)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "desc");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	guint	RETVAL;
	dXSTARG;

	RETVAL = pango_font_description_hash(desc);
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontDescription_equal); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_equal)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "desc1, desc2");
    {
	PangoFontDescription *	desc1 = SvPangoFontDescription (ST(0))
;
	PangoFontDescription *	desc2 = SvPangoFontDescription (ST(1))
;
	gboolean	RETVAL;

	RETVAL = pango_font_description_equal(desc1, desc2);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontDescription_set_family); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_set_family)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "desc, family");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	const char *	family = (const char *)SvPV_nolen(ST(1))
;

	pango_font_description_set_family(desc, family);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Pango__FontDescription_set_family_static); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_set_family_static)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "desc, family");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	const char *	family = (const char *)SvPV_nolen(ST(1))
;

	pango_font_description_set_family_static(desc, family);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Pango__FontDescription_get_family); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_get_family)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "desc");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	const char *	RETVAL;
	dXSTARG;

	RETVAL = pango_font_description_get_family(desc);
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontDescription_set_style); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_set_style)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "desc, style");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	PangoStyle	style = SvPangoStyle (ST(1))
;

	pango_font_description_set_style(desc, style);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Pango__FontDescription_get_style); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_get_style)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "desc");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	PangoStyle	RETVAL;

	RETVAL = pango_font_description_get_style(desc);
	ST(0) = newSVPangoStyle (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontDescription_set_variant); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_set_variant)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "desc, variant");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	PangoVariant	variant = SvPangoVariant (ST(1))
;

	pango_font_description_set_variant(desc, variant);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Pango__FontDescription_get_variant); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_get_variant)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "desc");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	PangoVariant	RETVAL;

	RETVAL = pango_font_description_get_variant(desc);
	ST(0) = newSVPangoVariant (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontDescription_set_weight); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_set_weight)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "desc, weight");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	PangoWeight	weight = SvPangoWeight (ST(1))
;

	pango_font_description_set_weight(desc, weight);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Pango__FontDescription_get_weight); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_get_weight)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "desc");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	PangoWeight	RETVAL;

	RETVAL = pango_font_description_get_weight(desc);
	ST(0) = newSVPangoWeight (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontDescription_set_stretch); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_set_stretch)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "desc, stretch");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	PangoStretch	stretch = SvPangoStretch (ST(1))
;

	pango_font_description_set_stretch(desc, stretch);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Pango__FontDescription_get_stretch); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_get_stretch)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "desc");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	PangoStretch	RETVAL;

	RETVAL = pango_font_description_get_stretch(desc);
	ST(0) = newSVPangoStretch (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontDescription_set_size); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_set_size)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "desc, size");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	gint	size = (gint)SvIV(ST(1))
;

	pango_font_description_set_size(desc, size);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Pango__FontDescription_get_size); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_get_size)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "desc");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	gint	RETVAL;
	dXSTARG;

	RETVAL = pango_font_description_get_size(desc);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontDescription_get_set_fields); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_get_set_fields)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "desc");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	PangoFontMask	RETVAL;

	RETVAL = pango_font_description_get_set_fields(desc);
	ST(0) = newSVPangoFontMask (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontDescription_unset_fields); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_unset_fields)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "desc, to_unset");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	PangoFontMask	to_unset = SvPangoFontMask (ST(1))
;

	pango_font_description_unset_fields(desc, to_unset);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Pango__FontDescription_merge); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_merge)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "desc, desc_to_merge, replace_existing");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	PangoFontDescription *	desc_to_merge = SvPangoFontDescription (ST(1))
;
	gboolean	replace_existing = (bool)SvTRUE(ST(2))
;

	pango_font_description_merge(desc, desc_to_merge, replace_existing);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Pango__FontDescription_merge_static); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_merge_static)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "desc, desc_to_merge, replace_existing");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	PangoFontDescription *	desc_to_merge = SvPangoFontDescription (ST(1))
;
	gboolean	replace_existing = (bool)SvTRUE(ST(2))
;

	pango_font_description_merge_static(desc, desc_to_merge, replace_existing);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Pango__FontDescription_better_match); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_better_match)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "desc, old_match, new_match");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	PangoFontDescription_ornull *	old_match = SvPangoFontDescription_ornull (ST(1))
;
	PangoFontDescription *	new_match = SvPangoFontDescription (ST(2))
;
	gboolean	RETVAL;

	RETVAL = pango_font_description_better_match(desc, old_match, new_match);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontDescription_from_string); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_from_string)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, str");
    {
	const char *	str = (const char *)SvPV_nolen(ST(1))
;
	PangoFontDescription_own *	RETVAL;

	RETVAL = pango_font_description_from_string(str);
	ST(0) = newSVPangoFontDescription_own (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontDescription_to_string); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_to_string)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "desc");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	char *	RETVAL;
	dXSTARG;

	RETVAL = pango_font_description_to_string(desc);
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
#line 204 "xs/PangoFont.xs"
	g_free (RETVAL);
#line 659 "xs/PangoFont.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontDescription_to_filename); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_to_filename)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "desc");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	char *	RETVAL;
	dXSTARG;

	RETVAL = pango_font_description_to_filename(desc);
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
#line 211 "xs/PangoFont.xs"
	g_free (RETVAL);
#line 681 "xs/PangoFont.c"
    }
    XSRETURN(1);
}

#if PANGO_CHECK_VERSION (1, 8, 0)
#define XSubPPtmpAAAA 1


XS_EUPXS(XS_Pango__FontDescription_set_absolute_size); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_set_absolute_size)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "desc, size");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	double	size = (double)SvNV(ST(1))
;

	pango_font_description_set_absolute_size(desc, size);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Pango__FontDescription_get_size_is_absolute); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_get_size_is_absolute)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "desc");
    {
	gboolean	RETVAL;
	const PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;

	RETVAL = pango_font_description_get_size_is_absolute(desc);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

#endif
#if PANGO_CHECK_VERSION (1, 16, 0)
#define XSubPPtmpAAAB 1


XS_EUPXS(XS_Pango__FontDescription_set_gravity); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_set_gravity)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "desc, gravity");
    {
	PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;
	PangoGravity	gravity = SvPangoGravity (ST(1))
;

	pango_font_description_set_gravity(desc, gravity);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Pango__FontDescription_get_gravity); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontDescription_get_gravity)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "desc");
    {
	PangoGravity	RETVAL;
	const PangoFontDescription *	desc = SvPangoFontDescription (ST(0))
;

	RETVAL = pango_font_description_get_gravity(desc);
	ST(0) = newSVPangoGravity (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Pango__FontMetrics_get_ascent); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontMetrics_get_ascent)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "metrics");
    {
	PangoFontMetrics *	metrics = SvPangoFontMetrics (ST(0))
;
	int	RETVAL;
	dXSTARG;

	RETVAL = pango_font_metrics_get_ascent(metrics);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontMetrics_get_descent); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontMetrics_get_descent)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "metrics");
    {
	PangoFontMetrics *	metrics = SvPangoFontMetrics (ST(0))
;
	int	RETVAL;
	dXSTARG;

	RETVAL = pango_font_metrics_get_descent(metrics);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontMetrics_get_approximate_char_width); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontMetrics_get_approximate_char_width)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "metrics");
    {
	PangoFontMetrics *	metrics = SvPangoFontMetrics (ST(0))
;
	int	RETVAL;
	dXSTARG;

	RETVAL = pango_font_metrics_get_approximate_char_width(metrics);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontMetrics_get_approximate_digit_width); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontMetrics_get_approximate_digit_width)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "metrics");
    {
	PangoFontMetrics *	metrics = SvPangoFontMetrics (ST(0))
;
	int	RETVAL;
	dXSTARG;

	RETVAL = pango_font_metrics_get_approximate_digit_width(metrics);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#if PANGO_CHECK_VERSION (1, 6, 0)
#define XSubPPtmpAAAC 1


XS_EUPXS(XS_Pango__FontMetrics_get_underline_position); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontMetrics_get_underline_position)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "metrics");
    {
	PangoFontMetrics *	metrics = SvPangoFontMetrics (ST(0))
;
	int	RETVAL;
	dXSTARG;

	RETVAL = pango_font_metrics_get_underline_position(metrics);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontMetrics_get_underline_thickness); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontMetrics_get_underline_thickness)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "metrics");
    {
	PangoFontMetrics *	metrics = SvPangoFontMetrics (ST(0))
;
	int	RETVAL;
	dXSTARG;

	RETVAL = pango_font_metrics_get_underline_thickness(metrics);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontMetrics_get_strikethrough_position); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontMetrics_get_strikethrough_position)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "metrics");
    {
	PangoFontMetrics *	metrics = SvPangoFontMetrics (ST(0))
;
	int	RETVAL;
	dXSTARG;

	RETVAL = pango_font_metrics_get_strikethrough_position(metrics);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontMetrics_get_strikethrough_thickness); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontMetrics_get_strikethrough_thickness)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "metrics");
    {
	PangoFontMetrics *	metrics = SvPangoFontMetrics (ST(0))
;
	int	RETVAL;
	dXSTARG;

	RETVAL = pango_font_metrics_get_strikethrough_thickness(metrics);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Pango__FontFamily_list_faces); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontFamily_list_faces)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "family");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	PangoFontFamily *	family = SvPangoFontFamily (ST(0))
;
#line 293 "xs/PangoFont.xs"
	PangoFontFace ** faces = NULL;
	int n_faces;
#line 938 "xs/PangoFont.c"
#line 296 "xs/PangoFont.xs"
	pango_font_family_list_faces(family, &faces, &n_faces);
	if (n_faces > 0) {
		int i;
		EXTEND(SP,n_faces);
		for (i = 0 ; i < n_faces ; i++)
			PUSHs(sv_2mortal(newSVPangoFontFace(faces[i])));
		g_free (faces);
	}
#line 948 "xs/PangoFont.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Pango__FontFamily_get_name); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontFamily_get_name)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "family");
    {
	const char *	RETVAL;
	dXSTARG;
	PangoFontFamily *	family = SvPangoFontFamily (ST(0))
;

	RETVAL = pango_font_family_get_name(family);
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}

#if PANGO_CHECK_VERSION(1, 4, 0)
#define XSubPPtmpAAAD 1


XS_EUPXS(XS_Pango__FontFamily_is_monospace); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontFamily_is_monospace)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "family");
    {
	gboolean	RETVAL;
	PangoFontFamily *	family = SvPangoFontFamily (ST(0))
;

	RETVAL = pango_font_family_is_monospace(family);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Pango__FontFace_describe); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontFace_describe)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "face");
    {
	PangoFontDescription_own *	RETVAL;
	PangoFontFace *	face = SvPangoFontFace (ST(0))
;

	RETVAL = pango_font_face_describe(face);
	ST(0) = newSVPangoFontDescription_own (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__FontFace_get_face_name); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontFace_get_face_name)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "face");
    {
	const char *	RETVAL;
	dXSTARG;
	PangoFontFace *	face = SvPangoFontFace (ST(0))
;

	RETVAL = pango_font_face_get_face_name(face);
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}

#if PANGO_CHECK_VERSION(1, 4, 0)
#define XSubPPtmpAAAE 1


XS_EUPXS(XS_Pango__FontFace_list_sizes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontFace_list_sizes)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "face");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 340 "xs/PangoFont.xs"
	int *sizes=NULL, n_sizes, i;
#line 1048 "xs/PangoFont.c"
	PangoFontFace *	face = SvPangoFontFace (ST(0))
;
#line 342 "xs/PangoFont.xs"
	pango_font_face_list_sizes (face, &sizes, &n_sizes);
	if (n_sizes > 0) {
		EXTEND (SP, n_sizes);
		for (i = 0 ; i < n_sizes ; i++)
			PUSHs (sv_2mortal (newSViv (sizes[i])));
		g_free (sizes);
	}
#line 1059 "xs/PangoFont.c"
	PUTBACK;
	return;
    }
}

#endif
#if PANGO_CHECK_VERSION(1, 18, 0)
#define XSubPPtmpAAAF 1


XS_EUPXS(XS_Pango__FontFace_is_synthesized); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__FontFace_is_synthesized)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "face");
    {
	gboolean	RETVAL;
	PangoFontFace *	face = SvPangoFontFace (ST(0))
;

	RETVAL = pango_font_face_is_synthesized(face);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Pango__Font_get_metrics); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__Font_get_metrics)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "font, language");
    {
	PangoFont *	font = SvPangoFont (ST(0))
;
	PangoLanguage *	language = SvPangoLanguage (ST(1))
;
	PangoFontMetrics *	RETVAL;

	RETVAL = pango_font_get_metrics(font, language);
	ST(0) = newSVPangoFontMetrics (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Pango__Font_describe); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__Font_describe)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "font");
    {
	PangoFont *	font = SvPangoFont (ST(0))
;
	PangoFontDescription_own *	RETVAL;

	RETVAL = pango_font_describe(font);
	ST(0) = newSVPangoFontDescription_own (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

#if PANGO_CHECK_VERSION(1, 14, 0)
#define XSubPPtmpAAAG 1


XS_EUPXS(XS_Pango__Font_describe_with_absolute_size); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__Font_describe_with_absolute_size)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "font");
    {
	PangoFontDescription_own *	RETVAL;
	PangoFont *	font = SvPangoFont (ST(0))
;

	RETVAL = pango_font_describe_with_absolute_size(font);
	ST(0) = newSVPangoFontDescription_own (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Pango__Font_get_glyph_extents); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__Font_get_glyph_extents)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "font, glyph");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	PangoFont *	font = SvPangoFont (ST(0))
;
	PangoGlyph	glyph = (PangoGlyph)SvUV(ST(1))
;
#line 384 "xs/PangoFont.xs"
	PangoRectangle ink_rect;
	PangoRectangle logical_rect;
#line 1168 "xs/PangoFont.c"
#line 387 "xs/PangoFont.xs"
	pango_font_get_glyph_extents (font, glyph, &ink_rect, &logical_rect);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVPangoRectangle (&ink_rect)));
	PUSHs (sv_2mortal (newSVPangoRectangle (&logical_rect)));
#line 1174 "xs/PangoFont.c"
	PUTBACK;
	return;
    }
}

#if PANGO_CHECK_VERSION(1, 10, 0)
#define XSubPPtmpAAAH 1


XS_EUPXS(XS_Pango__Font_get_font_map); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Pango__Font_get_font_map)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "font");
    {
	PangoFontMap *	RETVAL;
	PangoFont *	font = SvPangoFont (ST(0))
;

	RETVAL = pango_font_get_font_map(font);
	ST(0) = newSVPangoFontMap (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

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

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
#ifdef XS_APIVERSION_BOOTCHECK
    XS_APIVERSION_BOOTCHECK;
#endif
    XS_VERSION_BOOTCHECK;

        cv = newXS("Pango::scale", XS_Pango_scale, file);
        XSANY.any_i32 = 0;
        cv = newXS("Pango::scale_large", XS_Pango_scale, file);
        XSANY.any_i32 = 5;
        cv = newXS("Pango::scale_medium", XS_Pango_scale, file);
        XSANY.any_i32 = 4;
        cv = newXS("Pango::scale_small", XS_Pango_scale, file);
        XSANY.any_i32 = 3;
        cv = newXS("Pango::scale_x_large", XS_Pango_scale, file);
        XSANY.any_i32 = 6;
        cv = newXS("Pango::scale_x_small", XS_Pango_scale, file);
        XSANY.any_i32 = 2;
        cv = newXS("Pango::scale_xx_large", XS_Pango_scale, file);
        XSANY.any_i32 = 7;
        cv = newXS("Pango::scale_xx_small", XS_Pango_scale, file);
        XSANY.any_i32 = 1;
        cv = newXS("Pango::PANGO_PIXELS", XS_Pango_PANGO_PIXELS, file);
        XSANY.any_i32 = 0;
        cv = newXS("Pango::pixels", XS_Pango_PANGO_PIXELS, file);
        XSANY.any_i32 = 1;
        newXS("Pango::FontDescription::new", XS_Pango__FontDescription_new, file);
        newXS("Pango::FontDescription::hash", XS_Pango__FontDescription_hash, file);
        newXS("Pango::FontDescription::equal", XS_Pango__FontDescription_equal, file);
        newXS("Pango::FontDescription::set_family", XS_Pango__FontDescription_set_family, file);
        newXS("Pango::FontDescription::set_family_static", XS_Pango__FontDescription_set_family_static, file);
        newXS("Pango::FontDescription::get_family", XS_Pango__FontDescription_get_family, file);
        newXS("Pango::FontDescription::set_style", XS_Pango__FontDescription_set_style, file);
        newXS("Pango::FontDescription::get_style", XS_Pango__FontDescription_get_style, file);
        newXS("Pango::FontDescription::set_variant", XS_Pango__FontDescription_set_variant, file);
        newXS("Pango::FontDescription::get_variant", XS_Pango__FontDescription_get_variant, file);
        newXS("Pango::FontDescription::set_weight", XS_Pango__FontDescription_set_weight, file);
        newXS("Pango::FontDescription::get_weight", XS_Pango__FontDescription_get_weight, file);
        newXS("Pango::FontDescription::set_stretch", XS_Pango__FontDescription_set_stretch, file);
        newXS("Pango::FontDescription::get_stretch", XS_Pango__FontDescription_get_stretch, file);
        newXS("Pango::FontDescription::set_size", XS_Pango__FontDescription_set_size, file);
        newXS("Pango::FontDescription::get_size", XS_Pango__FontDescription_get_size, file);
        newXS("Pango::FontDescription::get_set_fields", XS_Pango__FontDescription_get_set_fields, file);
        newXS("Pango::FontDescription::unset_fields", XS_Pango__FontDescription_unset_fields, file);
        newXS("Pango::FontDescription::merge", XS_Pango__FontDescription_merge, file);
        newXS("Pango::FontDescription::merge_static", XS_Pango__FontDescription_merge_static, file);
        newXS("Pango::FontDescription::better_match", XS_Pango__FontDescription_better_match, file);
        newXS("Pango::FontDescription::from_string", XS_Pango__FontDescription_from_string, file);
        newXS("Pango::FontDescription::to_string", XS_Pango__FontDescription_to_string, file);
        newXS("Pango::FontDescription::to_filename", XS_Pango__FontDescription_to_filename, file);
#if XSubPPtmpAAAA
        newXS("Pango::FontDescription::set_absolute_size", XS_Pango__FontDescription_set_absolute_size, file);
        newXS("Pango::FontDescription::get_size_is_absolute", XS_Pango__FontDescription_get_size_is_absolute, file);
#endif
#if XSubPPtmpAAAB
        newXS("Pango::FontDescription::set_gravity", XS_Pango__FontDescription_set_gravity, file);
        newXS("Pango::FontDescription::get_gravity", XS_Pango__FontDescription_get_gravity, file);
#endif
        newXS("Pango::FontMetrics::get_ascent", XS_Pango__FontMetrics_get_ascent, file);
        newXS("Pango::FontMetrics::get_descent", XS_Pango__FontMetrics_get_descent, file);
        newXS("Pango::FontMetrics::get_approximate_char_width", XS_Pango__FontMetrics_get_approximate_char_width, file);
        newXS("Pango::FontMetrics::get_approximate_digit_width", XS_Pango__FontMetrics_get_approximate_digit_width, file);
#if XSubPPtmpAAAC
        newXS("Pango::FontMetrics::get_underline_position", XS_Pango__FontMetrics_get_underline_position, file);
        newXS("Pango::FontMetrics::get_underline_thickness", XS_Pango__FontMetrics_get_underline_thickness, file);
        newXS("Pango::FontMetrics::get_strikethrough_position", XS_Pango__FontMetrics_get_strikethrough_position, file);
        newXS("Pango::FontMetrics::get_strikethrough_thickness", XS_Pango__FontMetrics_get_strikethrough_thickness, file);
#endif
        newXS("Pango::FontFamily::list_faces", XS_Pango__FontFamily_list_faces, file);
        newXS("Pango::FontFamily::get_name", XS_Pango__FontFamily_get_name, file);
#if XSubPPtmpAAAD
        newXS("Pango::FontFamily::is_monospace", XS_Pango__FontFamily_is_monospace, file);
#endif
        newXS("Pango::FontFace::describe", XS_Pango__FontFace_describe, file);
        newXS("Pango::FontFace::get_face_name", XS_Pango__FontFace_get_face_name, file);
#if XSubPPtmpAAAE
        newXS("Pango::FontFace::list_sizes", XS_Pango__FontFace_list_sizes, file);
#endif
#if XSubPPtmpAAAF
        newXS("Pango::FontFace::is_synthesized", XS_Pango__FontFace_is_synthesized, file);
#endif
        newXS("Pango::Font::get_metrics", XS_Pango__Font_get_metrics, file);
        newXS("Pango::Font::describe", XS_Pango__Font_describe, file);
#if XSubPPtmpAAAG
        newXS("Pango::Font::describe_with_absolute_size", XS_Pango__Font_describe_with_absolute_size, file);
#endif
        newXS("Pango::Font::get_glyph_extents", XS_Pango__Font_get_glyph_extents, file);
#if XSubPPtmpAAAH
        newXS("Pango::Font::get_font_map", XS_Pango__Font_get_font_map, file);
#endif

    /* Initialisation Section */

#if XSubPPtmpAAAA
#endif
#if XSubPPtmpAAAB
#endif
#if XSubPPtmpAAAC
#endif
#line 281 "xs/PangoFont.xs"
	gperl_object_set_no_warn_unreg_subclass (PANGO_TYPE_FONT_FAMILY, TRUE);

#if XSubPPtmpAAAD
#endif
#line 321 "xs/PangoFont.xs"
	gperl_object_set_no_warn_unreg_subclass (PANGO_TYPE_FONT_FACE, TRUE);

#if XSubPPtmpAAAE
#endif
#if XSubPPtmpAAAF
#endif
#if XSubPPtmpAAAG
#endif
#if XSubPPtmpAAAH
#endif
#line 1332 "xs/PangoFont.c"

    /* End of Initialisation Section */

#if (PERL_REVISION == 5 && PERL_VERSION >= 9)
  if (PL_unitcheckav)
       call_list(PL_scopestack_ix, PL_unitcheckav);
#endif
    XSRETURN_YES;
}

