SDL_WM_GrabInput(3)
π SDL_WM_GrabInput π
okay bestie, welcome to the SDL API Reference β yes it's the manual page, no it's not boring, sit down, we're doing this β¨
πΈ NAME πΈ
SDL_WM_GrabInput β grabs mouse and keyboard input. like, it takes them. grabs them. literally the name, she's not subtle π
π SYNOPSIS π
#include "SDL.h"
SDL_GrabMode SDL_WM_GrabInput(SDL_GrabMode mode);
that's it. one function, one argument, one return. lowkey elegant tbh π¦
β¨ DESCRIPTION β¨
so. grabbing β let's unpack the vibe. When input is grabbed, the mouse is confined to the application window (she cannot leave, she is locked in π«Ά), and nearly all keyboard input is passed directly to the application instead of being interpreted by a window manager, if any. no middleman, no manager meddling, just you and the app. it's giving direct communication π
When mode is SDL_GRAB_QUERY, the grab mode is not changed, but the current grab mode is returned. so it's a lil peek, a vibe check, not a change. iykyk π
and here's the enum, character for character, no cap:
typedef enum {
SDL_GRAB_QUERY,
SDL_GRAB_OFF,
SDL_GRAB_ON
} SDL_GrabMode;
three modes, three moods, all iconic β¨
π RETURN VALUE π
The current/new SDL_GrabMode. she gives you back a mode. that's the whole thing. periodt π
π reminder: SDL_GRAB_QUERY = look, don't touch. use it wisely bestie π§
kisses, this page was brought to you by SDL, dated Tue 11 Sep 2001, 23:01 β yes the SDL API Reference, she's vintage, she's legendary, and she ate ππ
π¦ where this page comes from
- debian bookworm: libsdl1.2-dev 1.2.15+dfsg2-8 Β· LGPL-2.1-or-later
- nixos 26.05: SDL_sixel 0-unstable-2016-02-06
- nixpkgs unstable: SDL_sixel 0-unstable-2016-02-06
- ubuntu jammy: libsdl1.2-dev 1.2.15+dfsg2-6 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms