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

#line 1 "xs/GtkDialog.xs"
/*
 * Copyright (c) 2003-2005 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"
#include <gperl_marshal.h>

/*
 * The next three functions are also used in GtkInfoBar.xs, thus they are not
 * declared static.
 */

/*
 * GtkDialog interprets the response id as completely user-defined for
 * positive values, and as special enums for negative values.  so, we
 * will handle the response_id as a plain SV so we can implement this
 * special behavior.
 */

gint
gtk2perl_dialog_response_id_from_sv (SV * sv)
{
	int n;
	if (looks_like_number (sv))
		return SvIV (sv);
	if (!gperl_try_convert_enum (GTK_TYPE_RESPONSE_TYPE, sv, &n))
		croak ("response_id should be either a GtkResponseType or an integer");
	return n;
}

SV *
gtk2perl_dialog_response_id_to_sv (gint response)
{
	return gperl_convert_back_enum_pass_unknown (GTK_TYPE_RESPONSE_TYPE,
	                                             response);
}

/*
GtkDialog's response event is defined in Gtk as having a signal parameter
of type G_TYPE_INT, but GtkResponseType values are passed through it.

this custom marshaller allows us to catch and convert enum codes like those
returned by $dialog->run , instead of requiring the callback to deal with
the raw negative numeric values for the predefined constants.
*/
void
gtk2perl_dialog_response_marshal (GClosure * closure,
                                  GValue * return_value,
                                  guint n_param_values,
                                  const GValue * param_values,
                                  gpointer invocation_hint,
                                  gpointer marshal_data)
{
	dGPERL_CLOSURE_MARSHAL_ARGS;

	GPERL_CLOSURE_MARSHAL_INIT (closure, marshal_data);

	PERL_UNUSED_VAR (return_value);
	PERL_UNUSED_VAR (n_param_values);
	PERL_UNUSED_VAR (invocation_hint);

	ENTER;
	SAVETMPS;

	PUSHMARK (SP);

	GPERL_CLOSURE_MARSHAL_PUSH_INSTANCE (param_values);

	/* the second parameter for this signal is defined as an int
	 * but is actually a response code, and can have GtkResponseType
	 * values. */
	XPUSHs (sv_2mortal (gtk2perl_dialog_response_id_to_sv
				(g_value_get_int (param_values + 1))));

	GPERL_CLOSURE_MARSHAL_PUSH_DATA;

	PUTBACK;

	GPERL_CLOSURE_MARSHAL_CALL (G_DISCARD);

	/*
	 * clean up 
	 */

	FREETMPS;
	LEAVE;
}

#line 116 "xs/GtkDialog.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 260 "xs/GtkDialog.c"

XS_EUPXS(XS_Gtk2__Dialog_get_content_area); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Dialog_get_content_area)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "dialog");
    {
	GtkDialog *	dialog = SvGtkDialog (ST(0))
;
	GtkWidget *	RETVAL;
#line 269 "xs/GtkDialog.xs"
	switch(ix) {
	case 0:
	case 1:
#if GTK_CHECK_VERSION (2, 14, 0)
		RETVAL = gtk_dialog_get_content_area (dialog);
#else
		RETVAL = dialog->vbox;
#endif
		break;
	case 2:
	case 3:
#if GTK_CHECK_VERSION (2, 14, 0)
		RETVAL = gtk_dialog_get_action_area (dialog);
#else
		RETVAL = dialog->action_area;
#endif
		break;
	default:
		RETVAL = NULL;
		g_assert_not_reached ();
	}
#line 295 "xs/GtkDialog.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkWidget (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Dialog_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Dialog_new)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items < 1)
       croak_xs_usage(cv,  "class, ...");
    {
#line 336 "xs/GtkDialog.xs"
	int i;
	gchar * title;
	GtkWidget * dialog;
	GtkWindow * parent;
	int flags;
#line 321 "xs/GtkDialog.c"
	GtkWidget *	RETVAL;
#line 342 "xs/GtkDialog.xs"
	PERL_UNUSED_VAR (ix);
	if (items == 1) {
		/* the easy way out... */
		dialog = gtk_dialog_new ();

	} else if ((items < 4) || (items % 2)) {
		croak ("USAGE: Gtk2::Dialog->new ()\n"
		       "  or Gtk2::Dialog->new (TITLE, PARENT, FLAGS, ...)\n"
		       "  where ... is a series of button text and response id pairs");
	} else {
		title = SvGChar (ST (1));
		parent = SvGtkWindow_ornull (ST (2));
		flags = SvGtkDialogFlags (ST (3));

		/* we can't really pass on a varargs call (at least, i don't
		 * know how to convert from perl stack to C va_list), so we
		 * have to duplicate a bit of the functionality of the C
		 * version.  luckily it's nothing too intense. */

		dialog = gtk_dialog_new ();
		if (title)
			gtk_window_set_title (GTK_WINDOW (dialog), title);
		if (parent)
			gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
		if (flags & GTK_DIALOG_MODAL)
			gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
		if (flags & GTK_DIALOG_DESTROY_WITH_PARENT)
			gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
		if (flags & GTK_DIALOG_NO_SEPARATOR)
			gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);

		/* skip the first 4 stack items --- we've already seen them! */
		for (i = 4; i < items; i += 2) {
			gchar * text = SvGChar (ST (i));
			int response_id =
				gtk2perl_dialog_response_id_from_sv (ST (i+1));
			gtk_dialog_add_button (GTK_DIALOG (dialog), text,
			                       response_id);
		}
	}
	RETVAL = dialog;
#line 365 "xs/GtkDialog.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkWidget (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Dialog_run); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Dialog_run)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "dialog");
    {
	GtkDialog *	dialog = SvGtkDialog (ST(0))
;
	SV *	RETVAL;
#line 422 "xs/GtkDialog.xs"
	RETVAL = gtk2perl_dialog_response_id_to_sv (gtk_dialog_run (dialog));
#line 389 "xs/GtkDialog.c"
	RETVAL = sv_2mortal(RETVAL);
	ST(0) = RETVAL;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Dialog_response); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Dialog_response)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "dialog, response_id");
    {
	GtkDialog *	dialog = SvGtkDialog (ST(0))
;
	SV *	response_id = ST(1)
;

	gtk_dialog_response(dialog, gtk2perl_dialog_response_id_from_sv (response_id));
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Dialog_add_button); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Dialog_add_button)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "dialog, button_text, response_id");
    {
	GtkDialog *	dialog = SvGtkDialog (ST(0))
;
	const gchar *	button_text;
	SV *	response_id = ST(2)
;
	GtkWidget *	RETVAL;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	button_text = (const gchar *)SvPV_nolen (ST(1))
;
#line 452 "xs/GtkDialog.xs"
	RETVAL = gtk_dialog_add_button (dialog, button_text,
	                                gtk2perl_dialog_response_id_from_sv (
	                                  response_id));
#line 437 "xs/GtkDialog.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkWidget (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Dialog_add_buttons); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Dialog_add_buttons)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "dialog, ...");
    {
	GtkDialog *	dialog = SvGtkDialog (ST(0))
;
#line 468 "xs/GtkDialog.xs"
	int i;
#line 460 "xs/GtkDialog.c"
#line 470 "xs/GtkDialog.xs"
	if (!(items % 2))
		croak("gtk_dialog_add_buttons: odd number of parameters");
	/* we can't make var args, so we'll call add_button for each */
	for (i = 1; i < items; i += 2)
		gtk_dialog_add_button (dialog, SvGChar (ST (i)),
		                       gtk2perl_dialog_response_id_from_sv (
		                         ST (i+1)));
#line 469 "xs/GtkDialog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Dialog_set_response_sensitive); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Dialog_set_response_sensitive)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "dialog, response_id, setting");
    {
	GtkDialog *	dialog = SvGtkDialog (ST(0))
;
	SV *	response_id = ST(1)
;
	gboolean	setting = (bool)SvTRUE(ST(2))
;
#line 488 "xs/GtkDialog.xs"
	gtk_dialog_set_response_sensitive (dialog,
	                                   gtk2perl_dialog_response_id_from_sv (
	                                     response_id),
	                                   setting);
#line 493 "xs/GtkDialog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Dialog_add_action_widget); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Dialog_add_action_widget)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "dialog, child, response_id");
    {
	GtkDialog *	dialog = SvGtkDialog (ST(0))
;
	GtkWidget *	child = SvGtkWidget (ST(1))
;
	SV *	response_id = ST(2)
;
#line 502 "xs/GtkDialog.xs"
	gtk_dialog_add_action_widget (dialog, child,
	                              gtk2perl_dialog_response_id_from_sv (
	                                response_id));
#line 516 "xs/GtkDialog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Dialog_set_default_response); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Dialog_set_default_response)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "dialog, response_id");
    {
	GtkDialog *	dialog = SvGtkDialog (ST(0))
;
	SV *	response_id = ST(1)
;
#line 515 "xs/GtkDialog.xs"
	gtk_dialog_set_default_response (dialog,
	                                 gtk2perl_dialog_response_id_from_sv (
	                                   response_id));
#line 537 "xs/GtkDialog.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Dialog_set_has_separator); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Dialog_set_has_separator)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "dialog, setting");
    {
	GtkDialog *	dialog = SvGtkDialog (ST(0))
;
	gboolean	setting = (bool)SvTRUE(ST(1))
;

	gtk_dialog_set_has_separator(dialog, setting);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Dialog_get_has_separator); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Dialog_get_has_separator)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "dialog");
    {
	GtkDialog *	dialog = SvGtkDialog (ST(0))
;
	gboolean	RETVAL;

	RETVAL = gtk_dialog_get_has_separator(dialog);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

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


XS_EUPXS(XS_Gtk2__Dialog_set_alternative_button_order); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Dialog_set_alternative_button_order)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "dialog, ...");
    {
	GtkDialog *	dialog = SvGtkDialog (ST(0))
;
#line 535 "xs/GtkDialog.xs"
	gint n_params, i;
	gint *new_order;
#line 594 "xs/GtkDialog.c"
#line 538 "xs/GtkDialog.xs"
	if ((n_params = (items - 1)) > 0) {
		new_order = g_new0 (gint, n_params);
		for (i = 1; i < items; i++)
			new_order[i - 1] = gtk2perl_dialog_response_id_from_sv (
			                     ST (i));

		gtk_dialog_set_alternative_button_order_from_array (
			dialog, n_params, new_order);

		g_free (new_order);
	}
#line 607 "xs/GtkDialog.c"
    }
    XSRETURN_EMPTY;
}

#endif
#if GTK_CHECK_VERSION (2, 8, 0)
#define XSubPPtmpAAAB 1


XS_EUPXS(XS_Gtk2__Dialog_get_response_for_widget); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Dialog_get_response_for_widget)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "dialog, widget");
    {
	GtkDialog *	dialog = SvGtkDialog (ST(0))
;
	GtkWidget *	widget = SvGtkWidget (ST(1))
;
#line 560 "xs/GtkDialog.xs"
	gint tmp;
#line 630 "xs/GtkDialog.c"
	SV *	RETVAL;
#line 562 "xs/GtkDialog.xs"
	tmp = gtk_dialog_get_response_for_widget (dialog, widget);
	RETVAL = gtk2perl_dialog_response_id_to_sv (tmp);
#line 635 "xs/GtkDialog.c"
	RETVAL = sv_2mortal(RETVAL);
	ST(0) = RETVAL;
    }
    XSRETURN(1);
}

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


XS_EUPXS(XS_Gtk2__Dialog_get_widget_for_response); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Dialog_get_widget_for_response)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "dialog, response_id");
    {
	GtkDialog *	dialog = SvGtkDialog (ST(0))
;
	SV *	response_id = ST(1)
;
	GtkWidget *	RETVAL;

	RETVAL = gtk_dialog_get_widget_for_response(dialog, gtk2perl_dialog_response_id_from_sv (response_id));
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkWidget (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif
#if GTK_CHECK_VERSION (2, 6, 0)
#define XSubPPtmpAAAD 1


XS_EUPXS(XS_Gtk2_alternative_dialog_button_order); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2_alternative_dialog_button_order)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "class, screen=NULL");
    {
	GdkScreen_ornull *	screen;
	gboolean	RETVAL;

	if (items < 2)
	    screen = NULL;
	else {
	    screen = SvGdkScreen_ornull (ST(1))
;
	}

	RETVAL = gtk_alternative_dialog_button_order(screen);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

#endif
#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Gtk2__Dialog); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Gtk2__Dialog)
{
#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

        cv = newXS_deffile("Gtk2::Dialog::action_area", XS_Gtk2__Dialog_get_content_area);
        XSANY.any_i32 = 3;
        cv = newXS_deffile("Gtk2::Dialog::get_action_area", XS_Gtk2__Dialog_get_content_area);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Gtk2::Dialog::get_content_area", XS_Gtk2__Dialog_get_content_area);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Gtk2::Dialog::vbox", XS_Gtk2__Dialog_get_content_area);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Gtk2::Dialog::new", XS_Gtk2__Dialog_new);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Gtk2::Dialog::new_with_buttons", XS_Gtk2__Dialog_new);
        XSANY.any_i32 = 1;
        newXS_deffile("Gtk2::Dialog::run", XS_Gtk2__Dialog_run);
        newXS_deffile("Gtk2::Dialog::response", XS_Gtk2__Dialog_response);
        newXS_deffile("Gtk2::Dialog::add_button", XS_Gtk2__Dialog_add_button);
        newXS_deffile("Gtk2::Dialog::add_buttons", XS_Gtk2__Dialog_add_buttons);
        newXS_deffile("Gtk2::Dialog::set_response_sensitive", XS_Gtk2__Dialog_set_response_sensitive);
        newXS_deffile("Gtk2::Dialog::add_action_widget", XS_Gtk2__Dialog_add_action_widget);
        newXS_deffile("Gtk2::Dialog::set_default_response", XS_Gtk2__Dialog_set_default_response);
        newXS_deffile("Gtk2::Dialog::set_has_separator", XS_Gtk2__Dialog_set_has_separator);
        newXS_deffile("Gtk2::Dialog::get_has_separator", XS_Gtk2__Dialog_get_has_separator);
#if XSubPPtmpAAAA
        newXS_deffile("Gtk2::Dialog::set_alternative_button_order", XS_Gtk2__Dialog_set_alternative_button_order);
#endif
#if XSubPPtmpAAAB
        newXS_deffile("Gtk2::Dialog::get_response_for_widget", XS_Gtk2__Dialog_get_response_for_widget);
#endif
#if XSubPPtmpAAAC
        newXS_deffile("Gtk2::Dialog::get_widget_for_response", XS_Gtk2__Dialog_get_widget_for_response);
#endif
#if XSubPPtmpAAAD
        newXS_deffile("Gtk2::alternative_dialog_button_order", XS_Gtk2_alternative_dialog_button_order);
#endif

    /* Initialisation Section */

#line 252 "xs/GtkDialog.xs"
	gperl_signal_set_marshaller_for (GTK_TYPE_DIALOG, "response",
	                                 gtk2perl_dialog_response_marshal);

#if XSubPPtmpAAAA
#endif
#if XSubPPtmpAAAB
#endif
#if XSubPPtmpAAAC
#endif
#if XSubPPtmpAAAD
#endif
#line 776 "xs/GtkDialog.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
}

