[ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18183)

This commit is contained in:
CocosRobot 2017-08-22 10:06:38 +08:00 committed by minggo
parent 9815ccba62
commit b274322961
6 changed files with 184 additions and 2 deletions

View File

@ -2249,6 +2249,16 @@ RadioButtonGroup : function (
*/
ccui.ImageView = {
/**
* @method getBlendFunc
* @return {cc.BlendFunc}
*/
getBlendFunc : function (
)
{
return cc.BlendFunc;
},
/**
* @method loadTexture
* @param {String} arg0
@ -2261,6 +2271,16 @@ texturerestype
{
},
/**
* @method setBlendFunc
* @param {cc.BlendFunc} arg0
*/
setBlendFunc : function (
blendfunc
)
{
},
/**
* @method init
* @param {String} arg0

View File

@ -5677,6 +5677,24 @@ void js_register_cocos2dx_ui_RadioButtonGroup(JSContext *cx, JS::HandleObject gl
JSClass *jsb_cocos2d_ui_ImageView_class;
JSObject *jsb_cocos2d_ui_ImageView_prototype;
bool js_cocos2dx_ui_ImageView_getBlendFunc(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::ImageView* cobj = (cocos2d::ui::ImageView *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ImageView_getBlendFunc : Invalid Native Object");
if (argc == 0) {
const cocos2d::BlendFunc& ret = cobj->getBlendFunc();
JS::RootedValue jsret(cx);
jsret = blendfunc_to_jsval(cx, ret);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_ImageView_getBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_ui_ImageView_loadTexture(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -5707,6 +5725,26 @@ bool js_cocos2dx_ui_ImageView_loadTexture(JSContext *cx, uint32_t argc, jsval *v
JS_ReportError(cx, "js_cocos2dx_ui_ImageView_loadTexture : wrong number of arguments: %d, was expecting %d", argc, 1);
return false;
}
bool js_cocos2dx_ui_ImageView_setBlendFunc(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::ImageView* cobj = (cocos2d::ui::ImageView *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ImageView_setBlendFunc : Invalid Native Object");
if (argc == 1) {
cocos2d::BlendFunc arg0;
ok &= jsval_to_blendfunc(cx, args.get(0), &arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ImageView_setBlendFunc : Error processing arguments");
cobj->setBlendFunc(arg0);
args.rval().setUndefined();
return true;
}
JS_ReportError(cx, "js_cocos2dx_ui_ImageView_setBlendFunc : wrong number of arguments: %d, was expecting %d", argc, 1);
return false;
}
bool js_cocos2dx_ui_ImageView_init(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -5962,7 +6000,9 @@ void js_register_cocos2dx_ui_ImageView(JSContext *cx, JS::HandleObject global) {
};
static JSFunctionSpec funcs[] = {
JS_FN("getBlendFunc", js_cocos2dx_ui_ImageView_getBlendFunc, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("loadTexture", js_cocos2dx_ui_ImageView_loadTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setBlendFunc", js_cocos2dx_ui_ImageView_setBlendFunc, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("_init", js_cocos2dx_ui_ImageView_init, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setScale9Enabled", js_cocos2dx_ui_ImageView_setScale9Enabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setTextureRect", js_cocos2dx_ui_ImageView_setTextureRect, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),

View File

@ -300,7 +300,9 @@ bool js_cocos2dx_ui_ImageView_constructor(JSContext *cx, uint32_t argc, jsval *v
void js_cocos2dx_ui_ImageView_finalize(JSContext *cx, JSObject *obj);
void js_register_cocos2dx_ui_ImageView(JSContext *cx, JS::HandleObject global);
void register_all_cocos2dx_ui(JSContext* cx, JS::HandleObject obj);
bool js_cocos2dx_ui_ImageView_getBlendFunc(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ImageView_loadTexture(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ImageView_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ImageView_init(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ImageView_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_ui_ImageView_setTextureRect(JSContext *cx, uint32_t argc, jsval *vp);

View File

@ -1,9 +1,18 @@
--------------------------------
-- @module ImageView
-- @extend Widget
-- @extend Widget,BlendProtocol
-- @parent_module ccui
--------------------------------
-- Returns the blending function that is currently being used.<br>
-- return A BlendFunc structure with source and destination factor which specified pixel arithmetic.<br>
-- js NA<br>
-- lua NA
-- @function [parent=#ImageView] getBlendFunc
-- @param self
-- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc)
--------------------------------
-- Load texture for imageview.<br>
-- param fileName file name of texture.<br>
@ -14,6 +23,16 @@
-- @param #int texType
-- @return ImageView#ImageView self (return value: ccui.ImageView)
--------------------------------
-- Sets the source blending function.<br>
-- param blendFunc A structure with source and destination factor to specify pixel arithmetic. e.g. {GL_ONE, GL_ONE}, {GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA}.<br>
-- js NA<br>
-- lua NA
-- @function [parent=#ImageView] setBlendFunc
-- @param self
-- @param #cc.BlendFunc blendFunc
-- @return ImageView#ImageView self (return value: ccui.ImageView)
--------------------------------
--
-- @function [parent=#ImageView] init

View File

@ -10798,6 +10798,53 @@ int lua_register_cocos2dx_ui_RadioButtonGroup(lua_State* tolua_S)
return 1;
}
int lua_cocos2dx_ui_ImageView_getBlendFunc(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::ImageView* 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.ImageView",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::ImageView*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_ImageView_getBlendFunc'", 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_ImageView_getBlendFunc'", nullptr);
return 0;
}
const cocos2d::BlendFunc& ret = cobj->getBlendFunc();
blendfunc_to_luaval(tolua_S, ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.ImageView:getBlendFunc",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_ImageView_getBlendFunc'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_ImageView_loadTexture(lua_State* tolua_S)
{
int argc = 0;
@ -10865,6 +10912,56 @@ int lua_cocos2dx_ui_ImageView_loadTexture(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_ImageView_setBlendFunc(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::ImageView* 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.ImageView",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::ImageView*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_ImageView_setBlendFunc'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
cocos2d::BlendFunc arg0;
ok &= luaval_to_blendfunc(tolua_S, 2, &arg0, "ccui.ImageView:setBlendFunc");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_ImageView_setBlendFunc'", nullptr);
return 0;
}
cobj->setBlendFunc(arg0);
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.ImageView:setBlendFunc",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_ImageView_setBlendFunc'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_ImageView_init(lua_State* tolua_S)
{
int argc = 0;
@ -11368,7 +11465,9 @@ int lua_register_cocos2dx_ui_ImageView(lua_State* tolua_S)
tolua_beginmodule(tolua_S,"ImageView");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_ImageView_constructor);
tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_ui_ImageView_getBlendFunc);
tolua_function(tolua_S,"loadTexture",lua_cocos2dx_ui_ImageView_loadTexture);
tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_ui_ImageView_setBlendFunc);
tolua_function(tolua_S,"init",lua_cocos2dx_ui_ImageView_init);
tolua_function(tolua_S,"setScale9Enabled",lua_cocos2dx_ui_ImageView_setScale9Enabled);
tolua_function(tolua_S,"setTextureRect",lua_cocos2dx_ui_ImageView_setTextureRect);
@ -39010,10 +39109,10 @@ TOLUA_API int register_all_cocos2dx_ui(lua_State* tolua_S)
lua_register_cocos2dx_ui_LoadingBar(tolua_S);
lua_register_cocos2dx_ui_TextField(tolua_S);
lua_register_cocos2dx_ui_Scale9Sprite(tolua_S);
lua_register_cocos2dx_ui_Slider(tolua_S);
lua_register_cocos2dx_ui_RichElement(tolua_S);
lua_register_cocos2dx_ui_RichElementCustomNode(tolua_S);
lua_register_cocos2dx_ui_VBox(tolua_S);
lua_register_cocos2dx_ui_Slider(tolua_S);
lua_register_cocos2dx_ui_RadioButtonGroup(tolua_S);
lua_register_cocos2dx_ui_TabControl(tolua_S);
lua_register_cocos2dx_ui_ScrollView(tolua_S);

View File

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