Path: blob/main/system/include/X11/extensions/XShm.h
6169 views
/************************************************************12Copyright 1989, 1998 The Open Group34Permission to use, copy, modify, distribute, and sell this software and its5documentation for any purpose is hereby granted without fee, provided that6the above copyright notice appear in all copies and that both that7copyright notice and this permission notice appear in supporting8documentation.910The above copyright notice and this permission notice shall be included in11all copies or substantial portions of the Software.1213THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR14IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE16OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN17AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN18CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.1920Except as contained in this notice, the name of The Open Group shall not be21used in advertising or otherwise to promote the sale, use or other dealings22in this Software without prior written authorization from The Open Group.2324********************************************************/2526/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */2728#ifndef _XSHM_H_29#define _XSHM_H_3031#include <X11/Xfuncproto.h>32#include <X11/extensions/shm.h>3334#ifndef _XSHM_SERVER_35typedef unsigned long ShmSeg;3637typedef struct {38int type; /* of event */39unsigned long serial; /* # of last request processed by server */40Bool send_event; /* true if this came frome a SendEvent request */41Display *display; /* Display the event was read from */42Drawable drawable; /* drawable of request */43int major_code; /* ShmReqCode */44int minor_code; /* X_ShmPutImage */45ShmSeg shmseg; /* the ShmSeg used in the request */46unsigned long offset; /* the offset into ShmSeg used in the request */47} XShmCompletionEvent;4849typedef struct {50ShmSeg shmseg; /* resource id */51int shmid; /* kernel id */52char *shmaddr; /* address in client */53Bool readOnly; /* how the server should attach it */54} XShmSegmentInfo;5556_XFUNCPROTOBEGIN5758Bool XShmQueryExtension(59Display* /* dpy */60);6162int XShmGetEventBase(63Display* /* dpy */64);6566Bool XShmQueryVersion(67Display* /* dpy */,68int* /* majorVersion */,69int* /* minorVersion */,70Bool* /* sharedPixmaps */71);7273int XShmPixmapFormat(74Display* /* dpy */75);7677Bool XShmAttach(78Display* /* dpy */,79XShmSegmentInfo* /* shminfo */80);8182Bool XShmDetach(83Display* /* dpy */,84XShmSegmentInfo* /* shminfo */85);8687Bool XShmPutImage(88Display* /* dpy */,89Drawable /* d */,90GC /* gc */,91XImage* /* image */,92int /* src_x */,93int /* src_y */,94int /* dst_x */,95int /* dst_y */,96unsigned int /* src_width */,97unsigned int /* src_height */,98Bool /* send_event */99);100101Bool XShmGetImage(102Display* /* dpy */,103Drawable /* d */,104XImage* /* image */,105int /* x */,106int /* y */,107unsigned long /* plane_mask */108);109110XImage *XShmCreateImage(111Display* /* dpy */,112Visual* /* visual */,113unsigned int /* depth */,114int /* format */,115char* /* data */,116XShmSegmentInfo* /* shminfo */,117unsigned int /* width */,118unsigned int /* height */119);120121Pixmap XShmCreatePixmap(122Display* /* dpy */,123Drawable /* d */,124char* /* data */,125XShmSegmentInfo* /* shminfo */,126unsigned int /* width */,127unsigned int /* height */,128unsigned int /* depth */129);130131_XFUNCPROTOEND132#endif /* _XSHM_SERVER_ */133134#endif135136137