Struct Display

Source
pub struct Display { /* private fields */ }
Expand description

The X11 display. This is the context object used for the X11 window.

Note: This object is not clonable. Use the reference() method to get a cheap reference to this object.

Implementations§

Source§

impl Display

Source

pub fn new() -> Result<Self, FlutterbugError>

Create a new Display. This will call the XOpenDisplay function and store the result in an Arc. If XOpenDisplay returns null, the UnableToOpenDisplay error is returned instead.

Trait Implementations§

Source§

impl Debug for Display

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Display

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl GenericDisplay for Display

Source§

fn reference(&self) -> DisplayReference

Create a reference to this object.
Source§

fn raw(&self) -> Result<NonNull<Display>, FlutterbugError>

Get the pointer to the raw Display object.
Source§

fn default_screen(&self) -> Result<Screen, FlutterbugError>

Get the default screen for this instance.
Source§

fn visual(&self, screen: Screen) -> Result<*mut Visual, FlutterbugError>

Get the visual for the screen.
Source§

fn default_visual(&self) -> Result<*mut Visual, FlutterbugError>

Get the default visual for the default screen.
Source§

fn black_pixel(&self, screen: Screen) -> Result<Color, FlutterbugError>

Get the black pixel for the screen.
Source§

fn default_black_pixel(&self) -> Result<Color, FlutterbugError>

Get the default black pixel for the default screen.
Source§

fn white_pixel(&self, screen: Screen) -> Result<Color, FlutterbugError>

Get the white pixel for the screen.
Source§

fn default_white_pixel(&self) -> Result<Color, FlutterbugError>

Get the default white pixel for the default screen.
Source§

fn colormap(&self, screen: Screen) -> Result<ColorMap, FlutterbugError>

Get the colormap for the screen.
Source§

fn default_colormap(&self) -> Result<ColorMap, FlutterbugError>

Get the default colormap for the default screen.
Source§

fn gc(&self, screen: Screen) -> Result<GraphicsContext, FlutterbugError>

Get the default graphics context for a screen.
Source§

fn default_gc(&self) -> Result<GraphicsContext, FlutterbugError>

Get the graphics context for the default screen.
Source§

fn create_simple_window( &self, parent: Option<&Window>, origin: Point2D<i32>, size: Size2D<u32>, border_width: u32, border_color: Color, background_color: Color, ) -> Result<Window, FlutterbugError>

Create a simple window from this display.
Source§

fn create_context(&self) -> Result<Context, FlutterbugError>

Create a context using this connection.
Source§

fn internal_atom( &self, name: &str, create_if_exists: bool, ) -> Result<Atom, FlutterbugError>

Get an internal atom based upon its name.
Source§

fn input_method(&self) -> Result<InputMethod, FlutterbugError>

Create a new input method based on this display.
Source§

fn create_image( &self, bounds: Size2D<u32>, depth: u32, data: Vec<c_char>, ) -> Result<Image, FlutterbugError>

Create a new image from this display.
Source§

fn sync(&self, s: bool) -> Result<(), FlutterbugError>

Source§

fn depth(&self, screen: Screen) -> Result<i32, FlutterbugError>

Get the depth for a particular screen.
Source§

fn default_depth(&self) -> Result<i32, FlutterbugError>

Get the depth for the default screen.
Source§

impl PartialEq for Display

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Display

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.