Merge pull request #13133 from CocosRobot/update_lua_bindings_1438308093

[ci skip][AUTO]: updating luabinding & jsbinding automatically
This commit is contained in:
pandamicro 2015-07-31 10:17:32 +08:00
commit 52fdea265a
4 changed files with 27 additions and 27 deletions

View File

@ -2143,7 +2143,7 @@ enableShadow : function (
/** /**
* @method getFontSize * @method getFontSize
* @return {int} * @return {float}
*/ */
getFontSize : function ( getFontSize : function (
) )
@ -2225,13 +2225,13 @@ str
* @method init * @method init
* @param {String} arg0 * @param {String} arg0
* @param {String} arg1 * @param {String} arg1
* @param {int} arg2 * @param {float} arg2
* @return {bool} * @return {bool}
*/ */
init : function ( init : function (
str, str,
str, str,
int float
) )
{ {
return false; return false;
@ -2321,10 +2321,10 @@ getTextHorizontalAlignment : function (
/** /**
* @method setFontSize * @method setFontSize
* @param {int} arg0 * @param {float} arg0
*/ */
setFontSize : function ( setFontSize : function (
int float
) )
{ {
}, },
@ -2383,13 +2383,13 @@ texthalignment
* @method create * @method create
* @param {String} str * @param {String} str
* @param {String} str * @param {String} str
* @param {int} int * @param {float} float
* @return {ccui.Text|ccui.Text} * @return {ccui.Text|ccui.Text}
*/ */
create : function( create : function(
str, str,
str, str,
int float
) )
{ {
return ccui.Text; return ccui.Text;

View File

@ -5860,9 +5860,9 @@ bool js_cocos2dx_ui_Text_getFontSize(JSContext *cx, uint32_t argc, jsval *vp)
cocos2d::ui::Text* cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : NULL); cocos2d::ui::Text* cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Text_getFontSize : Invalid Native Object"); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Text_getFontSize : Invalid Native Object");
if (argc == 0) { if (argc == 0) {
int ret = cobj->getFontSize(); double ret = cobj->getFontSize();
jsval jsret = JSVAL_NULL; jsval jsret = JSVAL_NULL;
jsret = int32_to_jsval(cx, ret); jsret = DOUBLE_TO_JSVAL(ret);
args.rval().set(jsret); args.rval().set(jsret);
return true; return true;
} }
@ -6030,10 +6030,10 @@ bool js_cocos2dx_ui_Text_init(JSContext *cx, uint32_t argc, jsval *vp)
if (argc == 3) { if (argc == 3) {
std::string arg0; std::string arg0;
std::string arg1; std::string arg1;
int arg2; double arg2;
ok &= jsval_to_std_string(cx, args.get(0), &arg0); ok &= jsval_to_std_string(cx, args.get(0), &arg0);
ok &= jsval_to_std_string(cx, args.get(1), &arg1); ok &= jsval_to_std_string(cx, args.get(1), &arg1);
ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Text_init : Error processing arguments"); JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Text_init : Error processing arguments");
bool ret = cobj->init(arg0, arg1, arg2); bool ret = cobj->init(arg0, arg1, arg2);
jsval jsret = JSVAL_NULL; jsval jsret = JSVAL_NULL;
@ -6212,8 +6212,8 @@ bool js_cocos2dx_ui_Text_setFontSize(JSContext *cx, uint32_t argc, jsval *vp)
cocos2d::ui::Text* cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : NULL); cocos2d::ui::Text* cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Text_setFontSize : Invalid Native Object"); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Text_setFontSize : Invalid Native Object");
if (argc == 1) { if (argc == 1) {
int arg0; double arg0;
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Text_setFontSize : Error processing arguments"); JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Text_setFontSize : Error processing arguments");
cobj->setFontSize(arg0); cobj->setFontSize(arg0);
args.rval().setUndefined(); args.rval().setUndefined();
@ -6332,8 +6332,8 @@ bool js_cocos2dx_ui_Text_create(JSContext *cx, uint32_t argc, jsval *vp)
std::string arg1; std::string arg1;
ok &= jsval_to_std_string(cx, args.get(1), &arg1); ok &= jsval_to_std_string(cx, args.get(1), &arg1);
if (!ok) { ok = true; break; } if (!ok) { ok = true; break; }
int arg2; double arg2;
ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2);
if (!ok) { ok = true; break; } if (!ok) { ok = true; break; }
cocos2d::ui::Text* ret = cocos2d::ui::Text::create(arg0, arg1, arg2); cocos2d::ui::Text* ret = cocos2d::ui::Text::create(arg0, arg1, arg2);
jsval jsret = JSVAL_NULL; jsval jsret = JSVAL_NULL;

View File

@ -19,7 +19,7 @@
-- return The font size. -- return The font size.
-- @function [parent=#Text] getFontSize -- @function [parent=#Text] getFontSize
-- @param self -- @param self
-- @return int#int ret (return value: int) -- @return float#float ret (return value: float)
-------------------------------- --------------------------------
-- --
@ -90,7 +90,7 @@
-- @param self -- @param self
-- @param #string textContent -- @param #string textContent
-- @param #string fontName -- @param #string fontName
-- @param #int fontSize -- @param #float fontSize
-- @return bool#bool ret (return value: bool) -- @return bool#bool ret (return value: bool)
-------------------------------- --------------------------------
@ -164,7 +164,7 @@
-- param size The font size. -- param size The font size.
-- @function [parent=#Text] setFontSize -- @function [parent=#Text] setFontSize
-- @param self -- @param self
-- @param #int size -- @param #float size
-- @return Text#Text self (return value: ccui.Text) -- @return Text#Text self (return value: ccui.Text)
-------------------------------- --------------------------------
@ -206,13 +206,13 @@
-- @return Text#Text self (return value: ccui.Text) -- @return Text#Text self (return value: ccui.Text)
-------------------------------- --------------------------------
-- @overload self, string, string, int -- @overload self, string, string, float
-- @overload self -- @overload self
-- @function [parent=#Text] create -- @function [parent=#Text] create
-- @param self -- @param self
-- @param #string textContent -- @param #string textContent
-- @param #string fontName -- @param #string fontName
-- @param #int fontSize -- @param #float fontSize
-- @return Text#Text ret (return value: ccui.Text) -- @return Text#Text ret (return value: ccui.Text)
-------------------------------- --------------------------------

View File

@ -8759,7 +8759,7 @@ int lua_cocos2dx_ui_Text_getFontSize(lua_State* tolua_S)
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Text_getFontSize'", nullptr); tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Text_getFontSize'", nullptr);
return 0; return 0;
} }
int ret = cobj->getFontSize(); double ret = cobj->getFontSize();
tolua_pushnumber(tolua_S,(lua_Number)ret); tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1; return 1;
} }
@ -9148,13 +9148,13 @@ int lua_cocos2dx_ui_Text_init(lua_State* tolua_S)
{ {
std::string arg0; std::string arg0;
std::string arg1; std::string arg1;
int arg2; double arg2;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.Text:init"); ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.Text:init");
ok &= luaval_to_std_string(tolua_S, 3,&arg1, "ccui.Text:init"); ok &= luaval_to_std_string(tolua_S, 3,&arg1, "ccui.Text:init");
ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "ccui.Text:init"); ok &= luaval_to_number(tolua_S, 4,&arg2, "ccui.Text:init");
if(!ok) if(!ok)
{ {
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Text_init'", nullptr); tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Text_init'", nullptr);
@ -9601,9 +9601,9 @@ int lua_cocos2dx_ui_Text_setFontSize(lua_State* tolua_S)
argc = lua_gettop(tolua_S)-1; argc = lua_gettop(tolua_S)-1;
if (argc == 1) if (argc == 1)
{ {
int arg0; double arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccui.Text:setFontSize"); ok &= luaval_to_number(tolua_S, 2,&arg0, "ccui.Text:setFontSize");
if(!ok) if(!ok)
{ {
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Text_setFontSize'", nullptr); tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_Text_setFontSize'", nullptr);
@ -9891,8 +9891,8 @@ int lua_cocos2dx_ui_Text_create(lua_State* tolua_S)
std::string arg1; std::string arg1;
ok &= luaval_to_std_string(tolua_S, 3,&arg1, "ccui.Text:create"); ok &= luaval_to_std_string(tolua_S, 3,&arg1, "ccui.Text:create");
if (!ok) { break; } if (!ok) { break; }
int arg2; double arg2;
ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "ccui.Text:create"); ok &= luaval_to_number(tolua_S, 4,&arg2, "ccui.Text:create");
if (!ok) { break; } if (!ok) { break; }
cocos2d::ui::Text* ret = cocos2d::ui::Text::create(arg0, arg1, arg2); cocos2d::ui::Text* ret = cocos2d::ui::Text::create(arg0, arg1, arg2);
object_to_luaval<cocos2d::ui::Text>(tolua_S, "ccui.Text",(cocos2d::ui::Text*)ret); object_to_luaval<cocos2d::ui::Text>(tolua_S, "ccui.Text",(cocos2d::ui::Text*)ret);