From bfcf992a287227ac4041c24b03f223e6b5983f91 Mon Sep 17 00:00:00 2001 From: James Chen Date: Thu, 27 Feb 2014 17:23:14 +0800 Subject: [PATCH 1/4] Updates submodule of cocos2d-x. --- frameworks/js-bindings/cocos2d-x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/js-bindings/cocos2d-x b/frameworks/js-bindings/cocos2d-x index e6842aed41..d2efab59f4 160000 --- a/frameworks/js-bindings/cocos2d-x +++ b/frameworks/js-bindings/cocos2d-x @@ -1 +1 @@ -Subproject commit e6842aed416e63c1c3a06cd6d7243b093178b9f6 +Subproject commit d2efab59f407c17edf514df7cfbf4a7d34200a81 From cc2e4d975a9b9f432a74d959981c9da0deee2df7 Mon Sep 17 00:00:00 2001 From: James Chen Date: Thu, 27 Feb 2014 17:27:03 +0800 Subject: [PATCH 2/4] Updates tojs and travis-scripts --- tools/tojs/genbindings.py | 2 +- tools/travis-scripts/generate-bindings.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/tojs/genbindings.py b/tools/tojs/genbindings.py index 4e4ca3729b..8cea1294b4 100755 --- a/tools/tojs/genbindings.py +++ b/tools/tojs/genbindings.py @@ -124,7 +124,7 @@ def main(): try: tojs_root = '%s/tools/tojs' % project_root - output_dir = '%s/jsb/bindings/auto' % project_root + output_dir = '%s/frameworks/js-bindings/bindings/auto' % project_root cmd_args = {'cocos2dx.ini' : ('cocos2d-x', 'jsb_cocos2dx_auto'), \ 'cocos2dx_extension.ini' : ('cocos2dx_extension', 'jsb_cocos2dx_extension_auto'), \ diff --git a/tools/travis-scripts/generate-bindings.sh b/tools/travis-scripts/generate-bindings.sh index 8e3c56dc30..459efbbde4 100755 --- a/tools/travis-scripts/generate-bindings.sh +++ b/tools/travis-scripts/generate-bindings.sh @@ -16,7 +16,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" PROJECT_ROOT="$DIR"/../.. -TOJS_ROOT=$PROJECT_ROOT/tools/tojs +TOJS_ROOT="$PROJECT_ROOT"/tools/tojs GENERATED_WORKTREE="$PROJECT_ROOT"/frameworks/js-bindings/bindings/auto COMMITTAG="[AUTO]" @@ -120,7 +120,7 @@ set -e COCOS_BRANCH=updategeneratedsubmodule_"$ELAPSEDSECS" -git add . +git add -f "$GENERATED_WORKTREE" git checkout -b "$COCOS_BRANCH" git commit -m "$COMMITTAG : updating jsbinding automatically" From 1692e60448e17c8adcf5bcefb7cf1a73a79bc9be Mon Sep 17 00:00:00 2001 From: James Chen Date: Thu, 27 Feb 2014 17:29:45 +0800 Subject: [PATCH 3/4] Updates cocos2dx_gui.ini. --- tools/tojs/cocos2dx_gui.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tojs/cocos2dx_gui.ini b/tools/tojs/cocos2dx_gui.ini index feea3b0a45..d8cf5eb29f 100644 --- a/tools/tojs/cocos2dx_gui.ini +++ b/tools/tojs/cocos2dx_gui.ini @@ -1,14 +1,14 @@ [cocos2dx_gui] # the prefix to be added to the generated functions. You might or might not use this in your own # templates -prefix = cocos2dx_gui +prefix = cocos2dx_ui # create a target namespace (in javascript, this would create some code like the equiv. to `ns = ns || {}`) # all classes will be embedded in that namespace target_namespace = ccui # the native namespace in which this module locates, this parameter is used for avoid conflict of the same class name in different modules, as "cocos2d::Label" <-> "cocos2d::ui::Label". -cpp_namespace = cocos2d::gui +cpp_namespace = cocos2d::ui android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/include android_flags = -D_SIZE_T_DEFINED_ From 2e098888aee90b851053c2feabaaeeeb9376c00c Mon Sep 17 00:00:00 2001 From: James Chen Date: Thu, 27 Feb 2014 17:39:11 +0800 Subject: [PATCH 4/4] gui -> ui. --- .../project.pbxproj | 102 +- .../bindings/auto/jsb_cocos2dx_auto.cpp | 541 ++- .../bindings/auto/jsb_cocos2dx_auto.hpp | 32 +- .../bindings/auto/jsb_cocos2dx_auto_api.js | 165 +- .../bindings/auto/jsb_cocos2dx_gui_auto.cpp | 3972 ++++++++--------- .../bindings/auto/jsb_cocos2dx_gui_auto.hpp | 814 ++-- .../auto/jsb_cocos2dx_gui_auto_api.js | 166 +- .../auto/jsb_cocos2dx_studio_auto.cpp | 4 +- .../auto/jsb_cocos2dx_studio_auto_api.js | 2 +- .../manual/gui/jsb_cocos2dx_gui_manual.cpp | 54 +- .../manual/gui/jsb_cocos2dx_gui_manual.h | 2 +- .../js-tests/project/Classes/AppDelegate.cpp | 4 +- 12 files changed, 3072 insertions(+), 2786 deletions(-) diff --git a/build/cocos2d_jsb_samples.xcodeproj/project.pbxproj b/build/cocos2d_jsb_samples.xcodeproj/project.pbxproj index 2cc132c13a..100fe2c6b7 100644 --- a/build/cocos2d_jsb_samples.xcodeproj/project.pbxproj +++ b/build/cocos2d_jsb_samples.xcodeproj/project.pbxproj @@ -7,6 +7,36 @@ objects = { /* Begin PBXBuildFile section */ + 1A487B4E18BF3E7F007EEB98 /* debugger in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B3F18BF3E7F007EEB98 /* debugger */; }; + 1A487B4F18BF3E7F007EEB98 /* debugger in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B3F18BF3E7F007EEB98 /* debugger */; }; + 1A487B6C18BF3EDF007EEB98 /* jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4D18BF3E7F007EEB98 /* jsb.js */; }; + 1A487B6D18BF3EDF007EEB98 /* jsb_chipmunk.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4118BF3E7F007EEB98 /* jsb_chipmunk.js */; }; + 1A487B6E18BF3EDF007EEB98 /* jsb_chipmunk_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4018BF3E7F007EEB98 /* jsb_chipmunk_constants.js */; }; + 1A487B6F18BF3EDF007EEB98 /* jsb_cocos2d.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4618BF3E7F007EEB98 /* jsb_cocos2d.js */; }; + 1A487B7018BF3EDF007EEB98 /* jsb_cocos2d_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4218BF3E7F007EEB98 /* jsb_cocos2d_constants.js */; }; + 1A487B7118BF3EDF007EEB98 /* jsb_cocos2d_extension.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4318BF3E7F007EEB98 /* jsb_cocos2d_extension.js */; }; + 1A487B7218BF3EDF007EEB98 /* jsb_cocos2d_gui.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4418BF3E7F007EEB98 /* jsb_cocos2d_gui.js */; }; + 1A487B7318BF3EDF007EEB98 /* jsb_cocos2d_studio.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4518BF3E7F007EEB98 /* jsb_cocos2d_studio.js */; }; + 1A487B7418BF3EDF007EEB98 /* jsb_cocosbuilder.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4718BF3E7F007EEB98 /* jsb_cocosbuilder.js */; }; + 1A487B7518BF3EDF007EEB98 /* jsb_debugger.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4818BF3E7F007EEB98 /* jsb_debugger.js */; }; + 1A487B7618BF3EDF007EEB98 /* jsb_deprecated.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4918BF3E7F007EEB98 /* jsb_deprecated.js */; }; + 1A487B7718BF3EDF007EEB98 /* jsb_opengl.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4B18BF3E7F007EEB98 /* jsb_opengl.js */; }; + 1A487B7818BF3EDF007EEB98 /* jsb_opengl_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4A18BF3E7F007EEB98 /* jsb_opengl_constants.js */; }; + 1A487B7918BF3EDF007EEB98 /* jsb_sys.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4C18BF3E7F007EEB98 /* jsb_sys.js */; }; + 1A487B7A18BF3EE9007EEB98 /* jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4D18BF3E7F007EEB98 /* jsb.js */; }; + 1A487B7B18BF3EE9007EEB98 /* jsb_chipmunk.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4118BF3E7F007EEB98 /* jsb_chipmunk.js */; }; + 1A487B7C18BF3EE9007EEB98 /* jsb_chipmunk_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4018BF3E7F007EEB98 /* jsb_chipmunk_constants.js */; }; + 1A487B7D18BF3EE9007EEB98 /* jsb_cocos2d.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4618BF3E7F007EEB98 /* jsb_cocos2d.js */; }; + 1A487B7E18BF3EE9007EEB98 /* jsb_cocos2d_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4218BF3E7F007EEB98 /* jsb_cocos2d_constants.js */; }; + 1A487B7F18BF3EE9007EEB98 /* jsb_cocos2d_extension.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4318BF3E7F007EEB98 /* jsb_cocos2d_extension.js */; }; + 1A487B8018BF3EE9007EEB98 /* jsb_cocos2d_gui.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4418BF3E7F007EEB98 /* jsb_cocos2d_gui.js */; }; + 1A487B8118BF3EE9007EEB98 /* jsb_cocos2d_studio.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4518BF3E7F007EEB98 /* jsb_cocos2d_studio.js */; }; + 1A487B8218BF3EE9007EEB98 /* jsb_cocosbuilder.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4718BF3E7F007EEB98 /* jsb_cocosbuilder.js */; }; + 1A487B8318BF3EE9007EEB98 /* jsb_debugger.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4818BF3E7F007EEB98 /* jsb_debugger.js */; }; + 1A487B8418BF3EE9007EEB98 /* jsb_deprecated.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4918BF3E7F007EEB98 /* jsb_deprecated.js */; }; + 1A487B8518BF3EE9007EEB98 /* jsb_opengl.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4B18BF3E7F007EEB98 /* jsb_opengl.js */; }; + 1A487B8618BF3EE9007EEB98 /* jsb_opengl_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4A18BF3E7F007EEB98 /* jsb_opengl_constants.js */; }; + 1A487B8718BF3EE9007EEB98 /* jsb_sys.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A487B4C18BF3E7F007EEB98 /* jsb_sys.js */; }; 1A604F3218BF1D4900CC9A93 /* res in Resources */ = {isa = PBXBuildFile; fileRef = 1A604F3018BF1D4900CC9A93 /* res */; }; 1A604F3318BF1D4900CC9A93 /* res in Resources */ = {isa = PBXBuildFile; fileRef = 1A604F3018BF1D4900CC9A93 /* res */; }; 1A604F3418BF1D4900CC9A93 /* src in Resources */ = {isa = PBXBuildFile; fileRef = 1A604F3118BF1D4900CC9A93 /* src */; }; @@ -230,6 +260,21 @@ 15C6482C165F3988007D4F18 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/AudioToolbox.framework; sourceTree = DEVELOPER_DIR; }; 15C6482E165F399D007D4F18 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/libz.dylib; sourceTree = DEVELOPER_DIR; }; 15C64832165F3AFD007D4F18 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 1A487B3F18BF3E7F007EEB98 /* debugger */ = {isa = PBXFileReference; lastKnownFileType = folder; name = debugger; path = "../frameworks/js-bindings/bindings/script/debugger"; sourceTree = ""; }; + 1A487B4018BF3E7F007EEB98 /* jsb_chipmunk_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_chipmunk_constants.js; path = "../frameworks/js-bindings/bindings/script/jsb_chipmunk_constants.js"; sourceTree = ""; }; + 1A487B4118BF3E7F007EEB98 /* jsb_chipmunk.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_chipmunk.js; path = "../frameworks/js-bindings/bindings/script/jsb_chipmunk.js"; sourceTree = ""; }; + 1A487B4218BF3E7F007EEB98 /* jsb_cocos2d_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_constants.js; path = "../frameworks/js-bindings/bindings/script/jsb_cocos2d_constants.js"; sourceTree = ""; }; + 1A487B4318BF3E7F007EEB98 /* jsb_cocos2d_extension.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_extension.js; path = "../frameworks/js-bindings/bindings/script/jsb_cocos2d_extension.js"; sourceTree = ""; }; + 1A487B4418BF3E7F007EEB98 /* jsb_cocos2d_gui.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_gui.js; path = "../frameworks/js-bindings/bindings/script/jsb_cocos2d_gui.js"; sourceTree = ""; }; + 1A487B4518BF3E7F007EEB98 /* jsb_cocos2d_studio.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_studio.js; path = "../frameworks/js-bindings/bindings/script/jsb_cocos2d_studio.js"; sourceTree = ""; }; + 1A487B4618BF3E7F007EEB98 /* jsb_cocos2d.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d.js; path = "../frameworks/js-bindings/bindings/script/jsb_cocos2d.js"; sourceTree = ""; }; + 1A487B4718BF3E7F007EEB98 /* jsb_cocosbuilder.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocosbuilder.js; path = "../frameworks/js-bindings/bindings/script/jsb_cocosbuilder.js"; sourceTree = ""; }; + 1A487B4818BF3E7F007EEB98 /* jsb_debugger.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_debugger.js; path = "../frameworks/js-bindings/bindings/script/jsb_debugger.js"; sourceTree = ""; }; + 1A487B4918BF3E7F007EEB98 /* jsb_deprecated.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_deprecated.js; path = "../frameworks/js-bindings/bindings/script/jsb_deprecated.js"; sourceTree = ""; }; + 1A487B4A18BF3E7F007EEB98 /* jsb_opengl_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_opengl_constants.js; path = "../frameworks/js-bindings/bindings/script/jsb_opengl_constants.js"; sourceTree = ""; }; + 1A487B4B18BF3E7F007EEB98 /* jsb_opengl.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_opengl.js; path = "../frameworks/js-bindings/bindings/script/jsb_opengl.js"; sourceTree = ""; }; + 1A487B4C18BF3E7F007EEB98 /* jsb_sys.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_sys.js; path = "../frameworks/js-bindings/bindings/script/jsb_sys.js"; sourceTree = ""; }; + 1A487B4D18BF3E7F007EEB98 /* jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb.js; path = "../frameworks/js-bindings/bindings/script/jsb.js"; sourceTree = ""; }; 1A604F0218BF1D1C00CC9A93 /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = "../frameworks/js-bindings/cocos2d-x/build/cocos2d_libs.xcodeproj"; sourceTree = ""; }; 1A604F2518BF1D2000CC9A93 /* cocos2d_js_bindings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_js_bindings.xcodeproj; path = "../frameworks/js-bindings/bindings/proj.ios_mac/cocos2d_js_bindings.xcodeproj"; sourceTree = ""; }; 1A604F3018BF1D4900CC9A93 /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = "../samples/js-tests/res"; sourceTree = ""; }; @@ -330,6 +375,28 @@ name = Products; sourceTree = ""; }; + 1A487B3A18BF3E67007EEB98 /* JS Common */ = { + isa = PBXGroup; + children = ( + 1A487B3F18BF3E7F007EEB98 /* debugger */, + 1A487B4D18BF3E7F007EEB98 /* jsb.js */, + 1A487B4118BF3E7F007EEB98 /* jsb_chipmunk.js */, + 1A487B4018BF3E7F007EEB98 /* jsb_chipmunk_constants.js */, + 1A487B4618BF3E7F007EEB98 /* jsb_cocos2d.js */, + 1A487B4218BF3E7F007EEB98 /* jsb_cocos2d_constants.js */, + 1A487B4318BF3E7F007EEB98 /* jsb_cocos2d_extension.js */, + 1A487B4418BF3E7F007EEB98 /* jsb_cocos2d_gui.js */, + 1A487B4518BF3E7F007EEB98 /* jsb_cocos2d_studio.js */, + 1A487B4718BF3E7F007EEB98 /* jsb_cocosbuilder.js */, + 1A487B4818BF3E7F007EEB98 /* jsb_debugger.js */, + 1A487B4918BF3E7F007EEB98 /* jsb_deprecated.js */, + 1A487B4B18BF3E7F007EEB98 /* jsb_opengl.js */, + 1A487B4A18BF3E7F007EEB98 /* jsb_opengl_constants.js */, + 1A487B4C18BF3E7F007EEB98 /* jsb_sys.js */, + ); + name = "JS Common"; + sourceTree = ""; + }; 1A604F0318BF1D1C00CC9A93 /* Products */ = { isa = PBXGroup; children = ( @@ -430,6 +497,7 @@ 1A604F2518BF1D2000CC9A93 /* cocos2d_js_bindings.xcodeproj */, 1A604F0218BF1D1C00CC9A93 /* cocos2d_libs.xcodeproj */, 29B97323FDCFA39411CA2CEA /* Frameworks */, + 1A487B3A18BF3E67007EEB98 /* JS Common */, 1A604F2F18BF1D3900CC9A93 /* js-moonwarriors */, 1A604F2E18BF1D3300CC9A93 /* js-tests */, 19C28FACFE9D520D11CA2CBB /* Products */, @@ -515,7 +583,7 @@ attributes = { LastUpgradeCheck = 0500; }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "cocos2d_jsb_tests" */; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "cocos2d_jsb_samples" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; @@ -638,6 +706,20 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1A487B7A18BF3EE9007EEB98 /* jsb.js in Resources */, + 1A487B7B18BF3EE9007EEB98 /* jsb_chipmunk.js in Resources */, + 1A487B7C18BF3EE9007EEB98 /* jsb_chipmunk_constants.js in Resources */, + 1A487B7D18BF3EE9007EEB98 /* jsb_cocos2d.js in Resources */, + 1A487B7E18BF3EE9007EEB98 /* jsb_cocos2d_constants.js in Resources */, + 1A487B7F18BF3EE9007EEB98 /* jsb_cocos2d_extension.js in Resources */, + 1A487B8018BF3EE9007EEB98 /* jsb_cocos2d_gui.js in Resources */, + 1A487B8118BF3EE9007EEB98 /* jsb_cocos2d_studio.js in Resources */, + 1A487B8218BF3EE9007EEB98 /* jsb_cocosbuilder.js in Resources */, + 1A487B8318BF3EE9007EEB98 /* jsb_debugger.js in Resources */, + 1A487B8418BF3EE9007EEB98 /* jsb_deprecated.js in Resources */, + 1A487B8518BF3EE9007EEB98 /* jsb_opengl.js in Resources */, + 1A487B8618BF3EE9007EEB98 /* jsb_opengl_constants.js in Resources */, + 1A487B8718BF3EE9007EEB98 /* jsb_sys.js in Resources */, 1A604F5518BF1D6000CC9A93 /* Icon-57.png in Resources */, 1A604F5218BF1D6000CC9A93 /* Icon-120.png in Resources */, 1A604F3318BF1D4900CC9A93 /* res in Resources */, @@ -646,6 +728,7 @@ 1A604F5718BF1D6000CC9A93 /* Icon-76.png in Resources */, 1A604F3518BF1D4900CC9A93 /* src in Resources */, 1A604F5018BF1D6000CC9A93 /* Default@2x.png in Resources */, + 1A487B4F18BF3E7F007EEB98 /* debugger in Resources */, 1A604F4E18BF1D6000CC9A93 /* Default-568h@2x.png in Resources */, 1A604F5318BF1D6000CC9A93 /* Icon-144.png in Resources */, 1A604F5418BF1D6000CC9A93 /* Icon-152.png in Resources */, @@ -657,9 +740,24 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1A487B6C18BF3EDF007EEB98 /* jsb.js in Resources */, + 1A487B6D18BF3EDF007EEB98 /* jsb_chipmunk.js in Resources */, + 1A487B6E18BF3EDF007EEB98 /* jsb_chipmunk_constants.js in Resources */, + 1A487B6F18BF3EDF007EEB98 /* jsb_cocos2d.js in Resources */, + 1A487B7018BF3EDF007EEB98 /* jsb_cocos2d_constants.js in Resources */, + 1A487B7118BF3EDF007EEB98 /* jsb_cocos2d_extension.js in Resources */, + 1A487B7218BF3EDF007EEB98 /* jsb_cocos2d_gui.js in Resources */, + 1A487B7318BF3EDF007EEB98 /* jsb_cocos2d_studio.js in Resources */, + 1A487B7418BF3EDF007EEB98 /* jsb_cocosbuilder.js in Resources */, + 1A487B7518BF3EDF007EEB98 /* jsb_debugger.js in Resources */, + 1A487B7618BF3EDF007EEB98 /* jsb_deprecated.js in Resources */, + 1A487B7718BF3EDF007EEB98 /* jsb_opengl.js in Resources */, + 1A487B7818BF3EDF007EEB98 /* jsb_opengl_constants.js in Resources */, + 1A487B7918BF3EDF007EEB98 /* jsb_sys.js in Resources */, 1A604F3218BF1D4900CC9A93 /* res in Resources */, 1A604F6418BF1D6600CC9A93 /* InfoPlist.strings in Resources */, 1A604F6618BF1D6600CC9A93 /* Icon.icns in Resources */, + 1A487B4E18BF3E7F007EEB98 /* debugger in Resources */, 1A604F3418BF1D4900CC9A93 /* src in Resources */, 1A604F6518BF1D6600CC9A93 /* MainMenu.xib in Resources */, ); @@ -927,7 +1025,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "cocos2d_jsb_tests" */ = { + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "cocos2d_jsb_samples" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, diff --git a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_auto.cpp b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_auto.cpp index 38b59d0ede..f89116dc04 100644 --- a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_auto.cpp +++ b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_auto.cpp @@ -2667,6 +2667,26 @@ bool js_cocos2dx_Node_getDescription(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Node_getDescription : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } +bool js_cocos2dx_Node_setRotationSkewY(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + bool ok = true; + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setRotationSkewY : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setRotationSkewY : Error processing arguments"); + cobj->setRotationSkewY(arg0); + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Node_setRotationSkewY : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} bool js_cocos2dx_Node_setOpacityModifyRGB(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); @@ -2855,6 +2875,26 @@ bool js_cocos2dx_Node_setLocalZOrder(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Node_setLocalZOrder : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } +bool js_cocos2dx_Node_setScaleZ(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + bool ok = true; + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setScaleZ : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setScaleZ : Error processing arguments"); + cobj->setScaleZ(arg0); + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Node_setScaleZ : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} bool js_cocos2dx_Node_setScaleY(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); @@ -2895,21 +2935,24 @@ bool js_cocos2dx_Node_setScaleX(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Node_setScaleX : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_Node_getColor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Node_setRotationSkewX(JSContext *cx, uint32_t argc, jsval *vp) { + jsval *argv = JS_ARGV(cx, vp); + bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getColor : Invalid Native Object"); - if (argc == 0) { - const cocos2d::Color3B& ret = cobj->getColor(); - jsval jsret = JSVAL_NULL; - jsret = cccolor3b_to_jsval(cx, ret); - JS_SET_RVAL(cx, vp, jsret); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setRotationSkewX : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setRotationSkewX : Error processing arguments"); + cobj->setRotationSkewX(arg0); + JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_Node_getColor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_Node_setRotationSkewX : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } bool js_cocos2dx_Node_removeAllComponents(JSContext *cx, uint32_t argc, jsval *vp) @@ -2998,6 +3041,23 @@ bool js_cocos2dx_Node_getNodeToWorldTransform(JSContext *cx, uint32_t argc, jsva JS_ReportError(cx, "js_cocos2dx_Node_getNodeToWorldTransform : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } +bool js_cocos2dx_Node_getPosition3D(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getPosition3D : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vertex3F ret = cobj->getPosition3D(); + jsval jsret = JSVAL_NULL; + #pragma warning NO CONVERSION FROM NATIVE FOR Vertex3F; + JS_SET_RVAL(cx, vp, jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Node_getPosition3D : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} bool js_cocos2dx_Node_removeChild(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); @@ -3169,6 +3229,26 @@ bool js_cocos2dx_Node_getOpacity(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Node_getOpacity : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } +bool js_cocos2dx_Node_setNormalizedPosition(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + bool ok = true; + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setNormalizedPosition : Invalid Native Object"); + if (argc == 1) { + cocos2d::Point arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setNormalizedPosition : Error processing arguments"); + cobj->setNormalizedPosition(arg0); + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Node_setNormalizedPosition : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} bool js_cocos2dx_Node_convertTouchToNodeSpace(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); @@ -3231,40 +3311,6 @@ bool js_cocos2dx_Node_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc, JS_ReportError(cx, "js_cocos2dx_Node_removeAllChildrenWithCleanup : wrong number of arguments"); return false; } -bool js_cocos2dx_Node_getRotationX(JSContext *cx, uint32_t argc, jsval *vp) -{ - JSObject *obj = JS_THIS_OBJECT(cx, vp); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getRotationX : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getRotationX(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - JS_SET_RVAL(cx, vp, jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Node_getRotationX : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} -bool js_cocos2dx_Node_getRotationY(JSContext *cx, uint32_t argc, jsval *vp) -{ - JSObject *obj = JS_THIS_OBJECT(cx, vp); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getRotationY : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getRotationY(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - JS_SET_RVAL(cx, vp, jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Node_getRotationY : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} bool js_cocos2dx_Node_getNodeToParentAffineTransform(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); @@ -3326,6 +3372,23 @@ bool js_cocos2dx_Node_setParent(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Node_setParent : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } +bool js_cocos2dx_Node_getRotation3D(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getRotation3D : Invalid Native Object"); + if (argc == 0) { + cocos2d::Vertex3F ret = cobj->getRotation3D(); + jsval jsret = JSVAL_NULL; + #pragma warning NO CONVERSION FROM NATIVE FOR Vertex3F; + JS_SET_RVAL(cx, vp, jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Node_getRotation3D : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} bool js_cocos2dx_Node_getNodeToParentTransform(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); @@ -3343,6 +3406,57 @@ bool js_cocos2dx_Node_getNodeToParentTransform(JSContext *cx, uint32_t argc, jsv JS_ReportError(cx, "js_cocos2dx_Node_getNodeToParentTransform : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } +bool js_cocos2dx_Node_convertTouchToNodeSpaceAR(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + bool ok = true; + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_convertTouchToNodeSpaceAR : Invalid Native Object"); + if (argc == 1) { + cocos2d::Touch* arg0; + do { + if (!argv[0].isObject()) { ok = false; break; } + js_proxy_t *proxy; + JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); + proxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Touch*)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_convertTouchToNodeSpaceAR : Error processing arguments"); + cocos2d::Point ret = cobj->convertTouchToNodeSpaceAR(arg0); + jsval jsret = JSVAL_NULL; + jsret = ccpoint_to_jsval(cx, ret); + JS_SET_RVAL(cx, vp, jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Node_convertTouchToNodeSpaceAR : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_Node_convertToNodeSpace(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + bool ok = true; + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_convertToNodeSpace : Invalid Native Object"); + if (argc == 1) { + cocos2d::Point arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_convertToNodeSpace : Error processing arguments"); + cocos2d::Point ret = cobj->convertToNodeSpace(arg0); + jsval jsret = JSVAL_NULL; + jsret = ccpoint_to_jsval(cx, ret); + JS_SET_RVAL(cx, vp, jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Node_convertToNodeSpace : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} bool js_cocos2dx_Node_resume(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); @@ -3451,44 +3565,44 @@ bool js_cocos2dx_Node_ignoreAnchorPointForPosition(JSContext *cx, uint32_t argc, JS_ReportError(cx, "js_cocos2dx_Node_ignoreAnchorPointForPosition : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_Node_setColor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Node_setPositionZ(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setColor : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setPositionZ : Invalid Native Object"); if (argc == 1) { - cocos2d::Color3B arg0; - ok &= jsval_to_cccolor3b(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setColor : Error processing arguments"); - cobj->setColor(arg0); + double arg0; + ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setPositionZ : Error processing arguments"); + cobj->setPositionZ(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_Node_setColor : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_Node_setPositionZ : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_Node_setPositionY(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Node_setRotation3D(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setPositionY : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setRotation3D : Invalid Native Object"); if (argc == 1) { - double arg0; - ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setPositionY : Error processing arguments"); - cobj->setPositionY(arg0); + cocos2d::Vertex3F arg0; + #pragma warning NO CONVERSION TO NATIVE FOR Vertex3F; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setRotation3D : Error processing arguments"); + cobj->setRotation3D(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_Node_setPositionY : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_Node_setRotation3D : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } bool js_cocos2dx_Node_setPositionX(JSContext *cx, uint32_t argc, jsval *vp) @@ -3809,26 +3923,6 @@ bool js_cocos2dx_Node_transform(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Node_transform : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_Node_setVertexZ(JSContext *cx, uint32_t argc, jsval *vp) -{ - jsval *argv = JS_ARGV(cx, vp); - bool ok = true; - JSObject *obj = JS_THIS_OBJECT(cx, vp); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setVertexZ : Invalid Native Object"); - if (argc == 1) { - double arg0; - ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setVertexZ : Error processing arguments"); - cobj->setVertexZ(arg0); - JS_SET_RVAL(cx, vp, JSVAL_VOID); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Node_setVertexZ : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} bool js_cocos2dx_Node_setScheduler(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); @@ -3951,46 +4045,6 @@ bool js_cocos2dx_Node_getActionByTag(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Node_getActionByTag : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_Node_setRotationX(JSContext *cx, uint32_t argc, jsval *vp) -{ - jsval *argv = JS_ARGV(cx, vp); - bool ok = true; - JSObject *obj = JS_THIS_OBJECT(cx, vp); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setRotationX : Invalid Native Object"); - if (argc == 1) { - double arg0; - ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setRotationX : Error processing arguments"); - cobj->setRotationX(arg0); - JS_SET_RVAL(cx, vp, JSVAL_VOID); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Node_setRotationX : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_Node_setRotationY(JSContext *cx, uint32_t argc, jsval *vp) -{ - jsval *argv = JS_ARGV(cx, vp); - bool ok = true; - JSObject *obj = JS_THIS_OBJECT(cx, vp); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setRotationY : Invalid Native Object"); - if (argc == 1) { - double arg0; - ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setRotationY : Error processing arguments"); - cobj->setRotationY(arg0); - JS_SET_RVAL(cx, vp, JSVAL_VOID); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Node_setRotationY : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} bool js_cocos2dx_Node_setAdditionalTransform(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); @@ -4191,6 +4245,26 @@ bool js_cocos2dx_Node_getPosition(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Node_getPosition : wrong number of arguments"); return false; } +bool js_cocos2dx_Node_setColor(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + bool ok = true; + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setColor : Invalid Native Object"); + if (argc == 1) { + cocos2d::Color3B arg0; + ok &= jsval_to_cccolor3b(cx, argv[0], &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setColor : Error processing arguments"); + cobj->setColor(arg0); + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Node_setColor : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} bool js_cocos2dx_Node_isRunning(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); @@ -4256,6 +4330,23 @@ bool js_cocos2dx_Node_getParent(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Node_getParent : wrong number of arguments"); return false; } +bool js_cocos2dx_Node_getPositionZ(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getPositionZ : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getPositionZ(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + JS_SET_RVAL(cx, vp, jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Node_getPositionZ : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} bool js_cocos2dx_Node_getPositionY(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); @@ -4320,6 +4411,26 @@ bool js_cocos2dx_Node_removeChildByTag(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Node_removeChildByTag : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } +bool js_cocos2dx_Node_setPositionY(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + bool ok = true; + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setPositionY : Invalid Native Object"); + if (argc == 1) { + double arg0; + ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setPositionY : Error processing arguments"); + cobj->setPositionY(arg0); + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Node_setPositionY : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} bool js_cocos2dx_Node_updateDisplayedColor(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); @@ -4377,23 +4488,6 @@ bool js_cocos2dx_Node_getParentToNodeTransform(JSContext *cx, uint32_t argc, jsv JS_ReportError(cx, "js_cocos2dx_Node_getParentToNodeTransform : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_Node_getVertexZ(JSContext *cx, uint32_t argc, jsval *vp) -{ - JSObject *obj = JS_THIS_OBJECT(cx, vp); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getVertexZ : Invalid Native Object"); - if (argc == 0) { - double ret = cobj->getVertexZ(); - jsval jsret = JSVAL_NULL; - jsret = DOUBLE_TO_JSVAL(ret); - JS_SET_RVAL(cx, vp, jsret); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Node_getVertexZ : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} bool js_cocos2dx_Node_setGlobalZOrder(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); @@ -4502,6 +4596,23 @@ bool js_cocos2dx_Node_setOrderOfArrival(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Node_setOrderOfArrival : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } +bool js_cocos2dx_Node_getScaleZ(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getScaleZ : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getScaleZ(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + JS_SET_RVAL(cx, vp, jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Node_getScaleZ : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} bool js_cocos2dx_Node_getScaleY(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); @@ -4654,38 +4765,38 @@ bool js_cocos2dx_Node_getContentSize(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Node_getContentSize : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_Node_getBoundingBox(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Node_getColor(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getBoundingBox : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getColor : Invalid Native Object"); if (argc == 0) { - cocos2d::Rect ret = cobj->getBoundingBox(); + const cocos2d::Color3B& ret = cobj->getColor(); jsval jsret = JSVAL_NULL; - jsret = ccrect_to_jsval(cx, ret); + jsret = cccolor3b_to_jsval(cx, ret); JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_Node_getBoundingBox : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_Node_getColor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_Node_updatePhysicsTransform(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Node_getBoundingBox(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_updatePhysicsTransform : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getBoundingBox : Invalid Native Object"); if (argc == 0) { - bool ret = cobj->updatePhysicsTransform(); + cocos2d::Rect ret = cobj->getBoundingBox(); jsval jsret = JSVAL_NULL; - jsret = BOOLEAN_TO_JSVAL(ret); + jsret = ccrect_to_jsval(cx, ret); JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_Node_updatePhysicsTransform : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_Node_getBoundingBox : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } bool js_cocos2dx_Node_setEventDispatcher(JSContext *cx, uint32_t argc, jsval *vp) @@ -4822,33 +4933,24 @@ bool js_cocos2dx_Node_removeFromParentAndCleanup(JSContext *cx, uint32_t argc, j JS_ReportError(cx, "js_cocos2dx_Node_removeFromParentAndCleanup : wrong number of arguments"); return false; } -bool js_cocos2dx_Node_convertTouchToNodeSpaceAR(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Node_setPosition3D(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_convertTouchToNodeSpaceAR : Invalid Native Object"); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setPosition3D : Invalid Native Object"); if (argc == 1) { - cocos2d::Touch* arg0; - do { - if (!argv[0].isObject()) { ok = false; break; } - js_proxy_t *proxy; - JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); - proxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::Touch*)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_convertTouchToNodeSpaceAR : Error processing arguments"); - cocos2d::Point ret = cobj->convertTouchToNodeSpaceAR(arg0); - jsval jsret = JSVAL_NULL; - jsret = ccpoint_to_jsval(cx, ret); - JS_SET_RVAL(cx, vp, jsret); + cocos2d::Vertex3F arg0; + #pragma warning NO CONVERSION TO NATIVE FOR Vertex3F; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setPosition3D : Error processing arguments"); + cobj->setPosition3D(arg0); + JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_Node_convertTouchToNodeSpaceAR : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_Node_setPosition3D : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } bool js_cocos2dx_Node_update(JSContext *cx, uint32_t argc, jsval *vp) @@ -4920,26 +5022,55 @@ bool js_cocos2dx_Node_getScale(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Node_getScale : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_Node_convertToNodeSpace(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_Node_getNormalizedPosition(JSContext *cx, uint32_t argc, jsval *vp) { - jsval *argv = JS_ARGV(cx, vp); - bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_convertToNodeSpace : Invalid Native Object"); - if (argc == 1) { - cocos2d::Point arg0; - ok &= jsval_to_ccpoint(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_convertToNodeSpace : Error processing arguments"); - cocos2d::Point ret = cobj->convertToNodeSpace(arg0); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getNormalizedPosition : Invalid Native Object"); + if (argc == 0) { + const cocos2d::Point& ret = cobj->getNormalizedPosition(); jsval jsret = JSVAL_NULL; jsret = ccpoint_to_jsval(cx, ret); JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_Node_convertToNodeSpace : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_Node_getNormalizedPosition : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Node_getRotationSkewX(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getRotationSkewX : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getRotationSkewX(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + JS_SET_RVAL(cx, vp, jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Node_getRotationSkewX : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} +bool js_cocos2dx_Node_getRotationSkewY(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getRotationSkewY : Invalid Native Object"); + if (argc == 0) { + double ret = cobj->getRotationSkewY(); + jsval jsret = JSVAL_NULL; + jsret = DOUBLE_TO_JSVAL(ret); + JS_SET_RVAL(cx, vp, jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Node_getRotationSkewY : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } bool js_cocos2dx_Node_setTag(JSContext *cx, uint32_t argc, jsval *vp) @@ -5130,6 +5261,7 @@ void js_register_cocos2dx_Node(JSContext *cx, JSObject *global) { JS_FN("setPhysicsBody", js_cocos2dx_Node_setPhysicsBody, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getShaderProgram", js_cocos2dx_Node_getShaderProgram, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getDescription", js_cocos2dx_Node_getDescription, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRotationSkewY", js_cocos2dx_Node_setRotationSkewY, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setOpacityModifyRGB", js_cocos2dx_Node_setOpacityModifyRGB, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setCascadeOpacityEnabled", js_cocos2dx_Node_setCascadeOpacityEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getChildren", js_cocos2dx_Node_getChildren, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -5139,14 +5271,16 @@ void js_register_cocos2dx_Node(JSContext *cx, JSObject *global) { JS_FN("updateDisplayedOpacity", js_cocos2dx_Node_updateDisplayedOpacity, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setRotation", js_cocos2dx_Node_setRotation, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setZOrder", js_cocos2dx_Node_setLocalZOrder, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setScaleZ", js_cocos2dx_Node_setScaleZ, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setScaleY", js_cocos2dx_Node_setScaleY, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setScaleX", js_cocos2dx_Node_setScaleX, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getColor", js_cocos2dx_Node_getColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRotationSkewX", js_cocos2dx_Node_setRotationSkewX, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("removeAllComponents", js_cocos2dx_Node_removeAllComponents, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("_setLocalZOrder", js_cocos2dx_Node__setLocalZOrder, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getTag", js_cocos2dx_Node_getTag, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getNodeToWorldAffineTransform", js_cocos2dx_Node_getNodeToWorldAffineTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getNodeToWorldTransform", js_cocos2dx_Node_getNodeToWorldTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPosition3D", js_cocos2dx_Node_getPosition3D, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("removeChild", js_cocos2dx_Node_removeChild, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("convertToWorldSpace", js_cocos2dx_Node_convertToWorldSpace, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getScene", js_cocos2dx_Node_getScene, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -5154,21 +5288,23 @@ void js_register_cocos2dx_Node(JSContext *cx, JSObject *global) { JS_FN("setSkewX", js_cocos2dx_Node_setSkewX, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setSkewY", js_cocos2dx_Node_setSkewY, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getOpacity", js_cocos2dx_Node_getOpacity, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setNormalizedPosition", js_cocos2dx_Node_setNormalizedPosition, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("convertTouchToNodeSpace", js_cocos2dx_Node_convertTouchToNodeSpace, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("removeAllChildren", js_cocos2dx_Node_removeAllChildrenWithCleanup, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getRotationX", js_cocos2dx_Node_getRotationX, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getRotationY", js_cocos2dx_Node_getRotationY, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getNodeToParentAffineTransform", js_cocos2dx_Node_getNodeToParentAffineTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("isCascadeOpacityEnabled", js_cocos2dx_Node_isCascadeOpacityEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setParent", js_cocos2dx_Node_setParent, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRotation3D", js_cocos2dx_Node_getRotation3D, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getNodeToParentTransform", js_cocos2dx_Node_getNodeToParentTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("convertTouchToNodeSpaceAR", js_cocos2dx_Node_convertTouchToNodeSpaceAR, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("convertToNodeSpace", js_cocos2dx_Node_convertToNodeSpace, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("resume", js_cocos2dx_Node_resume, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getPhysicsBody", js_cocos2dx_Node_getPhysicsBody, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("stopActionByTag", js_cocos2dx_Node_stopActionByTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("reorderChild", js_cocos2dx_Node_reorderChild, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("ignoreAnchorPointForPosition", js_cocos2dx_Node_ignoreAnchorPointForPosition, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setColor", js_cocos2dx_Node_setColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setPositionY", js_cocos2dx_Node_setPositionY, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPositionZ", js_cocos2dx_Node_setPositionZ, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRotation3D", js_cocos2dx_Node_setRotation3D, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setPositionX", js_cocos2dx_Node_setPositionX, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setNodeToParentTransform", js_cocos2dx_Node_setNodeToParentTransform, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getAnchorPoint", js_cocos2dx_Node_getAnchorPoint, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -5185,15 +5321,12 @@ void js_register_cocos2dx_Node(JSContext *cx, JSObject *global) { JS_FN("getAnchorPointInPoints", js_cocos2dx_Node_getAnchorPointInPoints, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("runAction", js_cocos2dx_Node_runAction, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("transform", js_cocos2dx_Node_transform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setVertexZ", js_cocos2dx_Node_setVertexZ, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setScheduler", js_cocos2dx_Node_setScheduler, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("stopAllActions", js_cocos2dx_Node_stopAllActions, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getSkewX", js_cocos2dx_Node_getSkewX, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getSkewY", js_cocos2dx_Node_getSkewY, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getDisplayedColor", js_cocos2dx_Node_getDisplayedColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getActionByTag", js_cocos2dx_Node_getActionByTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setRotationX", js_cocos2dx_Node_setRotationX, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setRotationY", js_cocos2dx_Node_setRotationY, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setAdditionalTransform", js_cocos2dx_Node_setAdditionalTransform, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getDisplayedOpacity", js_cocos2dx_Node_getDisplayedOpacity, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getScheduler", js_cocos2dx_Node_getScheduler, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -5201,19 +5334,22 @@ void js_register_cocos2dx_Node(JSContext *cx, JSObject *global) { JS_FN("getOrderOfArrival", js_cocos2dx_Node_getOrderOfArrival, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setActionManager", js_cocos2dx_Node_setActionManager, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getPosition", js_cocos2dx_Node_getPosition, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setColor", js_cocos2dx_Node_setColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("isRunning", js_cocos2dx_Node_isRunning, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getParent", js_cocos2dx_Node_getParent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPositionZ", js_cocos2dx_Node_getPositionZ, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getPositionY", js_cocos2dx_Node_getPositionY, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getPositionX", js_cocos2dx_Node_getPositionX, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("removeChildByTag", js_cocos2dx_Node_removeChildByTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPositionY", js_cocos2dx_Node_setPositionY, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("updateDisplayedColor", js_cocos2dx_Node_updateDisplayedColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setVisible", js_cocos2dx_Node_setVisible, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getParentToNodeTransform", js_cocos2dx_Node_getParentToNodeTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getVertexZ", js_cocos2dx_Node_getVertexZ, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setGlobalZOrder", js_cocos2dx_Node_setGlobalZOrder, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setScale", js_cocos2dx_Node_setScale, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getChildByTag", js_cocos2dx_Node_getChildByTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setOrderOfArrival", js_cocos2dx_Node_setOrderOfArrival, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getScaleZ", js_cocos2dx_Node_getScaleZ, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getScaleY", js_cocos2dx_Node_getScaleY, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getScaleX", js_cocos2dx_Node_getScaleX, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getWorldToNodeAffineTransform", js_cocos2dx_Node_getWorldToNodeAffineTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -5222,20 +5358,22 @@ void js_register_cocos2dx_Node(JSContext *cx, JSObject *global) { JS_FN("cleanup", js_cocos2dx_Node_cleanup, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getComponent", js_cocos2dx_Node_getComponent, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getContentSize", js_cocos2dx_Node_getContentSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getColor", js_cocos2dx_Node_getColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getBoundingBox", js_cocos2dx_Node_getBoundingBox, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("updatePhysicsTransform", js_cocos2dx_Node_updatePhysicsTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setEventDispatcher", js_cocos2dx_Node_setEventDispatcher, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getGlobalZOrder", js_cocos2dx_Node_getGlobalZOrder, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("draw", js_cocos2dx_Node_draw, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("transformAncestors", js_cocos2dx_Node_transformAncestors, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setUserObject", js_cocos2dx_Node_setUserObject, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("removeFromParent", js_cocos2dx_Node_removeFromParentAndCleanup, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("convertTouchToNodeSpaceAR", js_cocos2dx_Node_convertTouchToNodeSpaceAR, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPosition3D", js_cocos2dx_Node_setPosition3D, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("update", js_cocos2dx_Node_update, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("sortAllChildren", js_cocos2dx_Node_sortAllChildren, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getWorldToNodeTransform", js_cocos2dx_Node_getWorldToNodeTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getScale", js_cocos2dx_Node_getScale, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("convertToNodeSpace", js_cocos2dx_Node_convertToNodeSpace, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getNormalizedPosition", js_cocos2dx_Node_getNormalizedPosition, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRotationSkewX", js_cocos2dx_Node_getRotationSkewX, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRotationSkewY", js_cocos2dx_Node_getRotationSkewY, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setTag", js_cocos2dx_Node_setTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("isCascadeColorEnabled", js_cocos2dx_Node_isCascadeColorEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("isOpacityModifyRGB", js_cocos2dx_Node_isOpacityModifyRGB, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -7372,6 +7510,29 @@ bool js_cocos2dx_RotateBy_create(JSContext *cx, uint32_t argc, jsval *vp) return true; } } while (0); + + do { + if (argc == 2) { + double arg0; + ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); + if (!ok) { ok = true; break; } + cocos2d::Vertex3F arg1; + #pragma warning NO CONVERSION TO NATIVE FOR Vertex3F; + if (!ok) { ok = true; break; } + cocos2d::RotateBy* ret = cocos2d::RotateBy::create(arg0, arg1); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::RotateBy*)ret); + jsret = OBJECT_TO_JSVAL(proxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + JS_SET_RVAL(cx, vp, jsret); + return true; + } + } while (0); JS_ReportError(cx, "js_cocos2dx_RotateBy_create : wrong number of arguments"); return false; } @@ -22048,21 +22209,6 @@ bool js_cocos2dx_Sprite_removeAllChildrenWithCleanup(JSContext *cx, uint32_t arg JS_ReportError(cx, "js_cocos2dx_Sprite_removeAllChildrenWithCleanup : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_Sprite_updateQuadVertices(JSContext *cx, uint32_t argc, jsval *vp) -{ - JSObject *obj = JS_THIS_OBJECT(cx, vp); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::Sprite* cobj = (cocos2d::Sprite *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Sprite_updateQuadVertices : Invalid Native Object"); - if (argc == 0) { - cobj->updateQuadVertices(); - JS_SET_RVAL(cx, vp, JSVAL_VOID); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_Sprite_updateQuadVertices : wrong number of arguments: %d, was expecting %d", argc, 0); - return false; -} bool js_cocos2dx_Sprite_updateTransform(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); @@ -22698,7 +22844,6 @@ void js_register_cocos2dx_Sprite(JSContext *cx, JSObject *global) { JS_FN("getBatchNode", js_cocos2dx_Sprite_getBatchNode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getOffsetPosition", js_cocos2dx_Sprite_getOffsetPosition, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("removeAllChildrenWithCleanup", js_cocos2dx_Sprite_removeAllChildrenWithCleanup, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("updateQuadVertices", js_cocos2dx_Sprite_updateQuadVertices, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("updateTransform", js_cocos2dx_Sprite_updateTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setTextureRect", js_cocos2dx_Sprite_setTextureRect, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("isFrameDisplayed", js_cocos2dx_Sprite_isFrameDisplayed, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), diff --git a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_auto.hpp b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_auto.hpp index 73327e7a95..eeb7bbeb04 100644 --- a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_auto.hpp +++ b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_auto.hpp @@ -157,6 +157,7 @@ bool js_cocos2dx_Node_removeComponent(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setPhysicsBody(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getShaderProgram(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getDescription(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_setRotationSkewY(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setOpacityModifyRGB(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setCascadeOpacityEnabled(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getChildren(JSContext *cx, uint32_t argc, jsval *vp); @@ -166,14 +167,16 @@ bool js_cocos2dx_Node_isIgnoreAnchorPointForPosition(JSContext *cx, uint32_t arg bool js_cocos2dx_Node_updateDisplayedOpacity(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setRotation(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setLocalZOrder(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_setScaleZ(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setScaleY(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setScaleX(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Node_getColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_setRotationSkewX(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_removeAllComponents(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node__setLocalZOrder(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getTag(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getNodeToWorldAffineTransform(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getNodeToWorldTransform(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_getPosition3D(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_removeChild(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_convertToWorldSpace(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getScene(JSContext *cx, uint32_t argc, jsval *vp); @@ -181,21 +184,23 @@ bool js_cocos2dx_Node_getEventDispatcher(JSContext *cx, uint32_t argc, jsval *vp bool js_cocos2dx_Node_setSkewX(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setSkewY(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getOpacity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_setNormalizedPosition(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_convertTouchToNodeSpace(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Node_getRotationX(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Node_getRotationY(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getNodeToParentAffineTransform(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_isCascadeOpacityEnabled(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setParent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_getRotation3D(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getNodeToParentTransform(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_convertTouchToNodeSpaceAR(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_convertToNodeSpace(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_resume(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getPhysicsBody(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_stopActionByTag(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_reorderChild(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_ignoreAnchorPointForPosition(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Node_setColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Node_setPositionY(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_setPositionZ(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_setRotation3D(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setPositionX(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setNodeToParentTransform(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getAnchorPoint(JSContext *cx, uint32_t argc, jsval *vp); @@ -212,15 +217,12 @@ bool js_cocos2dx_Node_getLocalZOrder(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getAnchorPointInPoints(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_runAction(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_transform(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Node_setVertexZ(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setScheduler(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_stopAllActions(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getSkewX(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getSkewY(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getDisplayedColor(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getActionByTag(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Node_setRotationX(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Node_setRotationY(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setAdditionalTransform(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getDisplayedOpacity(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getScheduler(JSContext *cx, uint32_t argc, jsval *vp); @@ -228,19 +230,22 @@ bool js_cocos2dx_Node_getParentToNodeAffineTransform(JSContext *cx, uint32_t arg bool js_cocos2dx_Node_getOrderOfArrival(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setActionManager(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getPosition(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_setColor(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_isRunning(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getParent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_getPositionZ(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getPositionY(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getPositionX(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_removeChildByTag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_setPositionY(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_updateDisplayedColor(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setVisible(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getParentToNodeTransform(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Node_getVertexZ(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setGlobalZOrder(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setScale(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getChildByTag(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setOrderOfArrival(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_getScaleZ(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getScaleY(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getScaleX(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getWorldToNodeAffineTransform(JSContext *cx, uint32_t argc, jsval *vp); @@ -249,20 +254,22 @@ bool js_cocos2dx_Node_setOpacity(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_cleanup(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getComponent(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getContentSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_getColor(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getBoundingBox(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Node_updatePhysicsTransform(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setEventDispatcher(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getGlobalZOrder(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_draw(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_transformAncestors(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setUserObject(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_removeFromParentAndCleanup(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Node_convertTouchToNodeSpaceAR(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_setPosition3D(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_update(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_sortAllChildren(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getWorldToNodeTransform(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getScale(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Node_convertToNodeSpace(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_getNormalizedPosition(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_getRotationSkewX(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_getRotationSkewY(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_setTag(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_isCascadeColorEnabled(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_isOpacityModifyRGB(JSContext *cx, uint32_t argc, jsval *vp); @@ -1585,7 +1592,6 @@ bool js_cocos2dx_Sprite_setFlippedX(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Sprite_getBatchNode(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Sprite_getOffsetPosition(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Sprite_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_Sprite_updateQuadVertices(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Sprite_updateTransform(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Sprite_setTextureRect(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Sprite_isFrameDisplayed(JSContext *cx, uint32_t argc, jsval *vp); diff --git a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_auto_api.js b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_auto_api.js index e17dc444c1..e0774c7fa4 100644 --- a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_auto_api.js +++ b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_auto_api.js @@ -588,6 +588,12 @@ setPhysicsBody : function () {}, */ getDescription : function () {}, +/** + * @method setRotationSkewY + * @param {float} + */ +setRotationSkewY : function () {}, + /** * @method setOpacityModifyRGB * @param {bool} @@ -636,6 +642,12 @@ setRotation : function () {}, */ setLocalZOrder : function () {}, +/** + * @method setScaleZ + * @param {float} + */ +setScaleZ : function () {}, + /** * @method setScaleY * @param {float} @@ -649,10 +661,10 @@ setScaleY : function () {}, setScaleX : function () {}, /** - * @method getColor - * @return A value converted from C/C++ "const cocos2d::Color3B&" + * @method setRotationSkewX + * @param {float} */ -getColor : function () {}, +setRotationSkewX : function () {}, /** * @method removeAllComponents @@ -683,6 +695,12 @@ getNodeToWorldAffineTransform : function () {}, */ getNodeToWorldTransform : function () {}, +/** + * @method getPosition3D + * @return A value converted from C/C++ "cocos2d::Vertex3F" + */ +getPosition3D : function () {}, + /** * @method removeChild * @param {cocos2d::Node*} @@ -727,6 +745,12 @@ setSkewY : function () {}, */ getOpacity : function () {}, +/** + * @method setNormalizedPosition + * @param {const cocos2d::Point&} + */ +setNormalizedPosition : function () {}, + /** * @method convertTouchToNodeSpace * @return A value converted from C/C++ "cocos2d::Point" @@ -734,18 +758,6 @@ getOpacity : function () {}, */ convertTouchToNodeSpace : function () {}, -/** - * @method getRotationX - * @return A value converted from C/C++ "float" - */ -getRotationX : function () {}, - -/** - * @method getRotationY - * @return A value converted from C/C++ "float" - */ -getRotationY : function () {}, - /** * @method getNodeToParentAffineTransform * @return A value converted from C/C++ "cocos2d::AffineTransform" @@ -764,12 +776,32 @@ isCascadeOpacityEnabled : function () {}, */ setParent : function () {}, +/** + * @method getRotation3D + * @return A value converted from C/C++ "cocos2d::Vertex3F" + */ +getRotation3D : function () {}, + /** * @method getNodeToParentTransform * @return A value converted from C/C++ "const kmMat4&" */ getNodeToParentTransform : function () {}, +/** + * @method convertTouchToNodeSpaceAR + * @return A value converted from C/C++ "cocos2d::Point" + * @param {cocos2d::Touch*} + */ +convertTouchToNodeSpaceAR : function () {}, + +/** + * @method convertToNodeSpace + * @return A value converted from C/C++ "cocos2d::Point" + * @param {const cocos2d::Point&} + */ +convertToNodeSpace : function () {}, + /** * @method resume */ @@ -801,16 +833,16 @@ reorderChild : function () {}, ignoreAnchorPointForPosition : function () {}, /** - * @method setColor - * @param {const cocos2d::Color3B&} + * @method setPositionZ + * @param {float} */ -setColor : function () {}, +setPositionZ : function () {}, /** - * @method setPositionY - * @param {float} + * @method setRotation3D + * @param {const cocos2d::Vertex3F&} */ -setPositionY : function () {}, +setRotation3D : function () {}, /** * @method setPositionX @@ -908,12 +940,6 @@ runAction : function () {}, */ transform : function () {}, -/** - * @method setVertexZ - * @param {float} - */ -setVertexZ : function () {}, - /** * @method setScheduler * @param {cocos2d::Scheduler*} @@ -950,18 +976,6 @@ getDisplayedColor : function () {}, */ getActionByTag : function () {}, -/** - * @method setRotationX - * @param {float} - */ -setRotationX : function () {}, - -/** - * @method setRotationY - * @param {float} - */ -setRotationY : function () {}, - /** * @method getDisplayedOpacity * @return A value converted from C/C++ "GLubyte" @@ -986,12 +1000,24 @@ getOrderOfArrival : function () {}, */ setActionManager : function () {}, +/** + * @method setColor + * @param {const cocos2d::Color3B&} + */ +setColor : function () {}, + /** * @method isRunning * @return A value converted from C/C++ "bool" */ isRunning : function () {}, +/** + * @method getPositionZ + * @return A value converted from C/C++ "float" + */ +getPositionZ : function () {}, + /** * @method getPositionY * @return A value converted from C/C++ "float" @@ -1011,6 +1037,12 @@ getPositionX : function () {}, */ removeChildByTag : function () {}, +/** + * @method setPositionY + * @param {float} + */ +setPositionY : function () {}, + /** * @method updateDisplayedColor * @param {const cocos2d::Color3B&} @@ -1029,12 +1061,6 @@ setVisible : function () {}, */ getParentToNodeTransform : function () {}, -/** - * @method getVertexZ - * @return A value converted from C/C++ "float" - */ -getVertexZ : function () {}, - /** * @method setGlobalZOrder * @param {float} @@ -1054,6 +1080,12 @@ getChildByTag : function () {}, */ setOrderOfArrival : function () {}, +/** + * @method getScaleZ + * @return A value converted from C/C++ "float" + */ +getScaleZ : function () {}, + /** * @method getScaleY * @return A value converted from C/C++ "float" @@ -1103,16 +1135,16 @@ getComponent : function () {}, getContentSize : function () {}, /** - * @method getBoundingBox - * @return A value converted from C/C++ "cocos2d::Rect" + * @method getColor + * @return A value converted from C/C++ "const cocos2d::Color3B&" */ -getBoundingBox : function () {}, +getColor : function () {}, /** - * @method updatePhysicsTransform - * @return A value converted from C/C++ "bool" + * @method getBoundingBox + * @return A value converted from C/C++ "cocos2d::Rect" */ -updatePhysicsTransform : function () {}, +getBoundingBox : function () {}, /** * @method setEventDispatcher @@ -1143,11 +1175,10 @@ transformAncestors : function () {}, setUserObject : function () {}, /** - * @method convertTouchToNodeSpaceAR - * @return A value converted from C/C++ "cocos2d::Point" - * @param {cocos2d::Touch*} + * @method setPosition3D + * @param {const cocos2d::Vertex3F&} */ -convertTouchToNodeSpaceAR : function () {}, +setPosition3D : function () {}, /** * @method update @@ -1173,11 +1204,22 @@ getWorldToNodeTransform : function () {}, getScale : function () {}, /** - * @method convertToNodeSpace - * @return A value converted from C/C++ "cocos2d::Point" - * @param {const cocos2d::Point&} + * @method getNormalizedPosition + * @return A value converted from C/C++ "const cocos2d::Point&" */ -convertToNodeSpace : function () {}, +getNormalizedPosition : function () {}, + +/** + * @method getRotationSkewX + * @return A value converted from C/C++ "float" + */ +getRotationSkewX : function () {}, + +/** + * @method getRotationSkewY + * @return A value converted from C/C++ "float" + */ +getRotationSkewY : function () {}, /** * @method setTag @@ -4160,11 +4202,6 @@ getOffsetPosition : function () {}, */ removeAllChildrenWithCleanup : function () {}, -/** - * @method updateQuadVertices - */ -updateQuadVertices : function () {}, - /** * @method updateTransform */ diff --git a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_gui_auto.cpp b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_gui_auto.cpp index 50d44d8e49..c1abf88dda 100644 --- a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_gui_auto.cpp +++ b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_gui_auto.cpp @@ -36,15 +36,15 @@ static bool js_is_native_obj(JSContext *cx, JS::HandleObject obj, JS::HandleId i vp.set(BOOLEAN_TO_JSVAL(true)); return true; } -JSClass *jsb_cocos2d_gui_LayoutParameter_class; -JSObject *jsb_cocos2d_gui_LayoutParameter_prototype; +JSClass *jsb_cocos2d_ui_LayoutParameter_class; +JSObject *jsb_cocos2d_ui_LayoutParameter_prototype; -bool js_cocos2dx_gui_LayoutParameter_getLayoutType(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LayoutParameter_getLayoutType(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::LayoutParameter* cobj = (cocos2d::gui::LayoutParameter *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_LayoutParameter_getLayoutType : Invalid Native Object"); + cocos2d::ui::LayoutParameter* cobj = (cocos2d::ui::LayoutParameter *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_LayoutParameter_getLayoutType : Invalid Native Object"); if (argc == 0) { int ret = (int)cobj->getLayoutType(); jsval jsret = JSVAL_NULL; @@ -53,17 +53,17 @@ bool js_cocos2dx_gui_LayoutParameter_getLayoutType(JSContext *cx, uint32_t argc, return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LayoutParameter_getLayoutType : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_LayoutParameter_getLayoutType : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_LayoutParameter_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LayoutParameter_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::LayoutParameter* ret = cocos2d::gui::LayoutParameter::create(); + cocos2d::ui::LayoutParameter* ret = cocos2d::ui::LayoutParameter::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::LayoutParameter*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::LayoutParameter*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -72,19 +72,19 @@ bool js_cocos2dx_gui_LayoutParameter_create(JSContext *cx, uint32_t argc, jsval JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LayoutParameter_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_LayoutParameter_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_LayoutParameter_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LayoutParameter_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::LayoutParameter* cobj = new cocos2d::gui::LayoutParameter(); + cocos2d::ui::LayoutParameter* cobj = new cocos2d::ui::LayoutParameter(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -95,32 +95,32 @@ bool js_cocos2dx_gui_LayoutParameter_constructor(JSContext *cx, uint32_t argc, j JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::LayoutParameter"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::LayoutParameter"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LayoutParameter_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_LayoutParameter_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -void js_cocos2d_gui_LayoutParameter_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_LayoutParameter_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (LayoutParameter)", obj); } -void js_register_cocos2dx_gui_LayoutParameter(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_LayoutParameter_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_LayoutParameter_class->name = "LayoutParameter"; - jsb_cocos2d_gui_LayoutParameter_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_LayoutParameter_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_LayoutParameter_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_LayoutParameter_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_LayoutParameter_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_LayoutParameter_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_LayoutParameter_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_LayoutParameter_class->finalize = js_cocos2d_gui_LayoutParameter_finalize; - jsb_cocos2d_gui_LayoutParameter_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_LayoutParameter(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_LayoutParameter_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_LayoutParameter_class->name = "LayoutParameter"; + jsb_cocos2d_ui_LayoutParameter_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_LayoutParameter_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_LayoutParameter_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_LayoutParameter_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_LayoutParameter_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_LayoutParameter_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_LayoutParameter_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_LayoutParameter_class->finalize = js_cocos2d_ui_LayoutParameter_finalize; + jsb_cocos2d_ui_LayoutParameter_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -128,20 +128,20 @@ void js_register_cocos2dx_gui_LayoutParameter(JSContext *cx, JSObject *global) { }; static JSFunctionSpec funcs[] = { - JS_FN("getLayoutType", js_cocos2dx_gui_LayoutParameter_getLayoutType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLayoutType", js_cocos2dx_ui_LayoutParameter_getLayoutType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_LayoutParameter_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_LayoutParameter_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_LayoutParameter_prototype = JS_InitClass( + jsb_cocos2d_ui_LayoutParameter_prototype = JS_InitClass( cx, global, NULL, // parent proto - jsb_cocos2d_gui_LayoutParameter_class, - js_cocos2dx_gui_LayoutParameter_constructor, 0, // constructor + jsb_cocos2d_ui_LayoutParameter_class, + js_cocos2dx_ui_LayoutParameter_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -152,48 +152,48 @@ void js_register_cocos2dx_gui_LayoutParameter(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "LayoutParameter", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_LayoutParameter_class; - p->proto = jsb_cocos2d_gui_LayoutParameter_prototype; + p->jsclass = jsb_cocos2d_ui_LayoutParameter_class; + p->proto = jsb_cocos2d_ui_LayoutParameter_prototype; p->parentProto = NULL; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_LinearLayoutParameter_class; -JSObject *jsb_cocos2d_gui_LinearLayoutParameter_prototype; +JSClass *jsb_cocos2d_ui_LinearLayoutParameter_class; +JSObject *jsb_cocos2d_ui_LinearLayoutParameter_prototype; -bool js_cocos2dx_gui_LinearLayoutParameter_setGravity(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LinearLayoutParameter_setGravity(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::LinearLayoutParameter* cobj = (cocos2d::gui::LinearLayoutParameter *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_LinearLayoutParameter_setGravity : Invalid Native Object"); + cocos2d::ui::LinearLayoutParameter* cobj = (cocos2d::ui::LinearLayoutParameter *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_LinearLayoutParameter_setGravity : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::LinearGravity arg0; + cocos2d::ui::LinearGravity arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_LinearLayoutParameter_setGravity : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_LinearLayoutParameter_setGravity : Error processing arguments"); cobj->setGravity(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LinearLayoutParameter_setGravity : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_LinearLayoutParameter_setGravity : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_LinearLayoutParameter_getGravity(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LinearLayoutParameter_getGravity(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::LinearLayoutParameter* cobj = (cocos2d::gui::LinearLayoutParameter *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_LinearLayoutParameter_getGravity : Invalid Native Object"); + cocos2d::ui::LinearLayoutParameter* cobj = (cocos2d::ui::LinearLayoutParameter *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_LinearLayoutParameter_getGravity : Invalid Native Object"); if (argc == 0) { int ret = (int)cobj->getGravity(); jsval jsret = JSVAL_NULL; @@ -202,17 +202,17 @@ bool js_cocos2dx_gui_LinearLayoutParameter_getGravity(JSContext *cx, uint32_t ar return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LinearLayoutParameter_getGravity : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_LinearLayoutParameter_getGravity : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_LinearLayoutParameter_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LinearLayoutParameter_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::LinearLayoutParameter* ret = cocos2d::gui::LinearLayoutParameter::create(); + cocos2d::ui::LinearLayoutParameter* ret = cocos2d::ui::LinearLayoutParameter::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::LinearLayoutParameter*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::LinearLayoutParameter*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -221,19 +221,19 @@ bool js_cocos2dx_gui_LinearLayoutParameter_create(JSContext *cx, uint32_t argc, JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LinearLayoutParameter_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_LinearLayoutParameter_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_LinearLayoutParameter_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LinearLayoutParameter_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::LinearLayoutParameter* cobj = new cocos2d::gui::LinearLayoutParameter(); + cocos2d::ui::LinearLayoutParameter* cobj = new cocos2d::ui::LinearLayoutParameter(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -244,33 +244,33 @@ bool js_cocos2dx_gui_LinearLayoutParameter_constructor(JSContext *cx, uint32_t a JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::LinearLayoutParameter"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::LinearLayoutParameter"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LinearLayoutParameter_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_LinearLayoutParameter_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -extern JSObject *jsb_cocos2d_gui_LayoutParameter_prototype; +extern JSObject *jsb_cocos2d_ui_LayoutParameter_prototype; -void js_cocos2d_gui_LinearLayoutParameter_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_LinearLayoutParameter_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (LinearLayoutParameter)", obj); } -void js_register_cocos2dx_gui_LinearLayoutParameter(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_LinearLayoutParameter_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_LinearLayoutParameter_class->name = "LinearLayoutParameter"; - jsb_cocos2d_gui_LinearLayoutParameter_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_LinearLayoutParameter_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_LinearLayoutParameter_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_LinearLayoutParameter_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_LinearLayoutParameter_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_LinearLayoutParameter_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_LinearLayoutParameter_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_LinearLayoutParameter_class->finalize = js_cocos2d_gui_LinearLayoutParameter_finalize; - jsb_cocos2d_gui_LinearLayoutParameter_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_LinearLayoutParameter(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_LinearLayoutParameter_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_LinearLayoutParameter_class->name = "LinearLayoutParameter"; + jsb_cocos2d_ui_LinearLayoutParameter_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_LinearLayoutParameter_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_LinearLayoutParameter_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_LinearLayoutParameter_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_LinearLayoutParameter_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_LinearLayoutParameter_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_LinearLayoutParameter_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_LinearLayoutParameter_class->finalize = js_cocos2d_ui_LinearLayoutParameter_finalize; + jsb_cocos2d_ui_LinearLayoutParameter_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -278,21 +278,21 @@ void js_register_cocos2dx_gui_LinearLayoutParameter(JSContext *cx, JSObject *glo }; static JSFunctionSpec funcs[] = { - JS_FN("setGravity", js_cocos2dx_gui_LinearLayoutParameter_setGravity, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getGravity", js_cocos2dx_gui_LinearLayoutParameter_getGravity, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setGravity", js_cocos2dx_ui_LinearLayoutParameter_setGravity, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getGravity", js_cocos2dx_ui_LinearLayoutParameter_getGravity, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_LinearLayoutParameter_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_LinearLayoutParameter_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_LinearLayoutParameter_prototype = JS_InitClass( + jsb_cocos2d_ui_LinearLayoutParameter_prototype = JS_InitClass( cx, global, - jsb_cocos2d_gui_LayoutParameter_prototype, - jsb_cocos2d_gui_LinearLayoutParameter_class, - js_cocos2dx_gui_LinearLayoutParameter_constructor, 0, // constructor + jsb_cocos2d_ui_LayoutParameter_prototype, + jsb_cocos2d_ui_LinearLayoutParameter_class, + js_cocos2dx_ui_LinearLayoutParameter_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -303,68 +303,68 @@ void js_register_cocos2dx_gui_LinearLayoutParameter(JSContext *cx, JSObject *glo // JS_SetPropertyAttributes(cx, global, "LinearLayoutParameter", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_LinearLayoutParameter_class; - p->proto = jsb_cocos2d_gui_LinearLayoutParameter_prototype; - p->parentProto = jsb_cocos2d_gui_LayoutParameter_prototype; + p->jsclass = jsb_cocos2d_ui_LinearLayoutParameter_class; + p->proto = jsb_cocos2d_ui_LinearLayoutParameter_prototype; + p->parentProto = jsb_cocos2d_ui_LayoutParameter_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_RelativeLayoutParameter_class; -JSObject *jsb_cocos2d_gui_RelativeLayoutParameter_prototype; +JSClass *jsb_cocos2d_ui_RelativeLayoutParameter_class; +JSObject *jsb_cocos2d_ui_RelativeLayoutParameter_prototype; -bool js_cocos2dx_gui_RelativeLayoutParameter_setAlign(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_RelativeLayoutParameter_setAlign(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::RelativeLayoutParameter* cobj = (cocos2d::gui::RelativeLayoutParameter *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_RelativeLayoutParameter_setAlign : Invalid Native Object"); + cocos2d::ui::RelativeLayoutParameter* cobj = (cocos2d::ui::RelativeLayoutParameter *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_RelativeLayoutParameter_setAlign : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::RelativeAlign arg0; + cocos2d::ui::RelativeAlign arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_RelativeLayoutParameter_setAlign : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_RelativeLayoutParameter_setAlign : Error processing arguments"); cobj->setAlign(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_RelativeLayoutParameter_setAlign : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_RelativeLayoutParameter_setAlign : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_RelativeLayoutParameter_setRelativeToWidgetName(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_RelativeLayoutParameter_setRelativeToWidgetName(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::RelativeLayoutParameter* cobj = (cocos2d::gui::RelativeLayoutParameter *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_RelativeLayoutParameter_setRelativeToWidgetName : Invalid Native Object"); + cocos2d::ui::RelativeLayoutParameter* cobj = (cocos2d::ui::RelativeLayoutParameter *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_RelativeLayoutParameter_setRelativeToWidgetName : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_RelativeLayoutParameter_setRelativeToWidgetName : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_RelativeLayoutParameter_setRelativeToWidgetName : Error processing arguments"); cobj->setRelativeToWidgetName(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_RelativeLayoutParameter_setRelativeToWidgetName : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_RelativeLayoutParameter_setRelativeToWidgetName : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_RelativeLayoutParameter_getRelativeName(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_RelativeLayoutParameter_getRelativeName(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::RelativeLayoutParameter* cobj = (cocos2d::gui::RelativeLayoutParameter *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_RelativeLayoutParameter_getRelativeName : Invalid Native Object"); + cocos2d::ui::RelativeLayoutParameter* cobj = (cocos2d::ui::RelativeLayoutParameter *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_RelativeLayoutParameter_getRelativeName : Invalid Native Object"); if (argc == 0) { const char* ret = cobj->getRelativeName(); jsval jsret = JSVAL_NULL; @@ -373,15 +373,15 @@ bool js_cocos2dx_gui_RelativeLayoutParameter_getRelativeName(JSContext *cx, uint return true; } - JS_ReportError(cx, "js_cocos2dx_gui_RelativeLayoutParameter_getRelativeName : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_RelativeLayoutParameter_getRelativeName : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_RelativeLayoutParameter_getRelativeToWidgetName(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_RelativeLayoutParameter_getRelativeToWidgetName(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::RelativeLayoutParameter* cobj = (cocos2d::gui::RelativeLayoutParameter *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_RelativeLayoutParameter_getRelativeToWidgetName : Invalid Native Object"); + cocos2d::ui::RelativeLayoutParameter* cobj = (cocos2d::ui::RelativeLayoutParameter *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_RelativeLayoutParameter_getRelativeToWidgetName : Invalid Native Object"); if (argc == 0) { const char* ret = cobj->getRelativeToWidgetName(); jsval jsret = JSVAL_NULL; @@ -390,35 +390,35 @@ bool js_cocos2dx_gui_RelativeLayoutParameter_getRelativeToWidgetName(JSContext * return true; } - JS_ReportError(cx, "js_cocos2dx_gui_RelativeLayoutParameter_getRelativeToWidgetName : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_RelativeLayoutParameter_getRelativeToWidgetName : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_RelativeLayoutParameter_setRelativeName(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_RelativeLayoutParameter_setRelativeName(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::RelativeLayoutParameter* cobj = (cocos2d::gui::RelativeLayoutParameter *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_RelativeLayoutParameter_setRelativeName : Invalid Native Object"); + cocos2d::ui::RelativeLayoutParameter* cobj = (cocos2d::ui::RelativeLayoutParameter *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_RelativeLayoutParameter_setRelativeName : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_RelativeLayoutParameter_setRelativeName : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_RelativeLayoutParameter_setRelativeName : Error processing arguments"); cobj->setRelativeName(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_RelativeLayoutParameter_setRelativeName : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_RelativeLayoutParameter_setRelativeName : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_RelativeLayoutParameter_getAlign(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_RelativeLayoutParameter_getAlign(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::RelativeLayoutParameter* cobj = (cocos2d::gui::RelativeLayoutParameter *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_RelativeLayoutParameter_getAlign : Invalid Native Object"); + cocos2d::ui::RelativeLayoutParameter* cobj = (cocos2d::ui::RelativeLayoutParameter *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_RelativeLayoutParameter_getAlign : Invalid Native Object"); if (argc == 0) { int ret = (int)cobj->getAlign(); jsval jsret = JSVAL_NULL; @@ -427,17 +427,17 @@ bool js_cocos2dx_gui_RelativeLayoutParameter_getAlign(JSContext *cx, uint32_t ar return true; } - JS_ReportError(cx, "js_cocos2dx_gui_RelativeLayoutParameter_getAlign : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_RelativeLayoutParameter_getAlign : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_RelativeLayoutParameter_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_RelativeLayoutParameter_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::RelativeLayoutParameter* ret = cocos2d::gui::RelativeLayoutParameter::create(); + cocos2d::ui::RelativeLayoutParameter* ret = cocos2d::ui::RelativeLayoutParameter::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::RelativeLayoutParameter*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::RelativeLayoutParameter*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -446,19 +446,19 @@ bool js_cocos2dx_gui_RelativeLayoutParameter_create(JSContext *cx, uint32_t argc JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_RelativeLayoutParameter_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_RelativeLayoutParameter_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_RelativeLayoutParameter_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_RelativeLayoutParameter_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::RelativeLayoutParameter* cobj = new cocos2d::gui::RelativeLayoutParameter(); + cocos2d::ui::RelativeLayoutParameter* cobj = new cocos2d::ui::RelativeLayoutParameter(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -469,33 +469,33 @@ bool js_cocos2dx_gui_RelativeLayoutParameter_constructor(JSContext *cx, uint32_t JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::RelativeLayoutParameter"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::RelativeLayoutParameter"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_RelativeLayoutParameter_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_RelativeLayoutParameter_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -extern JSObject *jsb_cocos2d_gui_LayoutParameter_prototype; +extern JSObject *jsb_cocos2d_ui_LayoutParameter_prototype; -void js_cocos2d_gui_RelativeLayoutParameter_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_RelativeLayoutParameter_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (RelativeLayoutParameter)", obj); } -void js_register_cocos2dx_gui_RelativeLayoutParameter(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_RelativeLayoutParameter_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_RelativeLayoutParameter_class->name = "RelativeLayoutParameter"; - jsb_cocos2d_gui_RelativeLayoutParameter_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_RelativeLayoutParameter_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_RelativeLayoutParameter_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_RelativeLayoutParameter_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_RelativeLayoutParameter_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_RelativeLayoutParameter_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_RelativeLayoutParameter_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_RelativeLayoutParameter_class->finalize = js_cocos2d_gui_RelativeLayoutParameter_finalize; - jsb_cocos2d_gui_RelativeLayoutParameter_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_RelativeLayoutParameter(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_RelativeLayoutParameter_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_RelativeLayoutParameter_class->name = "RelativeLayoutParameter"; + jsb_cocos2d_ui_RelativeLayoutParameter_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_RelativeLayoutParameter_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_RelativeLayoutParameter_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_RelativeLayoutParameter_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_RelativeLayoutParameter_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_RelativeLayoutParameter_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_RelativeLayoutParameter_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_RelativeLayoutParameter_class->finalize = js_cocos2d_ui_RelativeLayoutParameter_finalize; + jsb_cocos2d_ui_RelativeLayoutParameter_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -503,25 +503,25 @@ void js_register_cocos2dx_gui_RelativeLayoutParameter(JSContext *cx, JSObject *g }; static JSFunctionSpec funcs[] = { - JS_FN("setAlign", js_cocos2dx_gui_RelativeLayoutParameter_setAlign, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setRelativeToWidgetName", js_cocos2dx_gui_RelativeLayoutParameter_setRelativeToWidgetName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getRelativeName", js_cocos2dx_gui_RelativeLayoutParameter_getRelativeName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getRelativeToWidgetName", js_cocos2dx_gui_RelativeLayoutParameter_getRelativeToWidgetName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setRelativeName", js_cocos2dx_gui_RelativeLayoutParameter_setRelativeName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getAlign", js_cocos2dx_gui_RelativeLayoutParameter_getAlign, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAlign", js_cocos2dx_ui_RelativeLayoutParameter_setAlign, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRelativeToWidgetName", js_cocos2dx_ui_RelativeLayoutParameter_setRelativeToWidgetName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRelativeName", js_cocos2dx_ui_RelativeLayoutParameter_getRelativeName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRelativeToWidgetName", js_cocos2dx_ui_RelativeLayoutParameter_getRelativeToWidgetName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setRelativeName", js_cocos2dx_ui_RelativeLayoutParameter_setRelativeName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAlign", js_cocos2dx_ui_RelativeLayoutParameter_getAlign, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_RelativeLayoutParameter_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_RelativeLayoutParameter_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_RelativeLayoutParameter_prototype = JS_InitClass( + jsb_cocos2d_ui_RelativeLayoutParameter_prototype = JS_InitClass( cx, global, - jsb_cocos2d_gui_LayoutParameter_prototype, - jsb_cocos2d_gui_RelativeLayoutParameter_class, - js_cocos2dx_gui_RelativeLayoutParameter_constructor, 0, // constructor + jsb_cocos2d_ui_LayoutParameter_prototype, + jsb_cocos2d_ui_RelativeLayoutParameter_class, + js_cocos2dx_ui_RelativeLayoutParameter_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -532,28 +532,28 @@ void js_register_cocos2dx_gui_RelativeLayoutParameter(JSContext *cx, JSObject *g // JS_SetPropertyAttributes(cx, global, "RelativeLayoutParameter", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_RelativeLayoutParameter_class; - p->proto = jsb_cocos2d_gui_RelativeLayoutParameter_prototype; - p->parentProto = jsb_cocos2d_gui_LayoutParameter_prototype; + p->jsclass = jsb_cocos2d_ui_RelativeLayoutParameter_class; + p->proto = jsb_cocos2d_ui_RelativeLayoutParameter_prototype; + p->parentProto = jsb_cocos2d_ui_LayoutParameter_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_Widget_class; -JSObject *jsb_cocos2d_gui_Widget_prototype; +JSClass *jsb_cocos2d_ui_Widget_class; +JSObject *jsb_cocos2d_ui_Widget_prototype; -bool js_cocos2dx_gui_Widget_getVirtualRenderer(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getVirtualRenderer(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getVirtualRenderer : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getVirtualRenderer : Invalid Native Object"); if (argc == 0) { cocos2d::Node* ret = cobj->getVirtualRenderer(); jsval jsret = JSVAL_NULL; @@ -569,61 +569,61 @@ bool js_cocos2dx_gui_Widget_getVirtualRenderer(JSContext *cx, uint32_t argc, jsv return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getVirtualRenderer : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getVirtualRenderer : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_setSizePercent(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_setSizePercent(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_setSizePercent : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_setSizePercent : Invalid Native Object"); if (argc == 1) { cocos2d::Point arg0; ok &= jsval_to_ccpoint(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_setSizePercent : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_setSizePercent : Error processing arguments"); cobj->setSizePercent(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_setSizePercent : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_setSizePercent : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_setActionTag(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_setActionTag(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_setActionTag : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_setActionTag : Invalid Native Object"); if (argc == 1) { int arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_setActionTag : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_setActionTag : Error processing arguments"); cobj->setActionTag(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_setActionTag : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_setActionTag : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_getNodeByTag(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getNodeByTag(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getNodeByTag : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getNodeByTag : Invalid Native Object"); if (argc == 1) { int arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_getNodeByTag : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_getNodeByTag : Error processing arguments"); cocos2d::Node* ret = cobj->getNodeByTag(arg0); jsval jsret = JSVAL_NULL; do { @@ -638,15 +638,15 @@ bool js_cocos2dx_gui_Widget_getNodeByTag(JSContext *cx, uint32_t argc, jsval *vp return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getNodeByTag : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getNodeByTag : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_isFlipY(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_isFlipY(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_isFlipY : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_isFlipY : Invalid Native Object"); if (argc == 0) { bool ret = cobj->isFlipY(); jsval jsret = JSVAL_NULL; @@ -655,15 +655,15 @@ bool js_cocos2dx_gui_Widget_isFlipY(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_isFlipY : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_isFlipY : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_getTouchEndPos(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getTouchEndPos(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getTouchEndPos : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getTouchEndPos : Invalid Native Object"); if (argc == 0) { const cocos2d::Point& ret = cobj->getTouchEndPos(); jsval jsret = JSVAL_NULL; @@ -672,35 +672,35 @@ bool js_cocos2dx_gui_Widget_getTouchEndPos(JSContext *cx, uint32_t argc, jsval * return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getTouchEndPos : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getTouchEndPos : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_setPositionPercent(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_setPositionPercent(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_setPositionPercent : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_setPositionPercent : Invalid Native Object"); if (argc == 1) { cocos2d::Point arg0; ok &= jsval_to_ccpoint(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_setPositionPercent : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_setPositionPercent : Error processing arguments"); cobj->setPositionPercent(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_setPositionPercent : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_setPositionPercent : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_getNodes(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getNodes(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getNodes : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getNodes : Invalid Native Object"); if (argc == 0) { cocos2d::Vector& ret = cobj->getNodes(); jsval jsret = JSVAL_NULL; @@ -709,35 +709,35 @@ bool js_cocos2dx_gui_Widget_getNodes(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getNodes : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getNodes : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_setPositionType(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_setPositionType(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_setPositionType : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_setPositionType : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::PositionType arg0; + cocos2d::ui::PositionType arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_setPositionType : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_setPositionType : Error processing arguments"); cobj->setPositionType(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_setPositionType : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_setPositionType : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_getName(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getName(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getName : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getName : Invalid Native Object"); if (argc == 0) { const char* ret = cobj->getName(); jsval jsret = JSVAL_NULL; @@ -746,15 +746,15 @@ bool js_cocos2dx_gui_Widget_getName(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getName : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getName : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_isIgnoreContentAdaptWithSize(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_isIgnoreContentAdaptWithSize(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_isIgnoreContentAdaptWithSize : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_isIgnoreContentAdaptWithSize : Invalid Native Object"); if (argc == 0) { bool ret = cobj->isIgnoreContentAdaptWithSize(); jsval jsret = JSVAL_NULL; @@ -763,30 +763,30 @@ bool js_cocos2dx_gui_Widget_isIgnoreContentAdaptWithSize(JSContext *cx, uint32_t return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_isIgnoreContentAdaptWithSize : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_isIgnoreContentAdaptWithSize : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_updateSizeAndPosition(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_updateSizeAndPosition(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_updateSizeAndPosition : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_updateSizeAndPosition : Invalid Native Object"); if (argc == 0) { cobj->updateSizeAndPosition(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_updateSizeAndPosition : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_updateSizeAndPosition : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_getBottomInParent(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getBottomInParent(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getBottomInParent : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getBottomInParent : Invalid Native Object"); if (argc == 0) { double ret = cobj->getBottomInParent(); jsval jsret = JSVAL_NULL; @@ -795,15 +795,15 @@ bool js_cocos2dx_gui_Widget_getBottomInParent(JSContext *cx, uint32_t argc, jsva return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getBottomInParent : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getBottomInParent : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_getActionTag(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getActionTag(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getActionTag : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getActionTag : Invalid Native Object"); if (argc == 0) { int ret = cobj->getActionTag(); jsval jsret = JSVAL_NULL; @@ -812,26 +812,26 @@ bool js_cocos2dx_gui_Widget_getActionTag(JSContext *cx, uint32_t argc, jsval *vp return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getActionTag : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getActionTag : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_getLayoutParameter(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getLayoutParameter(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getLayoutParameter : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getLayoutParameter : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::LayoutParameterType arg0; + cocos2d::ui::LayoutParameterType arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_getLayoutParameter : Error processing arguments"); - cocos2d::gui::LayoutParameter* ret = cobj->getLayoutParameter(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_getLayoutParameter : Error processing arguments"); + cocos2d::ui::LayoutParameter* ret = cobj->getLayoutParameter(arg0); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::LayoutParameter*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::LayoutParameter*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -841,15 +841,15 @@ bool js_cocos2dx_gui_Widget_getLayoutParameter(JSContext *cx, uint32_t argc, jsv return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getLayoutParameter : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getLayoutParameter : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_getPositionType(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getPositionType(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getPositionType : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getPositionType : Invalid Native Object"); if (argc == 0) { int ret = (int)cobj->getPositionType(); jsval jsret = JSVAL_NULL; @@ -858,46 +858,46 @@ bool js_cocos2dx_gui_Widget_getPositionType(JSContext *cx, uint32_t argc, jsval return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getPositionType : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getPositionType : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_setName(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_setName(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_setName : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_setName : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_setName : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_setName : Error processing arguments"); cobj->setName(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_setName : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_setName : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_getChildByName(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getChildByName(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getChildByName : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getChildByName : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_getChildByName : Error processing arguments"); - cocos2d::gui::Widget* ret = cobj->getChildByName(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_getChildByName : Error processing arguments"); + cocos2d::ui::Widget* ret = cobj->getChildByName(arg0); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::Widget*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::Widget*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -907,15 +907,15 @@ bool js_cocos2dx_gui_Widget_getChildByName(JSContext *cx, uint32_t argc, jsval * return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getChildByName : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getChildByName : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_isEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_isEnabled(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_isEnabled : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_isEnabled : Invalid Native Object"); if (argc == 0) { bool ret = cobj->isEnabled(); jsval jsret = JSVAL_NULL; @@ -924,15 +924,15 @@ bool js_cocos2dx_gui_Widget_isEnabled(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_isEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_isEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_isFlipX(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_isFlipX(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_isFlipX : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_isFlipX : Invalid Native Object"); if (argc == 0) { bool ret = cobj->isFlipX(); jsval jsret = JSVAL_NULL; @@ -941,35 +941,35 @@ bool js_cocos2dx_gui_Widget_isFlipX(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_isFlipX : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_isFlipX : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_removeNodeByTag(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_removeNodeByTag(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_removeNodeByTag : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_removeNodeByTag : Invalid Native Object"); if (argc == 1) { int arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_removeNodeByTag : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_removeNodeByTag : Error processing arguments"); cobj->removeNodeByTag(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_removeNodeByTag : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_removeNodeByTag : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_isTouchEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_isTouchEnabled(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_isTouchEnabled : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_isTouchEnabled : Invalid Native Object"); if (argc == 0) { bool ret = cobj->isTouchEnabled(); jsval jsret = JSVAL_NULL; @@ -978,15 +978,15 @@ bool js_cocos2dx_gui_Widget_isTouchEnabled(JSContext *cx, uint32_t argc, jsval * return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_isTouchEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_isTouchEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_getContentSize(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getContentSize(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getContentSize : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getContentSize : Invalid Native Object"); if (argc == 0) { const cocos2d::Size& ret = cobj->getContentSize(); jsval jsret = JSVAL_NULL; @@ -995,15 +995,15 @@ bool js_cocos2dx_gui_Widget_getContentSize(JSContext *cx, uint32_t argc, jsval * return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getContentSize : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getContentSize : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_getTouchStartPos(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getTouchStartPos(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getTouchStartPos : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getTouchStartPos : Invalid Native Object"); if (argc == 0) { const cocos2d::Point& ret = cobj->getTouchStartPos(); jsval jsret = JSVAL_NULL; @@ -1012,76 +1012,76 @@ bool js_cocos2dx_gui_Widget_getTouchStartPos(JSContext *cx, uint32_t argc, jsval return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getTouchStartPos : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getTouchStartPos : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_didNotSelectSelf(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_didNotSelectSelf(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_didNotSelectSelf : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_didNotSelectSelf : Invalid Native Object"); if (argc == 0) { cobj->didNotSelectSelf(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_didNotSelectSelf : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_didNotSelectSelf : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_setFocused(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_setFocused(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_setFocused : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_setFocused : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_setFocused : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_setFocused : Error processing arguments"); cobj->setFocused(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_setFocused : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_setFocused : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_setTouchEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_setTouchEnabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_setTouchEnabled : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_setTouchEnabled : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_setTouchEnabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_setTouchEnabled : Error processing arguments"); cobj->setTouchEnabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_setTouchEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_setTouchEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_clone(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_clone(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_clone : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_clone : Invalid Native Object"); if (argc == 0) { - cocos2d::gui::Widget* ret = cobj->clone(); + cocos2d::ui::Widget* ret = cobj->clone(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::Widget*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::Widget*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -1091,15 +1091,15 @@ bool js_cocos2dx_gui_Widget_clone(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_clone : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_clone : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_getTouchMovePos(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getTouchMovePos(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getTouchMovePos : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getTouchMovePos : Invalid Native Object"); if (argc == 0) { const cocos2d::Point& ret = cobj->getTouchMovePos(); jsval jsret = JSVAL_NULL; @@ -1108,60 +1108,60 @@ bool js_cocos2dx_gui_Widget_getTouchMovePos(JSContext *cx, uint32_t argc, jsval return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getTouchMovePos : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getTouchMovePos : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_setEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_setEnabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_setEnabled : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_setEnabled : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_setEnabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_setEnabled : Error processing arguments"); cobj->setEnabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_setEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_setEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_setBrightStyle(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_setBrightStyle(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_setBrightStyle : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_setBrightStyle : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::BrightStyle arg0; + cocos2d::ui::BrightStyle arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_setBrightStyle : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_setBrightStyle : Error processing arguments"); cobj->setBrightStyle(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_setBrightStyle : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_setBrightStyle : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_addNode(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_addNode(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = NULL; - cocos2d::gui::Widget* cobj = NULL; + cocos2d::ui::Widget* cobj = NULL; obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_addNode : Invalid Native Object"); + cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_addNode : Invalid Native Object"); do { if (argc == 2) { cocos2d::Node* arg0; @@ -1225,82 +1225,82 @@ bool js_cocos2dx_gui_Widget_addNode(JSContext *cx, uint32_t argc, jsval *vp) } } while(0); - JS_ReportError(cx, "js_cocos2dx_gui_Widget_addNode : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_addNode : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_Widget_setLayoutParameter(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_setLayoutParameter(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_setLayoutParameter : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_setLayoutParameter : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::LayoutParameter* arg0; + cocos2d::ui::LayoutParameter* arg0; do { if (!argv[0].isObject()) { ok = false; break; } js_proxy_t *proxy; JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); proxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::gui::LayoutParameter*)(proxy ? proxy->ptr : NULL); + arg0 = (cocos2d::ui::LayoutParameter*)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_setLayoutParameter : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_setLayoutParameter : Error processing arguments"); cobj->setLayoutParameter(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_setLayoutParameter : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_setLayoutParameter : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_setFlipY(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_setFlipY(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_setFlipY : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_setFlipY : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_setFlipY : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_setFlipY : Error processing arguments"); cobj->setFlipY(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_setFlipY : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_setFlipY : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_setFlipX(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_setFlipX(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_setFlipX : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_setFlipX : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_setFlipX : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_setFlipX : Error processing arguments"); cobj->setFlipX(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_setFlipX : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_setFlipX : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_getLeftInParent(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getLeftInParent(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getLeftInParent : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getLeftInParent : Invalid Native Object"); if (argc == 0) { double ret = cobj->getLeftInParent(); jsval jsret = JSVAL_NULL; @@ -1309,35 +1309,35 @@ bool js_cocos2dx_gui_Widget_getLeftInParent(JSContext *cx, uint32_t argc, jsval return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getLeftInParent : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getLeftInParent : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_ignoreContentAdaptWithSize(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_ignoreContentAdaptWithSize(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_ignoreContentAdaptWithSize : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_ignoreContentAdaptWithSize : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_ignoreContentAdaptWithSize : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_ignoreContentAdaptWithSize : Error processing arguments"); cobj->ignoreContentAdaptWithSize(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_ignoreContentAdaptWithSize : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_ignoreContentAdaptWithSize : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_isBright(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_isBright(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_isBright : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_isBright : Invalid Native Object"); if (argc == 0) { bool ret = cobj->isBright(); jsval jsret = JSVAL_NULL; @@ -1346,21 +1346,21 @@ bool js_cocos2dx_gui_Widget_isBright(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_isBright : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_isBright : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_clippingParentAreaContainPoint(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_clippingParentAreaContainPoint(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_clippingParentAreaContainPoint : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_clippingParentAreaContainPoint : Invalid Native Object"); if (argc == 1) { cocos2d::Point arg0; ok &= jsval_to_ccpoint(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_clippingParentAreaContainPoint : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_clippingParentAreaContainPoint : Error processing arguments"); bool ret = cobj->clippingParentAreaContainPoint(arg0); jsval jsret = JSVAL_NULL; jsret = BOOLEAN_TO_JSVAL(ret); @@ -1368,15 +1368,15 @@ bool js_cocos2dx_gui_Widget_clippingParentAreaContainPoint(JSContext *cx, uint32 return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_clippingParentAreaContainPoint : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_clippingParentAreaContainPoint : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_getSizePercent(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getSizePercent(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getSizePercent : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getSizePercent : Invalid Native Object"); if (argc == 0) { const cocos2d::Point& ret = cobj->getSizePercent(); jsval jsret = JSVAL_NULL; @@ -1385,15 +1385,15 @@ bool js_cocos2dx_gui_Widget_getSizePercent(JSContext *cx, uint32_t argc, jsval * return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getSizePercent : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getSizePercent : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_getTopInParent(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getTopInParent(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getTopInParent : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getTopInParent : Invalid Native Object"); if (argc == 0) { double ret = cobj->getTopInParent(); jsval jsret = JSVAL_NULL; @@ -1402,15 +1402,15 @@ bool js_cocos2dx_gui_Widget_getTopInParent(JSContext *cx, uint32_t argc, jsval * return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getTopInParent : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getTopInParent : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_getWidgetType(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getWidgetType(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getWidgetType : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getWidgetType : Invalid Native Object"); if (argc == 0) { int ret = (int)cobj->getWidgetType(); jsval jsret = JSVAL_NULL; @@ -1419,15 +1419,15 @@ bool js_cocos2dx_gui_Widget_getWidgetType(JSContext *cx, uint32_t argc, jsval *v return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getWidgetType : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getWidgetType : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_getSize(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getSize(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getSize : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getSize : Invalid Native Object"); if (argc == 0) { const cocos2d::Size& ret = cobj->getSize(); jsval jsret = JSVAL_NULL; @@ -1436,15 +1436,15 @@ bool js_cocos2dx_gui_Widget_getSize(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getSize : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getSize : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_getRightInParent(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getRightInParent(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getRightInParent : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getRightInParent : Invalid Native Object"); if (argc == 0) { double ret = cobj->getRightInParent(); jsval jsret = JSVAL_NULL; @@ -1453,15 +1453,15 @@ bool js_cocos2dx_gui_Widget_getRightInParent(JSContext *cx, uint32_t argc, jsval return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getRightInParent : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getRightInParent : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_getSizeType(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getSizeType(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getSizeType : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getSizeType : Invalid Native Object"); if (argc == 0) { int ret = (int)cobj->getSizeType(); jsval jsret = JSVAL_NULL; @@ -1470,17 +1470,17 @@ bool js_cocos2dx_gui_Widget_getSizeType(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getSizeType : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getSizeType : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_removeNode(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_removeNode(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_removeNode : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_removeNode : Invalid Native Object"); if (argc == 1) { cocos2d::Node* arg0; do { @@ -1491,36 +1491,36 @@ bool js_cocos2dx_gui_Widget_removeNode(JSContext *cx, uint32_t argc, jsval *vp) arg0 = (cocos2d::Node*)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_removeNode : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_removeNode : Error processing arguments"); cobj->removeNode(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_removeNode : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_removeNode : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_removeAllNodes(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_removeAllNodes(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_removeAllNodes : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_removeAllNodes : Invalid Native Object"); if (argc == 0) { cobj->removeAllNodes(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_removeAllNodes : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_removeAllNodes : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_getWorldPosition(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getWorldPosition(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getWorldPosition : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getWorldPosition : Invalid Native Object"); if (argc == 0) { cocos2d::Point ret = cobj->getWorldPosition(); jsval jsret = JSVAL_NULL; @@ -1529,15 +1529,15 @@ bool js_cocos2dx_gui_Widget_getWorldPosition(JSContext *cx, uint32_t argc, jsval return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getWorldPosition : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getWorldPosition : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_getPositionPercent(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_getPositionPercent(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_getPositionPercent : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_getPositionPercent : Invalid Native Object"); if (argc == 0) { const cocos2d::Point& ret = cobj->getPositionPercent(); jsval jsret = JSVAL_NULL; @@ -1546,21 +1546,21 @@ bool js_cocos2dx_gui_Widget_getPositionPercent(JSContext *cx, uint32_t argc, jsv return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_getPositionPercent : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_getPositionPercent : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_hitTest(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_hitTest(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_hitTest : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_hitTest : Invalid Native Object"); if (argc == 1) { cocos2d::Point arg0; ok &= jsval_to_ccpoint(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_hitTest : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_hitTest : Error processing arguments"); bool ret = cobj->hitTest(arg0); jsval jsret = JSVAL_NULL; jsret = BOOLEAN_TO_JSVAL(ret); @@ -1568,15 +1568,15 @@ bool js_cocos2dx_gui_Widget_hitTest(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_hitTest : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_hitTest : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_isFocused(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_isFocused(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_isFocused : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_isFocused : Invalid Native Object"); if (argc == 0) { bool ret = cobj->isFocused(); jsval jsret = JSVAL_NULL; @@ -1585,40 +1585,40 @@ bool js_cocos2dx_gui_Widget_isFocused(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_isFocused : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_isFocused : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Widget_setSizeType(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_setSizeType(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_setSizeType : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_setSizeType : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::SizeType arg0; + cocos2d::ui::SizeType arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_setSizeType : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_setSizeType : Error processing arguments"); cobj->setSizeType(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_setSizeType : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_setSizeType : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_checkChildInfo(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_checkChildInfo(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_checkChildInfo : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_checkChildInfo : Invalid Native Object"); if (argc == 3) { int arg0; - cocos2d::gui::Widget* arg1; + cocos2d::ui::Widget* arg1; cocos2d::Point arg2; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); do { @@ -1626,67 +1626,67 @@ bool js_cocos2dx_gui_Widget_checkChildInfo(JSContext *cx, uint32_t argc, jsval * js_proxy_t *proxy; JSObject *tmpObj = JSVAL_TO_OBJECT(argv[1]); proxy = jsb_get_js_proxy(tmpObj); - arg1 = (cocos2d::gui::Widget*)(proxy ? proxy->ptr : NULL); + arg1 = (cocos2d::ui::Widget*)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); } while (0); ok &= jsval_to_ccpoint(cx, argv[2], &arg2); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_checkChildInfo : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_checkChildInfo : Error processing arguments"); cobj->checkChildInfo(arg0, arg1, arg2); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_checkChildInfo : wrong number of arguments: %d, was expecting %d", argc, 3); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_checkChildInfo : wrong number of arguments: %d, was expecting %d", argc, 3); return false; } -bool js_cocos2dx_gui_Widget_setSize(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_setSize(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_setSize : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_setSize : Invalid Native Object"); if (argc == 1) { cocos2d::Size arg0; ok &= jsval_to_ccsize(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_setSize : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_setSize : Error processing arguments"); cobj->setSize(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_setSize : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_setSize : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_setBright(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_setBright(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Widget* cobj = (cocos2d::gui::Widget *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Widget_setBright : Invalid Native Object"); + cocos2d::ui::Widget* cobj = (cocos2d::ui::Widget *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Widget_setBright : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Widget_setBright : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Widget_setBright : Error processing arguments"); cobj->setBright(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_setBright : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_setBright : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Widget_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::Widget* ret = cocos2d::gui::Widget::create(); + cocos2d::ui::Widget* ret = cocos2d::ui::Widget::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::Widget*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::Widget*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -1695,19 +1695,19 @@ bool js_cocos2dx_gui_Widget_create(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_Widget_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Widget_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::Widget* cobj = new cocos2d::gui::Widget(); + cocos2d::ui::Widget* cobj = new cocos2d::ui::Widget(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -1718,33 +1718,33 @@ bool js_cocos2dx_gui_Widget_constructor(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::Widget"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::Widget"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Widget_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Widget_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } extern JSObject *jsb_cocos2d_Node_prototype; -void js_cocos2d_gui_Widget_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_Widget_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (Widget)", obj); } -void js_register_cocos2dx_gui_Widget(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_Widget_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_Widget_class->name = "Widget"; - jsb_cocos2d_gui_Widget_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_Widget_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_Widget_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_Widget_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_Widget_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_Widget_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_Widget_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_Widget_class->finalize = js_cocos2d_gui_Widget_finalize; - jsb_cocos2d_gui_Widget_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_Widget(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_Widget_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_Widget_class->name = "Widget"; + jsb_cocos2d_ui_Widget_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_Widget_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_Widget_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_Widget_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_Widget_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_Widget_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_Widget_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_Widget_class->finalize = js_cocos2d_ui_Widget_finalize; + jsb_cocos2d_ui_Widget_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -1752,74 +1752,74 @@ void js_register_cocos2dx_gui_Widget(JSContext *cx, JSObject *global) { }; static JSFunctionSpec funcs[] = { - JS_FN("getVirtualRenderer", js_cocos2dx_gui_Widget_getVirtualRenderer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setSizePercent", js_cocos2dx_gui_Widget_setSizePercent, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setActionTag", js_cocos2dx_gui_Widget_setActionTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getNodeByTag", js_cocos2dx_gui_Widget_getNodeByTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isFlipY", js_cocos2dx_gui_Widget_isFlipY, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTouchEndPos", js_cocos2dx_gui_Widget_getTouchEndPos, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setPositionPercent", js_cocos2dx_gui_Widget_setPositionPercent, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getNodes", js_cocos2dx_gui_Widget_getNodes, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setPositionType", js_cocos2dx_gui_Widget_setPositionType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getName", js_cocos2dx_gui_Widget_getName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isIgnoreContentAdaptWithSize", js_cocos2dx_gui_Widget_isIgnoreContentAdaptWithSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("updateSizeAndPosition", js_cocos2dx_gui_Widget_updateSizeAndPosition, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBottomInParent", js_cocos2dx_gui_Widget_getBottomInParent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getActionTag", js_cocos2dx_gui_Widget_getActionTag, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getLayoutParameter", js_cocos2dx_gui_Widget_getLayoutParameter, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getPositionType", js_cocos2dx_gui_Widget_getPositionType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setName", js_cocos2dx_gui_Widget_setName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getChildByName", js_cocos2dx_gui_Widget_getChildByName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isEnabled", js_cocos2dx_gui_Widget_isEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isFlipX", js_cocos2dx_gui_Widget_isFlipX, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeNodeByTag", js_cocos2dx_gui_Widget_removeNodeByTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isTouchEnabled", js_cocos2dx_gui_Widget_isTouchEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getContentSize", js_cocos2dx_gui_Widget_getContentSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTouchStartPos", js_cocos2dx_gui_Widget_getTouchStartPos, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("didNotSelectSelf", js_cocos2dx_gui_Widget_didNotSelectSelf, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFocused", js_cocos2dx_gui_Widget_setFocused, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTouchEnabled", js_cocos2dx_gui_Widget_setTouchEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("clone", js_cocos2dx_gui_Widget_clone, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTouchMovePos", js_cocos2dx_gui_Widget_getTouchMovePos, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setEnabled", js_cocos2dx_gui_Widget_setEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBrightStyle", js_cocos2dx_gui_Widget_setBrightStyle, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("addNode", js_cocos2dx_gui_Widget_addNode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setLayoutParameter", js_cocos2dx_gui_Widget_setLayoutParameter, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFlipY", js_cocos2dx_gui_Widget_setFlipY, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFlipX", js_cocos2dx_gui_Widget_setFlipX, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getLeftInParent", js_cocos2dx_gui_Widget_getLeftInParent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ignoreContentAdaptWithSize", js_cocos2dx_gui_Widget_ignoreContentAdaptWithSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isBright", js_cocos2dx_gui_Widget_isBright, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("clippingParentAreaContainPoint", js_cocos2dx_gui_Widget_clippingParentAreaContainPoint, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getSizePercent", js_cocos2dx_gui_Widget_getSizePercent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTopInParent", js_cocos2dx_gui_Widget_getTopInParent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getWidgetType", js_cocos2dx_gui_Widget_getWidgetType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getSize", js_cocos2dx_gui_Widget_getSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getRightInParent", js_cocos2dx_gui_Widget_getRightInParent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getSizeType", js_cocos2dx_gui_Widget_getSizeType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeNode", js_cocos2dx_gui_Widget_removeNode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAllNodes", js_cocos2dx_gui_Widget_removeAllNodes, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getWorldPosition", js_cocos2dx_gui_Widget_getWorldPosition, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getPositionPercent", js_cocos2dx_gui_Widget_getPositionPercent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("hitTest", js_cocos2dx_gui_Widget_hitTest, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isFocused", js_cocos2dx_gui_Widget_isFocused, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setSizeType", js_cocos2dx_gui_Widget_setSizeType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("checkChildInfo", js_cocos2dx_gui_Widget_checkChildInfo, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setSize", js_cocos2dx_gui_Widget_setSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBright", js_cocos2dx_gui_Widget_setBright, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getVirtualRenderer", js_cocos2dx_ui_Widget_getVirtualRenderer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSizePercent", js_cocos2dx_ui_Widget_setSizePercent, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setActionTag", js_cocos2dx_ui_Widget_setActionTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getNodeByTag", js_cocos2dx_ui_Widget_getNodeByTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isFlipY", js_cocos2dx_ui_Widget_isFlipY, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTouchEndPos", js_cocos2dx_ui_Widget_getTouchEndPos, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPositionPercent", js_cocos2dx_ui_Widget_setPositionPercent, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getNodes", js_cocos2dx_ui_Widget_getNodes, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPositionType", js_cocos2dx_ui_Widget_setPositionType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getName", js_cocos2dx_ui_Widget_getName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isIgnoreContentAdaptWithSize", js_cocos2dx_ui_Widget_isIgnoreContentAdaptWithSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("updateSizeAndPosition", js_cocos2dx_ui_Widget_updateSizeAndPosition, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBottomInParent", js_cocos2dx_ui_Widget_getBottomInParent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getActionTag", js_cocos2dx_ui_Widget_getActionTag, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLayoutParameter", js_cocos2dx_ui_Widget_getLayoutParameter, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPositionType", js_cocos2dx_ui_Widget_getPositionType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setName", js_cocos2dx_ui_Widget_setName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getChildByName", js_cocos2dx_ui_Widget_getChildByName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isEnabled", js_cocos2dx_ui_Widget_isEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isFlipX", js_cocos2dx_ui_Widget_isFlipX, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeNodeByTag", js_cocos2dx_ui_Widget_removeNodeByTag, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isTouchEnabled", js_cocos2dx_ui_Widget_isTouchEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getContentSize", js_cocos2dx_ui_Widget_getContentSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTouchStartPos", js_cocos2dx_ui_Widget_getTouchStartPos, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("didNotSelectSelf", js_cocos2dx_ui_Widget_didNotSelectSelf, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFocused", js_cocos2dx_ui_Widget_setFocused, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTouchEnabled", js_cocos2dx_ui_Widget_setTouchEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("clone", js_cocos2dx_ui_Widget_clone, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTouchMovePos", js_cocos2dx_ui_Widget_getTouchMovePos, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setEnabled", js_cocos2dx_ui_Widget_setEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBrightStyle", js_cocos2dx_ui_Widget_setBrightStyle, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("addNode", js_cocos2dx_ui_Widget_addNode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setLayoutParameter", js_cocos2dx_ui_Widget_setLayoutParameter, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFlipY", js_cocos2dx_ui_Widget_setFlipY, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFlipX", js_cocos2dx_ui_Widget_setFlipX, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLeftInParent", js_cocos2dx_ui_Widget_getLeftInParent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ignoreContentAdaptWithSize", js_cocos2dx_ui_Widget_ignoreContentAdaptWithSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isBright", js_cocos2dx_ui_Widget_isBright, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("clippingParentAreaContainPoint", js_cocos2dx_ui_Widget_clippingParentAreaContainPoint, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSizePercent", js_cocos2dx_ui_Widget_getSizePercent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTopInParent", js_cocos2dx_ui_Widget_getTopInParent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getWidgetType", js_cocos2dx_ui_Widget_getWidgetType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSize", js_cocos2dx_ui_Widget_getSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getRightInParent", js_cocos2dx_ui_Widget_getRightInParent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSizeType", js_cocos2dx_ui_Widget_getSizeType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeNode", js_cocos2dx_ui_Widget_removeNode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllNodes", js_cocos2dx_ui_Widget_removeAllNodes, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getWorldPosition", js_cocos2dx_ui_Widget_getWorldPosition, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPositionPercent", js_cocos2dx_ui_Widget_getPositionPercent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("hitTest", js_cocos2dx_ui_Widget_hitTest, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isFocused", js_cocos2dx_ui_Widget_isFocused, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSizeType", js_cocos2dx_ui_Widget_setSizeType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("checkChildInfo", js_cocos2dx_ui_Widget_checkChildInfo, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSize", js_cocos2dx_ui_Widget_setSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBright", js_cocos2dx_ui_Widget_setBright, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_Widget_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_Widget_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_Widget_prototype = JS_InitClass( + jsb_cocos2d_ui_Widget_prototype = JS_InitClass( cx, global, jsb_cocos2d_Node_prototype, - jsb_cocos2d_gui_Widget_class, - js_cocos2dx_gui_Widget_constructor, 0, // constructor + jsb_cocos2d_ui_Widget_class, + js_cocos2dx_ui_Widget_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -1830,54 +1830,54 @@ void js_register_cocos2dx_gui_Widget(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "Widget", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_Widget_class; - p->proto = jsb_cocos2d_gui_Widget_prototype; + p->jsclass = jsb_cocos2d_ui_Widget_class; + p->proto = jsb_cocos2d_ui_Widget_prototype; p->parentProto = jsb_cocos2d_Node_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_Layout_class; -JSObject *jsb_cocos2d_gui_Layout_prototype; +JSClass *jsb_cocos2d_ui_Layout_class; +JSObject *jsb_cocos2d_ui_Layout_prototype; -bool js_cocos2dx_gui_Layout_setBackGroundColorVector(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_setBackGroundColorVector(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Layout* cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_setBackGroundColorVector : Invalid Native Object"); + cocos2d::ui::Layout* cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_setBackGroundColorVector : Invalid Native Object"); if (argc == 1) { cocos2d::Point arg0; ok &= jsval_to_ccpoint(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Layout_setBackGroundColorVector : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Layout_setBackGroundColorVector : Error processing arguments"); cobj->setBackGroundColorVector(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_setBackGroundColorVector : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_setBackGroundColorVector : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Layout_hitTest(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_hitTest(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Layout* cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_hitTest : Invalid Native Object"); + cocos2d::ui::Layout* cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_hitTest : Invalid Native Object"); if (argc == 1) { cocos2d::Point arg0; ok &= jsval_to_ccpoint(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Layout_hitTest : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Layout_hitTest : Error processing arguments"); bool ret = cobj->hitTest(arg0); jsval jsret = JSVAL_NULL; jsret = BOOLEAN_TO_JSVAL(ret); @@ -1885,15 +1885,15 @@ bool js_cocos2dx_gui_Layout_hitTest(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_hitTest : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_hitTest : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Layout_getBackGroundImageTextureSize(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_getBackGroundImageTextureSize(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Layout* cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_getBackGroundImageTextureSize : Invalid Native Object"); + cocos2d::ui::Layout* cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_getBackGroundImageTextureSize : Invalid Native Object"); if (argc == 0) { const cocos2d::Size& ret = cobj->getBackGroundImageTextureSize(); jsval jsret = JSVAL_NULL; @@ -1902,15 +1902,15 @@ bool js_cocos2dx_gui_Layout_getBackGroundImageTextureSize(JSContext *cx, uint32_ return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_getBackGroundImageTextureSize : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_getBackGroundImageTextureSize : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Layout_getLayoutType(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_getLayoutType(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Layout* cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_getLayoutType : Invalid Native Object"); + cocos2d::ui::Layout* cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_getLayoutType : Invalid Native Object"); if (argc == 0) { int ret = (int)cobj->getLayoutType(); jsval jsret = JSVAL_NULL; @@ -1919,90 +1919,90 @@ bool js_cocos2dx_gui_Layout_getLayoutType(JSContext *cx, uint32_t argc, jsval *v return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_getLayoutType : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_getLayoutType : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Layout_setClippingType(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_setClippingType(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Layout* cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_setClippingType : Invalid Native Object"); + cocos2d::ui::Layout* cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_setClippingType : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::LayoutClippingType arg0; + cocos2d::ui::LayoutClippingType arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Layout_setClippingType : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Layout_setClippingType : Error processing arguments"); cobj->setClippingType(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_setClippingType : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_setClippingType : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Layout_setBackGroundColorType(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_setBackGroundColorType(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Layout* cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_setBackGroundColorType : Invalid Native Object"); + cocos2d::ui::Layout* cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_setBackGroundColorType : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::LayoutBackGroundColorType arg0; + cocos2d::ui::LayoutBackGroundColorType arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Layout_setBackGroundColorType : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Layout_setBackGroundColorType : Error processing arguments"); cobj->setBackGroundColorType(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_setBackGroundColorType : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_setBackGroundColorType : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Layout_setBackGroundImage(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_setBackGroundImage(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Layout* cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_setBackGroundImage : Invalid Native Object"); + cocos2d::ui::Layout* cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_setBackGroundImage : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Layout_setBackGroundImage : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Layout_setBackGroundImage : Error processing arguments"); cobj->setBackGroundImage(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Layout_setBackGroundImage : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Layout_setBackGroundImage : Error processing arguments"); cobj->setBackGroundImage(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_setBackGroundImage : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_setBackGroundImage : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Layout_setBackGroundColor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_setBackGroundColor(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = NULL; - cocos2d::gui::Layout* cobj = NULL; + cocos2d::ui::Layout* cobj = NULL; obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_setBackGroundColor : Invalid Native Object"); + cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_setBackGroundColor : Invalid Native Object"); do { if (argc == 2) { cocos2d::Color3B arg0; @@ -2028,30 +2028,30 @@ bool js_cocos2dx_gui_Layout_setBackGroundColor(JSContext *cx, uint32_t argc, jsv } } while(0); - JS_ReportError(cx, "js_cocos2dx_gui_Layout_setBackGroundColor : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_setBackGroundColor : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_Layout_requestDoLayout(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_requestDoLayout(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Layout* cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_requestDoLayout : Invalid Native Object"); + cocos2d::ui::Layout* cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_requestDoLayout : Invalid Native Object"); if (argc == 0) { cobj->requestDoLayout(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_requestDoLayout : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_requestDoLayout : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Layout_isClippingEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_isClippingEnabled(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Layout* cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_isClippingEnabled : Invalid Native Object"); + cocos2d::ui::Layout* cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_isClippingEnabled : Invalid Native Object"); if (argc == 0) { bool ret = cobj->isClippingEnabled(); jsval jsret = JSVAL_NULL; @@ -2060,132 +2060,132 @@ bool js_cocos2dx_gui_Layout_isClippingEnabled(JSContext *cx, uint32_t argc, jsva return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_isClippingEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_isClippingEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Layout_setBackGroundColorOpacity(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_setBackGroundColorOpacity(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Layout* cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_setBackGroundColorOpacity : Invalid Native Object"); + cocos2d::ui::Layout* cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_setBackGroundColorOpacity : Invalid Native Object"); if (argc == 1) { int arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Layout_setBackGroundColorOpacity : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Layout_setBackGroundColorOpacity : Error processing arguments"); cobj->setBackGroundColorOpacity(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_setBackGroundColorOpacity : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_setBackGroundColorOpacity : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Layout_setBackGroundImageCapInsets(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_setBackGroundImageCapInsets(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Layout* cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_setBackGroundImageCapInsets : Invalid Native Object"); + cocos2d::ui::Layout* cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_setBackGroundImageCapInsets : Invalid Native Object"); if (argc == 1) { cocos2d::Rect arg0; ok &= jsval_to_ccrect(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Layout_setBackGroundImageCapInsets : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Layout_setBackGroundImageCapInsets : Error processing arguments"); cobj->setBackGroundImageCapInsets(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_setBackGroundImageCapInsets : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_setBackGroundImageCapInsets : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Layout_removeBackGroundImage(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_removeBackGroundImage(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Layout* cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_removeBackGroundImage : Invalid Native Object"); + cocos2d::ui::Layout* cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_removeBackGroundImage : Invalid Native Object"); if (argc == 0) { cobj->removeBackGroundImage(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_removeBackGroundImage : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_removeBackGroundImage : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Layout_setBackGroundImageScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_setBackGroundImageScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Layout* cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_setBackGroundImageScale9Enabled : Invalid Native Object"); + cocos2d::ui::Layout* cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_setBackGroundImageScale9Enabled : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Layout_setBackGroundImageScale9Enabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Layout_setBackGroundImageScale9Enabled : Error processing arguments"); cobj->setBackGroundImageScale9Enabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_setBackGroundImageScale9Enabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_setBackGroundImageScale9Enabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Layout_setClippingEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_setClippingEnabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Layout* cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_setClippingEnabled : Invalid Native Object"); + cocos2d::ui::Layout* cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_setClippingEnabled : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Layout_setClippingEnabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Layout_setClippingEnabled : Error processing arguments"); cobj->setClippingEnabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_setClippingEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_setClippingEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Layout_setLayoutType(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_setLayoutType(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Layout* cobj = (cocos2d::gui::Layout *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Layout_setLayoutType : Invalid Native Object"); + cocos2d::ui::Layout* cobj = (cocos2d::ui::Layout *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Layout_setLayoutType : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::LayoutType arg0; + cocos2d::ui::LayoutType arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Layout_setLayoutType : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Layout_setLayoutType : Error processing arguments"); cobj->setLayoutType(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_setLayoutType : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_setLayoutType : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Layout_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::Layout* ret = cocos2d::gui::Layout::create(); + cocos2d::ui::Layout* ret = cocos2d::ui::Layout::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::Layout*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::Layout*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -2194,19 +2194,19 @@ bool js_cocos2dx_gui_Layout_create(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_Layout_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Layout_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::Layout* cobj = new cocos2d::gui::Layout(); + cocos2d::ui::Layout* cobj = new cocos2d::ui::Layout(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -2217,33 +2217,33 @@ bool js_cocos2dx_gui_Layout_constructor(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::Layout"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::Layout"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Layout_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Layout_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -extern JSObject *jsb_cocos2d_gui_Widget_prototype; +extern JSObject *jsb_cocos2d_ui_Widget_prototype; -void js_cocos2d_gui_Layout_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_Layout_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (Layout)", obj); } -void js_register_cocos2dx_gui_Layout(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_Layout_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_Layout_class->name = "Layout"; - jsb_cocos2d_gui_Layout_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_Layout_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_Layout_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_Layout_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_Layout_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_Layout_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_Layout_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_Layout_class->finalize = js_cocos2d_gui_Layout_finalize; - jsb_cocos2d_gui_Layout_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_Layout(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_Layout_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_Layout_class->name = "Layout"; + jsb_cocos2d_ui_Layout_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_Layout_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_Layout_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_Layout_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_Layout_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_Layout_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_Layout_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_Layout_class->finalize = js_cocos2d_ui_Layout_finalize; + jsb_cocos2d_ui_Layout_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -2251,35 +2251,35 @@ void js_register_cocos2dx_gui_Layout(JSContext *cx, JSObject *global) { }; static JSFunctionSpec funcs[] = { - JS_FN("setBackGroundColorVector", js_cocos2dx_gui_Layout_setBackGroundColorVector, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("hitTest", js_cocos2dx_gui_Layout_hitTest, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getBackGroundImageTextureSize", js_cocos2dx_gui_Layout_getBackGroundImageTextureSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getLayoutType", js_cocos2dx_gui_Layout_getLayoutType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setClippingType", js_cocos2dx_gui_Layout_setClippingType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBackGroundColorType", js_cocos2dx_gui_Layout_setBackGroundColorType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBackGroundImage", js_cocos2dx_gui_Layout_setBackGroundImage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBackGroundColor", js_cocos2dx_gui_Layout_setBackGroundColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("requestDoLayout", js_cocos2dx_gui_Layout_requestDoLayout, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isClippingEnabled", js_cocos2dx_gui_Layout_isClippingEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBackGroundColorOpacity", js_cocos2dx_gui_Layout_setBackGroundColorOpacity, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBackGroundImageCapInsets", js_cocos2dx_gui_Layout_setBackGroundImageCapInsets, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeBackGroundImage", js_cocos2dx_gui_Layout_removeBackGroundImage, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBackGroundImageScale9Enabled", js_cocos2dx_gui_Layout_setBackGroundImageScale9Enabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setClippingEnabled", js_cocos2dx_gui_Layout_setClippingEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setLayoutType", js_cocos2dx_gui_Layout_setLayoutType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBackGroundColorVector", js_cocos2dx_ui_Layout_setBackGroundColorVector, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("hitTest", js_cocos2dx_ui_Layout_hitTest, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getBackGroundImageTextureSize", js_cocos2dx_ui_Layout_getBackGroundImageTextureSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLayoutType", js_cocos2dx_ui_Layout_getLayoutType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setClippingType", js_cocos2dx_ui_Layout_setClippingType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBackGroundColorType", js_cocos2dx_ui_Layout_setBackGroundColorType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBackGroundImage", js_cocos2dx_ui_Layout_setBackGroundImage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBackGroundColor", js_cocos2dx_ui_Layout_setBackGroundColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("requestDoLayout", js_cocos2dx_ui_Layout_requestDoLayout, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isClippingEnabled", js_cocos2dx_ui_Layout_isClippingEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBackGroundColorOpacity", js_cocos2dx_ui_Layout_setBackGroundColorOpacity, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBackGroundImageCapInsets", js_cocos2dx_ui_Layout_setBackGroundImageCapInsets, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeBackGroundImage", js_cocos2dx_ui_Layout_removeBackGroundImage, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBackGroundImageScale9Enabled", js_cocos2dx_ui_Layout_setBackGroundImageScale9Enabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setClippingEnabled", js_cocos2dx_ui_Layout_setClippingEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setLayoutType", js_cocos2dx_ui_Layout_setLayoutType, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_Layout_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_Layout_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_Layout_prototype = JS_InitClass( + jsb_cocos2d_ui_Layout_prototype = JS_InitClass( cx, global, - jsb_cocos2d_gui_Widget_prototype, - jsb_cocos2d_gui_Layout_class, - js_cocos2dx_gui_Layout_constructor, 0, // constructor + jsb_cocos2d_ui_Widget_prototype, + jsb_cocos2d_ui_Layout_class, + js_cocos2dx_ui_Layout_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -2290,28 +2290,28 @@ void js_register_cocos2dx_gui_Layout(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "Layout", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_Layout_class; - p->proto = jsb_cocos2d_gui_Layout_prototype; - p->parentProto = jsb_cocos2d_gui_Widget_prototype; + p->jsclass = jsb_cocos2d_ui_Layout_class; + p->proto = jsb_cocos2d_ui_Layout_prototype; + p->parentProto = jsb_cocos2d_ui_Widget_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_Button_class; -JSObject *jsb_cocos2d_gui_Button_prototype; +JSClass *jsb_cocos2d_ui_Button_class; +JSObject *jsb_cocos2d_ui_Button_prototype; -bool js_cocos2dx_gui_Button_getTitleText(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_getTitleText(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_getTitleText : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_getTitleText : Invalid Native Object"); if (argc == 0) { const std::string& ret = cobj->getTitleText(); jsval jsret = JSVAL_NULL; @@ -2320,175 +2320,175 @@ bool js_cocos2dx_gui_Button_getTitleText(JSContext *cx, uint32_t argc, jsval *vp return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_getTitleText : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Button_getTitleText : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Button_loadTextureNormal(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_loadTextureNormal(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_loadTextureNormal : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_loadTextureNormal : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_loadTextureNormal : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_loadTextureNormal : Error processing arguments"); cobj->loadTextureNormal(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_loadTextureNormal : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_loadTextureNormal : Error processing arguments"); cobj->loadTextureNormal(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_loadTextureNormal : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Button_loadTextureNormal : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Button_setCapInsetsNormalRenderer(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_setCapInsetsNormalRenderer(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_setCapInsetsNormalRenderer : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_setCapInsetsNormalRenderer : Invalid Native Object"); if (argc == 1) { cocos2d::Rect arg0; ok &= jsval_to_ccrect(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_setCapInsetsNormalRenderer : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_setCapInsetsNormalRenderer : Error processing arguments"); cobj->setCapInsetsNormalRenderer(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_setCapInsetsNormalRenderer : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Button_setCapInsetsNormalRenderer : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Button_setCapInsetsPressedRenderer(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_setCapInsetsPressedRenderer(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_setCapInsetsPressedRenderer : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_setCapInsetsPressedRenderer : Invalid Native Object"); if (argc == 1) { cocos2d::Rect arg0; ok &= jsval_to_ccrect(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_setCapInsetsPressedRenderer : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_setCapInsetsPressedRenderer : Error processing arguments"); cobj->setCapInsetsPressedRenderer(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_setCapInsetsPressedRenderer : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Button_setCapInsetsPressedRenderer : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Button_loadTexturePressed(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_loadTexturePressed(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_loadTexturePressed : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_loadTexturePressed : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_loadTexturePressed : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_loadTexturePressed : Error processing arguments"); cobj->loadTexturePressed(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_loadTexturePressed : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_loadTexturePressed : Error processing arguments"); cobj->loadTexturePressed(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_loadTexturePressed : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Button_loadTexturePressed : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Button_setTitleFontSize(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_setTitleFontSize(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_setTitleFontSize : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_setTitleFontSize : Invalid Native Object"); if (argc == 1) { double arg0; ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_setTitleFontSize : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_setTitleFontSize : Error processing arguments"); cobj->setTitleFontSize(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_setTitleFontSize : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Button_setTitleFontSize : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Button_setCapInsetsDisabledRenderer(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_setCapInsetsDisabledRenderer(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_setCapInsetsDisabledRenderer : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_setCapInsetsDisabledRenderer : Invalid Native Object"); if (argc == 1) { cocos2d::Rect arg0; ok &= jsval_to_ccrect(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_setCapInsetsDisabledRenderer : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_setCapInsetsDisabledRenderer : Error processing arguments"); cobj->setCapInsetsDisabledRenderer(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_setCapInsetsDisabledRenderer : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Button_setCapInsetsDisabledRenderer : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Button_setTitleFontName(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_setTitleFontName(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_setTitleFontName : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_setTitleFontName : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_setTitleFontName : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_setTitleFontName : Error processing arguments"); cobj->setTitleFontName(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_setTitleFontName : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Button_setTitleFontName : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Button_getTitleColor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_getTitleColor(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_getTitleColor : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_getTitleColor : Invalid Native Object"); if (argc == 0) { const cocos2d::Color3B& ret = cobj->getTitleColor(); jsval jsret = JSVAL_NULL; @@ -2497,45 +2497,45 @@ bool js_cocos2dx_gui_Button_getTitleColor(JSContext *cx, uint32_t argc, jsval *v return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_getTitleColor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Button_getTitleColor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Button_loadTextureDisabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_loadTextureDisabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_loadTextureDisabled : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_loadTextureDisabled : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_loadTextureDisabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_loadTextureDisabled : Error processing arguments"); cobj->loadTextureDisabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_loadTextureDisabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_loadTextureDisabled : Error processing arguments"); cobj->loadTextureDisabled(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_loadTextureDisabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Button_loadTextureDisabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Button_getTitleFontName(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_getTitleFontName(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_getTitleFontName : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_getTitleFontName : Invalid Native Object"); if (argc == 0) { const char* ret = cobj->getTitleFontName(); jsval jsret = JSVAL_NULL; @@ -2544,77 +2544,77 @@ bool js_cocos2dx_gui_Button_getTitleFontName(JSContext *cx, uint32_t argc, jsval return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_getTitleFontName : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Button_getTitleFontName : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Button_setPressedActionEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_setPressedActionEnabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_setPressedActionEnabled : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_setPressedActionEnabled : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_setPressedActionEnabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_setPressedActionEnabled : Error processing arguments"); cobj->setPressedActionEnabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_setPressedActionEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Button_setPressedActionEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Button_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_setCapInsets : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_setCapInsets : Invalid Native Object"); if (argc == 1) { cocos2d::Rect arg0; ok &= jsval_to_ccrect(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_setCapInsets : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_setCapInsets : Error processing arguments"); cobj->setCapInsets(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_setCapInsets : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Button_setCapInsets : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Button_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_setScale9Enabled : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_setScale9Enabled : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_setScale9Enabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_setScale9Enabled : Error processing arguments"); cobj->setScale9Enabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_setScale9Enabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Button_setScale9Enabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Button_loadTextures(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_loadTextures(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_loadTextures : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_loadTextures : Invalid Native Object"); if (argc == 3) { const char* arg0; const char* arg1; @@ -2622,7 +2622,7 @@ bool js_cocos2dx_gui_Button_loadTextures(JSContext *cx, uint32_t argc, jsval *vp std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); std::string arg1_tmp; ok &= jsval_to_std_string(cx, argv[1], &arg1_tmp); arg1 = arg1_tmp.c_str(); std::string arg2_tmp; ok &= jsval_to_std_string(cx, argv[2], &arg2_tmp); arg2 = arg2_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_loadTextures : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_loadTextures : Error processing arguments"); cobj->loadTextures(arg0, arg1, arg2); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; @@ -2631,26 +2631,26 @@ bool js_cocos2dx_gui_Button_loadTextures(JSContext *cx, uint32_t argc, jsval *vp const char* arg0; const char* arg1; const char* arg2; - cocos2d::gui::TextureResType arg3; + cocos2d::ui::TextureResType arg3; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); std::string arg1_tmp; ok &= jsval_to_std_string(cx, argv[1], &arg1_tmp); arg1 = arg1_tmp.c_str(); std::string arg2_tmp; ok &= jsval_to_std_string(cx, argv[2], &arg2_tmp); arg2 = arg2_tmp.c_str(); ok &= jsval_to_int32(cx, argv[3], (int32_t *)&arg3); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_loadTextures : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_loadTextures : Error processing arguments"); cobj->loadTextures(arg0, arg1, arg2, arg3); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_loadTextures : wrong number of arguments: %d, was expecting %d", argc, 3); + JS_ReportError(cx, "js_cocos2dx_ui_Button_loadTextures : wrong number of arguments: %d, was expecting %d", argc, 3); return false; } -bool js_cocos2dx_gui_Button_getTitleFontSize(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_getTitleFontSize(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_getTitleFontSize : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_getTitleFontSize : Invalid Native Object"); if (argc == 0) { double ret = cobj->getTitleFontSize(); jsval jsret = JSVAL_NULL; @@ -2659,57 +2659,57 @@ bool js_cocos2dx_gui_Button_getTitleFontSize(JSContext *cx, uint32_t argc, jsval return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_getTitleFontSize : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Button_getTitleFontSize : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Button_setTitleText(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_setTitleText(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_setTitleText : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_setTitleText : Invalid Native Object"); if (argc == 1) { std::string arg0; ok &= jsval_to_std_string(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_setTitleText : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_setTitleText : Error processing arguments"); cobj->setTitleText(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_setTitleText : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Button_setTitleText : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Button_setTitleColor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_setTitleColor(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Button* cobj = (cocos2d::gui::Button *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Button_setTitleColor : Invalid Native Object"); + cocos2d::ui::Button* cobj = (cocos2d::ui::Button *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Button_setTitleColor : Invalid Native Object"); if (argc == 1) { cocos2d::Color3B arg0; ok &= jsval_to_cccolor3b(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Button_setTitleColor : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Button_setTitleColor : Error processing arguments"); cobj->setTitleColor(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_setTitleColor : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Button_setTitleColor : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Button_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::Button* ret = cocos2d::gui::Button::create(); + cocos2d::ui::Button* ret = cocos2d::ui::Button::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::Button*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::Button*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -2718,19 +2718,19 @@ bool js_cocos2dx_gui_Button_create(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_Button_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_Button_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Button_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::Button* cobj = new cocos2d::gui::Button(); + cocos2d::ui::Button* cobj = new cocos2d::ui::Button(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -2741,33 +2741,33 @@ bool js_cocos2dx_gui_Button_constructor(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::Button"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::Button"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Button_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Button_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -extern JSObject *jsb_cocos2d_gui_Widget_prototype; +extern JSObject *jsb_cocos2d_ui_Widget_prototype; -void js_cocos2d_gui_Button_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_Button_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (Button)", obj); } -void js_register_cocos2dx_gui_Button(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_Button_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_Button_class->name = "Button"; - jsb_cocos2d_gui_Button_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_Button_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_Button_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_Button_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_Button_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_Button_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_Button_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_Button_class->finalize = js_cocos2d_gui_Button_finalize; - jsb_cocos2d_gui_Button_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_Button(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_Button_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_Button_class->name = "Button"; + jsb_cocos2d_ui_Button_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_Button_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_Button_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_Button_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_Button_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_Button_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_Button_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_Button_class->finalize = js_cocos2d_ui_Button_finalize; + jsb_cocos2d_ui_Button_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -2775,37 +2775,37 @@ void js_register_cocos2dx_gui_Button(JSContext *cx, JSObject *global) { }; static JSFunctionSpec funcs[] = { - JS_FN("getTitleText", js_cocos2dx_gui_Button_getTitleText, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadTextureNormal", js_cocos2dx_gui_Button_loadTextureNormal, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setCapInsetsNormalRenderer", js_cocos2dx_gui_Button_setCapInsetsNormalRenderer, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setCapInsetsPressedRenderer", js_cocos2dx_gui_Button_setCapInsetsPressedRenderer, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadTexturePressed", js_cocos2dx_gui_Button_loadTexturePressed, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTitleFontSize", js_cocos2dx_gui_Button_setTitleFontSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setCapInsetsDisabledRenderer", js_cocos2dx_gui_Button_setCapInsetsDisabledRenderer, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTitleFontName", js_cocos2dx_gui_Button_setTitleFontName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTitleColor", js_cocos2dx_gui_Button_getTitleColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadTextureDisabled", js_cocos2dx_gui_Button_loadTextureDisabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTitleFontName", js_cocos2dx_gui_Button_getTitleFontName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setPressedActionEnabled", js_cocos2dx_gui_Button_setPressedActionEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setCapInsets", js_cocos2dx_gui_Button_setCapInsets, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setScale9Enabled", js_cocos2dx_gui_Button_setScale9Enabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadTextures", js_cocos2dx_gui_Button_loadTextures, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTitleFontSize", js_cocos2dx_gui_Button_getTitleFontSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTitleText", js_cocos2dx_gui_Button_setTitleText, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTitleColor", js_cocos2dx_gui_Button_setTitleColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTitleText", js_cocos2dx_ui_Button_getTitleText, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadTextureNormal", js_cocos2dx_ui_Button_loadTextureNormal, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCapInsetsNormalRenderer", js_cocos2dx_ui_Button_setCapInsetsNormalRenderer, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCapInsetsPressedRenderer", js_cocos2dx_ui_Button_setCapInsetsPressedRenderer, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadTexturePressed", js_cocos2dx_ui_Button_loadTexturePressed, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTitleFontSize", js_cocos2dx_ui_Button_setTitleFontSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCapInsetsDisabledRenderer", js_cocos2dx_ui_Button_setCapInsetsDisabledRenderer, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTitleFontName", js_cocos2dx_ui_Button_setTitleFontName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTitleColor", js_cocos2dx_ui_Button_getTitleColor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadTextureDisabled", js_cocos2dx_ui_Button_loadTextureDisabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTitleFontName", js_cocos2dx_ui_Button_getTitleFontName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPressedActionEnabled", js_cocos2dx_ui_Button_setPressedActionEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCapInsets", js_cocos2dx_ui_Button_setCapInsets, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setScale9Enabled", js_cocos2dx_ui_Button_setScale9Enabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadTextures", js_cocos2dx_ui_Button_loadTextures, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTitleFontSize", js_cocos2dx_ui_Button_getTitleFontSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTitleText", js_cocos2dx_ui_Button_setTitleText, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTitleColor", js_cocos2dx_ui_Button_setTitleColor, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_Button_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_Button_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_Button_prototype = JS_InitClass( + jsb_cocos2d_ui_Button_prototype = JS_InitClass( cx, global, - jsb_cocos2d_gui_Widget_prototype, - jsb_cocos2d_gui_Button_class, - js_cocos2dx_gui_Button_constructor, 0, // constructor + jsb_cocos2d_ui_Widget_prototype, + jsb_cocos2d_ui_Button_class, + js_cocos2dx_ui_Button_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -2816,28 +2816,28 @@ void js_register_cocos2dx_gui_Button(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "Button", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_Button_class; - p->proto = jsb_cocos2d_gui_Button_prototype; - p->parentProto = jsb_cocos2d_gui_Widget_prototype; + p->jsclass = jsb_cocos2d_ui_Button_class; + p->proto = jsb_cocos2d_ui_Button_prototype; + p->parentProto = jsb_cocos2d_ui_Widget_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_CheckBox_class; -JSObject *jsb_cocos2d_gui_CheckBox_prototype; +JSClass *jsb_cocos2d_ui_CheckBox_class; +JSObject *jsb_cocos2d_ui_CheckBox_prototype; -bool js_cocos2dx_gui_CheckBox_getSelectedState(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_CheckBox_getSelectedState(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::CheckBox* cobj = (cocos2d::gui::CheckBox *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_CheckBox_getSelectedState : Invalid Native Object"); + cocos2d::ui::CheckBox* cobj = (cocos2d::ui::CheckBox *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_CheckBox_getSelectedState : Invalid Native Object"); if (argc == 0) { bool ret = cobj->getSelectedState(); jsval jsret = JSVAL_NULL; @@ -2846,107 +2846,107 @@ bool js_cocos2dx_gui_CheckBox_getSelectedState(JSContext *cx, uint32_t argc, jsv return true; } - JS_ReportError(cx, "js_cocos2dx_gui_CheckBox_getSelectedState : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_CheckBox_getSelectedState : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_CheckBox_loadTextureBackGroundSelected(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_CheckBox_loadTextureBackGroundSelected(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::CheckBox* cobj = (cocos2d::gui::CheckBox *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_CheckBox_loadTextureBackGroundSelected : Invalid Native Object"); + cocos2d::ui::CheckBox* cobj = (cocos2d::ui::CheckBox *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_CheckBox_loadTextureBackGroundSelected : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_CheckBox_loadTextureBackGroundSelected : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_CheckBox_loadTextureBackGroundSelected : Error processing arguments"); cobj->loadTextureBackGroundSelected(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_CheckBox_loadTextureBackGroundSelected : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_CheckBox_loadTextureBackGroundSelected : Error processing arguments"); cobj->loadTextureBackGroundSelected(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_CheckBox_loadTextureBackGroundSelected : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_CheckBox_loadTextureBackGroundSelected : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_CheckBox_loadTextureBackGroundDisabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_CheckBox_loadTextureBackGroundDisabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::CheckBox* cobj = (cocos2d::gui::CheckBox *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_CheckBox_loadTextureBackGroundDisabled : Invalid Native Object"); + cocos2d::ui::CheckBox* cobj = (cocos2d::ui::CheckBox *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_CheckBox_loadTextureBackGroundDisabled : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_CheckBox_loadTextureBackGroundDisabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_CheckBox_loadTextureBackGroundDisabled : Error processing arguments"); cobj->loadTextureBackGroundDisabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_CheckBox_loadTextureBackGroundDisabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_CheckBox_loadTextureBackGroundDisabled : Error processing arguments"); cobj->loadTextureBackGroundDisabled(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_CheckBox_loadTextureBackGroundDisabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_CheckBox_loadTextureBackGroundDisabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_CheckBox_loadTextureFrontCross(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_CheckBox_loadTextureFrontCross(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::CheckBox* cobj = (cocos2d::gui::CheckBox *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_CheckBox_loadTextureFrontCross : Invalid Native Object"); + cocos2d::ui::CheckBox* cobj = (cocos2d::ui::CheckBox *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_CheckBox_loadTextureFrontCross : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_CheckBox_loadTextureFrontCross : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_CheckBox_loadTextureFrontCross : Error processing arguments"); cobj->loadTextureFrontCross(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_CheckBox_loadTextureFrontCross : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_CheckBox_loadTextureFrontCross : Error processing arguments"); cobj->loadTextureFrontCross(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_CheckBox_loadTextureFrontCross : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_CheckBox_loadTextureFrontCross : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_CheckBox_loadTextures(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_CheckBox_loadTextures(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::CheckBox* cobj = (cocos2d::gui::CheckBox *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_CheckBox_loadTextures : Invalid Native Object"); + cocos2d::ui::CheckBox* cobj = (cocos2d::ui::CheckBox *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_CheckBox_loadTextures : Invalid Native Object"); if (argc == 5) { const char* arg0; const char* arg1; @@ -2958,7 +2958,7 @@ bool js_cocos2dx_gui_CheckBox_loadTextures(JSContext *cx, uint32_t argc, jsval * std::string arg2_tmp; ok &= jsval_to_std_string(cx, argv[2], &arg2_tmp); arg2 = arg2_tmp.c_str(); std::string arg3_tmp; ok &= jsval_to_std_string(cx, argv[3], &arg3_tmp); arg3 = arg3_tmp.c_str(); std::string arg4_tmp; ok &= jsval_to_std_string(cx, argv[4], &arg4_tmp); arg4 = arg4_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_CheckBox_loadTextures : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_CheckBox_loadTextures : Error processing arguments"); cobj->loadTextures(arg0, arg1, arg2, arg3, arg4); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; @@ -2969,110 +2969,110 @@ bool js_cocos2dx_gui_CheckBox_loadTextures(JSContext *cx, uint32_t argc, jsval * const char* arg2; const char* arg3; const char* arg4; - cocos2d::gui::TextureResType arg5; + cocos2d::ui::TextureResType arg5; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); std::string arg1_tmp; ok &= jsval_to_std_string(cx, argv[1], &arg1_tmp); arg1 = arg1_tmp.c_str(); std::string arg2_tmp; ok &= jsval_to_std_string(cx, argv[2], &arg2_tmp); arg2 = arg2_tmp.c_str(); std::string arg3_tmp; ok &= jsval_to_std_string(cx, argv[3], &arg3_tmp); arg3 = arg3_tmp.c_str(); std::string arg4_tmp; ok &= jsval_to_std_string(cx, argv[4], &arg4_tmp); arg4 = arg4_tmp.c_str(); ok &= jsval_to_int32(cx, argv[5], (int32_t *)&arg5); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_CheckBox_loadTextures : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_CheckBox_loadTextures : Error processing arguments"); cobj->loadTextures(arg0, arg1, arg2, arg3, arg4, arg5); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_CheckBox_loadTextures : wrong number of arguments: %d, was expecting %d", argc, 5); + JS_ReportError(cx, "js_cocos2dx_ui_CheckBox_loadTextures : wrong number of arguments: %d, was expecting %d", argc, 5); return false; } -bool js_cocos2dx_gui_CheckBox_loadTextureBackGround(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_CheckBox_loadTextureBackGround(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::CheckBox* cobj = (cocos2d::gui::CheckBox *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_CheckBox_loadTextureBackGround : Invalid Native Object"); + cocos2d::ui::CheckBox* cobj = (cocos2d::ui::CheckBox *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_CheckBox_loadTextureBackGround : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_CheckBox_loadTextureBackGround : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_CheckBox_loadTextureBackGround : Error processing arguments"); cobj->loadTextureBackGround(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_CheckBox_loadTextureBackGround : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_CheckBox_loadTextureBackGround : Error processing arguments"); cobj->loadTextureBackGround(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_CheckBox_loadTextureBackGround : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_CheckBox_loadTextureBackGround : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_CheckBox_setSelectedState(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_CheckBox_setSelectedState(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::CheckBox* cobj = (cocos2d::gui::CheckBox *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_CheckBox_setSelectedState : Invalid Native Object"); + cocos2d::ui::CheckBox* cobj = (cocos2d::ui::CheckBox *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_CheckBox_setSelectedState : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_CheckBox_setSelectedState : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_CheckBox_setSelectedState : Error processing arguments"); cobj->setSelectedState(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_CheckBox_setSelectedState : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_CheckBox_setSelectedState : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_CheckBox_loadTextureFrontCrossDisabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_CheckBox_loadTextureFrontCrossDisabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::CheckBox* cobj = (cocos2d::gui::CheckBox *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_CheckBox_loadTextureFrontCrossDisabled : Invalid Native Object"); + cocos2d::ui::CheckBox* cobj = (cocos2d::ui::CheckBox *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_CheckBox_loadTextureFrontCrossDisabled : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_CheckBox_loadTextureFrontCrossDisabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_CheckBox_loadTextureFrontCrossDisabled : Error processing arguments"); cobj->loadTextureFrontCrossDisabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_CheckBox_loadTextureFrontCrossDisabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_CheckBox_loadTextureFrontCrossDisabled : Error processing arguments"); cobj->loadTextureFrontCrossDisabled(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_CheckBox_loadTextureFrontCrossDisabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_CheckBox_loadTextureFrontCrossDisabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_CheckBox_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_CheckBox_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::CheckBox* ret = cocos2d::gui::CheckBox::create(); + cocos2d::ui::CheckBox* ret = cocos2d::ui::CheckBox::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::CheckBox*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::CheckBox*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -3081,19 +3081,19 @@ bool js_cocos2dx_gui_CheckBox_create(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_CheckBox_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_CheckBox_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_CheckBox_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_CheckBox_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::CheckBox* cobj = new cocos2d::gui::CheckBox(); + cocos2d::ui::CheckBox* cobj = new cocos2d::ui::CheckBox(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -3104,33 +3104,33 @@ bool js_cocos2dx_gui_CheckBox_constructor(JSContext *cx, uint32_t argc, jsval *v JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::CheckBox"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::CheckBox"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_CheckBox_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_CheckBox_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -extern JSObject *jsb_cocos2d_gui_Widget_prototype; +extern JSObject *jsb_cocos2d_ui_Widget_prototype; -void js_cocos2d_gui_CheckBox_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_CheckBox_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (CheckBox)", obj); } -void js_register_cocos2dx_gui_CheckBox(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_CheckBox_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_CheckBox_class->name = "CheckBox"; - jsb_cocos2d_gui_CheckBox_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_CheckBox_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_CheckBox_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_CheckBox_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_CheckBox_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_CheckBox_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_CheckBox_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_CheckBox_class->finalize = js_cocos2d_gui_CheckBox_finalize; - jsb_cocos2d_gui_CheckBox_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_CheckBox(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_CheckBox_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_CheckBox_class->name = "CheckBox"; + jsb_cocos2d_ui_CheckBox_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_CheckBox_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_CheckBox_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_CheckBox_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_CheckBox_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_CheckBox_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_CheckBox_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_CheckBox_class->finalize = js_cocos2d_ui_CheckBox_finalize; + jsb_cocos2d_ui_CheckBox_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -3138,27 +3138,27 @@ void js_register_cocos2dx_gui_CheckBox(JSContext *cx, JSObject *global) { }; static JSFunctionSpec funcs[] = { - JS_FN("getSelectedState", js_cocos2dx_gui_CheckBox_getSelectedState, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadTextureBackGroundSelected", js_cocos2dx_gui_CheckBox_loadTextureBackGroundSelected, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadTextureBackGroundDisabled", js_cocos2dx_gui_CheckBox_loadTextureBackGroundDisabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadTextureFrontCross", js_cocos2dx_gui_CheckBox_loadTextureFrontCross, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadTextures", js_cocos2dx_gui_CheckBox_loadTextures, 5, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadTextureBackGround", js_cocos2dx_gui_CheckBox_loadTextureBackGround, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setSelectedState", js_cocos2dx_gui_CheckBox_setSelectedState, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadTextureFrontCrossDisabled", js_cocos2dx_gui_CheckBox_loadTextureFrontCrossDisabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getSelectedState", js_cocos2dx_ui_CheckBox_getSelectedState, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadTextureBackGroundSelected", js_cocos2dx_ui_CheckBox_loadTextureBackGroundSelected, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadTextureBackGroundDisabled", js_cocos2dx_ui_CheckBox_loadTextureBackGroundDisabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadTextureFrontCross", js_cocos2dx_ui_CheckBox_loadTextureFrontCross, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadTextures", js_cocos2dx_ui_CheckBox_loadTextures, 5, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadTextureBackGround", js_cocos2dx_ui_CheckBox_loadTextureBackGround, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setSelectedState", js_cocos2dx_ui_CheckBox_setSelectedState, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadTextureFrontCrossDisabled", js_cocos2dx_ui_CheckBox_loadTextureFrontCrossDisabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_CheckBox_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_CheckBox_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_CheckBox_prototype = JS_InitClass( + jsb_cocos2d_ui_CheckBox_prototype = JS_InitClass( cx, global, - jsb_cocos2d_gui_Widget_prototype, - jsb_cocos2d_gui_CheckBox_class, - js_cocos2dx_gui_CheckBox_constructor, 0, // constructor + jsb_cocos2d_ui_Widget_prototype, + jsb_cocos2d_ui_CheckBox_class, + js_cocos2dx_ui_CheckBox_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -3169,120 +3169,120 @@ void js_register_cocos2dx_gui_CheckBox(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "CheckBox", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_CheckBox_class; - p->proto = jsb_cocos2d_gui_CheckBox_prototype; - p->parentProto = jsb_cocos2d_gui_Widget_prototype; + p->jsclass = jsb_cocos2d_ui_CheckBox_class; + p->proto = jsb_cocos2d_ui_CheckBox_prototype; + p->parentProto = jsb_cocos2d_ui_Widget_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_ImageView_class; -JSObject *jsb_cocos2d_gui_ImageView_prototype; +JSClass *jsb_cocos2d_ui_ImageView_class; +JSObject *jsb_cocos2d_ui_ImageView_prototype; -bool js_cocos2dx_gui_ImageView_setTextureRect(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ImageView_setTextureRect(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ImageView* cobj = (cocos2d::gui::ImageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ImageView_setTextureRect : Invalid Native Object"); + cocos2d::ui::ImageView* cobj = (cocos2d::ui::ImageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ImageView_setTextureRect : Invalid Native Object"); if (argc == 1) { cocos2d::Rect arg0; ok &= jsval_to_ccrect(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ImageView_setTextureRect : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ImageView_setTextureRect : Error processing arguments"); cobj->setTextureRect(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ImageView_setTextureRect : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ImageView_setTextureRect : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ImageView_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ImageView_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ImageView* cobj = (cocos2d::gui::ImageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ImageView_setCapInsets : Invalid Native Object"); + cocos2d::ui::ImageView* cobj = (cocos2d::ui::ImageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ImageView_setCapInsets : Invalid Native Object"); if (argc == 1) { cocos2d::Rect arg0; ok &= jsval_to_ccrect(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ImageView_setCapInsets : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ImageView_setCapInsets : Error processing arguments"); cobj->setCapInsets(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ImageView_setCapInsets : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ImageView_setCapInsets : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ImageView_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ImageView_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ImageView* cobj = (cocos2d::gui::ImageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ImageView_setScale9Enabled : Invalid Native Object"); + cocos2d::ui::ImageView* cobj = (cocos2d::ui::ImageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ImageView_setScale9Enabled : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ImageView_setScale9Enabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ImageView_setScale9Enabled : Error processing arguments"); cobj->setScale9Enabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ImageView_setScale9Enabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ImageView_setScale9Enabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ImageView_loadTexture(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ImageView_loadTexture(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ImageView* cobj = (cocos2d::gui::ImageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ImageView_loadTexture : Invalid Native Object"); + cocos2d::ui::ImageView* cobj = (cocos2d::ui::ImageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ImageView_loadTexture : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ImageView_loadTexture : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ImageView_loadTexture : Error processing arguments"); cobj->loadTexture(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ImageView_loadTexture : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ImageView_loadTexture : Error processing arguments"); cobj->loadTexture(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ImageView_loadTexture : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ImageView_loadTexture : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ImageView_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ImageView_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::ImageView* ret = cocos2d::gui::ImageView::create(); + cocos2d::ui::ImageView* ret = cocos2d::ui::ImageView::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::ImageView*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::ImageView*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -3291,19 +3291,19 @@ bool js_cocos2dx_gui_ImageView_create(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ImageView_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_ImageView_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_ImageView_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ImageView_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::ImageView* cobj = new cocos2d::gui::ImageView(); + cocos2d::ui::ImageView* cobj = new cocos2d::ui::ImageView(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -3314,33 +3314,33 @@ bool js_cocos2dx_gui_ImageView_constructor(JSContext *cx, uint32_t argc, jsval * JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::ImageView"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::ImageView"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ImageView_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ImageView_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -extern JSObject *jsb_cocos2d_gui_Widget_prototype; +extern JSObject *jsb_cocos2d_ui_Widget_prototype; -void js_cocos2d_gui_ImageView_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_ImageView_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (ImageView)", obj); } -void js_register_cocos2dx_gui_ImageView(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_ImageView_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_ImageView_class->name = "ImageView"; - jsb_cocos2d_gui_ImageView_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_ImageView_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_ImageView_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_ImageView_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_ImageView_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_ImageView_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_ImageView_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_ImageView_class->finalize = js_cocos2d_gui_ImageView_finalize; - jsb_cocos2d_gui_ImageView_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_ImageView(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_ImageView_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_ImageView_class->name = "ImageView"; + jsb_cocos2d_ui_ImageView_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_ImageView_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_ImageView_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_ImageView_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_ImageView_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_ImageView_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_ImageView_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_ImageView_class->finalize = js_cocos2d_ui_ImageView_finalize; + jsb_cocos2d_ui_ImageView_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -3348,23 +3348,23 @@ void js_register_cocos2dx_gui_ImageView(JSContext *cx, JSObject *global) { }; static JSFunctionSpec funcs[] = { - JS_FN("setTextureRect", js_cocos2dx_gui_ImageView_setTextureRect, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setCapInsets", js_cocos2dx_gui_ImageView_setCapInsets, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setScale9Enabled", js_cocos2dx_gui_ImageView_setScale9Enabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadTexture", js_cocos2dx_gui_ImageView_loadTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTextureRect", js_cocos2dx_ui_ImageView_setTextureRect, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCapInsets", js_cocos2dx_ui_ImageView_setCapInsets, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setScale9Enabled", js_cocos2dx_ui_ImageView_setScale9Enabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadTexture", js_cocos2dx_ui_ImageView_loadTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_ImageView_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_ImageView_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_ImageView_prototype = JS_InitClass( + jsb_cocos2d_ui_ImageView_prototype = JS_InitClass( cx, global, - jsb_cocos2d_gui_Widget_prototype, - jsb_cocos2d_gui_ImageView_class, - js_cocos2dx_gui_ImageView_constructor, 0, // constructor + jsb_cocos2d_ui_Widget_prototype, + jsb_cocos2d_ui_ImageView_class, + js_cocos2dx_ui_ImageView_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -3375,28 +3375,28 @@ void js_register_cocos2dx_gui_ImageView(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "ImageView", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_ImageView_class; - p->proto = jsb_cocos2d_gui_ImageView_prototype; - p->parentProto = jsb_cocos2d_gui_Widget_prototype; + p->jsclass = jsb_cocos2d_ui_ImageView_class; + p->proto = jsb_cocos2d_ui_ImageView_prototype; + p->parentProto = jsb_cocos2d_ui_Widget_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_Text_class; -JSObject *jsb_cocos2d_gui_Text_prototype; +JSClass *jsb_cocos2d_ui_Text_class; +JSObject *jsb_cocos2d_ui_Text_prototype; -bool js_cocos2dx_gui_Text_getStringLength(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Text_getStringLength(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Text* cobj = (cocos2d::gui::Text *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Text_getStringLength : Invalid Native Object"); + cocos2d::ui::Text* cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Text_getStringLength : Invalid Native Object"); if (argc == 0) { ssize_t ret = cobj->getStringLength(); jsval jsret = JSVAL_NULL; @@ -3405,55 +3405,55 @@ bool js_cocos2dx_gui_Text_getStringLength(JSContext *cx, uint32_t argc, jsval *v return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Text_getStringLength : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Text_getStringLength : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Text_setFontName(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Text_setFontName(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Text* cobj = (cocos2d::gui::Text *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Text_setFontName : Invalid Native Object"); + cocos2d::ui::Text* cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Text_setFontName : Invalid Native Object"); if (argc == 1) { std::string arg0; ok &= jsval_to_std_string(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Text_setFontName : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Text_setFontName : Error processing arguments"); cobj->setFontName(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Text_setFontName : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Text_setFontName : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Text_setTouchScaleChangeEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Text_setTouchScaleChangeEnabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Text* cobj = (cocos2d::gui::Text *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Text_setTouchScaleChangeEnabled : Invalid Native Object"); + cocos2d::ui::Text* cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Text_setTouchScaleChangeEnabled : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Text_setTouchScaleChangeEnabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Text_setTouchScaleChangeEnabled : Error processing arguments"); cobj->setTouchScaleChangeEnabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Text_setTouchScaleChangeEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Text_setTouchScaleChangeEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Text_getStringValue(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Text_getStringValue(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Text* cobj = (cocos2d::gui::Text *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Text_getStringValue : Invalid Native Object"); + cocos2d::ui::Text* cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Text_getStringValue : Invalid Native Object"); if (argc == 0) { const std::string& ret = cobj->getStringValue(); jsval jsret = JSVAL_NULL; @@ -3462,75 +3462,75 @@ bool js_cocos2dx_gui_Text_getStringValue(JSContext *cx, uint32_t argc, jsval *vp return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Text_getStringValue : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Text_getStringValue : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Text_setText(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Text_setText(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Text* cobj = (cocos2d::gui::Text *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Text_setText : Invalid Native Object"); + cocos2d::ui::Text* cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Text_setText : Invalid Native Object"); if (argc == 1) { std::string arg0; ok &= jsval_to_std_string(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Text_setText : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Text_setText : Error processing arguments"); cobj->setText(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Text_setText : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Text_setText : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Text_setTextVerticalAlignment(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Text_setTextVerticalAlignment(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Text* cobj = (cocos2d::gui::Text *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Text_setTextVerticalAlignment : Invalid Native Object"); + cocos2d::ui::Text* cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Text_setTextVerticalAlignment : Invalid Native Object"); if (argc == 1) { cocos2d::TextVAlignment arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Text_setTextVerticalAlignment : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Text_setTextVerticalAlignment : Error processing arguments"); cobj->setTextVerticalAlignment(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Text_setTextVerticalAlignment : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Text_setTextVerticalAlignment : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Text_setFontSize(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Text_setFontSize(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Text* cobj = (cocos2d::gui::Text *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Text_setFontSize : Invalid Native Object"); + cocos2d::ui::Text* cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Text_setFontSize : Invalid Native Object"); if (argc == 1) { int arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Text_setFontSize : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Text_setFontSize : Error processing arguments"); cobj->setFontSize(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Text_setFontSize : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Text_setFontSize : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Text_isTouchScaleChangeEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Text_isTouchScaleChangeEnabled(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Text* cobj = (cocos2d::gui::Text *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Text_isTouchScaleChangeEnabled : Invalid Native Object"); + cocos2d::ui::Text* cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Text_isTouchScaleChangeEnabled : Invalid Native Object"); if (argc == 0) { bool ret = cobj->isTouchScaleChangeEnabled(); jsval jsret = JSVAL_NULL; @@ -3539,57 +3539,57 @@ bool js_cocos2dx_gui_Text_isTouchScaleChangeEnabled(JSContext *cx, uint32_t argc return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Text_isTouchScaleChangeEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Text_isTouchScaleChangeEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Text_setTextHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Text_setTextHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Text* cobj = (cocos2d::gui::Text *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Text_setTextHorizontalAlignment : Invalid Native Object"); + cocos2d::ui::Text* cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Text_setTextHorizontalAlignment : Invalid Native Object"); if (argc == 1) { cocos2d::TextHAlignment arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Text_setTextHorizontalAlignment : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Text_setTextHorizontalAlignment : Error processing arguments"); cobj->setTextHorizontalAlignment(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Text_setTextHorizontalAlignment : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Text_setTextHorizontalAlignment : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Text_setTextAreaSize(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Text_setTextAreaSize(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Text* cobj = (cocos2d::gui::Text *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Text_setTextAreaSize : Invalid Native Object"); + cocos2d::ui::Text* cobj = (cocos2d::ui::Text *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Text_setTextAreaSize : Invalid Native Object"); if (argc == 1) { cocos2d::Size arg0; ok &= jsval_to_ccsize(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Text_setTextAreaSize : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Text_setTextAreaSize : Error processing arguments"); cobj->setTextAreaSize(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Text_setTextAreaSize : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Text_setTextAreaSize : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Text_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Text_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::Text* ret = cocos2d::gui::Text::create(); + cocos2d::ui::Text* ret = cocos2d::ui::Text::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::Text*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::Text*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -3598,19 +3598,19 @@ bool js_cocos2dx_gui_Text_create(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Text_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_Text_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_Text_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Text_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::Text* cobj = new cocos2d::gui::Text(); + cocos2d::ui::Text* cobj = new cocos2d::ui::Text(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -3621,33 +3621,33 @@ bool js_cocos2dx_gui_Text_constructor(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::Text"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::Text"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Text_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Text_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -extern JSObject *jsb_cocos2d_gui_Widget_prototype; +extern JSObject *jsb_cocos2d_ui_Widget_prototype; -void js_cocos2d_gui_Text_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_Text_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (Text)", obj); } -void js_register_cocos2dx_gui_Text(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_Text_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_Text_class->name = "Text"; - jsb_cocos2d_gui_Text_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_Text_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_Text_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_Text_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_Text_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_Text_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_Text_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_Text_class->finalize = js_cocos2d_gui_Text_finalize; - jsb_cocos2d_gui_Text_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_Text(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_Text_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_Text_class->name = "Text"; + jsb_cocos2d_ui_Text_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_Text_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_Text_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_Text_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_Text_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_Text_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_Text_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_Text_class->finalize = js_cocos2d_ui_Text_finalize; + jsb_cocos2d_ui_Text_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -3655,29 +3655,29 @@ void js_register_cocos2dx_gui_Text(JSContext *cx, JSObject *global) { }; static JSFunctionSpec funcs[] = { - JS_FN("getStringLength", js_cocos2dx_gui_Text_getStringLength, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFontName", js_cocos2dx_gui_Text_setFontName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTouchScaleChangeEnabled", js_cocos2dx_gui_Text_setTouchScaleChangeEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getStringValue", js_cocos2dx_gui_Text_getStringValue, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setText", js_cocos2dx_gui_Text_setText, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTextVerticalAlignment", js_cocos2dx_gui_Text_setTextVerticalAlignment, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFontSize", js_cocos2dx_gui_Text_setFontSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isTouchScaleChangeEnabled", js_cocos2dx_gui_Text_isTouchScaleChangeEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTextHorizontalAlignment", js_cocos2dx_gui_Text_setTextHorizontalAlignment, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTextAreaSize", js_cocos2dx_gui_Text_setTextAreaSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getStringLength", js_cocos2dx_ui_Text_getStringLength, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFontName", js_cocos2dx_ui_Text_setFontName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTouchScaleChangeEnabled", js_cocos2dx_ui_Text_setTouchScaleChangeEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getStringValue", js_cocos2dx_ui_Text_getStringValue, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setText", js_cocos2dx_ui_Text_setText, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTextVerticalAlignment", js_cocos2dx_ui_Text_setTextVerticalAlignment, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFontSize", js_cocos2dx_ui_Text_setFontSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isTouchScaleChangeEnabled", js_cocos2dx_ui_Text_isTouchScaleChangeEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTextHorizontalAlignment", js_cocos2dx_ui_Text_setTextHorizontalAlignment, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTextAreaSize", js_cocos2dx_ui_Text_setTextAreaSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_Text_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_Text_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_Text_prototype = JS_InitClass( + jsb_cocos2d_ui_Text_prototype = JS_InitClass( cx, global, - jsb_cocos2d_gui_Widget_prototype, - jsb_cocos2d_gui_Text_class, - js_cocos2dx_gui_Text_constructor, 0, // constructor + jsb_cocos2d_ui_Widget_prototype, + jsb_cocos2d_ui_Text_class, + js_cocos2dx_ui_Text_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -3688,30 +3688,30 @@ void js_register_cocos2dx_gui_Text(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "Text", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_Text_class; - p->proto = jsb_cocos2d_gui_Text_prototype; - p->parentProto = jsb_cocos2d_gui_Widget_prototype; + p->jsclass = jsb_cocos2d_ui_Text_class; + p->proto = jsb_cocos2d_ui_Text_prototype; + p->parentProto = jsb_cocos2d_ui_Widget_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_TextAtlas_class; -JSObject *jsb_cocos2d_gui_TextAtlas_prototype; +JSClass *jsb_cocos2d_ui_TextAtlas_class; +JSObject *jsb_cocos2d_ui_TextAtlas_prototype; -bool js_cocos2dx_gui_TextAtlas_setProperty(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextAtlas_setProperty(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextAtlas* cobj = (cocos2d::gui::TextAtlas *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextAtlas_setProperty : Invalid Native Object"); + cocos2d::ui::TextAtlas* cobj = (cocos2d::ui::TextAtlas *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextAtlas_setProperty : Invalid Native Object"); if (argc == 5) { std::string arg0; std::string arg1; @@ -3723,21 +3723,21 @@ bool js_cocos2dx_gui_TextAtlas_setProperty(JSContext *cx, uint32_t argc, jsval * ok &= jsval_to_int32(cx, argv[2], (int32_t *)&arg2); ok &= jsval_to_int32(cx, argv[3], (int32_t *)&arg3); ok &= jsval_to_std_string(cx, argv[4], &arg4); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextAtlas_setProperty : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextAtlas_setProperty : Error processing arguments"); cobj->setProperty(arg0, arg1, arg2, arg3, arg4); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextAtlas_setProperty : wrong number of arguments: %d, was expecting %d", argc, 5); + JS_ReportError(cx, "js_cocos2dx_ui_TextAtlas_setProperty : wrong number of arguments: %d, was expecting %d", argc, 5); return false; } -bool js_cocos2dx_gui_TextAtlas_getStringValue(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextAtlas_getStringValue(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextAtlas* cobj = (cocos2d::gui::TextAtlas *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextAtlas_getStringValue : Invalid Native Object"); + cocos2d::ui::TextAtlas* cobj = (cocos2d::ui::TextAtlas *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextAtlas_getStringValue : Invalid Native Object"); if (argc == 0) { const std::string& ret = cobj->getStringValue(); jsval jsret = JSVAL_NULL; @@ -3746,37 +3746,37 @@ bool js_cocos2dx_gui_TextAtlas_getStringValue(JSContext *cx, uint32_t argc, jsva return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextAtlas_getStringValue : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_TextAtlas_getStringValue : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_TextAtlas_setStringValue(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextAtlas_setStringValue(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextAtlas* cobj = (cocos2d::gui::TextAtlas *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextAtlas_setStringValue : Invalid Native Object"); + cocos2d::ui::TextAtlas* cobj = (cocos2d::ui::TextAtlas *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextAtlas_setStringValue : Invalid Native Object"); if (argc == 1) { std::string arg0; ok &= jsval_to_std_string(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextAtlas_setStringValue : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextAtlas_setStringValue : Error processing arguments"); cobj->setStringValue(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextAtlas_setStringValue : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextAtlas_setStringValue : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextAtlas_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextAtlas_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::TextAtlas* ret = cocos2d::gui::TextAtlas::create(); + cocos2d::ui::TextAtlas* ret = cocos2d::ui::TextAtlas::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::TextAtlas*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::TextAtlas*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -3785,19 +3785,19 @@ bool js_cocos2dx_gui_TextAtlas_create(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextAtlas_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_TextAtlas_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_TextAtlas_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextAtlas_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::TextAtlas* cobj = new cocos2d::gui::TextAtlas(); + cocos2d::ui::TextAtlas* cobj = new cocos2d::ui::TextAtlas(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -3808,33 +3808,33 @@ bool js_cocos2dx_gui_TextAtlas_constructor(JSContext *cx, uint32_t argc, jsval * JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::TextAtlas"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::TextAtlas"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextAtlas_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_TextAtlas_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -extern JSObject *jsb_cocos2d_gui_Widget_prototype; +extern JSObject *jsb_cocos2d_ui_Widget_prototype; -void js_cocos2d_gui_TextAtlas_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_TextAtlas_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (TextAtlas)", obj); } -void js_register_cocos2dx_gui_TextAtlas(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_TextAtlas_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_TextAtlas_class->name = "TextAtlas"; - jsb_cocos2d_gui_TextAtlas_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_TextAtlas_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_TextAtlas_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_TextAtlas_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_TextAtlas_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_TextAtlas_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_TextAtlas_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_TextAtlas_class->finalize = js_cocos2d_gui_TextAtlas_finalize; - jsb_cocos2d_gui_TextAtlas_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_TextAtlas(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_TextAtlas_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_TextAtlas_class->name = "TextAtlas"; + jsb_cocos2d_ui_TextAtlas_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_TextAtlas_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_TextAtlas_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_TextAtlas_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_TextAtlas_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_TextAtlas_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_TextAtlas_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_TextAtlas_class->finalize = js_cocos2d_ui_TextAtlas_finalize; + jsb_cocos2d_ui_TextAtlas_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -3842,22 +3842,22 @@ void js_register_cocos2dx_gui_TextAtlas(JSContext *cx, JSObject *global) { }; static JSFunctionSpec funcs[] = { - JS_FN("setProperty", js_cocos2dx_gui_TextAtlas_setProperty, 5, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getStringValue", js_cocos2dx_gui_TextAtlas_getStringValue, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setStringValue", js_cocos2dx_gui_TextAtlas_setStringValue, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setProperty", js_cocos2dx_ui_TextAtlas_setProperty, 5, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getStringValue", js_cocos2dx_ui_TextAtlas_getStringValue, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setStringValue", js_cocos2dx_ui_TextAtlas_setStringValue, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_TextAtlas_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_TextAtlas_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_TextAtlas_prototype = JS_InitClass( + jsb_cocos2d_ui_TextAtlas_prototype = JS_InitClass( cx, global, - jsb_cocos2d_gui_Widget_prototype, - jsb_cocos2d_gui_TextAtlas_class, - js_cocos2dx_gui_TextAtlas_constructor, 0, // constructor + jsb_cocos2d_ui_Widget_prototype, + jsb_cocos2d_ui_TextAtlas_class, + js_cocos2dx_ui_TextAtlas_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -3868,138 +3868,138 @@ void js_register_cocos2dx_gui_TextAtlas(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "TextAtlas", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_TextAtlas_class; - p->proto = jsb_cocos2d_gui_TextAtlas_prototype; - p->parentProto = jsb_cocos2d_gui_Widget_prototype; + p->jsclass = jsb_cocos2d_ui_TextAtlas_class; + p->proto = jsb_cocos2d_ui_TextAtlas_prototype; + p->parentProto = jsb_cocos2d_ui_Widget_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_LoadingBar_class; -JSObject *jsb_cocos2d_gui_LoadingBar_prototype; +JSClass *jsb_cocos2d_ui_LoadingBar_class; +JSObject *jsb_cocos2d_ui_LoadingBar_prototype; -bool js_cocos2dx_gui_LoadingBar_setPercent(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LoadingBar_setPercent(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::LoadingBar* cobj = (cocos2d::gui::LoadingBar *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_LoadingBar_setPercent : Invalid Native Object"); + cocos2d::ui::LoadingBar* cobj = (cocos2d::ui::LoadingBar *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_LoadingBar_setPercent : Invalid Native Object"); if (argc == 1) { int arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_LoadingBar_setPercent : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_LoadingBar_setPercent : Error processing arguments"); cobj->setPercent(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LoadingBar_setPercent : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_LoadingBar_setPercent : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_LoadingBar_loadTexture(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LoadingBar_loadTexture(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::LoadingBar* cobj = (cocos2d::gui::LoadingBar *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_LoadingBar_loadTexture : Invalid Native Object"); + cocos2d::ui::LoadingBar* cobj = (cocos2d::ui::LoadingBar *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_LoadingBar_loadTexture : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_LoadingBar_loadTexture : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_LoadingBar_loadTexture : Error processing arguments"); cobj->loadTexture(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_LoadingBar_loadTexture : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_LoadingBar_loadTexture : Error processing arguments"); cobj->loadTexture(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LoadingBar_loadTexture : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_LoadingBar_loadTexture : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_LoadingBar_setDirection(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LoadingBar_setDirection(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::LoadingBar* cobj = (cocos2d::gui::LoadingBar *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_LoadingBar_setDirection : Invalid Native Object"); + cocos2d::ui::LoadingBar* cobj = (cocos2d::ui::LoadingBar *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_LoadingBar_setDirection : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::LoadingBarType arg0; + cocos2d::ui::LoadingBarType arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_LoadingBar_setDirection : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_LoadingBar_setDirection : Error processing arguments"); cobj->setDirection(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LoadingBar_setDirection : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_LoadingBar_setDirection : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_LoadingBar_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LoadingBar_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::LoadingBar* cobj = (cocos2d::gui::LoadingBar *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_LoadingBar_setScale9Enabled : Invalid Native Object"); + cocos2d::ui::LoadingBar* cobj = (cocos2d::ui::LoadingBar *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_LoadingBar_setScale9Enabled : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_LoadingBar_setScale9Enabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_LoadingBar_setScale9Enabled : Error processing arguments"); cobj->setScale9Enabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LoadingBar_setScale9Enabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_LoadingBar_setScale9Enabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_LoadingBar_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LoadingBar_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::LoadingBar* cobj = (cocos2d::gui::LoadingBar *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_LoadingBar_setCapInsets : Invalid Native Object"); + cocos2d::ui::LoadingBar* cobj = (cocos2d::ui::LoadingBar *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_LoadingBar_setCapInsets : Invalid Native Object"); if (argc == 1) { cocos2d::Rect arg0; ok &= jsval_to_ccrect(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_LoadingBar_setCapInsets : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_LoadingBar_setCapInsets : Error processing arguments"); cobj->setCapInsets(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LoadingBar_setCapInsets : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_LoadingBar_setCapInsets : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_LoadingBar_getDirection(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LoadingBar_getDirection(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::LoadingBar* cobj = (cocos2d::gui::LoadingBar *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_LoadingBar_getDirection : Invalid Native Object"); + cocos2d::ui::LoadingBar* cobj = (cocos2d::ui::LoadingBar *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_LoadingBar_getDirection : Invalid Native Object"); if (argc == 0) { int ret = cobj->getDirection(); jsval jsret = JSVAL_NULL; @@ -4008,15 +4008,15 @@ bool js_cocos2dx_gui_LoadingBar_getDirection(JSContext *cx, uint32_t argc, jsval return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LoadingBar_getDirection : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_LoadingBar_getDirection : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_LoadingBar_getPercent(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LoadingBar_getPercent(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::LoadingBar* cobj = (cocos2d::gui::LoadingBar *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_LoadingBar_getPercent : Invalid Native Object"); + cocos2d::ui::LoadingBar* cobj = (cocos2d::ui::LoadingBar *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_LoadingBar_getPercent : Invalid Native Object"); if (argc == 0) { int ret = cobj->getPercent(); jsval jsret = JSVAL_NULL; @@ -4025,17 +4025,17 @@ bool js_cocos2dx_gui_LoadingBar_getPercent(JSContext *cx, uint32_t argc, jsval * return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LoadingBar_getPercent : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_LoadingBar_getPercent : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_LoadingBar_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LoadingBar_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::LoadingBar* ret = cocos2d::gui::LoadingBar::create(); + cocos2d::ui::LoadingBar* ret = cocos2d::ui::LoadingBar::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::LoadingBar*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::LoadingBar*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -4044,19 +4044,19 @@ bool js_cocos2dx_gui_LoadingBar_create(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LoadingBar_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_LoadingBar_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_LoadingBar_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_LoadingBar_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::LoadingBar* cobj = new cocos2d::gui::LoadingBar(); + cocos2d::ui::LoadingBar* cobj = new cocos2d::ui::LoadingBar(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -4067,33 +4067,33 @@ bool js_cocos2dx_gui_LoadingBar_constructor(JSContext *cx, uint32_t argc, jsval JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::LoadingBar"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::LoadingBar"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_LoadingBar_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_LoadingBar_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -extern JSObject *jsb_cocos2d_gui_Widget_prototype; +extern JSObject *jsb_cocos2d_ui_Widget_prototype; -void js_cocos2d_gui_LoadingBar_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_LoadingBar_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (LoadingBar)", obj); } -void js_register_cocos2dx_gui_LoadingBar(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_LoadingBar_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_LoadingBar_class->name = "LoadingBar"; - jsb_cocos2d_gui_LoadingBar_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_LoadingBar_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_LoadingBar_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_LoadingBar_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_LoadingBar_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_LoadingBar_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_LoadingBar_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_LoadingBar_class->finalize = js_cocos2d_gui_LoadingBar_finalize; - jsb_cocos2d_gui_LoadingBar_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_LoadingBar(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_LoadingBar_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_LoadingBar_class->name = "LoadingBar"; + jsb_cocos2d_ui_LoadingBar_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_LoadingBar_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_LoadingBar_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_LoadingBar_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_LoadingBar_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_LoadingBar_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_LoadingBar_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_LoadingBar_class->finalize = js_cocos2d_ui_LoadingBar_finalize; + jsb_cocos2d_ui_LoadingBar_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -4101,26 +4101,26 @@ void js_register_cocos2dx_gui_LoadingBar(JSContext *cx, JSObject *global) { }; static JSFunctionSpec funcs[] = { - JS_FN("setPercent", js_cocos2dx_gui_LoadingBar_setPercent, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadTexture", js_cocos2dx_gui_LoadingBar_loadTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDirection", js_cocos2dx_gui_LoadingBar_setDirection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setScale9Enabled", js_cocos2dx_gui_LoadingBar_setScale9Enabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setCapInsets", js_cocos2dx_gui_LoadingBar_setCapInsets, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDirection", js_cocos2dx_gui_LoadingBar_getDirection, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getPercent", js_cocos2dx_gui_LoadingBar_getPercent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPercent", js_cocos2dx_ui_LoadingBar_setPercent, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadTexture", js_cocos2dx_ui_LoadingBar_loadTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDirection", js_cocos2dx_ui_LoadingBar_setDirection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setScale9Enabled", js_cocos2dx_ui_LoadingBar_setScale9Enabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCapInsets", js_cocos2dx_ui_LoadingBar_setCapInsets, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDirection", js_cocos2dx_ui_LoadingBar_getDirection, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPercent", js_cocos2dx_ui_LoadingBar_getPercent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_LoadingBar_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_LoadingBar_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_LoadingBar_prototype = JS_InitClass( + jsb_cocos2d_ui_LoadingBar_prototype = JS_InitClass( cx, global, - jsb_cocos2d_gui_Widget_prototype, - jsb_cocos2d_gui_LoadingBar_class, - js_cocos2dx_gui_LoadingBar_constructor, 0, // constructor + jsb_cocos2d_ui_Widget_prototype, + jsb_cocos2d_ui_LoadingBar_class, + js_cocos2dx_ui_LoadingBar_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -4131,52 +4131,52 @@ void js_register_cocos2dx_gui_LoadingBar(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "LoadingBar", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_LoadingBar_class; - p->proto = jsb_cocos2d_gui_LoadingBar_prototype; - p->parentProto = jsb_cocos2d_gui_Widget_prototype; + p->jsclass = jsb_cocos2d_ui_LoadingBar_class; + p->proto = jsb_cocos2d_ui_LoadingBar_prototype; + p->parentProto = jsb_cocos2d_ui_Widget_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_ScrollView_class; -JSObject *jsb_cocos2d_gui_ScrollView_prototype; +JSClass *jsb_cocos2d_ui_ScrollView_class; +JSObject *jsb_cocos2d_ui_ScrollView_prototype; -bool js_cocos2dx_gui_ScrollView_scrollToTop(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_scrollToTop(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_scrollToTop : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_scrollToTop : Invalid Native Object"); if (argc == 2) { double arg0; bool arg1; ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); ok &= JS_ValueToBoolean(cx, argv[1], &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_scrollToTop : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_scrollToTop : Error processing arguments"); cobj->scrollToTop(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_scrollToTop : wrong number of arguments: %d, was expecting %d", argc, 2); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_scrollToTop : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_gui_ScrollView_scrollToPercentHorizontal(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_scrollToPercentHorizontal(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_scrollToPercentHorizontal : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_scrollToPercentHorizontal : Invalid Native Object"); if (argc == 3) { double arg0; double arg1; @@ -4184,21 +4184,21 @@ bool js_cocos2dx_gui_ScrollView_scrollToPercentHorizontal(JSContext *cx, uint32_ ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[1]), &arg1); ok &= JS_ValueToBoolean(cx, argv[2], &arg2); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_scrollToPercentHorizontal : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_scrollToPercentHorizontal : Error processing arguments"); cobj->scrollToPercentHorizontal(arg0, arg1, arg2); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_scrollToPercentHorizontal : wrong number of arguments: %d, was expecting %d", argc, 3); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_scrollToPercentHorizontal : wrong number of arguments: %d, was expecting %d", argc, 3); return false; } -bool js_cocos2dx_gui_ScrollView_isInertiaScrollEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_isInertiaScrollEnabled(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_isInertiaScrollEnabled : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_isInertiaScrollEnabled : Invalid Native Object"); if (argc == 0) { bool ret = cobj->isInertiaScrollEnabled(); jsval jsret = JSVAL_NULL; @@ -4207,17 +4207,17 @@ bool js_cocos2dx_gui_ScrollView_isInertiaScrollEnabled(JSContext *cx, uint32_t a return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_isInertiaScrollEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_isInertiaScrollEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ScrollView_scrollToPercentBothDirection(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_scrollToPercentBothDirection(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_scrollToPercentBothDirection : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_scrollToPercentBothDirection : Invalid Native Object"); if (argc == 3) { cocos2d::Point arg0; double arg1; @@ -4225,21 +4225,21 @@ bool js_cocos2dx_gui_ScrollView_scrollToPercentBothDirection(JSContext *cx, uint ok &= jsval_to_ccpoint(cx, argv[0], &arg0); ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[1]), &arg1); ok &= JS_ValueToBoolean(cx, argv[2], &arg2); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_scrollToPercentBothDirection : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_scrollToPercentBothDirection : Error processing arguments"); cobj->scrollToPercentBothDirection(arg0, arg1, arg2); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_scrollToPercentBothDirection : wrong number of arguments: %d, was expecting %d", argc, 3); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_scrollToPercentBothDirection : wrong number of arguments: %d, was expecting %d", argc, 3); return false; } -bool js_cocos2dx_gui_ScrollView_getDirection(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_getDirection(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_getDirection : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_getDirection : Invalid Native Object"); if (argc == 0) { int ret = (int)cobj->getDirection(); jsval jsret = JSVAL_NULL; @@ -4248,43 +4248,43 @@ bool js_cocos2dx_gui_ScrollView_getDirection(JSContext *cx, uint32_t argc, jsval return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_getDirection : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_getDirection : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ScrollView_scrollToBottomLeft(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_scrollToBottomLeft(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_scrollToBottomLeft : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_scrollToBottomLeft : Invalid Native Object"); if (argc == 2) { double arg0; bool arg1; ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); ok &= JS_ValueToBoolean(cx, argv[1], &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_scrollToBottomLeft : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_scrollToBottomLeft : Error processing arguments"); cobj->scrollToBottomLeft(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_scrollToBottomLeft : wrong number of arguments: %d, was expecting %d", argc, 2); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_scrollToBottomLeft : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_gui_ScrollView_getInnerContainer(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_getInnerContainer(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_getInnerContainer : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_getInnerContainer : Invalid Native Object"); if (argc == 0) { - cocos2d::gui::Layout* ret = cobj->getInnerContainer(); + cocos2d::ui::Layout* ret = cobj->getInnerContainer(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::Layout*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::Layout*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -4294,122 +4294,122 @@ bool js_cocos2dx_gui_ScrollView_getInnerContainer(JSContext *cx, uint32_t argc, return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_getInnerContainer : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_getInnerContainer : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ScrollView_jumpToBottom(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_jumpToBottom(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_jumpToBottom : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_jumpToBottom : Invalid Native Object"); if (argc == 0) { cobj->jumpToBottom(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_jumpToBottom : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_jumpToBottom : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ScrollView_setDirection(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_setDirection(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_setDirection : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_setDirection : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::SCROLLVIEW_DIR arg0; + cocos2d::ui::SCROLLVIEW_DIR arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_setDirection : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_setDirection : Error processing arguments"); cobj->setDirection(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_setDirection : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_setDirection : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ScrollView_scrollToTopLeft(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_scrollToTopLeft(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_scrollToTopLeft : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_scrollToTopLeft : Invalid Native Object"); if (argc == 2) { double arg0; bool arg1; ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); ok &= JS_ValueToBoolean(cx, argv[1], &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_scrollToTopLeft : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_scrollToTopLeft : Error processing arguments"); cobj->scrollToTopLeft(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_scrollToTopLeft : wrong number of arguments: %d, was expecting %d", argc, 2); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_scrollToTopLeft : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_gui_ScrollView_jumpToTopRight(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_jumpToTopRight(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_jumpToTopRight : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_jumpToTopRight : Invalid Native Object"); if (argc == 0) { cobj->jumpToTopRight(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_jumpToTopRight : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_jumpToTopRight : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ScrollView_jumpToBottomLeft(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_jumpToBottomLeft(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_jumpToBottomLeft : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_jumpToBottomLeft : Invalid Native Object"); if (argc == 0) { cobj->jumpToBottomLeft(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_jumpToBottomLeft : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_jumpToBottomLeft : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ScrollView_setInnerContainerSize(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_setInnerContainerSize(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_setInnerContainerSize : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_setInnerContainerSize : Invalid Native Object"); if (argc == 1) { cocos2d::Size arg0; ok &= jsval_to_ccsize(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_setInnerContainerSize : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_setInnerContainerSize : Error processing arguments"); cobj->setInnerContainerSize(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_setInnerContainerSize : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_setInnerContainerSize : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ScrollView_getInnerContainerSize(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_getInnerContainerSize(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_getInnerContainerSize : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_getInnerContainerSize : Invalid Native Object"); if (argc == 0) { const cocos2d::Size& ret = cobj->getInnerContainerSize(); jsval jsret = JSVAL_NULL; @@ -4418,15 +4418,15 @@ bool js_cocos2dx_gui_ScrollView_getInnerContainerSize(JSContext *cx, uint32_t ar return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_getInnerContainerSize : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_getInnerContainerSize : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ScrollView_isBounceEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_isBounceEnabled(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_isBounceEnabled : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_isBounceEnabled : Invalid Native Object"); if (argc == 0) { bool ret = cobj->isBounceEnabled(); jsval jsret = JSVAL_NULL; @@ -4435,184 +4435,184 @@ bool js_cocos2dx_gui_ScrollView_isBounceEnabled(JSContext *cx, uint32_t argc, js return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_isBounceEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_isBounceEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ScrollView_jumpToPercentVertical(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_jumpToPercentVertical(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_jumpToPercentVertical : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_jumpToPercentVertical : Invalid Native Object"); if (argc == 1) { double arg0; ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_jumpToPercentVertical : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_jumpToPercentVertical : Error processing arguments"); cobj->jumpToPercentVertical(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_jumpToPercentVertical : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_jumpToPercentVertical : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ScrollView_setInertiaScrollEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_setInertiaScrollEnabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_setInertiaScrollEnabled : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_setInertiaScrollEnabled : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_setInertiaScrollEnabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_setInertiaScrollEnabled : Error processing arguments"); cobj->setInertiaScrollEnabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_setInertiaScrollEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_setInertiaScrollEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ScrollView_jumpToTopLeft(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_jumpToTopLeft(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_jumpToTopLeft : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_jumpToTopLeft : Invalid Native Object"); if (argc == 0) { cobj->jumpToTopLeft(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_jumpToTopLeft : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_jumpToTopLeft : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ScrollView_jumpToPercentHorizontal(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_jumpToPercentHorizontal(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_jumpToPercentHorizontal : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_jumpToPercentHorizontal : Invalid Native Object"); if (argc == 1) { double arg0; ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_jumpToPercentHorizontal : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_jumpToPercentHorizontal : Error processing arguments"); cobj->jumpToPercentHorizontal(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_jumpToPercentHorizontal : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_jumpToPercentHorizontal : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ScrollView_jumpToBottomRight(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_jumpToBottomRight(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_jumpToBottomRight : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_jumpToBottomRight : Invalid Native Object"); if (argc == 0) { cobj->jumpToBottomRight(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_jumpToBottomRight : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_jumpToBottomRight : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ScrollView_setBounceEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_setBounceEnabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_setBounceEnabled : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_setBounceEnabled : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_setBounceEnabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_setBounceEnabled : Error processing arguments"); cobj->setBounceEnabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_setBounceEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_setBounceEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ScrollView_jumpToTop(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_jumpToTop(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_jumpToTop : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_jumpToTop : Invalid Native Object"); if (argc == 0) { cobj->jumpToTop(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_jumpToTop : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_jumpToTop : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ScrollView_scrollToLeft(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_scrollToLeft(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_scrollToLeft : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_scrollToLeft : Invalid Native Object"); if (argc == 2) { double arg0; bool arg1; ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); ok &= JS_ValueToBoolean(cx, argv[1], &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_scrollToLeft : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_scrollToLeft : Error processing arguments"); cobj->scrollToLeft(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_scrollToLeft : wrong number of arguments: %d, was expecting %d", argc, 2); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_scrollToLeft : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_gui_ScrollView_jumpToPercentBothDirection(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_jumpToPercentBothDirection(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_jumpToPercentBothDirection : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_jumpToPercentBothDirection : Invalid Native Object"); if (argc == 1) { cocos2d::Point arg0; ok &= jsval_to_ccpoint(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_jumpToPercentBothDirection : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_jumpToPercentBothDirection : Error processing arguments"); cobj->jumpToPercentBothDirection(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_jumpToPercentBothDirection : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_jumpToPercentBothDirection : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ScrollView_scrollToPercentVertical(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_scrollToPercentVertical(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_scrollToPercentVertical : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_scrollToPercentVertical : Invalid Native Object"); if (argc == 3) { double arg0; double arg1; @@ -4620,141 +4620,141 @@ bool js_cocos2dx_gui_ScrollView_scrollToPercentVertical(JSContext *cx, uint32_t ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[1]), &arg1); ok &= JS_ValueToBoolean(cx, argv[2], &arg2); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_scrollToPercentVertical : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_scrollToPercentVertical : Error processing arguments"); cobj->scrollToPercentVertical(arg0, arg1, arg2); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_scrollToPercentVertical : wrong number of arguments: %d, was expecting %d", argc, 3); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_scrollToPercentVertical : wrong number of arguments: %d, was expecting %d", argc, 3); return false; } -bool js_cocos2dx_gui_ScrollView_scrollToBottom(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_scrollToBottom(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_scrollToBottom : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_scrollToBottom : Invalid Native Object"); if (argc == 2) { double arg0; bool arg1; ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); ok &= JS_ValueToBoolean(cx, argv[1], &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_scrollToBottom : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_scrollToBottom : Error processing arguments"); cobj->scrollToBottom(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_scrollToBottom : wrong number of arguments: %d, was expecting %d", argc, 2); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_scrollToBottom : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_gui_ScrollView_scrollToBottomRight(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_scrollToBottomRight(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_scrollToBottomRight : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_scrollToBottomRight : Invalid Native Object"); if (argc == 2) { double arg0; bool arg1; ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); ok &= JS_ValueToBoolean(cx, argv[1], &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_scrollToBottomRight : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_scrollToBottomRight : Error processing arguments"); cobj->scrollToBottomRight(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_scrollToBottomRight : wrong number of arguments: %d, was expecting %d", argc, 2); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_scrollToBottomRight : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_gui_ScrollView_jumpToLeft(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_jumpToLeft(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_jumpToLeft : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_jumpToLeft : Invalid Native Object"); if (argc == 0) { cobj->jumpToLeft(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_jumpToLeft : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_jumpToLeft : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ScrollView_scrollToRight(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_scrollToRight(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_scrollToRight : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_scrollToRight : Invalid Native Object"); if (argc == 2) { double arg0; bool arg1; ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); ok &= JS_ValueToBoolean(cx, argv[1], &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_scrollToRight : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_scrollToRight : Error processing arguments"); cobj->scrollToRight(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_scrollToRight : wrong number of arguments: %d, was expecting %d", argc, 2); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_scrollToRight : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_gui_ScrollView_jumpToRight(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_jumpToRight(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_jumpToRight : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_jumpToRight : Invalid Native Object"); if (argc == 0) { cobj->jumpToRight(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_jumpToRight : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_jumpToRight : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ScrollView_scrollToTopRight(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_scrollToTopRight(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ScrollView* cobj = (cocos2d::gui::ScrollView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ScrollView_scrollToTopRight : Invalid Native Object"); + cocos2d::ui::ScrollView* cobj = (cocos2d::ui::ScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ScrollView_scrollToTopRight : Invalid Native Object"); if (argc == 2) { double arg0; bool arg1; ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); ok &= JS_ValueToBoolean(cx, argv[1], &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ScrollView_scrollToTopRight : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ScrollView_scrollToTopRight : Error processing arguments"); cobj->scrollToTopRight(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_scrollToTopRight : wrong number of arguments: %d, was expecting %d", argc, 2); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_scrollToTopRight : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_gui_ScrollView_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::ScrollView* ret = cocos2d::gui::ScrollView::create(); + cocos2d::ui::ScrollView* ret = cocos2d::ui::ScrollView::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::ScrollView*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::ScrollView*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -4763,19 +4763,19 @@ bool js_cocos2dx_gui_ScrollView_create(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_ScrollView_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ScrollView_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::ScrollView* cobj = new cocos2d::gui::ScrollView(); + cocos2d::ui::ScrollView* cobj = new cocos2d::ui::ScrollView(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -4786,33 +4786,33 @@ bool js_cocos2dx_gui_ScrollView_constructor(JSContext *cx, uint32_t argc, jsval JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::ScrollView"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::ScrollView"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ScrollView_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ScrollView_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -extern JSObject *jsb_cocos2d_gui_Layout_prototype; +extern JSObject *jsb_cocos2d_ui_Layout_prototype; -void js_cocos2d_gui_ScrollView_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_ScrollView_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (ScrollView)", obj); } -void js_register_cocos2dx_gui_ScrollView(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_ScrollView_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_ScrollView_class->name = "ScrollView"; - jsb_cocos2d_gui_ScrollView_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_ScrollView_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_ScrollView_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_ScrollView_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_ScrollView_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_ScrollView_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_ScrollView_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_ScrollView_class->finalize = js_cocos2d_gui_ScrollView_finalize; - jsb_cocos2d_gui_ScrollView_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_ScrollView(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_ScrollView_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_ScrollView_class->name = "ScrollView"; + jsb_cocos2d_ui_ScrollView_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_ScrollView_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_ScrollView_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_ScrollView_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_ScrollView_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_ScrollView_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_ScrollView_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_ScrollView_class->finalize = js_cocos2d_ui_ScrollView_finalize; + jsb_cocos2d_ui_ScrollView_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -4820,50 +4820,50 @@ void js_register_cocos2dx_gui_ScrollView(JSContext *cx, JSObject *global) { }; static JSFunctionSpec funcs[] = { - JS_FN("scrollToTop", js_cocos2dx_gui_ScrollView_scrollToTop, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("scrollToPercentHorizontal", js_cocos2dx_gui_ScrollView_scrollToPercentHorizontal, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isInertiaScrollEnabled", js_cocos2dx_gui_ScrollView_isInertiaScrollEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("scrollToPercentBothDirection", js_cocos2dx_gui_ScrollView_scrollToPercentBothDirection, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDirection", js_cocos2dx_gui_ScrollView_getDirection, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("scrollToBottomLeft", js_cocos2dx_gui_ScrollView_scrollToBottomLeft, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getInnerContainer", js_cocos2dx_gui_ScrollView_getInnerContainer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("jumpToBottom", js_cocos2dx_gui_ScrollView_jumpToBottom, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDirection", js_cocos2dx_gui_ScrollView_setDirection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("scrollToTopLeft", js_cocos2dx_gui_ScrollView_scrollToTopLeft, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("jumpToTopRight", js_cocos2dx_gui_ScrollView_jumpToTopRight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("jumpToBottomLeft", js_cocos2dx_gui_ScrollView_jumpToBottomLeft, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setInnerContainerSize", js_cocos2dx_gui_ScrollView_setInnerContainerSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getInnerContainerSize", js_cocos2dx_gui_ScrollView_getInnerContainerSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isBounceEnabled", js_cocos2dx_gui_ScrollView_isBounceEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("jumpToPercentVertical", js_cocos2dx_gui_ScrollView_jumpToPercentVertical, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setInertiaScrollEnabled", js_cocos2dx_gui_ScrollView_setInertiaScrollEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("jumpToTopLeft", js_cocos2dx_gui_ScrollView_jumpToTopLeft, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("jumpToPercentHorizontal", js_cocos2dx_gui_ScrollView_jumpToPercentHorizontal, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("jumpToBottomRight", js_cocos2dx_gui_ScrollView_jumpToBottomRight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setBounceEnabled", js_cocos2dx_gui_ScrollView_setBounceEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("jumpToTop", js_cocos2dx_gui_ScrollView_jumpToTop, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("scrollToLeft", js_cocos2dx_gui_ScrollView_scrollToLeft, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("jumpToPercentBothDirection", js_cocos2dx_gui_ScrollView_jumpToPercentBothDirection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("scrollToPercentVertical", js_cocos2dx_gui_ScrollView_scrollToPercentVertical, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("scrollToBottom", js_cocos2dx_gui_ScrollView_scrollToBottom, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("scrollToBottomRight", js_cocos2dx_gui_ScrollView_scrollToBottomRight, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("jumpToLeft", js_cocos2dx_gui_ScrollView_jumpToLeft, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("scrollToRight", js_cocos2dx_gui_ScrollView_scrollToRight, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("jumpToRight", js_cocos2dx_gui_ScrollView_jumpToRight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("scrollToTopRight", js_cocos2dx_gui_ScrollView_scrollToTopRight, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("scrollToTop", js_cocos2dx_ui_ScrollView_scrollToTop, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("scrollToPercentHorizontal", js_cocos2dx_ui_ScrollView_scrollToPercentHorizontal, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isInertiaScrollEnabled", js_cocos2dx_ui_ScrollView_isInertiaScrollEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("scrollToPercentBothDirection", js_cocos2dx_ui_ScrollView_scrollToPercentBothDirection, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDirection", js_cocos2dx_ui_ScrollView_getDirection, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("scrollToBottomLeft", js_cocos2dx_ui_ScrollView_scrollToBottomLeft, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getInnerContainer", js_cocos2dx_ui_ScrollView_getInnerContainer, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("jumpToBottom", js_cocos2dx_ui_ScrollView_jumpToBottom, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDirection", js_cocos2dx_ui_ScrollView_setDirection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("scrollToTopLeft", js_cocos2dx_ui_ScrollView_scrollToTopLeft, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("jumpToTopRight", js_cocos2dx_ui_ScrollView_jumpToTopRight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("jumpToBottomLeft", js_cocos2dx_ui_ScrollView_jumpToBottomLeft, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setInnerContainerSize", js_cocos2dx_ui_ScrollView_setInnerContainerSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getInnerContainerSize", js_cocos2dx_ui_ScrollView_getInnerContainerSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isBounceEnabled", js_cocos2dx_ui_ScrollView_isBounceEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("jumpToPercentVertical", js_cocos2dx_ui_ScrollView_jumpToPercentVertical, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setInertiaScrollEnabled", js_cocos2dx_ui_ScrollView_setInertiaScrollEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("jumpToTopLeft", js_cocos2dx_ui_ScrollView_jumpToTopLeft, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("jumpToPercentHorizontal", js_cocos2dx_ui_ScrollView_jumpToPercentHorizontal, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("jumpToBottomRight", js_cocos2dx_ui_ScrollView_jumpToBottomRight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setBounceEnabled", js_cocos2dx_ui_ScrollView_setBounceEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("jumpToTop", js_cocos2dx_ui_ScrollView_jumpToTop, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("scrollToLeft", js_cocos2dx_ui_ScrollView_scrollToLeft, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("jumpToPercentBothDirection", js_cocos2dx_ui_ScrollView_jumpToPercentBothDirection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("scrollToPercentVertical", js_cocos2dx_ui_ScrollView_scrollToPercentVertical, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("scrollToBottom", js_cocos2dx_ui_ScrollView_scrollToBottom, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("scrollToBottomRight", js_cocos2dx_ui_ScrollView_scrollToBottomRight, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("jumpToLeft", js_cocos2dx_ui_ScrollView_jumpToLeft, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("scrollToRight", js_cocos2dx_ui_ScrollView_scrollToRight, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("jumpToRight", js_cocos2dx_ui_ScrollView_jumpToRight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("scrollToTopRight", js_cocos2dx_ui_ScrollView_scrollToTopRight, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_ScrollView_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_ScrollView_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_ScrollView_prototype = JS_InitClass( + jsb_cocos2d_ui_ScrollView_prototype = JS_InitClass( cx, global, - jsb_cocos2d_gui_Layout_prototype, - jsb_cocos2d_gui_ScrollView_class, - js_cocos2dx_gui_ScrollView_constructor, 0, // constructor + jsb_cocos2d_ui_Layout_prototype, + jsb_cocos2d_ui_ScrollView_class, + js_cocos2dx_ui_ScrollView_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -4874,41 +4874,41 @@ void js_register_cocos2dx_gui_ScrollView(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "ScrollView", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_ScrollView_class; - p->proto = jsb_cocos2d_gui_ScrollView_prototype; - p->parentProto = jsb_cocos2d_gui_Layout_prototype; + p->jsclass = jsb_cocos2d_ui_ScrollView_class; + p->proto = jsb_cocos2d_ui_ScrollView_prototype; + p->parentProto = jsb_cocos2d_ui_Layout_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_ListView_class; -JSObject *jsb_cocos2d_gui_ListView_prototype; +JSClass *jsb_cocos2d_ui_ListView_class; +JSObject *jsb_cocos2d_ui_ListView_prototype; -bool js_cocos2dx_gui_ListView_getIndex(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_getIndex(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ListView* cobj = (cocos2d::gui::ListView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ListView_getIndex : Invalid Native Object"); + cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_getIndex : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::Widget* arg0; + cocos2d::ui::Widget* arg0; do { if (!argv[0].isObject()) { ok = false; break; } js_proxy_t *proxy; JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); proxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::gui::Widget*)(proxy ? proxy->ptr : NULL); + arg0 = (cocos2d::ui::Widget*)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ListView_getIndex : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ListView_getIndex : Error processing arguments"); ssize_t ret = cobj->getIndex(arg0); jsval jsret = JSVAL_NULL; jsret = ssize_to_jsval(cx, ret); @@ -4916,114 +4916,114 @@ bool js_cocos2dx_gui_ListView_getIndex(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_getIndex : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_getIndex : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ListView_removeAllItems(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_removeAllItems(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ListView* cobj = (cocos2d::gui::ListView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ListView_removeAllItems : Invalid Native Object"); + cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_removeAllItems : Invalid Native Object"); if (argc == 0) { cobj->removeAllItems(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_removeAllItems : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_removeAllItems : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ListView_setGravity(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_setGravity(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ListView* cobj = (cocos2d::gui::ListView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ListView_setGravity : Invalid Native Object"); + cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_setGravity : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::ListViewGravity arg0; + cocos2d::ui::ListViewGravity arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ListView_setGravity : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ListView_setGravity : Error processing arguments"); cobj->setGravity(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_setGravity : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_setGravity : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ListView_pushBackCustomItem(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_pushBackCustomItem(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ListView* cobj = (cocos2d::gui::ListView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ListView_pushBackCustomItem : Invalid Native Object"); + cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_pushBackCustomItem : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::Widget* arg0; + cocos2d::ui::Widget* arg0; do { if (!argv[0].isObject()) { ok = false; break; } js_proxy_t *proxy; JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); proxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::gui::Widget*)(proxy ? proxy->ptr : NULL); + arg0 = (cocos2d::ui::Widget*)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ListView_pushBackCustomItem : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ListView_pushBackCustomItem : Error processing arguments"); cobj->pushBackCustomItem(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_pushBackCustomItem : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_pushBackCustomItem : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ListView_getItems(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_getItems(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ListView* cobj = (cocos2d::gui::ListView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ListView_getItems : Invalid Native Object"); + cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_getItems : Invalid Native Object"); if (argc == 0) { - cocos2d::Vector& ret = cobj->getItems(); + cocos2d::Vector& ret = cobj->getItems(); jsval jsret = JSVAL_NULL; jsret = ccvector_to_jsval(cx, ret); JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_getItems : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_getItems : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ListView_removeItem(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_removeItem(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ListView* cobj = (cocos2d::gui::ListView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ListView_removeItem : Invalid Native Object"); + cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_removeItem : Invalid Native Object"); if (argc == 1) { ssize_t arg0; ok &= jsval_to_ssize(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ListView_removeItem : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ListView_removeItem : Error processing arguments"); cobj->removeItem(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_removeItem : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_removeItem : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ListView_getCurSelectedIndex(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_getCurSelectedIndex(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ListView* cobj = (cocos2d::gui::ListView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ListView_getCurSelectedIndex : Invalid Native Object"); + cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_getCurSelectedIndex : Invalid Native Object"); if (argc == 0) { ssize_t ret = cobj->getCurSelectedIndex(); jsval jsret = JSVAL_NULL; @@ -5032,81 +5032,81 @@ bool js_cocos2dx_gui_ListView_getCurSelectedIndex(JSContext *cx, uint32_t argc, return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_getCurSelectedIndex : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_getCurSelectedIndex : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ListView_insertDefaultItem(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_insertDefaultItem(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ListView* cobj = (cocos2d::gui::ListView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ListView_insertDefaultItem : Invalid Native Object"); + cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_insertDefaultItem : Invalid Native Object"); if (argc == 1) { ssize_t arg0; ok &= jsval_to_ssize(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ListView_insertDefaultItem : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ListView_insertDefaultItem : Error processing arguments"); cobj->insertDefaultItem(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_insertDefaultItem : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_insertDefaultItem : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ListView_setItemsMargin(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_setItemsMargin(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ListView* cobj = (cocos2d::gui::ListView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ListView_setItemsMargin : Invalid Native Object"); + cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_setItemsMargin : Invalid Native Object"); if (argc == 1) { double arg0; ok &= JS::ToNumber( cx, JS::RootedValue(cx, argv[0]), &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ListView_setItemsMargin : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ListView_setItemsMargin : Error processing arguments"); cobj->setItemsMargin(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_setItemsMargin : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_setItemsMargin : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ListView_removeLastItem(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_removeLastItem(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ListView* cobj = (cocos2d::gui::ListView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ListView_removeLastItem : Invalid Native Object"); + cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_removeLastItem : Invalid Native Object"); if (argc == 0) { cobj->removeLastItem(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_removeLastItem : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_removeLastItem : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ListView_getItem(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_getItem(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ListView* cobj = (cocos2d::gui::ListView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ListView_getItem : Invalid Native Object"); + cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_getItem : Invalid Native Object"); if (argc == 1) { ssize_t arg0; ok &= jsval_to_ssize(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ListView_getItem : Error processing arguments"); - cocos2d::gui::Widget* ret = cobj->getItem(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ListView_getItem : Error processing arguments"); + cocos2d::ui::Widget* ret = cobj->getItem(arg0); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::Widget*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::Widget*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -5116,103 +5116,103 @@ bool js_cocos2dx_gui_ListView_getItem(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_getItem : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_getItem : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ListView_setItemModel(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_setItemModel(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ListView* cobj = (cocos2d::gui::ListView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ListView_setItemModel : Invalid Native Object"); + cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_setItemModel : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::Widget* arg0; + cocos2d::ui::Widget* arg0; do { if (!argv[0].isObject()) { ok = false; break; } js_proxy_t *proxy; JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); proxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::gui::Widget*)(proxy ? proxy->ptr : NULL); + arg0 = (cocos2d::ui::Widget*)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ListView_setItemModel : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ListView_setItemModel : Error processing arguments"); cobj->setItemModel(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_setItemModel : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_setItemModel : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_ListView_requestRefreshView(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_requestRefreshView(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ListView* cobj = (cocos2d::gui::ListView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ListView_requestRefreshView : Invalid Native Object"); + cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_requestRefreshView : Invalid Native Object"); if (argc == 0) { cobj->requestRefreshView(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_requestRefreshView : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_requestRefreshView : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ListView_pushBackDefaultItem(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_pushBackDefaultItem(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ListView* cobj = (cocos2d::gui::ListView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ListView_pushBackDefaultItem : Invalid Native Object"); + cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_pushBackDefaultItem : Invalid Native Object"); if (argc == 0) { cobj->pushBackDefaultItem(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_pushBackDefaultItem : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_pushBackDefaultItem : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_ListView_insertCustomItem(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_insertCustomItem(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::ListView* cobj = (cocos2d::gui::ListView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_ListView_insertCustomItem : Invalid Native Object"); + cocos2d::ui::ListView* cobj = (cocos2d::ui::ListView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_ListView_insertCustomItem : Invalid Native Object"); if (argc == 2) { - cocos2d::gui::Widget* arg0; + cocos2d::ui::Widget* arg0; ssize_t arg1; do { if (!argv[0].isObject()) { ok = false; break; } js_proxy_t *proxy; JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); proxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::gui::Widget*)(proxy ? proxy->ptr : NULL); + arg0 = (cocos2d::ui::Widget*)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); ok &= jsval_to_ssize(cx, argv[1], &arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_ListView_insertCustomItem : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_ListView_insertCustomItem : Error processing arguments"); cobj->insertCustomItem(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_insertCustomItem : wrong number of arguments: %d, was expecting %d", argc, 2); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_insertCustomItem : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_gui_ListView_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::ListView* ret = cocos2d::gui::ListView::create(); + cocos2d::ui::ListView* ret = cocos2d::ui::ListView::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::ListView*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::ListView*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -5221,19 +5221,19 @@ bool js_cocos2dx_gui_ListView_create(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_ListView_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_ListView_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::ListView* cobj = new cocos2d::gui::ListView(); + cocos2d::ui::ListView* cobj = new cocos2d::ui::ListView(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -5244,33 +5244,33 @@ bool js_cocos2dx_gui_ListView_constructor(JSContext *cx, uint32_t argc, jsval *v JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::ListView"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::ListView"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_ListView_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_ListView_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -extern JSObject *jsb_cocos2d_gui_ScrollView_prototype; +extern JSObject *jsb_cocos2d_ui_ScrollView_prototype; -void js_cocos2d_gui_ListView_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_ListView_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (ListView)", obj); } -void js_register_cocos2dx_gui_ListView(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_ListView_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_ListView_class->name = "ListView"; - jsb_cocos2d_gui_ListView_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_ListView_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_ListView_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_ListView_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_ListView_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_ListView_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_ListView_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_ListView_class->finalize = js_cocos2d_gui_ListView_finalize; - jsb_cocos2d_gui_ListView_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_ListView(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_ListView_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_ListView_class->name = "ListView"; + jsb_cocos2d_ui_ListView_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_ListView_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_ListView_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_ListView_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_ListView_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_ListView_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_ListView_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_ListView_class->finalize = js_cocos2d_ui_ListView_finalize; + jsb_cocos2d_ui_ListView_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -5278,34 +5278,34 @@ void js_register_cocos2dx_gui_ListView(JSContext *cx, JSObject *global) { }; static JSFunctionSpec funcs[] = { - JS_FN("getIndex", js_cocos2dx_gui_ListView_getIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAllItems", js_cocos2dx_gui_ListView_removeAllItems, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setGravity", js_cocos2dx_gui_ListView_setGravity, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("pushBackCustomItem", js_cocos2dx_gui_ListView_pushBackCustomItem, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getItems", js_cocos2dx_gui_ListView_getItems, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeItem", js_cocos2dx_gui_ListView_removeItem, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getCurSelectedIndex", js_cocos2dx_gui_ListView_getCurSelectedIndex, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("insertDefaultItem", js_cocos2dx_gui_ListView_insertDefaultItem, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setItemsMargin", js_cocos2dx_gui_ListView_setItemsMargin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeLastItem", js_cocos2dx_gui_ListView_removeLastItem, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getItem", js_cocos2dx_gui_ListView_getItem, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setItemModel", js_cocos2dx_gui_ListView_setItemModel, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("requestRefreshView", js_cocos2dx_gui_ListView_requestRefreshView, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("pushBackDefaultItem", js_cocos2dx_gui_ListView_pushBackDefaultItem, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("insertCustomItem", js_cocos2dx_gui_ListView_insertCustomItem, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getIndex", js_cocos2dx_ui_ListView_getIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllItems", js_cocos2dx_ui_ListView_removeAllItems, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setGravity", js_cocos2dx_ui_ListView_setGravity, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("pushBackCustomItem", js_cocos2dx_ui_ListView_pushBackCustomItem, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getItems", js_cocos2dx_ui_ListView_getItems, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeItem", js_cocos2dx_ui_ListView_removeItem, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getCurSelectedIndex", js_cocos2dx_ui_ListView_getCurSelectedIndex, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("insertDefaultItem", js_cocos2dx_ui_ListView_insertDefaultItem, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setItemsMargin", js_cocos2dx_ui_ListView_setItemsMargin, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeLastItem", js_cocos2dx_ui_ListView_removeLastItem, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getItem", js_cocos2dx_ui_ListView_getItem, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setItemModel", js_cocos2dx_ui_ListView_setItemModel, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("requestRefreshView", js_cocos2dx_ui_ListView_requestRefreshView, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("pushBackDefaultItem", js_cocos2dx_ui_ListView_pushBackDefaultItem, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("insertCustomItem", js_cocos2dx_ui_ListView_insertCustomItem, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_ListView_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_ListView_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_ListView_prototype = JS_InitClass( + jsb_cocos2d_ui_ListView_prototype = JS_InitClass( cx, global, - jsb_cocos2d_gui_ScrollView_prototype, - jsb_cocos2d_gui_ListView_class, - js_cocos2dx_gui_ListView_constructor, 0, // constructor + jsb_cocos2d_ui_ScrollView_prototype, + jsb_cocos2d_ui_ListView_class, + js_cocos2dx_ui_ListView_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -5316,140 +5316,140 @@ void js_register_cocos2dx_gui_ListView(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "ListView", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_ListView_class; - p->proto = jsb_cocos2d_gui_ListView_prototype; - p->parentProto = jsb_cocos2d_gui_ScrollView_prototype; + p->jsclass = jsb_cocos2d_ui_ListView_class; + p->proto = jsb_cocos2d_ui_ListView_prototype; + p->parentProto = jsb_cocos2d_ui_ScrollView_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_Slider_class; -JSObject *jsb_cocos2d_gui_Slider_prototype; +JSClass *jsb_cocos2d_ui_Slider_class; +JSObject *jsb_cocos2d_ui_Slider_prototype; -bool js_cocos2dx_gui_Slider_setPercent(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Slider_setPercent(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Slider* cobj = (cocos2d::gui::Slider *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Slider_setPercent : Invalid Native Object"); + cocos2d::ui::Slider* cobj = (cocos2d::ui::Slider *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Slider_setPercent : Invalid Native Object"); if (argc == 1) { int arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_setPercent : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_setPercent : Error processing arguments"); cobj->setPercent(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Slider_setPercent : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Slider_setPercent : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Slider_loadSlidBallTextureNormal(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Slider_loadSlidBallTextureNormal(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Slider* cobj = (cocos2d::gui::Slider *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Slider_loadSlidBallTextureNormal : Invalid Native Object"); + cocos2d::ui::Slider* cobj = (cocos2d::ui::Slider *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Slider_loadSlidBallTextureNormal : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_loadSlidBallTextureNormal : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_loadSlidBallTextureNormal : Error processing arguments"); cobj->loadSlidBallTextureNormal(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_loadSlidBallTextureNormal : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_loadSlidBallTextureNormal : Error processing arguments"); cobj->loadSlidBallTextureNormal(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Slider_loadSlidBallTextureNormal : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Slider_loadSlidBallTextureNormal : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Slider_loadBarTexture(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Slider_loadBarTexture(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Slider* cobj = (cocos2d::gui::Slider *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Slider_loadBarTexture : Invalid Native Object"); + cocos2d::ui::Slider* cobj = (cocos2d::ui::Slider *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Slider_loadBarTexture : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_loadBarTexture : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_loadBarTexture : Error processing arguments"); cobj->loadBarTexture(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_loadBarTexture : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_loadBarTexture : Error processing arguments"); cobj->loadBarTexture(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Slider_loadBarTexture : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Slider_loadBarTexture : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Slider_loadProgressBarTexture(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Slider_loadProgressBarTexture(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Slider* cobj = (cocos2d::gui::Slider *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Slider_loadProgressBarTexture : Invalid Native Object"); + cocos2d::ui::Slider* cobj = (cocos2d::ui::Slider *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Slider_loadProgressBarTexture : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_loadProgressBarTexture : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_loadProgressBarTexture : Error processing arguments"); cobj->loadProgressBarTexture(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_loadProgressBarTexture : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_loadProgressBarTexture : Error processing arguments"); cobj->loadProgressBarTexture(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Slider_loadProgressBarTexture : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Slider_loadProgressBarTexture : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Slider_loadSlidBallTextures(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Slider_loadSlidBallTextures(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Slider* cobj = (cocos2d::gui::Slider *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Slider_loadSlidBallTextures : Invalid Native Object"); + cocos2d::ui::Slider* cobj = (cocos2d::ui::Slider *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Slider_loadSlidBallTextures : Invalid Native Object"); if (argc == 3) { const char* arg0; const char* arg1; @@ -5457,7 +5457,7 @@ bool js_cocos2dx_gui_Slider_loadSlidBallTextures(JSContext *cx, uint32_t argc, j std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); std::string arg1_tmp; ok &= jsval_to_std_string(cx, argv[1], &arg1_tmp); arg1 = arg1_tmp.c_str(); std::string arg2_tmp; ok &= jsval_to_std_string(cx, argv[2], &arg2_tmp); arg2 = arg2_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_loadSlidBallTextures : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_loadSlidBallTextures : Error processing arguments"); cobj->loadSlidBallTextures(arg0, arg1, arg2); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; @@ -5466,166 +5466,166 @@ bool js_cocos2dx_gui_Slider_loadSlidBallTextures(JSContext *cx, uint32_t argc, j const char* arg0; const char* arg1; const char* arg2; - cocos2d::gui::TextureResType arg3; + cocos2d::ui::TextureResType arg3; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); std::string arg1_tmp; ok &= jsval_to_std_string(cx, argv[1], &arg1_tmp); arg1 = arg1_tmp.c_str(); std::string arg2_tmp; ok &= jsval_to_std_string(cx, argv[2], &arg2_tmp); arg2 = arg2_tmp.c_str(); ok &= jsval_to_int32(cx, argv[3], (int32_t *)&arg3); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_loadSlidBallTextures : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_loadSlidBallTextures : Error processing arguments"); cobj->loadSlidBallTextures(arg0, arg1, arg2, arg3); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Slider_loadSlidBallTextures : wrong number of arguments: %d, was expecting %d", argc, 3); + JS_ReportError(cx, "js_cocos2dx_ui_Slider_loadSlidBallTextures : wrong number of arguments: %d, was expecting %d", argc, 3); return false; } -bool js_cocos2dx_gui_Slider_setCapInsetProgressBarRebderer(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Slider_setCapInsetProgressBarRebderer(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Slider* cobj = (cocos2d::gui::Slider *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Slider_setCapInsetProgressBarRebderer : Invalid Native Object"); + cocos2d::ui::Slider* cobj = (cocos2d::ui::Slider *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Slider_setCapInsetProgressBarRebderer : Invalid Native Object"); if (argc == 1) { cocos2d::Rect arg0; ok &= jsval_to_ccrect(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_setCapInsetProgressBarRebderer : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_setCapInsetProgressBarRebderer : Error processing arguments"); cobj->setCapInsetProgressBarRebderer(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Slider_setCapInsetProgressBarRebderer : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Slider_setCapInsetProgressBarRebderer : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Slider_setCapInsetsBarRenderer(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Slider_setCapInsetsBarRenderer(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Slider* cobj = (cocos2d::gui::Slider *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Slider_setCapInsetsBarRenderer : Invalid Native Object"); + cocos2d::ui::Slider* cobj = (cocos2d::ui::Slider *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Slider_setCapInsetsBarRenderer : Invalid Native Object"); if (argc == 1) { cocos2d::Rect arg0; ok &= jsval_to_ccrect(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_setCapInsetsBarRenderer : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_setCapInsetsBarRenderer : Error processing arguments"); cobj->setCapInsetsBarRenderer(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Slider_setCapInsetsBarRenderer : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Slider_setCapInsetsBarRenderer : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Slider_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Slider_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Slider* cobj = (cocos2d::gui::Slider *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Slider_setScale9Enabled : Invalid Native Object"); + cocos2d::ui::Slider* cobj = (cocos2d::ui::Slider *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Slider_setScale9Enabled : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_setScale9Enabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_setScale9Enabled : Error processing arguments"); cobj->setScale9Enabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Slider_setScale9Enabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Slider_setScale9Enabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Slider_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Slider_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Slider* cobj = (cocos2d::gui::Slider *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Slider_setCapInsets : Invalid Native Object"); + cocos2d::ui::Slider* cobj = (cocos2d::ui::Slider *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Slider_setCapInsets : Invalid Native Object"); if (argc == 1) { cocos2d::Rect arg0; ok &= jsval_to_ccrect(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_setCapInsets : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_setCapInsets : Error processing arguments"); cobj->setCapInsets(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Slider_setCapInsets : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Slider_setCapInsets : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Slider_loadSlidBallTexturePressed(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Slider_loadSlidBallTexturePressed(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Slider* cobj = (cocos2d::gui::Slider *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Slider_loadSlidBallTexturePressed : Invalid Native Object"); + cocos2d::ui::Slider* cobj = (cocos2d::ui::Slider *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Slider_loadSlidBallTexturePressed : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_loadSlidBallTexturePressed : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_loadSlidBallTexturePressed : Error processing arguments"); cobj->loadSlidBallTexturePressed(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_loadSlidBallTexturePressed : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_loadSlidBallTexturePressed : Error processing arguments"); cobj->loadSlidBallTexturePressed(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Slider_loadSlidBallTexturePressed : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Slider_loadSlidBallTexturePressed : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Slider_loadSlidBallTextureDisabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Slider_loadSlidBallTextureDisabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Slider* cobj = (cocos2d::gui::Slider *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Slider_loadSlidBallTextureDisabled : Invalid Native Object"); + cocos2d::ui::Slider* cobj = (cocos2d::ui::Slider *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Slider_loadSlidBallTextureDisabled : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_loadSlidBallTextureDisabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_loadSlidBallTextureDisabled : Error processing arguments"); cobj->loadSlidBallTextureDisabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } if (argc == 2) { const char* arg0; - cocos2d::gui::TextureResType arg1; + cocos2d::ui::TextureResType arg1; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Slider_loadSlidBallTextureDisabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Slider_loadSlidBallTextureDisabled : Error processing arguments"); cobj->loadSlidBallTextureDisabled(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Slider_loadSlidBallTextureDisabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_Slider_loadSlidBallTextureDisabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_Slider_getPercent(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Slider_getPercent(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::Slider* cobj = (cocos2d::gui::Slider *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_Slider_getPercent : Invalid Native Object"); + cocos2d::ui::Slider* cobj = (cocos2d::ui::Slider *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_Slider_getPercent : Invalid Native Object"); if (argc == 0) { int ret = cobj->getPercent(); jsval jsret = JSVAL_NULL; @@ -5634,17 +5634,17 @@ bool js_cocos2dx_gui_Slider_getPercent(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Slider_getPercent : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Slider_getPercent : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_Slider_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Slider_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::Slider* ret = cocos2d::gui::Slider::create(); + cocos2d::ui::Slider* ret = cocos2d::ui::Slider::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::Slider*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::Slider*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -5653,19 +5653,19 @@ bool js_cocos2dx_gui_Slider_create(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Slider_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_Slider_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_Slider_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Slider_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::Slider* cobj = new cocos2d::gui::Slider(); + cocos2d::ui::Slider* cobj = new cocos2d::ui::Slider(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -5676,33 +5676,33 @@ bool js_cocos2dx_gui_Slider_constructor(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::Slider"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::Slider"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Slider_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_Slider_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -extern JSObject *jsb_cocos2d_gui_Widget_prototype; +extern JSObject *jsb_cocos2d_ui_Widget_prototype; -void js_cocos2d_gui_Slider_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_Slider_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (Slider)", obj); } -void js_register_cocos2dx_gui_Slider(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_Slider_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_Slider_class->name = "Slider"; - jsb_cocos2d_gui_Slider_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_Slider_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_Slider_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_Slider_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_Slider_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_Slider_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_Slider_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_Slider_class->finalize = js_cocos2d_gui_Slider_finalize; - jsb_cocos2d_gui_Slider_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_Slider(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_Slider_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_Slider_class->name = "Slider"; + jsb_cocos2d_ui_Slider_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_Slider_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_Slider_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_Slider_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_Slider_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_Slider_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_Slider_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_Slider_class->finalize = js_cocos2d_ui_Slider_finalize; + jsb_cocos2d_ui_Slider_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -5710,31 +5710,31 @@ void js_register_cocos2dx_gui_Slider(JSContext *cx, JSObject *global) { }; static JSFunctionSpec funcs[] = { - JS_FN("setPercent", js_cocos2dx_gui_Slider_setPercent, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadSlidBallTextureNormal", js_cocos2dx_gui_Slider_loadSlidBallTextureNormal, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadBarTexture", js_cocos2dx_gui_Slider_loadBarTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadProgressBarTexture", js_cocos2dx_gui_Slider_loadProgressBarTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadSlidBallTextures", js_cocos2dx_gui_Slider_loadSlidBallTextures, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setCapInsetProgressBarRebderer", js_cocos2dx_gui_Slider_setCapInsetProgressBarRebderer, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setCapInsetsBarRenderer", js_cocos2dx_gui_Slider_setCapInsetsBarRenderer, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setScale9Enabled", js_cocos2dx_gui_Slider_setScale9Enabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setCapInsets", js_cocos2dx_gui_Slider_setCapInsets, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadSlidBallTexturePressed", js_cocos2dx_gui_Slider_loadSlidBallTexturePressed, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("loadSlidBallTextureDisabled", js_cocos2dx_gui_Slider_loadSlidBallTextureDisabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getPercent", js_cocos2dx_gui_Slider_getPercent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPercent", js_cocos2dx_ui_Slider_setPercent, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadSlidBallTextureNormal", js_cocos2dx_ui_Slider_loadSlidBallTextureNormal, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadBarTexture", js_cocos2dx_ui_Slider_loadBarTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadProgressBarTexture", js_cocos2dx_ui_Slider_loadProgressBarTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadSlidBallTextures", js_cocos2dx_ui_Slider_loadSlidBallTextures, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCapInsetProgressBarRebderer", js_cocos2dx_ui_Slider_setCapInsetProgressBarRebderer, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCapInsetsBarRenderer", js_cocos2dx_ui_Slider_setCapInsetsBarRenderer, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setScale9Enabled", js_cocos2dx_ui_Slider_setScale9Enabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setCapInsets", js_cocos2dx_ui_Slider_setCapInsets, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadSlidBallTexturePressed", js_cocos2dx_ui_Slider_loadSlidBallTexturePressed, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("loadSlidBallTextureDisabled", js_cocos2dx_ui_Slider_loadSlidBallTextureDisabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPercent", js_cocos2dx_ui_Slider_getPercent, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_Slider_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_Slider_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_Slider_prototype = JS_InitClass( + jsb_cocos2d_ui_Slider_prototype = JS_InitClass( cx, global, - jsb_cocos2d_gui_Widget_prototype, - jsb_cocos2d_gui_Slider_class, - js_cocos2dx_gui_Slider_constructor, 0, // constructor + jsb_cocos2d_ui_Widget_prototype, + jsb_cocos2d_ui_Slider_class, + js_cocos2dx_ui_Slider_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -5745,48 +5745,48 @@ void js_register_cocos2dx_gui_Slider(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "Slider", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_Slider_class; - p->proto = jsb_cocos2d_gui_Slider_prototype; - p->parentProto = jsb_cocos2d_gui_Widget_prototype; + p->jsclass = jsb_cocos2d_ui_Slider_class; + p->proto = jsb_cocos2d_ui_Slider_prototype; + p->parentProto = jsb_cocos2d_ui_Widget_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_TextField_class; -JSObject *jsb_cocos2d_gui_TextField_prototype; +JSClass *jsb_cocos2d_ui_TextField_class; +JSObject *jsb_cocos2d_ui_TextField_prototype; -bool js_cocos2dx_gui_TextField_setAttachWithIME(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_setAttachWithIME(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_setAttachWithIME : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_setAttachWithIME : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextField_setAttachWithIME : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextField_setAttachWithIME : Error processing arguments"); cobj->setAttachWithIME(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_setAttachWithIME : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_setAttachWithIME : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextField_getStringValue(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_getStringValue(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_getStringValue : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_getStringValue : Invalid Native Object"); if (argc == 0) { const std::string& ret = cobj->getStringValue(); jsval jsret = JSVAL_NULL; @@ -5795,35 +5795,35 @@ bool js_cocos2dx_gui_TextField_getStringValue(JSContext *cx, uint32_t argc, jsva return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_getStringValue : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_getStringValue : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_TextField_setPasswordStyleText(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_setPasswordStyleText(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_setPasswordStyleText : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_setPasswordStyleText : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextField_setPasswordStyleText : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextField_setPasswordStyleText : Error processing arguments"); cobj->setPasswordStyleText(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_setPasswordStyleText : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_setPasswordStyleText : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextField_getAttachWithIME(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_getAttachWithIME(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_getAttachWithIME : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_getAttachWithIME : Invalid Native Object"); if (argc == 0) { bool ret = cobj->getAttachWithIME(); jsval jsret = JSVAL_NULL; @@ -5832,35 +5832,35 @@ bool js_cocos2dx_gui_TextField_getAttachWithIME(JSContext *cx, uint32_t argc, js return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_getAttachWithIME : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_getAttachWithIME : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_TextField_setFontName(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_setFontName(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_setFontName : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_setFontName : Invalid Native Object"); if (argc == 1) { std::string arg0; ok &= jsval_to_std_string(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextField_setFontName : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextField_setFontName : Error processing arguments"); cobj->setFontName(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_setFontName : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_setFontName : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextField_getInsertText(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_getInsertText(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_getInsertText : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_getInsertText : Invalid Native Object"); if (argc == 0) { bool ret = cobj->getInsertText(); jsval jsret = JSVAL_NULL; @@ -5869,35 +5869,35 @@ bool js_cocos2dx_gui_TextField_getInsertText(JSContext *cx, uint32_t argc, jsval return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_getInsertText : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_getInsertText : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_TextField_setInsertText(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_setInsertText(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_setInsertText : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_setInsertText : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextField_setInsertText : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextField_setInsertText : Error processing arguments"); cobj->setInsertText(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_setInsertText : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_setInsertText : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextField_getDetachWithIME(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_getDetachWithIME(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_getDetachWithIME : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_getDetachWithIME : Invalid Native Object"); if (argc == 0) { bool ret = cobj->getDetachWithIME(); jsval jsret = JSVAL_NULL; @@ -5906,85 +5906,85 @@ bool js_cocos2dx_gui_TextField_getDetachWithIME(JSContext *cx, uint32_t argc, js return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_getDetachWithIME : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_getDetachWithIME : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_TextField_didNotSelectSelf(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_didNotSelectSelf(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_didNotSelectSelf : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_didNotSelectSelf : Invalid Native Object"); if (argc == 0) { cobj->didNotSelectSelf(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_didNotSelectSelf : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_didNotSelectSelf : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_TextField_attachWithIME(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_attachWithIME(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_attachWithIME : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_attachWithIME : Invalid Native Object"); if (argc == 0) { cobj->attachWithIME(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_attachWithIME : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_attachWithIME : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_TextField_setPasswordEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_setPasswordEnabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_setPasswordEnabled : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_setPasswordEnabled : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextField_setPasswordEnabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextField_setPasswordEnabled : Error processing arguments"); cobj->setPasswordEnabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_setPasswordEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_setPasswordEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextField_setMaxLengthEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_setMaxLengthEnabled(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_setMaxLengthEnabled : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_setMaxLengthEnabled : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextField_setMaxLengthEnabled : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextField_setMaxLengthEnabled : Error processing arguments"); cobj->setMaxLengthEnabled(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_setMaxLengthEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_setMaxLengthEnabled : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextField_getDeleteBackward(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_getDeleteBackward(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_getDeleteBackward : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_getDeleteBackward : Invalid Native Object"); if (argc == 0) { bool ret = cobj->getDeleteBackward(); jsval jsret = JSVAL_NULL; @@ -5993,55 +5993,55 @@ bool js_cocos2dx_gui_TextField_getDeleteBackward(JSContext *cx, uint32_t argc, j return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_getDeleteBackward : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_getDeleteBackward : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_TextField_setFontSize(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_setFontSize(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_setFontSize : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_setFontSize : Invalid Native Object"); if (argc == 1) { int arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextField_setFontSize : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextField_setFontSize : Error processing arguments"); cobj->setFontSize(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_setFontSize : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_setFontSize : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextField_setPlaceHolder(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_setPlaceHolder(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_setPlaceHolder : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_setPlaceHolder : Invalid Native Object"); if (argc == 1) { std::string arg0; ok &= jsval_to_std_string(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextField_setPlaceHolder : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextField_setPlaceHolder : Error processing arguments"); cobj->setPlaceHolder(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_setPlaceHolder : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_setPlaceHolder : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextField_isPasswordEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_isPasswordEnabled(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_isPasswordEnabled : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_isPasswordEnabled : Invalid Native Object"); if (argc == 0) { bool ret = cobj->isPasswordEnabled(); jsval jsret = JSVAL_NULL; @@ -6050,15 +6050,15 @@ bool js_cocos2dx_gui_TextField_isPasswordEnabled(JSContext *cx, uint32_t argc, j return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_isPasswordEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_isPasswordEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_TextField_getMaxLength(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_getMaxLength(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_getMaxLength : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_getMaxLength : Invalid Native Object"); if (argc == 0) { int ret = cobj->getMaxLength(); jsval jsret = JSVAL_NULL; @@ -6067,15 +6067,15 @@ bool js_cocos2dx_gui_TextField_getMaxLength(JSContext *cx, uint32_t argc, jsval return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_getMaxLength : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_getMaxLength : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_TextField_isMaxLengthEnabled(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_isMaxLengthEnabled(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_isMaxLengthEnabled : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_isMaxLengthEnabled : Invalid Native Object"); if (argc == 0) { bool ret = cobj->isMaxLengthEnabled(); jsval jsret = JSVAL_NULL; @@ -6084,117 +6084,117 @@ bool js_cocos2dx_gui_TextField_isMaxLengthEnabled(JSContext *cx, uint32_t argc, return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_isMaxLengthEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_isMaxLengthEnabled : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_TextField_setDetachWithIME(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_setDetachWithIME(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_setDetachWithIME : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_setDetachWithIME : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextField_setDetachWithIME : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextField_setDetachWithIME : Error processing arguments"); cobj->setDetachWithIME(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_setDetachWithIME : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_setDetachWithIME : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextField_setText(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_setText(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_setText : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_setText : Invalid Native Object"); if (argc == 1) { std::string arg0; ok &= jsval_to_std_string(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextField_setText : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextField_setText : Error processing arguments"); cobj->setText(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_setText : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_setText : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextField_setMaxLength(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_setMaxLength(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_setMaxLength : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_setMaxLength : Invalid Native Object"); if (argc == 1) { int arg0; ok &= jsval_to_int32(cx, argv[0], (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextField_setMaxLength : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextField_setMaxLength : Error processing arguments"); cobj->setMaxLength(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_setMaxLength : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_setMaxLength : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextField_setTouchSize(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_setTouchSize(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_setTouchSize : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_setTouchSize : Invalid Native Object"); if (argc == 1) { cocos2d::Size arg0; ok &= jsval_to_ccsize(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextField_setTouchSize : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextField_setTouchSize : Error processing arguments"); cobj->setTouchSize(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_setTouchSize : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_setTouchSize : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextField_setDeleteBackward(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_setDeleteBackward(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextField* cobj = (cocos2d::gui::TextField *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextField_setDeleteBackward : Invalid Native Object"); + cocos2d::ui::TextField* cobj = (cocos2d::ui::TextField *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextField_setDeleteBackward : Invalid Native Object"); if (argc == 1) { bool arg0; ok &= JS_ValueToBoolean(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextField_setDeleteBackward : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextField_setDeleteBackward : Error processing arguments"); cobj->setDeleteBackward(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_setDeleteBackward : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_setDeleteBackward : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextField_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::TextField* ret = cocos2d::gui::TextField::create(); + cocos2d::ui::TextField* ret = cocos2d::ui::TextField::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::TextField*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::TextField*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -6203,19 +6203,19 @@ bool js_cocos2dx_gui_TextField_create(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_TextField_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextField_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::TextField* cobj = new cocos2d::gui::TextField(); + cocos2d::ui::TextField* cobj = new cocos2d::ui::TextField(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -6226,33 +6226,33 @@ bool js_cocos2dx_gui_TextField_constructor(JSContext *cx, uint32_t argc, jsval * JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::TextField"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::TextField"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextField_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_TextField_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -extern JSObject *jsb_cocos2d_gui_Widget_prototype; +extern JSObject *jsb_cocos2d_ui_Widget_prototype; -void js_cocos2d_gui_TextField_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_TextField_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (TextField)", obj); } -void js_register_cocos2dx_gui_TextField(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_TextField_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_TextField_class->name = "TextField"; - jsb_cocos2d_gui_TextField_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_TextField_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_TextField_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_TextField_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_TextField_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_TextField_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_TextField_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_TextField_class->finalize = js_cocos2d_gui_TextField_finalize; - jsb_cocos2d_gui_TextField_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_TextField(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_TextField_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_TextField_class->name = "TextField"; + jsb_cocos2d_ui_TextField_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_TextField_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_TextField_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_TextField_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_TextField_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_TextField_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_TextField_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_TextField_class->finalize = js_cocos2d_ui_TextField_finalize; + jsb_cocos2d_ui_TextField_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -6260,42 +6260,42 @@ void js_register_cocos2dx_gui_TextField(JSContext *cx, JSObject *global) { }; static JSFunctionSpec funcs[] = { - JS_FN("setAttachWithIME", js_cocos2dx_gui_TextField_setAttachWithIME, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getStringValue", js_cocos2dx_gui_TextField_getStringValue, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setPasswordStyleText", js_cocos2dx_gui_TextField_setPasswordStyleText, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getAttachWithIME", js_cocos2dx_gui_TextField_getAttachWithIME, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFontName", js_cocos2dx_gui_TextField_setFontName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getInsertText", js_cocos2dx_gui_TextField_getInsertText, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setInsertText", js_cocos2dx_gui_TextField_setInsertText, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDetachWithIME", js_cocos2dx_gui_TextField_getDetachWithIME, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("didNotSelectSelf", js_cocos2dx_gui_TextField_didNotSelectSelf, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("attachWithIME", js_cocos2dx_gui_TextField_attachWithIME, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setPasswordEnabled", js_cocos2dx_gui_TextField_setPasswordEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setMaxLengthEnabled", js_cocos2dx_gui_TextField_setMaxLengthEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getDeleteBackward", js_cocos2dx_gui_TextField_getDeleteBackward, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setFontSize", js_cocos2dx_gui_TextField_setFontSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setPlaceHolder", js_cocos2dx_gui_TextField_setPlaceHolder, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isPasswordEnabled", js_cocos2dx_gui_TextField_isPasswordEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMaxLength", js_cocos2dx_gui_TextField_getMaxLength, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("isMaxLengthEnabled", js_cocos2dx_gui_TextField_isMaxLengthEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDetachWithIME", js_cocos2dx_gui_TextField_setDetachWithIME, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setText", js_cocos2dx_gui_TextField_setText, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setMaxLength", js_cocos2dx_gui_TextField_setMaxLength, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTouchSize", js_cocos2dx_gui_TextField_setTouchSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setDeleteBackward", js_cocos2dx_gui_TextField_setDeleteBackward, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setAttachWithIME", js_cocos2dx_ui_TextField_setAttachWithIME, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getStringValue", js_cocos2dx_ui_TextField_getStringValue, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPasswordStyleText", js_cocos2dx_ui_TextField_setPasswordStyleText, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getAttachWithIME", js_cocos2dx_ui_TextField_getAttachWithIME, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFontName", js_cocos2dx_ui_TextField_setFontName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getInsertText", js_cocos2dx_ui_TextField_getInsertText, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setInsertText", js_cocos2dx_ui_TextField_setInsertText, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDetachWithIME", js_cocos2dx_ui_TextField_getDetachWithIME, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("didNotSelectSelf", js_cocos2dx_ui_TextField_didNotSelectSelf, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("attachWithIME", js_cocos2dx_ui_TextField_attachWithIME, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPasswordEnabled", js_cocos2dx_ui_TextField_setPasswordEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMaxLengthEnabled", js_cocos2dx_ui_TextField_setMaxLengthEnabled, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getDeleteBackward", js_cocos2dx_ui_TextField_getDeleteBackward, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFontSize", js_cocos2dx_ui_TextField_setFontSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setPlaceHolder", js_cocos2dx_ui_TextField_setPlaceHolder, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isPasswordEnabled", js_cocos2dx_ui_TextField_isPasswordEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMaxLength", js_cocos2dx_ui_TextField_getMaxLength, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("isMaxLengthEnabled", js_cocos2dx_ui_TextField_isMaxLengthEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDetachWithIME", js_cocos2dx_ui_TextField_setDetachWithIME, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setText", js_cocos2dx_ui_TextField_setText, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMaxLength", js_cocos2dx_ui_TextField_setMaxLength, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTouchSize", js_cocos2dx_ui_TextField_setTouchSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setDeleteBackward", js_cocos2dx_ui_TextField_setDeleteBackward, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_TextField_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_TextField_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_TextField_prototype = JS_InitClass( + jsb_cocos2d_ui_TextField_prototype = JS_InitClass( cx, global, - jsb_cocos2d_gui_Widget_prototype, - jsb_cocos2d_gui_TextField_class, - js_cocos2dx_gui_TextField_constructor, 0, // constructor + jsb_cocos2d_ui_Widget_prototype, + jsb_cocos2d_ui_TextField_class, + js_cocos2dx_ui_TextField_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -6306,48 +6306,48 @@ void js_register_cocos2dx_gui_TextField(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "TextField", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_TextField_class; - p->proto = jsb_cocos2d_gui_TextField_prototype; - p->parentProto = jsb_cocos2d_gui_Widget_prototype; + p->jsclass = jsb_cocos2d_ui_TextField_class; + p->proto = jsb_cocos2d_ui_TextField_prototype; + p->parentProto = jsb_cocos2d_ui_Widget_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_TextBMFont_class; -JSObject *jsb_cocos2d_gui_TextBMFont_prototype; +JSClass *jsb_cocos2d_ui_TextBMFont_class; +JSObject *jsb_cocos2d_ui_TextBMFont_prototype; -bool js_cocos2dx_gui_TextBMFont_setFntFile(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextBMFont_setFntFile(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextBMFont* cobj = (cocos2d::gui::TextBMFont *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextBMFont_setFntFile : Invalid Native Object"); + cocos2d::ui::TextBMFont* cobj = (cocos2d::ui::TextBMFont *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextBMFont_setFntFile : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextBMFont_setFntFile : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextBMFont_setFntFile : Error processing arguments"); cobj->setFntFile(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextBMFont_setFntFile : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextBMFont_setFntFile : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextBMFont_getStringValue(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextBMFont_getStringValue(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextBMFont* cobj = (cocos2d::gui::TextBMFont *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextBMFont_getStringValue : Invalid Native Object"); + cocos2d::ui::TextBMFont* cobj = (cocos2d::ui::TextBMFont *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextBMFont_getStringValue : Invalid Native Object"); if (argc == 0) { const char* ret = cobj->getStringValue(); jsval jsret = JSVAL_NULL; @@ -6356,37 +6356,37 @@ bool js_cocos2dx_gui_TextBMFont_getStringValue(JSContext *cx, uint32_t argc, jsv return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextBMFont_getStringValue : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_TextBMFont_getStringValue : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_TextBMFont_setText(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextBMFont_setText(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::TextBMFont* cobj = (cocos2d::gui::TextBMFont *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_TextBMFont_setText : Invalid Native Object"); + cocos2d::ui::TextBMFont* cobj = (cocos2d::ui::TextBMFont *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_TextBMFont_setText : Invalid Native Object"); if (argc == 1) { const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_TextBMFont_setText : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_TextBMFont_setText : Error processing arguments"); cobj->setText(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextBMFont_setText : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_TextBMFont_setText : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_TextBMFont_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextBMFont_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::TextBMFont* ret = cocos2d::gui::TextBMFont::create(); + cocos2d::ui::TextBMFont* ret = cocos2d::ui::TextBMFont::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::TextBMFont*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::TextBMFont*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -6395,19 +6395,19 @@ bool js_cocos2dx_gui_TextBMFont_create(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextBMFont_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_TextBMFont_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_TextBMFont_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_TextBMFont_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::TextBMFont* cobj = new cocos2d::gui::TextBMFont(); + cocos2d::ui::TextBMFont* cobj = new cocos2d::ui::TextBMFont(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -6418,33 +6418,33 @@ bool js_cocos2dx_gui_TextBMFont_constructor(JSContext *cx, uint32_t argc, jsval JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::TextBMFont"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::TextBMFont"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_TextBMFont_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_TextBMFont_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -extern JSObject *jsb_cocos2d_gui_Widget_prototype; +extern JSObject *jsb_cocos2d_ui_Widget_prototype; -void js_cocos2d_gui_TextBMFont_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_TextBMFont_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (TextBMFont)", obj); } -void js_register_cocos2dx_gui_TextBMFont(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_TextBMFont_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_TextBMFont_class->name = "TextBMFont"; - jsb_cocos2d_gui_TextBMFont_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_TextBMFont_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_TextBMFont_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_TextBMFont_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_TextBMFont_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_TextBMFont_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_TextBMFont_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_TextBMFont_class->finalize = js_cocos2d_gui_TextBMFont_finalize; - jsb_cocos2d_gui_TextBMFont_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_TextBMFont(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_TextBMFont_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_TextBMFont_class->name = "TextBMFont"; + jsb_cocos2d_ui_TextBMFont_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_TextBMFont_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_TextBMFont_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_TextBMFont_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_TextBMFont_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_TextBMFont_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_TextBMFont_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_TextBMFont_class->finalize = js_cocos2d_ui_TextBMFont_finalize; + jsb_cocos2d_ui_TextBMFont_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -6452,22 +6452,22 @@ void js_register_cocos2dx_gui_TextBMFont(JSContext *cx, JSObject *global) { }; static JSFunctionSpec funcs[] = { - JS_FN("setFntFile", js_cocos2dx_gui_TextBMFont_setFntFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getStringValue", js_cocos2dx_gui_TextBMFont_getStringValue, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setText", js_cocos2dx_gui_TextBMFont_setText, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setFntFile", js_cocos2dx_ui_TextBMFont_setFntFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getStringValue", js_cocos2dx_ui_TextBMFont_getStringValue, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setText", js_cocos2dx_ui_TextBMFont_setText, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_TextBMFont_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_TextBMFont_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_TextBMFont_prototype = JS_InitClass( + jsb_cocos2d_ui_TextBMFont_prototype = JS_InitClass( cx, global, - jsb_cocos2d_gui_Widget_prototype, - jsb_cocos2d_gui_TextBMFont_class, - js_cocos2dx_gui_TextBMFont_constructor, 0, // constructor + jsb_cocos2d_ui_Widget_prototype, + jsb_cocos2d_ui_TextBMFont_class, + js_cocos2dx_ui_TextBMFont_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -6478,28 +6478,28 @@ void js_register_cocos2dx_gui_TextBMFont(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "TextBMFont", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_TextBMFont_class; - p->proto = jsb_cocos2d_gui_TextBMFont_prototype; - p->parentProto = jsb_cocos2d_gui_Widget_prototype; + p->jsclass = jsb_cocos2d_ui_TextBMFont_class; + p->proto = jsb_cocos2d_ui_TextBMFont_prototype; + p->parentProto = jsb_cocos2d_ui_Widget_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_PageView_class; -JSObject *jsb_cocos2d_gui_PageView_prototype; +JSClass *jsb_cocos2d_ui_PageView_class; +JSObject *jsb_cocos2d_ui_PageView_prototype; -bool js_cocos2dx_gui_PageView_getCurPageIndex(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_PageView_getCurPageIndex(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::PageView* cobj = (cocos2d::gui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_PageView_getCurPageIndex : Invalid Native Object"); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_getCurPageIndex : Invalid Native Object"); if (argc == 0) { ssize_t ret = cobj->getCurPageIndex(); jsval jsret = JSVAL_NULL; @@ -6508,19 +6508,19 @@ bool js_cocos2dx_gui_PageView_getCurPageIndex(JSContext *cx, uint32_t argc, jsva return true; } - JS_ReportError(cx, "js_cocos2dx_gui_PageView_getCurPageIndex : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_PageView_getCurPageIndex : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_PageView_addWidgetToPage(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_PageView_addWidgetToPage(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::PageView* cobj = (cocos2d::gui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_PageView_addWidgetToPage : Invalid Native Object"); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_addWidgetToPage : Invalid Native Object"); if (argc == 3) { - cocos2d::gui::Widget* arg0; + cocos2d::ui::Widget* arg0; ssize_t arg1; bool arg2; do { @@ -6528,37 +6528,37 @@ bool js_cocos2dx_gui_PageView_addWidgetToPage(JSContext *cx, uint32_t argc, jsva js_proxy_t *proxy; JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); proxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::gui::Widget*)(proxy ? proxy->ptr : NULL); + arg0 = (cocos2d::ui::Widget*)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); ok &= jsval_to_ssize(cx, argv[1], &arg1); ok &= JS_ValueToBoolean(cx, argv[2], &arg2); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_PageView_addWidgetToPage : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_addWidgetToPage : Error processing arguments"); cobj->addWidgetToPage(arg0, arg1, arg2); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_PageView_addWidgetToPage : wrong number of arguments: %d, was expecting %d", argc, 3); + JS_ReportError(cx, "js_cocos2dx_ui_PageView_addWidgetToPage : wrong number of arguments: %d, was expecting %d", argc, 3); return false; } -bool js_cocos2dx_gui_PageView_getPage(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_PageView_getPage(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::PageView* cobj = (cocos2d::gui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_PageView_getPage : Invalid Native Object"); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_getPage : Invalid Native Object"); if (argc == 1) { ssize_t arg0; ok &= jsval_to_ssize(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_PageView_getPage : Error processing arguments"); - cocos2d::gui::Layout* ret = cobj->getPage(arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_getPage : Error processing arguments"); + cocos2d::ui::Layout* ret = cobj->getPage(arg0); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::Layout*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::Layout*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -6568,172 +6568,172 @@ bool js_cocos2dx_gui_PageView_getPage(JSContext *cx, uint32_t argc, jsval *vp) return true; } - JS_ReportError(cx, "js_cocos2dx_gui_PageView_getPage : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_PageView_getPage : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_PageView_removePage(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_PageView_removePage(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::PageView* cobj = (cocos2d::gui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_PageView_removePage : Invalid Native Object"); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_removePage : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::Layout* arg0; + cocos2d::ui::Layout* arg0; do { if (!argv[0].isObject()) { ok = false; break; } js_proxy_t *proxy; JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); proxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::gui::Layout*)(proxy ? proxy->ptr : NULL); + arg0 = (cocos2d::ui::Layout*)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_PageView_removePage : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_removePage : Error processing arguments"); cobj->removePage(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_PageView_removePage : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_PageView_removePage : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_PageView_insertPage(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_PageView_insertPage(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::PageView* cobj = (cocos2d::gui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_PageView_insertPage : Invalid Native Object"); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_insertPage : Invalid Native Object"); if (argc == 2) { - cocos2d::gui::Layout* arg0; + cocos2d::ui::Layout* arg0; int arg1; do { if (!argv[0].isObject()) { ok = false; break; } js_proxy_t *proxy; JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); proxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::gui::Layout*)(proxy ? proxy->ptr : NULL); + arg0 = (cocos2d::ui::Layout*)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_PageView_insertPage : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_insertPage : Error processing arguments"); cobj->insertPage(arg0, arg1); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_PageView_insertPage : wrong number of arguments: %d, was expecting %d", argc, 2); + JS_ReportError(cx, "js_cocos2dx_ui_PageView_insertPage : wrong number of arguments: %d, was expecting %d", argc, 2); return false; } -bool js_cocos2dx_gui_PageView_scrollToPage(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_PageView_scrollToPage(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::PageView* cobj = (cocos2d::gui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_PageView_scrollToPage : Invalid Native Object"); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_scrollToPage : Invalid Native Object"); if (argc == 1) { ssize_t arg0; ok &= jsval_to_ssize(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_PageView_scrollToPage : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_scrollToPage : Error processing arguments"); cobj->scrollToPage(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_PageView_scrollToPage : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_PageView_scrollToPage : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_PageView_removePageAtIndex(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_PageView_removePageAtIndex(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::PageView* cobj = (cocos2d::gui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_PageView_removePageAtIndex : Invalid Native Object"); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_removePageAtIndex : Invalid Native Object"); if (argc == 1) { ssize_t arg0; ok &= jsval_to_ssize(cx, argv[0], &arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_PageView_removePageAtIndex : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_removePageAtIndex : Error processing arguments"); cobj->removePageAtIndex(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_PageView_removePageAtIndex : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_PageView_removePageAtIndex : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_PageView_getPages(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_PageView_getPages(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::PageView* cobj = (cocos2d::gui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_PageView_getPages : Invalid Native Object"); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_getPages : Invalid Native Object"); if (argc == 0) { - cocos2d::Vector& ret = cobj->getPages(); + cocos2d::Vector& ret = cobj->getPages(); jsval jsret = JSVAL_NULL; jsret = ccvector_to_jsval(cx, ret); JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_PageView_getPages : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_PageView_getPages : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_PageView_removeAllPages(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_PageView_removeAllPages(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::PageView* cobj = (cocos2d::gui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_PageView_removeAllPages : Invalid Native Object"); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_removeAllPages : Invalid Native Object"); if (argc == 0) { cobj->removeAllPages(); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_PageView_removeAllPages : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_PageView_removeAllPages : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_gui_PageView_addPage(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_PageView_addPage(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::gui::PageView* cobj = (cocos2d::gui::PageView *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_gui_PageView_addPage : Invalid Native Object"); + cocos2d::ui::PageView* cobj = (cocos2d::ui::PageView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ui_PageView_addPage : Invalid Native Object"); if (argc == 1) { - cocos2d::gui::Layout* arg0; + cocos2d::ui::Layout* arg0; do { if (!argv[0].isObject()) { ok = false; break; } js_proxy_t *proxy; JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); proxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::gui::Layout*)(proxy ? proxy->ptr : NULL); + arg0 = (cocos2d::ui::Layout*)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_PageView_addPage : Error processing arguments"); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_PageView_addPage : Error processing arguments"); cobj->addPage(arg0); JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_PageView_addPage : wrong number of arguments: %d, was expecting %d", argc, 1); + JS_ReportError(cx, "js_cocos2dx_ui_PageView_addPage : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_gui_PageView_create(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_PageView_create(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::PageView* ret = cocos2d::gui::PageView::create(); + cocos2d::ui::PageView* ret = cocos2d::ui::PageView::create(); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::PageView*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::PageView*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -6742,19 +6742,19 @@ bool js_cocos2dx_gui_PageView_create(JSContext *cx, uint32_t argc, jsval *vp) JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_PageView_create : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_PageView_create : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_PageView_constructor(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_PageView_constructor(JSContext *cx, uint32_t argc, jsval *vp) { if (argc == 0) { - cocos2d::gui::PageView* cobj = new cocos2d::gui::PageView(); + cocos2d::ui::PageView* cobj = new cocos2d::ui::PageView(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -6765,33 +6765,33 @@ bool js_cocos2dx_gui_PageView_constructor(JSContext *cx, uint32_t argc, jsval *v JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::gui::PageView"); + JS_AddNamedObjectRoot(cx, &p->obj, "cocos2d::ui::PageView"); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_PageView_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); + JS_ReportError(cx, "js_cocos2dx_ui_PageView_constructor : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -extern JSObject *jsb_cocos2d_gui_Layout_prototype; +extern JSObject *jsb_cocos2d_ui_Layout_prototype; -void js_cocos2d_gui_PageView_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_PageView_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (PageView)", obj); } -void js_register_cocos2dx_gui_PageView(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_PageView_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_PageView_class->name = "PageView"; - jsb_cocos2d_gui_PageView_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_PageView_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_PageView_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_PageView_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_PageView_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_PageView_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_PageView_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_PageView_class->finalize = js_cocos2d_gui_PageView_finalize; - jsb_cocos2d_gui_PageView_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_PageView(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_PageView_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_PageView_class->name = "PageView"; + jsb_cocos2d_ui_PageView_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_PageView_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_PageView_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_PageView_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_PageView_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_PageView_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_PageView_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_PageView_class->finalize = js_cocos2d_ui_PageView_finalize; + jsb_cocos2d_ui_PageView_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -6799,29 +6799,29 @@ void js_register_cocos2dx_gui_PageView(JSContext *cx, JSObject *global) { }; static JSFunctionSpec funcs[] = { - JS_FN("getCurPageIndex", js_cocos2dx_gui_PageView_getCurPageIndex, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("addWidgetToPage", js_cocos2dx_gui_PageView_addWidgetToPage, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getPage", js_cocos2dx_gui_PageView_getPage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removePage", js_cocos2dx_gui_PageView_removePage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("insertPage", js_cocos2dx_gui_PageView_insertPage, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("scrollToPage", js_cocos2dx_gui_PageView_scrollToPage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removePageAtIndex", js_cocos2dx_gui_PageView_removePageAtIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getPages", js_cocos2dx_gui_PageView_getPages, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAllPages", js_cocos2dx_gui_PageView_removeAllPages, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("addPage", js_cocos2dx_gui_PageView_addPage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getCurPageIndex", js_cocos2dx_ui_PageView_getCurPageIndex, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("addWidgetToPage", js_cocos2dx_ui_PageView_addWidgetToPage, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPage", js_cocos2dx_ui_PageView_getPage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removePage", js_cocos2dx_ui_PageView_removePage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("insertPage", js_cocos2dx_ui_PageView_insertPage, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("scrollToPage", js_cocos2dx_ui_PageView_scrollToPage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removePageAtIndex", js_cocos2dx_ui_PageView_removePageAtIndex, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPages", js_cocos2dx_ui_PageView_getPages, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllPages", js_cocos2dx_ui_PageView_removeAllPages, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("addPage", js_cocos2dx_ui_PageView_addPage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_gui_PageView_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_ui_PageView_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_PageView_prototype = JS_InitClass( + jsb_cocos2d_ui_PageView_prototype = JS_InitClass( cx, global, - jsb_cocos2d_gui_Layout_prototype, - jsb_cocos2d_gui_PageView_class, - js_cocos2dx_gui_PageView_constructor, 0, // constructor + jsb_cocos2d_ui_Layout_prototype, + jsb_cocos2d_ui_PageView_class, + js_cocos2dx_ui_PageView_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -6832,44 +6832,44 @@ void js_register_cocos2dx_gui_PageView(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "PageView", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_PageView_class; - p->proto = jsb_cocos2d_gui_PageView_prototype; - p->parentProto = jsb_cocos2d_gui_Layout_prototype; + p->jsclass = jsb_cocos2d_ui_PageView_class; + p->proto = jsb_cocos2d_ui_PageView_prototype; + p->parentProto = jsb_cocos2d_ui_Layout_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_gui_Helper_class; -JSObject *jsb_cocos2d_gui_Helper_prototype; +JSClass *jsb_cocos2d_ui_Helper_class; +JSObject *jsb_cocos2d_ui_Helper_prototype; -bool js_cocos2dx_gui_Helper_seekActionWidgetByActionTag(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Helper_seekActionWidgetByActionTag(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; if (argc == 2) { - cocos2d::gui::Widget* arg0; + cocos2d::ui::Widget* arg0; int arg1; do { if (!argv[0].isObject()) { ok = false; break; } js_proxy_t *proxy; JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); proxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::gui::Widget*)(proxy ? proxy->ptr : NULL); + arg0 = (cocos2d::ui::Widget*)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Helper_seekActionWidgetByActionTag : Error processing arguments"); - cocos2d::gui::Widget* ret = cocos2d::gui::Helper::seekActionWidgetByActionTag(arg0, arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Helper_seekActionWidgetByActionTag : Error processing arguments"); + cocos2d::ui::Widget* ret = cocos2d::ui::Helper::seekActionWidgetByActionTag(arg0, arg1); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::Widget*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::Widget*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -6878,32 +6878,32 @@ bool js_cocos2dx_gui_Helper_seekActionWidgetByActionTag(JSContext *cx, uint32_t JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Helper_seekActionWidgetByActionTag : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_Helper_seekActionWidgetByActionTag : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_Helper_seekWidgetByTag(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Helper_seekWidgetByTag(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; if (argc == 2) { - cocos2d::gui::Widget* arg0; + cocos2d::ui::Widget* arg0; int arg1; do { if (!argv[0].isObject()) { ok = false; break; } js_proxy_t *proxy; JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); proxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::gui::Widget*)(proxy ? proxy->ptr : NULL); + arg0 = (cocos2d::ui::Widget*)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); ok &= jsval_to_int32(cx, argv[1], (int32_t *)&arg1); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Helper_seekWidgetByTag : Error processing arguments"); - cocos2d::gui::Widget* ret = cocos2d::gui::Helper::seekWidgetByTag(arg0, arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Helper_seekWidgetByTag : Error processing arguments"); + cocos2d::ui::Widget* ret = cocos2d::ui::Helper::seekWidgetByTag(arg0, arg1); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::Widget*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::Widget*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -6912,32 +6912,32 @@ bool js_cocos2dx_gui_Helper_seekWidgetByTag(JSContext *cx, uint32_t argc, jsval JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Helper_seekWidgetByTag : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_Helper_seekWidgetByTag : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_Helper_seekWidgetByRelativeName(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Helper_seekWidgetByRelativeName(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; if (argc == 2) { - cocos2d::gui::Widget* arg0; + cocos2d::ui::Widget* arg0; const char* arg1; do { if (!argv[0].isObject()) { ok = false; break; } js_proxy_t *proxy; JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); proxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::gui::Widget*)(proxy ? proxy->ptr : NULL); + arg0 = (cocos2d::ui::Widget*)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); std::string arg1_tmp; ok &= jsval_to_std_string(cx, argv[1], &arg1_tmp); arg1 = arg1_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Helper_seekWidgetByRelativeName : Error processing arguments"); - cocos2d::gui::Widget* ret = cocos2d::gui::Helper::seekWidgetByRelativeName(arg0, arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Helper_seekWidgetByRelativeName : Error processing arguments"); + cocos2d::ui::Widget* ret = cocos2d::ui::Helper::seekWidgetByRelativeName(arg0, arg1); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::Widget*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::Widget*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -6946,32 +6946,32 @@ bool js_cocos2dx_gui_Helper_seekWidgetByRelativeName(JSContext *cx, uint32_t arg JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Helper_seekWidgetByRelativeName : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_Helper_seekWidgetByRelativeName : wrong number of arguments"); return false; } -bool js_cocos2dx_gui_Helper_seekWidgetByName(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_ui_Helper_seekWidgetByName(JSContext *cx, uint32_t argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); bool ok = true; if (argc == 2) { - cocos2d::gui::Widget* arg0; + cocos2d::ui::Widget* arg0; const char* arg1; do { if (!argv[0].isObject()) { ok = false; break; } js_proxy_t *proxy; JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); proxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::gui::Widget*)(proxy ? proxy->ptr : NULL); + arg0 = (cocos2d::ui::Widget*)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); } while (0); std::string arg1_tmp; ok &= jsval_to_std_string(cx, argv[1], &arg1_tmp); arg1 = arg1_tmp.c_str(); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_gui_Helper_seekWidgetByName : Error processing arguments"); - cocos2d::gui::Widget* ret = cocos2d::gui::Helper::seekWidgetByName(arg0, arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ui_Helper_seekWidgetByName : Error processing arguments"); + cocos2d::ui::Widget* ret = cocos2d::ui::Helper::seekWidgetByName(arg0, arg1); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::Widget*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::Widget*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; @@ -6980,28 +6980,28 @@ bool js_cocos2dx_gui_Helper_seekWidgetByName(JSContext *cx, uint32_t argc, jsval JS_SET_RVAL(cx, vp, jsret); return true; } - JS_ReportError(cx, "js_cocos2dx_gui_Helper_seekWidgetByName : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ui_Helper_seekWidgetByName : wrong number of arguments"); return false; } -void js_cocos2d_gui_Helper_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_ui_Helper_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (Helper)", obj); } -void js_register_cocos2dx_gui_Helper(JSContext *cx, JSObject *global) { - jsb_cocos2d_gui_Helper_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_gui_Helper_class->name = "Helper"; - jsb_cocos2d_gui_Helper_class->addProperty = JS_PropertyStub; - jsb_cocos2d_gui_Helper_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_gui_Helper_class->getProperty = JS_PropertyStub; - jsb_cocos2d_gui_Helper_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_gui_Helper_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_gui_Helper_class->resolve = JS_ResolveStub; - jsb_cocos2d_gui_Helper_class->convert = JS_ConvertStub; - jsb_cocos2d_gui_Helper_class->finalize = js_cocos2d_gui_Helper_finalize; - jsb_cocos2d_gui_Helper_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_ui_Helper(JSContext *cx, JSObject *global) { + jsb_cocos2d_ui_Helper_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ui_Helper_class->name = "Helper"; + jsb_cocos2d_ui_Helper_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ui_Helper_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ui_Helper_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ui_Helper_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ui_Helper_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ui_Helper_class->resolve = JS_ResolveStub; + jsb_cocos2d_ui_Helper_class->convert = JS_ConvertStub; + jsb_cocos2d_ui_Helper_class->finalize = js_cocos2d_ui_Helper_finalize; + jsb_cocos2d_ui_Helper_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { {"__nativeObj", 0, JSPROP_ENUMERATE | JSPROP_PERMANENT, JSOP_WRAPPER(js_is_native_obj), JSOP_NULLWRAPPER}, @@ -7013,17 +7013,17 @@ void js_register_cocos2dx_gui_Helper(JSContext *cx, JSObject *global) { }; static JSFunctionSpec st_funcs[] = { - JS_FN("seekActionWidgetByActionTag", js_cocos2dx_gui_Helper_seekActionWidgetByActionTag, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("seekWidgetByTag", js_cocos2dx_gui_Helper_seekWidgetByTag, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("seekWidgetByRelativeName", js_cocos2dx_gui_Helper_seekWidgetByRelativeName, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("seekWidgetByName", js_cocos2dx_gui_Helper_seekWidgetByName, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("seekActionWidgetByActionTag", js_cocos2dx_ui_Helper_seekActionWidgetByActionTag, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("seekWidgetByTag", js_cocos2dx_ui_Helper_seekWidgetByTag, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("seekWidgetByRelativeName", js_cocos2dx_ui_Helper_seekWidgetByRelativeName, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("seekWidgetByName", js_cocos2dx_ui_Helper_seekWidgetByName, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_gui_Helper_prototype = JS_InitClass( + jsb_cocos2d_ui_Helper_prototype = JS_InitClass( cx, global, NULL, // parent proto - jsb_cocos2d_gui_Helper_class, + jsb_cocos2d_ui_Helper_class, empty_constructor, 0, properties, funcs, @@ -7035,20 +7035,20 @@ void js_register_cocos2dx_gui_Helper(JSContext *cx, JSObject *global) { // JS_SetPropertyAttributes(cx, global, "Helper", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_gui_Helper_class; - p->proto = jsb_cocos2d_gui_Helper_prototype; + p->jsclass = jsb_cocos2d_ui_Helper_class; + p->proto = jsb_cocos2d_ui_Helper_prototype; p->parentProto = NULL; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj) { +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj) { // first, try to get the ns JS::RootedValue nsval(cx); JS::RootedObject ns(cx); @@ -7062,23 +7062,23 @@ void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj) { } obj = ns; - js_register_cocos2dx_gui_Widget(cx, obj); - js_register_cocos2dx_gui_Layout(cx, obj); - js_register_cocos2dx_gui_PageView(cx, obj); - js_register_cocos2dx_gui_CheckBox(cx, obj); - js_register_cocos2dx_gui_Helper(cx, obj); - js_register_cocos2dx_gui_Text(cx, obj); - js_register_cocos2dx_gui_Button(cx, obj); - js_register_cocos2dx_gui_LayoutParameter(cx, obj); - js_register_cocos2dx_gui_LinearLayoutParameter(cx, obj); - js_register_cocos2dx_gui_TextBMFont(cx, obj); - js_register_cocos2dx_gui_ScrollView(cx, obj); - js_register_cocos2dx_gui_LoadingBar(cx, obj); - js_register_cocos2dx_gui_Slider(cx, obj); - js_register_cocos2dx_gui_RelativeLayoutParameter(cx, obj); - js_register_cocos2dx_gui_ImageView(cx, obj); - js_register_cocos2dx_gui_TextAtlas(cx, obj); - js_register_cocos2dx_gui_TextField(cx, obj); - js_register_cocos2dx_gui_ListView(cx, obj); + js_register_cocos2dx_ui_Widget(cx, obj); + js_register_cocos2dx_ui_Layout(cx, obj); + js_register_cocos2dx_ui_PageView(cx, obj); + js_register_cocos2dx_ui_CheckBox(cx, obj); + js_register_cocos2dx_ui_Helper(cx, obj); + js_register_cocos2dx_ui_Text(cx, obj); + js_register_cocos2dx_ui_Button(cx, obj); + js_register_cocos2dx_ui_LayoutParameter(cx, obj); + js_register_cocos2dx_ui_LinearLayoutParameter(cx, obj); + js_register_cocos2dx_ui_TextBMFont(cx, obj); + js_register_cocos2dx_ui_ScrollView(cx, obj); + js_register_cocos2dx_ui_LoadingBar(cx, obj); + js_register_cocos2dx_ui_Slider(cx, obj); + js_register_cocos2dx_ui_RelativeLayoutParameter(cx, obj); + js_register_cocos2dx_ui_ImageView(cx, obj); + js_register_cocos2dx_ui_TextAtlas(cx, obj); + js_register_cocos2dx_ui_TextField(cx, obj); + js_register_cocos2dx_ui_ListView(cx, obj); } diff --git a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_gui_auto.hpp b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_gui_auto.hpp index 3422219677..308aa64b4b 100644 --- a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_gui_auto.hpp +++ b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_gui_auto.hpp @@ -1,414 +1,414 @@ -#ifndef __cocos2dx_gui_h__ -#define __cocos2dx_gui_h__ +#ifndef __cocos2dx_ui_h__ +#define __cocos2dx_ui_h__ #include "jsapi.h" #include "jsfriendapi.h" -extern JSClass *jsb_cocos2d_gui_LayoutParameter_class; -extern JSObject *jsb_cocos2d_gui_LayoutParameter_prototype; - -bool js_cocos2dx_gui_LayoutParameter_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_LayoutParameter_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_LayoutParameter(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_LayoutParameter_getLayoutType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_LayoutParameter_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_LayoutParameter_LayoutParameter(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_LinearLayoutParameter_class; -extern JSObject *jsb_cocos2d_gui_LinearLayoutParameter_prototype; - -bool js_cocos2dx_gui_LinearLayoutParameter_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_LinearLayoutParameter_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_LinearLayoutParameter(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_LinearLayoutParameter_setGravity(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_LinearLayoutParameter_getGravity(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_LinearLayoutParameter_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_LinearLayoutParameter_LinearLayoutParameter(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_RelativeLayoutParameter_class; -extern JSObject *jsb_cocos2d_gui_RelativeLayoutParameter_prototype; - -bool js_cocos2dx_gui_RelativeLayoutParameter_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_RelativeLayoutParameter_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_RelativeLayoutParameter(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_RelativeLayoutParameter_setAlign(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_RelativeLayoutParameter_setRelativeToWidgetName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_RelativeLayoutParameter_getRelativeName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_RelativeLayoutParameter_getRelativeToWidgetName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_RelativeLayoutParameter_setRelativeName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_RelativeLayoutParameter_getAlign(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_RelativeLayoutParameter_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_RelativeLayoutParameter_RelativeLayoutParameter(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_Widget_class; -extern JSObject *jsb_cocos2d_gui_Widget_prototype; - -bool js_cocos2dx_gui_Widget_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_Widget_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_Widget(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_Widget_getVirtualRenderer(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_setSizePercent(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_setActionTag(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getNodeByTag(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_isFlipY(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getTouchEndPos(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_setPositionPercent(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getNodes(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_setPositionType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_isIgnoreContentAdaptWithSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_updateSizeAndPosition(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getBottomInParent(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getActionTag(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getLayoutParameter(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getPositionType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_setName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getChildByName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_isEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_isFlipX(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_removeNodeByTag(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_isTouchEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getContentSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getTouchStartPos(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_didNotSelectSelf(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_setFocused(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_setTouchEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_clone(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getTouchMovePos(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_setEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_setBrightStyle(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_addNode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_setLayoutParameter(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_setFlipY(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_setFlipX(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getLeftInParent(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_ignoreContentAdaptWithSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_isBright(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_clippingParentAreaContainPoint(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getSizePercent(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getTopInParent(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getWidgetType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getRightInParent(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getSizeType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_removeNode(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_removeAllNodes(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getWorldPosition(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_getPositionPercent(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_hitTest(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_isFocused(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_setSizeType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_checkChildInfo(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_setSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_setBright(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Widget_Widget(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_Layout_class; -extern JSObject *jsb_cocos2d_gui_Layout_prototype; - -bool js_cocos2dx_gui_Layout_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_Layout_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_Layout(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_Layout_setBackGroundColorVector(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_hitTest(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_getBackGroundImageTextureSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_getLayoutType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_setClippingType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_setBackGroundColorType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_setBackGroundImage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_setBackGroundColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_requestDoLayout(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_isClippingEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_setBackGroundColorOpacity(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_setBackGroundImageCapInsets(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_removeBackGroundImage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_setBackGroundImageScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_setClippingEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_setLayoutType(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Layout_Layout(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_Button_class; -extern JSObject *jsb_cocos2d_gui_Button_prototype; - -bool js_cocos2dx_gui_Button_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_Button_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_Button(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_Button_getTitleText(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_loadTextureNormal(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_setCapInsetsNormalRenderer(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_setCapInsetsPressedRenderer(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_loadTexturePressed(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_setTitleFontSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_setCapInsetsDisabledRenderer(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_setTitleFontName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_getTitleColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_loadTextureDisabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_getTitleFontName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_setPressedActionEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_loadTextures(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_getTitleFontSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_setTitleText(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_setTitleColor(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Button_Button(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_CheckBox_class; -extern JSObject *jsb_cocos2d_gui_CheckBox_prototype; - -bool js_cocos2dx_gui_CheckBox_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_CheckBox_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_CheckBox(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_CheckBox_getSelectedState(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_CheckBox_loadTextureBackGroundSelected(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_CheckBox_loadTextureBackGroundDisabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_CheckBox_loadTextureFrontCross(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_CheckBox_loadTextures(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_CheckBox_loadTextureBackGround(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_CheckBox_setSelectedState(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_CheckBox_loadTextureFrontCrossDisabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_CheckBox_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_CheckBox_CheckBox(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_ImageView_class; -extern JSObject *jsb_cocos2d_gui_ImageView_prototype; - -bool js_cocos2dx_gui_ImageView_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_ImageView_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_ImageView(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_ImageView_setTextureRect(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ImageView_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ImageView_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ImageView_loadTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ImageView_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ImageView_ImageView(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_Text_class; -extern JSObject *jsb_cocos2d_gui_Text_prototype; - -bool js_cocos2dx_gui_Text_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_Text_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_Text(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_Text_getStringLength(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Text_setFontName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Text_setTouchScaleChangeEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Text_getStringValue(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Text_setText(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Text_setTextVerticalAlignment(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Text_setFontSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Text_isTouchScaleChangeEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Text_setTextHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Text_setTextAreaSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Text_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Text_Text(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_TextAtlas_class; -extern JSObject *jsb_cocos2d_gui_TextAtlas_prototype; - -bool js_cocos2dx_gui_TextAtlas_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_TextAtlas_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_TextAtlas(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_TextAtlas_setProperty(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextAtlas_getStringValue(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextAtlas_setStringValue(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextAtlas_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextAtlas_TextAtlas(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_LoadingBar_class; -extern JSObject *jsb_cocos2d_gui_LoadingBar_prototype; - -bool js_cocos2dx_gui_LoadingBar_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_LoadingBar_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_LoadingBar(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_LoadingBar_setPercent(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_LoadingBar_loadTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_LoadingBar_setDirection(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_LoadingBar_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_LoadingBar_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_LoadingBar_getDirection(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_LoadingBar_getPercent(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_LoadingBar_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_LoadingBar_LoadingBar(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_ScrollView_class; -extern JSObject *jsb_cocos2d_gui_ScrollView_prototype; - -bool js_cocos2dx_gui_ScrollView_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_ScrollView_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_ScrollView(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_ScrollView_scrollToTop(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_scrollToPercentHorizontal(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_isInertiaScrollEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_scrollToPercentBothDirection(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_getDirection(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_scrollToBottomLeft(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_getInnerContainer(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_jumpToBottom(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_setDirection(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_scrollToTopLeft(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_jumpToTopRight(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_jumpToBottomLeft(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_setInnerContainerSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_getInnerContainerSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_isBounceEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_jumpToPercentVertical(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_setInertiaScrollEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_jumpToTopLeft(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_jumpToPercentHorizontal(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_jumpToBottomRight(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_setBounceEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_jumpToTop(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_scrollToLeft(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_jumpToPercentBothDirection(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_scrollToPercentVertical(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_scrollToBottom(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_scrollToBottomRight(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_jumpToLeft(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_scrollToRight(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_jumpToRight(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_scrollToTopRight(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ScrollView_ScrollView(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_ListView_class; -extern JSObject *jsb_cocos2d_gui_ListView_prototype; - -bool js_cocos2dx_gui_ListView_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_ListView_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_ListView(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_ListView_getIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_removeAllItems(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_setGravity(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_pushBackCustomItem(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_getItems(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_removeItem(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_getCurSelectedIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_insertDefaultItem(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_setItemsMargin(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_removeLastItem(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_getItem(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_setItemModel(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_requestRefreshView(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_pushBackDefaultItem(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_insertCustomItem(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_ListView_ListView(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_Slider_class; -extern JSObject *jsb_cocos2d_gui_Slider_prototype; - -bool js_cocos2dx_gui_Slider_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_Slider_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_Slider(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_Slider_setPercent(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Slider_loadSlidBallTextureNormal(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Slider_loadBarTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Slider_loadProgressBarTexture(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Slider_loadSlidBallTextures(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Slider_setCapInsetProgressBarRebderer(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Slider_setCapInsetsBarRenderer(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Slider_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Slider_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Slider_loadSlidBallTexturePressed(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Slider_loadSlidBallTextureDisabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Slider_getPercent(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Slider_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Slider_Slider(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_TextField_class; -extern JSObject *jsb_cocos2d_gui_TextField_prototype; - -bool js_cocos2dx_gui_TextField_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_TextField_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_TextField(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_TextField_setAttachWithIME(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_getStringValue(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_setPasswordStyleText(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_getAttachWithIME(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_setFontName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_getInsertText(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_setInsertText(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_getDetachWithIME(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_didNotSelectSelf(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_attachWithIME(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_setPasswordEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_setMaxLengthEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_getDeleteBackward(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_setFontSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_setPlaceHolder(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_isPasswordEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_getMaxLength(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_isMaxLengthEnabled(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_setDetachWithIME(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_setText(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_setMaxLength(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_setTouchSize(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_setDeleteBackward(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextField_TextField(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_TextBMFont_class; -extern JSObject *jsb_cocos2d_gui_TextBMFont_prototype; - -bool js_cocos2dx_gui_TextBMFont_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_TextBMFont_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_TextBMFont(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_TextBMFont_setFntFile(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextBMFont_getStringValue(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextBMFont_setText(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextBMFont_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_TextBMFont_TextBMFont(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_PageView_class; -extern JSObject *jsb_cocos2d_gui_PageView_prototype; - -bool js_cocos2dx_gui_PageView_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_PageView_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_PageView(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_PageView_getCurPageIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_PageView_addWidgetToPage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_PageView_getPage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_PageView_removePage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_PageView_insertPage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_PageView_scrollToPage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_PageView_removePageAtIndex(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_PageView_getPages(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_PageView_removeAllPages(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_PageView_addPage(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_PageView_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_PageView_PageView(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_gui_Helper_class; -extern JSObject *jsb_cocos2d_gui_Helper_prototype; - -bool js_cocos2dx_gui_Helper_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_gui_Helper_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_gui_Helper(JSContext *cx, JSObject *global); -void register_all_cocos2dx_gui(JSContext* cx, JSObject* obj); -bool js_cocos2dx_gui_Helper_seekActionWidgetByActionTag(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Helper_seekWidgetByTag(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Helper_seekWidgetByRelativeName(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_gui_Helper_seekWidgetByName(JSContext *cx, uint32_t argc, jsval *vp); +extern JSClass *jsb_cocos2d_ui_LayoutParameter_class; +extern JSObject *jsb_cocos2d_ui_LayoutParameter_prototype; + +bool js_cocos2dx_ui_LayoutParameter_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_LayoutParameter_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_LayoutParameter(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_LayoutParameter_getLayoutType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_LayoutParameter_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_LayoutParameter_LayoutParameter(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_LinearLayoutParameter_class; +extern JSObject *jsb_cocos2d_ui_LinearLayoutParameter_prototype; + +bool js_cocos2dx_ui_LinearLayoutParameter_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_LinearLayoutParameter_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_LinearLayoutParameter(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_LinearLayoutParameter_setGravity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_LinearLayoutParameter_getGravity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_LinearLayoutParameter_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_LinearLayoutParameter_LinearLayoutParameter(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_RelativeLayoutParameter_class; +extern JSObject *jsb_cocos2d_ui_RelativeLayoutParameter_prototype; + +bool js_cocos2dx_ui_RelativeLayoutParameter_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_RelativeLayoutParameter_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_RelativeLayoutParameter(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_RelativeLayoutParameter_setAlign(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_RelativeLayoutParameter_setRelativeToWidgetName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_RelativeLayoutParameter_getRelativeName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_RelativeLayoutParameter_getRelativeToWidgetName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_RelativeLayoutParameter_setRelativeName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_RelativeLayoutParameter_getAlign(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_RelativeLayoutParameter_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_RelativeLayoutParameter_RelativeLayoutParameter(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_Widget_class; +extern JSObject *jsb_cocos2d_ui_Widget_prototype; + +bool js_cocos2dx_ui_Widget_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_Widget_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_Widget(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_Widget_getVirtualRenderer(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_setSizePercent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_setActionTag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getNodeByTag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_isFlipY(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getTouchEndPos(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_setPositionPercent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getNodes(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_setPositionType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_isIgnoreContentAdaptWithSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_updateSizeAndPosition(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getBottomInParent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getActionTag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getLayoutParameter(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getPositionType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_setName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getChildByName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_isEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_isFlipX(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_removeNodeByTag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_isTouchEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getContentSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getTouchStartPos(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_didNotSelectSelf(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_setFocused(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_setTouchEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_clone(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getTouchMovePos(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_setEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_setBrightStyle(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_addNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_setLayoutParameter(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_setFlipY(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_setFlipX(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getLeftInParent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_ignoreContentAdaptWithSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_isBright(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_clippingParentAreaContainPoint(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getSizePercent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getTopInParent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getWidgetType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getRightInParent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getSizeType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_removeNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_removeAllNodes(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getWorldPosition(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_getPositionPercent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_hitTest(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_isFocused(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_setSizeType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_checkChildInfo(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_setSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_setBright(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Widget_Widget(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_Layout_class; +extern JSObject *jsb_cocos2d_ui_Layout_prototype; + +bool js_cocos2dx_ui_Layout_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_Layout_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_Layout(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_Layout_setBackGroundColorVector(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_hitTest(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_getBackGroundImageTextureSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_getLayoutType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_setClippingType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_setBackGroundColorType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_setBackGroundImage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_setBackGroundColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_requestDoLayout(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_isClippingEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_setBackGroundColorOpacity(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_setBackGroundImageCapInsets(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_removeBackGroundImage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_setBackGroundImageScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_setClippingEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_setLayoutType(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Layout_Layout(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_Button_class; +extern JSObject *jsb_cocos2d_ui_Button_prototype; + +bool js_cocos2dx_ui_Button_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_Button_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_Button(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_Button_getTitleText(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_loadTextureNormal(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_setCapInsetsNormalRenderer(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_setCapInsetsPressedRenderer(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_loadTexturePressed(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_setTitleFontSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_setCapInsetsDisabledRenderer(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_setTitleFontName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_getTitleColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_loadTextureDisabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_getTitleFontName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_setPressedActionEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_loadTextures(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_getTitleFontSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_setTitleText(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_setTitleColor(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Button_Button(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_CheckBox_class; +extern JSObject *jsb_cocos2d_ui_CheckBox_prototype; + +bool js_cocos2dx_ui_CheckBox_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_CheckBox_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_CheckBox(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_CheckBox_getSelectedState(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_CheckBox_loadTextureBackGroundSelected(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_CheckBox_loadTextureBackGroundDisabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_CheckBox_loadTextureFrontCross(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_CheckBox_loadTextures(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_CheckBox_loadTextureBackGround(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_CheckBox_setSelectedState(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_CheckBox_loadTextureFrontCrossDisabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_CheckBox_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_CheckBox_CheckBox(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_ImageView_class; +extern JSObject *jsb_cocos2d_ui_ImageView_prototype; + +bool js_cocos2dx_ui_ImageView_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_ImageView_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_ImageView(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_ImageView_setTextureRect(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ImageView_setCapInsets(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_loadTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ImageView_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ImageView_ImageView(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_Text_class; +extern JSObject *jsb_cocos2d_ui_Text_prototype; + +bool js_cocos2dx_ui_Text_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_Text_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_Text(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_Text_getStringLength(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Text_setFontName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Text_setTouchScaleChangeEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Text_getStringValue(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Text_setText(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Text_setTextVerticalAlignment(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Text_setFontSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Text_isTouchScaleChangeEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Text_setTextHorizontalAlignment(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Text_setTextAreaSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Text_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Text_Text(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_TextAtlas_class; +extern JSObject *jsb_cocos2d_ui_TextAtlas_prototype; + +bool js_cocos2dx_ui_TextAtlas_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_TextAtlas_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_TextAtlas(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_TextAtlas_setProperty(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextAtlas_getStringValue(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextAtlas_setStringValue(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextAtlas_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextAtlas_TextAtlas(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_LoadingBar_class; +extern JSObject *jsb_cocos2d_ui_LoadingBar_prototype; + +bool js_cocos2dx_ui_LoadingBar_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_LoadingBar_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_LoadingBar(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_LoadingBar_setPercent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_LoadingBar_loadTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_LoadingBar_setDirection(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_LoadingBar_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_LoadingBar_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_LoadingBar_getDirection(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_LoadingBar_getPercent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_LoadingBar_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_LoadingBar_LoadingBar(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_ScrollView_class; +extern JSObject *jsb_cocos2d_ui_ScrollView_prototype; + +bool js_cocos2dx_ui_ScrollView_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_ScrollView_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_ScrollView(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_ScrollView_scrollToTop(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_scrollToPercentHorizontal(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_isInertiaScrollEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_scrollToPercentBothDirection(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_getDirection(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_scrollToBottomLeft(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_getInnerContainer(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_jumpToBottom(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_setDirection(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_scrollToTopLeft(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_jumpToTopRight(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_jumpToBottomLeft(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_setInnerContainerSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_getInnerContainerSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_isBounceEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_jumpToPercentVertical(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_setInertiaScrollEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_jumpToTopLeft(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_jumpToPercentHorizontal(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_jumpToBottomRight(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_setBounceEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_jumpToTop(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_scrollToLeft(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_jumpToPercentBothDirection(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_scrollToPercentVertical(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_scrollToBottom(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_scrollToBottomRight(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_jumpToLeft(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_scrollToRight(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_jumpToRight(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_scrollToTopRight(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ScrollView_ScrollView(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_ListView_class; +extern JSObject *jsb_cocos2d_ui_ListView_prototype; + +bool js_cocos2dx_ui_ListView_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_ListView_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_ListView(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_ListView_getIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ListView_removeAllItems(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ListView_setGravity(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_getItems(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ListView_removeItem(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ListView_getCurSelectedIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ListView_insertDefaultItem(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ListView_setItemsMargin(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ListView_removeLastItem(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ListView_getItem(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ListView_setItemModel(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ListView_requestRefreshView(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ListView_pushBackDefaultItem(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ListView_insertCustomItem(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ListView_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_ListView_ListView(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_Slider_class; +extern JSObject *jsb_cocos2d_ui_Slider_prototype; + +bool js_cocos2dx_ui_Slider_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_Slider_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_Slider(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_Slider_setPercent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Slider_loadSlidBallTextureNormal(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Slider_loadBarTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Slider_loadProgressBarTexture(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Slider_loadSlidBallTextures(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Slider_setCapInsetProgressBarRebderer(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Slider_setCapInsetsBarRenderer(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Slider_setScale9Enabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Slider_setCapInsets(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Slider_loadSlidBallTexturePressed(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Slider_loadSlidBallTextureDisabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Slider_getPercent(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Slider_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Slider_Slider(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_TextField_class; +extern JSObject *jsb_cocos2d_ui_TextField_prototype; + +bool js_cocos2dx_ui_TextField_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_TextField_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_TextField(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_TextField_setAttachWithIME(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_getStringValue(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_setPasswordStyleText(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_getAttachWithIME(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_setFontName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_getInsertText(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_setInsertText(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_getDetachWithIME(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_didNotSelectSelf(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_attachWithIME(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_setPasswordEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_setMaxLengthEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_getDeleteBackward(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_setFontSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_setPlaceHolder(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_isPasswordEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_getMaxLength(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_isMaxLengthEnabled(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_setDetachWithIME(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_setText(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_setMaxLength(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_setTouchSize(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_setDeleteBackward(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextField_TextField(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_TextBMFont_class; +extern JSObject *jsb_cocos2d_ui_TextBMFont_prototype; + +bool js_cocos2dx_ui_TextBMFont_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_TextBMFont_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_TextBMFont(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_TextBMFont_setFntFile(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextBMFont_getStringValue(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextBMFont_setText(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextBMFont_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_TextBMFont_TextBMFont(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_PageView_class; +extern JSObject *jsb_cocos2d_ui_PageView_prototype; + +bool js_cocos2dx_ui_PageView_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_PageView_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_PageView(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_PageView_getCurPageIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_addWidgetToPage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_getPage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_removePage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_insertPage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_scrollToPage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_removePageAtIndex(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_getPages(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_removeAllPages(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_addPage(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_PageView_PageView(JSContext *cx, uint32_t argc, jsval *vp); + +extern JSClass *jsb_cocos2d_ui_Helper_class; +extern JSObject *jsb_cocos2d_ui_Helper_prototype; + +bool js_cocos2dx_ui_Helper_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ui_Helper_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ui_Helper(JSContext *cx, JSObject *global); +void register_all_cocos2dx_ui(JSContext* cx, JSObject* obj); +bool js_cocos2dx_ui_Helper_seekActionWidgetByActionTag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Helper_seekWidgetByTag(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Helper_seekWidgetByRelativeName(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ui_Helper_seekWidgetByName(JSContext *cx, uint32_t argc, jsval *vp); #endif diff --git a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_gui_auto_api.js b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_gui_auto_api.js index a2731c08fe..13c4457180 100644 --- a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_gui_auto_api.js +++ b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_gui_auto_api.js @@ -1,5 +1,5 @@ /** - * @module cocos2dx_gui + * @module cocos2dx_ui */ var ccui = ccui || {}; @@ -10,13 +10,13 @@ ccui.LayoutParameter = { /** * @method getLayoutType - * @return A value converted from C/C++ "cocos2d::gui::LayoutParameterType" + * @return A value converted from C/C++ "cocos2d::ui::LayoutParameterType" */ getLayoutType : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::LayoutParameter*" + * @return A value converted from C/C++ "cocos2d::ui::LayoutParameter*" */ create : function () {}, @@ -35,19 +35,19 @@ ccui.LinearLayoutParameter = { /** * @method setGravity - * @param {cocos2d::gui::LinearGravity} + * @param {cocos2d::ui::LinearGravity} */ setGravity : function () {}, /** * @method getGravity - * @return A value converted from C/C++ "cocos2d::gui::LinearGravity" + * @return A value converted from C/C++ "cocos2d::ui::LinearGravity" */ getGravity : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::LinearLayoutParameter*" + * @return A value converted from C/C++ "cocos2d::ui::LinearLayoutParameter*" */ create : function () {}, @@ -66,7 +66,7 @@ ccui.RelativeLayoutParameter = { /** * @method setAlign - * @param {cocos2d::gui::RelativeAlign} + * @param {cocos2d::ui::RelativeAlign} */ setAlign : function () {}, @@ -96,13 +96,13 @@ setRelativeName : function () {}, /** * @method getAlign - * @return A value converted from C/C++ "cocos2d::gui::RelativeAlign" + * @return A value converted from C/C++ "cocos2d::ui::RelativeAlign" */ getAlign : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::RelativeLayoutParameter*" + * @return A value converted from C/C++ "cocos2d::ui::RelativeLayoutParameter*" */ create : function () {}, @@ -170,7 +170,7 @@ getNodes : function () {}, /** * @method setPositionType - * @param {cocos2d::gui::PositionType} + * @param {cocos2d::ui::PositionType} */ setPositionType : function () {}, @@ -205,14 +205,14 @@ getActionTag : function () {}, /** * @method getLayoutParameter - * @return A value converted from C/C++ "cocos2d::gui::LayoutParameter*" - * @param {cocos2d::gui::LayoutParameterType} + * @return A value converted from C/C++ "cocos2d::ui::LayoutParameter*" + * @param {cocos2d::ui::LayoutParameterType} */ getLayoutParameter : function () {}, /** * @method getPositionType - * @return A value converted from C/C++ "cocos2d::gui::PositionType" + * @return A value converted from C/C++ "cocos2d::ui::PositionType" */ getPositionType : function () {}, @@ -224,7 +224,7 @@ setName : function () {}, /** * @method getChildByName - * @return A value converted from C/C++ "cocos2d::gui::Widget*" + * @return A value converted from C/C++ "cocos2d::ui::Widget*" * @param {const char*} */ getChildByName : function () {}, @@ -284,7 +284,7 @@ setTouchEnabled : function () {}, /** * @method clone - * @return A value converted from C/C++ "cocos2d::gui::Widget*" + * @return A value converted from C/C++ "cocos2d::ui::Widget*" */ clone : function () {}, @@ -302,13 +302,13 @@ setEnabled : function () {}, /** * @method setBrightStyle - * @param {cocos2d::gui::BrightStyle} + * @param {cocos2d::ui::BrightStyle} */ setBrightStyle : function () {}, /** * @method setLayoutParameter - * @param {cocos2d::gui::LayoutParameter*} + * @param {cocos2d::ui::LayoutParameter*} */ setLayoutParameter : function () {}, @@ -363,7 +363,7 @@ getTopInParent : function () {}, /** * @method getWidgetType - * @return A value converted from C/C++ "cocos2d::gui::WidgetType" + * @return A value converted from C/C++ "cocos2d::ui::WidgetType" */ getWidgetType : function () {}, @@ -381,7 +381,7 @@ getRightInParent : function () {}, /** * @method getSizeType - * @return A value converted from C/C++ "cocos2d::gui::SizeType" + * @return A value converted from C/C++ "cocos2d::ui::SizeType" */ getSizeType : function () {}, @@ -423,14 +423,14 @@ isFocused : function () {}, /** * @method setSizeType - * @param {cocos2d::gui::SizeType} + * @param {cocos2d::ui::SizeType} */ setSizeType : function () {}, /** * @method checkChildInfo * @param {int} - * @param {cocos2d::gui::Widget*} + * @param {cocos2d::ui::Widget*} * @param {const cocos2d::Point&} */ checkChildInfo : function () {}, @@ -449,7 +449,7 @@ setBright : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::Widget*" + * @return A value converted from C/C++ "cocos2d::ui::Widget*" */ create : function () {}, @@ -487,26 +487,26 @@ getBackGroundImageTextureSize : function () {}, /** * @method getLayoutType - * @return A value converted from C/C++ "cocos2d::gui::LayoutType" + * @return A value converted from C/C++ "cocos2d::ui::LayoutType" */ getLayoutType : function () {}, /** * @method setClippingType - * @param {cocos2d::gui::LayoutClippingType} + * @param {cocos2d::ui::LayoutClippingType} */ setClippingType : function () {}, /** * @method setBackGroundColorType - * @param {cocos2d::gui::LayoutBackGroundColorType} + * @param {cocos2d::ui::LayoutBackGroundColorType} */ setBackGroundColorType : function () {}, /** * @method setBackGroundImage * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ setBackGroundImage : function () {}, @@ -552,13 +552,13 @@ setClippingEnabled : function () {}, /** * @method setLayoutType - * @param {cocos2d::gui::LayoutType} + * @param {cocos2d::ui::LayoutType} */ setLayoutType : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::Layout*" + * @return A value converted from C/C++ "cocos2d::ui::Layout*" */ create : function () {}, @@ -584,7 +584,7 @@ getTitleText : function () {}, /** * @method loadTextureNormal * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadTextureNormal : function () {}, @@ -603,7 +603,7 @@ setCapInsetsPressedRenderer : function () {}, /** * @method loadTexturePressed * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadTexturePressed : function () {}, @@ -634,7 +634,7 @@ getTitleColor : function () {}, /** * @method loadTextureDisabled * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadTextureDisabled : function () {}, @@ -667,7 +667,7 @@ setScale9Enabled : function () {}, * @param {const char*} * @param {const char*} * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadTextures : function () {}, @@ -691,7 +691,7 @@ setTitleColor : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::Button*" + * @return A value converted from C/C++ "cocos2d::ui::Button*" */ create : function () {}, @@ -717,21 +717,21 @@ getSelectedState : function () {}, /** * @method loadTextureBackGroundSelected * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadTextureBackGroundSelected : function () {}, /** * @method loadTextureBackGroundDisabled * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadTextureBackGroundDisabled : function () {}, /** * @method loadTextureFrontCross * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadTextureFrontCross : function () {}, @@ -742,14 +742,14 @@ loadTextureFrontCross : function () {}, * @param {const char*} * @param {const char*} * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadTextures : function () {}, /** * @method loadTextureBackGround * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadTextureBackGround : function () {}, @@ -762,13 +762,13 @@ setSelectedState : function () {}, /** * @method loadTextureFrontCrossDisabled * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadTextureFrontCrossDisabled : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::CheckBox*" + * @return A value converted from C/C++ "cocos2d::ui::CheckBox*" */ create : function () {}, @@ -806,13 +806,13 @@ setScale9Enabled : function () {}, /** * @method loadTexture * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadTexture : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::ImageView*" + * @return A value converted from C/C++ "cocos2d::ui::ImageView*" */ create : function () {}, @@ -891,7 +891,7 @@ setTextAreaSize : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::Text*" + * @return A value converted from C/C++ "cocos2d::ui::Text*" */ create : function () {}, @@ -932,7 +932,7 @@ setStringValue : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::TextAtlas*" + * @return A value converted from C/C++ "cocos2d::ui::TextAtlas*" */ create : function () {}, @@ -958,13 +958,13 @@ setPercent : function () {}, /** * @method loadTexture * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadTexture : function () {}, /** * @method setDirection - * @param {cocos2d::gui::LoadingBarType} + * @param {cocos2d::ui::LoadingBarType} */ setDirection : function () {}, @@ -994,7 +994,7 @@ getPercent : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::LoadingBar*" + * @return A value converted from C/C++ "cocos2d::ui::LoadingBar*" */ create : function () {}, @@ -1042,7 +1042,7 @@ scrollToPercentBothDirection : function () {}, /** * @method getDirection - * @return A value converted from C/C++ "cocos2d::gui::SCROLLVIEW_DIR" + * @return A value converted from C/C++ "cocos2d::ui::SCROLLVIEW_DIR" */ getDirection : function () {}, @@ -1055,7 +1055,7 @@ scrollToBottomLeft : function () {}, /** * @method getInnerContainer - * @return A value converted from C/C++ "cocos2d::gui::Layout*" + * @return A value converted from C/C++ "cocos2d::ui::Layout*" */ getInnerContainer : function () {}, @@ -1066,7 +1066,7 @@ jumpToBottom : function () {}, /** * @method setDirection - * @param {cocos2d::gui::SCROLLVIEW_DIR} + * @param {cocos2d::ui::SCROLLVIEW_DIR} */ setDirection : function () {}, @@ -1205,7 +1205,7 @@ scrollToTopRight : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::ScrollView*" + * @return A value converted from C/C++ "cocos2d::ui::ScrollView*" */ create : function () {}, @@ -1225,7 +1225,7 @@ ccui.ListView = { /** * @method getIndex * @return A value converted from C/C++ "ssize_t" - * @param {cocos2d::gui::Widget*} + * @param {cocos2d::ui::Widget*} */ getIndex : function () {}, @@ -1236,19 +1236,19 @@ removeAllItems : function () {}, /** * @method setGravity - * @param {cocos2d::gui::ListViewGravity} + * @param {cocos2d::ui::ListViewGravity} */ setGravity : function () {}, /** * @method pushBackCustomItem - * @param {cocos2d::gui::Widget*} + * @param {cocos2d::ui::Widget*} */ pushBackCustomItem : function () {}, /** * @method getItems - * @return A value converted from C/C++ "cocos2d::Vector&" + * @return A value converted from C/C++ "cocos2d::Vector&" */ getItems : function () {}, @@ -1283,14 +1283,14 @@ removeLastItem : function () {}, /** * @method getItem - * @return A value converted from C/C++ "cocos2d::gui::Widget*" + * @return A value converted from C/C++ "cocos2d::ui::Widget*" * @param {ssize_t} */ getItem : function () {}, /** * @method setItemModel - * @param {cocos2d::gui::Widget*} + * @param {cocos2d::ui::Widget*} */ setItemModel : function () {}, @@ -1306,14 +1306,14 @@ pushBackDefaultItem : function () {}, /** * @method insertCustomItem - * @param {cocos2d::gui::Widget*} + * @param {cocos2d::ui::Widget*} * @param {ssize_t} */ insertCustomItem : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::ListView*" + * @return A value converted from C/C++ "cocos2d::ui::ListView*" */ create : function () {}, @@ -1339,21 +1339,21 @@ setPercent : function () {}, /** * @method loadSlidBallTextureNormal * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadSlidBallTextureNormal : function () {}, /** * @method loadBarTexture * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadBarTexture : function () {}, /** * @method loadProgressBarTexture * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadProgressBarTexture : function () {}, @@ -1362,7 +1362,7 @@ loadProgressBarTexture : function () {}, * @param {const char*} * @param {const char*} * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadSlidBallTextures : function () {}, @@ -1393,14 +1393,14 @@ setCapInsets : function () {}, /** * @method loadSlidBallTexturePressed * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadSlidBallTexturePressed : function () {}, /** * @method loadSlidBallTextureDisabled * @param {const char*} - * @param {cocos2d::gui::TextureResType} + * @param {cocos2d::ui::TextureResType} */ loadSlidBallTextureDisabled : function () {}, @@ -1412,7 +1412,7 @@ getPercent : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::Slider*" + * @return A value converted from C/C++ "cocos2d::ui::Slider*" */ create : function () {}, @@ -1567,7 +1567,7 @@ setDeleteBackward : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::TextField*" + * @return A value converted from C/C++ "cocos2d::ui::TextField*" */ create : function () {}, @@ -1604,7 +1604,7 @@ setText : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::TextBMFont*" + * @return A value converted from C/C++ "cocos2d::ui::TextBMFont*" */ create : function () {}, @@ -1629,7 +1629,7 @@ getCurPageIndex : function () {}, /** * @method addWidgetToPage - * @param {cocos2d::gui::Widget*} + * @param {cocos2d::ui::Widget*} * @param {ssize_t} * @param {bool} */ @@ -1637,20 +1637,20 @@ addWidgetToPage : function () {}, /** * @method getPage - * @return A value converted from C/C++ "cocos2d::gui::Layout*" + * @return A value converted from C/C++ "cocos2d::ui::Layout*" * @param {ssize_t} */ getPage : function () {}, /** * @method removePage - * @param {cocos2d::gui::Layout*} + * @param {cocos2d::ui::Layout*} */ removePage : function () {}, /** * @method insertPage - * @param {cocos2d::gui::Layout*} + * @param {cocos2d::ui::Layout*} * @param {int} */ insertPage : function () {}, @@ -1669,7 +1669,7 @@ removePageAtIndex : function () {}, /** * @method getPages - * @return A value converted from C/C++ "cocos2d::Vector&" + * @return A value converted from C/C++ "cocos2d::Vector&" */ getPages : function () {}, @@ -1680,13 +1680,13 @@ removeAllPages : function () {}, /** * @method addPage - * @param {cocos2d::gui::Layout*} + * @param {cocos2d::ui::Layout*} */ addPage : function () {}, /** * @method create - * @return A value converted from C/C++ "cocos2d::gui::PageView*" + * @return A value converted from C/C++ "cocos2d::ui::PageView*" */ create : function () {}, @@ -1705,32 +1705,32 @@ ccui.Helper = { /** * @method seekActionWidgetByActionTag - * @return A value converted from C/C++ "cocos2d::gui::Widget*" - * @param {cocos2d::gui::Widget*} + * @return A value converted from C/C++ "cocos2d::ui::Widget*" + * @param {cocos2d::ui::Widget*} * @param {int} */ seekActionWidgetByActionTag : function () {}, /** * @method seekWidgetByTag - * @return A value converted from C/C++ "cocos2d::gui::Widget*" - * @param {cocos2d::gui::Widget*} + * @return A value converted from C/C++ "cocos2d::ui::Widget*" + * @param {cocos2d::ui::Widget*} * @param {int} */ seekWidgetByTag : function () {}, /** * @method seekWidgetByRelativeName - * @return A value converted from C/C++ "cocos2d::gui::Widget*" - * @param {cocos2d::gui::Widget*} + * @return A value converted from C/C++ "cocos2d::ui::Widget*" + * @param {cocos2d::ui::Widget*} * @param {const char*} */ seekWidgetByRelativeName : function () {}, /** * @method seekWidgetByName - * @return A value converted from C/C++ "cocos2d::gui::Widget*" - * @param {cocos2d::gui::Widget*} + * @return A value converted from C/C++ "cocos2d::ui::Widget*" + * @param {cocos2d::ui::Widget*} * @param {const char*} */ seekWidgetByName : function () {}, diff --git a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_studio_auto.cpp b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_studio_auto.cpp index d8a52b235c..0be3a9f966 100644 --- a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_studio_auto.cpp +++ b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_studio_auto.cpp @@ -7203,11 +7203,11 @@ bool js_cocos2dx_studio_GUIReader_widgetFromJsonFile(JSContext *cx, uint32_t arg const char* arg0; std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_studio_GUIReader_widgetFromJsonFile : Error processing arguments"); - cocos2d::gui::Widget* ret = cobj->widgetFromJsonFile(arg0); + cocos2d::ui::Widget* ret = cobj->widgetFromJsonFile(arg0); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::gui::Widget*)ret); + js_proxy_t *proxy = js_get_or_create_proxy(cx, (cocos2d::ui::Widget*)ret); jsret = OBJECT_TO_JSVAL(proxy->obj); } else { jsret = JSVAL_NULL; diff --git a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_studio_auto_api.js b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_studio_auto_api.js index 8b5ff3546d..7ad2ae6ab4 100644 --- a/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_studio_auto_api.js +++ b/frameworks/js-bindings/bindings/auto/jsb_cocos2dx_studio_auto_api.js @@ -1507,7 +1507,7 @@ ccs.GUIReader = { /** * @method widgetFromJsonFile - * @return A value converted from C/C++ "cocos2d::gui::Widget*" + * @return A value converted from C/C++ "cocos2d::ui::Widget*" * @param {const char*} */ widgetFromJsonFile : function () {}, diff --git a/frameworks/js-bindings/bindings/manual/gui/jsb_cocos2dx_gui_manual.cpp b/frameworks/js-bindings/bindings/manual/gui/jsb_cocos2dx_gui_manual.cpp index b25f27bfb0..2cbefd3f28 100644 --- a/frameworks/js-bindings/bindings/manual/gui/jsb_cocos2dx_gui_manual.cpp +++ b/frameworks/js-bindings/bindings/manual/gui/jsb_cocos2dx_gui_manual.cpp @@ -10,7 +10,7 @@ #include "gui/CocosGUI.h" using namespace cocos2d; -using namespace cocos2d::gui; +using namespace cocos2d::ui; class JSStudioEventListenerWrapper: public JSCallbackWrapper { public: @@ -82,7 +82,7 @@ static bool js_cocos2dx_UIWidget_addTouchEventListener(JSContext *cx, uint32_t a { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - gui::Widget* cobj = (gui::Widget *)(proxy ? proxy->ptr : NULL); + ui::Widget* cobj = (ui::Widget *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "Invalid Native Object"); if (argc == 2) { @@ -107,7 +107,7 @@ static bool js_cocos2dx_UICheckBox_addEventListener(JSContext *cx, uint32_t argc { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - gui::CheckBox* cobj = (gui::CheckBox *)(proxy ? proxy->ptr : NULL); + ui::CheckBox* cobj = (ui::CheckBox *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "Invalid Native Object"); if (argc == 2) { @@ -132,7 +132,7 @@ static bool js_cocos2dx_UISlider_addEventListener(JSContext *cx, uint32_t argc, { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - gui::Slider* cobj = (gui::Slider *)(proxy ? proxy->ptr : NULL); + ui::Slider* cobj = (ui::Slider *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "Invalid Native Object"); if (argc == 2) { @@ -157,7 +157,7 @@ static bool js_cocos2dx_UITextField_addEventListener(JSContext *cx, uint32_t arg { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - gui::TextField* cobj = (gui::TextField *)(proxy ? proxy->ptr : NULL); + ui::TextField* cobj = (ui::TextField *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "Invalid Native Object"); if (argc == 2) { @@ -182,7 +182,7 @@ static bool js_cocos2dx_UIPageView_addEventListener(JSContext *cx, uint32_t argc { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - gui::PageView* cobj = (gui::PageView *)(proxy ? proxy->ptr : NULL); + ui::PageView* cobj = (ui::PageView *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "Invalid Native Object"); if (argc == 2) { @@ -207,7 +207,7 @@ static bool js_cocos2dx_UIListView_addEventListener(JSContext *cx, uint32_t argc { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - gui::ListView* cobj = (gui::ListView *)(proxy ? proxy->ptr : NULL); + ui::ListView* cobj = (ui::ListView *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "Invalid Native Object"); if (argc == 2) { @@ -232,7 +232,7 @@ static bool js_cocos2dx_LayoutParameter_setMargin(JSContext *cx, uint32_t argc, { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - gui::LayoutParameter* cobj = (gui::LayoutParameter *)(proxy ? proxy->ptr : NULL); + ui::LayoutParameter* cobj = (ui::LayoutParameter *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "Invalid Native Object"); if (argc == 1) { @@ -255,7 +255,7 @@ static bool js_cocos2dx_LayoutParameter_setMargin(JSContext *cx, uint32_t argc, JSB_PRECONDITION3(ok, cx, false, "Error processing arguments"); - cobj->setMargin(gui::Margin(left,top,right,bottom)); + cobj->setMargin(ui::Margin(left,top,right,bottom)); return true; } JS_ReportError(cx, "Invalid number of arguments"); @@ -266,13 +266,13 @@ static bool js_cocos2dx_LayoutParameter_getMargin(JSContext *cx, uint32_t argc, { JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); - gui::LayoutParameter* cobj = (gui::LayoutParameter *)(proxy ? proxy->ptr : NULL); + ui::LayoutParameter* cobj = (ui::LayoutParameter *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "Invalid Native Object"); if (argc == 0) { JSObject *tmp = JS_NewObject(cx, NULL, NULL, NULL); if (!tmp) return false; - gui::Margin margin = cobj->getMargin(); + ui::Margin margin = cobj->getMargin(); bool ok = JS_DefineProperty(cx, tmp, "left", DOUBLE_TO_JSVAL(margin.left), NULL, NULL, JSPROP_ENUMERATE | JSPROP_PERMANENT) && JS_DefineProperty(cx, tmp, "top", DOUBLE_TO_JSVAL(margin.top), NULL, NULL, JSPROP_ENUMERATE | JSPROP_PERMANENT) && JS_DefineProperty(cx, tmp, "right", DOUBLE_TO_JSVAL(margin.right), NULL, NULL, JSPROP_ENUMERATE | JSPROP_PERMANENT) && @@ -291,29 +291,29 @@ static bool js_cocos2dx_LayoutParameter_getMargin(JSContext *cx, uint32_t argc, return false; } -extern JSObject* jsb_cocos2d_gui_Widget_prototype; -extern JSObject* jsb_cocos2d_gui_CheckBox_prototype; -extern JSObject* jsb_cocos2d_gui_Slider_prototype; -extern JSObject* jsb_cocos2d_gui_TextField_prototype; -extern JSObject* jsb_cocos2d_gui_LayoutParameter_prototype; -extern JSObject* jsb_cocos2d_gui_PageView_prototype; -extern JSObject* jsb_cocos2d_gui_ListView_prototype; +extern JSObject* jsb_cocos2d_ui_Widget_prototype; +extern JSObject* jsb_cocos2d_ui_CheckBox_prototype; +extern JSObject* jsb_cocos2d_ui_Slider_prototype; +extern JSObject* jsb_cocos2d_ui_TextField_prototype; +extern JSObject* jsb_cocos2d_ui_LayoutParameter_prototype; +extern JSObject* jsb_cocos2d_ui_PageView_prototype; +extern JSObject* jsb_cocos2d_ui_ListView_prototype; -void register_all_cocos2dx_gui_manual(JSContext* cx, JSObject* global) +void register_all_cocos2dx_ui_manual(JSContext* cx, JSObject* global) { - JS_DefineFunction(cx, jsb_cocos2d_gui_Widget_prototype, "addTouchEventListener", js_cocos2dx_UIWidget_addTouchEventListener, 2, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_cocos2d_ui_Widget_prototype, "addTouchEventListener", js_cocos2dx_UIWidget_addTouchEventListener, 2, JSPROP_ENUMERATE | JSPROP_PERMANENT); - JS_DefineFunction(cx, jsb_cocos2d_gui_CheckBox_prototype, "addEventListenerCheckBox", js_cocos2dx_UICheckBox_addEventListener, 2, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_cocos2d_ui_CheckBox_prototype, "addEventListenerCheckBox", js_cocos2dx_UICheckBox_addEventListener, 2, JSPROP_ENUMERATE | JSPROP_PERMANENT); - JS_DefineFunction(cx, jsb_cocos2d_gui_Slider_prototype, "addEventListenerSlider", js_cocos2dx_UISlider_addEventListener, 2, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_cocos2d_ui_Slider_prototype, "addEventListenerSlider", js_cocos2dx_UISlider_addEventListener, 2, JSPROP_ENUMERATE | JSPROP_PERMANENT); - JS_DefineFunction(cx, jsb_cocos2d_gui_TextField_prototype, "addEventListenerTextField", js_cocos2dx_UITextField_addEventListener, 2, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_cocos2d_ui_TextField_prototype, "addEventListenerTextField", js_cocos2dx_UITextField_addEventListener, 2, JSPROP_ENUMERATE | JSPROP_PERMANENT); - JS_DefineFunction(cx, jsb_cocos2d_gui_PageView_prototype, "addEventListenerPageView", js_cocos2dx_UIPageView_addEventListener, 2, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_cocos2d_ui_PageView_prototype, "addEventListenerPageView", js_cocos2dx_UIPageView_addEventListener, 2, JSPROP_ENUMERATE | JSPROP_PERMANENT); - JS_DefineFunction(cx, jsb_cocos2d_gui_ListView_prototype, "addEventListenerListView", js_cocos2dx_UIListView_addEventListener, 2, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_cocos2d_ui_ListView_prototype, "addEventListenerListView", js_cocos2dx_UIListView_addEventListener, 2, JSPROP_ENUMERATE | JSPROP_PERMANENT); - JS_DefineFunction(cx, jsb_cocos2d_gui_LayoutParameter_prototype, "setMargin", js_cocos2dx_LayoutParameter_setMargin, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_cocos2d_ui_LayoutParameter_prototype, "setMargin", js_cocos2dx_LayoutParameter_setMargin, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT); - JS_DefineFunction(cx, jsb_cocos2d_gui_LayoutParameter_prototype, "getMargin", js_cocos2dx_LayoutParameter_getMargin, 0, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_cocos2d_ui_LayoutParameter_prototype, "getMargin", js_cocos2dx_LayoutParameter_getMargin, 0, JSPROP_ENUMERATE | JSPROP_PERMANENT); } \ No newline at end of file diff --git a/frameworks/js-bindings/bindings/manual/gui/jsb_cocos2dx_gui_manual.h b/frameworks/js-bindings/bindings/manual/gui/jsb_cocos2dx_gui_manual.h index 6a60065a16..5249016b36 100644 --- a/frameworks/js-bindings/bindings/manual/gui/jsb_cocos2dx_gui_manual.h +++ b/frameworks/js-bindings/bindings/manual/gui/jsb_cocos2dx_gui_manual.h @@ -11,6 +11,6 @@ #include "jsapi.h" #include "jsfriendapi.h" -void register_all_cocos2dx_gui_manual(JSContext* cx, JSObject* global); +void register_all_cocos2dx_ui_manual(JSContext* cx, JSObject* global); #endif /* defined(__jsb_cocos2dx_gui_manual__) */ diff --git a/samples/js-tests/project/Classes/AppDelegate.cpp b/samples/js-tests/project/Classes/AppDelegate.cpp index 90e5b98b88..088ddc0edc 100644 --- a/samples/js-tests/project/Classes/AppDelegate.cpp +++ b/samples/js-tests/project/Classes/AppDelegate.cpp @@ -94,8 +94,8 @@ bool AppDelegate::applicationDidFinishLaunching() sc->addRegisterCallback(register_all_cocos2dx_builder); sc->addRegisterCallback(register_CCBuilderReader); - sc->addRegisterCallback(register_all_cocos2dx_gui); - sc->addRegisterCallback(register_all_cocos2dx_gui_manual); + sc->addRegisterCallback(register_all_cocos2dx_ui); + sc->addRegisterCallback(register_all_cocos2dx_ui_manual); sc->addRegisterCallback(register_all_cocos2dx_studio); sc->addRegisterCallback(register_all_cocos2dx_studio_manual);