fun show_cursor=(val: Bool) `{ SDL_ShowCursor(val? SDL_ENABLE: SDL_DISABLE); `}
# Is the cursor visible?
- fun show_cursor: Bool `{ SDL_ShowCursor(SDL_QUERY); `}
+ fun show_cursor: Bool `{ return SDL_ShowCursor(SDL_QUERY); `}
# Grab or release the input
fun grab_input=(val: Bool) `{ SDL_WM_GrabInput(val? SDL_GRAB_ON: SDL_GRAB_OFF); `}
# Is the input grabbed?
- fun grab_input: Bool `{ SDL_WM_GrabInput(SDL_GRAB_QUERY) == SDL_GRAB_ON; `}
+ fun grab_input: Bool `{ return SDL_WM_GrabInput(SDL_GRAB_QUERY) == SDL_GRAB_ON; `}
# Are instances of `SDLMouseMotionEvent` ignored?
fun ignore_mouse_motion_events: Bool `{
# import base64
# assert "The quick brown fox jumps over the lazy dog".sha1.encode_base64 == "L9ThxnotKPzthJ7hu3bnORuT6xI="
fun sha1: String import String.to_cstring, String.length, NativeString.to_s_with_length `{
- uint32_t a;
sha1nfo s;
sha1_init(&s);
#
# assert "The quick brown fox jumps over the lazy dog".sha1_to_s == "2FD4E1C67A2D28FCED849EE1BB76E7391B93EB12"
fun sha1_to_s: String import String.to_cstring, String.length, NativeString.to_s_with_length `{
- uint32_t a;
sha1nfo s;
sha1_init(&s);
# are boxed objects, passing them to a C function is illegal.
fun select(max: NativeSocket, reads: nullable NativeSocketSet, write: nullable NativeSocketSet,
except: nullable NativeSocketSet, timeout: NativeTimeval): Int `{
- fd_set *rds, *wts, *exs = NULL;
+ fd_set *rds = NULL,
+ *wts = NULL,
+ *exs = NULL;
struct timeval *tm = NULL;
if (reads != NULL) rds = (fd_set*)reads;
if (write != NULL) wts = (fd_set*)write;