// %override wxLua_romloader_call
static int LUACALL wxLua_romloader_call(lua_State *L)
{
    int iLuaCallbackTag;
    // voidptr_long vplCallbackUserData
    long vplCallbackUserData = (long)wxlua_getnumbertype(L, 5);
    // LuaFunction fnCallback
    if( lua_isfunction(L, 4) )
    {
        // push function to top of stack
        lua_pushvalue(L, 4);
        // ref function and pop it from stack
        iLuaCallbackTag = luaL_ref(L, LUA_REGISTRYINDEX);
    }
    else
    {
        wxlua_argerror(L, 4, wxT("a 'function'"));
    }
    // unsigned long ulParameterR0
    double dParameterR0 = wxlua_getnumbertype(L, 3);
    // unsigned long ulNetxAddress
    double dNetxAddress = wxlua_getnumbertype(L, 2);
    // get this
    romloader * self = (romloader *)wxluaT_getuserdatatype(L, 1, wxluatype_romloader);
    // call call
    self->call(dNetxAddress, dParameterR0, L, iLuaCallbackTag, (void*)vplCallbackUserData);

    // remove ref to function
    luaL_unref(L, LUA_REGISTRYINDEX, iLuaCallbackTag);

    return 0;
}
//     bool Create( wxWindow* parent, wxWindowID winid, const wxString& fileName = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& szBackend = "", const wxValidator& val = wxDefaultValidator, const wxString& name = "wxMediaCtrl"  )
static int LUACALL wxLua_wxMediaCtrl_Create(lua_State *L)
{
    // get number of arguments
    int argCount = lua_gettop(L);
    // const wxString name = "wxMediaCtrl"
    const wxString name = (argCount >= 10 ? wxlua_getwxStringtype(L, 10) : wxString(wxT("wxMediaCtrl")));
    // const wxValidator val = wxDefaultValidator
    const wxValidator * val = (argCount >= 9 ? (const wxValidator *)wxluaT_getuserdatatype(L, 9, wxluatype_wxValidator) : &wxDefaultValidator);
    // const wxString szBackend = ""
    const wxString szBackend = (argCount >= 8 ? wxlua_getwxStringtype(L, 8) : wxString(wxEmptyString));
    // long style = 0
    long style = (argCount >= 7 ? (long)wxlua_getnumbertype(L, 7) : 0);
    // const wxSize size = wxDefaultSize
    const wxSize * size = (argCount >= 6 ? (const wxSize *)wxluaT_getuserdatatype(L, 6, wxluatype_wxSize) : &wxDefaultSize);
    // const wxPoint pos = wxDefaultPosition
    const wxPoint * pos = (argCount >= 5 ? (const wxPoint *)wxluaT_getuserdatatype(L, 5, wxluatype_wxPoint) : &wxDefaultPosition);
    // const wxString fileName = ""
    const wxString fileName = (argCount >= 4 ? wxlua_getwxStringtype(L, 4) : wxString(wxEmptyString));
    // wxWindowID winid
    wxWindowID winid = (wxWindowID)wxlua_getnumbertype(L, 3);
    // wxWindow parent
    wxWindow * parent = (wxWindow *)wxluaT_getuserdatatype(L, 2, wxluatype_wxWindow);
    // get this
    wxMediaCtrl * self = (wxMediaCtrl *)wxluaT_getuserdatatype(L, 1, wxluatype_wxMediaCtrl);
    // call Create
    bool returns = (self->Create(parent, winid, fileName, *pos, *size, style, szBackend, *val, name));
    // push the result flag
    lua_pushboolean(L, returns);

    return 1;
}
// static wxLuaBindCFunc s_wxluafunc_wxLua_wxMediaCtrl_constructor1[1] = {{ wxLua_wxMediaCtrl_constructor1, WXLUAMETHOD_CONSTRUCTOR, 2, 9, s_wxluatypeArray_wxLua_wxMediaCtrl_constructor1 }};
//     wxMediaCtrl( wxWindow* parent, wxWindowID winid, const wxString& fileName = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& szBackend = "", const wxValidator& val = wxDefaultValidator, const wxString& name = "wxMediaCtrl" )
static int LUACALL wxLua_wxMediaCtrl_constructor1(lua_State *L)
{
    // get number of arguments
    int argCount = lua_gettop(L);
    // const wxString name = "wxMediaCtrl"
    const wxString name = (argCount >= 9 ? wxlua_getwxStringtype(L, 9) : wxString(wxT("wxMediaCtrl")));
    // const wxValidator val = wxDefaultValidator
    const wxValidator * val = (argCount >= 8 ? (const wxValidator *)wxluaT_getuserdatatype(L, 8, wxluatype_wxValidator) : &wxDefaultValidator);
    // const wxString szBackend = ""
    const wxString szBackend = (argCount >= 7 ? wxlua_getwxStringtype(L, 7) : wxString(wxEmptyString));
    // long style = 0
    long style = (argCount >= 6 ? (long)wxlua_getnumbertype(L, 6) : 0);
    // const wxSize size = wxDefaultSize
    const wxSize * size = (argCount >= 5 ? (const wxSize *)wxluaT_getuserdatatype(L, 5, wxluatype_wxSize) : &wxDefaultSize);
    // const wxPoint pos = wxDefaultPosition
    const wxPoint * pos = (argCount >= 4 ? (const wxPoint *)wxluaT_getuserdatatype(L, 4, wxluatype_wxPoint) : &wxDefaultPosition);
    // const wxString fileName = ""
    const wxString fileName = (argCount >= 3 ? wxlua_getwxStringtype(L, 3) : wxString(wxEmptyString));
    // wxWindowID winid
    wxWindowID winid = (wxWindowID)wxlua_getnumbertype(L, 2);
    // wxWindow parent
    wxWindow * parent = (wxWindow *)wxluaT_getuserdatatype(L, 1, wxluatype_wxWindow);
    // call constructor
    wxMediaCtrl* returns = new wxMediaCtrl(parent, winid, fileName, *pos, *size, style, szBackend, *val, name);
    // add to tracked window list, it will check validity
    wxluaW_addtrackedwindow(L, returns);
    // push the constructed class pointer
    wxluaT_pushuserdatatype(L, returns, wxluatype_wxMediaCtrl);

    return 1;
}
Beispiel #4
0
//    	void SetPos( double x, double y );
static int LUACALL wxLua_wxlCanObj_SetPos(lua_State *L)
{
    // double y
    double y = (double)wxlua_getnumbertype(L, 3);
    // double x
    double x = (double)wxlua_getnumbertype(L, 2);
    // get this
    wxlCanObj * self = (wxlCanObj *)wxluaT_getuserdatatype(L, 1, wxluatype_wxlCanObj);
    // call SetPos
    self->SetPos(x, y);

    return 0;
}
// %rename iswxluatype %function int wxlua_iswxluatype(int luatype, int wxluaarg_tag)
static int LUACALL wxLua_function_iswxluatype(lua_State *L)
{
    // int wxluaarg_tag
    int wxluaarg_tag = (int)wxlua_getnumbertype(L, 2);
    // int luatype
    int luatype = (int)wxlua_getnumbertype(L, 1);
    // call wxlua_iswxluatype
    int returns = (wxlua_iswxluatype(luatype, wxluaarg_tag));
    // push the result number
    lua_pushnumber(L, returns);

    return 1;
}
//  void write_data32(double dNetxAddress, double dData)
static int LUACALL wxLua_romloader_write_data32(lua_State *L)
{
    // double dData
    double dData = (double)wxlua_getnumbertype(L, 3);
    // double dNetxAddress
    double dNetxAddress = (double)wxlua_getnumbertype(L, 2);
    // get this
    romloader * self = (romloader *)wxluaT_getuserdatatype(L, 1, wxluatype_romloader);
    // call write_data32
    self->write_data32(dNetxAddress, dData);

    return 0;
}
Beispiel #7
0
//     wxlCanObjAddScript( double x, double y,  const wxString& script );
static int LUACALL wxLua_wxlCanObjAddScript_constructor(lua_State *L)
{
    // const wxString script
    const wxString script = wxlua_getwxStringtype(L, 3);
    // double y
    double y = (double)wxlua_getnumbertype(L, 2);
    // double x
    double x = (double)wxlua_getnumbertype(L, 1);
    // call constructor
    wxlCanObjAddScript* returns = new wxlCanObjAddScript(x, y, script);
    // push the constructed class pointer
    wxluaT_pushuserdatatype(L, returns, wxluatype_wxlCanObjAddScript);

    return 1;
}
// %function bool wxLUA_CHECK_VERSION(int major, int minor, int release) // actually a define
static int LUACALL wxLua_function_wxLUA_CHECK_VERSION(lua_State *L)
{
    // int release
    int release = (int)wxlua_getnumbertype(L, 3);
    // int minor
    int minor = (int)wxlua_getnumbertype(L, 2);
    // int major
    int major = (int)wxlua_getnumbertype(L, 1);
    // call wxLUA_CHECK_VERSION
    bool returns = (wxLUA_CHECK_VERSION(major, minor, release));
    // push the result flag
    lua_pushboolean(L, returns);

    return 1;
}
Beispiel #9
0
//     wxlCanObj( double x = 0, double y = 0 );
static int LUACALL wxLua_wxlCanObj_constructor(lua_State *L)
{
    // get number of arguments
    int argCount = lua_gettop(L);
    // double y = 0
    double y = (argCount >= 2 ? (double)wxlua_getnumbertype(L, 2) : 0);
    // double x = 0
    double x = (argCount >= 1 ? (double)wxlua_getnumbertype(L, 1) : 0);
    // call constructor
    wxlCanObj* returns = new wxlCanObj(x, y);
    // push the constructed class pointer
    wxluaT_pushuserdatatype(L, returns, wxluatype_wxlCanObj);

    return 1;
}
Beispiel #10
0
//     wxlCanObjCircle( double x, double y, double r );
static int LUACALL wxLua_wxlCanObjCircle_constructor(lua_State *L)
{
    // double r
    double r = (double)wxlua_getnumbertype(L, 3);
    // double y
    double y = (double)wxlua_getnumbertype(L, 2);
    // double x
    double x = (double)wxlua_getnumbertype(L, 1);
    // call constructor
    wxlCanObjCircle* returns = new wxlCanObjCircle(x, y, r);
    // push the constructed class pointer
    wxluaT_pushuserdatatype(L, returns, wxluatype_wxlCanObjCircle);

    return 1;
}
Beispiel #11
0
//     void MoveObject( int index, double x, double y );
static int LUACALL wxLua_wxlLuaCanCmd_MoveObject(lua_State *L)
{
    // double y
    double y = (double)wxlua_getnumbertype(L, 4);
    // double x
    double x = (double)wxlua_getnumbertype(L, 3);
    // int index
    int index = (int)wxlua_getnumbertype(L, 2);
    // get this
    wxlLuaCanCmd * self = (wxlLuaCanCmd *)wxluaT_getuserdatatype(L, 1, wxluatype_wxlLuaCanCmd);
    // call MoveObject
    self->MoveObject(index, x, y);

    return 0;
}
Beispiel #12
0
//     wxlCanObjRect(  double x, double y, double w, double h );
static int LUACALL wxLua_wxlCanObjRect_constructor(lua_State *L)
{
    // double h
    double h = (double)wxlua_getnumbertype(L, 4);
    // double w
    double w = (double)wxlua_getnumbertype(L, 3);
    // double y
    double y = (double)wxlua_getnumbertype(L, 2);
    // double x
    double x = (double)wxlua_getnumbertype(L, 1);
    // call constructor
    wxlCanObjRect* returns = new wxlCanObjRect(x, y, w, h);
    // push the constructed class pointer
    wxluaT_pushuserdatatype(L, returns, wxluatype_wxlCanObjRect);

    return 1;
}
//     static wxKillError Kill(int pid, wxSignal sig = wxSIGTERM, int flags = wxKILL_NOCHILDREN)
static int LUACALL wxLua_wxProcess_Kill(lua_State *L)
{
    // get number of arguments
    int argCount = lua_gettop(L);
    // int flags = wxKILL_NOCHILDREN
    int flags = (argCount >= 3 ? (int)wxlua_getnumbertype(L, 3) : wxKILL_NOCHILDREN);
    // wxSignal sig = wxSIGTERM
    wxSignal sig = (argCount >= 2 ? (wxSignal)wxlua_getenumtype(L, 2) : wxSIGTERM);
    // int pid
    int pid = (int)wxlua_getnumbertype(L, 1);
    // call Kill
    wxKillError returns = (wxProcess::Kill(pid, sig, flags));
    // push the result number
    lua_pushnumber(L, returns);

    return 1;
}
Beispiel #14
0
//     wxMediaEvent(wxEventType commandType = wxEVT_NULL, int winid = 0)
static int LUACALL wxLua_wxMediaEvent_constructor(lua_State *L)
{
    // get number of arguments
    int argCount = lua_gettop(L);
    // int winid = 0
    int winid = (argCount >= 2 ? (int)wxlua_getnumbertype(L, 2) : 0);
    // wxEventType commandType = wxEVT_NULL
    wxEventType commandType = (argCount >= 1 ? (wxEventType)wxlua_getnumbertype(L, 1) : wxEVT_NULL);
    // call constructor
    wxMediaEvent* returns = new wxMediaEvent(commandType, winid);
    // add to tracked memory list
    wxluaO_addgcobject(L, returns, wxluatype_wxMediaEvent);
    // push the constructed class pointer
    wxluaT_pushuserdatatype(L, returns, wxluatype_wxMediaEvent);

    return 1;
}
// %override wxLua_romloader_write_image
static int LUACALL wxLua_romloader_write_image(lua_State *L)
{
    int iLuaCallbackTag;
    wxLuaState wxlState(L);
    // voidptr_long vplCallbackUserData
    long vplCallbackUserData = (long)wxlua_getnumbertype(L, 5);
    // LuaFunction fnCallback
    if( lua_isfunction(L, 4) )
    {
        // push function to top of stack
        lua_pushvalue(L, 4);
        // ref function and pop it from stack
        iLuaCallbackTag = luaL_ref(L, LUA_REGISTRYINDEX);
    }
    else
    {
        // no callback function provided
        wxlua_argerror(L, 4, wxT("a 'function'"));
    }
    // wxString strData
    wxString strData;
    size_t sizLen;
    const char *pcBuf;
    pcBuf = lua_tolstring(L, 3, &sizLen);
    if( sizLen==0 )
    {
        strData = wxEmptyString;
    }
    else
    {
        strData = wxString::From8BitData(pcBuf, sizLen);
    }
    // unsigned long ulNetxAddress
    double dNetxAddress = wxlua_getnumbertype(L, 2);
    // get this
    romloader * self = (romloader *)wxluaT_getuserdatatype(L, 1, wxluatype_romloader);
    // call write_image
    self->write_image(dNetxAddress, strData, L, iLuaCallbackTag, (void*)vplCallbackUserData);

    // remove ref to function
    luaL_unref(L, LUA_REGISTRYINDEX, iLuaCallbackTag);

    return 0;
}
Beispiel #16
0
//     int CompareVersion(int major, int minor, int release, int revision) const;
static int LUACALL wxLua_wxXmlResource_CompareVersion(lua_State *L)
{
    // int revision
    int revision = (int)wxlua_getnumbertype(L, 5);
    // int release
    int release = (int)wxlua_getnumbertype(L, 4);
    // int minor
    int minor = (int)wxlua_getnumbertype(L, 3);
    // int major
    int major = (int)wxlua_getnumbertype(L, 2);
    // get this
    wxXmlResource * self = (wxXmlResource *)wxluaT_getuserdatatype(L, 1, wxluatype_wxXmlResource);
    // call CompareVersion
    int returns = (self->CompareVersion(major, minor, release, revision));
    // push the result number
    lua_pushnumber(L, returns);

    return 1;
}
// %override wxLua_function_typename
// %function wxString typename(int wxluaarg_tag)
static int LUACALL wxLua_function_typename(lua_State *L)
{
    // int wxluaarg_tag
    int wxl_type = (int)wxlua_getnumbertype(L, 1);
    // call wxlua_getwxluatypename
    wxString returns = wxluaT_typename(L, wxl_type);
    // push the result string
    wxlua_pushwxString(L, returns);

    return 1;
}
Beispiel #18
0
//     void SetStyle(long style );
static int LUACALL wxLua_wxTextValidator_SetStyle(lua_State *L)
{
    // long style
    long style = (long)wxlua_getnumbertype(L, 2);
    // get this
    wxTextValidator * self = (wxTextValidator *)wxluaT_getuserdatatype(L, 1, wxluatype_wxTextValidator);
    // call SetStyle
    self->SetStyle(style);

    return 0;
}
//     static bool Exists(int pid)
static int LUACALL wxLua_wxProcess_Exists(lua_State *L)
{
    // int pid
    int pid = (int)wxlua_getnumbertype(L, 1);
    // call Exists
    bool returns = (wxProcess::Exists(pid));
    // push the result flag
    lua_pushboolean(L, returns);

    return 1;
}
//     void        SetY(wxCoord y)
static int LUACALL wxLua_wxMouseState_SetY(lua_State *L)
{
    // wxCoord y
    wxCoord y = (wxCoord)wxlua_getnumbertype(L, 2);
    // get this
    wxMouseState * self = (wxMouseState *)wxluaT_getuserdatatype(L, 1, wxluatype_wxMouseState);
    // call SetY
    self->SetY(y);

    return 0;
}
Beispiel #21
0
//     void SetFlags(int flags);
static int LUACALL wxLua_wxXmlResource_SetFlags(lua_State *L)
{
    // int flags
    int flags = (int)wxlua_getnumbertype(L, 2);
    // get this
    wxXmlResource * self = (wxXmlResource *)wxluaT_getuserdatatype(L, 1, wxluatype_wxXmlResource);
    // call SetFlags
    self->SetFlags(flags);

    return 0;
}
Beispiel #22
0
//     void SetUmask(int mode)
static int LUACALL wxLua_wxFileConfig_SetUmask(lua_State *L)
{
    // int mode
    int mode = (int)wxlua_getnumbertype(L, 2);
    // get this
    wxFileConfig * self = (wxFileConfig *)wxluaT_getuserdatatype(L, 1, wxluatype_wxFileConfig);
    // call SetUmask
    self->SetUmask(mode);

    return 0;
}
// %function %gc dpm *dpm_netx5_create(voidptr_long pvHandle)
static int LUACALL wxLua_function_dpm_netx5_create(lua_State *L)
{
    // voidptr_long pvHandle
    long pvHandle = (long)wxlua_getnumbertype(L, 1);
    // call dpm_netx5_create
    dpm* returns = (dpm*)dpm_netx5_create((void*)pvHandle);
    if (!wxluaO_isgcobject(L, returns)) wxluaO_addgcobject(L, returns);
    // push the result datatype
    wxluaT_pushuserdatatype(L, returns, wxluatype_dpm);

    return 1;
}
// %function %gc romloader *romloader_openocd_create(voidptr_long pvHandle)
static int LUACALL wxLua_function_romloader_openocd_create(lua_State *L)
{
    // voidptr_long pvHandle
    long pvHandle = (long)wxlua_getnumbertype(L, 1);
    // call romloader_openocd_create
    romloader* returns = (romloader*)romloader_openocd_create((void*)pvHandle);
    if (!wxluaO_isgcobject(L, returns)) wxluaO_addgcobject(L, returns);
    // push the result datatype
    wxluaT_pushuserdatatype(L, returns, wxluatype_romloader);

    return 1;
}
//  double read_data32(double dNetxAddress)
static int LUACALL wxLua_romloader_read_data32(lua_State *L)
{
    // double dNetxAddress
    double dNetxAddress = (double)wxlua_getnumbertype(L, 2);
    // get this
    romloader * self = (romloader *)wxluaT_getuserdatatype(L, 1, wxluatype_romloader);
    // call read_data32
    double returns = (self->read_data32(dNetxAddress));
    // push the result number
    lua_pushnumber(L, returns);

    return 1;
}
Beispiel #26
0
//     bool SetVolume(double dVolume)
static int LUACALL wxLua_wxMediaCtrl_SetVolume(lua_State *L)
{
    // double dVolume
    double dVolume = (double)wxlua_getnumbertype(L, 2);
    // get this
    wxMediaCtrl * self = (wxMediaCtrl *)wxluaT_getuserdatatype(L, 1, wxluatype_wxMediaCtrl);
    // call SetVolume
    bool returns = (self->SetVolume(dVolume));
    // push the result flag
    lua_pushboolean(L, returns);

    return 1;
}
// %override wxLua_romloader_read_image
static int LUACALL wxLua_romloader_read_image(lua_State *L)
{
    int iLuaCallbackTag;
    wxLuaState wxlState(L);
    wxString returns;
    // voidptr_long vplCallbackUserData
    long vplCallbackUserData = (long)wxlua_getnumbertype(L, 5);
    // LuaFunction fnCallback
    if( lua_isfunction(L, 4) )
    {
        // push function to top of stack
        lua_pushvalue(L, 4);
        // ref function and pop it from stack
        iLuaCallbackTag = luaL_ref(L, LUA_REGISTRYINDEX);
    }
    else
    {
        // no callback function provided
        wxlua_argerror(L, 4, wxT("a 'function'"));
    }
    // unsigned long ulSize
    double dSize = wxlua_getnumbertype(L, 3);
    // unsigned long ulNetxAddress
    double dNetxAddress = wxlua_getnumbertype(L, 2);
    // get this
    romloader * self = (romloader *)wxluaT_getuserdatatype(L, 1, wxluatype_romloader);
    // call read_image
    returns = (self->read_image(dNetxAddress, dSize, L, iLuaCallbackTag, (void*)vplCallbackUserData));

    // remove ref to function
    luaL_unref(L, LUA_REGISTRYINDEX, iLuaCallbackTag);

    // push the result string
    wxlState.lua_PushLString(returns.fn_str(),returns.Len());

    return 1;
}
Beispiel #28
0
// static wxLuaBindCFunc s_wxluafunc_wxLua_wxConfigBase_Write1[1] = {{ wxLua_wxConfigBase_Write1, WXLUAMETHOD_METHOD, 3, 3, s_wxluatypeArray_wxLua_wxConfigBase_Write1 }};
//     bool Write(const wxString &key, double value );
static int LUACALL wxLua_wxConfigBase_Write1(lua_State *L)
{
    // double value
    double value = (double)wxlua_getnumbertype(L, 3);
    // const wxString key
    const wxString key = wxlua_getwxStringtype(L, 2);
    // get this
    wxConfigBase * self = (wxConfigBase *)wxluaT_getuserdatatype(L, 1, wxluatype_wxConfigBase);
    // call Write
    bool returns = (self->Write(key, value));
    // push the result flag
    lua_pushboolean(L, returns);

    return 1;
}
//     void     SetOwner(wxEvtHandler *owner, int id = -1)
static int LUACALL wxLua_wxTimer_SetOwner(lua_State *L)
{
    // get number of arguments
    int argCount = lua_gettop(L);
    // int id = -1
    int id = (argCount >= 3 ? (int)wxlua_getnumbertype(L, 3) : -1);
    // wxEvtHandler owner
    wxEvtHandler * owner = (wxEvtHandler *)wxluaT_getuserdatatype(L, 2, wxluatype_wxEvtHandler);
    // get this
    wxTimer * self = (wxTimer *)wxluaT_getuserdatatype(L, 1, wxluatype_wxTimer);
    // call SetOwner
    self->SetOwner(owner, id);

    return 0;
}
//     static wxProcess *Open(const wxString& cmd, int flags = wxEXEC_ASYNC)
static int LUACALL wxLua_wxProcess_Open(lua_State *L)
{
    // get number of arguments
    int argCount = lua_gettop(L);
    // int flags = wxEXEC_ASYNC
    int flags = (argCount >= 2 ? (int)wxlua_getnumbertype(L, 2) : wxEXEC_ASYNC);
    // const wxString cmd
    const wxString cmd = wxlua_getwxStringtype(L, 1);
    // call Open
    wxProcess* returns = (wxProcess*)wxProcess::Open(cmd, flags);
    // push the result datatype
    wxluaT_pushuserdatatype(L, returns, wxluatype_wxProcess);

    return 1;
}