Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Func = callbackFunc
Func holds a pointer to the C callback function. When called, it calls the provided function f in a a Go context with the given argument.
It can be used by first converting it to a function pointer and then calling from C. Here is an example that sets up the callback function:
//static void (*callback)(void (*f)(void*), void *arg); //void setCallback(void *c){ // callback = c; //} import "C" import "code.google.com/p/rog-go/exp/callback" func init() { C.setCallback(callback.Func) }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.