2015-04-14 11:01:07 +08:00
[cocos2d-x]
# the prefix to be added to the generated functions. You might or might not use this in your own
# templates
prefix = cocos2dx
# 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 = cc
2016-08-19 16:28:47 +08:00
android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.9/include
2015-04-14 11:01:07 +08:00
android_flags = -D_SIZE_T_DEFINED_
2016-08-19 16:28:47 +08:00
clang_headers = -I%(clangllvmdir)s/%(clang_include)s
2015-04-14 11:01:07 +08:00
clang_flags = -nostdinc -x c++ -std=c++11 -U __SSE__
2015-05-07 13:00:57 +08:00
cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external
2015-04-14 11:01:07 +08:00
cocos_flags = -DANDROID
cxxgenerator_headers =
# extra arguments for clang
extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s
# what headers to parse
2015-09-25 22:46:10 +08:00
headers = %(cocosdir)s/cocos/cocos2d.h %(cocosdir)s/cocos/audio/include/SimpleAudioEngine.h %(cocosdir)s/cocos/2d/CCProtectedNode.h %(cocosdir)s/cocos/base/CCAsyncTaskPool.h %(cocosdir)s/cocos/scripting/js-bindings/manual/component/CCComponentJS.h
2016-03-21 21:04:06 +08:00
replace_headers = CCComponentJS.h::scripting/js-bindings/manual/component/CCComponentJS.h
2015-04-14 11:01:07 +08:00
# what classes to produce code for. You can use regular expressions here. When testing the regular
# expression, it will be enclosed in "^$", like this: "^Menu*$".
2015-09-25 22:46:10 +08:00
classes = New.* Sprite SpriteBatchNode SpriteFrame SpriteFrameCache Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn ReverseTime Animate AnimationFrame Animation AnimationCache Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* RemoveSelf Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* TMX.* CallFunc CallFuncN RenderTexture GridAction Grid3DAction Grid3D TiledGrid3D GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Lens3D Ripple3D PageTurn3D ShakyTiles3D ShatteredTiles3D WavesTiles3D JumpTiles3D Speed ActionManager Set SimpleAudioEngine Scheduler Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram GLProgramCache Application ClippingNode MotionStreak TextFieldTTF GLViewProtocol GLView Component ComponentContainer __NodeRGBA __LayerRGBA SAXParser Event(?!.*(Physics).*).* Device Configuration ProtectedNode GLProgramState Image .*Light$ AsyncTaskPool Properties Material Technique RenderState Pass ComponentJS
2015-04-14 11:01:07 +08:00
2016-08-19 16:28:47 +08:00
classes_need_extend = Node Layer.* Sprite SpriteBatchNode SpriteFrame Menu MenuItem.* Scene DrawNode Component .*Action.* GridBase Grid3D TiledGrid3D MotionStreak ParticleBatchNode ParticleSystem TextFieldTTF RenderTexture TileMapAtlas TMXLayer TMXTiledMap TMXMapInfo TransitionScene ProgressTimer ParallaxNode Label.* GLProgram Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn ReverseTime Animate AnimationFrame Animation AnimationCache Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* Orbit.* Follow.* Bezier.* Hide CallFunc CallFuncN
2015-04-14 11:01:07 +08:00
# 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
# regular expressions, they will not be surrounded by "^$". If you want to skip a whole class, just
# add a single "*" as functions. See bellow for several examples. A special class name is "*", which
# will apply to all class names. This is a convenience wildcard to be able to skip similar named
# functions from all classes.
2015-05-05 10:50:19 +08:00
skip = Node::[^setPosition$ setGLServerState description getUserObject .*UserData getGLServerState .*schedule setContentSize setAnchorPoint setColor pause resume setAdditionalTransform convertToWorldSpace],
2015-06-12 13:00:49 +08:00
Sprite::[getQuad ^setPosition$ create setPolygonInfo initWithPolygon getPolygonInfo],
2015-09-30 21:20:53 +08:00
SpriteFrame::[setPolygonInfo getPolygonInfo hasPolygonInfo],
2015-04-14 11:01:07 +08:00
NodeGrid::[setGrid],
SpriteBatchNode::[getDescendants],
MotionStreak::[draw update],
2015-10-27 16:46:25 +08:00
DrawNode::[drawPoly$ listenBackToForeground],
2015-08-14 02:18:51 +08:00
Director::[getAccelerometer getProjection getFrustum getRenderer getConsole getCocos2dThreadId],
2015-04-14 11:01:07 +08:00
Layer.*::[didAccelerate keyPressed keyReleased],
Menu.*::[.*Target getSubItems create initWithItems alignItemsInRows alignItemsInColumns],
MenuItemToggle::[initWithCallback],
Copying::[*],
LabelProtocol::[*],
LabelTextFormatProtocol::[*],
Label::[getLettersInfo createWithTTF setTTFConfig getFontAtlas listenToBackground listenToFontAtlasPurge],
.*Delegate::[*],
PoolManager::[*],
Texture2D::[initWithPVRTCData addPVRTCImage releaseData setTexParameters initWithData keepData getPixelFormatInfoMap updateWithData],
Set::[begin end acceptVisitor],
IMEDispatcher::[*],
Thread::[*],
Profiler::[*],
ProfilingTimer::[*],
CallFunc::[create initWithFunction (g|s)etTargetCallback],
CallFuncN::[create initWithFunction],
SAXParser::[(?!(init))],
SAXDelegator::[*],
Color3bObject::[*],
TouchDispatcher::[*],
EGLTouchDelegate::[*],
ScriptEngineManager::[*],
KeypadHandler::[*],
Invocation::[*],
GLView::[end swapBuffers getAllTouches],
GLViewProtocol::[pollInputEvents handleTouches.* setScissorInPoints getScissorRect isScissorEnabled swapBuffers],
SchedulerScriptHandlerEntry::[*],
Size::[*],
Point::[*],
PointArray::[*],
Rect::[*],
String::[*],
Data::[*],
Dictionary::[*],
Array::[*],
Range::[*],
NotificationObserver::[*],
Image::[initWithString initWithImageData],
2015-12-11 10:02:55 +08:00
Sequence::[create],
Spawn::[create],
2015-04-14 11:01:07 +08:00
RotateTo::[calculateAngles],
GLProgram::[getProgram setUniformLocationWith(1|2|3|4)fv setUniformLocationWith(2|3|4)iv setUniformLocationWithMatrix(2|3|4)fv],
GLProgramState::[setUniformVec4 setVertexAttribPointer],
Grid3DAction::[create actionWith.* vertex originalVertex (g|s)etVertex getOriginalVertex],
Grid3D::[vertex originalVertex (g|s)etVertex getOriginalVertex],
TiledGrid3DAction::[create actionWith.* tile originalTile getOriginalTile (g|s)etTile],
TiledGrid3D::[tile originalTile getOriginalTile (g|s)etTile],
TMXLayer::[getTiles],
TMXMapInfo::[startElement endElement textHandler],
ParticleSystemQuad::[postStep setBatchNode draw setTexture$ setTotalParticles updateQuadWithParticle setupIndices listenBackToForeground initWithTotalParticles particleWithFile node],
LayerMultiplex::[create layerWith.* initWithLayers],
CatmullRom.*::[create actionWithDuration initWithDuration],
Bezier.*::[create actionWithDuration initWithDuration],
CardinalSpline.*::[create actionWithDuration setPoints initWithDuration],
2015-04-17 17:27:47 +08:00
Scheduler::[pause resume ^unschedule$ unscheduleUpdate unscheduleAllForTarget schedule isTargetPaused isScheduled],
2015-04-14 11:01:07 +08:00
TextureCache::[addPVRTCImage],
2015-07-16 14:09:26 +08:00
*::[copyWith.* ^cleanup$ onEnter.* onExit.* ^description$ getObjectType onTouch.* onAcc.* onKey.* onRegisterTouchListener operator.+],
2016-04-26 13:37:22 +08:00
FileUtils::[getFileData getDataFromFile writeDataToFile setFilenameLookupDictionary destroyInstance getFullPathCache getContents],
2015-04-14 11:01:07 +08:00
Application::[^application.* ^run$ getCurrentLanguageCode setAnimationInterval],
Camera::[getEyeXYZ getCenterXYZ getUpXYZ],
ccFontDefinition::[*],
NewTextureAtlas::[*],
RenderTexture::[listenToBackground listenToForeground saveToFile],
TextFieldTTF::[(g|s)etDelegate],
EventListenerVector::[*],
2016-12-13 14:13:48 +08:00
EventListener(Touch|Keyboard|Mouse|Acceleration|Focus|Custom).*::[create],
2015-04-14 11:01:07 +08:00
EventTouch::[(s|g)etTouches],
EventKeyboard::[*],
Device::[getTextureDataForText],
2016-12-13 14:01:13 +08:00
EventDispatcher::[dispatchCustomEvent addCustomEventListener],
2015-04-14 11:01:07 +08:00
EventCustom::[getUserData setUserData],
2015-06-04 20:05:30 +08:00
Component::[serialize onAdd onRemove update],
2015-04-14 11:01:07 +08:00
EventListenerCustom::[init],
EventListener::[init],
2015-05-29 16:45:33 +08:00
Scene::[getCameras getLights initWithPhysics createWithPhysics getPhysicsWorld getPhysics3DWorld setPhysics3DDebugCamera setNavMesh getNavMesh setNavMeshDebugCamera],
2015-04-14 11:01:07 +08:00
Animate3D::[*],
Sprite3D::[*],
AttachNode::[*],
Animation3D::[*],
Skeleton3D::[*],
Mesh::[*],
Animation3DCache::[*],
Sprite3DMaterialCache::[*],
2015-12-01 23:05:47 +08:00
Sprite3DMaterial::[*],
2015-04-14 11:01:07 +08:00
Sprite3DCache::[*],
Bone3D::[*],
Device::[getTextureDataForText],
BillBoard::[*],
Camera::[unproject isVisibleInFrustum],
2015-05-11 15:44:36 +08:00
ClippingNode::[init],
2015-09-22 00:41:03 +08:00
RenderState::[setStateBlock],
2015-12-15 11:48:44 +08:00
ComponentJS::[create getScriptObject update]
2015-04-14 11:01:07 +08:00
rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames getSpriteFrameByName=getSpriteFrame],
MenuItemFont::[setFontNameObj = setFontName setFontSizeObj=setFontSize getFontSizeObj=getFontSize getFontNameObj=getFontName],
ProgressTimer::[setReverseProgress = setReverseDirection],
Animation::[create = createWithAnimationFrames],
AnimationCache::[addAnimationsWithFile = addAnimations],
GLProgram::[initWithByteArrays = initWithString initWithFilenames=init setUniformLocationWith1i=setUniformLocationI32 bindAttribLocation=addAttribute],
Node::[getGLProgram = getShaderProgram setGLProgram=setShaderProgram getPositionZ=getVertexZ setPositionZ=setVertexZ removeFromParentAndCleanup=removeFromParent removeAllChildrenWithCleanup=removeAllChildren setRotationSkewX=setRotationX setRotationSkewY=setRotationY getRotationSkewX=getRotationX getRotationSkewY=getRotationY getNodeToParentTransform=getNodeToParentTransform3D getParentToNodeTransform=getParentToNodeTransform3D getNodeToWorldTransform=getNodeToWorldTransform3D getWorldToNodeTransform=getWorldToNodeTransform3D getNodeToWorldAffineTransform=getNodeToWorldTransform getNodeToParentAffineTransform=getNodeToParentTransform getParentToNodeAffineTransform=getParentToNodeTransform getWorldToNodeAffineTransform=getWorldToNodeTransform],
LabelAtlas::[create = _create],
Sprite::[getPositionZ = getVertexZ setPositionZ=setVertexZ],
SpriteBatchNode::[removeAllChildrenWithCleanup = removeAllChildren],
DrawNode::[drawQuadraticBezier = drawQuadBezier],
FileUtils::[loadFilenameLookupDictionaryFromFile = loadFilenameLookup],
SimpleAudioEngine::[preloadBackgroundMusic = preloadMusic setBackgroundMusicVolume=setMusicVolume getBackgroundMusicVolume=getMusicVolume playBackgroundMusic=playMusic stopBackgroundMusic=stopMusic pauseBackgroundMusic=pauseMusic resumeBackgroundMusic=resumeMusic rewindBackgroundMusic=rewindMusic isBackgroundMusicPlaying=isMusicPlaying willPlayBackgroundMusic=willPlayMusic],
2016-12-13 14:01:13 +08:00
EventDispatcher::[removeEventListener = removeListener removeEventListenersForType=removeListeners removeEventListenersForTarget=removeListeners removeCustomEventListeners=removeCustomListeners removeAllEventListeners=removeAllListeners pauseEventListenersForTarget=pauseTarget resumeEventListenersForTarget=resumeTarget],
2015-04-14 11:01:07 +08:00
EventMouse::[getMouseButton = getButton setMouseButton=setButton setCursorPosition=setLocation getCursorX=getLocationX getCursorY=getLocationY],
Configuration::[getInfo = dumpInfo],
ComponentContainer::[get = getComponent],
LayerColor::[initWithColor = init],
GLProgramCache::[getGLProgram = getProgram addGLProgram=addProgram reloadDefaultGLPrograms=reloadDefaultShaders loadDefaultGLPrograms=loadDefaultShaders],
TextFieldTTF::[textFieldWithPlaceHolder = create],
2016-12-13 14:22:58 +08:00
Texture2D::[getGLProgram = getShaderProgram setGLProgram=setShaderProgram releaseGLTexture=releaseTexture],
2015-04-14 11:01:07 +08:00
Speed::[setSpeed = _setSpeed getSpeed=_getSpeed]
rename_classes = ParticleSystemQuad::ParticleSystem,
SimpleAudioEngine::AudioEngine,
SAXParser::PlistParser,
GLProgramCache::ShaderCache,
CallFunc::_CallFunc,
2015-09-22 00:41:03 +08:00
CallFuncN::CallFunc
2015-04-14 11:01:07 +08:00
# for all class names, should we remove something when registering in the target VM?
remove_prefix =
# classes for which there will be no "parent" lookup
classes_have_no_parents = Node Director SimpleAudioEngine FileUtils TMXMapInfo Application GLViewProtocol SAXParser Configuration
# base classes which will be skipped when their sub-classes found them.
base_classes_to_skip = Ref Clonable
# classes that create no constructor
# Set is special and we will use a hand-written constructor
2016-08-19 16:28:47 +08:00
abstract_classes = Action FiniteTimeAction ActionInterval ActionEase EaseRateAction EaseElastic EaseBounce ActionInstant GridAction Grid3DAction TiledGrid3DAction Director SpriteFrameCache TransitionEaseScene Set SimpleAudioEngine FileUtils Application GLViewProtocol GLView ComponentContainer SAXParser Configuration EventListener BaseLight AsyncTaskPool ComponentJS
2015-04-14 11:01:07 +08:00
# 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'.
2015-12-17 21:54:01 +08:00
script_control_cpp = yes