Merge pull request #14404 from CocosRobot/update_lua_bindings_1447728669

[ci skip][AUTO]: updating luabinding & jsbinding automatically
This commit is contained in:
pandamicro 2015-11-17 10:56:58 +08:00
commit c4f9804f5b
9 changed files with 258 additions and 22 deletions

View File

@ -5574,6 +5574,16 @@ float
{
},
/**
* @method setRenderingType
* @param {ccui.Scale9Sprite::RenderingType} arg0
*/
setRenderingType : function (
renderingtype
)
{
},
/**
* @method init
* @param {cc.Sprite|cc.Sprite|cc.Sprite} sprite
@ -5658,6 +5668,16 @@ isScale9Enabled : function (
return false;
},
/**
* @method getRenderingType
* @return {ccui.Scale9Sprite::RenderingType}
*/
getRenderingType : function (
)
{
return 0;
},
/**
* @method getInsetRight
* @return {float}

View File

@ -14793,6 +14793,26 @@ bool js_cocos2dx_ui_Scale9Sprite_setInsetTop(JSContext *cx, uint32_t argc, jsval
JS_ReportError(cx, "js_cocos2dx_ui_Scale9Sprite_setInsetTop : wrong number of arguments: %d, was expecting %d", argc, 1);
return false;
}
bool js_cocos2dx_ui_Scale9Sprite_setRenderingType(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true;
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::ui::Scale9Sprite* cobj = (cocos2d::ui::Scale9Sprite *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Scale9Sprite_setRenderingType : Invalid Native Object");
if (argc == 1) {
cocos2d::ui::Scale9Sprite::RenderingType arg0;
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Scale9Sprite_setRenderingType : Error processing arguments");
cobj->setRenderingType(arg0);
args.rval().setUndefined();
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_Scale9Sprite_setRenderingType : wrong number of arguments: %d, was expecting %d", argc, 1);
return false;
}
bool js_cocos2dx_ui_Scale9Sprite_init(JSContext *cx, uint32_t argc, jsval *vp)
{
bool ok = true;
@ -15036,6 +15056,24 @@ bool js_cocos2dx_ui_Scale9Sprite_isScale9Enabled(JSContext *cx, uint32_t argc, j
JS_ReportError(cx, "js_cocos2dx_ui_Scale9Sprite_isScale9Enabled : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_ui_Scale9Sprite_getRenderingType(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::ui::Scale9Sprite* cobj = (cocos2d::ui::Scale9Sprite *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Scale9Sprite_getRenderingType : Invalid Native Object");
if (argc == 0) {
int ret = (int)cobj->getRenderingType();
jsval jsret = JSVAL_NULL;
jsret = int32_to_jsval(cx, ret);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_Scale9Sprite_getRenderingType : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_ui_Scale9Sprite_getInsetRight(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -15675,6 +15713,7 @@ void js_register_cocos2dx_ui_Scale9Sprite(JSContext *cx, JS::HandleObject global
JS_FN("initWithSpriteFrameName", js_cocos2dx_ui_Scale9Sprite_initWithSpriteFrameName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getSprite", js_cocos2dx_ui_Scale9Sprite_getSprite, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setInsetTop", js_cocos2dx_ui_Scale9Sprite_setInsetTop, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setRenderingType", js_cocos2dx_ui_Scale9Sprite_setRenderingType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("init", js_cocos2dx_ui_Scale9Sprite_init, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setPreferredSize", js_cocos2dx_ui_Scale9Sprite_setPreferredSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setSpriteFrame", js_cocos2dx_ui_Scale9Sprite_setSpriteFrame, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
@ -15682,6 +15721,7 @@ void js_register_cocos2dx_ui_Scale9Sprite(JSContext *cx, JS::HandleObject global
JS_FN("getInsetBottom", js_cocos2dx_ui_Scale9Sprite_getInsetBottom, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getCapInsets", js_cocos2dx_ui_Scale9Sprite_getCapInsets, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("isScale9Enabled", js_cocos2dx_ui_Scale9Sprite_isScale9Enabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getRenderingType", js_cocos2dx_ui_Scale9Sprite_getRenderingType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getInsetRight", js_cocos2dx_ui_Scale9Sprite_getInsetRight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getOriginalSize", js_cocos2dx_ui_Scale9Sprite_getOriginalSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("initWithFile", js_cocos2dx_ui_Scale9Sprite_initWithFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),

View File

@ -756,6 +756,7 @@ bool js_cocos2dx_ui_Scale9Sprite_setInsetBottom(JSContext *cx, uint32_t argc, js
bool js_cocos2dx_ui_Scale9Sprite_initWithSpriteFrameName(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Scale9Sprite_getSprite(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Scale9Sprite_setInsetTop(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Scale9Sprite_setRenderingType(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Scale9Sprite_init(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Scale9Sprite_setPreferredSize(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Scale9Sprite_setSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp);
@ -763,6 +764,7 @@ bool js_cocos2dx_ui_Scale9Sprite_getBlendFunc(JSContext *cx, uint32_t argc, jsva
bool js_cocos2dx_ui_Scale9Sprite_getInsetBottom(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Scale9Sprite_getCapInsets(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Scale9Sprite_isScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Scale9Sprite_getRenderingType(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Scale9Sprite_getInsetRight(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Scale9Sprite_getOriginalSize(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_Scale9Sprite_initWithFile(JSContext *cx, uint32_t argc, jsval *vp);

View File

@ -34,6 +34,16 @@
-- @param #cc.V3F_C4B_T2F_Quad quad
-- @return PolygonInfo#PolygonInfo self (return value: cc.PolygonInfo)
--------------------------------
-- set the data to be a pointer to a triangles<br>
-- the member verts will not be released when this PolygonInfo destructs<br>
-- as the verts memory are managed by other objects<br>
-- param triangles a pointer to the TrianglesCommand::Triangles object
-- @function [parent=#PolygonInfo] setTriangles
-- @param self
-- @param #cc.TrianglesCommand::Triangles triangles
-- @return PolygonInfo#PolygonInfo self (return value: cc.PolygonInfo)
--------------------------------
-- / @name Creators/ @{<br>
-- Creates an empty Polygon info<br>

View File

@ -128,6 +128,16 @@
-- @param #float topInset
-- @return Scale9Sprite#Scale9Sprite self (return value: ccui.Scale9Sprite)
--------------------------------
-- Set the slice sprite rendering type.<br>
-- When setting to SIMPLE, only 4 vertexes is used to rendering.<br>
-- otherwise 16 vertexes will be used to rendering.<br>
-- see RenderingType
-- @function [parent=#Scale9Sprite] setRenderingType
-- @param self
-- @param #int type
-- @return Scale9Sprite#Scale9Sprite self (return value: ccui.Scale9Sprite)
--------------------------------
-- @overload self, cc.Sprite, rect_table, rect_table
-- @overload self, cc.Sprite, rect_table, bool, rect_table
@ -191,6 +201,12 @@
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Return the slice sprite rendering type.
-- @function [parent=#Scale9Sprite] getRenderingType
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- brief Query the right sprite's cap inset.<br>
-- return The right sprite's cap inset.
@ -344,6 +360,14 @@
-- @param #float scaleX
-- @return Scale9Sprite#Scale9Sprite self (return value: ccui.Scale9Sprite)
--------------------------------
--
-- @function [parent=#Scale9Sprite] setCameraMask
-- @param self
-- @param #unsigned short mask
-- @param #bool applyChildren
-- @return Scale9Sprite#Scale9Sprite self (return value: ccui.Scale9Sprite)
--------------------------------
--
-- @function [parent=#Scale9Sprite] getScaleY
@ -356,6 +380,15 @@
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- @overload self, float, float
-- @overload self, float
-- @function [parent=#Scale9Sprite] setScale
-- @param self
-- @param #float scaleX
-- @param #float scaleY
-- @return Scale9Sprite#Scale9Sprite self (return value: ccui.Scale9Sprite)
--------------------------------
--
-- @function [parent=#Scale9Sprite] updateDisplayedOpacity
@ -369,29 +402,6 @@
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
--
-- @function [parent=#Scale9Sprite] cleanup
-- @param self
-- @return Scale9Sprite#Scale9Sprite self (return value: ccui.Scale9Sprite)
--------------------------------
-- @overload self, float, float
-- @overload self, float
-- @function [parent=#Scale9Sprite] setScale
-- @param self
-- @param #float scaleX
-- @param #float scaleY
-- @return Scale9Sprite#Scale9Sprite self (return value: ccui.Scale9Sprite)
--------------------------------
--
-- @function [parent=#Scale9Sprite] setCameraMask
-- @param self
-- @param #unsigned short mask
-- @param #bool applyChildren
-- @return Scale9Sprite#Scale9Sprite self (return value: ccui.Scale9Sprite)
--------------------------------
--
-- @function [parent=#Scale9Sprite] updateDisplayedColor

View File

@ -20395,6 +20395,57 @@ int lua_cocos2dx_PolygonInfo_setQuad(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_PolygonInfo_setTriangles(lua_State* tolua_S)
{
int argc = 0;
cocos2d::PolygonInfo* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.PolygonInfo",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::PolygonInfo*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_PolygonInfo_setTriangles'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
cocos2d::TrianglesCommand::Triangles arg0;
#pragma warning NO CONVERSION TO NATIVE FOR Triangles
ok = false;
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_PolygonInfo_setTriangles'", nullptr);
return 0;
}
cobj->setTriangles(arg0);
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PolygonInfo:setTriangles",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_PolygonInfo_setTriangles'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_PolygonInfo_constructor(lua_State* tolua_S)
{
int argc = 0;
@ -20447,6 +20498,7 @@ int lua_register_cocos2dx_PolygonInfo(lua_State* tolua_S)
tolua_function(tolua_S,"getTriaglesCount",lua_cocos2dx_PolygonInfo_getTriaglesCount);
tolua_function(tolua_S,"getVertCount",lua_cocos2dx_PolygonInfo_getVertCount);
tolua_function(tolua_S,"setQuad",lua_cocos2dx_PolygonInfo_setQuad);
tolua_function(tolua_S,"setTriangles",lua_cocos2dx_PolygonInfo_setTriangles);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::PolygonInfo).name();
g_luaType[typeName] = "cc.PolygonInfo";

View File

@ -2150,6 +2150,7 @@ int register_all_cocos2dx(lua_State* tolua_S);
#endif // __cocos2dx_h__

View File

@ -24858,6 +24858,56 @@ int lua_cocos2dx_ui_Scale9Sprite_setInsetTop(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_Scale9Sprite_setRenderingType(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Scale9Sprite* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.Scale9Sprite",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::Scale9Sprite*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Scale9Sprite_setRenderingType'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
cocos2d::ui::Scale9Sprite::RenderingType arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.Scale9Sprite:setRenderingType");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Scale9Sprite_setRenderingType'", nullptr);
return 0;
}
cobj->setRenderingType(arg0);
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.Scale9Sprite:setRenderingType",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Scale9Sprite_setRenderingType'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_Scale9Sprite_init(lua_State* tolua_S)
{
int argc = 0;
@ -25270,6 +25320,53 @@ int lua_cocos2dx_ui_Scale9Sprite_isScale9Enabled(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_Scale9Sprite_getRenderingType(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Scale9Sprite* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.Scale9Sprite",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::Scale9Sprite*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Scale9Sprite_getRenderingType'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Scale9Sprite_getRenderingType'", nullptr);
return 0;
}
int ret = (int)cobj->getRenderingType();
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.Scale9Sprite:getRenderingType",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Scale9Sprite_getRenderingType'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_Scale9Sprite_getInsetRight(lua_State* tolua_S)
{
int argc = 0;
@ -26168,6 +26265,7 @@ int lua_register_cocos2dx_ui_Scale9Sprite(lua_State* tolua_S)
tolua_function(tolua_S,"initWithSpriteFrameName",lua_cocos2dx_ui_Scale9Sprite_initWithSpriteFrameName);
tolua_function(tolua_S,"getSprite",lua_cocos2dx_ui_Scale9Sprite_getSprite);
tolua_function(tolua_S,"setInsetTop",lua_cocos2dx_ui_Scale9Sprite_setInsetTop);
tolua_function(tolua_S,"setRenderingType",lua_cocos2dx_ui_Scale9Sprite_setRenderingType);
tolua_function(tolua_S,"init",lua_cocos2dx_ui_Scale9Sprite_init);
tolua_function(tolua_S,"setPreferredSize",lua_cocos2dx_ui_Scale9Sprite_setPreferredSize);
tolua_function(tolua_S,"setSpriteFrame",lua_cocos2dx_ui_Scale9Sprite_setSpriteFrame);
@ -26175,6 +26273,7 @@ int lua_register_cocos2dx_ui_Scale9Sprite(lua_State* tolua_S)
tolua_function(tolua_S,"getInsetBottom",lua_cocos2dx_ui_Scale9Sprite_getInsetBottom);
tolua_function(tolua_S,"getCapInsets",lua_cocos2dx_ui_Scale9Sprite_getCapInsets);
tolua_function(tolua_S,"isScale9Enabled",lua_cocos2dx_ui_Scale9Sprite_isScale9Enabled);
tolua_function(tolua_S,"getRenderingType",lua_cocos2dx_ui_Scale9Sprite_getRenderingType);
tolua_function(tolua_S,"getInsetRight",lua_cocos2dx_ui_Scale9Sprite_getInsetRight);
tolua_function(tolua_S,"getOriginalSize",lua_cocos2dx_ui_Scale9Sprite_getOriginalSize);
tolua_function(tolua_S,"initWithFile",lua_cocos2dx_ui_Scale9Sprite_initWithFile);

View File

@ -626,6 +626,8 @@ int register_all_cocos2dx_ui(lua_State* tolua_S);