XShmPutImage
combines an image in memory with a shape of the specified
drawable. If XYBitmap format is used, the depth must be one,
or a ‘‘BadMatch’’ error results. The
foreground pixel in the GC defines the source for the one
bits in the image, and the background pixel defines the
source for the zero bits. For XYPixmap and ZPixmap, the
depth must match the depth of the drawable, or a
‘‘BadMatch’’ error results.

XShmGetImage
reads image data into a shared memory XImage where display
is the display of interest, drawable is the source drawable,
image is the destination XImage, x and y are offsets within
the drawable, and plane_mask defines which planes are to be
read.

XShmCreateImage
allocates the memory needed for an XImage structure for the
specified display but does not allocate space for the image
itself.

XShmPixmapFormat
gets the format for the server. If your application can deal
with the server pixmap data format, a shared memory segment
and shminfo structure are created.

XShmCreatePixmap
points to a pixmap which you can manipulate in all of the
usual ways, with the added bonus of being able to edit its
contents directly through the shared memory segment.