Next: , Previous: Cairo Interaction, Up: Top


28 X Window System Interaction

X backend-specific functions

28.1 Overview

28.2 Usage

— Function: gdk-pixmap-foreign-new-for-display (display <gdk-display>) (anid unsigned-long) ⇒  (ret <gdk-pixmap>)

Wraps a native pixmap in a <gdk-pixmap>. This may fail if the pixmap has been destroyed.

For example in the X backend, a native pixmap handle is an Xlib <xid>.

display
The <gdk-display> where anid is located.
anid
a native pixmap handle.
ret
the newly-created <gdk-pixmap> wrapper for the native pixmap or ‘#f’ if the pixmap has been destroyed.

Since 2.2

— Function: gdk-pixmap-foreign-new-for-screen (screen <gdk-screen>) (anid unsigned-long) (width int) (height int) (depth int) ⇒  (ret <gdk-pixmap>)

Wraps a native pixmap in a <gdk-pixmap>. This may fail if the pixmap has been destroyed.

For example in the X backend, a native pixmap handle is an Xlib <xid>.

This function is an alternative to gdk-pixmap-foreign-new-for-display for cases where the dimensions of the pixmap are known. For the X backend, this avoids a roundtrip to the server.

screen
a <gdk-screen>
anid
a native pixmap handle
width
the width of the pixmap identified by anid
height
the height of the pixmap identified by anid
depth
the depth of the pixmap identified by anid
ret
the newly-created <gdk-pixmap> wrapper for the native pixmap or ‘#f’ if the pixmap has been destroyed.

Since 2.10

— Function: gdk-window-foreign-new-for-display (display <gdk-display>) (anid unsigned-long) ⇒  (ret <gdk-window>)

Wraps a native window in a <gdk-window>. This may fail if the window has been destroyed. If the window was already known to GDK, a new reference to the existing <gdk-window> is returned.

For example in the X backend, a native window handle is an Xlib <xid>.

display
the <gdk-display> where the window handle comes from.
anid
a native window handle.
ret
a <gdk-window> wrapper for the native window or ‘#f’ if the window has been destroyed. The wrapper will be newly created, if one doesn't exist already.

Since 2.2

— Function: gdk-window-lookup (anid unsigned-long) ⇒  (ret <gdk-window>)

Looks up the <gdk-window> that wraps the given native window handle.

For example in the X backend, a native window handle is an Xlib <xid>.

anid
a native window handle.
ret
the <gdk-window> wrapper for the native window, or ‘#f’ if there is none.
— Function: gdk-pixmap-lookup (anid unsigned-long) ⇒  (ret <gdk-pixmap>)

Looks up the <gdk-pixmap> that wraps the given native pixmap handle.

For example in the X backend, a native pixmap handle is an Xlib <xid>.

anid
a native pixmap handle.
ret
the <gdk-window> wrapper for the native window, or ‘#f’ if there is none.