aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/api/android/mod.rs4
-rw-r--r--src/api/cocoa/headless.rs2
-rw-r--r--src/api/cocoa/mod.rs2
-rw-r--r--src/api/ios/mod.rs2
-rw-r--r--src/headless.rs1
-rw-r--r--src/lib.rs1
-rw-r--r--src/platform/emscripten/mod.rs4
-rw-r--r--src/platform/ios/mod.rs2
-rw-r--r--src/platform/linux/api_dispatch.rs2
-rw-r--r--src/platform/linux/mod.rs2
-rw-r--r--src/platform/windows/mod.rs4
-rw-r--r--src/window.rs4
12 files changed, 16 insertions, 14 deletions
diff --git a/src/api/android/mod.rs b/src/api/android/mod.rs
index 433472c..2c17d92 100644
--- a/src/api/android/mod.rs
+++ b/src/api/android/mod.rs
@@ -65,9 +65,9 @@ impl MonitorId {
}
}
-#[derive(Default)]
+#[derive(Clone, Default)]
pub struct PlatformSpecificWindowBuilderAttributes;
-#[derive(Default)]
+#[derive(Clone, Default)]
pub struct PlatformSpecificHeadlessBuilderAttributes;
pub struct PollEventsIterator<'a> {
diff --git a/src/api/cocoa/headless.rs b/src/api/cocoa/headless.rs
index ac6c4e0..8d89e40 100644
--- a/src/api/cocoa/headless.rs
+++ b/src/api/cocoa/headless.rs
@@ -13,7 +13,7 @@ use cocoa::appkit::*;
use PixelFormat;
use api::cocoa::helpers;
-#[derive(Default)]
+#[derive(Clone, Default)]
pub struct PlatformSpecificHeadlessBuilderAttributes;
pub struct HeadlessContext {
diff --git a/src/api/cocoa/mod.rs b/src/api/cocoa/mod.rs
index 3c4d802..79f2b71 100644
--- a/src/api/cocoa/mod.rs
+++ b/src/api/cocoa/mod.rs
@@ -181,7 +181,7 @@ impl Drop for WindowDelegate {
}
}
-#[derive(Default)]
+#[derive(Clone, Default)]
pub struct PlatformSpecificWindowBuilderAttributes {
pub activation_policy: ActivationPolicy,
}
diff --git a/src/api/ios/mod.rs b/src/api/ios/mod.rs
index afcc6f4..8bee513 100644
--- a/src/api/ios/mod.rs
+++ b/src/api/ios/mod.rs
@@ -177,7 +177,7 @@ impl MonitorId {
}
}
-#[derive(Default)]
+#[derive(Clone, Default)]
pub struct PlatformSpecificWindowBuilderAttributes;
impl Window {
diff --git a/src/headless.rs b/src/headless.rs
index 8ea4141..31a9f5e 100644
--- a/src/headless.rs
+++ b/src/headless.rs
@@ -11,6 +11,7 @@ use Robustness;
use platform;
/// Object that allows you to build headless contexts.
+#[derive(Clone)]
pub struct HeadlessRendererBuilder<'a> {
/// The dimensions to use.
pub dimensions: (u32, u32),
diff --git a/src/lib.rs b/src/lib.rs
index ff5d52e..a10957d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -106,6 +106,7 @@ pub struct Window {
}
/// Object that allows you to build windows.
+#[derive(Clone)]
pub struct WindowBuilder<'a> {
/// The attributes to use to create the window.
pub window: WindowAttributes,
diff --git a/src/platform/emscripten/mod.rs b/src/platform/emscripten/mod.rs
index ce8d201..22cb565 100644
--- a/src/platform/emscripten/mod.rs
+++ b/src/platform/emscripten/mod.rs
@@ -58,7 +58,7 @@ impl GlContext for HeadlessContext {
unsafe impl Send for HeadlessContext {}
unsafe impl Sync for HeadlessContext {}
-#[derive(Default)]
+#[derive(Clone, Default)]
pub struct PlatformSpecificWindowBuilderAttributes;
-#[derive(Default)]
+#[derive(Clone, Default)]
pub struct PlatformSpecificHeadlessBuilderAttributes;
diff --git a/src/platform/ios/mod.rs b/src/platform/ios/mod.rs
index 2e6fbec..0b1a550 100644
--- a/src/platform/ios/mod.rs
+++ b/src/platform/ios/mod.rs
@@ -8,7 +8,7 @@ use ContextError;
pub use api::ios::*;
-#[derive(Default)]
+#[derive(Clone, Default)]
pub struct PlatformSpecificHeadlessBuilderAttributes;
pub struct HeadlessContext(i32);
diff --git a/src/platform/linux/api_dispatch.rs b/src/platform/linux/api_dispatch.rs
index 2e135e2..54e0186 100644
--- a/src/platform/linux/api_dispatch.rs
+++ b/src/platform/linux/api_dispatch.rs
@@ -22,7 +22,7 @@ use api::x11::XConnection;
use api::x11::XError;
use api::x11::XNotSupported;
-#[derive(Default)]
+#[derive(Clone, Default)]
pub struct PlatformSpecificWindowBuilderAttributes;
enum Backend {
diff --git a/src/platform/linux/mod.rs b/src/platform/linux/mod.rs
index 1865835..31a3414 100644
--- a/src/platform/linux/mod.rs
+++ b/src/platform/linux/mod.rs
@@ -15,7 +15,7 @@ pub use self::api_dispatch::{WaitEventsIterator, PollEventsIterator};
pub use self::api_dispatch::PlatformSpecificWindowBuilderAttributes;
mod api_dispatch;
-#[derive(Default)]
+#[derive(Clone, Default)]
pub struct PlatformSpecificHeadlessBuilderAttributes;
pub struct HeadlessContext(OsMesaContext);
diff --git a/src/platform/windows/mod.rs b/src/platform/windows/mod.rs
index 0c78322..f5fa6fd 100644
--- a/src/platform/windows/mod.rs
+++ b/src/platform/windows/mod.rs
@@ -51,9 +51,9 @@ lazy_static! {
};
}
-#[derive(Default)]
+#[derive(Clone, Default)]
pub struct PlatformSpecificWindowBuilderAttributes;
-#[derive(Default)]
+#[derive(Clone, Default)]
pub struct PlatformSpecificHeadlessBuilderAttributes;
/// The Win32 implementation of the main `Window` object.
diff --git a/src/window.rs b/src/window.rs
index 8e82c1d..4cac1ce 100644
--- a/src/window.rs
+++ b/src/window.rs
@@ -63,8 +63,8 @@ impl<'a> WindowBuilder<'a> {
/// Requests a specific title for the window.
#[inline]
- pub fn with_title(mut self, title: String) -> WindowBuilder<'a> {
- self.window.title = title;
+ pub fn with_title<T: Into<String>>(mut self, title: T) -> WindowBuilder<'a> {
+ self.window.title = title.into();
self
}