From 0aee06039db8cbec78c5c339e24f3e9a71f686d3 Mon Sep 17 00:00:00 2001 From: tosti007 Date: Wed, 20 Dec 2023 12:07:03 +0100 Subject: [PATCH] Allow getting the clipboard and allow_ime state --- crates/egui-winit/src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/egui-winit/src/lib.rs b/crates/egui-winit/src/lib.rs index da4d2bc43589..8c3fa85e18fe 100644 --- a/crates/egui-winit/src/lib.rs +++ b/crates/egui-winit/src/lib.rs @@ -172,6 +172,16 @@ impl State { self.egui_input.max_texture_side = Some(max_texture_side); } + /// Returns the used clipboard. + pub fn clipboard(&mut self) -> &mut clipboard::Clipboard { + &mut self.clipboard + } + + /// Returns whether the window should get IME events. + pub fn allow_ime(&self) -> &mut bool { + &mut self.allow_ime + } + #[inline] pub fn egui_ctx(&self) -> &egui::Context { &self.egui_ctx