SDL_HINT_GDK_TEXTINPUT_SCOPE(3)

✨ SDL_HINT_GDK_TEXTINPUT_SCOPE ✨

okay so bestie, welcome to the SDL_HINT_GDK_TEXTINPUT_SCOPE page πŸ’– this is one of the SDL3 FUNCTIONS and it's lowkey niche but highkey important if you're on GDK, so let's get into it 🫢


πŸŽ€ NAME πŸŽ€

SDL_HINT_GDK_TEXTINPUT_SCOPE β€” this variable sets the input scope of the TextInput window on GDK platforms. that's it, that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_hints.h>

#define SDL_HINT_GDK_TEXTINPUT_SCOPE "SDL_GDK_TEXTINPUT_SCOPE"

like yes, it's a #define, and yes, the string is literally the same as the name but with SDL_ in front. iconic behavior, no notes ✨


πŸ’– DESCRIPTION πŸ’–

Set this hint to change the XGameUiTextEntryInputScope value that will be passed to the window creation function. πŸͺŸ

The value must be a stringified integer, fr fr. So like, "0" for XGameUiTextEntryInputScope::Default. not the number, not the enum, the string of the number. the way that it has to be a string is genuinely so real of it 😭

heads up bestie: this hint is available only if SDL_GDK_TEXTINPUT is defined. if that's not defined, this whole thing is just not gonna show up for you πŸ™ˆ

Also!! This hint should be set before calling SDL_StartTextInput(). Set it late and it's giving nothing, set it early and it's giving main character energy πŸ‘‘


🌈 AVAILABILITY 🌈

This hint is available since SDL 3.2.0. so if you're on anything older, sorry bestie, no scope for you πŸ’€


and that's the whole page!! go forth and set your scope before you start that text input, you got this πŸ¦‹πŸ“

Simple Directmedia Layer Β· SDL 3.4.18 Β· SDL_HINT_GDK_TEXTINPUT_SCOPE(3) β€” mwah, ty for reading, slay πŸ’œβœ¨

πŸ“¦ where this page comes from