callback

package
v0.0.0-...-f3d8a94 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2018 License: MIT Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL