SDL_Capitalization(3type)

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

okay bestie, so you know how sometimes your phone just knows to capitalize the first letter of a sentence and you're like "how did it do that 😭"? yeah. this is the enum behind that whole vibe. it's called SDL_Capitalization, it lives in the SDL3 datatypes corner of the manual, and it's literally the list of ways autocapitalization can happen. no cap.


✨ NAME ✨

SDL_Capitalization β€” the auto capitalization type πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_keyboard.h>

typedef enum SDL_Capitalization
{
    SDL_CAPITALIZE_NONE,        /**< No auto-capitalization will be done */
    SDL_CAPITALIZE_SENTENCES,   /**< The first letter of sentences will be capitalized */
    SDL_CAPITALIZE_WORDS,       /**< The first letter of words will be capitalized */
    SDL_CAPITALIZE_LETTERS      /**< All letters will be capitalized */
} SDL_Capitalization;

πŸ¦‹ DESCRIPTION πŸ¦‹

so these are the valid values for SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER. that's the whole point of this enum, she exists to feed that property 🫢

and here's the tea: not every value is valid on every platform. some platforms just don't support some of these modes. but don't spiral β€” where a value isn't supported, a reasonable fallback will be used. so it's giving "we got you" energy, not "your app is broken" energy ✨

the lineup, one by one:

  • SDL_CAPITALIZE_NONE β€” no auto-capitalization will be done. the keyboard keeps its hands to itself πŸ™ˆ
  • SDL_CAPITALIZE_SENTENCES β€” the first letter of sentences will be capitalized. classic main character move, every new sentence gets its little crown πŸ‘‘
  • SDL_CAPITALIZE_WORDS β€” the first letter of words will be capitalized. every single word gets the glow-up, very Title Case of it πŸ’…
  • SDL_CAPITALIZE_LETTERS β€” all letters will be capitalized. ALL OF THEM. it's giving SCREAMING, but make it a documented feature πŸ”₯

🌈 AVAILABILITY 🌈

this enum is available since SDL 3.2.0. so if you're on anything older, she has not been born yet, sorry babe 😭


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie, you ate it πŸ“ go forth and capitalize responsibly ✨

Simple Directmedia Layer Β· SDL 3.4.18 Β· SDL_Capitalization(3type) β€” mwah, love u, bye πŸ’–

πŸ“¦ where this page comes from