Move compositor module access from window to crate

This commit is contained in:
Richard 2022-04-26 19:18:18 -03:00
parent 5be1ac18fe
commit 984d1f375e
8 changed files with 27 additions and 22 deletions

View file

@ -39,6 +39,7 @@ pub use primitive::Primitive;
pub use renderer::Renderer;
pub use transformation::Transformation;
pub use viewport::Viewport;
pub use window::compositor;
pub use iced_native::alignment;
pub use iced_native::{

View file

@ -1,10 +1,10 @@
//! Draw graphics to window surfaces.
mod compositor;
pub mod compositor;
#[cfg(feature = "opengl")]
mod gl_compositor;
pub mod gl_compositor;
pub use compositor::{Compositor, Information, SurfaceError};
pub use compositor::Compositor;
#[cfg(feature = "opengl")]
pub use gl_compositor::GLCompositor;

View file

@ -1,3 +1,5 @@
//! A compositor is responsible for initializing a renderer and managing window
//! surfaces.
use crate::{Color, Error, Viewport};
use raw_window_handle::HasRawWindowHandle;

View file

@ -1,4 +1,6 @@
use crate::window::Information;
//! A compositor is responsible for initializing a renderer and managing window
//! surfaces.
use crate::compositor::Information;
use crate::{Color, Error, Size, Viewport};
use core::ffi::c_void;