SDL_HitTestResult(3type)

πŸ’… SDL_HitTestResult πŸ’…

okay bestie, welcome to SDL_HitTestResult β€” it's a datatype page from the SDL3 DATATYPES corner of the SDL3 manual, and it's literally just the list of possible return values that the SDL_HitTest callback can hand back to you. no cap, that's the whole vibe. ✨


✨ NAME ✨

SDL_HitTestResult β€” possible return values from the SDL_HitTest callback. 🫢


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_video.h>

typedef enum SDL_HitTestResult
{
    SDL_HITTEST_NORMAL,             /**< Region is normal. No special properties. */
    SDL_HITTEST_DRAGGABLE,          /**< Region can drag entire window. */
    SDL_HITTEST_RESIZE_TOPLEFT,     /**< Region is the resizable top-left corner border. */
    SDL_HITTEST_RESIZE_TOP,         /**< Region is the resizable top border. */
    SDL_HITTEST_RESIZE_TOPRIGHT,    /**< Region is the resizable top-right corner border. */
    SDL_HITTEST_RESIZE_RIGHT,       /**< Region is the resizable right border. */
    SDL_HITTEST_RESIZE_BOTTOMRIGHT, /**< Region is the resizable bottom-right corner border. */
    SDL_HITTEST_RESIZE_BOTTOM,      /**< Region is the resizable bottom border. */
    SDL_HITTEST_RESIZE_BOTTOMLEFT,  /**< Region is the resizable bottom-left corner border. */
    SDL_HITTEST_RESIZE_LEFT         /**< Region is the resizable left border. */
} SDL_HitTestResult;

okay let's break down the cast, one icon at a time πŸŽ€

  • SDL_HITTEST_NORMAL β€” this region is just... normal. no special properties, no drama, it's giving default. πŸ’€
  • SDL_HITTEST_DRAGGABLE β€” this region can drag the entire window. grab it, move it, main character energy. πŸ‘‘
  • SDL_HITTEST_RESIZE_TOPLEFT β€” this region is the resizable top-left corner border. πŸ¦‹
  • SDL_HITTEST_RESIZE_TOP β€” this region is the resizable top border. ⭐
  • SDL_HITTEST_RESIZE_TOPRIGHT β€” this region is the resizable top-right corner border. πŸ¦‹
  • SDL_HITTEST_RESIZE_RIGHT β€” this region is the resizable right border. ⭐
  • SDL_HITTEST_RESIZE_BOTTOMRIGHT β€” this region is the resizable bottom-right corner border. πŸ¦‹
  • SDL_HITTEST_RESIZE_BOTTOM β€” this region is the resizable bottom border. ⭐
  • SDL_HITTEST_RESIZE_BOTTOMLEFT β€” this region is the resizable bottom-left corner border. πŸ¦‹
  • SDL_HITTEST_RESIZE_LEFT β€” this region is the resizable left border. ⭐

🧡 THREAD SAFETY 🧡

bestie listen. this one should only be called on the main thread. do not try to be cute and call it from a worker thread, that's not the move. πŸ™ˆ

🌈 AVAILABILITY 🌈

this enum has been available since SDL 3.2.0. iconic behavior honestly. πŸ’œ


πŸ‘€ SEE ALSO πŸ‘€

  • SDL_HitTest(3type)

and that's the whole page, periodt. πŸ’…βœ¨ this cutie was brought to you by Simple Directmedia Layer, straight out of SDL 3.4.18 β€” go forth and hit-test responsibly, bestie 🫢🌸

πŸ“¦ where this page comes from