117ca54c3Smrg/* 2ea1d6981Smrg 317ca54c3SmrgCopyright 1990, 1991, 1998 The Open Group 417ca54c3Smrg 517ca54c3SmrgPermission to use, copy, modify, distribute, and sell this software and its 617ca54c3Smrgdocumentation for any purpose is hereby granted without fee, provided that 717ca54c3Smrgthe above copyright notice appear in all copies and that both that 817ca54c3Smrgcopyright notice and this permission notice appear in supporting 917ca54c3Smrgdocumentation. 1017ca54c3Smrg 1117ca54c3SmrgThe above copyright notice and this permission notice shall be included in 1217ca54c3Smrgall copies or substantial portions of the Software. 1317ca54c3Smrg 1417ca54c3SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1517ca54c3SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1617ca54c3SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1717ca54c3SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 1817ca54c3SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 1917ca54c3SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2017ca54c3Smrg 2117ca54c3SmrgExcept as contained in this notice, the name of The Open Group shall not be 2217ca54c3Smrgused in advertising or otherwise to promote the sale, use or other dealings 2317ca54c3Smrgin this Software without prior written authorization from The Open Group. 2417ca54c3Smrg 2517ca54c3Smrg * Copyright 1990, 1991 Network Computing Devices; 26ea1d6981Smrg * Portions Copyright 1987 by Digital Equipment Corporation 2717ca54c3Smrg * 2817ca54c3Smrg * Permission to use, copy, modify, distribute, and sell this software and 2917ca54c3Smrg * its documentation for any purpose is hereby granted without fee, provided 3017ca54c3Smrg * that the above copyright notice appear in all copies and that both that 3117ca54c3Smrg * copyright notice and this permission notice appear in supporting 3217ca54c3Smrg * documentation, and that the names of Network Computing Devices, or Digital 3317ca54c3Smrg * not be used in advertising or publicity pertaining to distribution 3417ca54c3Smrg * of the software without specific, written prior permission. 3517ca54c3Smrg * 3617ca54c3Smrg * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH 3717ca54c3Smrg * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF 3817ca54c3Smrg * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, 3917ca54c3Smrg * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 4017ca54c3Smrg * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 4117ca54c3Smrg * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 4217ca54c3Smrg * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 4317ca54c3Smrg * THIS SOFTWARE. 4417ca54c3Smrg */ 4517ca54c3Smrg 4617ca54c3Smrg#ifndef _FS_PROTO_H_ 4717ca54c3Smrg#define _FS_PROTO_H_ 4817ca54c3Smrg 4917ca54c3Smrg#include <X11/fonts/FS.h> 5017ca54c3Smrg 5117ca54c3Smrg#define sz_fsPropOffset 20 5217ca54c3Smrg#define sz_fsPropInfo 8 5317ca54c3Smrg#define sz_fsResolution 6 5417ca54c3Smrg 5517ca54c3Smrg#define sz_fsChar2b 2 5617ca54c3Smrg#define sz_fsChar2b_version1 2 5717ca54c3Smrg#define sz_fsOffset32 8 5817ca54c3Smrg#define sz_fsRange 4 5917ca54c3Smrg 6017ca54c3Smrg#define sz_fsXCharInfo 12 6117ca54c3Smrg#define sz_fsXFontInfoHeader 40 6217ca54c3Smrg 6317ca54c3Smrg#define sz_fsConnClientPrefix 8 6417ca54c3Smrg#define sz_fsConnSetup 12 6517ca54c3Smrg#define sz_fsConnSetupExtra 8 6617ca54c3Smrg#define sz_fsConnSetupAccept 12 6717ca54c3Smrg 6817ca54c3Smrg/* request sizes */ 6917ca54c3Smrg#define sz_fsReq 4 7017ca54c3Smrg#define sz_fsListExtensionsReq 4 7117ca54c3Smrg#define sz_fsResourceReq 8 7217ca54c3Smrg 7317ca54c3Smrg#define sz_fsNoopReq 4 7417ca54c3Smrg#define sz_fsListExtensionReq 4 7517ca54c3Smrg#define sz_fsQueryExtensionReq 4 7617ca54c3Smrg#define sz_fsListCataloguesReq 12 7717ca54c3Smrg#define sz_fsSetCataloguesReq 4 7817ca54c3Smrg#define sz_fsGetCataloguesReq 4 7917ca54c3Smrg#define sz_fsSetEventMaskReq 8 8017ca54c3Smrg#define sz_fsGetEventMaskReq 4 8117ca54c3Smrg#define sz_fsCreateACReq 8 8217ca54c3Smrg#define sz_fsFreeACReq 8 8317ca54c3Smrg#define sz_fsSetAuthorizationReq 8 8417ca54c3Smrg#define sz_fsSetResolutionReq 4 8517ca54c3Smrg#define sz_fsGetResolutionReq 4 8617ca54c3Smrg#define sz_fsListFontsReq 12 8717ca54c3Smrg#define sz_fsListFontsWithXInfoReq 12 8817ca54c3Smrg#define sz_fsOpenBitmapFontReq 16 8917ca54c3Smrg#define sz_fsQueryXInfoReq 8 9017ca54c3Smrg#define sz_fsQueryXExtents8Req 12 9117ca54c3Smrg#define sz_fsQueryXExtents16Req 12 9217ca54c3Smrg#define sz_fsQueryXBitmaps8Req 16 9317ca54c3Smrg#define sz_fsQueryXBitmaps16Req 16 9417ca54c3Smrg#define sz_fsCloseReq 8 9517ca54c3Smrg 9617ca54c3Smrg/* reply sizes */ 9717ca54c3Smrg#define sz_fsReply 8 9817ca54c3Smrg#define sz_fsGenericReply 8 9917ca54c3Smrg 10017ca54c3Smrg#define sz_fsListExtensionsReply 8 10117ca54c3Smrg#define sz_fsQueryExtensionReply 20 10217ca54c3Smrg#define sz_fsListCataloguesReply 16 10317ca54c3Smrg#define sz_fsGetCataloguesReply 8 10417ca54c3Smrg#define sz_fsGetEventMaskReply 12 10517ca54c3Smrg#define sz_fsCreateACReply 12 10617ca54c3Smrg#define sz_fsGetResolutionReply 8 10717ca54c3Smrg#define sz_fsListFontsReply 16 10817ca54c3Smrg#define sz_fsListFontsWithXInfoReply (12 + sz_fsXFontInfoHeader) 10917ca54c3Smrg#define sz_fsOpenBitmapFontReply 16 11017ca54c3Smrg#define sz_fsQueryXInfoReply (8 + sz_fsXFontInfoHeader) 11117ca54c3Smrg#define sz_fsQueryXExtents8Reply 12 11217ca54c3Smrg#define sz_fsQueryXExtents16Reply 12 11317ca54c3Smrg#define sz_fsQueryXBitmaps8Reply 20 11417ca54c3Smrg#define sz_fsQueryXBitmaps16Reply 20 11517ca54c3Smrg 11617ca54c3Smrg#define sz_fsError 16 11717ca54c3Smrg#define sz_fsEvent 12 11817ca54c3Smrg#define sz_fsKeepAliveEvent 12 11917ca54c3Smrg 12017ca54c3Smrg#define fsTrue 1 12117ca54c3Smrg#define fsFalse 0 12217ca54c3Smrg 12317ca54c3Smrg/* temp decls */ 12417ca54c3Smrg#define Mask CARD32 12517ca54c3Smrg#define Font CARD32 12617ca54c3Smrg#define AccContext CARD32 12717ca54c3Smrg 12817ca54c3Smrgtypedef CARD32 fsTimestamp; 12917ca54c3Smrg 13017ca54c3Smrg#ifdef NOTDEF /* in fsmasks.h */ 13117ca54c3Smrgtypedef CARD32 fsBitmapFormat; 13217ca54c3Smrgtypedef CARD32 fsBitmapFormatMask; 13317ca54c3Smrg#endif 134ea1d6981Smrg 13517ca54c3Smrg#define sz_fsBitmapFormat 4 13617ca54c3Smrg 13717ca54c3Smrgtypedef struct { 138ea1d6981Smrg INT16 left, 139ea1d6981Smrg right; 140ea1d6981Smrg INT16 width; 141ea1d6981Smrg INT16 ascent, 142ea1d6981Smrg descent; 143ea1d6981Smrg CARD16 attributes; 14417ca54c3Smrg} fsXCharInfo; 14517ca54c3Smrg 14617ca54c3Smrgtypedef struct { 14717ca54c3Smrg CARD8 high; 14817ca54c3Smrg CARD8 low; 14917ca54c3Smrg} fsChar2b; 15017ca54c3Smrg 15117ca54c3Smrgtypedef struct { 15217ca54c3Smrg CARD8 low; 15317ca54c3Smrg CARD8 high; 15417ca54c3Smrg} fsChar2b_version1; 15517ca54c3Smrg 15617ca54c3Smrgtypedef struct { 15717ca54c3Smrg CARD8 min_char_high; 15817ca54c3Smrg CARD8 min_char_low; 15917ca54c3Smrg CARD8 max_char_high; 16017ca54c3Smrg CARD8 max_char_low; 16117ca54c3Smrg} fsRange; 16217ca54c3Smrg 16317ca54c3Smrgtypedef struct { 164ea1d6981Smrg CARD32 position; 165ea1d6981Smrg CARD32 length; 16617ca54c3Smrg} fsOffset32; 16717ca54c3Smrg 16817ca54c3Smrgtypedef struct { 16917ca54c3Smrg fsOffset32 name; 17017ca54c3Smrg fsOffset32 value; 17117ca54c3Smrg CARD8 type; 17217ca54c3Smrg BYTE pad0; 173ea1d6981Smrg CARD16 pad1; 17417ca54c3Smrg} fsPropOffset; 17517ca54c3Smrg 17617ca54c3Smrgtypedef struct { 177ea1d6981Smrg CARD32 num_offsets; 178ea1d6981Smrg CARD32 data_len; 17917ca54c3Smrg /* offsets */ 18017ca54c3Smrg /* data */ 18117ca54c3Smrg} fsPropInfo; 18217ca54c3Smrg 18317ca54c3Smrgtypedef struct { 184ea1d6981Smrg CARD16 x_resolution; 185ea1d6981Smrg CARD16 y_resolution; 186ea1d6981Smrg CARD16 point_size; 18717ca54c3Smrg} fsResolution; 18817ca54c3Smrg 189ea1d6981Smrg 19017ca54c3Smrgtypedef struct { 191ea1d6981Smrg CARD32 flags; 19217ca54c3Smrg CARD8 char_range_min_char_high; 19317ca54c3Smrg CARD8 char_range_min_char_low; 19417ca54c3Smrg CARD8 char_range_max_char_high; 19517ca54c3Smrg CARD8 char_range_max_char_low; 19617ca54c3Smrg 19717ca54c3Smrg CARD8 draw_direction; 19817ca54c3Smrg CARD8 pad; 19917ca54c3Smrg CARD8 default_char_high; 20017ca54c3Smrg CARD8 default_char_low; 201ea1d6981Smrg INT16 min_bounds_left; 202ea1d6981Smrg INT16 min_bounds_right; 203ea1d6981Smrg 204ea1d6981Smrg INT16 min_bounds_width; 205ea1d6981Smrg INT16 min_bounds_ascent; 206ea1d6981Smrg INT16 min_bounds_descent; 207ea1d6981Smrg CARD16 min_bounds_attributes; 208ea1d6981Smrg 209ea1d6981Smrg INT16 max_bounds_left; 210ea1d6981Smrg INT16 max_bounds_right; 211ea1d6981Smrg INT16 max_bounds_width; 212ea1d6981Smrg INT16 max_bounds_ascent; 213ea1d6981Smrg 214ea1d6981Smrg INT16 max_bounds_descent; 215ea1d6981Smrg CARD16 max_bounds_attributes; 216ea1d6981Smrg INT16 font_ascent; 217ea1d6981Smrg INT16 font_descent; 21817ca54c3Smrg /* propinfo */ 21917ca54c3Smrg} fsXFontInfoHeader; 22017ca54c3Smrg 22117ca54c3Smrg 22217ca54c3Smrg/* requests */ 22317ca54c3Smrg 22417ca54c3Smrgtypedef struct { 22517ca54c3Smrg BYTE byteOrder; 22617ca54c3Smrg CARD8 num_auths; 227ea1d6981Smrg CARD16 major_version; 228ea1d6981Smrg CARD16 minor_version; 229ea1d6981Smrg CARD16 auth_len; 23017ca54c3Smrg /* auth data */ 23117ca54c3Smrg} fsConnClientPrefix; 23217ca54c3Smrg 23317ca54c3Smrgtypedef struct { 234ea1d6981Smrg CARD16 status; 235ea1d6981Smrg CARD16 major_version; 236ea1d6981Smrg CARD16 minor_version; 23717ca54c3Smrg CARD8 num_alternates; 23817ca54c3Smrg CARD8 auth_index; 239ea1d6981Smrg CARD16 alternate_len; 240ea1d6981Smrg CARD16 auth_len; 24117ca54c3Smrg /* alternates */ 24217ca54c3Smrg /* auth data */ 24317ca54c3Smrg} fsConnSetup; 24417ca54c3Smrg 24517ca54c3Smrgtypedef struct { 246ea1d6981Smrg CARD32 length; 247ea1d6981Smrg CARD16 status; 248ea1d6981Smrg CARD16 pad; 24917ca54c3Smrg /* more auth data */ 25017ca54c3Smrg} fsConnSetupExtra; 25117ca54c3Smrg 25217ca54c3Smrgtypedef struct { 253ea1d6981Smrg CARD32 length; 254ea1d6981Smrg CARD16 max_request_len; 255ea1d6981Smrg CARD16 vendor_len; 256ea1d6981Smrg CARD32 release_number; 25717ca54c3Smrg /* vendor string */ 25817ca54c3Smrg} fsConnSetupAccept; 25917ca54c3Smrg 26017ca54c3Smrgtypedef struct { 26117ca54c3Smrg CARD8 reqType; 26217ca54c3Smrg CARD8 data; 263ea1d6981Smrg CARD16 length; 26417ca54c3Smrg} fsReq; 26517ca54c3Smrg 26617ca54c3Smrg/* 26717ca54c3Smrg * The fsFakeReq structure is never used in the protocol; it is prepended 26817ca54c3Smrg * to incoming packets when setting up a connection so we can index 26917ca54c3Smrg * through InitialVector. To avoid alignment problems, it is padded 27017ca54c3Smrg * to the size of a word on the largest machine this code runs on. 27117ca54c3Smrg * Hence no sz_fsFakeReq constant is necessary. 27217ca54c3Smrg */ 27317ca54c3Smrgtypedef struct { 27417ca54c3Smrg CARD8 reqType; 27517ca54c3Smrg CARD8 data; 276ea1d6981Smrg CARD16 length; 277ea1d6981Smrg CARD32 pad; /* to fill out to multiple of 64 bits */ 27817ca54c3Smrg} fsFakeReq; 27917ca54c3Smrg 28017ca54c3Smrgtypedef struct { 28117ca54c3Smrg CARD8 reqType; 28217ca54c3Smrg BYTE pad; 283ea1d6981Smrg CARD16 length; 284ea1d6981Smrg Font id; 28517ca54c3Smrg} fsResourceReq; 28617ca54c3Smrg 28717ca54c3Smrgtypedef fsReq fsNoopReq; 28817ca54c3Smrgtypedef fsReq fsListExtensionsReq; 28917ca54c3Smrg 29017ca54c3Smrgtypedef struct { 29117ca54c3Smrg CARD8 reqType; 29217ca54c3Smrg BYTE nbytes; 293ea1d6981Smrg CARD16 length; 29417ca54c3Smrg /* name */ 29517ca54c3Smrg} fsQueryExtensionReq; 29617ca54c3Smrg 29717ca54c3Smrgtypedef struct { 29817ca54c3Smrg CARD8 reqType; 29917ca54c3Smrg CARD8 data; 300ea1d6981Smrg CARD16 length; 301ea1d6981Smrg CARD32 maxNames; 302ea1d6981Smrg CARD16 nbytes; 303ea1d6981Smrg CARD16 pad2; 30417ca54c3Smrg /* pattern */ 30517ca54c3Smrg} fsListCataloguesReq; 30617ca54c3Smrg 30717ca54c3Smrgtypedef struct { 30817ca54c3Smrg CARD8 reqType; 30917ca54c3Smrg BYTE num_catalogues; 310ea1d6981Smrg CARD16 length; 31117ca54c3Smrg /* catalogues */ 31217ca54c3Smrg} fsSetCataloguesReq; 31317ca54c3Smrg 31417ca54c3Smrgtypedef fsReq fsGetCataloguesReq; 31517ca54c3Smrg 31617ca54c3Smrgtypedef struct { 31717ca54c3Smrg CARD8 reqType; 31817ca54c3Smrg CARD8 ext_opcode; 319ea1d6981Smrg CARD16 length; 32017ca54c3Smrg Mask event_mask; 32117ca54c3Smrg} fsSetEventMaskReq; 32217ca54c3Smrg 32317ca54c3Smrgtypedef struct { 32417ca54c3Smrg CARD8 reqType; 32517ca54c3Smrg CARD8 ext_opcode; 326ea1d6981Smrg CARD16 length; 32717ca54c3Smrg} fsGetEventMaskReq; 32817ca54c3Smrg 32917ca54c3Smrgtypedef struct { 33017ca54c3Smrg CARD8 reqType; 33117ca54c3Smrg BYTE num_auths; 332ea1d6981Smrg CARD16 length; 333ea1d6981Smrg AccContext acid; 33417ca54c3Smrg /* auth protocols */ 33517ca54c3Smrg} fsCreateACReq; 33617ca54c3Smrg 33717ca54c3Smrgtypedef fsResourceReq fsFreeACReq; 33817ca54c3Smrgtypedef fsResourceReq fsSetAuthorizationReq; 33917ca54c3Smrg 34017ca54c3Smrgtypedef struct { 34117ca54c3Smrg CARD8 reqType; 34217ca54c3Smrg BYTE num_resolutions; 343ea1d6981Smrg CARD16 length; 34417ca54c3Smrg /* resolutions */ 34517ca54c3Smrg} fsSetResolutionReq; 34617ca54c3Smrg 34717ca54c3Smrgtypedef fsReq fsGetResolutionReq; 34817ca54c3Smrg 34917ca54c3Smrgtypedef struct { 35017ca54c3Smrg CARD8 reqType; 35117ca54c3Smrg BYTE pad; 352ea1d6981Smrg CARD16 length; 353ea1d6981Smrg CARD32 maxNames; 354ea1d6981Smrg CARD16 nbytes; 355ea1d6981Smrg CARD16 pad2; 35617ca54c3Smrg /* pattern */ 35717ca54c3Smrg} fsListFontsReq; 35817ca54c3Smrg 35917ca54c3Smrgtypedef fsListFontsReq fsListFontsWithXInfoReq; 36017ca54c3Smrg 36117ca54c3Smrgtypedef struct { 36217ca54c3Smrg CARD8 reqType; 36317ca54c3Smrg BYTE pad; 364ea1d6981Smrg CARD16 length; 365ea1d6981Smrg Font fid; 366ea1d6981Smrg fsBitmapFormatMask format_mask; 367ea1d6981Smrg fsBitmapFormat format_hint; 36817ca54c3Smrg /* pattern */ 36917ca54c3Smrg} fsOpenBitmapFontReq; 37017ca54c3Smrg 37117ca54c3Smrgtypedef fsResourceReq fsQueryXInfoReq; 37217ca54c3Smrg 37317ca54c3Smrgtypedef struct { 37417ca54c3Smrg CARD8 reqType; 37517ca54c3Smrg BOOL range; 376ea1d6981Smrg CARD16 length; 377ea1d6981Smrg Font fid; 378ea1d6981Smrg CARD32 num_ranges; 37917ca54c3Smrg /* list of chars */ 38017ca54c3Smrg} fsQueryXExtents8Req; 38117ca54c3Smrg 38217ca54c3Smrgtypedef fsQueryXExtents8Req fsQueryXExtents16Req; 38317ca54c3Smrg 38417ca54c3Smrgtypedef struct { 38517ca54c3Smrg CARD8 reqType; 38617ca54c3Smrg BOOL range; 387ea1d6981Smrg CARD16 length; 388ea1d6981Smrg Font fid; 389ea1d6981Smrg fsBitmapFormat format; 390ea1d6981Smrg CARD32 num_ranges; 39117ca54c3Smrg /* list of chars */ 39217ca54c3Smrg} fsQueryXBitmaps8Req; 39317ca54c3Smrg 39417ca54c3Smrgtypedef fsQueryXBitmaps8Req fsQueryXBitmaps16Req; 39517ca54c3Smrg 39617ca54c3Smrgtypedef fsResourceReq fsCloseReq; 39717ca54c3Smrg 39817ca54c3Smrg 39917ca54c3Smrg/* replies */ 40017ca54c3Smrgtypedef struct { 40117ca54c3Smrg BYTE type; 40217ca54c3Smrg BYTE data1; 403ea1d6981Smrg CARD16 sequenceNumber; 404ea1d6981Smrg CARD32 length; 40517ca54c3Smrg} fsGenericReply; 40617ca54c3Smrg 40717ca54c3Smrgtypedef struct { 40817ca54c3Smrg BYTE type; 40917ca54c3Smrg CARD8 nExtensions; 410ea1d6981Smrg CARD16 sequenceNumber; 411ea1d6981Smrg CARD32 length; 41217ca54c3Smrg /* extension names */ 41317ca54c3Smrg} fsListExtensionsReply; 41417ca54c3Smrg 41517ca54c3Smrgtypedef struct { 41617ca54c3Smrg BYTE type; 41717ca54c3Smrg CARD8 present; 418ea1d6981Smrg CARD16 sequenceNumber; 419ea1d6981Smrg CARD32 length; 420ea1d6981Smrg CARD16 major_version; 421ea1d6981Smrg CARD16 minor_version; 42217ca54c3Smrg CARD8 major_opcode; 42317ca54c3Smrg CARD8 first_event; 42417ca54c3Smrg CARD8 num_events; 42517ca54c3Smrg CARD8 first_error; 42617ca54c3Smrg CARD8 num_errors; 42717ca54c3Smrg CARD8 pad1; 428ea1d6981Smrg CARD16 pad2; 42917ca54c3Smrg} fsQueryExtensionReply; 43017ca54c3Smrg 43117ca54c3Smrgtypedef struct { 43217ca54c3Smrg BYTE type; 43317ca54c3Smrg BYTE pad; 434ea1d6981Smrg CARD16 sequenceNumber; 435ea1d6981Smrg CARD32 length; 436ea1d6981Smrg CARD32 num_replies; 437ea1d6981Smrg CARD32 num_catalogues; 43817ca54c3Smrg /* catalog names */ 43917ca54c3Smrg} fsListCataloguesReply; 44017ca54c3Smrg 44117ca54c3Smrgtypedef struct { 44217ca54c3Smrg BYTE type; 44317ca54c3Smrg CARD8 num_catalogues; 444ea1d6981Smrg CARD16 sequenceNumber; 445ea1d6981Smrg CARD32 length; 44617ca54c3Smrg /* catalogue names */ 44717ca54c3Smrg} fsGetCataloguesReply; 44817ca54c3Smrg 44917ca54c3Smrgtypedef struct { 45017ca54c3Smrg BYTE type; 45117ca54c3Smrg BYTE pad1; 452ea1d6981Smrg CARD16 sequenceNumber; 453ea1d6981Smrg CARD32 length; 454ea1d6981Smrg CARD32 event_mask; 45517ca54c3Smrg} fsGetEventMaskReply; 45617ca54c3Smrg 45717ca54c3Smrgtypedef struct { 45817ca54c3Smrg BYTE type; 45917ca54c3Smrg CARD8 auth_index; 460ea1d6981Smrg CARD16 sequenceNumber; 461ea1d6981Smrg CARD32 length; 462ea1d6981Smrg CARD16 status; 463ea1d6981Smrg CARD16 pad; 46417ca54c3Smrg /* auth data */ 46517ca54c3Smrg} fsCreateACReply; 46617ca54c3Smrg 46717ca54c3Smrgtypedef struct { 468ea1d6981Smrg CARD32 length; 469ea1d6981Smrg CARD16 status; 470ea1d6981Smrg CARD16 pad; 47117ca54c3Smrg /* auth data */ 47217ca54c3Smrg} fsCreateACExtraReply; 47317ca54c3Smrg 47417ca54c3Smrgtypedef struct { 47517ca54c3Smrg BYTE type; 47617ca54c3Smrg CARD8 num_resolutions; 477ea1d6981Smrg CARD16 sequenceNumber; 478ea1d6981Smrg CARD32 length; 47917ca54c3Smrg /* resolutions */ 48017ca54c3Smrg} fsGetResolutionReply; 48117ca54c3Smrg 48217ca54c3Smrgtypedef struct { 48317ca54c3Smrg BYTE type; 48417ca54c3Smrg BYTE pad1; 485ea1d6981Smrg CARD16 sequenceNumber; 486ea1d6981Smrg CARD32 length; 487ea1d6981Smrg CARD32 following; 488ea1d6981Smrg CARD32 nFonts; 48917ca54c3Smrg /* font names */ 49017ca54c3Smrg} fsListFontsReply; 49117ca54c3Smrg 49217ca54c3Smrg/* 49317ca54c3Smrg * this one is messy. the reply itself is variable length (unknown 49417ca54c3Smrg * number of replies) and the contents of each is variable (unknown 49517ca54c3Smrg * number of properties) 49617ca54c3Smrg * 49717ca54c3Smrg */ 49817ca54c3Smrg 49917ca54c3Smrgtypedef struct { 50017ca54c3Smrg BYTE type; 50117ca54c3Smrg CARD8 nameLength; /* 0 is end-of-reply */ 502ea1d6981Smrg CARD16 sequenceNumber; 503ea1d6981Smrg CARD32 length; 504ea1d6981Smrg CARD32 nReplies; 505ea1d6981Smrg CARD32 font_header_flags; 50617ca54c3Smrg CARD8 font_hdr_char_range_min_char_high; 50717ca54c3Smrg CARD8 font_hdr_char_range_min_char_low; 50817ca54c3Smrg CARD8 font_hdr_char_range_max_char_high; 50917ca54c3Smrg CARD8 font_hdr_char_range_max_char_low; 51017ca54c3Smrg CARD8 font_header_draw_direction; 51117ca54c3Smrg CARD8 font_header_pad; 51217ca54c3Smrg CARD8 font_header_default_char_high; 51317ca54c3Smrg CARD8 font_header_default_char_low; 514ea1d6981Smrg INT16 font_header_min_bounds_left; 515ea1d6981Smrg INT16 font_header_min_bounds_right; 516ea1d6981Smrg INT16 font_header_min_bounds_width; 517ea1d6981Smrg INT16 font_header_min_bounds_ascent; 518ea1d6981Smrg INT16 font_header_min_bounds_descent; 519ea1d6981Smrg CARD16 font_header_min_bounds_attributes; 520ea1d6981Smrg INT16 font_header_max_bounds_left; 521ea1d6981Smrg INT16 font_header_max_bounds_right; 522ea1d6981Smrg INT16 font_header_max_bounds_width; 523ea1d6981Smrg INT16 font_header_max_bounds_ascent; 524ea1d6981Smrg INT16 font_header_max_bounds_descent; 525ea1d6981Smrg CARD16 font_header_max_bounds_attributes; 526ea1d6981Smrg INT16 font_header_font_ascent; 527ea1d6981Smrg INT16 font_header_font_descent; 52817ca54c3Smrg /* propinfo */ 52917ca54c3Smrg /* name */ 53017ca54c3Smrg} fsListFontsWithXInfoReply; 531ea1d6981Smrg 53217ca54c3Smrgtypedef struct { 53317ca54c3Smrg BYTE type; 53417ca54c3Smrg CARD8 otherid_valid; 535ea1d6981Smrg CARD16 sequenceNumber; 536ea1d6981Smrg CARD32 length; 537ea1d6981Smrg CARD32 otherid; 53817ca54c3Smrg BYTE cachable; 53917ca54c3Smrg BYTE pad1; 540ea1d6981Smrg CARD16 pad2; 54117ca54c3Smrg} fsOpenBitmapFontReply; 54217ca54c3Smrg 54317ca54c3Smrgtypedef struct { 54417ca54c3Smrg BYTE type; 54517ca54c3Smrg CARD8 pad0; 546ea1d6981Smrg CARD16 sequenceNumber; 547ea1d6981Smrg CARD32 length; 548ea1d6981Smrg CARD32 font_header_flags; 54917ca54c3Smrg CARD8 font_hdr_char_range_min_char_high; 55017ca54c3Smrg CARD8 font_hdr_char_range_min_char_low; 55117ca54c3Smrg CARD8 font_hdr_char_range_max_char_high; 55217ca54c3Smrg CARD8 font_hdr_char_range_max_char_low; 55317ca54c3Smrg CARD8 font_header_draw_direction; 55417ca54c3Smrg CARD8 font_header_pad; 55517ca54c3Smrg CARD8 font_header_default_char_high; 55617ca54c3Smrg CARD8 font_header_default_char_low; 557ea1d6981Smrg INT16 font_header_min_bounds_left; 558ea1d6981Smrg INT16 font_header_min_bounds_right; 559ea1d6981Smrg INT16 font_header_min_bounds_width; 560ea1d6981Smrg INT16 font_header_min_bounds_ascent; 561ea1d6981Smrg INT16 font_header_min_bounds_descent; 562ea1d6981Smrg CARD16 font_header_min_bounds_attributes; 563ea1d6981Smrg INT16 font_header_max_bounds_left; 564ea1d6981Smrg INT16 font_header_max_bounds_right; 565ea1d6981Smrg INT16 font_header_max_bounds_width; 566ea1d6981Smrg INT16 font_header_max_bounds_ascent; 567ea1d6981Smrg INT16 font_header_max_bounds_descent; 568ea1d6981Smrg CARD16 font_header_max_bounds_attributes; 569ea1d6981Smrg INT16 font_header_font_ascent; 570ea1d6981Smrg INT16 font_header_font_descent; 57117ca54c3Smrg /* propinfo */ 57217ca54c3Smrg} fsQueryXInfoReply; 57317ca54c3Smrg 57417ca54c3Smrgtypedef struct { 57517ca54c3Smrg BYTE type; 57617ca54c3Smrg CARD8 pad0; 577ea1d6981Smrg CARD16 sequenceNumber; 578ea1d6981Smrg CARD32 length; 579ea1d6981Smrg CARD32 num_extents; 58017ca54c3Smrg /* extents */ 58117ca54c3Smrg} fsQueryXExtents8Reply; 58217ca54c3Smrg 58317ca54c3Smrgtypedef fsQueryXExtents8Reply fsQueryXExtents16Reply; 58417ca54c3Smrg 58517ca54c3Smrgtypedef struct { 58617ca54c3Smrg BYTE type; 58717ca54c3Smrg CARD8 pad0; 588ea1d6981Smrg CARD16 sequenceNumber; 589ea1d6981Smrg CARD32 length; 590ea1d6981Smrg CARD32 replies_hint; 591ea1d6981Smrg CARD32 num_chars; 592ea1d6981Smrg CARD32 nbytes; 59317ca54c3Smrg /* offsets */ 59417ca54c3Smrg /* glyphs */ 59517ca54c3Smrg} fsQueryXBitmaps8Reply; 59617ca54c3Smrg 59717ca54c3Smrgtypedef fsQueryXBitmaps8Reply fsQueryXBitmaps16Reply; 59817ca54c3Smrg 59917ca54c3Smrgtypedef union { 60017ca54c3Smrg fsGenericReply generic; 60117ca54c3Smrg fsListExtensionsReply extensions; 60217ca54c3Smrg fsGetResolutionReply getres; 60317ca54c3Smrg} fsReply; 60417ca54c3Smrg 60517ca54c3Smrg/* errors */ 60617ca54c3Smrgtypedef struct { 60717ca54c3Smrg BYTE type; 60817ca54c3Smrg BYTE request; 609ea1d6981Smrg CARD16 sequenceNumber; 610ea1d6981Smrg CARD32 length; 61117ca54c3Smrg fsTimestamp timestamp; 61217ca54c3Smrg CARD8 major_opcode; 61317ca54c3Smrg CARD8 minor_opcode; 614ea1d6981Smrg CARD16 pad; 61517ca54c3Smrg} fsError; 61617ca54c3Smrg 61717ca54c3Smrgtypedef struct { 61817ca54c3Smrg BYTE type; 61917ca54c3Smrg BYTE request; 620ea1d6981Smrg CARD16 sequenceNumber; 621ea1d6981Smrg CARD32 length; 62217ca54c3Smrg fsTimestamp timestamp; 62317ca54c3Smrg CARD8 major_opcode; 62417ca54c3Smrg CARD8 minor_opcode; 625ea1d6981Smrg CARD16 pad; 62617ca54c3Smrg} fsRequestError; 62717ca54c3Smrg 62817ca54c3Smrgtypedef struct { 62917ca54c3Smrg BYTE type; 63017ca54c3Smrg BYTE request; 631ea1d6981Smrg CARD16 sequenceNumber; 632ea1d6981Smrg CARD32 length; 63317ca54c3Smrg fsTimestamp timestamp; 63417ca54c3Smrg CARD8 major_opcode; 63517ca54c3Smrg CARD8 minor_opcode; 636ea1d6981Smrg CARD16 pad; 637ea1d6981Smrg fsBitmapFormat format; 63817ca54c3Smrg} fsFormatError; 63917ca54c3Smrg 64017ca54c3Smrgtypedef struct { 64117ca54c3Smrg BYTE type; 64217ca54c3Smrg BYTE request; 643ea1d6981Smrg CARD16 sequenceNumber; 644ea1d6981Smrg CARD32 length; 64517ca54c3Smrg fsTimestamp timestamp; 64617ca54c3Smrg CARD8 major_opcode; 64717ca54c3Smrg CARD8 minor_opcode; 648ea1d6981Smrg CARD16 pad; 64917ca54c3Smrg Font fontid; 65017ca54c3Smrg} fsFontError; 65117ca54c3Smrg 65217ca54c3Smrgtypedef struct { 65317ca54c3Smrg BYTE type; 65417ca54c3Smrg BYTE request; 655ea1d6981Smrg CARD16 sequenceNumber; 656ea1d6981Smrg CARD32 length; 65717ca54c3Smrg fsTimestamp timestamp; 65817ca54c3Smrg CARD8 major_opcode; 65917ca54c3Smrg CARD8 minor_opcode; 660ea1d6981Smrg CARD16 pad; 66117ca54c3Smrg fsRange range; 66217ca54c3Smrg} fsRangeError; 66317ca54c3Smrg 66417ca54c3Smrgtypedef struct { 66517ca54c3Smrg BYTE type; 66617ca54c3Smrg BYTE request; 667ea1d6981Smrg CARD16 sequenceNumber; 668ea1d6981Smrg CARD32 length; 66917ca54c3Smrg fsTimestamp timestamp; 67017ca54c3Smrg CARD8 major_opcode; 67117ca54c3Smrg CARD8 minor_opcode; 672ea1d6981Smrg CARD16 pad; 67317ca54c3Smrg Mask event_mask; 67417ca54c3Smrg} fsEventMaskError; 67517ca54c3Smrg 67617ca54c3Smrgtypedef struct { 67717ca54c3Smrg BYTE type; 67817ca54c3Smrg BYTE request; 679ea1d6981Smrg CARD16 sequenceNumber; 680ea1d6981Smrg CARD32 length; 68117ca54c3Smrg fsTimestamp timestamp; 68217ca54c3Smrg CARD8 major_opcode; 68317ca54c3Smrg CARD8 minor_opcode; 684ea1d6981Smrg CARD16 pad; 68517ca54c3Smrg AccContext acid; 68617ca54c3Smrg} fsAccessContextError; 68717ca54c3Smrg 68817ca54c3Smrgtypedef struct { 68917ca54c3Smrg BYTE type; 69017ca54c3Smrg BYTE request; 691ea1d6981Smrg CARD16 sequenceNumber; 692ea1d6981Smrg CARD32 length; 69317ca54c3Smrg fsTimestamp timestamp; 69417ca54c3Smrg CARD8 major_opcode; 69517ca54c3Smrg CARD8 minor_opcode; 696ea1d6981Smrg CARD16 pad; 69717ca54c3Smrg Font fontid; 69817ca54c3Smrg} fsIDChoiceError; 69917ca54c3Smrg 70017ca54c3Smrgtypedef struct { 70117ca54c3Smrg BYTE type; 70217ca54c3Smrg BYTE request; 703ea1d6981Smrg CARD16 sequenceNumber; 704ea1d6981Smrg CARD32 length; 70517ca54c3Smrg fsTimestamp timestamp; 70617ca54c3Smrg CARD8 major_opcode; 70717ca54c3Smrg CARD8 minor_opcode; 708ea1d6981Smrg CARD16 pad; 70917ca54c3Smrg} fsNameError; 71017ca54c3Smrg 71117ca54c3Smrgtypedef struct { 71217ca54c3Smrg BYTE type; 71317ca54c3Smrg BYTE request; 714ea1d6981Smrg CARD16 sequenceNumber; 715ea1d6981Smrg CARD32 length; 71617ca54c3Smrg fsTimestamp timestamp; 71717ca54c3Smrg CARD8 major_opcode; 71817ca54c3Smrg CARD8 minor_opcode; 71917ca54c3Smrg fsResolution resolution; 72017ca54c3Smrg} fsResolutionError; 72117ca54c3Smrg 72217ca54c3Smrgtypedef struct { 72317ca54c3Smrg BYTE type; 72417ca54c3Smrg BYTE request; 725ea1d6981Smrg CARD16 sequenceNumber; 726ea1d6981Smrg CARD32 length; 72717ca54c3Smrg fsTimestamp timestamp; 72817ca54c3Smrg CARD8 major_opcode; 72917ca54c3Smrg CARD8 minor_opcode; 730ea1d6981Smrg CARD16 pad; 73117ca54c3Smrg} fsAllocError; 73217ca54c3Smrg 73317ca54c3Smrgtypedef struct { 73417ca54c3Smrg BYTE type; 73517ca54c3Smrg BYTE request; 736ea1d6981Smrg CARD16 sequenceNumber; 737ea1d6981Smrg CARD32 length; 73817ca54c3Smrg fsTimestamp timestamp; 73917ca54c3Smrg CARD8 major_opcode; 74017ca54c3Smrg CARD8 minor_opcode; 741ea1d6981Smrg CARD16 pad; 742ea1d6981Smrg CARD32 bad_length; 74317ca54c3Smrg} fsLengthError; 74417ca54c3Smrg 74517ca54c3Smrgtypedef struct { 74617ca54c3Smrg BYTE type; 74717ca54c3Smrg BYTE request; 748ea1d6981Smrg CARD16 sequenceNumber; 749ea1d6981Smrg CARD32 length; 75017ca54c3Smrg fsTimestamp timestamp; 75117ca54c3Smrg CARD8 major_opcode; 75217ca54c3Smrg CARD8 minor_opcode; 753ea1d6981Smrg CARD16 pad; 75417ca54c3Smrg} fsImplementationError; 75517ca54c3Smrg 75617ca54c3Smrg/* events */ 75717ca54c3Smrgtypedef struct { 75817ca54c3Smrg BYTE type; 75917ca54c3Smrg BYTE event_code; 760ea1d6981Smrg CARD16 sequenceNumber; 761ea1d6981Smrg CARD32 length; 76217ca54c3Smrg fsTimestamp timestamp; 76317ca54c3Smrg} fsKeepAliveEvent; 76417ca54c3Smrg 76517ca54c3Smrgtypedef struct { 76617ca54c3Smrg BYTE type; 76717ca54c3Smrg BYTE event_code; 768ea1d6981Smrg CARD16 sequenceNumber; 769ea1d6981Smrg CARD32 length; 77017ca54c3Smrg fsTimestamp timestamp; 77117ca54c3Smrg BOOL added; 77217ca54c3Smrg BOOL deleted; 773ea1d6981Smrg CARD16 pad; 77417ca54c3Smrg} fsCatalogueChangeNotifyEvent; 77517ca54c3Smrg 77617ca54c3Smrgtypedef fsCatalogueChangeNotifyEvent fsFontChangeNotifyEvent; 77717ca54c3Smrg 77817ca54c3Smrgtypedef fsCatalogueChangeNotifyEvent fsEvent; 77917ca54c3Smrg 78017ca54c3Smrg/* reply codes */ 78117ca54c3Smrg#define FS_Reply 0 /* normal reply */ 78217ca54c3Smrg#define FS_Error 1 /* error */ 78317ca54c3Smrg#define FS_Event 2 78417ca54c3Smrg 78517ca54c3Smrg/* request codes */ 78617ca54c3Smrg#define FS_Noop 0 78717ca54c3Smrg#define FS_ListExtensions 1 78817ca54c3Smrg#define FS_QueryExtension 2 78917ca54c3Smrg#define FS_ListCatalogues 3 79017ca54c3Smrg#define FS_SetCatalogues 4 79117ca54c3Smrg#define FS_GetCatalogues 5 79217ca54c3Smrg#define FS_SetEventMask 6 79317ca54c3Smrg#define FS_GetEventMask 7 79417ca54c3Smrg#define FS_CreateAC 8 79517ca54c3Smrg#define FS_FreeAC 9 79617ca54c3Smrg#define FS_SetAuthorization 10 79717ca54c3Smrg#define FS_SetResolution 11 79817ca54c3Smrg#define FS_GetResolution 12 79917ca54c3Smrg#define FS_ListFonts 13 80017ca54c3Smrg#define FS_ListFontsWithXInfo 14 80117ca54c3Smrg#define FS_OpenBitmapFont 15 80217ca54c3Smrg#define FS_QueryXInfo 16 80317ca54c3Smrg#define FS_QueryXExtents8 17 80417ca54c3Smrg#define FS_QueryXExtents16 18 80517ca54c3Smrg#define FS_QueryXBitmaps8 19 80617ca54c3Smrg#define FS_QueryXBitmaps16 20 80717ca54c3Smrg#define FS_CloseFont 21 80817ca54c3Smrg 80917ca54c3Smrg/* restore decls */ 81017ca54c3Smrg#undef Mask 81117ca54c3Smrg#undef Font 81217ca54c3Smrg#undef AccContext 81317ca54c3Smrg 81417ca54c3Smrg#endif /* _FS_PROTO_H_ */ 815