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

/////////////////////////////////////////////////////////////////////////////
// Name:        ext/media/Media.xs
// Purpose:     XS for wxWidgets multimedia control
// Author:      Mattia Barbon
// Modified by:
// Created:     04/03/2006
// RCS-ID:      $Id: Media.xs 2757 2010-01-17 10:26:27Z mbarbon $
// Copyright:   (c) 2006, 2008-2010 Mattia Barbon
// Licence:     This program is free software; you can redistribute it and/or
//              modify it under the same terms as Perl itself
/////////////////////////////////////////////////////////////////////////////

#define PERL_NO_GET_CONTEXT

#include "cpp/wxapi.h"
// #include "cpp/xr_constants.cpp"

#undef THIS

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


/* INCLUDE_COMMAND:  Including output of '/usr/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/MediaCtrl.xsp' from 'Media.xs' */

#include <exception>

#undef  xsp_constructor_class
#define xsp_constructor_class(c) (c)
#include <wx/setup.h>
#if wxUSE_MEDIACTRL
#define XSpp_ab2fe8c0_035857
#include <wx/mediactrl.h>
#include "cpp/overload.h"
#define wxDefaultValidatorPtr (wxValidator*)&wxDefaultValidator
#undef  xsp_constructor_class
#define xsp_constructor_class(c) (CLASS)
#define XSubPPtmpAAAA 1


XS_EUPXS(XS_Wx__MediaCtrl_newDefault); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_newDefault)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "CLASS");
    {
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
	wxMediaCtrl *	RETVAL;
    try {
      RETVAL = new wxMediaCtrl();
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	ST(0) = sv_newmortal();
    wxPli_object_2_sv( aTHX_ ST(0), RETVAL );
    }
    XSRETURN(1);
}

#undef  xsp_constructor_class
#define xsp_constructor_class(c) (c)
#undef  xsp_constructor_class
#define xsp_constructor_class(c) (CLASS)

XS_EUPXS(XS_Wx__MediaCtrl_newFull); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_newFull)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 10)
       croak_xs_usage(cv,  "CLASS, parent, id= wxID_ANY, filename= wxEmptyString, pos= wxDefaultPosition, size= wxDefaultSize, style= 0, szBackend= wxEmptyString, validator= wxDefaultValidatorPtr, name= wxPanelNameStr");
    {
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
	wxMediaCtrl *	RETVAL;
	wxWindow*    parent = (wxWindow *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::Window" )
;
	wxWindowID	id;
	wxString	filename;
	wxPoint	pos;
	wxSize	size;
	long	style;
	wxString	szBackend;
	wxValidator*	validator;
	wxString	name;

	if (items < 3)
	    id = wxID_ANY;
	else {
    id = wxPli_get_wxwindowid( aTHX_ ST(2) )
;
	}

	if (items < 4)
	    filename = wxEmptyString;
	else {
    WXSTRING_INPUT( filename, wxString, ST(3) )
;
	}

	if (items < 5)
	    pos = wxDefaultPosition;
	else {
    pos = wxPli_sv_2_wxpoint( aTHX_ ST(4) )
;
	}

	if (items < 6)
	    size = wxDefaultSize;
	else {
    size = wxPli_sv_2_wxsize( aTHX_ ST(5) )
;
	}

	if (items < 7)
	    style = 0;
	else {
	    style = (long)SvIV(ST(6))
;
	}

	if (items < 8)
	    szBackend = wxEmptyString;
	else {
    WXSTRING_INPUT( szBackend, wxString, ST(7) )
;
	}

	if (items < 9)
	    validator = wxDefaultValidatorPtr;
	else {
    validator = (wxValidator *) wxPli_sv_2_object( aTHX_ ST(8), "Wx::Validator" )
;
	}

	if (items < 10)
	    name = wxPanelNameStr;
	else {
    WXSTRING_INPUT( name, wxString, ST(9) )
;
	}
    try {
      RETVAL = new wxMediaCtrl( parent, id, filename, pos, size, style, szBackend, *( validator ), name );
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	ST(0) = sv_newmortal();
    wxPli_object_2_sv( aTHX_ ST(0), RETVAL );
    }
    XSRETURN(1);
}

#undef  xsp_constructor_class
#define xsp_constructor_class(c) (c)

XS_EUPXS(XS_Wx__MediaCtrl_Create); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_Create)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 10)
       croak_xs_usage(cv,  "THIS, parent, id= wxID_ANY, filename= wxEmptyString, pos= wxDefaultPosition, size= wxDefaultSize, style= 0, szBackend= wxEmptyString, validator= wxDefaultValidatorPtr, name= wxPanelNameStr");
    {
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	bool	RETVAL;
	wxWindow*    parent = (wxWindow *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::Window" )
;
	wxWindowID	id;
	wxString	filename;
	wxPoint	pos;
	wxSize	size;
	long	style;
	wxString	szBackend;
	wxValidator*	validator;
	wxString	name;

	if (items < 3)
	    id = wxID_ANY;
	else {
    id = wxPli_get_wxwindowid( aTHX_ ST(2) )
;
	}

	if (items < 4)
	    filename = wxEmptyString;
	else {
    WXSTRING_INPUT( filename, wxString, ST(3) )
;
	}

	if (items < 5)
	    pos = wxDefaultPosition;
	else {
    pos = wxPli_sv_2_wxpoint( aTHX_ ST(4) )
;
	}

	if (items < 6)
	    size = wxDefaultSize;
	else {
    size = wxPli_sv_2_wxsize( aTHX_ ST(5) )
;
	}

	if (items < 7)
	    style = 0;
	else {
	    style = (long)SvIV(ST(6))
;
	}

	if (items < 8)
	    szBackend = wxEmptyString;
	else {
    WXSTRING_INPUT( szBackend, wxString, ST(7) )
;
	}

	if (items < 9)
	    validator = wxDefaultValidatorPtr;
	else {
    validator = (wxValidator *) wxPli_sv_2_object( aTHX_ ST(8), "Wx::Validator" )
;
	}

	if (items < 10)
	    name = wxPanelNameStr;
	else {
    WXSTRING_INPUT( name, wxString, ST(9) )
;
	}
    try {
      RETVAL = THIS->Create( parent, id, filename, pos, size, style, szBackend, *( validator ), name );
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_Tell); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_Tell)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	off_t	RETVAL;
	dXSTARG;
    try {
      RETVAL = THIS->Tell();
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_Length); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_Length)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	off_t	RETVAL;
	dXSTARG;
    try {
      RETVAL = THIS->Length();
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_Seek); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_Seek)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "THIS, where, whence");
    {
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	off_t	RETVAL;
	dXSTARG;
	off_t	where = (off_t)SvIV(ST(1))
;
	wxSeekMode	whence = (wxSeekMode)SvIV(ST(2))
;
    try {
      RETVAL = THIS->Seek( where, whence );
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_GetState); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_GetState)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	wxMediaState	RETVAL;
	dXSTARG;
    try {
      RETVAL = THIS->GetState();
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_Play); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_Play)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	bool	RETVAL;
    try {
      RETVAL = THIS->Play();
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_Pause); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_Pause)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	bool	RETVAL;
    try {
      RETVAL = THIS->Pause();
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_Stop); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_Stop)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	bool	RETVAL;
    try {
      RETVAL = THIS->Stop();
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_GetVolume); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_GetVolume)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	double	RETVAL;
	dXSTARG;
    try {
      RETVAL = THIS->GetVolume();
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	XSprePUSH; PUSHn((double)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_SetVolume); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_SetVolume)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, volume");
    {
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	bool	RETVAL;
	double	volume = (double)SvNV(ST(1))
;
    try {
      RETVAL = THIS->SetVolume( volume );
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_GetPlaybackRate); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_GetPlaybackRate)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	double	RETVAL;
	dXSTARG;
    try {
      RETVAL = THIS->GetPlaybackRate();
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	XSprePUSH; PUSHn((double)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_SetPlaybackRate); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_SetPlaybackRate)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, volume");
    {
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	bool	RETVAL;
	double	volume = (double)SvNV(ST(1))
;
    try {
      RETVAL = THIS->SetPlaybackRate( volume );
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_GetDownloadProgress); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_GetDownloadProgress)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	off_t	RETVAL;
	dXSTARG;
    try {
      RETVAL = THIS->GetDownloadProgress();
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_GetDownloadTotal); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_GetDownloadTotal)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	off_t	RETVAL;
	dXSTARG;
    try {
      RETVAL = THIS->GetDownloadTotal();
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_ShowPlayerControls); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_ShowPlayerControls)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "THIS, flags= wxMEDIACTRLPLAYERCONTROLS_DEFAULT");
    {
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	bool	RETVAL;
	wxMediaCtrlPlayerControls	flags;

	if (items < 2)
	    flags = wxMEDIACTRLPLAYERCONTROLS_DEFAULT;
	else {
	    flags = (wxMediaCtrlPlayerControls)SvIV(ST(1))
;
	}
    try {
      RETVAL = THIS->ShowPlayerControls( flags );
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_new)
{
    dVAR; dXSARGS;
    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
    BEGIN_OVERLOAD()
        MATCH_VOIDM_REDISP( newDefault )
        MATCH_ANY_REDISP( newFull )
    END_OVERLOAD( "Wx::Button::new" )
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Wx__MediaCtrl_LoadFile); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_LoadFile)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, file");
    {
	wxString	file;
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	bool	RETVAL;

    WXSTRING_INPUT( file, wxString, ST(1) )
;
    RETVAL = THIS->Load( file );
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__MediaCtrl_LoadURI); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaCtrl_LoadURI)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, uri");
    {
	wxString	uri;
	wxMediaCtrl *    THIS = (wxMediaCtrl *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::MediaCtrl" )
;
	bool	RETVAL;

    WXSTRING_INPUT( uri, wxString, ST(1) )
;
    RETVAL = THIS->Load( wxURI( uri ) );
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

#endif

/* INCLUDE: Returning to 'Media.xs' from '/usr/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/MediaCtrl.xsp' */


/* INCLUDE_COMMAND:  Including output of '/usr/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/MediaEvent.xsp' from 'Media.xs' */

#include <exception>

#undef  xsp_constructor_class
#define xsp_constructor_class(c) (c)
#include <wx/setup.h>
#if wxUSE_MEDIACTRL
#define XSpp_d368dbc1_043727
#include <wx/mediactrl.h>
#undef  xsp_constructor_class
#define xsp_constructor_class(c) (CLASS)
#define XSubPPtmpAAAB 1


XS_EUPXS(XS_Wx__MediaEvent_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__MediaEvent_new)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 3)
       croak_xs_usage(cv,  "CLASS, commandType= wxEVT_NULL, winid= 0");
    {
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
	wxMediaEvent *	RETVAL;
	wxEventType	commandType;
	int	winid;

	if (items < 2)
	    commandType = wxEVT_NULL;
	else {
	    commandType = (wxEventType)SvIV(ST(1))
;
	}

	if (items < 3)
	    winid = 0;
	else {
	    winid = (int)SvIV(ST(2))
;
	}
    try {
      RETVAL = new wxMediaEvent( commandType, winid );
    }
    catch (std::exception& e) {
      croak("Caught C++ exception of type or derived from 'std::exception': %s", e.what());
    }
    catch (...) {
      croak("Caught C++ exception of unknown type");
    }
	ST(0) = sv_newmortal();
    wxPli_object_2_sv( aTHX_ ST(0), RETVAL );
    }
    XSRETURN(1);
}

#undef  xsp_constructor_class
#define xsp_constructor_class(c) (c)
#endif

/* INCLUDE: Returning to 'Media.xs' from '/usr/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/MediaEvent.xsp' */

#include "cpp/overload.h"
#include "cpp/ovl_const.cpp"
#include "cpp/me_constants.cpp"
#if defined(__WXMSW__)
#undef XS
#define XS( name ) WXXS( name )
#endif
#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Wx__Media); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Wx__Media)
{
    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;

#if XSubPPtmpAAAA
        newXS("Wx::MediaCtrl::newDefault", XS_Wx__MediaCtrl_newDefault, file);
        newXS("Wx::MediaCtrl::newFull", XS_Wx__MediaCtrl_newFull, file);
        newXS("Wx::MediaCtrl::Create", XS_Wx__MediaCtrl_Create, file);
        newXS("Wx::MediaCtrl::Tell", XS_Wx__MediaCtrl_Tell, file);
        newXS("Wx::MediaCtrl::Length", XS_Wx__MediaCtrl_Length, file);
        newXS("Wx::MediaCtrl::Seek", XS_Wx__MediaCtrl_Seek, file);
        newXS("Wx::MediaCtrl::GetState", XS_Wx__MediaCtrl_GetState, file);
        newXS("Wx::MediaCtrl::Play", XS_Wx__MediaCtrl_Play, file);
        newXS("Wx::MediaCtrl::Pause", XS_Wx__MediaCtrl_Pause, file);
        newXS("Wx::MediaCtrl::Stop", XS_Wx__MediaCtrl_Stop, file);
        newXS("Wx::MediaCtrl::GetVolume", XS_Wx__MediaCtrl_GetVolume, file);
        newXS("Wx::MediaCtrl::SetVolume", XS_Wx__MediaCtrl_SetVolume, file);
        newXS("Wx::MediaCtrl::GetPlaybackRate", XS_Wx__MediaCtrl_GetPlaybackRate, file);
        newXS("Wx::MediaCtrl::SetPlaybackRate", XS_Wx__MediaCtrl_SetPlaybackRate, file);
        newXS("Wx::MediaCtrl::GetDownloadProgress", XS_Wx__MediaCtrl_GetDownloadProgress, file);
        newXS("Wx::MediaCtrl::GetDownloadTotal", XS_Wx__MediaCtrl_GetDownloadTotal, file);
        newXS("Wx::MediaCtrl::ShowPlayerControls", XS_Wx__MediaCtrl_ShowPlayerControls, file);
        newXS("Wx::MediaCtrl::new", XS_Wx__MediaCtrl_new, file);
        newXS("Wx::MediaCtrl::LoadFile", XS_Wx__MediaCtrl_LoadFile, file);
        newXS("Wx::MediaCtrl::LoadURI", XS_Wx__MediaCtrl_LoadURI, file);
#endif
#if XSubPPtmpAAAB
        newXS("Wx::MediaEvent::new", XS_Wx__MediaEvent_new, file);
#endif

    /* Initialisation Section */

  INIT_PLI_HELPERS( wx_pli_helpers );

#if XSubPPtmpAAAA
#endif
#if XSubPPtmpAAAB
#endif

    /* End of Initialisation Section */

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

