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

#line 1 "Trackbar.xs"
    /*
    ###########################################################################
    # (@)PACKAGE:Win32::GUI::Trackbar
    #
    # $Id: Trackbar.xs,v 1.8 2006/03/16 21:11:12 robertemay Exp $
    #
    ###########################################################################
    */

#include "GUI.h"

void 
Trackbar_onPreCreate(NOTXSPROC LPPERLWIN32GUI_CREATESTRUCT perlcs) {

    perlcs->cs.lpszClass = TRACKBAR_CLASS;
    perlcs->cs.style = WS_VISIBLE | WS_CHILD | TBS_AUTOTICKS | TBS_ENABLESELRANGE;
}

BOOL
Trackbar_onParseOption(NOTXSPROC char *option, SV* value, LPPERLWIN32GUI_CREATESTRUCT perlcs) {

    BOOL retval= TRUE;

    if(strcmp(option, "-tooltip") == 0) {
        perlcs->hTooltip = (HWND) handle_From(NOTXSCALL value);
        SwitchBit(perlcs->cs.style, TBS_TOOLTIPS , 1);        
    } else if BitmaskOptionValue("-vertical",    perlcs->cs.style, TBS_VERT)
    } else if BitmaskOptionValue("-aligntop",    perlcs->cs.style, TBS_TOP)
    } else if BitmaskOptionValue("-alignleft",   perlcs->cs.style, TBS_LEFT)
    } else if BitmaskOptionValue("-noticks",     perlcs->cs.style, TBS_NOTICKS)
    } else if BitmaskOptionValue("-nothumb",     perlcs->cs.style, TBS_NOTHUMB)
    } else if BitmaskOptionValue("-selrange",    perlcs->cs.style, TBS_ENABLESELRANGE)
    } else if BitmaskOptionValue("-autoticks",   perlcs->cs.style, TBS_AUTOTICKS)
    } else if BitmaskOptionValue("-both",        perlcs->cs.style, TBS_BOTH)
    } else if BitmaskOptionValue("-fixedlength", perlcs->cs.style, TBS_FIXEDLENGTH)
    } else retval= FALSE;

    return retval;
}

void 
Trackbar_onPostCreate(NOTXSPROC HWND myhandle, LPPERLWIN32GUI_CREATESTRUCT perlcs) {

    if (perlcs->hTooltip != NULL) 
        SendMessage(myhandle, TBM_SETTOOLTIPS, (WPARAM) perlcs->hTooltip, 0);
}

BOOL
Trackbar_onParseEvent(NOTXSPROC char *name, int* eventID) {

    BOOL retval = TRUE;

         if Parse_Event("Scroll",     PERLWIN32GUI_NEM_CONTROL1)
    else retval = FALSE;

    return retval;
}

int
Trackbar_onEvent (NOTXSPROC LPPERLWIN32GUI_USERDATA perlud, UINT uMsg, WPARAM wParam, LPARAM lParam) {

    int PerlResult = 1;

    switch(uMsg) {
    case WM_HSCROLL:
    case WM_VSCROLL:

        /*
         * (@)EVENT:Scroll(SCROLLBAR, OPERATION, POSITION)
         * Sent when one of the window scrollbars is moved. B<SCROLLBAR> identifies
         * which bar was moved, 0 for horizontal and 1 for vertical.
         *
         * B<OPERATION> can be compared against one of the following constants:
         *  SB_LINEUP, SB_LINELEFT, SB_LINEDOWN, SB_LINERIGHT, SB_PAGEUP
         *  SB_PAGELEFT, SB_PAGEDOWN, SB_PAGERIGHT, SB_THUMBPOSITION,
         *  SB_THUMBTRACK, SB_TOP, SB_LEFT, SB_BOTTOM, SB_RIGHT, SB_ENDSCROLL
         *
         * (@)APPLIES_TO:Trackbar
         */
        PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_CONTROL1, "Scroll",
                             PERLWIN32GUI_ARGTYPE_INT, (uMsg == WM_HSCROLL ? 0 : 1),
                             PERLWIN32GUI_ARGTYPE_INT, (int) LOWORD(wParam),
                             PERLWIN32GUI_ARGTYPE_INT, (int) HIWORD(wParam), -1 );
        break;
    }

    return PerlResult;
}

#line 100 "Trackbar.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 244 "Trackbar.c"
#pragma message( "*** PACKAGE Win32::GUI::Trackbar..." )

XS_EUPXS(XS_Win32__GUI__Trackbar_ClearSel); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_ClearSel)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "handle, value=TRUE");
    {
	HWND	handle;
	WPARAM	value;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;

	if (items < 2)
	    value = TRUE;
	else {
	    value = (WPARAM)SvUV(ST(1))
;
	}
#line 105 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_CLEARSEL, value, 0);
#line 277 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_ClearTics); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_ClearTics)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "handle, value=TRUE");
    {
	HWND	handle;
	WPARAM	value;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;

	if (items < 2)
	    value = TRUE;
	else {
	    value = (WPARAM)SvUV(ST(1))
;
	}
#line 118 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_CLEARTICS, value, 0);
#line 315 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetBuddy); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetBuddy)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "handle, value");
    {
	HWND	handle;
	WPARAM	value = (WPARAM)SvUV(ST(1))
;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 134 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_GETBUDDY, value, 0);
#line 347 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetChannelRect); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetChannelRect)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "handle");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	HWND	handle;
#line 147 "Trackbar.xs"
    RECT    myRect;
#line 367 "Trackbar.c"

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 149 "Trackbar.xs"
    SendMessage(handle, TBM_GETCHANNELRECT, 0, (LPARAM) &myRect);
    EXTEND(SP, 4);
    XST_mIV(0, myRect.left);
    XST_mIV(1, myRect.top);
    XST_mIV(2, myRect.right);
    XST_mIV(3, myRect.bottom);
    XSRETURN(4);
#line 386 "Trackbar.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetLineSize); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetLineSize)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "handle");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 165 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_GETLINESIZE, 0, 0);
#line 415 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetNumTics); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetNumTics)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "handle");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 177 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_GETNUMTICS, 0, 0);
#line 445 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetPageSize); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetPageSize)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "handle");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 189 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_GETPAGESIZE, 0, 0);
#line 475 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetPos); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetPos)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "handle");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 201 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_GETPOS, 0, 0);
#line 505 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetPics); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetPics)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "handle");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	HWND	handle;
#line 213 "Trackbar.xs"
    UINT nTics;
    DWORD *pTics;
#line 526 "Trackbar.c"

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 216 "Trackbar.xs"
    nTics = (UINT) SendMessage(handle, TBM_GETNUMTICS, 0, 0);
    nTics -= 2;  // Remove first and last
    if (nTics > 0) {
        pTics = (DWORD *) SendMessage(handle, TBM_GETPTICS, 0, 0);
        if (pTics) {
            EXTEND(SP, nTics);
            for (UINT i = 0; i < nTics; i++) 
                XST_mIV(i, pTics[i]);
            XSRETURN(nTics);
        }
        else
            XSRETURN_UNDEF;
    }
    else
        XSRETURN_UNDEF;
#line 553 "Trackbar.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetRangeMax); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetRangeMax)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "handle");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 240 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_GETRANGEMAX, 0, 0);
#line 582 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetRangeMin); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetRangeMin)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "handle");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 252 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_GETRANGEMIN, 0, 0);
#line 612 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetSelEnd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetSelEnd)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "handle");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 264 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_GETSELEND, 0, 0);
#line 642 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetSelStart); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetSelStart)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "handle");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 276 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_GETSELSTART, 0, 0);
#line 672 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetThumbLength); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetThumbLength)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "handle");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 288 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_GETTHUMBLENGTH, 0, 0);
#line 702 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetThumbRect); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetThumbRect)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "handle");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	HWND	handle;
#line 300 "Trackbar.xs"
    RECT    myRect;
#line 722 "Trackbar.c"

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 302 "Trackbar.xs"
    SendMessage(handle, TBM_GETTHUMBRECT, 0, (LPARAM) &myRect);
    EXTEND(SP, 4);
    XST_mIV(0, myRect.left);
    XST_mIV(1, myRect.top);
    XST_mIV(2, myRect.right);
    XST_mIV(3, myRect.bottom);
    XSRETURN(4);
#line 741 "Trackbar.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetTic); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetTic)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "handle, value");
    {
	HWND	handle;
	WPARAM	value = (WPARAM)SvUV(ST(1))
;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 319 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_GETTIC, value, 0);
#line 772 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetTicPos); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetTicPos)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "handle, value");
    {
	HWND	handle;
	WPARAM	value = (WPARAM)SvUV(ST(1))
;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 332 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_GETTICPOS, value, 0);
#line 804 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetToolTips); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetToolTips)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "handle");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 344 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_GETTOOLTIPS, 0, 0);
#line 834 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_GetUnicodeFormat); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_GetUnicodeFormat)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "handle");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 356 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_GETUNICODEFORMAT, 0, 0);
#line 864 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetBuddy); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetBuddy)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "handle, value, param");
    {
	HWND	handle;
	WPARAM	value = (WPARAM)SvUV(ST(1))
;
	HWND	param;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;

    if(SvROK(ST(2))) {
        SV** out=hv_fetch((HV*)SvRV(ST(2)), "-handle", 7, 0);
        if(out != NULL)
            param = INT2PTR(HWND,SvIV(*out));
        else
            param = NULL;
    } else
       param = INT2PTR(HWND,SvIV(ST(2)))
;
#line 373 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETBUDDY, value, (LPARAM) param);
#line 907 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetLineSize); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetLineSize)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "handle, param=1");
    {
	HWND	handle;
	WPARAM	param;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;

	if (items < 2)
	    param = 1;
	else {
	    param = (WPARAM)SvUV(ST(1))
;
	}
#line 386 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETLINESIZE, 0, (LPARAM) param);
#line 945 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetPageSize); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetPageSize)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "handle, param=10");
    {
	HWND	handle;
	WPARAM	param;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;

	if (items < 2)
	    param = 10;
	else {
	    param = (WPARAM)SvUV(ST(1))
;
	}
#line 399 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETPAGESIZE, 0, (LPARAM) param);
#line 983 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetPos); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetPos)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "handle, param, value=TRUE");
    {
	HWND	handle;
	WPARAM	param = (WPARAM)SvUV(ST(1))
;
	WPARAM	value;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;

	if (items < 3)
	    value = TRUE;
	else {
	    value = (WPARAM)SvUV(ST(2))
;
	}
#line 413 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETPOS, value, (LPARAM) param);
#line 1023 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetRange); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetRange)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 4)
       croak_xs_usage(cv,  "handle, min=0, max=min, value=TRUE");
    {
	HWND	handle;
	UINT	min;
	UINT	max;
	WPARAM	value;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;

	if (items < 2)
	    min = 0;
	else {
	    min = (UINT)SvUV(ST(1))
;
	}

	if (items < 3)
	    max = min;
	else {
	    max = (UINT)SvUV(ST(2))
;
	}

	if (items < 4)
	    value = TRUE;
	else {
	    value = (WPARAM)SvUV(ST(3))
;
	}
#line 428 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETRANGE, value, (LPARAM) MAKELONG(min,max));
#line 1077 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetRangeMax); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetRangeMax)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "handle, param, value=TRUE");
    {
	HWND	handle;
	WPARAM	param = (WPARAM)SvUV(ST(1))
;
	WPARAM	value;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;

	if (items < 3)
	    value = TRUE;
	else {
	    value = (WPARAM)SvUV(ST(2))
;
	}
#line 442 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETRANGEMAX, value, (LPARAM) param);
#line 1117 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetRangeMin); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetRangeMin)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "handle, param, value=TRUE");
    {
	HWND	handle;
	WPARAM	param = (WPARAM)SvUV(ST(1))
;
	WPARAM	value;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;

	if (items < 3)
	    value = TRUE;
	else {
	    value = (WPARAM)SvUV(ST(2))
;
	}
#line 456 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETRANGEMIN, value, (LPARAM) param);
#line 1157 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetSel); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetSel)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 4)
       croak_xs_usage(cv,  "handle, min=0, max=min, value=TRUE");
    {
	HWND	handle;
	UINT	min;
	UINT	max;
	WPARAM	value;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;

	if (items < 2)
	    min = 0;
	else {
	    min = (UINT)SvUV(ST(1))
;
	}

	if (items < 3)
	    max = min;
	else {
	    max = (UINT)SvUV(ST(2))
;
	}

	if (items < 4)
	    value = TRUE;
	else {
	    value = (WPARAM)SvUV(ST(3))
;
	}
#line 471 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETSEL, value, (LPARAM) MAKELONG(min,max));
#line 1211 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetSelEnd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetSelEnd)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "handle, param, value=TRUE");
    {
	HWND	handle;
	WPARAM	param = (WPARAM)SvUV(ST(1))
;
	WPARAM	value;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;

	if (items < 3)
	    value = TRUE;
	else {
	    value = (WPARAM)SvUV(ST(2))
;
	}
#line 485 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETSELEND, value, (LPARAM) param);
#line 1251 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetSelStart); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetSelStart)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "handle, param, value=TRUE");
    {
	HWND	handle;
	WPARAM	param = (WPARAM)SvUV(ST(1))
;
	WPARAM	value;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;

	if (items < 3)
	    value = TRUE;
	else {
	    value = (WPARAM)SvUV(ST(2))
;
	}
#line 499 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETSELSTART, value, (LPARAM) param);
#line 1291 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetThumbLength); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetThumbLength)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "handle, value");
    {
	HWND	handle;
	WPARAM	value = (WPARAM)SvUV(ST(1))
;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 512 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETTHUMBLENGTH, value, 0);
#line 1323 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetTic); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetTic)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "handle, param");
    {
	HWND	handle;
	WPARAM	param = (WPARAM)SvUV(ST(1))
;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 525 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETTIC, 0, (LPARAM) param);
#line 1355 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetTicFreq); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetTicFreq)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "handle, value");
    {
	HWND	handle;
	WPARAM	value = (WPARAM)SvUV(ST(1))
;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 540 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETTICFREQ, value, 0);
#line 1388 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetTipSide); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetTipSide)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "handle, value");
    {
	HWND	handle;
	WPARAM	value = (WPARAM)SvUV(ST(1))
;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 557 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETTIPSIDE, value, 0);
#line 1420 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetToolTips); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetToolTips)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "handle, value");
    {
	HWND	handle;
	HWND	value;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;

    if(SvROK(ST(1))) {
        SV** out=hv_fetch((HV*)SvRV(ST(1)), "-handle", 7, 0);
        if(out != NULL)
            value = INT2PTR(HWND,SvIV(*out));
        else
            value = NULL;
    } else
       value = INT2PTR(HWND,SvIV(ST(1)))
;
#line 570 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETTOOLTIPS, (WPARAM) value, 0);
#line 1461 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SetUnicodeFormat); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SetUnicodeFormat)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "handle, value");
    {
	HWND	handle;
	BOOL	value = (BOOL)SvIV(ST(1))
;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 583 "Trackbar.xs"
    RETVAL = SendMessage(handle, TBM_SETUNICODEFORMAT, (WPARAM) value, 0);
#line 1493 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_Min); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_Min)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "handle, ...");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 599 "Trackbar.xs"
    if(items > 1) {        
        if(items > 2)
            RETVAL = SendMessage(handle, TBM_SETRANGEMIN, (WPARAM) SvIV(ST(2)), (LPARAM) SvIV(ST(1))); 
        else
            RETVAL = SendMessage(handle, TBM_SETRANGEMIN, 1, (LPARAM) SvIV(ST(1)));
    }
    else
        RETVAL = SendMessage(handle, TBM_GETRANGEMIN, 0, 0);
#line 1530 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_Max); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_Max)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "handle, ...");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 619 "Trackbar.xs"
    if(items > 1) {        
        if(items > 2)
            RETVAL = SendMessage(handle, TBM_SETRANGEMAX, (WPARAM) SvIV(ST(2)), (LPARAM) SvIV(ST(1))); 
        else
            RETVAL = SendMessage(handle, TBM_SETRANGEMAX, 1, (LPARAM) SvIV(ST(1)));
    }
    else
        RETVAL = SendMessage(handle, TBM_GETRANGEMAX, 0, 0);
#line 1567 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_Pos); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_Pos)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "handle, ...");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 638 "Trackbar.xs"
    if(items > 1) {        
        if(items > 2)
            RETVAL = SendMessage(handle, TBM_SETPOS, (WPARAM) SvIV(ST(2)), (LPARAM) SvIV(ST(1))); 
        else
            RETVAL = SendMessage(handle, TBM_SETPOS, 1, (LPARAM) SvIV(ST(1)));
    }
    else
        RETVAL = SendMessage(handle, TBM_GETPOS, 0, 0);
#line 1604 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SelStart); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SelStart)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "handle, ...");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 657 "Trackbar.xs"
    if(items > 1) {        
        if(items > 2)
            RETVAL = SendMessage(handle, TBM_SETSELSTART, (WPARAM) SvIV(ST(2)), (LPARAM) SvIV(ST(1))); 
        else
            RETVAL = SendMessage(handle, TBM_SETSELSTART, 1, (LPARAM) SvIV(ST(1)));
    }
    else
        RETVAL = SendMessage(handle, TBM_GETSELSTART, 0, 0);
#line 1641 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Win32__GUI__Trackbar_SelEnd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Win32__GUI__Trackbar_SelEnd)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "handle, ...");
    {
	HWND	handle;
	LRESULT	RETVAL;
	dXSTARG;

    if(SvROK(ST(0))) {
        SV** out=hv_fetch((HV*)SvRV(ST(0)), "-handle", 7, 0);
        if(out != NULL)
            handle = INT2PTR(HWND,SvIV(*out));
        else
            handle = NULL;
    } else
       handle = INT2PTR(HWND,SvIV(ST(0)))
;
#line 676 "Trackbar.xs"
    if(items > 1) {        
        if(items > 2)
            RETVAL = SendMessage(handle, TBM_SETSELEND, (WPARAM) SvIV(ST(2)), (LPARAM) SvIV(ST(1))); 
        else
            RETVAL = SendMessage(handle, TBM_SETSELEND, 1, (LPARAM) SvIV(ST(1)));
    }
    else
        RETVAL = SendMessage(handle, TBM_GETSELEND, 0, 0);
#line 1678 "Trackbar.c"
	XSprePUSH;
	PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Win32__GUI__Trackbar); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Win32__GUI__Trackbar)
{
#if PERL_VERSION_LE(5, 21, 5)
    dVAR; dXSARGS;
#else
    dVAR; dXSBOOTARGSXSAPIVERCHK;
#endif
#if PERL_VERSION_LE(5, 8, 999) /* PERL_VERSION_LT is 5.33+ */
    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("Win32::GUI::Trackbar::ClearSel", XS_Win32__GUI__Trackbar_ClearSel);
        newXS_deffile("Win32::GUI::Trackbar::ClearTics", XS_Win32__GUI__Trackbar_ClearTics);
        newXS_deffile("Win32::GUI::Trackbar::GetBuddy", XS_Win32__GUI__Trackbar_GetBuddy);
        newXS_deffile("Win32::GUI::Trackbar::GetChannelRect", XS_Win32__GUI__Trackbar_GetChannelRect);
        newXS_deffile("Win32::GUI::Trackbar::GetLineSize", XS_Win32__GUI__Trackbar_GetLineSize);
        newXS_deffile("Win32::GUI::Trackbar::GetNumTics", XS_Win32__GUI__Trackbar_GetNumTics);
        newXS_deffile("Win32::GUI::Trackbar::GetPageSize", XS_Win32__GUI__Trackbar_GetPageSize);
        newXS_deffile("Win32::GUI::Trackbar::GetPos", XS_Win32__GUI__Trackbar_GetPos);
        newXS_deffile("Win32::GUI::Trackbar::GetPics", XS_Win32__GUI__Trackbar_GetPics);
        newXS_deffile("Win32::GUI::Trackbar::GetRangeMax", XS_Win32__GUI__Trackbar_GetRangeMax);
        newXS_deffile("Win32::GUI::Trackbar::GetRangeMin", XS_Win32__GUI__Trackbar_GetRangeMin);
        newXS_deffile("Win32::GUI::Trackbar::GetSelEnd", XS_Win32__GUI__Trackbar_GetSelEnd);
        newXS_deffile("Win32::GUI::Trackbar::GetSelStart", XS_Win32__GUI__Trackbar_GetSelStart);
        newXS_deffile("Win32::GUI::Trackbar::GetThumbLength", XS_Win32__GUI__Trackbar_GetThumbLength);
        newXS_deffile("Win32::GUI::Trackbar::GetThumbRect", XS_Win32__GUI__Trackbar_GetThumbRect);
        newXS_deffile("Win32::GUI::Trackbar::GetTic", XS_Win32__GUI__Trackbar_GetTic);
        newXS_deffile("Win32::GUI::Trackbar::GetTicPos", XS_Win32__GUI__Trackbar_GetTicPos);
        newXS_deffile("Win32::GUI::Trackbar::GetToolTips", XS_Win32__GUI__Trackbar_GetToolTips);
        newXS_deffile("Win32::GUI::Trackbar::GetUnicodeFormat", XS_Win32__GUI__Trackbar_GetUnicodeFormat);
        newXS_deffile("Win32::GUI::Trackbar::SetBuddy", XS_Win32__GUI__Trackbar_SetBuddy);
        newXS_deffile("Win32::GUI::Trackbar::SetLineSize", XS_Win32__GUI__Trackbar_SetLineSize);
        newXS_deffile("Win32::GUI::Trackbar::SetPageSize", XS_Win32__GUI__Trackbar_SetPageSize);
        newXS_deffile("Win32::GUI::Trackbar::SetPos", XS_Win32__GUI__Trackbar_SetPos);
        newXS_deffile("Win32::GUI::Trackbar::SetRange", XS_Win32__GUI__Trackbar_SetRange);
        newXS_deffile("Win32::GUI::Trackbar::SetRangeMax", XS_Win32__GUI__Trackbar_SetRangeMax);
        newXS_deffile("Win32::GUI::Trackbar::SetRangeMin", XS_Win32__GUI__Trackbar_SetRangeMin);
        newXS_deffile("Win32::GUI::Trackbar::SetSel", XS_Win32__GUI__Trackbar_SetSel);
        newXS_deffile("Win32::GUI::Trackbar::SetSelEnd", XS_Win32__GUI__Trackbar_SetSelEnd);
        newXS_deffile("Win32::GUI::Trackbar::SetSelStart", XS_Win32__GUI__Trackbar_SetSelStart);
        newXS_deffile("Win32::GUI::Trackbar::SetThumbLength", XS_Win32__GUI__Trackbar_SetThumbLength);
        newXS_deffile("Win32::GUI::Trackbar::SetTic", XS_Win32__GUI__Trackbar_SetTic);
        cv = newXS_deffile("Win32::GUI::Trackbar::SetTicFreq", XS_Win32__GUI__Trackbar_SetTicFreq);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Win32::GUI::Trackbar::TicFrequency", XS_Win32__GUI__Trackbar_SetTicFreq);
        XSANY.any_i32 = 1;
        newXS_deffile("Win32::GUI::Trackbar::SetTipSide", XS_Win32__GUI__Trackbar_SetTipSide);
        newXS_deffile("Win32::GUI::Trackbar::SetToolTips", XS_Win32__GUI__Trackbar_SetToolTips);
        newXS_deffile("Win32::GUI::Trackbar::SetUnicodeFormat", XS_Win32__GUI__Trackbar_SetUnicodeFormat);
        newXS_deffile("Win32::GUI::Trackbar::Min", XS_Win32__GUI__Trackbar_Min);
        newXS_deffile("Win32::GUI::Trackbar::Max", XS_Win32__GUI__Trackbar_Max);
        newXS_deffile("Win32::GUI::Trackbar::Pos", XS_Win32__GUI__Trackbar_Pos);
        newXS_deffile("Win32::GUI::Trackbar::SelStart", XS_Win32__GUI__Trackbar_SelStart);
        newXS_deffile("Win32::GUI::Trackbar::SelEnd", XS_Win32__GUI__Trackbar_SelEnd);
#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
}

