Fetching contributors…
Cannot retrieve contributors at this time
131 lines (112 sloc) 6.62 KB
# You can extend the functionality by using plugins
# Basically you can override the functionality of the converters
plugin = constant_class = plugin_jsb_chipmunk.JSBGenerateConstants_CP,
# JS namespace. By default it is the same as config file namespace.
# This namespace is used then the script autogenerates JS code. eg: with the constants
js_namespace = cp
# prefix that will be removed from the ObjC classes in order to generate the JS classes
# ex: If the class name is CCNode, then on JavaScript it will be Node
## None, since chipmunk has no Objective-C classes
obj_class_prefix_to_remove =
# Classes to generate. Use '*' to generate all the parsed classes.
# Subclasses will be parsed as well.
# ex: If CCSprite is parsed, then CCNode and NSObject will be parsed as well
# It supports regular expressions to match class names.
# eg: all cocos2d actions ending in 'By': CC(.*)By
## None, since chipmunk has no Objective-C classes
classes_to_parse =
# Classes to ignore.
# It is a good idea to add classes that you don't want to have a proxy object. Usually internal classes,
# or classes that are already native on JavaScript should be added here.
# It supports regular expressions to match class names.
# eg: all NS classes: NS(.*)
## None, since chipmunk has no Objective-C classes
classes_to_ignore =
# Class properties
# Options
# manual Means that the class is manually bound. No binding info will generated, but it can be used.
class_properties =
# Whether or not to generate constructors from base classes for the current class.
# In JavaScript, the "constructors" or "static methods" are not "inherited".
# It is recommended to set it to "auto".
# Options:
# False: Don't inherited
# True: Inherit all class methods from all ancestors
# Auto: Inherit only if it has no class constructors. Stop when the fist class constructor is added.
## Ignored, since chipmunk has no classes
inherit_class_methods = Auto
# Method properties
# options:
# name:"js_name" Rename methods.
# ignore This method will be ignored.
# callback This method is a callback. It will be invoked from Objective-C
# optional_args_since:2 It means that all arguments starting from the 2nd argument are optionals
# variadic_2_array It means that all arguments are variadic, and an Array will be created with them
## None, since chipmunk has not methods
method_properties =
# Files that are going to be imported by the auto-generated files.
# Useful to declare subclasses of an already bound project
# eg: manual bindings for NSObject
import_files = jsb_chipmunk_manual.h
compatible_with_cpp = True
# The prefix will be removed from function name.
# eg: if the C function is "cpBodyAddShape", then the JS name will be "bodyWithAddShape"
## For chipmunk add "cp"
function_prefix_to_remove = cp
# Free functions to be parsed
functions_to_parse = cp(.*)
# Free functions not to parse
## Add here all chipmunk "private" and "unsafe" functions
## cpv is not wrapped because it uses a function in JS, which is faster
functions_to_ignore = cpClosetPointOnSegment, cpSpaceActivateBody, cpSpaceLock, cpSpaceUnlock, cpSpaceFilterArbiters, cpSpaceArbiterSetFilter, cpSpaceGetPostStepData,
cpSpacePushContacts, cpContactBufferGetArray, cpSpacePushFreshContactBuffer, cpSpaceProcessComponents, cpSpatialIndexInit,
cpSpaceLookupHandler, cpSpaceUncacheArbiter, cpShapeActive, cpShapeUpdateFunc, cpSpaceCollideShapes,cpContactInit, cpArbiterInit,
cpArbiterUnthread, cpArbiterUpdate, cpArbiterPreStep, cpArbiterApplyCachedImpulse, cpArbiterApplyImpulse, cpArbiterCallSeparate,
cpArrayNew, cpArrayFree, cpArrayPush, cpArrayPop, cpArrayDeleteObj, cpArrayContains, cpArrayFreeEach, cpConstraintNext,
cpArbiterNext, cpHashSetNew, cpHashSetSetDefaultValue, cpHashSetFree, cpHashSetCount, cpHashSetInsert,
cpHashSetRemove, cpHashSetFind, cpHashSetEach, cpHashSetFilter,
cpBodyAddShape, cpBodyRemoveShape, cpBodyRemoveConstraint,
cpCircleShapeSetRadius, cpCircleShapeSetOffset, cpSegmentShapeSetEndpoints, cpSegmentShapeSetRadius, cpPolyShapeSetVerts,
cpSpaceRemoveCollisionHandler, cpSpaceAddCollisionHandler,
# Struct properties
# options:
# opaque The structure will be treated as 'opaque' and can't not be inspected from JS.
# Opaque structures are much faster to generate than 'manual' or 'automatic' structures
# manual:[func] Manual conversion is provided for this structures. jsval_to_structname() and structname_to_jsval shall exists in your project
# If "func" is passed, it will call that conversion function
struct_properties = cpSpace = opaque,
cpBody = opaque,
cpShape = opaque,
cpConstraint = opaque,
cpArbiter = opaque,
cpVect = manual,
CGPoint = manual,
CGSize = manual,
CGRect = manual,
cpCollisionType = manual:long,
cpGroup = manual:long,
cpBB = manual,
# Object oriented C library ?
# If so, convert C-like API to object oriented API
# This will generate JavaScript code that will call the C API in a Object Oriented manner.
# The generated code might need to be manually modified
## Chipmunk has an OO API.
objects_from_c_functions = constructor_suffix = New,
destructor_suffix = Free,
classes = cpSpace; cpBody;
cpShape; cpPolyShape:cpShape; cpSegmentShape:cpShape; cpCircleShape:cpShape;
cpConstraint; cpDampedSpring:cpConstraint; cpDampedRotarySpring:cpConstraint; cpGearJoint:cpConstraint; cpGrooveJoint:cpConstraint; cpPinJoint:cpConstraint; cpPivotJoint:cpConstraint; cpRatchetJoint:cpConstraint; cpRotaryLimitJoint:cpConstraint; cpSimpleMotor:cpConstraint; cpSlideJoint:cpConstraint; cpArbiter,
base_class = cpBase,
manual_bound_methods = cpArbiterGetBodies; cpArbiterGetShapes; cpSpaceAddCollisionHandler; cpSpaceRemoveCollisionHandler; cpPolyShapeNew; cpBodyNew; cpSpaceFree; cpSpaceRemoveShape; cpSpaceRemoveConstraint; cpSpaceRemoveBody; cpSpaceRemoveStaticShape; cpSpaceAddShape; cpSpaceAddStaticShape; cpSpaceAddBody; cpSpaceAddConstraint,
# BridgeSupport file
bridge_support_file = ./chipmunk.bridgesupport
# File that contains information that complements BridgeSupport (not present on BridgeSupport file)
## None, since chipmunk has no classes
complement_file =