XShm
NAMESYNTAX
STRUCTURES
DESCRIPTION
SEE ALSO
NAME
XShmQueryExtension, XShmQueryVersion, XShmPixmapFormat, XShmAttach, XShmDetach XShmCreateImage, XShmPutImage, XShmGetImage, XShmCreatePixmap, XShmGetEventBase - X Shared Memory extension functions
SYNTAX
#include
<X11/Xlib.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
Bool |
XShmQueryExtension( | ||
Display *display); |
Bool XShmQueryVersion(
Display *display; | |
int *major, *minor; | |
Bool *pixmaps); |
Status XShmPixmapFormat(
Display *display); |
Status XShmAttach(
Display *display; | |
XShmSegmentInfo *shminfo); |
Status XShmDetach(
Display *display; | |
XShmSegmentInfo *shminfo); |
XImage *XShmCreateImage (
Display *display; | |
Visual *visual; | |
unsigned int depth; | |
int format; | |
char *data; | |
XShmSegmentInfo *shminfo; | |
unsigned int width, height); |
Status XShmPutImage(
Display *display; | |
Drawable d; | |
GC gc; | |
XImage *image; | |
int src_x, src_y, dest_x, dest_y; | |
unsigned int width, height; | |
bool send_event); |
Status XShmGetImage (
Display *display; | |
Drawable d; | |
XImage *image; | |
int x, y; | |
unsigned long plane_mask); |
Pixmap
XShmCreatePixmap(
Display *display;
Drawable d;
char *data;
XShmSegmentInfo *shminfo; | |
unsigned int width, height, depth); |
Status XShmGetEventBase(
Display *display); |
STRUCTURES
Events:
typedef struct {
int type; /* of event */
unsigned long serial; /* # of last request processed by
server*/
Bool send_event; /* true if this came from a SendEvent
request*/
Display *display; /* Display the event was read from */
Drawable drawable; /* drawable of request */
int major_code; /* ShmReqCode */
int minor_code; /* X_ShmPutImage */
ShmSeg shmseg; /* the ShmSeg used in the request*/
unsigned long offset; /* the offset into ShmSeg used in the
request*/
} XShmCompletionEvent;
a structure of type XShmSegmentInfo :
typedef struct
{
ShmSeg shmseg; /* resource id */
int shmid; /* kernel id */
char *shmaddr; /* address in client */
Bool readOnly; /* how the server should attach it */
} XShmSegmentInfo;
DESCRIPTION
XShmQueryExtension checks to see if the shared memory extensions are available for the specified display.
XShmQueryVersion returns the version numbers of the extension implementation. Shared memory pixmaps are supported if the pixmaps argument returns true.
XShmAttach tells the server to attach to your shared memory segment. If all goes well, you will get a non-zero status, back and your XImage is ready for use.
XShmDetach tells the server to detach from your shared memory segment.
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.
XShmGetEventBase gets the completion event value.
SEE ALSO
MIT-SHM - The MIT Shared Memory Extension
More Linux Commands
manpages/mono-configuration-crypto.html
mono-configuration-crypto
mono-configuration-crypto
manpages/Tk_Depth.3.html
Tk_Depth(3) - retrieve information from Tk's local data stru
Tk_WindowId and the other names listed above are all macros that return fields from Tks local data structure for tkwin. None of these macros requires any intera
manpages/XpCancelDoc.3x.html
XpCancelDoc(3x) - Cancels a print document. - Linux man page
XpCancelDoc cancels an in-progress document. If the job was started with output_mode XPGetData then the data stream to XpGetDocumentData is interrupted; no furt
manpages/aulast.8.html
aulast(8) a program similar to last - Linux manual page.....
aulast is a program that prints out a listing of the last logged in users similarly to the program last and lastb. Aulast searches back through the audit logs o
manpages/apxs2.8.html
apxs2(8) - APache eXtenSion tool (Admin - Linux man page)...
apxs2.8 - apxs is a tool for building and installing extension modules for the Apache HyperText Transfer Protocol (HTTP) server. This is achieved by building a
manpages/what_is_linux.html
what_is_linux - 301 Moved Permanently - what_is_linux
manpages/git-merge-base.1.html
git-merge-base(1) - Find as good common ancestors as possibl
git merge-base finds best common ancestor(s) between two commits to use in a three-way merge. One common ancestor is better than another common ancestor if the
manpages/gnutls_openpgp_keyring_get_crt.3.html
gnutls_openpgp_keyring_get_crt(3) - API function (Man Page)
This function will extract an OpenPGP certificate from the given keyring. If the index given is out of range GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be retur
manpages/routef.8.html
routef(8) - flush routes (Administration - Linux man page)
These programs are a set of helper scripts you can use instead of raw iproute2 commands. The routel script will list routes in a format that some might consider
manpages/if_nametoindex.3.html
if_nametoindex(3) mappings between network interface names a
The if_nametoindex() function returns the index of the network interface corresponding to the name ifname. The if_indextoname() function returns the name of the
manpages/curl_multi_setopt.3.html
curl_multi_setopt(3) - set options for a curl multi handle
curl_multi_setopt() is used to tell a libcurl multi handle how to behave. By using the appropriate options to curl_multi_setopt(3), you can change libcurls beha
manpages/gnutls_x509_crq_get_pk_algorithm.3.html
gnutls_x509_crq_get_pk_algorithm(3) - API function (ManPage)
This function will return the public key algorithm of a PKCS10 certificate request. If bits is non-NULL, it should have enough size to hold the parameters size
