diff options
author | 2022-03-17 00:25:00 -0300 | |
---|---|---|
committer | 2022-04-26 18:58:06 -0300 | |
commit | e23e4b8db20f3910bb6617a6931c9a8906791f8e (patch) | |
tree | db47c8c641aca7de112e5f787deb776bd831fb9d /graphics | |
parent | ced5f5075f0debe7fee0b86b064c64f46055a000 (diff) | |
download | iced-e23e4b8db20f3910bb6617a6931c9a8906791f8e.tar.gz iced-e23e4b8db20f3910bb6617a6931c9a8906791f8e.tar.bz2 iced-e23e4b8db20f3910bb6617a6931c9a8906791f8e.zip |
Introduce `GraphicsInformation` to `iced_graphics`
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/src/window.rs | 2 | ||||
-rw-r--r-- | graphics/src/window/compositor.rs | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/graphics/src/window.rs b/graphics/src/window.rs index 67ec3322..c73c8c53 100644 --- a/graphics/src/window.rs +++ b/graphics/src/window.rs @@ -4,7 +4,7 @@ mod compositor; #[cfg(feature = "opengl")] mod gl_compositor; -pub use compositor::{Compositor, SurfaceError}; +pub use compositor::{Compositor, GraphicsInformation, SurfaceError}; #[cfg(feature = "opengl")] pub use gl_compositor::GLCompositor; diff --git a/graphics/src/window/compositor.rs b/graphics/src/window/compositor.rs index 9ea040cd..5987b118 100644 --- a/graphics/src/window/compositor.rs +++ b/graphics/src/window/compositor.rs @@ -71,3 +71,12 @@ pub enum SurfaceError { #[error("There is no more memory left to allocate a new frame")] OutOfMemory, } + +/// Contains informations about the graphics (e.g. graphics adapter, graphics backend). +#[derive(Debug)] +pub struct GraphicsInformation { + /// Contains the graphics adapter. + pub adapter: String, + /// Contains the graphics backend. + pub backend: String, +} |