Callback Wrapping Help

new topic     » topic index » view thread      » older message » newer message

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 
new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu