From 81314f91d82dff07f6da3409dd1280a68d4dcd60 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Fri, 15 May 2015 15:19:33 +0200 Subject: Add API for transparency and decorations and add support for win32 --- src/window.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/window.rs') diff --git a/src/window.rs b/src/window.rs index c21b82d..578c237 100644 --- a/src/window.rs +++ b/src/window.rs @@ -137,10 +137,22 @@ impl<'a> WindowBuilder<'a> { self } + /// Sets whether the background of the window should be transparent. + pub fn with_transparency(mut self, transparent: bool) -> WindowBuilder<'a> { + self.attribs.transparent = transparent; + self + } + + /// Sets whether the window should have a border, a title bar, etc. + pub fn with_decorations(mut self, decorations: bool) -> WindowBuilder<'a> { + self.attribs.decorations = decorations; + self + } + /// Builds the window. /// /// Error should be very rare and only occur in case of permission denied, incompatible system, - /// out of memory, etc. + /// out of memory, etc. pub fn build(mut self) -> Result { // resizing the window to the dimensions of the monitor when fullscreen if self.attribs.dimensions.is_none() && self.attribs.monitor.is_some() { -- cgit v1.2.3