axmol/tools/tojs/cocos2dx.ini

191 lines
13 KiB
INI
Raw Normal View History

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
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_
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
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*$".
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
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],
Sprite::[getQuad ^setPosition$ create setPolygonInfo initWithPolygon getPolygonInfo],
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],
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],
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],
*::[copyWith.* ^cleanup$ onEnter.* onExit.* ^description$ getObjectType onTouch.* onAcc.* onKey.* onRegisterTouchListener operator.+],
Add FileUtils::getContents(). (#15479) * Add FileUtils::getContents(). * skip FileUtils::getContents() in binding generator config. * use FileUtils::getContents in CCDataReaderHelper. * obey the cocos2d-x coding style. * Explicit constructor. * More docs. * More tests. * Move FileError to FileUtils::Error. * Fixes wrong buffer size for reading into string and vector. * Update tests. * Add note on padding for output buffers. * FileUtils: implements old methods by using `getContents()`. methods are: * FileUtils::getDataFromFile() * FileUtils::getStringFromFile() * FileUtils::getFileData() and follow Android methods are now just calls FileUtils' ones. * FileUtilsAndroid::getDataFromFile() * FileUtilsAndroid::getStringFromFile() * FileUtilsAndroid::getFileData() * Fixes build error. * FileUtils::getFileData: Return the size of data. * Remove old methods form FileUtilsAndroid they are now done in FileUtils. * Fixes for win32 code. * Fixes build error in test and add more test. * Better error message. * Make template type name more readable. * Update comments. * Move internal functions to anonymous namespace. * Refactor FileUtils test. * Fix warning about compare signed and unsigned. * Win32 and WinRT does not use text mode. That is we don't need simulate convert CRLF to LF. * Fixes for Win32 and WinRT. * Update for Win32 and WinRT. * Win32: return FileUtils:Error::TooLarge when file is large than 2^32-1. * Win32: remove checkFileName() which has no effect at all. * WinRT: add FileUtilsWinRT::getContents() using ::CreateFile2. * WinRT: add override keyword for FileUtilsWinRT::getFileSize(). * Update for coding styles. * More error strings. * check read and malloc return codes. * rename FileUtils::Error to FileUtils::Status. * Fixes for WinRT, use GetFileInformationByHandleEx to get file size. * Fixes build error for winrt and cleanup FileUtils::Status. * Try to fix the build error on Linux. Status must defined in some header, so move FileUtils.h up. * Remove support of text mode on WinRT (it is the last platform support text mode).
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::[*],
EventListener(Touch|Keyboard|Mouse|Acceleration|Focus|Custom).*::[create],
2015-04-14 11:01:07 +08:00
EventTouch::[(s|g)etTouches],
EventKeyboard::[*],
Device::[getTextureDataForText],
EventDispatcher::[dispatchCustomEvent addCustomEventListener],
2015-04-14 11:01:07 +08:00
EventCustom::[getUserData setUserData],
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],
RenderState::[setStateBlock],
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],
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],
Texture2D::[getGLProgram=getShaderProgram setGLProgram=setShaderProgram],
Speed::[setSpeed=_setSpeed getSpeed=_getSpeed]
rename_classes = ParticleSystemQuad::ParticleSystem,
SimpleAudioEngine::AudioEngine,
SAXParser::PlistParser,
GLProgramCache::ShaderCache,
CallFunc::_CallFunc,
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
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