Struct breadx::display::Display[][src]

pub struct Display<Conn> { /* fields omitted */ }

The connection to the X11 server. Most operations done in breadx revolve around this object in some way, shape or form.

Internally, this acts as a layer of abstraction over the inner Conn object that keeps track of the setup, outgoing and pending requests and replies, the event queue, et cetera. Orthodoxically, X11 usually takes place over a TCP stream or a Unix socket connection; however, Display is able to use any object implementing the Connection trait as a vehicle for the X11 protocol.

Upon its instantiation, the Display sends bytes to the server requesting the setup information, and then stores it for later use. Afterwards, it awaits commands from the programmer to send requests, receive replies or process events.

Example

Open a connection to the X11 server and get the screen resolution.

use breadx::DisplayConnection;

let mut conn = DisplayConnection::create(None, None).unwrap();

let default_screen = conn.default_screen();
println!("Default screen is {} x {}", default_screen.width_in_pixels, default_screen.height_in_pixels);

Implementations

impl<Conn: Connection> Display<Conn>[src]

pub fn get_drawable_geometry<Target: Into<Drawable>>(
    &mut self,
    target: Target
) -> Result<RequestCookie<GetGeometryRequest>>
[src]

Get the geometry of a drawable object.

pub fn get_drawable_geometry_immediate<Target: Into<Drawable>>(
    &mut self,
    target: Target
) -> Result<Geometry>
[src]

Immediately resolve the geometry of a drawable object.

pub fn copy_area<Source: Into<Drawable>, Destination: Into<Drawable>>(
    &mut self,
    source: Source,
    destination: Destination,
    gc: Gcontext,
    src_x: i16,
    src_y: i16,
    width: u16,
    height: u16,
    dest_x: i16,
    dest_y: i16
) -> Result
[src]

Copy pixels from one area of the drawable to another.

pub fn copy_plane<Source: Into<Drawable>, Destination: Into<Drawable>>(
    &mut self,
    source: Source,
    destination: Destination,
    gc: Gcontext,
    src_x: i16,
    src_y: i16,
    width: u16,
    height: u16,
    dest_x: i16,
    dest_y: i16,
    bit_plane: u32
) -> Result
[src]

Copy a plane from one drawable to another.

pub fn create_pixmap<Target: Into<Drawable>>(
    &mut self,
    target: Target,
    width: u16,
    height: u16,
    depth: u8
) -> Result<Pixmap>
[src]

Create a new pixmap.

pub fn put_image<Target: Into<Drawable>, Data: Deref<Target = [u8]>>(
    &mut self,
    target: Target,
    gc: Gcontext,
    image: &Image<Data>,
    src_x: isize,
    src_y: isize,
    dest_x: isize,
    dest_y: isize,
    width: usize,
    height: usize
) -> Result<()>
[src]

Write an image to a drawable.

pub fn create_pixmap_from_image<Target: Clone + Into<Drawable>, Data: Deref<Target = [u8]>>(
    &mut self,
    target: Target,
    image: &Image<Data>
) -> Result<Pixmap>
[src]

Create a pixmap from an image.

impl<Conn: AsyncConnection + Send> Display<Conn>[src]

pub async fn get_drawable_geometry_async<Target: Into<Drawable>>(
    &mut self,
    target: Target
) -> Result<RequestCookie<GetGeometryRequest>>
[src]

Get the geometry of a drawable object, async redox.

pub async fn get_drawable_geometry_immediate_async<Target: Into<Drawable>>(
    &mut self,
    target: Target
) -> Result<Geometry>
[src]

Immediately resolve the geometry of a drawable object, async redox.

pub async fn copy_area_async<Source: Into<Drawable>, Destination: Into<Drawable>>(
    &mut self,
    source: Source,
    destination: Destination,
    gc: Gcontext,
    src_x: i16,
    src_y: i16,
    width: u16,
    height: u16,
    dest_x: i16,
    dest_y: i16
) -> Result
[src]

Copy pixels from one area of the drawable to another, async redox.

pub async fn copy_plane_async<Source: Into<Drawable>, Destination: Into<Drawable>>(
    &mut self,
    source: Source,
    destination: Destination,
    gc: Gcontext,
    src_x: i16,
    src_y: i16,
    width: u16,
    height: u16,
    dest_x: i16,
    dest_y: i16,
    bit_plane: u32
) -> Result
[src]

Copy a plane from one drawable to another, async redox.

pub async fn create_pixmap_async<Target: Into<Drawable>>(
    &mut self,
    target: Target,
    width: u16,
    height: u16,
    depth: u8
) -> Result<Pixmap>
[src]

Create a new pixmap, async redox.

pub async fn put_image_async<Target: Into<Drawable>, Data: Deref<Target = [u8]>>(
    &mut self,
    target: Target,
    gc: Gcontext,
    image: &Image<Data>,
    src_x: isize,
    src_y: isize,
    dest_x: isize,
    dest_y: isize,
    width: usize,
    height: usize
) -> Result<()>
[src]

Write an image to a drawable, async redox.

pub async fn create_pixmap_from_image_async<Target: Clone + Into<Drawable>, Data: Deref<Target = [u8]>>(
    &mut self,
    target: Target,
    image: &Image<Data>
) -> Result<Pixmap>
[src]

Create a pixmap from an image, async redox.

impl<Conn: Connection> Display<Conn>[src]

pub fn query_extension(
    &mut self,
    name: String
) -> Result<RequestCookie<QueryExtensionRequest>>
[src]

Query for extension information.

pub fn query_extension_immediate(&mut self, name: String) -> Result<Extension>[src]

Query for extension information, but resolve immediately. The Error::ExtensionNotPresent error is returned when the extension is not found.

pub fn create_window(
    &mut self,
    parent: Window,
    class: WindowClass,
    depth: Option<u8>,
    visual: Option<Visualid>,
    x: i16,
    y: i16,
    width: u16,
    height: u16,
    border_width: u16,
    props: WindowParameters
) -> Result<Window>
[src]

Create a new window.

pub fn create_simple_window(
    &mut self,
    parent: Window,
    x: i16,
    y: i16,
    width: u16,
    height: u16,
    border_width: u16,
    border: u32,
    background: u32
) -> Result<Window>
[src]

Create a window, but assume some parameters from its parents.

pub fn create_gc<Target: Into<Drawable>>(
    &mut self,
    target: Target,
    props: GcParameters
) -> Result<Gcontext>
[src]

Create a new graphics context for the specified target.

pub fn intern_atom(
    &mut self,
    name: String,
    only_if_exists: bool
) -> Result<RequestCookie<InternAtomRequest>>
[src]

Intern a string and get a corresponding atom for that string.

pub fn intern_atom_immediate(
    &mut self,
    name: String,
    only_if_exists: bool
) -> Result<Atom>
[src]

Intern an atom, but try to resolve the request immediately.

pub fn change_keyboard_control(&mut self, props: KbParameters) -> Result<()>[src]

Change the keyboard's control properties.

pub fn bell(&mut self, percent: i8) -> Result[src]

pub fn set_access_control(&mut self, mode: AccessControl) -> Result[src]

pub fn change_active_pointer_grab(
    &mut self,
    event_mask: EventMask,
    cursor: Cursor,
    time: Option<Timestamp>
) -> Result
[src]

pub fn set_close_down_mode(&mut self, mode: CloseDown) -> Result[src]

pub fn change_pointer_control(
    &mut self,
    accel_numerator: i16,
    accel_denominator: i16,
    threshold: i16,
    do_acceleration: bool,
    do_threshold: bool
) -> Result
[src]

pub fn create_cursor(
    &mut self,
    source: Pixmap,
    mask: Pixmap,
    fg_red: u16,
    fg_green: u16,
    fg_blue: u16,
    bg_red: u16,
    bg_green: u16,
    bg_blue: u16,
    x: u16,
    y: u16
) -> Result<Cursor>
[src]

Create a new cursor.

pub fn force_screensaver(&mut self, mode: ScreenSaver) -> Result[src]

pub fn send_event(
    &mut self,
    target: Window,
    mask: EventMask,
    event: Event
) -> Result
[src]

Send an event to the X server.

pub fn create_colormap(
    &mut self,
    window: Window,
    visual: Visualid,
    alloc: ColormapAlloc
) -> Result<Colormap>
[src]

Create a new colormap.

pub fn get_keyboard_mapping(
    &mut self
) -> Result<RequestCookie<GetKeyboardMappingRequest>>
[src]

Get the keyboard mapping for this display.

pub fn get_keyboard_mapping_immediate(&mut self) -> Result<KeyboardMapping>[src]

Immediately get the keyboard mapping for this display.

pub fn get_modifier_mapping(
    &mut self
) -> Result<RequestCookie<GetModifierMappingRequest>>
[src]

Get the modifier mapping for this display.

pub fn get_modifier_mapping_immediate(&mut self) -> Result<ModifierMapping>[src]

Immediately get the modifier mapping for this display.

impl<Conn: AsyncConnection + Send> Display<Conn>[src]

pub async fn query_extension_async(
    &mut self,
    name: String
) -> Result<RequestCookie<QueryExtensionRequest>>
[src]

Query for extension information, async redox.

pub async fn query_extension_immediate_async(
    &mut self,
    name: String
) -> Result<Extension>
[src]

Query for extension information, but resolve immediately, async redox . The Error::ExtensionNotPresent error is returned when the extension is not found.

pub async fn create_window_async(
    &mut self,
    parent: Window,
    class: WindowClass,
    depth: Option<u8>,
    visual: Option<Visualid>,
    x: i16,
    y: i16,
    width: u16,
    height: u16,
    border_width: u16,
    props: WindowParameters
) -> Result<Window>
[src]

Create a new window, async redox.

pub async fn create_simple_window_async(
    &mut self,
    parent: Window,
    x: i16,
    y: i16,
    width: u16,
    height: u16,
    border_width: u16,
    border: u32,
    background: u32
) -> Result<Window>
[src]

Create a window, but assume some parameters from its parents, async redox.

pub async fn create_gc_async<Target: Into<Drawable>>(
    &mut self,
    target: Target,
    props: GcParameters
) -> Result<Gcontext>
[src]

Create a new graphics context, async redox.

pub async fn intern_atom_async(
    &mut self,
    name: String,
    only_if_exists: bool
) -> Result<RequestCookie<InternAtomRequest>>
[src]

Intern a string and get a corresponding atom for that string, async redox.

pub async fn intern_atom_immediate_async(
    &mut self,
    name: String,
    only_if_exists: bool
) -> Result<Atom>
[src]

Intern an atom, but try to resolve the request immediately, async redox.

pub async fn change_keyboard_control_async(
    &mut self,
    props: KbParameters
) -> Result<()>
[src]

Change the keyboard's control properties, async redox.

pub async fn bell_async(&mut self, percent: i8) -> Result[src]

pub async fn set_access_control_async(&mut self, mode: AccessControl) -> Result[src]

pub async fn change_active_pointer_grab_async(
    &mut self,
    event_mask: EventMask,
    cursor: Cursor,
    time: Option<Timestamp>
) -> Result
[src]

pub async fn set_close_down_mode_async(&mut self, mode: CloseDown) -> Result[src]

pub async fn change_pointer_control_async(
    &mut self,
    accel_numerator: i16,
    accel_denominator: i16,
    threshold: i16,
    do_acceleration: bool,
    do_threshold: bool
) -> Result
[src]

pub async fn create_cursor_async(
    &mut self,
    source: Pixmap,
    mask: Pixmap,
    fg_red: u16,
    fg_green: u16,
    fg_blue: u16,
    bg_red: u16,
    bg_green: u16,
    bg_blue: u16,
    x: u16,
    y: u16
) -> Result<Cursor>
[src]

Create a new cursor, async redox.

pub async fn force_screensaver_async(&mut self, mode: ScreenSaver) -> Result[src]

pub async fn send_event_async(
    &mut self,
    target: Window,
    mask: EventMask,
    event: Event
) -> Result
[src]

Send an event to the X server, async redox.

pub async fn create_colormap_async(
    &mut self,
    window: Window,
    visual: Visualid,
    alloc: ColormapAlloc
) -> Result<Colormap>
[src]

Create a new colormap, async redox.

pub async fn get_keyboard_mapping_async(
    &mut self
) -> Result<RequestCookie<GetKeyboardMappingRequest>>
[src]

Get the keyboard mapping for this display, async redox.

pub async fn get_keyboard_mapping_immediate_async(
    &mut self
) -> Result<KeyboardMapping>
[src]

Immediately get the keyboard mapping for this display, async redox.

pub async fn get_modifier_mapping_async(
    &mut self
) -> Result<RequestCookie<GetModifierMappingRequest>>
[src]

Get the modifier mapping for this display, async redox.

pub async fn get_modifier_mapping_immediate_async(
    &mut self
) -> Result<ModifierMapping>
[src]

Immediately get the modifier mapping for this display.

impl<Conn: Connection> Display<Conn>[src]

pub fn open_dri3<Target: Into<Drawable>>(
    &mut self,
    drawable: Target,
    provider: u32
) -> Result<RequestCookie<OpenRequest>>
[src]

Open the DRI3 interface.

pub fn open_dri3_immediate<Target: Into<Drawable>>(
    &mut self,
    drawable: Target,
    provider: u32
) -> Result<c_int>
[src]

pub fn query_dri3_version(
    &mut self,
    major: u32,
    minor: u32
) -> Result<RequestCookie<QueryVersionRequest>>
[src]

pub fn query_dri3_version_immediate(
    &mut self,
    major: u32,
    minor: u32
) -> Result<ExtensionVersion>
[src]

pub fn get_supported_modifiers(
    &mut self,
    window: u32,
    depth: u8,
    bpp: u8
) -> Result<RequestCookie<GetSupportedModifiersRequest>>
[src]

pub fn get_supported_modifiers_immediate(
    &mut self,
    window: u32,
    depth: u8,
    bpp: u8
) -> Result<Modifiers>
[src]

pub fn pixmap_from_buffers(
    &mut self,
    window: Window,
    width: u16,
    height: u16,
    depth: u8,
    strides: [u32; 4],
    offsets: [u32; 4],
    bpp: u8,
    modifier: u64,
    mut fds: Vec<Fd>
) -> Result<Pixmap>
[src]

pub fn pixmap_from_buffer(
    &mut self,
    drawable: Drawable,
    size: u32,
    width: u16,
    height: u16,
    stride: u16,
    depth: u8,
    bpp: u8,
    fd: Fd
) -> Result<Pixmap>
[src]

pub fn fence_from_fd(
    &mut self,
    drawable: Drawable,
    initially_triggered: bool,
    fence_fd: Fd
) -> Result<Fence>
[src]

pub fn buffer_from_pixmap(
    &mut self,
    pixmap: Pixmap
) -> Result<RequestCookie<BufferFromPixmapRequest>>
[src]

pub fn buffer_from_pixmap_immediate(
    &mut self,
    pixmap: Pixmap
) -> Result<BufferFromPixmapReply>
[src]

pub fn buffers_from_pixmap(
    &mut self,
    pixmap: Pixmap
) -> Result<RequestCookie<BuffersFromPixmapRequest>>
[src]

pub fn buffers_from_pixmap_immediate(
    &mut self,
    pixmap: Pixmap
) -> Result<BuffersFromPixmapReply>
[src]

impl<Conn: AsyncConnection + Send> Display<Conn>[src]

pub async fn open_dri3_async<Target: Into<Drawable>>(
    &mut self,
    drawable: Target,
    provider: u32
) -> Result<RequestCookie<OpenRequest>>
[src]

pub async fn open_dri3_immediate_async<Target: Into<Drawable>>(
    &mut self,
    drawable: Target,
    provider: u32
) -> Result<c_int>
[src]

pub async fn query_dri3_version_async(
    &mut self,
    major: u32,
    minor: u32
) -> Result<RequestCookie<QueryVersionRequest>>
[src]

pub async fn query_dri3_version_immediate_async(
    &mut self,
    major: u32,
    minor: u32
) -> Result<ExtensionVersion>
[src]

pub async fn get_supported_modifiers_async(
    &mut self,
    window: u32,
    depth: u8,
    bpp: u8
) -> Result<RequestCookie<GetSupportedModifiersRequest>>
[src]

pub async fn get_supported_modifiers_immediate_async(
    &mut self,
    window: u32,
    depth: u8,
    bpp: u8
) -> Result<Modifiers>
[src]

pub async fn pixmap_from_buffers_async(
    &mut self,
    window: Window,
    width: u16,
    height: u16,
    strides: [u32; 4],
    offsets: [u32; 4],
    depth: u8,
    bpp: u8,
    modifier: u64,
    fds: Vec<Fd>
) -> Result<Pixmap>
[src]

pub async fn pixmap_from_buffer_async(
    &mut self,
    drawable: Drawable,
    size: u32,
    width: u16,
    height: u16,
    stride: u16,
    depth: u8,
    bpp: u8,
    fd: Fd
) -> Result<Pixmap>
[src]

pub async fn fence_from_fd_async(
    &mut self,
    drawable: Drawable,
    initially_triggered: bool,
    fence_fd: Fd
) -> Result<Fence>
[src]

pub async fn buffer_from_pixmap_async(
    &mut self,
    pixmap: Pixmap
) -> Result<RequestCookie<BufferFromPixmapRequest>>
[src]

pub async fn buffer_from_pixmap_immediate_async(
    &mut self,
    pixmap: Pixmap
) -> Result<BufferFromPixmapReply>
[src]

pub async fn buffers_from_pixmap_async(
    &mut self,
    pixmap: Pixmap
) -> Result<RequestCookie<BuffersFromPixmapRequest>>
[src]

pub async fn buffers_from_pixmap_immediate_async(
    &mut self,
    pixmap: Pixmap
) -> Result<BuffersFromPixmapReply>
[src]

impl<Conn: Connection> Display<Conn>[src]

pub fn query_glx_version(
    &mut self,
    required_major: u32,
    required_minor: u32
) -> Result<RequestCookie<QueryVersionRequest>>
[src]

Query GLX version.

pub fn query_glx_version_immediate(
    &mut self,
    required_major: u32,
    required_minor: u32
) -> Result<(u32, u32)>
[src]

Immediately query GLX version.

pub fn get_visual_configs(
    &mut self,
    screen: usize
) -> Result<RequestCookie<GetVisualConfigsRequest>>
[src]

Get the visual configurations associated with the given screen.

pub fn get_visual_configs_immediate(&mut self, screen: usize) -> Result<Configs>[src]

Immediately get the visual configurations associated with the given screen.

pub fn get_fb_configs(
    &mut self,
    screen: usize
) -> Result<RequestCookie<GetFbConfigsRequest>>
[src]

Get the framebuffer configurations associated with the given screen.

pub fn get_fb_configs_immediate(&mut self, screen: usize) -> Result<Configs>[src]

Immediately get the framebuffer configurations associated with the given screen.

pub fn get_drawable_properties(
    &mut self,
    drawable: Drawable
) -> Result<RequestCookie<GetDrawableAttributesRequest>>
[src]

Get the properties of a GLX drawable.

pub fn get_drawable_properties_immediate(
    &mut self,
    drawable: Drawable
) -> Result<Vec<u32>>
[src]

Immediately get the properties of a GLX drawable.

pub fn create_context_attribs_arb(
    &mut self,
    fbconfig: Fbconfig,
    screen: usize,
    share_list: Context,
    is_direct: bool,
    attribs: Vec<u32>
) -> Result<Context>
[src]

pub fn swap_buffers<Target: Into<Drawable>>(
    &mut self,
    context_tag: ContextTag,
    drawable: Target
) -> Result
[src]

Swap buffers.

impl<Conn: AsyncConnection + Send> Display<Conn>[src]

pub async fn query_glx_version_async(
    &mut self,
    required_major: u32,
    required_minor: u32
) -> Result<RequestCookie<QueryVersionRequest>>
[src]

Query GLX version, async redox.

pub async fn get_visual_configs_async(
    &mut self,
    screen: usize
) -> Result<RequestCookie<GetVisualConfigsRequest>>
[src]

Get the visual configurations associated with the given screen, async redox.

pub async fn get_visual_configs_immediate_async(
    &mut self,
    screen: usize
) -> Result<Configs>
[src]

Immediately get the visual configurations associated with the given screen, async redox.

pub async fn get_fb_configs_async(
    &mut self,
    screen: usize
) -> Result<RequestCookie<GetFbConfigsRequest>>
[src]

Get the framebuffer configurations associated with the given screen, async redox.

pub async fn get_fb_configs_immediate_async(
    &mut self,
    screen: usize
) -> Result<Configs>
[src]

Immediately get the framebuffer configurations associated with the given screen, async redox.

pub async fn get_drawable_properties_async(
    &mut self,
    drawable: Drawable
) -> Result<RequestCookie<GetDrawableAttributesRequest>>
[src]

Get the properties of a GLX drawable, async redox.

pub async fn query_glx_version_immediate_async(
    &mut self,
    required_major: u32,
    required_minor: u32
) -> Result<(u32, u32)>
[src]

Immediately query GLX version, async redox.

pub async fn get_drawable_properties_immediate_async(
    &mut self,
    drawable: Drawable
) -> Result<Vec<u32>>
[src]

Immediately get the properties of a GLX drawable, async redox.

pub async fn create_context_attribs_arb_async(
    &mut self,
    fbconfig: Fbconfig,
    screen: usize,
    share_list: Context,
    is_direct: bool,
    attribs: Vec<u32>
) -> Result<Context>
[src]

pub async fn swap_buffers_async<Target: Into<Drawable>>(
    &mut self,
    context_tag: ContextTag,
    drawable: Target
) -> Result
[src]

Swap buffers, async redox.

impl<Conn: Connection> Display<Conn>[src]

pub fn query_present_version(
    &mut self,
    major: u32,
    minor: u32
) -> Result<RequestCookie<QueryVersionRequest>>
[src]

pub fn query_present_version_immediate(
    &mut self,
    major: u32,
    minor: u32
) -> Result<ExtensionVersion>
[src]

pub fn present_capabilities<Target: Into<Drawable>>(
    &mut self,
    drawable: Target
) -> Result<RequestCookie<QueryCapabilitiesRequest>>
[src]

pub fn present_capabilities_immediate<Target: Into<Drawable>>(
    &mut self,
    drawable: Target
) -> Result<u32>
[src]

pub fn present_select_input(
    &mut self,
    eid: XID,
    window: Window,
    em: EventMask
) -> Result<()>
[src]

pub fn present_pixmap(
    &mut self,
    window: Window,
    pixmap: Pixmap,
    serial: u32,
    valid: Region,
    update: Region,
    xoff: i16,
    yoff: i16,
    target_crtc: Crtc,
    wait_fence: Fence,
    idle_fence: Fence,
    options: u32,
    target_msc: u64,
    divisor: u64,
    remainder: u64,
    notifies: Vec<Notify>
) -> Result
[src]

impl<Conn: AsyncConnection + Send> Display<Conn>[src]

pub async fn query_present_version_async(
    &mut self,
    major: u32,
    minor: u32
) -> Result<RequestCookie<QueryVersionRequest>>
[src]

pub async fn query_present_version_immediate_async(
    &mut self,
    major: u32,
    minor: u32
) -> Result<ExtensionVersion>
[src]

pub async fn present_capabilities_async<Target: Into<Drawable>>(
    &mut self,
    drawable: Target
) -> Result<RequestCookie<QueryCapabilitiesRequest>>
[src]

pub async fn present_capabilities_immediate_async<Target: Into<Drawable>>(
    &mut self,
    drawable: Target
) -> Result<u32>
[src]

pub async fn present_select_input_async(
    &mut self,
    eid: XID,
    window: Window,
    em: EventMask
) -> Result<()>
[src]

pub async fn present_pixmap_async(
    &mut self,
    window: Window,
    pixmap: Pixmap,
    serial: u32,
    valid: Region,
    update: Region,
    xoff: i16,
    yoff: i16,
    target_crtc: Crtc,
    wait_fence: Fence,
    idle_fence: Fence,
    options: u32,
    target_msc: u64,
    divisor: u64,
    remainder: u64,
    notifies: Vec<Notify>
) -> Result
[src]

impl<Conn: Connection> Display<Conn>[src]

pub fn trigger_fence(&mut self, fence: Fence) -> Result[src]

pub fn free_sync_fence(&mut self, fence: Fence) -> Result[src]

impl<Conn: AsyncConnection + Send> Display<Conn>[src]

pub async fn trigger_fence_async(&mut self, fence: Fence) -> Result[src]

pub async fn free_sync_fence_async(&mut self, fence: Fence) -> Result[src]

impl<Conn: Connection> Display<Conn>[src]

pub fn create_region(&mut self, rectangles: Vec<Rectangle>) -> Result<Region>[src]

impl<Conn: AsyncConnection + Send> Display<Conn>[src]

pub async fn create_region_async(
    &mut self,
    rectangles: Vec<Rectangle>
) -> Result<Region>
[src]

impl<Conn: Connection> Display<Conn>[src]

pub fn send_request_internal<R: Request>(
    &mut self,
    mut req: R,
    discard_reply: bool
) -> Result<RequestCookie<R>>
[src]

impl<Conn: AsyncConnection + Send> Display<Conn>[src]

pub async fn send_request_internal_async<R: Request>(
    &mut self,
    req: R,
    discard_reply: bool
) -> Result<RequestCookie<R>>
[src]

impl<Conn> Display<Conn>[src]

pub fn register_special_event(&mut self, eid: XID)[src]

Register a queue for special events in the display.

pub fn unregister_special_event(&mut self, eid: XID)[src]

Unregister for a special event.

pub fn get_special_event(&mut self, eid: XID) -> Option<Event>[src]

Try to get a special event without waiting for it.

pub fn get_special_events(
    &mut self,
    eid: XID
) -> impl Iterator<Item = Event> + '_
[src]

Try to get special events without waiting for them.

pub fn generate_xid(&mut self) -> Result<XID>[src]

Generate a unique X ID for a window, colormap, or other object. Usually, Display's helper functions will generate this for you. If you'd like to circumvent them, this will generate ID's for you.

pub fn setup(&self) -> &Setup[src]

Get the setup associates with this display.

pub fn default_root(&self) -> Window[src]

pub fn screens(&self) -> &[Screen]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn default_screen_index(&self) -> usize[src]

pub fn default_screen(&self) -> &Screen[src]

pub fn default_white_pixel(&self) -> u32[src]

pub fn default_black_pixel(&self) -> u32[src]

pub fn default_visual_id(&self) -> Visualid[src]

pub fn default_visual(&self) -> &Visualtype[src]

pub fn default_colormap(&self) -> Colormap[src]

pub fn visual_id_to_visual(&self, id: Visualid) -> Option<&Visualtype>[src]

Get a visual type from a visual ID.

pub fn depth_of_visual(&self, id: Visualid) -> Option<u8>[src]

Get the depth of the specified visual ID.

pub fn check_if_event<F: FnMut(&Event) -> bool>(&self, predicate: F) -> bool[src]

If there is an event currently in the queue that matches the predicate, returns true.

pub fn set_checked(&mut self, checked: bool)[src]

Set whether or not to synchronize the display after every void request to check for errors. Turning this off improves speed, but makes it difficult to match errors to certain calls. This is on by default.

pub fn checked(&self) -> bool[src]

impl<Conn: Connection> Display<Conn>[src]

pub fn synchronize(&mut self) -> Result[src]

Forces the server to synchronize itself and send all packets. This is done by sending a GetInputFocusRequest to the server and discarding the reply. Once we're sure we've received the discarded GetInputFocusReply, we know we've successfully emptied the pending_requests array.

pub fn send_request<R: Request>(&mut self, req: R) -> Result<RequestCookie<R>>[src]

Send a request object to the X11 server.

Given a request object, this function sends it across the connection to the X11 server and returns a cookie used to determine when this request will resolve. Usually, the Display object has functions that act as a wrapper around this object; however, if you'd like to circumvent those, this is usually the best option.

pub fn resolve_request<R: Request>(
    &mut self,
    token: RequestCookie<R>
) -> Result<R::Reply> where
    R::Reply: Default
[src]

Wait for a request from the X11 server.

This function checks the Display's queues to see if a reply matching the given RequestCookie has been processed by the X11 server. If not, it polls the server for new events until it has determined that the request has resolved.

pub fn wait_for_special_event(&mut self, eid: XID) -> Result<Event>[src]

Wait for a special event.

pub fn from_connection(connection: Conn, auth: Option<AuthInfo>) -> Result<Self>[src]

Creates a new Display from a connection and authentication info.

It is expected that the connection passed in has not had any information sent into it aside from what is necessary for the underlying protocol. After the object is created, the Display will poll the server for setup information.

pub fn wait_for_event(&mut self) -> Result<Event>[src]

Wait for an event to be generated by the X server.

This checks the event queue for a new event. If the queue is empty, the Display will poll the server for new events.

impl<Conn: AsyncConnection + Send> Display<Conn>[src]

pub fn synchronize_async<'future>(
    &'future mut self
) -> Pin<Box<dyn Future<Output = Result> + Send + 'future>>
[src]

Forces the server to synchronize itself, async redox.

pub fn send_request_async<'future, R: Request + Send + 'future>(
    &'future mut self,
    req: R
) -> Pin<Box<dyn Future<Output = Result<RequestCookie<R>>> + Send + 'future>>
[src]

Send a request object to the X11 server, async redox. See the send_request function for more information.

pub async fn resolve_request_async<R: Request>(
    &mut self,
    token: RequestCookie<R>
) -> Result<R::Reply> where
    R::Reply: Default
[src]

Wait for a request from the X11 server, async redox. See the resolve_request function for more information.

pub async fn wait_for_special_event_async(&mut self, eid: XID) -> Result<Event>[src]

Wait for a special event, async redox.

pub async fn from_connection_async(
    connection: Conn,
    auth: Option<AuthInfo>
) -> Result<Self>
[src]

Creates a new Display from a connection and authentication info, async redox. See the from_connection function for more information.

pub async fn wait_for_event_async(&mut self) -> Result<Event>[src]

Wait for an event to be generated by the X server, async redox. See the wait_for_event function for more information.

impl Display<NameConnection>[src]

pub fn create(
    name: Option<Cow<'_, str>>,
    auth_info: Option<AuthInfo>
) -> Result<Self>
[src]

Create a new connection to the X server, given an optional name and authorization information.

impl Display<AsyncNameConnection>[src]

pub async fn create_async(
    name: Option<Cow<'_, str>>,
    auth_info: Option<AuthInfo>
) -> Result<Self>
[src]

Create a new connection to the X server, given an optional name and authorization information, async redox.

Trait Implementations

impl<Conn: Debug> Debug for Display<Conn>[src]

impl<Conn> DisplayLike for Display<Conn>[src]

type Connection = Conn

Auto Trait Implementations

impl<Conn> RefUnwindSafe for Display<Conn> where
    Conn: RefUnwindSafe
[src]

impl<Conn> Send for Display<Conn> where
    Conn: Send
[src]

impl<Conn> Sync for Display<Conn> where
    Conn: Sync
[src]

impl<Conn> Unpin for Display<Conn> where
    Conn: Unpin
[src]

impl<Conn> UnwindSafe for Display<Conn> where
    Conn: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.