lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I am unable to bind the C, Function pointers and callback to access in Lua.

Requirtement: I am trying to bind C [SDL] lib function pointers in Lua with swig tool.

typedef int (*SDL_EventFilter)(const SDL_Event *event);
void SDL_SetEventFilter(SDL_EventFilter filter);


Now I want that  SDL_SetEventFilter() will take the Lua fuction as a parameter and Set it as callback of type SDL_EventFilter.


Can anybody help me to do this??

Thanks & Regards
Amit Jain