SDL_GetWindowMouseGrab(3)
π SDL_GetWindowMouseGrab π
okay bestie so this is a page from the SDL3 FUNCTIONS manual, and today's main character is SDL_GetWindowMouseGrab β she's the one who tells you whether a window is currently grabbing the mouse. no cap. β¨
πΈ NAME πΈ
SDL_GetWindowMouseGrab β get a window's mouse grab mode. that's it, that's the whole job, and she does it flawlessly π
π SYNOPSIS π
#include <SDL3/SDL_video.h>
bool SDL_GetWindowMouseGrab(SDL_Window *window);
like, include the header, call the function, get a bool back. iconic. π¦
β¨ FUNCTION PARAMETERS β¨
windowβ the window you're querying, aka the one you want the tea on π
π« RETURN VALUE π«
- Returns
trueif the mouse is grabbed π«Ά - Returns
falseotherwise π
that's the whole vibe check, fr fr.
π₯ THREAD SAFETY π₯
bestie. listen. this function should only be called on the main thread. do not try her on a worker thread, she will not be slaying there. π
π AVAILABILITY π
this one's been around since SDL 3.2.0 β so if you're on anything older, she simply does not exist for you π
π SEE ALSO π
SDL_GetWindowMouseRect(3)SDL_SetWindowMouseRect(3)SDL_SetWindowMouseGrab(3)SDL_SetWindowKeyboardGrab(3)
go read those too, they're all part of the same friend group π
Simple Directmedia Layer wrote this, and it's from SDL 3.4.18 β mwah, thanks for coming to my TED talk, ily, go grab a mouse (or don't, that's literally what the function is for) πβ¨π¦
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms