PreviousUpNext

15.4.1684  src/lib/x-kit/xclient/src/wire/xerrors.pkg

## xerrors.pkg
#
# Catalog of X11 protocol error messages.
#
# Used in:
#
#     src/lib/x-kit/xclient/src/to-string/xerror-to-string.pkg
#     src/lib/x-kit/xclient/src/wire/xsocket-old.pkg
#     src/lib/x-kit/xclient/src/wire/wire-to-value.pkg
#     src/lib/x-kit/xclient/src/iccc/window-property-old.pkg

# Compiled by:
#     src/lib/x-kit/xclient/xclient-internals.sublib






###         "There's no sense in being precise
###          when you don't even know what
###          you're talking about."
###
###             -- Johnny von Neumann



stipulate
    include package   xtypes;                                   # xtypes        is from   src/lib/x-kit/xclient/src/wire/xtypes.pkg
herein

    package xerrors {

            Xerror_Kind
              #
              = BAD_REQUEST                             # Bad request code.
              #
              | BAD_VALUE    String                     # Int parameter out of range 
              | BAD_WINDOW   Xid                        # Parameter not a Window.
              | BAD_PIXMAP   Xid                        # Parameter not a Pixmap.
              | BAD_ATOM     Xid                        # Parameter not an Atom.
              | BAD_CURSOR   Xid                        # Parameter not a Cursor.
              | BAD_FONT     Xid                        # Parameter not a Font.
              | BAD_DRAWABLE Xid                        # Parameter not a Pixmap or Window.
              | BAD_GC       Xid                        # Parameter not a graphics context.
              #
              | BAD_MATCH                               # Parameter mismatch.
              | BAD_ALLOC                               # Insufficient resources 
              | BAD_COLOR    Xid                        # No such colormap 
              | BAD_IDCHOICE Xid                        # Choice not in range or already used 
              | BAD_NAME                                # Font or color name doesn't exist 
              | BAD_LENGTH                              # Request length incorrect 
              | BAD_IMPLEMENTATION                      # Server is defective 
              #
              | BAD_ACCESS                              # Depending on context: 
                                                        #    - Key/button already grabbed. 
                                                        #    - Attempt to free an illegal cmap entry.
                                                        #    - Attempt to store into a read-only Cmap entry. 
                                                        #    - Attempt to modify the access control list from other than the local host. 
              ;

            Xerror                                      # To display these see   src/lib/x-kit/xclient/src/to-string/xerror-to-string.pkg
                =
                XERROR
                 {
                   kind:      Xerror_Kind,
                   major_op:  one_byte_unt::Unt,        # Major op-code (8 bits).
                   minor_op:  Unt                       # Minor op-code (16 bits).
                 };


            first_extension_error = 0u128:  one_byte_unt::Unt;
            last_extension_error  = 0u255:  one_byte_unt::Unt;
    };

end;


## COPYRIGHT (c) 1990, 1991 by John H. Reppy.  See SMLNJ-COPYRIGHT file for details.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext