SDL_GetWindowMouseRect(3)

πŸ’– SDL_GetWindowMouseRect(3) β€” the SDL3 FUNCTIONS era πŸ’–

okay bestie, listen. this is the manual page for SDL_GetWindowMouseRect, and it's giving "short but iconic." it does one (1) thing and it does it flawlessly. no notes. πŸ‘‘


✨ NAME ✨

SDL_GetWindowMouseRect β€” grab the mouse confinement rectangle of a window. that's it, that's the whole job, and she eats every time. πŸŽ€


✨ SYNOPSIS ✨

#include <SDL3/SDL_video.h>

const SDL_Rect * SDL_GetWindowMouseRect(SDL_Window *window);

look at her. one include, one function call, zero drama. πŸ’…


✨ FUNCTION PARAMETERS ✨

  • window β€” the window you wanna interrogate, bestie. this is the one you're asking "hey girl, where's your mouse confinement rectangle at?" πŸ”

✨ RETURN VALUE ✨

  • *) β€” returns a pointer to the mouse confinement rectangle of a window, or NULL if there isn't one. so like… if she comes back with NULL, that window simply doesn't have a confinement rectangle. no rectangle, no problem, we move on. πŸ¦‹
bestie PLEASE check for that NULL. it's not a vibe to dereference it. 😭

✨ THREAD SAFETY ✨

this one is main thread only, no cap. do not be calling this from some random worker thread, i am begging you. main thread. main character energy only. πŸ‘‘


✨ AVAILABILITY ✨

she's been around since SDL 3.2.0. a modern queen. 🌸


✨ SEE ALSO ✨


and that's the whole page, bestie!! literally obsessed with how short this one is. fr fr. πŸ’œ

this little love letter to you came from the fine folks at Simple Directmedia Layer, and this is the SDL 3.4.18 version of the page. mwah. πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from