Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:26:29

0001 /*
0002  *
0003 Copyright 1989, 1998  The Open Group
0004 
0005 Permission to use, copy, modify, distribute, and sell this software and its
0006 documentation for any purpose is hereby granted without fee, provided that
0007 the above copyright notice appear in all copies and that both that
0008 copyright notice and this permission notice appear in supporting
0009 documentation.
0010 
0011 The above copyright notice and this permission notice shall be included in
0012 all copies or substantial portions of the Software.
0013 
0014 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
0017 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
0018 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0019 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0020 
0021 Except as contained in this notice, the name of The Open Group shall not be
0022 used in advertising or otherwise to promote the sale, use or other dealings
0023 in this Software without prior written authorization from The Open Group.
0024  */
0025 
0026 #ifndef _MULTIBUF_H_
0027 #define _MULTIBUF_H_
0028 
0029 #include <X11/Xfuncproto.h>
0030 
0031 #include <X11/extensions/multibufconst.h>
0032 
0033 #define MbufGetReq(name,req,info) GetReq (name, req); \
0034     req->reqType = info->codes->major_opcode; \
0035     req->mbufReqType = X_##name;
0036 
0037 /*
0038  * Extra definitions that will only be needed in the client
0039  */
0040 typedef XID Multibuffer;
0041 
0042 typedef struct {
0043     int type;           /* of event */
0044     unsigned long serial;   /* # of last request processed by server */
0045     int send_event;     /* true if this came from a SendEvent request */
0046     Display *display;       /* Display the event was read from */
0047     Multibuffer buffer;     /* buffer of event */
0048     int state;          /* see Clobbered constants above */
0049 } XmbufClobberNotifyEvent;
0050 
0051 typedef struct {
0052     int type;           /* of event */
0053     unsigned long serial;   /* # of last request processed by server */
0054     int send_event;     /* true if this came from a SendEvent request */
0055     Display *display;       /* Display the event was read from */
0056     Multibuffer buffer;     /* buffer of event */
0057 } XmbufUpdateNotifyEvent;
0058 
0059 
0060 /*
0061  * per-window attributes that can be got
0062  */
0063 typedef struct {
0064     int displayed_index;    /* which buffer is being displayed */
0065     int update_action;      /* Undefined, Background, Untouched, Copied */
0066     int update_hint;        /* Frequent, Intermittent, Static */
0067     int window_mode;        /* Mono, Stereo */
0068     int nbuffers;       /* Number of buffers */
0069     Multibuffer *buffers;   /* Buffers */
0070 } XmbufWindowAttributes;
0071 
0072 /*
0073  * per-window attributes that can be set
0074  */
0075 typedef struct {
0076     int update_hint;        /* Frequent, Intermittent, Static */
0077 } XmbufSetWindowAttributes;
0078 
0079 
0080 /*
0081  * per-buffer attributes that can be got
0082  */
0083 typedef struct {
0084     Window window;      /* which window this belongs to */
0085     unsigned long event_mask;   /* events that have been selected */
0086     int buffer_index;       /* which buffer is this */
0087     int side;           /* Mono, Left, Right */
0088 } XmbufBufferAttributes;
0089 
0090 /*
0091  * per-buffer attributes that can be set
0092  */
0093 typedef struct {
0094     unsigned long event_mask;   /* events that have been selected */
0095 } XmbufSetBufferAttributes;
0096 
0097 
0098 /*
0099  * per-screen buffer info (there will be lists of them)
0100  */
0101 typedef struct {
0102     VisualID visualid;      /* visual usable at this depth */
0103     int max_buffers;        /* most buffers for this visual */
0104     int depth;          /* depth of buffers to be created */
0105 } XmbufBufferInfo;
0106 
0107 _XFUNCPROTOBEGIN
0108 
0109 extern Bool XmbufQueryExtension(
0110     Display*        /* dpy */,
0111     int*        /* event_base_return */,
0112     int*        /* error_base_return */
0113 );
0114 
0115 extern Status XmbufGetVersion(
0116     Display*        /* dpy */,
0117     int*        /* major_version_return */,
0118     int*        /* minor_version_return */
0119 );
0120 
0121 extern int XmbufCreateBuffers(
0122     Display*        /* dpy */,
0123     Window      /* w */,
0124     int         /* count */,
0125     int         /* update_action */,
0126     int         /* update_hint */,
0127     Multibuffer*    /* buffers */
0128 );
0129 
0130 extern void XmbufDestroyBuffers(
0131     Display*        /* dpy */,
0132     Window      /* window */
0133 );
0134 
0135 extern void XmbufDisplayBuffers(
0136     Display*        /* dpy */,
0137     int         /* count */,
0138     Multibuffer*    /* buffers */,
0139     int         /* min_delay */,
0140     int         /* max_delay */
0141 );
0142 
0143 extern Status XmbufGetWindowAttributes(
0144     Display*            /* dpy */,
0145     Window          /* w */,
0146     XmbufWindowAttributes*  /* attr */
0147 );
0148 
0149 extern void XmbufChangeWindowAttributes(
0150     Display*            /* dpy */,
0151     Window          /* w */,
0152     unsigned long       /* valuemask */,
0153     XmbufSetWindowAttributes*   /* attr */
0154 );
0155 
0156 extern Status XmbufGetBufferAttributes(
0157     Display*            /* dpy */,
0158     Multibuffer         /* b */,
0159     XmbufBufferAttributes*  /* attr */
0160 );
0161 
0162 extern void XmbufChangeBufferAttributes(
0163     Display*            /* dpy */,
0164     Multibuffer         /* b */,
0165     unsigned long       /* valuemask */,
0166     XmbufSetBufferAttributes*   /* attr */
0167 );
0168 
0169 extern Status XmbufGetScreenInfo(
0170     Display*            /* dpy */,
0171     Drawable            /* d */,
0172     int*            /* nmono_return */,
0173     XmbufBufferInfo**       /* mono_info_return */,
0174     int*            /* nstereo_return */,
0175     XmbufBufferInfo**       /* stereo_info_return */
0176 );
0177 
0178 extern Window XmbufCreateStereoWindow(
0179     Display*            /* dpy */,
0180     Window          /* parent */,
0181     int             /* x */,
0182     int             /* y */,
0183     unsigned int        /* width */,
0184     unsigned int        /* height */,
0185     unsigned int        /* border_width */,
0186     int             /* depth */,
0187     unsigned int        /* class */,
0188     Visual*         /* visual */,
0189     unsigned long       /* valuemask */,
0190     XSetWindowAttributes*   /* attr */,
0191     Multibuffer*        /* leftp */,
0192     Multibuffer*        /* rightp */
0193 );
0194 
0195 extern void XmbufClearBufferArea(
0196     Display*            /* dpy */,
0197     Multibuffer         /* buffer */,
0198     int             /* x */,
0199     int             /* y */,
0200     unsigned int        /* width */,
0201     unsigned int        /* height */,
0202     Bool            /* exposures */
0203 );
0204 
0205 _XFUNCPROTOEND
0206 
0207 #endif /* _MULTIBUF_H_ */