jpayne@69: /* jpayne@69: * jpayne@69: Copyright 1989, 1998 The Open Group jpayne@69: jpayne@69: Permission to use, copy, modify, distribute, and sell this software and its jpayne@69: documentation for any purpose is hereby granted without fee, provided that jpayne@69: the above copyright notice appear in all copies and that both that jpayne@69: copyright notice and this permission notice appear in supporting jpayne@69: documentation. jpayne@69: jpayne@69: The above copyright notice and this permission notice shall be included in jpayne@69: all copies or substantial portions of the Software. jpayne@69: jpayne@69: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR jpayne@69: IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, jpayne@69: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE jpayne@69: OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN jpayne@69: AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN jpayne@69: CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. jpayne@69: jpayne@69: Except as contained in this notice, the name of The Open Group shall not be jpayne@69: used in advertising or otherwise to promote the sale, use or other dealings jpayne@69: in this Software without prior written authorization from The Open Group. jpayne@69: */ jpayne@69: jpayne@69: #ifndef _MULTIBUF_H_ jpayne@69: #define _MULTIBUF_H_ jpayne@69: jpayne@69: #include jpayne@69: jpayne@69: #include jpayne@69: jpayne@69: #define MbufGetReq(name,req,info) GetReq (name, req); \ jpayne@69: req->reqType = info->codes->major_opcode; \ jpayne@69: req->mbufReqType = X_##name; jpayne@69: jpayne@69: /* jpayne@69: * Extra definitions that will only be needed in the client jpayne@69: */ jpayne@69: typedef XID Multibuffer; jpayne@69: jpayne@69: typedef struct { jpayne@69: int type; /* of event */ jpayne@69: unsigned long serial; /* # of last request processed by server */ jpayne@69: int send_event; /* true if this came from a SendEvent request */ jpayne@69: Display *display; /* Display the event was read from */ jpayne@69: Multibuffer buffer; /* buffer of event */ jpayne@69: int state; /* see Clobbered constants above */ jpayne@69: } XmbufClobberNotifyEvent; jpayne@69: jpayne@69: typedef struct { jpayne@69: int type; /* of event */ jpayne@69: unsigned long serial; /* # of last request processed by server */ jpayne@69: int send_event; /* true if this came from a SendEvent request */ jpayne@69: Display *display; /* Display the event was read from */ jpayne@69: Multibuffer buffer; /* buffer of event */ jpayne@69: } XmbufUpdateNotifyEvent; jpayne@69: jpayne@69: jpayne@69: /* jpayne@69: * per-window attributes that can be got jpayne@69: */ jpayne@69: typedef struct { jpayne@69: int displayed_index; /* which buffer is being displayed */ jpayne@69: int update_action; /* Undefined, Background, Untouched, Copied */ jpayne@69: int update_hint; /* Frequent, Intermittent, Static */ jpayne@69: int window_mode; /* Mono, Stereo */ jpayne@69: int nbuffers; /* Number of buffers */ jpayne@69: Multibuffer *buffers; /* Buffers */ jpayne@69: } XmbufWindowAttributes; jpayne@69: jpayne@69: /* jpayne@69: * per-window attributes that can be set jpayne@69: */ jpayne@69: typedef struct { jpayne@69: int update_hint; /* Frequent, Intermittent, Static */ jpayne@69: } XmbufSetWindowAttributes; jpayne@69: jpayne@69: jpayne@69: /* jpayne@69: * per-buffer attributes that can be got jpayne@69: */ jpayne@69: typedef struct { jpayne@69: Window window; /* which window this belongs to */ jpayne@69: unsigned long event_mask; /* events that have been selected */ jpayne@69: int buffer_index; /* which buffer is this */ jpayne@69: int side; /* Mono, Left, Right */ jpayne@69: } XmbufBufferAttributes; jpayne@69: jpayne@69: /* jpayne@69: * per-buffer attributes that can be set jpayne@69: */ jpayne@69: typedef struct { jpayne@69: unsigned long event_mask; /* events that have been selected */ jpayne@69: } XmbufSetBufferAttributes; jpayne@69: jpayne@69: jpayne@69: /* jpayne@69: * per-screen buffer info (there will be lists of them) jpayne@69: */ jpayne@69: typedef struct { jpayne@69: VisualID visualid; /* visual usable at this depth */ jpayne@69: int max_buffers; /* most buffers for this visual */ jpayne@69: int depth; /* depth of buffers to be created */ jpayne@69: } XmbufBufferInfo; jpayne@69: jpayne@69: _XFUNCPROTOBEGIN jpayne@69: jpayne@69: extern Bool XmbufQueryExtension( jpayne@69: Display* /* dpy */, jpayne@69: int* /* event_base_return */, jpayne@69: int* /* error_base_return */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XmbufGetVersion( jpayne@69: Display* /* dpy */, jpayne@69: int* /* major_version_return */, jpayne@69: int* /* minor_version_return */ jpayne@69: ); jpayne@69: jpayne@69: extern int XmbufCreateBuffers( jpayne@69: Display* /* dpy */, jpayne@69: Window /* w */, jpayne@69: int /* count */, jpayne@69: int /* update_action */, jpayne@69: int /* update_hint */, jpayne@69: Multibuffer* /* buffers */ jpayne@69: ); jpayne@69: jpayne@69: extern void XmbufDestroyBuffers( jpayne@69: Display* /* dpy */, jpayne@69: Window /* window */ jpayne@69: ); jpayne@69: jpayne@69: extern void XmbufDisplayBuffers( jpayne@69: Display* /* dpy */, jpayne@69: int /* count */, jpayne@69: Multibuffer* /* buffers */, jpayne@69: int /* min_delay */, jpayne@69: int /* max_delay */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XmbufGetWindowAttributes( jpayne@69: Display* /* dpy */, jpayne@69: Window /* w */, jpayne@69: XmbufWindowAttributes* /* attr */ jpayne@69: ); jpayne@69: jpayne@69: extern void XmbufChangeWindowAttributes( jpayne@69: Display* /* dpy */, jpayne@69: Window /* w */, jpayne@69: unsigned long /* valuemask */, jpayne@69: XmbufSetWindowAttributes* /* attr */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XmbufGetBufferAttributes( jpayne@69: Display* /* dpy */, jpayne@69: Multibuffer /* b */, jpayne@69: XmbufBufferAttributes* /* attr */ jpayne@69: ); jpayne@69: jpayne@69: extern void XmbufChangeBufferAttributes( jpayne@69: Display* /* dpy */, jpayne@69: Multibuffer /* b */, jpayne@69: unsigned long /* valuemask */, jpayne@69: XmbufSetBufferAttributes* /* attr */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XmbufGetScreenInfo( jpayne@69: Display* /* dpy */, jpayne@69: Drawable /* d */, jpayne@69: int* /* nmono_return */, jpayne@69: XmbufBufferInfo** /* mono_info_return */, jpayne@69: int* /* nstereo_return */, jpayne@69: XmbufBufferInfo** /* stereo_info_return */ jpayne@69: ); jpayne@69: jpayne@69: extern Window XmbufCreateStereoWindow( jpayne@69: Display* /* dpy */, jpayne@69: Window /* parent */, jpayne@69: int /* x */, jpayne@69: int /* y */, jpayne@69: unsigned int /* width */, jpayne@69: unsigned int /* height */, jpayne@69: unsigned int /* border_width */, jpayne@69: int /* depth */, jpayne@69: unsigned int /* class */, jpayne@69: Visual* /* visual */, jpayne@69: unsigned long /* valuemask */, jpayne@69: XSetWindowAttributes* /* attr */, jpayne@69: Multibuffer* /* leftp */, jpayne@69: Multibuffer* /* rightp */ jpayne@69: ); jpayne@69: jpayne@69: extern void XmbufClearBufferArea( jpayne@69: Display* /* dpy */, jpayne@69: Multibuffer /* buffer */, jpayne@69: int /* x */, jpayne@69: int /* y */, jpayne@69: unsigned int /* width */, jpayne@69: unsigned int /* height */, jpayne@69: Bool /* exposures */ jpayne@69: ); jpayne@69: jpayne@69: _XFUNCPROTOEND jpayne@69: jpayne@69: #endif /* _MULTIBUF_H_ */