public static extern int gsapi_set_poll_with_handle(IntPtr instance, gsPollHandler pollfn, IntPtr caller_handle);
public static extern int gsapi_set_poll(IntPtr instance, gsPollHandler pollfn);