mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
Merge pull request #780 from jansegre/impl-clone-builders
Make `WindowBuilder` and `HeadlessRendererBuilder` derive `Clone`.
This commit is contained in:
commit
e796a2e018
|
@ -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> {
|
||||
|
|
|
@ -13,7 +13,7 @@ use cocoa::appkit::*;
|
|||
use PixelFormat;
|
||||
use api::cocoa::helpers;
|
||||
|
||||
#[derive(Default)]
|
||||
#[derive(Clone, Default)]
|
||||
pub struct PlatformSpecificHeadlessBuilderAttributes;
|
||||
|
||||
pub struct HeadlessContext {
|
||||
|
|
|
@ -181,7 +181,7 @@ impl Drop for WindowDelegate {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[derive(Clone, Default)]
|
||||
pub struct PlatformSpecificWindowBuilderAttributes {
|
||||
pub activation_policy: ActivationPolicy,
|
||||
}
|
||||
|
|
|
@ -177,7 +177,7 @@ impl MonitorId {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[derive(Clone, Default)]
|
||||
pub struct PlatformSpecificWindowBuilderAttributes;
|
||||
|
||||
impl Window {
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -8,7 +8,7 @@ use ContextError;
|
|||
|
||||
pub use api::ios::*;
|
||||
|
||||
#[derive(Default)]
|
||||
#[derive(Clone, Default)]
|
||||
pub struct PlatformSpecificHeadlessBuilderAttributes;
|
||||
|
||||
pub struct HeadlessContext(i32);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue