SDL_EventAction(3type)

πŸ’– SDL_EventAction(3type) πŸ’–

okay bestie, so this is the page for SDL_EventAction from the SDL3 DATATYPES crew β€” it's literally the type of action you request from SDL_PeepEvents() ✨


🌸 NAME 🌸

SDL_EventAction β€” the type of action to request from SDL_PeepEvents(). that's it, that's the whole vibe πŸ’…


✨ SYNOPSIS ✨

#include <SDL3/SDL_events.h>

typedef enum SDL_EventAction
{
    SDL_ADDEVENT,  /**< Add events to the back of the queue. */
    SDL_PEEKEVENT, /**< Check but don't remove events from the queue front. */
    SDL_GETEVENT   /**< Retrieve/remove events from the front of the queue. */
} SDL_EventAction;

so like, the enum members are doing three totally different things and you gotta know which is which, no cap:

  • SDL_ADDEVENT β€” adds events to the back of the queue. dropping them in the back, respectfully 🫢
  • SDL_PEEKEVENT β€” checks events at the front of the queue but doesn't remove them. it's giving window shopping, look but don't touch πŸ‘€
  • SDL_GETEVENT β€” retrieves and removes events from the front of the queue. okay so this one actually takes them home with it 😭

πŸ¦‹ AVAILABILITY πŸ¦‹

this enum has been available since SDL 3.2.0. iconic, honestly 🌈


fr fr, if you're passing one of these to SDL_PeepEvents(), double check which one you mean β€” peeking and getting are NOT the same thing and your queue will simply know the difference πŸ’€

and that's the whole page, bestie!! brought to you by Simple Directmedia Layer, SDL 3.4.18, and yes this is the SDL_EventAction(3type) moment πŸ‘‘ stay hydrated, read your man pages, periodt πŸ’–πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from