@@ -5371,6 +5371,51 @@ extern "C" {
5371
5371
#[doc = " \\sa SDL_SetClipboardText"]
5372
5372
pub fn SDL_HasClipboardText() -> SDL_bool;
5373
5373
}
5374
+ extern "C" {
5375
+ #[doc = " Put UTF-8 text into the primary selection."]
5376
+ #[doc = ""]
5377
+ #[doc = "\\param text the text to store in the primary selection"]
5378
+ #[doc = "\\returns 0 on success or a negative error code on failure; call"]
5379
+ #[doc = " SDL_GetError() for more information."]
5380
+ #[doc = ""]
5381
+ #[doc = "\\since This function is available since SDL 2.26.0."]
5382
+ #[doc = ""]
5383
+ #[doc = "\\sa SDL_GetPrimarySelectionText"]
5384
+ #[doc = "\\sa SDL_HasPrimarySelectionText"]
5385
+ pub fn SDL_SetPrimarySelectionText(text: *const libc::c_char) -> libc::c_int;
5386
+ }
5387
+ extern "C" {
5388
+ #[doc = " Get UTF-8 text from the primary selection, which must be freed with"]
5389
+ #[doc = "SDL_free()."]
5390
+ #[doc = ""]
5391
+ #[doc = "This functions returns empty string if there was not enough memory left for"]
5392
+ #[doc = "a copy of the primary selection's content."]
5393
+ #[doc = ""]
5394
+ #[doc = "\\returns the primary selection text on success or an empty string on"]
5395
+ #[doc = " failure; call SDL_GetError() for more information. Caller must"]
5396
+ #[doc = " call SDL_free() on the returned pointer when done with it (even if"]
5397
+ #[doc = " there was an error)."]
5398
+ #[doc = ""]
5399
+ #[doc = "\\since This function is available since SDL 2.26.0."]
5400
+ #[doc = ""]
5401
+ #[doc = "\\sa SDL_HasPrimarySelectionText"]
5402
+ #[doc = "\\sa SDL_SetPrimarySelectionText"]
5403
+ pub fn SDL_GetPrimarySelectionText() -> *mut libc::c_char;
5404
+ }
5405
+ extern "C" {
5406
+
5407
+ #[doc = "Query whether the primary selection exists and contains a non-empty text"]
5408
+ #[doc = "string."]
5409
+ #[doc = ""]
5410
+ #[doc = "\\returns SDL_TRUE if the primary selection has text, or SDL_FALSE if it"]
5411
+ #[doc = " does not."]
5412
+ #[doc = ""]
5413
+ #[doc = "\\since This function is available since SDL 2.26.0."]
5414
+ #[doc = ""]
5415
+ #[doc = "\\sa SDL_GetPrimarySelectionText"]
5416
+ #[doc = "\\sa SDL_SetPrimarySelectionText"]
5417
+ pub fn SDL_HasPrimarySelectionText() -> SDL_bool;
5418
+ }
5374
5419
pub type __m64 = [libc::c_longlong; 1usize];
5375
5420
pub type __v1di = [libc::c_longlong; 1usize];
5376
5421
pub type __v2si = [libc::c_int; 2usize];
0 commit comments