当前位置: 首页>>代码示例>>C++>>正文


C++ wxlua_getnumbertype函数代码示例

本文整理汇总了C++中wxlua_getnumbertype函数的典型用法代码示例。如果您正苦于以下问题:C++ wxlua_getnumbertype函数的具体用法?C++ wxlua_getnumbertype怎么用?C++ wxlua_getnumbertype使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了wxlua_getnumbertype函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: wxLua_romloader_call

// %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;
}
开发者ID:muhkuh-sys,项目名称:muhkuh_old,代码行数:32,代码来源:romloader_openocd_lua.cpp

示例2: wxLua_wxMediaCtrl_Create

//     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;
}
开发者ID:Abyss116,项目名称:luaplus51-all,代码行数:32,代码来源:wxmedia_bind.cpp

示例3: wxLua_wxMediaCtrl_constructor1

// 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;
}
开发者ID:Abyss116,项目名称:luaplus51-all,代码行数:33,代码来源:wxmedia_bind.cpp

示例4: wxLua_wxlCanObj_SetPos

//    	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;
}
开发者ID:brkpt,项目名称:luaplus51-all,代码行数:14,代码来源:wxluacan_bind.cpp

示例5: wxLua_function_iswxluatype

// %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;
}
开发者ID:ClowReed32,项目名称:Cthugha-Engine-Demos,代码行数:14,代码来源:wxlua_bind.cpp

示例6: wxLua_romloader_write_data32

//  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;
}
开发者ID:muhkuh-sys,项目名称:muhkuh_old,代码行数:14,代码来源:romloader_openocd_lua.cpp

示例7: wxLua_wxlCanObjAddScript_constructor

//     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;
}
开发者ID:brkpt,项目名称:luaplus51-all,代码行数:16,代码来源:wxluacan_bind.cpp

示例8: wxLua_function_wxLUA_CHECK_VERSION

// %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;
}
开发者ID:ClowReed32,项目名称:Cthugha-Engine-Demos,代码行数:16,代码来源:wxlua_bind.cpp

示例9: wxLua_wxlCanObj_constructor

//     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;
}
开发者ID:brkpt,项目名称:luaplus51-all,代码行数:16,代码来源:wxluacan_bind.cpp

示例10: wxLua_wxlCanObjCircle_constructor

//     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;
}
开发者ID:brkpt,项目名称:luaplus51-all,代码行数:16,代码来源:wxluacan_bind.cpp

示例11: wxLua_wxlLuaCanCmd_MoveObject

//     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;
}
开发者ID:brkpt,项目名称:luaplus51-all,代码行数:16,代码来源:wxluacan_bind.cpp

示例12: wxLua_wxlCanObjRect_constructor

//     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;
}
开发者ID:brkpt,项目名称:luaplus51-all,代码行数:18,代码来源:wxluacan_bind.cpp

示例13: wxLua_wxProcess_Kill

//     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;
}
开发者ID:Abyss116,项目名称:luaplus51-all,代码行数:18,代码来源:wxcore_defsutils.cpp

示例14: wxLua_wxMediaEvent_constructor

//     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;
}
开发者ID:Abyss116,项目名称:luaplus51-all,代码行数:18,代码来源:wxmedia_bind.cpp

示例15: wxLua_romloader_write_image

// %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;
}
开发者ID:muhkuh-sys,项目名称:muhkuh_old,代码行数:45,代码来源:romloader_openocd_lua.cpp


注:本文中的wxlua_getnumbertype函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。