[−][src]Trait flutterbug::GenericDisplay
This trait is applied to both Display and DisplayReference to ensure you can do the same things with both.
Note: All methods return a Result<T, FlutterbugError> since upgrading the reference to a full object can generate an error if the real Display is already dropped.
Required methods
fn reference(&self) -> DisplayReference
Create a reference to this object.
fn raw(&self) -> Result<NonNull<Display>, FlutterbugError>
Get the pointer to the raw Display object.
Provided methods
fn default_screen(&self) -> Result<Screen, FlutterbugError>
Get the default screen for this instance.
fn visual(&self, screen: Screen) -> Result<*mut Visual, FlutterbugError>
Get the visual for the screen.
fn default_visual(&self) -> Result<*mut Visual, FlutterbugError>
Get the default visual for the default screen.
fn black_pixel(&self, screen: Screen) -> Result<Color, FlutterbugError>
Get the black pixel for the screen.
fn default_black_pixel(&self) -> Result<Color, FlutterbugError>
Get the default black pixel for the default screen.
fn white_pixel(&self, screen: Screen) -> Result<Color, FlutterbugError>
Get the white pixel for the screen.
fn default_white_pixel(&self) -> Result<Color, FlutterbugError>
Get the default white pixel for the default screen.
fn colormap(&self, screen: Screen) -> Result<ColorMap, FlutterbugError>
Get the colormap for the screen.
fn default_colormap(&self) -> Result<ColorMap, FlutterbugError>
Get the default colormap for the default screen.
fn gc(&self, screen: Screen) -> Result<GraphicsContext, FlutterbugError>
Get the default graphics context for a screen.
fn default_gc(&self) -> Result<GraphicsContext, FlutterbugError>
Get the graphics context for the default screen.
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>
&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.
fn create_context(&self) -> Result<Context, FlutterbugError>
Create a context using this connection.
fn internal_atom(
&self,
name: &str,
create_if_exists: bool
) -> Result<Atom, FlutterbugError>
&self,
name: &str,
create_if_exists: bool
) -> Result<Atom, FlutterbugError>
Get an internal atom based upon its name.
fn input_method(&self) -> Result<InputMethod, FlutterbugError>
Create a new input method based on this display.
fn create_image(
&self,
bounds: Size2D<u32>,
depth: u32,
data: Vec<c_char>
) -> Result<Image, FlutterbugError>
&self,
bounds: Size2D<u32>,
depth: u32,
data: Vec<c_char>
) -> Result<Image, FlutterbugError>
Create a new image from this display.
fn sync(&self, s: bool) -> Result<(), FlutterbugError>
fn depth(&self, screen: Screen) -> Result<i32, FlutterbugError>
Get the depth for a particular screen.
fn default_depth(&self) -> Result<i32, FlutterbugError>
Get the depth for the default screen.