From 46f76287fcac5d3121776284538201e3644cfb4d Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Wed, 2 Aug 2023 19:18:32 +0200 Subject: [PATCH] gdk: Add missing Clipboard::set Related to #1443 --- gdk4/src/clipboard.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gdk4/src/clipboard.rs b/gdk4/src/clipboard.rs index 75e8fd7e317a..4fc945133315 100644 --- a/gdk4/src/clipboard.rs +++ b/gdk4/src/clipboard.rs @@ -86,4 +86,15 @@ impl Clipboard { }); })) } + + #[doc(alias = "gdk_clipboard_set")] + #[doc(alias = "gdk_clipboard_set_value")] + #[doc(alias = "gdk_clipboard_set_valist")] + #[doc(alias = "set_value")] + #[doc(alias = "set_valist")] + pub fn set(&self, value: &impl ToValue) { + unsafe { + ffi::gdk_clipboard_set_value(self.to_glib_none().0, value.to_value().to_glib_none().0); + } + } }