Struct leanshot_xlib::Display [−][src]
pub struct Display { /* fields omitted */ }
A connection to an X server.
Methods
impl Display
[src]
impl Display
pub fn connect(
display_name: impl AsRef<str>
) -> Result<Display, X11Error>
[src]
pub fn connect(
display_name: impl AsRef<str>
) -> Result<Display, X11Error>
Opens a new connection to an X server.
On POSIX-conformant systems, the display name or DISPLAY environment variable can be a string in the format: hostname:number.screen_number
pub fn create_font_cursor(&self, shape: u32) -> Result<Cursor, X11Error>
[src]
pub fn create_font_cursor(&self, shape: u32) -> Result<Cursor, X11Error>
Wrapper around XCreateFontCursor
pub fn next_event(&self) -> Result<Event, X11Error>
[src]
pub fn next_event(&self) -> Result<Event, X11Error>
Get the next event, blocks until an event is reached.
pub fn pending(&self) -> Result<i32, X11Error>
[src]
pub fn pending(&self) -> Result<i32, X11Error>
Returns the number of events that are still pending
pub fn as_raw(&self) -> *mut Display
[src]
pub fn as_raw(&self) -> *mut Display
Gets the raw X Display handle
pub fn default_visual(&self, screen: i32) -> Visual
[src]
pub fn default_visual(&self, screen: i32) -> Visual
Gets the default visual
pub fn get_root_window(&self, screen: i32) -> Result<Window, X11Error>
[src]
pub fn get_root_window(&self, screen: i32) -> Result<Window, X11Error>
Returns the root window for the given screen.
pub fn get_default_root_window(&self) -> Result<Window, X11Error>
[src]
pub fn get_default_root_window(&self) -> Result<Window, X11Error>
Returns the root window for the default screen.
pub fn translate_coordinates(
&self,
w1: Window,
x: i32,
y: i32,
w2: Window
) -> Result<(i32, i32, Option<Window>), X11Error>
[src]
pub fn translate_coordinates(
&self,
w1: Window,
x: i32,
y: i32,
w2: Window
) -> Result<(i32, i32, Option<Window>), X11Error>
Translate coordinates relative to w1 to coordinates relative to w2. If the coordinates are contained in a mapped child of the destination window, the third return value will hold that child window.
pub fn sync(&self, discard: bool)
[src]
pub fn sync(&self, discard: bool)
Sync
pub fn get_input_focus(&self) -> Result<(Window, i32), X11Error>
[src]
pub fn get_input_focus(&self) -> Result<(Window, i32), X11Error>
eturns the focus window and the current focus state.