[−][src]Struct wlroots::compositor::Builder
Methods
impl Builder
[src]
impl Builder
pub fn new() -> Self
[src]
pub fn new() -> Self
Make a new compositor builder.
Unless otherwise noted, each option is false
/None
.
Panicking
There can only be one compositor::Builder
per process. If you construct
a compositor::Builder
with any of the build
operations then another
compositor::Builder
cannot be constructed until the built Compositor
is dropped.
This requirement is enforced by a check that will panic if this constraint is broken. This applies across threads.
pub fn compositor_events(self, compositor_event_builder: EventBuilder) -> Self
[src]
pub fn compositor_events(self, compositor_event_builder: EventBuilder) -> Self
Set callbacks for miscellaneous compositor events.
pub fn input_manager(self, input_manager_builder: Builder) -> Self
[src]
pub fn input_manager(self, input_manager_builder: Builder) -> Self
Set callbacks for managing input resources.
pub fn output_manager(self, output_manager_builder: Builder) -> Self
[src]
pub fn output_manager(self, output_manager_builder: Builder) -> Self
Set callbacks for managing output resources.
pub fn xdg_shell_manager(self, xdg_shell_manager_builder: Builder) -> Self
[src]
pub fn xdg_shell_manager(self, xdg_shell_manager_builder: Builder) -> Self
Set callbacks for managing XDG shell resources.
pub fn xdg_shell_v6_manager(self, xdg_v6_shell_manager_builder: Builder) -> Self
[src]
pub fn xdg_shell_v6_manager(self, xdg_v6_shell_manager_builder: Builder) -> Self
Set callbacks for managing XDG shell v6 resources.
pub fn wl_shm(self, wl_shm: bool) -> Self
[src]
pub fn wl_shm(self, wl_shm: bool) -> Self
Decide whether or not to enable the wl_shm global.
This is used to allocate shared memory between clients and the compositor.
pub fn data_device(self, data_device_manager: bool) -> Self
[src]
pub fn data_device(self, data_device_manager: bool) -> Self
Decide whether or not to enable the data device manager.
This is used to do DnD, or "drag 'n drop" copy paste.
pub fn gles2(self, gles2_renderer: bool) -> Self
[src]
pub fn gles2(self, gles2_renderer: bool) -> Self
Decide whether or not to enable the GLES2 extension.
pub fn server_decoration_manager(self, server_decoration_manager: bool) -> Self
[src]
pub fn server_decoration_manager(self, server_decoration_manager: bool) -> Self
Decide whether or not to enable the server decoration manager protocol extension.
pub fn gamma_control_manager(self, gamma_control_manager: bool) -> Self
[src]
pub fn gamma_control_manager(self, gamma_control_manager: bool) -> Self
Decide whether or not to enable the gamma control manager protocol extension.
pub fn screenshooter(self, screenshooter: bool) -> Self
[src]
pub fn screenshooter(self, screenshooter: bool) -> Self
Decide whether or not to enable the screenshooter protocol extension.
pub fn xwayland(self, xwayland: Builder) -> Self
[src]
pub fn xwayland(self, xwayland: Builder) -> Self
Set callbacks for managing XDG shell v6 resources.
If this function is not called then the xwayland server does not run.
pub fn custom_terminate(self, terminate: fn()) -> Self
[src]
pub fn custom_terminate(self, terminate: fn()) -> Self
Add a custom function to run when shutting down the compositor or whenever a function in a callback panics.
pub unsafe fn render_setup_function(
self,
func: UnsafeRenderSetupFunction
) -> Self
[src]
pub unsafe fn render_setup_function(
self,
func: UnsafeRenderSetupFunction
) -> Self
Give an unsafe function to setup the renderer instead of the default renderer.
pub fn build_auto<D>(self, data: D) -> Compositor where
D: Any + 'static,
[src]
pub fn build_auto<D>(self, data: D) -> Compositor where
D: Any + 'static,
Makes a new compositor that handles the setup of the graphical backend (e.g, Wayland, X11, or DRM).
Also automatically opens the socket for clients to communicate to the compositor with.
pub fn wayland_remote(self, remote: String) -> Self
[src]
pub fn wayland_remote(self, remote: String) -> Self
Set the name of the Wayland remote socket to connect to when using the Wayland backend.
(e.g. wayland-0
, which is usually the default).
pub fn x11_display(self, remote: String) -> Self
[src]
pub fn x11_display(self, remote: String) -> Self
Set the name of the X11 display socket to be used to connect to a running X11 instance for the backend.
pub fn build_x11<D>(self, data: D) -> Compositor where
D: Any + 'static,
[src]
pub fn build_x11<D>(self, data: D) -> Compositor where
D: Any + 'static,
pub fn build_wayland<D>(self, data: D) -> Compositor where
D: Any + 'static,
[src]
pub fn build_wayland<D>(self, data: D) -> Compositor where
D: Any + 'static,
Creates the compositor using an already running Wayland instance as a backend.
The instance starts with no outputs.
pub unsafe fn build_drm<D>(
self,
data: D,
session: Session,
gpu_fd: c_int,
parent: Option<Drm>
) -> Compositor where
D: Any + 'static,
[src]
pub unsafe fn build_drm<D>(
self,
data: D,
session: Session,
gpu_fd: c_int,
parent: Option<Drm>
) -> Compositor where
D: Any + 'static,
pub fn build_headless<D>(self, data: D) -> Compositor where
D: Any + 'static,
[src]
pub fn build_headless<D>(self, data: D) -> Compositor where
D: Any + 'static,
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more