From: Olaf Wintermann Date: Thu, 14 May 2026 18:28:53 +0000 (+0200) Subject: remove unnecessary second UiObject impl block X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=HEAD;p=note.git remove unnecessary second UiObject impl block --- diff --git a/ui-rs/src/ui/window.rs b/ui-rs/src/ui/window.rs index 6f70e0c..cffd4d3 100644 --- a/ui-rs/src/ui/window.rs +++ b/ui-rs/src/ui/window.rs @@ -42,6 +42,24 @@ impl toolkit::UiObject { ui_show(self.ptr); } } + + pub fn set_size(&mut self, width: u32, height: u32) { + unsafe { + ui_window_size(self.ptr, width as c_int, height as c_int); + } + } + + pub fn set_menubar_visible(&mut self, visible: bool) { + unsafe { + ui_window_menubar_set_visible(self.ptr, visible as c_int); + } + } + + pub fn enable_fullscreen(&mut self, fullscreen: bool) { + unsafe { + ui_window_fullscreen(self.ptr, fullscreen as c_int); + } + } } /* ---------------------------------- main windows ---------------------------------- */ @@ -101,25 +119,6 @@ where F: FnOnce(&mut toolkit::UiObject, &mut T) { obj } -impl toolkit::UiObject { - pub fn set_size(&mut self, width: u32, height: u32) { - unsafe { - ui_window_size(self.ptr, width as c_int, height as c_int); - } - } - - pub fn set_menubar_visible(&mut self, visible: bool) { - unsafe { - ui_window_menubar_set_visible(self.ptr, visible as c_int); - } - } - - pub fn enable_fullscreen(&mut self, fullscreen: bool) { - unsafe { - ui_window_fullscreen(self.ptr, fullscreen as c_int); - } - } -} impl AppContext { pub fn window(&self, title: &str, data: T, create_ui: F) -> toolkit::UiObject