I'm trying to pass a Go function to a C function.
Something like:
stm := C.struct_tray_menu{
....
fn: // definition of method
....
}
C.menu_cb(stm);
and pass that into a C function:
static void menu_cb(struct tray_menu *item) {
(void)item;
printf("menu: clicked on %s
", item->text);
}
I'd just like to know how to define something like C.function.