packages feed

Box2D-0.1.0.0: cbits/box2d_gen_shim.h

// SPDX-License-Identifier: BSD-3-Clause
//
// Generated by boxnd-gen. By-value struct arguments/returns of the
// Box2D API are wrapped here as pointers (GHC's FFI cannot pass
// structs by value). A returned struct is written through a trailing out
// pointer; a by-value struct argument is taken through a const in pointer.
// Prefix hsg_ keeps these distinct from the hand-written hs_ shim.

#pragma once

#include "box2d/box2d.h"

void hsg_b2World_GetBounds(b2WorldId a0, b2AABB* out);
void hsg_b2World_GetBodyEvents(b2WorldId a0, b2BodyEvents* out);
void hsg_b2World_GetSensorEvents(b2WorldId a0, b2SensorEvents* out);
void hsg_b2World_GetContactEvents(b2WorldId a0, b2ContactEvents* out);
void hsg_b2World_GetJointEvents(b2WorldId a0, b2JointEvents* out);
void hsg_b2World_OverlapAABB(b2WorldId a0, const b2Pos* a1, const b2AABB* a2, const b2QueryFilter* a3, b2OverlapResultCallbackFcn* a4, void* a5, b2TreeStats* out);
void hsg_b2World_OverlapShape(b2WorldId a0, const b2Pos* a1, const b2ShapeProxy* a2, const b2QueryFilter* a3, b2OverlapResultCallbackFcn* a4, void* a5, b2TreeStats* out);
void hsg_b2World_CastRay(b2WorldId a0, const b2Pos* a1, const b2Vec2* a2, const b2QueryFilter* a3, b2CastResultCallbackFcn* a4, void* a5, b2TreeStats* out);
void hsg_b2World_CastRayClosest(b2WorldId a0, const b2Pos* a1, const b2Vec2* a2, const b2QueryFilter* a3, b2RayResult* out);
void hsg_b2World_CastShape(b2WorldId a0, const b2Pos* a1, const b2ShapeProxy* a2, const b2Vec2* a3, const b2QueryFilter* a4, b2CastResultCallbackFcn* a5, void* a6, b2TreeStats* out);
float hsg_b2World_CastMover(b2WorldId a0, const b2Pos* a1, const b2Capsule* a2, const b2Vec2* a3, const b2QueryFilter* a4);
void hsg_b2World_CollideMover(b2WorldId a0, const b2Pos* a1, const b2Capsule* a2, const b2QueryFilter* a3, b2PlaneResultCallbackFcn* a4, void* a5);
void hsg_b2World_SetGravity(b2WorldId a0, const b2Vec2* a1);
void hsg_b2World_GetGravity(b2WorldId a0, b2Vec2* out);
void hsg_b2World_GetProfile(b2WorldId a0, b2Profile* out);
void hsg_b2World_GetCounters(b2WorldId a0, b2Counters* out);
void hsg_b2World_GetMaxCapacity(b2WorldId a0, b2Capacity* out);
void hsg_b2Body_GetPosition(b2BodyId a0, b2Pos* out);
void hsg_b2Body_GetRotation(b2BodyId a0, b2Rot* out);
void hsg_b2Body_GetTransform(b2BodyId a0, b2WorldTransform* out);
void hsg_b2Body_SetTransform(b2BodyId a0, const b2Pos* a1, const b2Rot* a2);
void hsg_b2Body_GetLocalPoint(b2BodyId a0, const b2Pos* a1, b2Vec2* out);
void hsg_b2Body_GetWorldPoint(b2BodyId a0, const b2Vec2* a1, b2Pos* out);
void hsg_b2Body_GetLocalVector(b2BodyId a0, const b2Vec2* a1, b2Vec2* out);
void hsg_b2Body_GetWorldVector(b2BodyId a0, const b2Vec2* a1, b2Vec2* out);
void hsg_b2Body_GetLinearVelocity(b2BodyId a0, b2Vec2* out);
void hsg_b2Body_SetLinearVelocity(b2BodyId a0, const b2Vec2* a1);
void hsg_b2Body_SetTargetTransform(b2BodyId a0, const b2WorldTransform* a1, float a2, bool a3);
void hsg_b2Body_GetLocalPointVelocity(b2BodyId a0, const b2Vec2* a1, b2Vec2* out);
void hsg_b2Body_GetWorldPointVelocity(b2BodyId a0, const b2Pos* a1, b2Vec2* out);
void hsg_b2Body_ApplyForce(b2BodyId a0, const b2Vec2* a1, const b2Pos* a2, bool a3);
void hsg_b2Body_ApplyForceToCenter(b2BodyId a0, const b2Vec2* a1, bool a2);
void hsg_b2Body_ApplyLinearImpulse(b2BodyId a0, const b2Vec2* a1, const b2Pos* a2, bool a3);
void hsg_b2Body_ApplyLinearImpulseToCenter(b2BodyId a0, const b2Vec2* a1, bool a2);
void hsg_b2Body_GetLocalCenter(b2BodyId a0, b2Vec2* out);
void hsg_b2Body_GetWorldCenter(b2BodyId a0, b2Pos* out);
void hsg_b2Body_SetMassData(b2BodyId a0, const b2MassData* a1);
void hsg_b2Body_GetMassData(b2BodyId a0, b2MassData* out);
void hsg_b2Body_SetMotionLocks(b2BodyId a0, const b2MotionLocks* a1);
void hsg_b2Body_GetMotionLocks(b2BodyId a0, b2MotionLocks* out);
void hsg_b2Body_ComputeBounds(b2BodyId a0, b2AABB* out);
void hsg_b2Shape_GetSurfaceMaterial(b2ShapeId a0, b2SurfaceMaterial* out);
void hsg_b2Shape_GetFilter(b2ShapeId a0, b2Filter* out);
void hsg_b2Shape_SetFilter(b2ShapeId a0, const b2Filter* a1);
bool hsg_b2Shape_TestPoint(b2ShapeId a0, const b2Pos* a1);
void hsg_b2Shape_CastRay(b2ShapeId a0, const b2Pos* a1, const b2Vec2* a2, b2WorldCastOutput* out);
void hsg_b2Shape_GetCircle(b2ShapeId a0, b2Circle* out);
void hsg_b2Shape_GetSegment(b2ShapeId a0, b2Segment* out);
void hsg_b2Shape_GetChainSegment(b2ShapeId a0, b2ChainSegment* out);
void hsg_b2Shape_GetCapsule(b2ShapeId a0, b2Capsule* out);
void hsg_b2Shape_GetPolygon(b2ShapeId a0, b2Polygon* out);
void hsg_b2Shape_GetBounds(b2ShapeId a0, b2AABB* out);
void hsg_b2Shape_ComputeMassData(b2ShapeId a0, b2MassData* out);
void hsg_b2Shape_GetClosestPoint(b2ShapeId a0, const b2Pos* a1, b2Pos* out);
void hsg_b2Shape_ApplyWind(b2ShapeId a0, const b2Vec2* a1, float a2, float a3, bool a4);
void hsg_b2Chain_GetSurfaceMaterial(b2ChainId a0, int a1, b2SurfaceMaterial* out);
void hsg_b2Joint_SetLocalFrameA(b2JointId a0, const b2Transform* a1);
void hsg_b2Joint_GetLocalFrameA(b2JointId a0, b2Transform* out);
void hsg_b2Joint_SetLocalFrameB(b2JointId a0, const b2Transform* a1);
void hsg_b2Joint_GetLocalFrameB(b2JointId a0, b2Transform* out);
void hsg_b2Joint_GetConstraintForce(b2JointId a0, b2Vec2* out);
void hsg_b2MotorJoint_SetLinearVelocity(b2JointId a0, const b2Vec2* a1);
void hsg_b2MotorJoint_GetLinearVelocity(b2JointId a0, b2Vec2* out);
void hsg_b2MoverJoint_SetLinearVelocity(b2JointId a0, const b2Vec2* a1);
void hsg_b2MoverJoint_GetLinearVelocity(b2JointId a0, b2Vec2* out);
void hsg_b2MoverJoint_SetMaxVelocityForce(b2JointId a0, const b2Vec2* a1);
void hsg_b2MoverJoint_GetMaxVelocityForce(b2JointId a0, b2Vec2* out);
bool hsg_b2Contact_IsValid(const b2ContactId* a0);
void hsg_b2Contact_GetData(const b2ContactId* a0, b2ContactData* out);
void hsg_b2Replay_GetInfo(const b2Replay* a0, b2ReplayInfo* out);
void hsg_b2Replay_GetFrameQuery(const b2Replay* a0, int a1, b2ReplayQueryInfo* out);
void hsg_b2Replay_GetFrameQueryHit(const b2Replay* a0, int a1, int a2, b2ReplayQueryHit* out);
void hsg_b2MakePolygon(const b2Hull* a0, float a1, b2Polygon* out);
void hsg_b2MakeOffsetPolygon(const b2Hull* a0, const b2Vec2* a1, const b2Rot* a2, b2Polygon* out);
void hsg_b2MakeOffsetRoundedPolygon(const b2Hull* a0, const b2Vec2* a1, const b2Rot* a2, float a3, b2Polygon* out);
void hsg_b2MakeSquare(float a0, b2Polygon* out);
void hsg_b2MakeBox(float a0, float a1, b2Polygon* out);
void hsg_b2MakeRoundedBox(float a0, float a1, float a2, b2Polygon* out);
void hsg_b2MakeOffsetBox(float a0, float a1, const b2Vec2* a2, const b2Rot* a3, b2Polygon* out);
void hsg_b2MakeOffsetRoundedBox(float a0, float a1, const b2Vec2* a2, const b2Rot* a3, float a4, b2Polygon* out);
void hsg_b2TransformPolygon(const b2Transform* a0, const b2Polygon* a1, b2Polygon* out);
void hsg_b2ComputeCircleMass(const b2Circle* a0, float a1, b2MassData* out);
void hsg_b2ComputeCapsuleMass(const b2Capsule* a0, float a1, b2MassData* out);
void hsg_b2ComputePolygonMass(const b2Polygon* a0, float a1, b2MassData* out);
void hsg_b2ComputeCircleBounds(const b2Circle* a0, const b2WorldTransform* a1, b2AABB* out);
void hsg_b2ComputeCapsuleBounds(const b2Capsule* a0, const b2WorldTransform* a1, b2AABB* out);
void hsg_b2ComputePolygonBounds(const b2Polygon* a0, const b2WorldTransform* a1, b2AABB* out);
void hsg_b2ComputeSegmentBounds(const b2Segment* a0, const b2WorldTransform* a1, b2AABB* out);
bool hsg_b2PointInCircle(const b2Circle* a0, const b2Vec2* a1);
bool hsg_b2PointInCapsule(const b2Capsule* a0, const b2Vec2* a1);
bool hsg_b2PointInPolygon(const b2Polygon* a0, const b2Vec2* a1);
void hsg_b2CastRayCircle(const b2Circle* a0, const b2RayCastInput* a1, b2CastOutput* out);
void hsg_b2CastRayCapsule(const b2Capsule* a0, const b2RayCastInput* a1, b2CastOutput* out);
void hsg_b2CastRaySegment(const b2Segment* a0, const b2RayCastInput* a1, bool a2, b2CastOutput* out);
void hsg_b2CastRayPolygon(const b2Polygon* a0, const b2RayCastInput* a1, b2CastOutput* out);
void hsg_b2CastShapeCircle(const b2Circle* a0, const b2ShapeCastInput* a1, b2CastOutput* out);
void hsg_b2CastShapeCapsule(const b2Capsule* a0, const b2ShapeCastInput* a1, b2CastOutput* out);
void hsg_b2CastShapeSegment(const b2Segment* a0, const b2ShapeCastInput* a1, b2CastOutput* out);
void hsg_b2CastShapePolygon(const b2Polygon* a0, const b2ShapeCastInput* a1, b2CastOutput* out);
void hsg_b2ComputeHull(const b2Vec2* a0, int a1, b2Hull* out);
void hsg_b2ComputeSegmentDistance(const b2Vec2* a0, const b2Vec2* a1, const b2Vec2* a2, const b2Vec2* a3, b2SegmentDistanceResult* out);
void hsg_b2ComputeShapeDistance(const b2DistanceInput* a0, b2SimplexCache* a1, b2Simplex* a2, int a3, b2DistanceOutput* out);
void hsg_b2CastShape(const b2ShapeCastPairInput* a0, b2CastOutput* out);
void hsg_b2MakeProxy(const b2Vec2* a0, int a1, float a2, b2ShapeProxy* out);
void hsg_b2MakeOffsetProxy(const b2Vec2* a0, int a1, float a2, const b2Vec2* a3, const b2Rot* a4, b2ShapeProxy* out);
void hsg_b2GetSweepTransform(const b2Sweep* a0, float a1, b2Transform* out);
void hsg_b2ComputeTimeOfImpact(const b2TOIInput* a0, b2TOIOutput* out);
void hsg_b2CollideCircles(const b2Circle* a0, const b2Circle* a1, const b2Transform* a2, b2LocalManifold* out);
void hsg_b2CollideCapsuleAndCircle(const b2Capsule* a0, const b2Circle* a1, const b2Transform* a2, b2LocalManifold* out);
void hsg_b2CollideSegmentAndCircle(const b2Segment* a0, const b2Circle* a1, const b2Transform* a2, b2LocalManifold* out);
void hsg_b2CollidePolygonAndCircle(const b2Polygon* a0, const b2Circle* a1, const b2Transform* a2, b2LocalManifold* out);
void hsg_b2CollideCapsules(const b2Capsule* a0, const b2Capsule* a1, const b2Transform* a2, b2LocalManifold* out);
void hsg_b2CollideSegmentAndCapsule(const b2Segment* a0, const b2Capsule* a1, const b2Transform* a2, b2LocalManifold* out);
void hsg_b2CollidePolygonAndCapsule(const b2Polygon* a0, const b2Capsule* a1, const b2Transform* a2, b2LocalManifold* out);
void hsg_b2CollidePolygons(const b2Polygon* a0, const b2Polygon* a1, const b2Transform* a2, b2LocalManifold* out);
void hsg_b2CollideSegmentAndPolygon(const b2Segment* a0, const b2Polygon* a1, const b2Transform* a2, b2LocalManifold* out);
void hsg_b2CollideChainSegmentAndCircle(const b2ChainSegment* a0, const b2Circle* a1, const b2Transform* a2, b2LocalManifold* out);
void hsg_b2CollideChainSegmentAndCapsule(const b2ChainSegment* a0, const b2Capsule* a1, const b2Transform* a2, b2SimplexCache* a3, b2LocalManifold* out);
void hsg_b2CollideChainSegmentAndPolygon(const b2ChainSegment* a0, const b2Polygon* a1, const b2Transform* a2, b2SimplexCache* a3, b2LocalManifold* out);
int hsg_b2CreateTreeProxy(b2DynamicTree* a0, const b2AABB* a1, uint64_t a2, uint64_t a3);
void hsg_b2DynamicTree_MoveProxy(b2DynamicTree* a0, int a1, const b2AABB* a2);
void hsg_b2DynamicTree_OverlapAABB(const b2DynamicTree* a0, const b2AABB* a1, uint64_t a2, b2TreeQueryCallbackFcn* a3, void* a4, b2TreeStats* out);
void hsg_b2DynamicTree_OverlapAABBAll(const b2DynamicTree* a0, const b2AABB* a1, b2TreeQueryCallbackFcn* a2, void* a3, b2TreeStats* out);
void hsg_b2DynamicTree_CastRay(const b2DynamicTree* a0, const b2RayCastInput* a1, uint64_t a2, b2TreeRayCastCallbackFcn* a3, void* a4, b2TreeStats* out);
void hsg_b2DynamicTree_CastBox(const b2DynamicTree* a0, const b2BoxCastInput* a1, uint64_t a2, b2TreeBoxCastCallbackFcn* a3, void* a4, b2TreeStats* out);
void hsg_b2DynamicTree_GetRootBounds(const b2DynamicTree* a0, b2AABB* out);
void hsg_b2DynamicTree_GetProxyBounds(const b2DynamicTree* a0, int a1, b2AABB* out);
void hsg_b2SolvePlanes(const b2Vec2* a0, b2CollisionPlane* a1, int a2, b2PlaneSolverResult* out);
void hsg_b2ClipVector(const b2Vec2* a0, const b2CollisionPlane* a1, int a2, b2Vec2* out);