Merge pull request #13833 from CocosRobot/update_lua_bindings_1442313090

[ci skip][AUTO]: updating luabinding & jsbinding automatically
This commit is contained in:
子龙山人 2015-09-15 21:23:40 +08:00
commit c535c9df3f
6 changed files with 152 additions and 2 deletions

View File

@ -3361,6 +3361,14 @@ magnetictype
{
},
/**
* @method refreshViewIfNecessary
*/
refreshViewIfNecessary : function (
)
{
},
/**
* @method getIndex
* @param {ccui.Widget} arg0

View File

@ -8820,6 +8820,22 @@ bool js_cocos2dx_ui_ListView_setMagneticType(JSContext *cx, uint32_t argc, jsval
JS_ReportError(cx, "js_cocos2dx_ui_ListView_setMagneticType : wrong number of arguments: %d, was expecting %d", argc, 1);
return false;
}
bool js_cocos2dx_ui_ListView_refreshViewIfNecessary(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::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_refreshViewIfNecessary : Invalid Native Object");
if (argc == 0) {
cobj->refreshViewIfNecessary();
args.rval().setUndefined();
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_ListView_refreshViewIfNecessary : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_ui_ListView_getIndex(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -9509,6 +9525,7 @@ void js_register_cocos2dx_ui_ListView(JSContext *cx, JS::HandleObject global) {
JS_FN("getCurSelectedIndex", js_cocos2dx_ui_ListView_getCurSelectedIndex, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getItemsMargin", js_cocos2dx_ui_ListView_getItemsMargin, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setMagneticType", js_cocos2dx_ui_ListView_setMagneticType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("refreshViewIfNecessary", js_cocos2dx_ui_ListView_refreshViewIfNecessary, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getIndex", js_cocos2dx_ui_ListView_getIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("pushBackCustomItem", js_cocos2dx_ui_ListView_pushBackCustomItem, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("insertDefaultItem", js_cocos2dx_ui_ListView_insertDefaultItem, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),

View File

@ -442,6 +442,7 @@ bool js_cocos2dx_ui_ListView_getCenterItemInCurrentView(JSContext *cx, uint32_t
bool js_cocos2dx_ui_ListView_getCurSelectedIndex(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ListView_getItemsMargin(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ListView_setMagneticType(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ListView_refreshViewIfNecessary(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ListView_getIndex(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ListView_pushBackCustomItem(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ListView_insertDefaultItem(JSContext *cx, uint32_t argc, jsval *vp);

View File

@ -47,6 +47,12 @@
-- @param #int magneticType
-- @return ListView#ListView self (return value: ccui.ListView)
--------------------------------
--
-- @function [parent=#ListView] refreshViewIfNecessary
-- @param self
-- @return ListView#ListView self (return value: ccui.ListView)
--------------------------------
-- Return the index of specified widget.<br>
-- param item A widget pointer.<br>
@ -268,6 +274,12 @@
-- @param #string name
-- @return ListView#ListView self (return value: ccui.ListView)
--------------------------------
-- Override functions
-- @function [parent=#ListView] jumpToBottom
-- @param self
-- @return ListView#ListView self (return value: ccui.ListView)
--------------------------------
--
-- @function [parent=#ListView] forceDoLayout
@ -285,9 +297,15 @@
--------------------------------
--
-- @function [parent=#ListView] getDescription
-- @function [parent=#ListView] jumpToTopRight
-- @param self
-- @return string#string ret (return value: string)
-- @return ListView#ListView self (return value: ccui.ListView)
--------------------------------
--
-- @function [parent=#ListView] jumpToLeft
-- @param self
-- @return ListView#ListView self (return value: ccui.ListView)
--------------------------------
--
@ -302,6 +320,18 @@
-- @param self
-- @return ListView#ListView self (return value: ccui.ListView)
--------------------------------
--
-- @function [parent=#ListView] jumpToTop
-- @param self
-- @return ListView#ListView self (return value: ccui.ListView)
--------------------------------
--
-- @function [parent=#ListView] jumpToTopLeft
-- @param self
-- @return ListView#ListView self (return value: ccui.ListView)
--------------------------------
--
-- @function [parent=#ListView] removeChild
@ -316,6 +346,51 @@
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
--
-- @function [parent=#ListView] jumpToBottomLeft
-- @param self
-- @return ListView#ListView self (return value: ccui.ListView)
--------------------------------
--
-- @function [parent=#ListView] jumpToBottomRight
-- @param self
-- @return ListView#ListView self (return value: ccui.ListView)
--------------------------------
--
-- @function [parent=#ListView] jumpToPercentBothDirection
-- @param self
-- @param #vec2_table percent
-- @return ListView#ListView self (return value: ccui.ListView)
--------------------------------
--
-- @function [parent=#ListView] jumpToPercentHorizontal
-- @param self
-- @param #float percent
-- @return ListView#ListView self (return value: ccui.ListView)
--------------------------------
--
-- @function [parent=#ListView] jumpToRight
-- @param self
-- @return ListView#ListView self (return value: ccui.ListView)
--------------------------------
--
-- @function [parent=#ListView] getDescription
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
--
-- @function [parent=#ListView] jumpToPercentVertical
-- @param self
-- @param #float percent
-- @return ListView#ListView self (return value: ccui.ListView)
--------------------------------
-- Default constructor<br>
-- js ctor<br>

View File

@ -16140,6 +16140,53 @@ int lua_cocos2dx_ui_ListView_setMagneticType(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_ListView_refreshViewIfNecessary(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::ListView* 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.ListView",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::ListView*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_ListView_refreshViewIfNecessary'", 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_ListView_refreshViewIfNecessary'", nullptr);
return 0;
}
cobj->refreshViewIfNecessary();
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.ListView:refreshViewIfNecessary",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_ListView_refreshViewIfNecessary'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_ListView_getIndex(lua_State* tolua_S)
{
int argc = 0;
@ -17516,6 +17563,7 @@ int lua_register_cocos2dx_ui_ListView(lua_State* tolua_S)
tolua_function(tolua_S,"getCurSelectedIndex",lua_cocos2dx_ui_ListView_getCurSelectedIndex);
tolua_function(tolua_S,"getItemsMargin",lua_cocos2dx_ui_ListView_getItemsMargin);
tolua_function(tolua_S,"setMagneticType",lua_cocos2dx_ui_ListView_setMagneticType);
tolua_function(tolua_S,"refreshViewIfNecessary",lua_cocos2dx_ui_ListView_refreshViewIfNecessary);
tolua_function(tolua_S,"getIndex",lua_cocos2dx_ui_ListView_getIndex);
tolua_function(tolua_S,"pushBackCustomItem",lua_cocos2dx_ui_ListView_pushBackCustomItem);
tolua_function(tolua_S,"insertDefaultItem",lua_cocos2dx_ui_ListView_insertDefaultItem);

View File

@ -628,6 +628,7 @@ int register_all_cocos2dx_ui(lua_State* tolua_S);
#endif // __cocos2dx_ui_h__