sdlclipboard.inc 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {*
  2. * \file SDL_clipboard.h
  3. *
  4. * Include file for SDL clipboard handling
  5. }
  6. {* Function prototypes *}
  7. {*
  8. * Put UTF-8 text into the clipboard.
  9. *
  10. * \param text the text to store in the clipboard
  11. * \returns 0 on success or a negative error code on failure; call
  12. * SDL_GetError() for more information.
  13. *
  14. * \since This function is available since SDL 2.0.0.
  15. *
  16. * \sa SDL_GetClipboardText
  17. * \sa SDL_HasClipboardText
  18. }
  19. function SDL_SetClipboardText(text: PAnsiChar): cint; cdecl;
  20. external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetClipboardText' {$ENDIF} {$ENDIF};
  21. {*
  22. * Get UTF-8 text from the clipboard, which must be freed with SDL_free().
  23. *
  24. * This functions returns empty string if there was not enough memory left for
  25. * a copy of the clipboard's content.
  26. *
  27. * \returns the clipboard text on success or an empty string on failure; call
  28. * SDL_GetError() for more information. Caller must call SDL_free()
  29. * on the returned pointer when done with it (even if there was an
  30. * error).
  31. *
  32. * \since This function is available since SDL 2.0.0.
  33. *
  34. * \sa SDL_HasClipboardText
  35. * \sa SDL_SetClipboardText
  36. }
  37. function SDL_GetClipboardText(): PAnsiChar; cdecl;
  38. external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetClipboardText' {$ENDIF} {$ENDIF};
  39. {*
  40. * Query whether the clipboard exists and contains a non-empty text string.
  41. *
  42. * \returns SDL_TRUE if the clipboard has text, or SDL_FALSE if it does not.
  43. *
  44. * \since This function is available since SDL 2.0.0.
  45. *
  46. * \sa SDL_GetClipboardText
  47. * \sa SDL_SetClipboardText
  48. }
  49. function SDL_HasClipboardText(): TSDL_bool; cdecl;
  50. external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasClipboardText' {$ENDIF} {$ENDIF};
  51. {*
  52. * Put UTF-8 text into the primary selection.
  53. *
  54. * \param text the text to store in the primary selection
  55. * \returns 0 on success or a negative error code on failure; call
  56. * SDL_GetError() for more information.
  57. *
  58. * \since This function is available since SDL 2.26.1.
  59. *
  60. * \sa SDL_GetPrimarySelectionText
  61. * \sa SDL_HasPrimarySelectionText
  62. }
  63. function SDL_SetPrimarySelectionText(text: PAnsiChar): cint; cdecl;
  64. external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetPrimarySelectionText' {$ENDIF} {$ENDIF};
  65. {*
  66. * Get UTF-8 text from the primary selection, which must be freed with
  67. * SDL_free().
  68. *
  69. * This functions returns empty string if there was not enough memory left for
  70. * a copy of the primary selection's content.
  71. *
  72. * \returns the primary selection text on success or an empty string on
  73. * failure; call SDL_GetError() for more information. Caller must
  74. * call SDL_free() on the returned pointer when done with it (even if
  75. * there was an error).
  76. *
  77. * \since This function is available since SDL 2.26.1.
  78. *
  79. * \sa SDL_HasPrimarySelectionText
  80. * \sa SDL_SetPrimarySelectionText
  81. }
  82. function SDL_GetPrimarySelectionText(): PAnsiChar; cdecl;
  83. external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPrimarySelectionText' {$ENDIF} {$ENDIF};
  84. {*
  85. * Query whether the primary selection exists and contains a non-empty text
  86. * string.
  87. *
  88. * \returns SDL_TRUE if the primary selection has text, or SDL_FALSE if it
  89. * does not.
  90. *
  91. * \since This function is available since SDL 2.26.1.
  92. *
  93. * \sa SDL_GetPrimarySelectionText
  94. * \sa SDL_SetPrimarySelectionText
  95. }
  96. function SDL_HasPrimarySelectionText(): TSDL_bool; cdecl;
  97. external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasPrimarySelectionText' {$ENDIF} {$ENDIF};