74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* $Xorg: Print.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/******************************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ******************************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** Description: Definitions needed by the server, library, and
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** clients. Subportion restricted to library and
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** clients.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** Server, Library, Client portion has:
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** o All sz_* defines
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** o Revision and Name defines
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** o Common defines and constants (e.g. Keywords, Masks)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** o Extension version structure
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** Library and client subportion has:
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** o Convience Marcos
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** o Client side data structures
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** o Client side event structures (non wire)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** o Library function prototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** o some private stuff denoted with _whatever
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** Printstr.h for server and library, but NOT clients.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ******************************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** (c) Copyright 1996 Hewlett-Packard Company
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** (c) Copyright 1996 International Business Machines Corp.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** (c) Copyright 1996 Sun Microsystems, Inc.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** (c) Copyright 1996 Novell, Inc.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** (c) Copyright 1996 Digital Equipment Corp.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** (c) Copyright 1996 Fujitsu Limited
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** (c) Copyright 1996 Hitachi, Ltd.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** Permission is hereby granted, free of charge, to any person obtaining a copy
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** of this software and associated documentation files (the "Software"), to deal
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** in the Software without restriction, including without limitation the rights
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** copies of the Software, and to permit persons to whom the Software is
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** furnished to do so, subject to the following conditions:
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** The above copyright notice and this permission notice shall be included in
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** all copies or substantial portions of the Software.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** Except as contained in this notice, the names of the copyright holders shall
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** not be used in advertising or otherwise to promote the sale, use or other
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** dealings in this Software without prior written authorization from said
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ** copyright holders.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync ******************************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *****************************************************************************/
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* $XFree86: xc/include/extensions/Print.h,v 1.5 2001/01/17 17:53:15 dawes Exp $ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif /* _XP_PRINT_SERVER_ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/******************************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Definitions used by the server, library and client.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/********************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Naming and versioning information.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Add a define below for each major extension release.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * For each single entry above, create one major/minor pair.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Identify current version.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Misc version defines.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/********************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Xp Print Error codes.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPBadContext 0 /* Print Context invalid or missing */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPBadSequence 1 /* Illegal sequence of XP operations */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPBadResourceID 2 /* X-resource not valid */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/********************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Xp Print Event masks and codes.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPNoEventMask 0 /* not an event - just a null mask */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPPrintNotify 0 /* contains "detail" - see below */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPAttributeNotify 1 /* contains "detail" - see below */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPStartJobNotify 0 /* value for "detail" in XPPrintNotify*/
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/********************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Xp Print Attribute Object codes (subset of ISO DPA 10175). The
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Xp Server can get and set any of the values, while the Xp Library
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * may only be able to set a subset of the attribute objects.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * note: the codes are also used as "detail" for XPAttributeNotify
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * note: XPPageAttr is not defined in ISO DPA 10175. It is unique
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * to Xp, and its attributes are a proper subset of XPDocAttr.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef unsigned char XPAttributes; /* type of Xp*Attr codes */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XP_ATTRIBUTES 5 /* those attrs currently supported */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPPageAttr 3 /* get/set - subset of XPDocAttr */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync context needed */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * note: ISO DPA 10175 defines a number of "attribute objects", of
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * which POSIX 1387.4 and the SI Xp will only support a
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPTransAttr 9 /* DPA-Object Transfer method */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPDelAttr 10 /* DPA-Object Delivery method */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPAuxSPkg 11 /* DPA-Object Auxiliary sheet package */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPOutputAttr 14 /* DPA-Object Output method */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPIntJobAttr 17 /* DPA-Object Initial value job */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPIntDocAttr 18 /* DPA-Object Initial value document */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPResConAttr 19 /* DPA-Object Resource context */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Replacement rules for XpSetAttributes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Return codes for XpGetDocumentData
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPGetDocError 2 /* runtime error, see generated error */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Save data types for XpStartJob.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPGetData 2 /* Job data via XpGetDocumentData */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Document types for XpStartDoc.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPDocNormal 1 /* Doc data handled by Xserver */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define XPDocRaw 2 /* Doc data passed through Xserver */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/********************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Xp Print Property Names
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/******************************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Definitions used by the library and clients only.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * General API defines and such.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Print Context for XpInitContext and related calls.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Struct for XpGetPrinterList.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Typedefs for XpGetDocumentData
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char *data,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int data_len,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Typedefs for XpSetLocaleHinter and XpGetLocaleHinter
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Extension version structures.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync **** this structure is now defined localy in the one file that uses it
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync **** in order to avoid clashes with its definition in XI.h
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/********************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Event structs for clients.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * note: these events are relative to a print context, and
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * not to a window as in core X.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long serial; /* # of last request processed by server */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool send_event; /* true if from a SendEvent request */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display *display; /* Display the event was read from */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XPContext context; /* print context where operation was requested */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XPStartDocNotify, XPEndDocNotify,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XPStartPageNotify, XPEndPageNotify */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long serial; /* # of last request processed by server */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool send_event; /* true if from a SendEvent request */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display *display; /* Display the event was read from */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XPContext context; /* print context where operation was requested */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XPPrinterAttr, XPSpoolerAttr,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XPMediumAttr, XPServerAttr */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long serial; /* # of last request processed by server */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool send_event; /* true if from a SendEvent request */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display *display; /* Display the event was read from */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XPContext context; /* print context where operation was requested */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long available; /* bytes available for retrieval */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/**********************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Function prototypes for library side.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern void XpEndJob (
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern void XpEndDoc (
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char *data,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long event_mask
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern unsigned long XpInputSelected (
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long *all_events_mask
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern char *XpGetLocaleNetString(void);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern char *XpNotifyPdm (
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif /* _XP_PRINT_SERVER_ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif /* _XpPrint_H_ */