sdlHasClipboardText function

bool sdlHasClipboardText()

Query whether the clipboard exists and contains a non-empty text string.

\returns true if the clipboard has text, or false if it does not.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.1.3.

\sa SDL_GetClipboardText \sa SDL_SetClipboardText

extern SDL_DECLSPEC bool SDLCALL SDL_HasClipboardText(void)

Implementation

bool sdlHasClipboardText() {
  final sdlHasClipboardTextLookupFunction = libSdl3
      .lookupFunction<Uint8 Function(), int Function()>('SDL_HasClipboardText');
  return sdlHasClipboardTextLookupFunction() == 1;
}