mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Make WindowBuilder
and HeadlessRendererBuilder
derive Clone
.
This commit is contained in:
parent
cf02e7f1f4
commit
e0f36b80c9
|
@ -65,9 +65,9 @@ impl MonitorId {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Clone, Default)]
|
||||||
pub struct PlatformSpecificWindowBuilderAttributes;
|
pub struct PlatformSpecificWindowBuilderAttributes;
|
||||||
#[derive(Default)]
|
#[derive(Clone, Default)]
|
||||||
pub struct PlatformSpecificHeadlessBuilderAttributes;
|
pub struct PlatformSpecificHeadlessBuilderAttributes;
|
||||||
|
|
||||||
pub struct PollEventsIterator<'a> {
|
pub struct PollEventsIterator<'a> {
|
||||||
|
|
|
@ -13,7 +13,7 @@ use cocoa::appkit::*;
|
||||||
use PixelFormat;
|
use PixelFormat;
|
||||||
use api::cocoa::helpers;
|
use api::cocoa::helpers;
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Clone, Default)]
|
||||||
pub struct PlatformSpecificHeadlessBuilderAttributes;
|
pub struct PlatformSpecificHeadlessBuilderAttributes;
|
||||||
|
|
||||||
pub struct HeadlessContext {
|
pub struct HeadlessContext {
|
||||||
|
|
|
@ -181,7 +181,7 @@ impl Drop for WindowDelegate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Clone, Default)]
|
||||||
pub struct PlatformSpecificWindowBuilderAttributes {
|
pub struct PlatformSpecificWindowBuilderAttributes {
|
||||||
pub activation_policy: ActivationPolicy,
|
pub activation_policy: ActivationPolicy,
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,7 +177,7 @@ impl MonitorId {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Clone, Default)]
|
||||||
pub struct PlatformSpecificWindowBuilderAttributes;
|
pub struct PlatformSpecificWindowBuilderAttributes;
|
||||||
|
|
||||||
impl Window {
|
impl Window {
|
||||||
|
|
|
@ -11,6 +11,7 @@ use Robustness;
|
||||||
use platform;
|
use platform;
|
||||||
|
|
||||||
/// Object that allows you to build headless contexts.
|
/// Object that allows you to build headless contexts.
|
||||||
|
#[derive(Clone)]
|
||||||
pub struct HeadlessRendererBuilder<'a> {
|
pub struct HeadlessRendererBuilder<'a> {
|
||||||
/// The dimensions to use.
|
/// The dimensions to use.
|
||||||
pub dimensions: (u32, u32),
|
pub dimensions: (u32, u32),
|
||||||
|
|
|
@ -106,6 +106,7 @@ pub struct Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Object that allows you to build windows.
|
/// Object that allows you to build windows.
|
||||||
|
#[derive(Clone)]
|
||||||
pub struct WindowBuilder<'a> {
|
pub struct WindowBuilder<'a> {
|
||||||
/// The attributes to use to create the window.
|
/// The attributes to use to create the window.
|
||||||
pub window: WindowAttributes,
|
pub window: WindowAttributes,
|
||||||
|
|
|
@ -58,7 +58,7 @@ impl GlContext for HeadlessContext {
|
||||||
unsafe impl Send for HeadlessContext {}
|
unsafe impl Send for HeadlessContext {}
|
||||||
unsafe impl Sync for HeadlessContext {}
|
unsafe impl Sync for HeadlessContext {}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Clone, Default)]
|
||||||
pub struct PlatformSpecificWindowBuilderAttributes;
|
pub struct PlatformSpecificWindowBuilderAttributes;
|
||||||
#[derive(Default)]
|
#[derive(Clone, Default)]
|
||||||
pub struct PlatformSpecificHeadlessBuilderAttributes;
|
pub struct PlatformSpecificHeadlessBuilderAttributes;
|
||||||
|
|
|
@ -8,7 +8,7 @@ use ContextError;
|
||||||
|
|
||||||
pub use api::ios::*;
|
pub use api::ios::*;
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Clone, Default)]
|
||||||
pub struct PlatformSpecificHeadlessBuilderAttributes;
|
pub struct PlatformSpecificHeadlessBuilderAttributes;
|
||||||
|
|
||||||
pub struct HeadlessContext(i32);
|
pub struct HeadlessContext(i32);
|
||||||
|
|
|
@ -22,7 +22,7 @@ use api::x11::XConnection;
|
||||||
use api::x11::XError;
|
use api::x11::XError;
|
||||||
use api::x11::XNotSupported;
|
use api::x11::XNotSupported;
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Clone, Default)]
|
||||||
pub struct PlatformSpecificWindowBuilderAttributes;
|
pub struct PlatformSpecificWindowBuilderAttributes;
|
||||||
|
|
||||||
enum Backend {
|
enum Backend {
|
||||||
|
|
|
@ -15,7 +15,7 @@ pub use self::api_dispatch::{WaitEventsIterator, PollEventsIterator};
|
||||||
pub use self::api_dispatch::PlatformSpecificWindowBuilderAttributes;
|
pub use self::api_dispatch::PlatformSpecificWindowBuilderAttributes;
|
||||||
mod api_dispatch;
|
mod api_dispatch;
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Clone, Default)]
|
||||||
pub struct PlatformSpecificHeadlessBuilderAttributes;
|
pub struct PlatformSpecificHeadlessBuilderAttributes;
|
||||||
|
|
||||||
pub struct HeadlessContext(OsMesaContext);
|
pub struct HeadlessContext(OsMesaContext);
|
||||||
|
|
|
@ -51,9 +51,9 @@ lazy_static! {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Clone, Default)]
|
||||||
pub struct PlatformSpecificWindowBuilderAttributes;
|
pub struct PlatformSpecificWindowBuilderAttributes;
|
||||||
#[derive(Default)]
|
#[derive(Clone, Default)]
|
||||||
pub struct PlatformSpecificHeadlessBuilderAttributes;
|
pub struct PlatformSpecificHeadlessBuilderAttributes;
|
||||||
|
|
||||||
/// The Win32 implementation of the main `Window` object.
|
/// The Win32 implementation of the main `Window` object.
|
||||||
|
|
Loading…
Reference in a new issue