/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */


#include	"Webcam_decl.h"
#include	"Webcam.h"
#include	"script_squirrel/cobject/vector_decl.h"
_IMPL_NATIVE_CONSTRUCTION(WebcamScriptBinding, Webcam);

//------------------------------------------------------------------------------
_MEMBER_FUNCTION_IMPL(WebcamScriptBinding, constructor)
return construct_WebcamScriptBinding(v, new Webcam);
_END_IMPL

_MEMBER_FUNCTION_IMPL(WebcamScriptBinding, Open)
_GetSelf(Webcam, WebcamScriptBinding);
return self->Open(sa.GetInt(2), sa.GetInt(3));
_END_IMPL

_MEMBER_FUNCTION_IMPL(WebcamScriptBinding, Close)
_GetSelf(Webcam, WebcamScriptBinding);
self->Close();
return 0;
_END_IMPL

_MEMBER_FUNCTION_IMPL(WebcamScriptBinding, IsThreadRunning)
_GetSelf(Webcam, WebcamScriptBinding);
return self->IsThreadRunning();
_END_IMPL

_MEMBER_FUNCTION_IMPL(WebcamScriptBinding, Reset)
_GetSelf(Webcam, WebcamScriptBinding);
self->Reset(sa.GetBool(2));
return 0;
_END_IMPL

_MEMBER_FUNCTION_IMPL(WebcamScriptBinding, RecordFrame)
_GetSelf(Webcam, WebcamScriptBinding);
self->RecordFrame(sa.GetFloat(2));
return 0;
_END_IMPL

_MEMBER_FUNCTION_IMPL(WebcamScriptBinding, setPause)
_GetSelf(Webcam, WebcamScriptBinding);
self->setPause(sa.GetBool(2));
return 0;
_END_IMPL

//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
/*#
Topic: WebcamScriptBinding
Type: WebcamScriptBinding
#*/

/*#
Section: WebcamScriptBindingGeneric
Desc: Generic
#*/
_BEGIN_CLASS(WebcamScriptBinding)

_MEMBER_FUNCTION(WebcamScriptBinding, constructor, 1, _SC("."))

/*#
Func: OpenWebcam
Proto: bool:Webcam
Desc: open the Webcam
#*/
_MEMBER_FUNCTION(WebcamScriptBinding, Open, -1, _SC(".ii"))

/*#
Func: CloseWebcam
Proto: void:Webcam
Desc: close the Webcam
#*/
_MEMBER_FUNCTION(WebcamScriptBinding, Close, -1, _SC("."))

_MEMBER_FUNCTION(WebcamScriptBinding, IsThreadRunning, -1, _SC("."))


/*#
Func: Reset
Proto: void:Webcam
Desc: Reset the Webcam
#*/
_MEMBER_FUNCTION(WebcamScriptBinding, Reset, -1, _SC(".b"))


_MEMBER_FUNCTION(WebcamScriptBinding, RecordFrame, -1, _SC(".f"))

/*#
Func: setPause
Proto: void:Webcam
Desc: setPause
#*/
_MEMBER_FUNCTION(WebcamScriptBinding, setPause, -1, _SC(".b"))

_END_CLASS(WebcamScriptBinding)
//------------------------------------------------------------------------------
