Skip to content

Protocol Encoding

Numbers that are prefixed with "#x" are in hexadecimal (base 16). All other numbers are in decimal. Requests, replies, errors, events, and compound types are described using the syntax:


    Name
     count          contents     name
     ...
     count          contents     name

where COUNT is the number of bytes in the data stream occupied by this field, CONTENTS is the name of the type as given in Section 4 or the value if this field contains a constant, and NAME is a description of this field.

Objects containing counted lists use a lowercase single-letter variable (whose scope is limited to the request, reply, event, or error in which it is found) to represent the number of objects in the list. These variables, and any expressions in which they are used, should be treated as unsigned integers. Multiple copies of an object are indicated by CONTENTS prefix "LISTof".

Unused bytes (whose value is undefined) will have a blank CONTENTS field and a NAME field of "unused". Zeroed bytes (whose value must be zero) will have a blank CONTENTS field and a NAME field of "zero". The expression pad(e) refers to the number of bytes needed to round a value "e" up to the closed multiple of four:


     pad(e) = (4 - (e mod 4)) mod 4

Data Types

ACCESSCONTEXT

4 CARD32 access context with at least one of the following bits set:

#x1fffffff

but none of the following bits set:

#xe0000000               zero


ALTERNATESERVER
1     BOOL               subset
1     n                  length of name
n     STRING8            name
p                        unused, p=pad(n+2)

AUTH

2     n                  length of name
2     d                  length of data
n     STRING8            name
p                        unused, p=pad(n)
d     STRING8            data
q                        unused, q=pad(d)


BITMAPFORMAT

4 CARD32 value, union of the following bits:
     #x00000001           ByteOrderMSB
     #x00000002           BitOrderMSB
     #x00000000           ImageRectMin
     #x00000004           ImageRectMaxWidth
     #x00000008           ImageRectMax
     #x00000000           ScanlinePad8
     #x00000100           ScanlinePad16
     #x00000200           ScanlinePad32
     #x00000300           ScanlinePad64
     #x00000000           ScanlineUnit8
     #x00001000           ScanlineUnit16
     #x00002000           ScanlineUnit32
     #x00003000           ScanlineUnit64

except for the following bits which must be zero:

     #xffffccf0           zero

and the following of which at most one bit may be set:

     #x0000000c at most one bit can be set


BITMAPFORMATMASK

4 CARD32 value, mask of the following bits:

     #x00000001           ByteOrderMask
     #x00000002           BitOrderMask
     #x00000004           ImageRectMask
     #x00000008           ScanlinePadMask
     #x00000010           ScanlineUnitMask

except for the following bits which must be zero:

     #xffffffe0           zero

BOOL

1    BOOL       boolean, one of the following values:
0    False
1    True

BYTE
1    BYTE       unsigned byte of data

CARD8
1    CARD8       8-bit unsigned integer

CARD16
2    CARD16      16-bit unsigned integer

CARD32
4    CARD32      32-bit unsigned integer

CHAR2B
1    CARD8       byte1
1    CARD8       byte2

EVENTMASK
4    CARD32 event mask
     for core events, this is union of the following bits:

     #00000001   CatalogueListChangeMask
     #00000002   FontListChangeMask

but none of the following bits set:

     #fffffffc

extensions define their own sets of bits

FONTID

4 CARD32 font identifier with at least one of
the following bits set:

     #x1fffffff

but none of the following bits set:

     #xe0000000   zero

INT8
1    INT8         8-bit signed integer

INT16
2    INT16         16-bit signed integer

INT32
4    INT32         32-bit signed integer

OFFSET32
4    CARD32         position (or integer value)
4    CARD32         length

PROPINFO
4    n                 number of PROPOFFSET components
4    m                 number of bytes of property data
20*n PROPOFFSET         property offsets into data block
m    LISTofBYTE         property data block

PROPOFFSET
8    OFFSET32         name in data block
8    OFFSET32         value in data block

1 CARD8 type, one of the following values:
0    String
1    Unsigned
2    Signed
3    zero

RANGE
2    CHAR2B                 minimum character code
2    CHAR2B         maximum character code

RESOLUTION
2    CARD16 x resolution in pixels per inch
2    CARD16 y resolution in pixels per inch
2    CARD16 point size in decipoints

STRNAME
1    n length of name
n    STRING8 name

STRING8
n    LISTofBYTE         array of 8-bit character values

TIMESTAMP
4    CARD32         milliseconds since server time origin

XCHARINFO
2    INT16         left bearing
2    INT16         right bearing
2    INT16         width
2    INT16         ascent
2    INT16         descent
2    CARD16         attributes

XFONTINFO
4 CARD32 flags, union of the following bits:
     #x00000001         AllCharactersExist
     #x00000002         InkInside
     #x00000004         HorizontalOverlap

but none of the following bits set:

     #xfffffff8         zero
4    RANGE              range of characters in font
1    CARD8              drawing direction
     0             LeftToRight
     1             RightToLeft
1                       unused
2    CHAR2B             default character
12   XCHARINFO          minimum bounds
12   XCHARINFO          maximum bounds
2    INT16              font ascent
2    INT16              font descent
n    PROPINFO           property data
ACCESSCONTEXT

4 CARD32 access context with at least one of the following bits set:

#x1fffffff

but none of the following bits set:

#xe0000000               zero


ALTERNATESERVER
1     BOOL               subset
1     n                  length of name
n     STRING8            name
p                        unused, p=pad(n+2)

AUTH

2     n                  length of name
2     d                  length of data
n     STRING8            name
p                        unused, p=pad(n)
d     STRING8            data
q                        unused, q=pad(d)


BITMAPFORMAT

4 CARD32 value, union of the following bits:
     #x00000001           ByteOrderMSB
     #x00000002           BitOrderMSB
     #x00000000           ImageRectMin
     #x00000004           ImageRectMaxWidth
     #x00000008           ImageRectMax
     #x00000000           ScanlinePad8
     #x00000100           ScanlinePad16
     #x00000200           ScanlinePad32
     #x00000300           ScanlinePad64
     #x00000000           ScanlineUnit8
     #x00001000           ScanlineUnit16
     #x00002000           ScanlineUnit32
     #x00003000           ScanlineUnit64

except for the following bits which must be zero:

     #xffffccf0           zero

and the following of which at most one bit may be set:

     #x0000000c at most one bit can be set


BITMAPFORMATMASK

4 CARD32 value, mask of the following bits:

     #x00000001           ByteOrderMask
     #x00000002           BitOrderMask
     #x00000004           ImageRectMask
     #x00000008           ScanlinePadMask
     #x00000010           ScanlineUnitMask

except for the following bits which must be zero:

     #xffffffe0           zero

BOOL

1    BOOL       boolean, one of the following values:
0    False
1    True

BYTE
1    BYTE       unsigned byte of data

CARD8
1    CARD8       8-bit unsigned integer

CARD16
2    CARD16      16-bit unsigned integer

CARD32
4    CARD32      32-bit unsigned integer

CHAR2B
1    CARD8       byte1
1    CARD8       byte2

EVENTMASK
4    CARD32 event mask
     for core events, this is union of the following bits:

     #00000001   CatalogueListChangeMask
     #00000002   FontListChangeMask

but none of the following bits set:

     #fffffffc

extensions define their own sets of bits

FONTID

4 CARD32 font identifier with at least one of
the following bits set:

     #x1fffffff

but none of the following bits set:

     #xe0000000   zero

INT8
1    INT8         8-bit signed integer

INT16
2    INT16         16-bit signed integer

INT32
4    INT32         32-bit signed integer

OFFSET32
4    CARD32         position (or integer value)
4    CARD32         length

PROPINFO
4    n                 number of PROPOFFSET components
4    m                 number of bytes of property data
20*n PROPOFFSET         property offsets into data block
m    LISTofBYTE         property data block

PROPOFFSET
8    OFFSET32         name in data block
8    OFFSET32         value in data block

1 CARD8 type, one of the following values:
0    String
1    Unsigned
2    Signed
3    zero

RANGE
2    CHAR2B                 minimum character code
2    CHAR2B         maximum character code

RESOLUTION
2    CARD16 x resolution in pixels per inch
2    CARD16 y resolution in pixels per inch
2    CARD16 point size in decipoints

STRNAME
1    n length of name
n    STRING8 name

STRING8
n    LISTofBYTE         array of 8-bit character values

TIMESTAMP
4    CARD32         milliseconds since server time origin

XCHARINFO
2    INT16         left bearing
2    INT16         right bearing
2    INT16         width
2    INT16         ascent
2    INT16         descent
2    CARD16         attributes

XFONTINFO
4 CARD32 flags, union of the following bits:
     #x00000001         AllCharactersExist
     #x00000002         InkInside
     #x00000004         HorizontalOverlap

but none of the following bits set:

     #xfffffff8         zero
4    RANGE              range of characters in font
1    CARD8              drawing direction
     0             LeftToRight
     1             RightToLeft
1                       unused
2    CHAR2B             default character
12   XCHARINFO          minimum bounds
12   XCHARINFO          maximum bounds
2    INT16              font ascent
2    INT16              font descent
n    PROPINFO           property data

Requests

open connection

1     BYTE                   byteorder, one of the values:
      #x42                   MostSignificant Byte first
      #x6c                   LeastSignificant Byte first
1     CARD8                  numberof auth in auth-data
2     2                      client-major-protocol-version
2     0                      client-minor-protocol-version
2     a/4 lengthof           auth-data
a     LISTofAUTH             auth-data
=>
2     CARD16                 status
0                            Success
1                            Continue
2                            Busy
3                            Denied
2     2                      major version
2     0                      version
1     CARD8                  numberof alternate-servers-hint
1     CARD8                  authorization-index
2     a/4                    lengthof alternate-servers-hint
2     (d+q)/4                lengthof authorization-data
a     LISTofALTERNATESERVER  alternate-servers-hint
d     LISTofBYTE             authorization-data
q                            unused, q=pad(d)

If STATUS is Busy or Denied, the protocol stops and the connection is closed. If STATUS is Continue, the client is expected to respond with additional data, to which the server responds with a new status value and more data. This dialog continues until the status is set to Success, or until the server sets STATUS to Busy or Denied and closes the connection:

->
4     1+(d+q)/4              length
d     LISTofBYTE             more-authorization-data
q                            unused, q=pad(d)
=>
4     2+(d+q)/4              length
2     CARD16                 status
        0                    Success
      1                      Continue
      2                      Busy
      3                      Denied
      2                      unused
d     LISTofBYTE             more-authorization-data
q                            unused, q=pad(d)

When STATUS is Success, the protocol resumes with the following sent by the server:

4     3+(v+w)/4              length of rest of data
2     CARD16                 maximum-request-length
2     v                      length of vendor string
4     CARD32                 release-number
v     STRING8                vendor-string
w                            unused, w=pad(v)

Once the connection has been established, the client may send the following requests:

NoOp
1   0                        major-opcode
1                            unused
2   1                        length

ListExtensions
1   1                        major-opcode
1                            unused
2   1                        length
=>
1   0                        type reply
1   CARD8                    numberof names
2   CARD16                   sequence-number
4   2+(n+p)/4                length
n   LISTofSTRNAME            names
p                            unused, p=pad(n)

QueryExtension
1   2                        major-opcode
1   n                        length of name
2   1+(n+p)/4                length
n   STRING8                  name
p                            unused, p=pad(n)
=>
1   0                        type reply
1   BOOL                     present
2   CARD16                   sequence-number
4   5                        length
2   CARD16                   major-version
2   CARD16                   minor-version
1   CARD8                    major-opcode
1   CARD8                    first-event
1   CARD8                    number-events
1   CARD8                    first-error
1   CARD8                    number-errors
3                            unused

ListCatalogues
1   3                        major-opcode
1                            unused
2   3+(n+p)/4                length
4   CARD32                   max-names
2   n                        length of pattern
2                            unused
n   STRING8                  pattern
p                            unused, p=pad(n)
=>+
1   0                        type reply
1                            unused
2   CARD16                   sequence-number
4   4+(n+p)/4                length
4   CARD32                   replies-following-hint
4   CARD32                   numberof catalogue-names
n   LISTofSTRNAME            catalogue-names
p                            unused, p=pad(n)

SetCatalogues
1   4                        major-opcode
1   CARD8                    numberof catalogue-names
2   1+(n+p)/4                length
n   LISTofSTRNAME            catalogue-names
p                            unused, p=pad(n)

GetCatalogues
1   5                        major-opcode
1                            unused
2   1                        length
=>
1   0                        type reply
1   CARD8                    numberof catalogue-names
2   CARD16                   sequence-number
4   2+(n+p)/4                length
n   LISTofSTRNAME            catalogue-names
p                            unused, p=pad(n)

SetEventMask
1   6                        major-opcode
1   CARD8                    extension-opcode
2   2                        length
4   EVENTMASK                event-mask

GetEventMask
1   7                        major-opcode
1   CARD8                    extension-opcode
2   1                        length
=>
1   0                        type reply
1                            unused
2   CARD16                   sequence-number
4   3                        length
4   EVENTMASK                event-mask

CreateAC
1   8                        major-opcode
1   CARD8                    numberof authorization-protocols
2   2+a/4                    length
4   ACCESSCONTEXT            ac
a   LISTofAUTH               authorization-protocols
=>
1   0                        type reply
1   CARD8                    authorization-index
2   CARD16                   sequence-number
4   3+(d+q)/4                length
2   CARD16                   status
    0 Success
    1 Continue
    2 Busy
    3 Denied
2                            unused
d   LISTofBYTE               authorization-data
q                            unused, q=pad(d)

If STATUS is Continue, the client is expected to respond with additional data, to which the server responds with a new status value and more data. This dialog continues until the status is set to Success, Busy, or Denied at which point the request is finished.

->
4   1+(d+q)/4                length
d   LISTofBYTE               more-authorization-data
q                            unused, q=pad(d)
=>
4   2+(d+q)/4                length
2   CARD16                   status
    0 Success
    1 Continue
    2 Busy
    3 Denied
2                            unused
d   LISTofBYTE               authorization-data
q                            unused, q=pad(d)

FreeAC
1   9                        major-opcode
1                            unused
2   2                        length
4   ACCESSCONTEXT            ac

SetAuthorization
1   10                       major-opcode
1                            unused
2   2                        length
4   ACCESSCONTEXT            ac

SetResolution
1   11                       major-opcode
1   n                        number of resolutions
2   1+(6*n+p)/4              length
6*n LISTofRESOLUTION         resolutions
p   p=pad(6*n)

GetResolution
1   12                       major-opcode
1                            unused
2   1                        length
=>
1   0                        type reply
1   n                        number of resolutions
2   CARD16                   sequence-number
4   2+(6*n+p)/4              length
6*n LISTofRESOLUTION         resolutions
p   p=pad(6*n)

ListFonts
1   13                       major-opcode
1                            unused
2   3+(n+p)/4                length
4   CARD32                   max-names
2   n                        length of pattern
2                            unused
n   STRING8                  pattern
p                            unused, p=pad(n)
=>+
1   0                        type reply
1                            unused
2   CARD16                   sequence-number
4   4+(n+p)/4                length
4   CARD32                   replies-following-hint
4   CARD32                   numberof font-names
n   LISTofSTRNAME            font-names
p                            unused, p=pad(n)

ListFontsWithXInfo
1   14                       major-opcode
1                            unused
2   3+(n+p)/4                length
4   CARD32                   max-names
2   n                        length of pattern
2                            unused
n   STRING8                  pattern
p                            unused, p=pad(n)
=>+(except for last in series)
1   0                        type reply
1   n                        length of name
2   CARD16                   sequence-number
4   3+(n+p+f)/4              length
4   CARD32                   replies-hint
f   XFONTINFO                fontinfo
n   STRING8                  name
p                            unused, p=pad(n)
=>(last in series)
1   0                        type reply
1   0                        last-reply indicator
2   CARD16                   sequence-number
4   2                        reply length

OpenBitmapFont
1   15                       major-opcode
1                            unused
2   4+(n+p)/4                length
4   FONTID                   fontid
4   BITMAPFORMATMASK         format-mask
4   BITMAPFORMAT             format
n   STRNAME                  pattern
p                            unused, p=pad(n)
=>
1   0                        type reply
1   BOOL                     otherid-valid
2   CARD16                   sequence-number
4   4                        length
4   FONTID                   otherid
1   BOOL                     cachable
3                            unused

QueryXInfo
1   16                       major-opcode
1                            unused
2   2                        length
4   FONTID                   fontid
=>
1   0                        type reply
1                            unused
2   CARD16                   sequence-number
4   2+f/4                    length
f   XFONTINFO                fontinfo
p                            unused, p=pad(f)

QueryXExtents8
1   17                       major-opcode
1   BOOL                     range
2   3+(n+p)/4                length
4   FONTID                   fontid
4   n                        number chars entries
n   STRING8                  chars
p                            unused, p=pad(n)
=>
1   0                        type reply
1                            unused
2   CARD16                   sequence-number
4   3+3*n                    length
4   n                        number of extents
12*n LISTofXCHARINFO         extents

QueryXExtents16
1   18                       major-opcode
1   BOOL                     range
2   3+(2*n+p)/4              length
4   FONTID                   fontid
4   n                        number chars entries
2*n                          LISTofCHAR2B chars
p                            unused, p=pad(2*n)
=>
1   0                        type reply
1                            unused
2   CARD16                   sequence-number
4   3+3*n                    length
4   n                        number of extents
12*n LISTofXCHARINFO         extents

QueryXBitmaps8
1   19                       major-opcode
1   BOOL                     range
2   4+(n+p)/4                length
4   FONTID                   fontid
4   BITMAPFORMAT             format
4   n                        number of chars entries
n   STRING8                  chars
p                            unused, p=pad(n)
=>+
1   0                        type reply
1                            unused
2   CARD16                   sequence-number
4   5+2*n+(m+p)/4            length
4   CARD32                   replies-following-hint
4   n                        number of offsets
4   m                        number of bytes of glyph images
8*n LISTofOFFSET32           offsets
m   LISTofBYTE               glyphimages
p                            unused, p=pad(m)

QueryXBitmaps16
1   20                       major-opcode
1   BOOL                     range
2   4+(2*n+p)/4              length
4   FONTID                   fontid
4   BITMAPFORMAT             format
4   n                        number of chars entries
2*n LISTofCHAR2B             chars
p                            unused, p=pad(2*n)
=>
1   0                        type reply
1                            unused
2   CARD16                   sequence-number
4   5+2*n+(m+p)/4            length
4   CARD32                   replies-following-hint
4   n                        number of offsets
4   m                        number of bytes of glyph images
8*n LISTofOFFSET32           offsets
m   LISTofBYTE               glyphimages
p                            unused, p=pad(m)

CloseFont
1   21                       major-opcode
1                            unused
2   2                        length
4   FONTID                   fontid
->
4   1+(d+q)/4                length
d   LISTofBYTE               more-authorization-data
q                            unused, q=pad(d)
=>
4   2+(d+q)/4                length
2   CARD16                   status
    0 Success
    1 Continue
    2 Busy
    3 Denied
2                            unused
d   LISTofBYTE               authorization-data
q                            unused, q=pad(d)

FreeAC
1   9                        major-opcode
1                            unused
2   2                        length
4   ACCESSCONTEXT            ac

SetAuthorization
1   10                       major-opcode
1                            unused
2   2                        length
4   ACCESSCONTEXT            ac

SetResolution
1   11                       major-opcode
1   n                        number of resolutions
2   1+(6*n+p)/4              length
6*n LISTofRESOLUTION         resolutions
p   p=pad(6*n)

GetResolution
1   12                       major-opcode
1                            unused
2   1                        length
=>
1   0                        type reply
1   n                        number of resolutions
2   CARD16                   sequence-number
4   2+(6*n+p)/4              length
6*n LISTofRESOLUTION         resolutions
p   p=pad(6*n)

ListFonts
1   13                       major-opcode
1                            unused
2   3+(n+p)/4                length
4   CARD32                   max-names
2   n                        length of pattern
2                            unused
n   STRING8                  pattern
p                            unused, p=pad(n)
=>+
1   0                        type reply
1                            unused
2   CARD16                   sequence-number
4   4+(n+p)/4                length
4   CARD32                   replies-following-hint
4   CARD32                   numberof font-names
n   LISTofSTRNAME            font-names
p                            unused, p=pad(n)

ListFontsWithXInfo
1   14                       major-opcode
1                            unused
2   3+(n+p)/4                length
4   CARD32                   max-names
2   n                        length of pattern
2                            unused
n   STRING8                  pattern
p                            unused, p=pad(n)
=>+(except for last in series)
1   0                        type reply
1   n                        length of name
2   CARD16                   sequence-number
4   3+(n+p+f)/4              length
4   CARD32                   replies-hint
f   XFONTINFO                fontinfo
n   STRING8                  name
p                            unused, p=pad(n)
=>(last in series)
1   0                        type reply
1   0                        last-reply indicator
2   CARD16                   sequence-number
4   2                        reply length

OpenBitmapFont
1   15                       major-opcode
1                            unused
2   4+(n+p)/4                length
4   FONTID                   fontid
4   BITMAPFORMATMASK         format-mask
4   BITMAPFORMAT             format
n   STRNAME                  pattern
p                            unused, p=pad(n)
=>
1   0                        type reply
1   BOOL                     otherid-valid
2   CARD16                   sequence-number
4   4                        length
4   FONTID                   otherid
1   BOOL                     cachable
3                            unused

QueryXInfo
1   16                       major-opcode
1                            unused
2   2                        length
4   FONTID                   fontid
=>
1   0                        type reply
1                            unused
2   CARD16                   sequence-number
4   2+f/4                    length
f   XFONTINFO                fontinfo
p                            unused, p=pad(f)

QueryXExtents8
1   17                       major-opcode
1   BOOL                     range
2   3+(n+p)/4                length
4   FONTID                   fontid
4   n                        number chars entries
n   STRING8                  chars
p                            unused, p=pad(n)
=>
1   0                        type reply
1                            unused
2   CARD16                   sequence-number
4   3+3*n                    length
4   n                        number of extents
12*n LISTofXCHARINFO         extents

QueryXExtents16
1   18                       major-opcode
1   BOOL                     range
2   3+(2*n+p)/4              length
4   FONTID                   fontid
4   n                        number chars entries
2*n                          LISTofCHAR2B chars
p                            unused, p=pad(2*n)
=>
1   0                        type reply
1                            unused
2   CARD16                   sequence-number
4   3+3*n                    length
4   n                        number of extents
12*n LISTofXCHARINFO         extents

QueryXBitmaps8
1   19                       major-opcode
1   BOOL                     range
2   4+(n+p)/4                length
4   FONTID                   fontid
4   BITMAPFORMAT             format
4   n                        number of chars entries
n   STRING8                  chars
p                            unused, p=pad(n)
=>+
1   0                        type reply
1                            unused
2   CARD16                   sequence-number
4   5+2*n+(m+p)/4            length
4   CARD32                   replies-following-hint
4   n                        number of offsets
4   m                        number of bytes of glyph images
8*n LISTofOFFSET32           offsets
m   LISTofBYTE               glyphimages
p                            unused, p=pad(m)

QueryXBitmaps16
1   20                       major-opcode
1   BOOL                     range
2   4+(2*n+p)/4              length
4   FONTID                   fontid
4   BITMAPFORMAT             format
4   n                        number of chars entries
2*n LISTofCHAR2B             chars
p                            unused, p=pad(2*n)
=>
1   0                        type reply
1                            unused
2   CARD16                   sequence-number
4   5+2*n+(m+p)/4            length
4   CARD32                   replies-following-hint
4   n                        number of offsets
4   m                        number of bytes of glyph images
8*n LISTofOFFSET32           offsets
m   LISTofBYTE               glyphimages
p                            unused, p=pad(m)

CloseFont
1   21                       major-opcode
1                            unused
2   2                        length
4   FONTID                   fontid

Errors

Request
1   1                        type error
1   0                        Request
2   CARD16                   sequence-number
4   4                        length
4   TIMESTAMP                timestamp
1   CARD8                    major-opcode
1   CARD8                    minor-opcode
2                            unused

Format
1   1                        type error
1   1                        Format
2   CARD16                   sequence-number
4   5                        length
4   TIMESTAMP                timestamp
1   CARD8                    major-opcode
1   CARD8                    minor-opcode
2                            unused
4   BITMAPFORMAT             bad-format

Font
1   1                        type error
1   2                        Font
2   CARD16                   sequence-number
4   5                        length
4   TIMESTAMP                timestamp
1   CARD8                    major-opcode
1   CARD8                    minor-opcode
2                            unused
4   FONTID bad-fontid

Range
1   1                        type error
1   3                        Range
2   CARD16                   sequence-number
4   5                        length
4   TIMESTAMP                timestamp
1   CARD8                    major-opcode
1   CARD8                    minor-opcode
2                            unused
4   RANGE                    bad-range

EventMask
1   1                        type error
1   4                        EventMask
2   CARD16                   sequence-number
4   5                        length
4   TIMESTAMP                timestamp
1   CARD8                    major-opcode
1   CARD8                    minor-opcode
2                            unused
4   EVENTMASK                event-mask

AccessContext
1   1                        type error
1   5                        AccessContext
2   CARD16                   sequence-number
4   5                        length
4   TIMESTAMP                timestamp
1   CARD8                    major-opcode
1   CARD8                    minor-opcode
2                            unused
4   ACCESSCONTEXT            access context

IDChoice
1   1                        type error
1   6                        IDChoice
2   CARD16                   sequence-number
4   5                        length
4   TIMESTAMP                timestamp
1   CARD8                    major-opcode
1   CARD8                    minor-opcode
2                            unused
4   FONTID                   bad-fontid

Name
1   1                        type error
1   7                        Name
2   CARD16                   sequence-number
4   4                        length
4   TIMESTAMP                timestamp
1   CARD8                    major-opcode
1   CARD8                    minor-opcode
2                            unused

Resolution
1   1                        type error
1   8                        Resolution
2   CARD16                   sequence-number
4   5                        length
4   TIMESTAMP                timestamp
1   CARD8                    major-opcode
1   CARD8                    minor-opcode
6   RESOLUTION               resolution

Alloc
1   1                        type error
1   9                        Alloc
2   CARD16                   sequence-number
4   4                        length
4   TIMESTAMP                timestamp
1   CARD8                    major-opcode
1   CARD8                    minor-opcode
2                            unused

Length
1   1                        type error
1   10                       Length
2   CARD16                   sequence-number
4   5                        length
4   TIMESTAMP                timestamp
1   CARD8                    major-opcode
1   CARD8                    minor-opcode
2                            unused
4   CARD32                   bad-length

Implementation
1   1                        type error
1   11                       Implementation
2   CARD16                   sequence-number
4   4                        length
4   TIMESTAMP                timestamp
1   CARD8                    major-opcode
1   CARD8                    minor-opcode
2                            unused

Events

KeepAlive
1   2                        type event
1   0                        event KeepAlive
2   CARD16                   sequence-number
4   3                        length
4   TIMESTAMP                timestamp

CatalogueListNotify
1   2                        type event
1   1                        event CatalogueListNotify
2   CARD16                   sequence-number
4   4                        length
4   TIMESTAMP                timestamp
1   BOOL                     added
1   BOOL                     deleted
2                            unused

FontListNotify
1   2                        type event
1   2                        event FontListNotify
2   CARD16                   sequence-number
4   4                        length
4   TIMESTAMP                timestamp
1   BOOL                     added
1   BOOL                     deleted
2                            unused