XShm - Online Linux Manual PageSection : 3
Updated : libXext 1.3.5
Source : X Version 11
Note : X FUNCTIONS

NAMEXShmQueryExtension, 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); int XShmPixmapFormat( Display *display); Bool XShmAttach( Display *display; XShmSegmentInfo *shminfo); Bool XShmDetach( Display *display; XShmSegmentInfo *shminfo); XImage *XShmCreateImage ( Display *display; Visual *visual; unsigned int depth; int format; char *data; XShmSegmentInfo *shminfo; unsigned int width, height); Bool 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); Bool 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);

STRUCTURESEvents: 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 ALSOMIT-SHM - The MIT Shared Memory Extension
0
Johanes Gumabo
Data Size   :   11,437 byte
man-XShmGetEventBase.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 181,498
Visitor ID   :     :  
Visitor IP   :   3.144.6.144   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.