mirror of https://github.com/axmolengine/axmol.git
[AUTO]: updating luabinding automatically
This commit is contained in:
parent
c9acea05ab
commit
963c02eb3d
|
@ -0,0 +1,31 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module Device
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- To enable or disable accelerometer.
|
||||
-- @function [parent=#Device] setAccelerometerEnabled
|
||||
-- @param self
|
||||
-- @param #bool isEnabled
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Device] setKeepScreenOn
|
||||
-- @param self
|
||||
-- @param #bool value
|
||||
|
||||
--------------------------------
|
||||
-- Sets the interval of accelerometer.
|
||||
-- @function [parent=#Device] setAccelerometerInterval
|
||||
-- @param self
|
||||
-- @param #float interval
|
||||
|
||||
--------------------------------
|
||||
-- Gets the DPI of device<br>
|
||||
-- return The DPI of device.
|
||||
-- @function [parent=#Device] getDPI
|
||||
-- @param self
|
||||
-- @return int#int ret (return value: int)
|
||||
|
||||
return nil
|
|
@ -1146,6 +1146,11 @@
|
|||
-- @field [parent=#cc] TextureCache#TextureCache TextureCache preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Device
|
||||
-- @field [parent=#cc] Device#Device Device preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Application
|
||||
-- @field [parent=#cc] Application#Application Application preloaded module
|
||||
|
|
|
@ -58962,6 +58962,156 @@ int lua_register_cocos2dx_TextureCache(lua_State* tolua_S)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_Device_setAccelerometerEnabled(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.Device",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Device:setAccelerometerEnabled");
|
||||
if(!ok)
|
||||
return 0;
|
||||
cocos2d::Device::setAccelerometerEnabled(arg0);
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Device:setAccelerometerEnabled",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Device_setAccelerometerEnabled'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Device_setKeepScreenOn(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.Device",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Device:setKeepScreenOn");
|
||||
if(!ok)
|
||||
return 0;
|
||||
cocos2d::Device::setKeepScreenOn(arg0);
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Device:setKeepScreenOn",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Device_setKeepScreenOn'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Device_setAccelerometerInterval(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.Device",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
double arg0;
|
||||
ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Device:setAccelerometerInterval");
|
||||
if(!ok)
|
||||
return 0;
|
||||
cocos2d::Device::setAccelerometerInterval(arg0);
|
||||
return 0;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Device:setAccelerometerInterval",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Device_setAccelerometerInterval'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Device_getDPI(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.Device",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
return 0;
|
||||
int ret = cocos2d::Device::getDPI();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Device:getDPI",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Device_getDPI'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
static int lua_cocos2dx_Device_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (Device)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_register_cocos2dx_Device(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"cc.Device");
|
||||
tolua_cclass(tolua_S,"Device","cc.Device","",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"Device");
|
||||
tolua_function(tolua_S,"setAccelerometerEnabled", lua_cocos2dx_Device_setAccelerometerEnabled);
|
||||
tolua_function(tolua_S,"setKeepScreenOn", lua_cocos2dx_Device_setKeepScreenOn);
|
||||
tolua_function(tolua_S,"setAccelerometerInterval", lua_cocos2dx_Device_setAccelerometerInterval);
|
||||
tolua_function(tolua_S,"getDPI", lua_cocos2dx_Device_getDPI);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::Device).name();
|
||||
g_luaType[typeName] = "cc.Device";
|
||||
g_typeCast["Device"] = "cc.Device";
|
||||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_Application_openURL(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -65571,6 +65721,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S)
|
|||
lua_register_cocos2dx_TransitionTurnOffTiles(tolua_S);
|
||||
lua_register_cocos2dx_RotateTo(tolua_S);
|
||||
lua_register_cocos2dx_TransitionSplitRows(tolua_S);
|
||||
lua_register_cocos2dx_Device(tolua_S);
|
||||
lua_register_cocos2dx_TransitionProgressRadialCCW(tolua_S);
|
||||
lua_register_cocos2dx_EventListenerFocus(tolua_S);
|
||||
lua_register_cocos2dx_TransitionPageTurn(tolua_S);
|
||||
|
|
|
@ -1570,6 +1570,11 @@ int register_all_cocos2dx(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue