annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/X11/extensions/multibuf.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 /*
jpayne@69 2 *
jpayne@69 3 Copyright 1989, 1998 The Open Group
jpayne@69 4
jpayne@69 5 Permission to use, copy, modify, distribute, and sell this software and its
jpayne@69 6 documentation for any purpose is hereby granted without fee, provided that
jpayne@69 7 the above copyright notice appear in all copies and that both that
jpayne@69 8 copyright notice and this permission notice appear in supporting
jpayne@69 9 documentation.
jpayne@69 10
jpayne@69 11 The above copyright notice and this permission notice shall be included in
jpayne@69 12 all copies or substantial portions of the Software.
jpayne@69 13
jpayne@69 14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
jpayne@69 15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
jpayne@69 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
jpayne@69 17 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
jpayne@69 18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
jpayne@69 19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
jpayne@69 20
jpayne@69 21 Except as contained in this notice, the name of The Open Group shall not be
jpayne@69 22 used in advertising or otherwise to promote the sale, use or other dealings
jpayne@69 23 in this Software without prior written authorization from The Open Group.
jpayne@69 24 */
jpayne@69 25
jpayne@69 26 #ifndef _MULTIBUF_H_
jpayne@69 27 #define _MULTIBUF_H_
jpayne@69 28
jpayne@69 29 #include <X11/Xfuncproto.h>
jpayne@69 30
jpayne@69 31 #include <X11/extensions/multibufconst.h>
jpayne@69 32
jpayne@69 33 #define MbufGetReq(name,req,info) GetReq (name, req); \
jpayne@69 34 req->reqType = info->codes->major_opcode; \
jpayne@69 35 req->mbufReqType = X_##name;
jpayne@69 36
jpayne@69 37 /*
jpayne@69 38 * Extra definitions that will only be needed in the client
jpayne@69 39 */
jpayne@69 40 typedef XID Multibuffer;
jpayne@69 41
jpayne@69 42 typedef struct {
jpayne@69 43 int type; /* of event */
jpayne@69 44 unsigned long serial; /* # of last request processed by server */
jpayne@69 45 int send_event; /* true if this came from a SendEvent request */
jpayne@69 46 Display *display; /* Display the event was read from */
jpayne@69 47 Multibuffer buffer; /* buffer of event */
jpayne@69 48 int state; /* see Clobbered constants above */
jpayne@69 49 } XmbufClobberNotifyEvent;
jpayne@69 50
jpayne@69 51 typedef struct {
jpayne@69 52 int type; /* of event */
jpayne@69 53 unsigned long serial; /* # of last request processed by server */
jpayne@69 54 int send_event; /* true if this came from a SendEvent request */
jpayne@69 55 Display *display; /* Display the event was read from */
jpayne@69 56 Multibuffer buffer; /* buffer of event */
jpayne@69 57 } XmbufUpdateNotifyEvent;
jpayne@69 58
jpayne@69 59
jpayne@69 60 /*
jpayne@69 61 * per-window attributes that can be got
jpayne@69 62 */
jpayne@69 63 typedef struct {
jpayne@69 64 int displayed_index; /* which buffer is being displayed */
jpayne@69 65 int update_action; /* Undefined, Background, Untouched, Copied */
jpayne@69 66 int update_hint; /* Frequent, Intermittent, Static */
jpayne@69 67 int window_mode; /* Mono, Stereo */
jpayne@69 68 int nbuffers; /* Number of buffers */
jpayne@69 69 Multibuffer *buffers; /* Buffers */
jpayne@69 70 } XmbufWindowAttributes;
jpayne@69 71
jpayne@69 72 /*
jpayne@69 73 * per-window attributes that can be set
jpayne@69 74 */
jpayne@69 75 typedef struct {
jpayne@69 76 int update_hint; /* Frequent, Intermittent, Static */
jpayne@69 77 } XmbufSetWindowAttributes;
jpayne@69 78
jpayne@69 79
jpayne@69 80 /*
jpayne@69 81 * per-buffer attributes that can be got
jpayne@69 82 */
jpayne@69 83 typedef struct {
jpayne@69 84 Window window; /* which window this belongs to */
jpayne@69 85 unsigned long event_mask; /* events that have been selected */
jpayne@69 86 int buffer_index; /* which buffer is this */
jpayne@69 87 int side; /* Mono, Left, Right */
jpayne@69 88 } XmbufBufferAttributes;
jpayne@69 89
jpayne@69 90 /*
jpayne@69 91 * per-buffer attributes that can be set
jpayne@69 92 */
jpayne@69 93 typedef struct {
jpayne@69 94 unsigned long event_mask; /* events that have been selected */
jpayne@69 95 } XmbufSetBufferAttributes;
jpayne@69 96
jpayne@69 97
jpayne@69 98 /*
jpayne@69 99 * per-screen buffer info (there will be lists of them)
jpayne@69 100 */
jpayne@69 101 typedef struct {
jpayne@69 102 VisualID visualid; /* visual usable at this depth */
jpayne@69 103 int max_buffers; /* most buffers for this visual */
jpayne@69 104 int depth; /* depth of buffers to be created */
jpayne@69 105 } XmbufBufferInfo;
jpayne@69 106
jpayne@69 107 _XFUNCPROTOBEGIN
jpayne@69 108
jpayne@69 109 extern Bool XmbufQueryExtension(
jpayne@69 110 Display* /* dpy */,
jpayne@69 111 int* /* event_base_return */,
jpayne@69 112 int* /* error_base_return */
jpayne@69 113 );
jpayne@69 114
jpayne@69 115 extern Status XmbufGetVersion(
jpayne@69 116 Display* /* dpy */,
jpayne@69 117 int* /* major_version_return */,
jpayne@69 118 int* /* minor_version_return */
jpayne@69 119 );
jpayne@69 120
jpayne@69 121 extern int XmbufCreateBuffers(
jpayne@69 122 Display* /* dpy */,
jpayne@69 123 Window /* w */,
jpayne@69 124 int /* count */,
jpayne@69 125 int /* update_action */,
jpayne@69 126 int /* update_hint */,
jpayne@69 127 Multibuffer* /* buffers */
jpayne@69 128 );
jpayne@69 129
jpayne@69 130 extern void XmbufDestroyBuffers(
jpayne@69 131 Display* /* dpy */,
jpayne@69 132 Window /* window */
jpayne@69 133 );
jpayne@69 134
jpayne@69 135 extern void XmbufDisplayBuffers(
jpayne@69 136 Display* /* dpy */,
jpayne@69 137 int /* count */,
jpayne@69 138 Multibuffer* /* buffers */,
jpayne@69 139 int /* min_delay */,
jpayne@69 140 int /* max_delay */
jpayne@69 141 );
jpayne@69 142
jpayne@69 143 extern Status XmbufGetWindowAttributes(
jpayne@69 144 Display* /* dpy */,
jpayne@69 145 Window /* w */,
jpayne@69 146 XmbufWindowAttributes* /* attr */
jpayne@69 147 );
jpayne@69 148
jpayne@69 149 extern void XmbufChangeWindowAttributes(
jpayne@69 150 Display* /* dpy */,
jpayne@69 151 Window /* w */,
jpayne@69 152 unsigned long /* valuemask */,
jpayne@69 153 XmbufSetWindowAttributes* /* attr */
jpayne@69 154 );
jpayne@69 155
jpayne@69 156 extern Status XmbufGetBufferAttributes(
jpayne@69 157 Display* /* dpy */,
jpayne@69 158 Multibuffer /* b */,
jpayne@69 159 XmbufBufferAttributes* /* attr */
jpayne@69 160 );
jpayne@69 161
jpayne@69 162 extern void XmbufChangeBufferAttributes(
jpayne@69 163 Display* /* dpy */,
jpayne@69 164 Multibuffer /* b */,
jpayne@69 165 unsigned long /* valuemask */,
jpayne@69 166 XmbufSetBufferAttributes* /* attr */
jpayne@69 167 );
jpayne@69 168
jpayne@69 169 extern Status XmbufGetScreenInfo(
jpayne@69 170 Display* /* dpy */,
jpayne@69 171 Drawable /* d */,
jpayne@69 172 int* /* nmono_return */,
jpayne@69 173 XmbufBufferInfo** /* mono_info_return */,
jpayne@69 174 int* /* nstereo_return */,
jpayne@69 175 XmbufBufferInfo** /* stereo_info_return */
jpayne@69 176 );
jpayne@69 177
jpayne@69 178 extern Window XmbufCreateStereoWindow(
jpayne@69 179 Display* /* dpy */,
jpayne@69 180 Window /* parent */,
jpayne@69 181 int /* x */,
jpayne@69 182 int /* y */,
jpayne@69 183 unsigned int /* width */,
jpayne@69 184 unsigned int /* height */,
jpayne@69 185 unsigned int /* border_width */,
jpayne@69 186 int /* depth */,
jpayne@69 187 unsigned int /* class */,
jpayne@69 188 Visual* /* visual */,
jpayne@69 189 unsigned long /* valuemask */,
jpayne@69 190 XSetWindowAttributes* /* attr */,
jpayne@69 191 Multibuffer* /* leftp */,
jpayne@69 192 Multibuffer* /* rightp */
jpayne@69 193 );
jpayne@69 194
jpayne@69 195 extern void XmbufClearBufferArea(
jpayne@69 196 Display* /* dpy */,
jpayne@69 197 Multibuffer /* buffer */,
jpayne@69 198 int /* x */,
jpayne@69 199 int /* y */,
jpayne@69 200 unsigned int /* width */,
jpayne@69 201 unsigned int /* height */,
jpayne@69 202 Bool /* exposures */
jpayne@69 203 );
jpayne@69 204
jpayne@69 205 _XFUNCPROTOEND
jpayne@69 206
jpayne@69 207 #endif /* _MULTIBUF_H_ */