SDL_x11clipboard.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. Simple DirectMedia Layer
  3. Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any damages
  6. arising from the use of this software.
  7. Permission is granted to anyone to use this software for any purpose,
  8. including commercial applications, and to alter it and redistribute it
  9. freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you must not
  11. claim that you wrote the original software. If you use this software
  12. in a product, an acknowledgment in the product documentation would be
  13. appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and must not be
  15. misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source distribution.
  17. */
  18. #include "../../SDL_internal.h"
  19. #ifndef SDL_x11clipboard_h_
  20. #define SDL_x11clipboard_h_
  21. enum ESDLX11ClipboardMimeType {
  22. SDL_X11_CLIPBOARD_MIME_TYPE_STRING,
  23. SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN,
  24. #ifdef X_HAVE_UTF8_STRING
  25. SDL_X11_CLIPBOARD_MIME_TYPE_TEXT_PLAIN_UTF8,
  26. #endif
  27. SDL_X11_CLIPBOARD_MIME_TYPE_TEXT,
  28. SDL_X11_CLIPBOARD_MIME_TYPE_MAX
  29. };
  30. extern int X11_SetClipboardText(_THIS, const char *text);
  31. extern char *X11_GetClipboardText(_THIS);
  32. extern SDL_bool X11_HasClipboardText(_THIS);
  33. extern int X11_SetPrimarySelectionText(_THIS, const char *text);
  34. extern char *X11_GetPrimarySelectionText(_THIS);
  35. extern SDL_bool X11_HasPrimarySelectionText(_THIS);
  36. extern Atom X11_GetSDLCutBufferClipboardType(Display *display, enum ESDLX11ClipboardMimeType mime_type, Atom selection_type);
  37. extern Atom X11_GetSDLCutBufferClipboardExternalFormat(Display *display, enum ESDLX11ClipboardMimeType mime_type);
  38. extern Atom X11_GetSDLCutBufferClipboardInternalFormat(Display *display, enum ESDLX11ClipboardMimeType mime_type);
  39. #endif /* SDL_x11clipboard_h_ */
  40. /* vi: set ts=4 sw=4 expandtab: */