Documentation fixes in preparation for release
This commit is contained in:
parent
3387957065
commit
07deba4c1b
|
@ -33,7 +33,7 @@ jobs:
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: doc
|
command: doc
|
||||||
args: --no-deps --features "test_all_features" -p smithay -p calloop:0.9.0 -p dbus -p drm -p gbm -p input -p nix:0.20.0 -p udev -p slog -p wayland-server -p wayland-commons -p wayland-protocols -p winit
|
args: --no-deps --features "test_all_features" -p smithay -p calloop:0.9.0 -p dbus -p drm -p gbm -p input -p nix:0.20.0 -p udev -p slog -p wayland-server -p wayland-commons:0.29.0 -p wayland-protocols:0.29.0 -p winit
|
||||||
|
|
||||||
- name: Setup index
|
- name: Setup index
|
||||||
run: cp ./doc_index.html ./target/doc/index.html
|
run: cp ./doc_index.html ./target/doc/index.html
|
||||||
|
|
|
@ -6,6 +6,13 @@ license = "MIT"
|
||||||
description = "Smithay is a library for writing wayland compositors."
|
description = "Smithay is a library for writing wayland compositors."
|
||||||
repository = "https://github.com/Smithay/smithay"
|
repository = "https://github.com/Smithay/smithay"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
readme = "README.md"
|
||||||
|
homepage = "https://smithay.github.io/"
|
||||||
|
keywords = ["wayland", "compositor", "graphics", "server"]
|
||||||
|
categories = ["gui"]
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
features = ["test_all_features"]
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [ "anvil", "wlcs_anvil" ]
|
members = [ "anvil", "wlcs_anvil" ]
|
||||||
|
@ -64,7 +71,7 @@ renderer_gl = ["gl_generator", "backend_egl"]
|
||||||
use_system_lib = ["wayland_frontend", "wayland-sys", "wayland-server/use_system_lib"]
|
use_system_lib = ["wayland_frontend", "wayland-sys", "wayland-server/use_system_lib"]
|
||||||
wayland_frontend = ["wayland-server", "wayland-commons", "wayland-protocols", "tempfile"]
|
wayland_frontend = ["wayland-server", "wayland-commons", "wayland-protocols", "tempfile"]
|
||||||
xwayland = ["wayland_frontend"]
|
xwayland = ["wayland_frontend"]
|
||||||
test_all_features = ["default"]
|
test_all_features = ["default", "use_system_lib", "wayland-server/dlopen"]
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "raw_drm"
|
name = "raw_drm"
|
||||||
|
|
|
@ -184,7 +184,7 @@ where
|
||||||
|
|
||||||
/// Marks the current frame as submitted.
|
/// Marks the current frame as submitted.
|
||||||
///
|
///
|
||||||
/// *Note*: Needs to be called, after the vblank event of the matching [`DrmDevice`](super::DrmDevice)
|
/// *Note*: Needs to be called, after the vblank event of the matching [`DrmDevice`](super::super::DrmDevice)
|
||||||
/// was received after calling [`GbmBufferedSurface::queue_buffer`] on this surface.
|
/// was received after calling [`GbmBufferedSurface::queue_buffer`] on this surface.
|
||||||
/// Otherwise the underlying swapchain will run out of buffers eventually.
|
/// Otherwise the underlying swapchain will run out of buffers eventually.
|
||||||
pub fn frame_submitted(&mut self) -> Result<(), Error> {
|
pub fn frame_submitted(&mut self) -> Result<(), Error> {
|
||||||
|
|
|
@ -46,7 +46,7 @@ extern "system" fn egl_debug_log(
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Loads libEGL symbols, if not loaded already.
|
/// Loads libEGL symbols, if not loaded already.
|
||||||
/// This normally happens automatically during [`EGLDisplay`] initialization.
|
/// This normally happens automatically during [`EGLDisplay`](super::EGLDisplay) initialization.
|
||||||
pub fn make_sure_egl_is_loaded() -> Result<Vec<String>, Error> {
|
pub fn make_sure_egl_is_loaded() -> Result<Vec<String>, Error> {
|
||||||
use std::{
|
use std::{
|
||||||
ffi::{CStr, CString},
|
ffi::{CStr, CString},
|
||||||
|
|
|
@ -7,14 +7,16 @@
|
||||||
//! - Import/Export external resources to/from OpenGL
|
//! - Import/Export external resources to/from OpenGL
|
||||||
//!
|
//!
|
||||||
//! To use this module, you first need to create a [`EGLDisplay`] through a supported EGL platform
|
//! To use this module, you first need to create a [`EGLDisplay`] through a supported EGL platform
|
||||||
//! as indicated by an implementation of the `native::EGLNativeDisplay` trait.
|
//! as indicated by an implementation of the [`native::EGLNativeDisplay`] trait.
|
||||||
//!
|
//!
|
||||||
//! You may bind the [`EGLDisplay`], that shall be used by clients for rendering (so pick one initialized by a fast platform)
|
//! You may bind the [`EGLDisplay`], that shall be used by clients for rendering (so pick one initialized by a fast platform)
|
||||||
//! to the [`wayland_server::Display`] of your compositor. Note only one backend may be bound to any [`Display`](wayland_server::Display) at any time.
|
//! to the [`wayland_server::Display`] of your compositor. Note only one backend may be bound to any [`Display`](wayland_server::Display) at any time.
|
||||||
//!
|
//!
|
||||||
//! You may then use the resulting [`display::EGLBufferReader`] to receive [`EGLBuffer`]
|
//! You may then use the resulting [`display::EGLBufferReader`] to receive [`EGLBuffer`]
|
||||||
//! of an EGL-based [`WlBuffer`](wayland_server::protocol::wl_buffer::WlBuffer) for rendering.
|
//! of an EGL-based [`WlBuffer`](wayland_server::protocol::wl_buffer::WlBuffer) for rendering.
|
||||||
//! Renderers implementing the [`ImportEGL`](crate::backend::renderer::ImportEGL)-trait can manage the buffer reader for you.
|
//! Renderers implementing the [`ImportEgl`](crate::backend::renderer::ImportEgl)-trait can manage the buffer reader for you.
|
||||||
|
//!
|
||||||
|
//! **Note:** The support for binding the [`EGLDisplay`] for use by clients requires the `use_system_lib` cargo feature on Smithay.
|
||||||
//!
|
//!
|
||||||
//! To create OpenGL contexts you may create [`EGLContext`]s from the display and if the context is initialized with a config
|
//! To create OpenGL contexts you may create [`EGLContext`]s from the display and if the context is initialized with a config
|
||||||
//! it may also be used to initialize an [`EGLSurface`], which can be [bound](crate::backend::renderer::Bind) to some renderers.
|
//! it may also be used to initialize an [`EGLSurface`], which can be [bound](crate::backend::renderer::Bind) to some renderers.
|
||||||
|
|
|
@ -91,7 +91,7 @@ pub trait KeyboardKeyEvent<B: InputBackend>: Event<B> {
|
||||||
fn key_code(&self) -> u32;
|
fn key_code(&self) -> u32;
|
||||||
/// State of the key
|
/// State of the key
|
||||||
fn state(&self) -> KeyState;
|
fn state(&self) -> KeyState;
|
||||||
/// Total number of keys pressed on all devices on the associated [`Seat`]
|
/// Total number of keys pressed on all devices on the associated [`Seat`](crate::wayland::seat::Seat)
|
||||||
fn count(&self) -> u32;
|
fn count(&self) -> u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,19 +98,20 @@ impl Transform {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayland-frontend")]
|
#[cfg(feature = "wayland_frontend")]
|
||||||
impl From<wayland_server::protocol::wl_output::Transform> for Transform {
|
impl From<wayland_server::protocol::wl_output::Transform> for Transform {
|
||||||
fn from(transform: wayland_server::protocol::wl_output::Transform) -> Transform {
|
fn from(transform: wayland_server::protocol::wl_output::Transform) -> Transform {
|
||||||
use wayland_server::protocol::wl_output::Transform::*;
|
use wayland_server::protocol::wl_output::Transform as WlTransform;
|
||||||
match transform {
|
match transform {
|
||||||
Normal => Transform::Normal,
|
WlTransform::Normal => Transform::Normal,
|
||||||
_90 => Transform::_90,
|
WlTransform::_90 => Transform::_90,
|
||||||
_180 => Transform::_180,
|
WlTransform::_180 => Transform::_180,
|
||||||
_270 => Transform::_270,
|
WlTransform::_270 => Transform::_270,
|
||||||
Flipped => Transform::Flipped,
|
WlTransform::Flipped => Transform::Flipped,
|
||||||
Flipped90 => Transform::Flipped90,
|
WlTransform::Flipped90 => Transform::Flipped90,
|
||||||
Flipped180 => Transform::Flipped180,
|
WlTransform::Flipped180 => Transform::Flipped180,
|
||||||
Flipped270 => Transform::Flipped270,
|
WlTransform::Flipped270 => Transform::Flipped270,
|
||||||
|
_ => Transform::Normal,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -319,11 +320,12 @@ pub trait ImportEgl: Renderer {
|
||||||
///
|
///
|
||||||
/// ## Errors
|
/// ## Errors
|
||||||
///
|
///
|
||||||
/// This might return [`EglExtensionNotSupported`](Error::EglExtensionNotSupported)
|
/// This might return [`EglExtensionNotSupported`](super::egl::Error::EglExtensionNotSupported)
|
||||||
/// if binding is not supported by the EGL implementation.
|
/// if binding is not supported by the EGL implementation.
|
||||||
///
|
///
|
||||||
/// This might return [`OtherEGLDisplayAlreadyBound`](Error::OtherEGLDisplayAlreadyBound)
|
/// This might return [`OtherEGLDisplayAlreadyBound`](super::egl::Error::OtherEGLDisplayAlreadyBound)
|
||||||
/// if called for the same [`Display`] multiple times, as only one egl display may be bound at any given time.
|
/// if called for the same [`Display`](wayland_server::Display) multiple times, as only one egl
|
||||||
|
/// display may be bound at any given time.
|
||||||
fn bind_wl_display(&mut self, display: &wayland_server::Display) -> Result<(), EglError>;
|
fn bind_wl_display(&mut self, display: &wayland_server::Display) -> Result<(), EglError>;
|
||||||
|
|
||||||
/// Unbinds a previously bound egl display, if existing.
|
/// Unbinds a previously bound egl display, if existing.
|
||||||
|
@ -336,8 +338,8 @@ pub trait ImportEgl: Renderer {
|
||||||
///
|
///
|
||||||
/// The primary use for this is calling [`buffer_dimensions`] or [`buffer_type`].
|
/// The primary use for this is calling [`buffer_dimensions`] or [`buffer_type`].
|
||||||
///
|
///
|
||||||
/// Returns `None` if no [`Display`] was previously bound to the underlying [`EGLDisplay`]
|
/// Returns `None` if no [`Display`](wayland_server::Display) was previously bound to the underlying
|
||||||
/// (see [`ImportEgl::bind_wl_display`]).
|
/// [`EGLDisplay`](super::egl::EGLDisplay) (see [`ImportEgl::bind_wl_display`]).
|
||||||
fn egl_reader(&self) -> Option<&EGLBufferReader>;
|
fn egl_reader(&self) -> Option<&EGLBufferReader>;
|
||||||
|
|
||||||
/// Import a given wl_drm-based buffer into the renderer (see [`buffer_type`]).
|
/// Import a given wl_drm-based buffer into the renderer (see [`buffer_type`]).
|
||||||
|
|
|
@ -22,7 +22,7 @@ use super::{
|
||||||
};
|
};
|
||||||
|
|
||||||
static ZXDG_TOPLEVEL_ROLE: &str = "zxdg_toplevel";
|
static ZXDG_TOPLEVEL_ROLE: &str = "zxdg_toplevel";
|
||||||
static ZXDG_POPUP_ROLE: &str = "zxdg_toplevel";
|
static ZXDG_POPUP_ROLE: &str = "zxdg_popup";
|
||||||
|
|
||||||
pub(crate) fn implement_shell(
|
pub(crate) fn implement_shell(
|
||||||
shell: Main<zxdg_shell_v6::ZxdgShellV6>,
|
shell: Main<zxdg_shell_v6::ZxdgShellV6>,
|
||||||
|
|
Loading…
Reference in New Issue