Exposing CCApplication to js.

This commit is contained in:
James Chen 2013-04-09 14:42:12 +08:00
parent 6d57d691f5
commit a2c71f8e89
2 changed files with 20 additions and 6 deletions

View File

@ -4,6 +4,19 @@
var cc = cc || {};
cc.LANGUAGE_ENGLISH = 0;
cc.LANGUAGE_CHINESE = 1;
cc.LANGUAGE_FRENCH = 2;
cc.LANGUAGE_ITALIAN = 3;
cc.LANGUAGE_GERMAN = 4;
cc.LANGUAGE_SPANISH = 5;
cc.LANGUAGE_RUSSIAN = 6;
cc.LANGUAGE_KOREAN = 7;
cc.LANGUAGE_JAPANESE = 8;
cc.LANGUAGE_HUNGARIAN = 9;
cc.LANGUAGE_PORTUGUESE = 10;
cc.LANGUAGE_ARABIC = 11;
cc.DIRECTOR_PROJECTION_2D = 0;
cc.DIRECTOR_PROJECTION_3D = 1;

View File

@ -26,7 +26,7 @@ headers = %(cocosdir)s/cocos2dx/include/cocos2d.h %(cocosdir)s/CocosDenshion/inc
# what classes to produce code for. You can use regular expressions here. When testing the regular
# expression, it will be enclosed in "^$", like this: "^CCMenu*$".
classes = CCSprite.* CCScene CCNode.* CCDirector CCLayer.* CCMenu.* CCTouch CC.*Action.* CCMove.* CCRotate.* CCBlink.* CCTint.* CCSequence CCRepeat.* CCFade.* CCEase.* CCScale.* CCTransition.* CCSpawn CCAnimat.* CCFlip.* CCDelay.* CCSkew.* CCJump.* CCPlace.* CCShow.* CCProgress.* CCPointArray CCToggleVisibility.* CCHide CCParticle.* CCLabel.* CCAtlas.* CCTextureCache.* CCTexture2D CCCardinal.* CCCatmullRom.* CCParallaxNode CCTileMap.* CCTMX.* CCCallFunc CCRenderTexture CCGridAction CCGrid3DAction CCGridBase$ CCShaky3D CCWaves3D CCFlipX3D CCFlipY3D CCSpeed CCActionManager CCSet SimpleAudioEngine CCScheduler CCTimer CCOrbit.* CCFollow.* CCBezier.* CCCardinalSpline.* CCCamera.* CCDrawNode CC.*3D$ CCLiquid$ CCWaves$ CCShuffleTiles$ CCTurnOffTiles$ CCSplit.* CCTwirl$ CCFileUtils$ CCGLProgram CCShaderCache
classes = CCSprite.* CCScene CCNode.* CCDirector CCLayer.* CCMenu.* CCTouch CC.*Action.* CCMove.* CCRotate.* CCBlink.* CCTint.* CCSequence CCRepeat.* CCFade.* CCEase.* CCScale.* CCTransition.* CCSpawn CCAnimat.* CCFlip.* CCDelay.* CCSkew.* CCJump.* CCPlace.* CCShow.* CCProgress.* CCPointArray CCToggleVisibility.* CCHide CCParticle.* CCLabel.* CCAtlas.* CCTextureCache.* CCTexture2D CCCardinal.* CCCatmullRom.* CCParallaxNode CCTileMap.* CCTMX.* CCCallFunc CCRenderTexture CCGridAction CCGrid3DAction CCGridBase$ CCShaky3D CCWaves3D CCFlipX3D CCFlipY3D CCSpeed CCActionManager CCSet SimpleAudioEngine CCScheduler CCTimer CCOrbit.* CCFollow.* CCBezier.* CCCardinalSpline.* CCCamera.* CCDrawNode CC.*3D$ CCLiquid$ CCWaves$ CCShuffleTiles$ CCTurnOffTiles$ CCSplit.* CCTwirl$ CCFileUtils$ CCGLProgram CCShaderCache CCApplication
# what should we skip? in the format ClassName::[function function]
# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also
@ -48,7 +48,6 @@ skip = CCNode::[.*Transform convertToWindowSpace ^setPosition$ getGrid setGLServ
CCLayer.*::[didAccelerate (g|s)etBlendFunc],
CCMenu.*::[.*Target getSubItems create initWithItems alignItemsInRows alignItemsInColumns],
CCMenuItem.*::[create],
CCRGBAProtocol::[*],
CCCopying::[*],
CC.*Protocol::[*],
CC.*Delegate::[*],
@ -97,7 +96,8 @@ skip = CCNode::[.*Transform convertToWindowSpace ^setPosition$ getGrid setGLServ
CCTimer::[getSelector],
*::[copyWith.* onEnter.* onExit.* ^description$ getObjectType],
CCFileUtils::[(g|s)etSearchResolutionsOrder$ (g|s)etSearchPaths$ getClassTypeInfo],
SimpleAudioEngine::[getClassTypeInfo]
SimpleAudioEngine::[getClassTypeInfo],
CCApplication::[^application.* ^run$]
rename_functions = CCDirector::[sharedDirector=getInstance],
CCSpriteFrameCache::[sharedSpriteFrameCache=getInstance addSpriteFramesWithFile=addSpriteFrames spriteFrameByName=getSpriteFrame isFlipX=isFlippedX isFlipY=isFlippedY],
@ -121,7 +121,8 @@ rename_functions = CCDirector::[sharedDirector=getInstance],
CCTMXTiledMap::[layerNamed=getLayer objectGroupNamed=getObjectGroup propertyNamed=getProperty],
CCTexture2D::[defaultAlphaPixelFormat=getDefaultAlphaPixelFormat],
CCShaderCache::[programForKey=getProgram sharedShaderCache=getInstance],
CCFileUtils::[sharedFileUtils=getInstance loadFilenameLookupDictionaryFromFile=loadFilenameLookup]
CCFileUtils::[sharedFileUtils=getInstance loadFilenameLookupDictionaryFromFile=loadFilenameLookup],
CCApplication::[sharedApplication=getInstance]
rename_classes = CCParticleSystemQuad::CCParticleSystem,
SimpleAudioEngine::AudioEngine
@ -130,14 +131,14 @@ rename_classes = CCParticleSystemQuad::CCParticleSystem,
remove_prefix = CC
# classes for which there will be no "parent" lookup
classes_have_no_parents = CCNode CCDirector SimpleAudioEngine CCFileUtils CCTMXMapInfo
classes_have_no_parents = CCNode CCDirector SimpleAudioEngine CCFileUtils CCTMXMapInfo CCApplication
# base classes which will be skipped when their sub-classes found them.
base_classes_to_skip = CCObject
# classes that create no constructor
# CCSet is special and we will use a hand-written constructor
abstract_classes = CCDirector CCSpriteFrameCache CCTransitionEaseScene CCSet SimpleAudioEngine CCFileUtils
abstract_classes = CCDirector CCSpriteFrameCache CCTransitionEaseScene CCSet SimpleAudioEngine CCFileUtils CCApplication
# Determining whether to use script object(js object) to control the lifecycle of native(cpp) object or the other way around. Supported values are 'yes' or 'no'.
script_control_cpp = no