Callback Wrapping Help
- Posted by Icy_Viking Mar 14, 2023
- 814 views
Hello all,
I am having trouble wrapping my head around on how to wrap callbacks.
typedef size_t (*sfShapeGetPointCountCallback)(void*); ///< Type of the callback used to get the number of points in a shape typedef sfVector2f (*sfShapeGetPointCallback)(size_t, void*); ///< Type of the callback used to get a point of a shape CSFML_GRAPHICS_API sfShape* sfShape_create(sfShapeGetPointCountCallback getPointCount, sfShapeGetPointCallback getPoint, void* userData);
export constant xsfShape_create = define_c_func(gfx,"+sfShape_create",{C_POINTER,C_POINTER,C_POINTER},C_POINTER) public function sfShape_create(atom gpc,atom gp,atom ud) return c_func(xsfShape_create,{gpc,gp,ud}) end function