Function x11rb::protocol::xproto::create_gc

source ·
pub fn create_gc<'c, 'input, Conn>(
    conn: &'c Conn,
    cid: Gcontext,
    drawable: Drawable,
    value_list: &'input CreateGCAux,
) -> Result<VoidCookie<'c, Conn>, ConnectionError>
where Conn: RequestConnection + ?Sized,
Expand description

Creates a graphics context.

Creates a graphics context. The graphics context can be used with any drawable that has the same root and depth as the specified drawable.

§Fields

  • cid - The ID with which you will refer to the graphics context, created by xcb_generate_id.
  • drawable - Drawable to get the root/depth from.

§Errors

  • Drawable - The specified drawable (Window or Pixmap) does not exist.
  • Match - TODO: reasons?
  • Font - TODO: reasons?
  • Pixmap - TODO: reasons?
  • Value - TODO: reasons?
  • Alloc - The X server could not allocate the requested resources (no memory?).

§See

  • xcb_generate_id: function