aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.rs
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2015-05-15 15:19:33 +0200
committerPierre Krieger <pierre.krieger1708@gmail.com>2015-05-24 09:10:44 +0200
commit81314f91d82dff07f6da3409dd1280a68d4dcd60 (patch)
tree6619e34132f1b1ca5d8174e28a3ae1508340c1fb /src/window.rs
parent1377f276b7b64a1e75aa43da7efdea9a81155397 (diff)
downloadglutin-81314f91d82dff07f6da3409dd1280a68d4dcd60.tar.gz
glutin-81314f91d82dff07f6da3409dd1280a68d4dcd60.zip
Add API for transparency and decorations and add support for win32
Diffstat (limited to 'src/window.rs')
-rw-r--r--src/window.rs14
1 files changed, 13 insertions, 1 deletions
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<Window, CreationError> {
// resizing the window to the dimensions of the monitor when fullscreen
if self.attribs.dimensions.is_none() && self.attribs.monitor.is_some() {