archrelease: copy trunk to extra-x86_64
[arch-packages.git] / libxp / trunk / add-proto-files.patch
blobbbeca4296e7a8db98c0f07472a39514fec616633
1 diff -Nurp libXp-1.0.4/configure.ac libXp-1.0.4-printproto/configure.ac
2 --- libXp-1.0.4/configure.ac 2022-09-12 20:50:17.000000000 +0000
3 +++ libXp-1.0.4-printproto/configure.ac 2022-11-17 17:08:39.670149026 +0000
4 @@ -42,11 +42,12 @@ XORG_DEFAULT_OPTIONS
5 AC_PROG_LIBTOOL
7 # Check for X and print proto
8 -PKG_CHECK_MODULES(XPRINT, [x11 >= 1.6] xext xextproto xau printproto)
9 +PKG_CHECK_MODULES(XPRINT, [x11 >= 1.6] xext xextproto xau)
11 AC_CONFIG_FILES([Makefile
12 src/Makefile
13 man/Makefile
14 + printproto.pc
15 xp.pc])
16 AC_OUTPUT
18 diff -Nurp libXp-1.0.4/include/X11/extensions/Print.h libXp-1.0.4-printproto/include/X11/extensions/Print.h
19 --- libXp-1.0.4/include/X11/extensions/Print.h 1970-01-01 00:00:00.000000000 +0000
20 +++ libXp-1.0.4-printproto/include/X11/extensions/Print.h 2022-11-17 17:08:24.769225832 +0000
21 @@ -0,0 +1,552 @@
22 +/* $Xorg: Print.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
23 +/******************************************************************************
24 + ******************************************************************************
25 + **
26 + ** File: Print.h
27 + **
28 + ** Description: Definitions needed by the server, library, and
29 + ** clients. Subportion restricted to library and
30 + ** clients.
31 + **
32 + ** Server, Library, Client portion has:
33 + ** o All sz_* defines
34 + ** o Revision and Name defines
35 + ** o Common defines and constants (e.g. Keywords, Masks)
36 + ** o Extension version structure
37 + **
38 + ** Library and client subportion has:
39 + ** o Convience Marcos
40 + ** o Client side data structures
41 + ** o Client side event structures (non wire)
42 + ** o Library function prototypes
43 + ** o some private stuff denoted with _whatever
44 + **
45 + ** Printstr.h for server and library, but NOT clients.
46 + **
47 + ******************************************************************************
48 + **
49 + ** (c) Copyright 1996 Hewlett-Packard Company
50 + ** (c) Copyright 1996 International Business Machines Corp.
51 + ** (c) Copyright 1996 Sun Microsystems, Inc.
52 + ** (c) Copyright 1996 Novell, Inc.
53 + ** (c) Copyright 1996 Digital Equipment Corp.
54 + ** (c) Copyright 1996 Fujitsu Limited
55 + ** (c) Copyright 1996 Hitachi, Ltd.
56 + **
57 + ** Permission is hereby granted, free of charge, to any person obtaining a copy
58 + ** of this software and associated documentation files (the "Software"), to deal
59 + ** in the Software without restriction, including without limitation the rights
60 + ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
61 + ** copies of the Software, and to permit persons to whom the Software is
62 + ** furnished to do so, subject to the following conditions:
63 + **
64 + ** The above copyright notice and this permission notice shall be included in
65 + ** all copies or substantial portions of the Software.
66 + **
67 + ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
68 + ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
69 + ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
70 + ** COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
71 + ** IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
72 + ** CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
73 + **
74 + ** Except as contained in this notice, the names of the copyright holders shall
75 + ** not be used in advertising or otherwise to promote the sale, use or other
76 + ** dealings in this Software without prior written authorization from said
77 + ** copyright holders.
78 + **
79 + ******************************************************************************
80 + *****************************************************************************/
81 +/* $XFree86: xc/include/extensions/Print.h,v 1.4 2000/01/25 18:37:31 dawes Exp $ */
83 +#ifndef _XpPrint_H_
84 +#define _XpPrint_H_
86 +#ifndef _XP_PRINT_SERVER_
87 +#include <X11/Xlib.h>
88 +#include <X11/Xresource.h>
89 +#include <X11/Xauth.h>
90 +#endif /* _XP_PRINT_SERVER_ */
92 +#include <X11/Xfuncproto.h>
94 +_XFUNCPROTOBEGIN
96 +/******************************************************************************
97 + *
98 + * Definitions used by the server, library and client.
99 + */
101 +/********************************************************************
103 + * Naming and versioning information.
104 + */
105 +#define XP_PRINTNAME "XpExtension"
108 + * Add a define below for each major extension release.
109 + */
110 +#define XP_DONT_CHECK 0
111 +#define XP_INITIAL_RELEASE 1
114 + * For each single entry above, create one major/minor pair.
115 + */
116 +#define XP_PROTO_MAJOR 1
117 +#define XP_PROTO_MINOR 0
120 + * Identify current version.
121 + */
122 +#define XP_MAJOR_VERSION XP_PROTO_MAJOR
123 +#define XP_MINOR_VERSION XP_PROTO_MINOR
126 + * Misc version defines.
127 + */
128 +#define XP_ABSENT 0 /* Prior to XP Print support */
129 +#define XP_PRESENT 1 /* With XP Print support */
131 +/********************************************************************
133 + * Xp Print Error codes.
134 + */
135 +#define XP_ERRORS 3 /* number of error types */
137 +#define XPBadContext 0 /* Print Context invalid or missing */
138 +#define XPBadSequence 1 /* Illegal sequence of XP operations */
139 +#define XPBadResourceID 2 /* X-resource not valid */
141 +/********************************************************************
143 + * Xp Print Event masks and codes.
145 + */
146 +#define XP_EVENTS 2 /* number of event types */
148 +#define XPNoEventMask 0 /* not an event - just a null mask */
149 +#define XPPrintMask (1L<<0)
150 +#define XPAttributeMask (1L<<1)
152 +#define XPPrintNotify 0 /* contains "detail" - see below */
153 +#define XPAttributeNotify 1 /* contains "detail" - see below */
155 +#define XPStartJobNotify 0 /* value for "detail" in XPPrintNotify*/
156 +#define XPEndJobNotify 1
157 +#define XPStartDocNotify 2
158 +#define XPEndDocNotify 3
159 +#define XPStartPageNotify 4
160 +#define XPEndPageNotify 5
162 +/********************************************************************
164 + * Xp Print Attribute Object codes (subset of ISO DPA 10175). The
165 + * Xp Server can get and set any of the values, while the Xp Library
166 + * may only be able to set a subset of the attribute objects.
168 + * note: the codes are also used as "detail" for XPAttributeNotify
170 + * note: XPPageAttr is not defined in ISO DPA 10175. It is unique
171 + * to Xp, and its attributes are a proper subset of XPDocAttr.
172 + */
173 +typedef unsigned char XPAttributes; /* type of Xp*Attr codes */
175 +#define XP_ATTRIBUTES 5 /* those attrs currently supported */
177 +#define XPJobAttr 1 /* get/set */
178 +#define XPDocAttr 2 /* get/set */
179 +#define XPPageAttr 3 /* get/set - subset of XPDocAttr */
180 +#define XPPrinterAttr 4 /* get only (library) */
181 +#define XPServerAttr 5 /* get only (library), no
182 + context needed */
185 + * note: ISO DPA 10175 defines a number of "attribute objects", of
186 + * which POSIX 1387.4 and the SI Xp will only support a
187 + * subset.
188 + */
189 +#define XPMediumAttr 6 /* DPA-Object Medium */
190 +#define XPFontAttr 7 /* DPA-Object Font */
191 +#define XPResAttr 8 /* DPA-Object Resource */
192 +#define XPTransAttr 9 /* DPA-Object Transfer method */
193 +#define XPDelAttr 10 /* DPA-Object Delivery method */
194 +#define XPAuxSPkg 11 /* DPA-Object Auxiliary sheet package */
195 +#define XPAuxS 12 /* DPA-Object Auxiliary sheet */
196 +#define XPFinishAttr 13 /* DPA-Object Finishing */
197 +#define XPOutputAttr 14 /* DPA-Object Output method */
198 +#define XPImpAttr 15 /* DPA-Object Imposition */
199 +#define XPSchedAttr 16 /* DPA-Object Scheduler */
200 +#define XPIntJobAttr 17 /* DPA-Object Initial value job */
201 +#define XPIntDocAttr 18 /* DPA-Object Initial value document */
202 +#define XPResConAttr 19 /* DPA-Object Resource context */
206 + * Replacement rules for XpSetAttributes
207 + */
208 +typedef unsigned char XPAttrReplacement;
209 +#define XPAttrReplace 1
210 +#define XPAttrMerge 2
214 + * Return codes for XpGetDocumentData
215 + */
216 +typedef unsigned char XPGetDocStatus;
217 +#define XPGetDocFinished 0 /* normal termination */
218 +#define XPGetDocSecondConsumer 1 /* setup error */
219 +#define XPGetDocError 2 /* runtime error, see generated error */
223 + * Save data types for XpStartJob.
224 + */
225 +typedef unsigned char XPSaveData;
226 +#define XPSpool 1 /* Job data sent to spooler */
227 +#define XPGetData 2 /* Job data via XpGetDocumentData */
231 + * Document types for XpStartDoc.
232 + */
233 +typedef unsigned char XPDocumentType;
234 +#define XPDocNormal 1 /* Doc data handled by Xserver */
235 +#define XPDocRaw 2 /* Doc data passed through Xserver */
238 +/********************************************************************
240 + * Xp Print Property Names
241 + */
244 +#ifndef _XP_PRINT_SERVER_
246 +/******************************************************************************
248 + * Definitions used by the library and clients only.
249 + */
251 +/*******************************************************************
253 + * General API defines and such.
254 + */
257 + * Print Context for XpInitContext and related calls.
258 + */
259 +typedef XID XPContext;
262 + * Struct for XpGetPrinterList.
263 + */
264 +typedef struct {
265 + char *name; /* name */
266 + char *desc; /* localized description */
267 +} XPPrinterRec, *XPPrinterList;
270 + * Typedefs for XpGetDocumentData
271 + */
272 +typedef void (*XPSaveProc)( Display *display,
273 + XPContext context,
274 + unsigned char *data,
275 + unsigned int data_len,
276 + XPointer client_data);
278 +typedef void (*XPFinishProc)( Display *display,
279 + XPContext context,
280 + XPGetDocStatus status,
281 + XPointer client_data);
284 + * Typedefs for XpSetLocaleHinter and XpGetLocaleHinter
285 + */
286 +typedef char * (*XPHinterProc)(void);
288 +#if 0
289 +/*******************************************************************
291 + * Extension version structures.
293 + **** this structure is now defined localy in the one file that uses it
294 + **** in order to avoid clashes with its definition in XI.h
295 + */
296 +typedef struct {
297 + int present;
298 + short major_version;
299 + short minor_version;
300 +} XExtensionVersion;
301 +#endif
303 +/********************************************************************
305 + * Event structs for clients.
307 + * note: these events are relative to a print context, and
308 + * not to a window as in core X.
309 + */
310 +typedef struct {
311 + int type; /* base + XPPrintNotify */
312 + unsigned long serial; /* # of last request processed by server */
313 + Bool send_event; /* true if from a SendEvent request */
314 + Display *display; /* Display the event was read from */
315 + XPContext context; /* print context where operation was requested */
316 + Bool cancel; /* was detailed event canceled */
317 + int detail; /* XPStartJobNotify, XPEndJobNotify,
318 + XPStartDocNotify, XPEndDocNotify,
319 + XPStartPageNotify, XPEndPageNotify */
320 +} XPPrintEvent;
322 +typedef struct {
323 + int type; /* base + XPAttributeNotify */
324 + unsigned long serial; /* # of last request processed by server */
325 + Bool send_event; /* true if from a SendEvent request */
326 + Display *display; /* Display the event was read from */
327 + XPContext context; /* print context where operation was requested */
328 + int detail; /* XPJobAttr, XPDocAttr, XPPageAttr,
329 + XPPrinterAttr, XPSpoolerAttr,
330 + XPMediumAttr, XPServerAttr */
331 +} XPAttributeEvent;
333 +typedef struct {
334 + int type; /* base + XPDataReadyNotify */
335 + unsigned long serial; /* # of last request processed by server */
336 + Bool send_event; /* true if from a SendEvent request */
337 + Display *display; /* Display the event was read from */
338 + XPContext context; /* print context where operation was requested */
339 + unsigned long available; /* bytes available for retrieval */
340 +} XPDataReadyEvent;
343 +/**********************************************************
345 + * Function prototypes for library side.
346 + */
348 +extern XPContext XpCreateContext (
349 + Display *display,
350 + char *printer_name
353 +extern void XpSetContext (
354 + Display *display,
355 + XPContext print_context
358 +extern XPContext XpGetContext (
359 + Display *display
362 +extern void XpDestroyContext (
363 + Display *display,
364 + XPContext print_context
367 +extern Screen *XpGetScreenOfContext (
368 + Display *display,
369 + XPContext print_context
372 +extern Status XpGetPageDimensions (
373 + Display *display,
374 + XPContext print_context,
375 + unsigned short *width, /* return value */
376 + unsigned short *height, /* return value */
377 + XRectangle *reproducible_area /* return value */
380 +extern void XpStartJob (
381 + Display *display,
382 + XPSaveData save_data
385 +extern void XpEndJob (
386 + Display *display
389 +extern void XpCancelJob (
390 + Display *display,
391 + Bool discard
394 +extern void XpStartDoc (
395 + Display *display,
396 + XPDocumentType type
399 +extern void XpEndDoc (
400 + Display *display
403 +extern void XpCancelDoc (
404 + Display *display,
405 + Bool discard
408 +extern void XpPutDocumentData (
409 + Display *display,
410 + Drawable drawable,
411 + unsigned char *data,
412 + int data_len,
413 + char *doc_fmt,
414 + char *options
417 +extern Status XpGetDocumentData (
418 + Display *display,
419 + XPContext context,
420 + XPSaveProc save_proc,
421 + XPFinishProc finish_proc,
422 + XPointer client_data
425 +extern void XpStartPage (
426 + Display *display,
427 + Window window
430 +extern void XpEndPage (
431 + Display *display
434 +extern void XpCancelPage (
435 + Display *display,
436 + Bool discard
439 +extern void XpSelectInput (
440 + Display *display,
441 + XPContext print_context,
442 + unsigned long event_mask
445 +extern unsigned long XpInputSelected (
446 + Display *display,
447 + XPContext print_context,
448 + unsigned long *all_events_mask
451 +extern Bool XpSetImageResolution (
452 + Display *display,
453 + XPContext print_context,
454 + int image_res,
455 + int *prev_res
458 +extern int XpGetImageResolution (
459 + Display *display,
460 + XPContext print_context
463 +extern char *XpGetAttributes (
464 + Display *display,
465 + XPContext print_context,
466 + XPAttributes type
469 +extern void XpSetAttributes (
470 + Display *display,
471 + XPContext print_context,
472 + XPAttributes type,
473 + char *pool,
474 + XPAttrReplacement replacement_rule
477 +extern char *XpGetOneAttribute (
478 + Display *display,
479 + XPContext print_context,
480 + XPAttributes type,
481 + char *attribute_name
484 +extern XPPrinterList XpGetPrinterList (
485 + Display *display,
486 + char *printer_name,
487 + int *list_count /* return value */
490 +extern void XpFreePrinterList (
491 + XPPrinterList printer_list
494 +extern void XpRehashPrinterList (
495 + Display *display
498 +extern Status XpQueryVersion (
499 + Display *display,
500 + short *major_version, /* return value */
501 + short *minor_version /* return value */
504 +extern Bool XpQueryExtension (
505 + Display *display,
506 + int *event_base_return, /* return value */
507 + int *error_base_return /* return value */
510 +extern Screen **XpQueryScreens (
511 + Display *display,
512 + int *list_count /* return value */
515 +extern Status XpGetPdmStartParams (
516 + Display *print_display,
517 + Window print_window,
518 + XPContext print_context,
519 + Display *video_display,
520 + Window video_window,
521 + Display **selection_display, /* return value */
522 + Atom *selection, /* return value */
523 + Atom *type, /* return value */
524 + int *format, /* return value */
525 + unsigned char **data, /* return value */
526 + int *nelements /* return value */
529 +extern Status XpGetAuthParams (
530 + Display *print_display,
531 + Display *video_display,
532 + Display **selection_display, /* return value */
533 + Atom *selection, /* return value */
534 + Atom *target /* return value */
537 +extern Status XpSendAuth (
538 + Display *display,
539 + Window window
542 +extern Status XpSendOneTicket (
543 + Display *display,
544 + Window window,
545 + Xauth *ticket,
546 + Bool more
549 +extern void XpSetLocaleHinter (
550 + XPHinterProc hinter_proc,
551 + char *hinter_desc
554 +extern char *XpGetLocaleHinter (
555 + XPHinterProc *hinter_proc
558 +extern char *XpGetLocaleNetString(void);
560 +extern char *XpNotifyPdm (
561 + Display *print_display,
562 + Window print_window,
563 + XPContext print_context,
564 + Display *video_display,
565 + Window video_window,
566 + Bool auth_flag
569 +#endif /* _XP_PRINT_SERVER_ */
571 +_XFUNCPROTOEND
573 +#endif /* _XpPrint_H_ */
574 diff -Nurp libXp-1.0.4/include/X11/extensions/Printstr.h libXp-1.0.4-printproto/include/X11/extensions/Printstr.h
575 --- libXp-1.0.4/include/X11/extensions/Printstr.h 1970-01-01 00:00:00.000000000 +0000
576 +++ libXp-1.0.4-printproto/include/X11/extensions/Printstr.h 2022-11-17 17:08:24.769225832 +0000
577 @@ -0,0 +1,783 @@
578 +/* $Xorg: Printstr.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
579 +/******************************************************************************
580 + ******************************************************************************
581 + **
582 + ** File: Printstr.h
583 + **
584 + ** Description: Definitions needed by the server and library, but
585 + ** not clients.
586 + **
587 + ** Print.h for server, library and clients.
588 + **
589 + ******************************************************************************
590 + **
591 + ** (c) Copyright 1996 Hewlett-Packard Company
592 + ** (c) Copyright 1996 International Business Machines Corp.
593 + ** (c) Copyright 1996 Sun Microsystems, Inc.
594 + ** (c) Copyright 1996 Novell, Inc.
595 + ** (c) Copyright 1996 Digital Equipment Corp.
596 + ** (c) Copyright 1996 Fujitsu Limited
597 + ** (c) Copyright 1996 Hitachi, Ltd.
598 + **
599 + ** Permission is hereby granted, free of charge, to any person obtaining a copy
600 + ** of this software and associated documentation files (the "Software"), to deal
601 + ** in the Software without restriction, including without limitation the rights
602 + ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
603 + ** copies of the Software, and to permit persons to whom the Software is
604 + ** furnished to do so, subject to the following conditions:
605 + **
606 + ** The above copyright notice and this permission notice shall be included in
607 + ** all copies or substantial portions of the Software.
608 + **
609 + ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
610 + ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
611 + ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
612 + ** COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
613 + ** IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
614 + ** CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
615 + **
616 + ** Except as contained in this notice, the names of the copyright holders shall
617 + ** not be used in advertising or otherwise to promote the sale, use or other
618 + ** dealings in this Software without prior written authorization from said
619 + ** copyright holders.
620 + **
621 + ******************************************************************************
622 + *****************************************************************************/
623 +/* $XFree86: xc/include/extensions/Printstr.h,v 1.5 2001/08/01 00:44:35 tsi Exp $ */
626 +#ifndef _XpPrintstr_H_
627 +#define _XpPrintstr_H_
630 + * NEED_EVENTS and NEED_REPLIES are hacks to limit the linker symbol-table
631 + * size. When function prototypes are needed from Print.h, this sets up
632 + * a cascading dependency on Printstr.h and eventually Xproto.h to provide
633 + * the event and reply struct definitions.
634 + */
635 +#ifndef NEED_EVENTS
636 +#define NEED_EVENTS
637 +#endif /* NEED_EVENTS */
639 +#define NEED_REPLIES
641 +#include <X11/Xproto.h>
642 +#ifndef _XP_PRINT_SERVER_
643 +#include <X11/Xlib.h>
644 +#endif /* _XP_PRINT_SERVER_ */
647 + * Pull in other definitions. Print.h will hide some things if we're
648 + * doing server side work.
649 + */
650 +#include <X11/extensions/Print.h>
652 +#include <X11/Xfuncproto.h>
654 +_XFUNCPROTOBEGIN
656 +/******************************************************************************
658 + * Protocol requests constants and alignment values
660 + * Note: Xlib macro's expect X_ABC where ABC is the name of the
661 + * protocol request.
662 + */
663 +#define X_PrintQueryVersion 0
664 +#define X_PrintGetPrinterList 1
665 +#define X_PrintCreateContext 2
666 +#define X_PrintSetContext 3
667 +#define X_PrintGetContext 4
668 +#define X_PrintDestroyContext 5
669 +#define X_PrintGetContextScreen 6
670 +#define X_PrintStartJob 7
671 +#define X_PrintEndJob 8
672 +#define X_PrintStartDoc 9
673 +#define X_PrintEndDoc 10
674 +#define X_PrintPutDocumentData 11
675 +#define X_PrintGetDocumentData 12
676 +#define X_PrintStartPage 13
677 +#define X_PrintEndPage 14
678 +#define X_PrintSelectInput 15
679 +#define X_PrintInputSelected 16
680 +#define X_PrintGetAttributes 17
681 +#define X_PrintSetAttributes 18
682 +#define X_PrintGetOneAttribute 19
683 +#define X_PrintRehashPrinterList 20
684 +#define X_PrintGetPageDimensions 21
685 +#define X_PrintQueryScreens 22
686 +#define X_PrintSetImageResolution 23
687 +#define X_PrintGetImageResolution 24
689 +/********************************************************************
691 + * Protocol data types
692 + */
693 +#define PCONTEXT CARD32
694 +#define WINDOW CARD32
695 +#define DRAWABLE CARD32
696 +#define BITMASK CARD32
698 +/******************************************************************************
700 + * Event wire struct definitions
702 + * Note: Xlib macro's expect xABC struct names and sz_xABC size
703 + * constants where ABC is the name of the protocol request.
704 + */
707 +/*********************************************************************
709 + * Events.
711 + * See Print.h for the protocol "type" values.
712 + */
713 +typedef struct _xPrintPrintEvent {
714 + BYTE type; /* XPPrintNotify + extEntry->eventBase */
715 + BYTE detail; /* XPStartJobNotify, XPEndJobNotify,
716 + XPStartDocNotify, XPEndDocNotify,
717 + XPStartPageNotify, XPEndPageNotify */
718 + CARD16 sequenceNumber B16;
719 + PCONTEXT printContext B32; /* print context */
720 + BOOL cancel; /* canceled flag */
721 + CARD8 pad1; /* rest is unused */
722 + CARD16 pad2 B16;
723 + CARD32 pad3 B32;
724 + CARD32 pad4 B32;
725 + CARD32 pad5 B32;
726 + CARD32 pad6 B32;
727 + CARD32 pad7 B32;
728 +} xPrintPrintEvent;
729 +#define sz_xPrintPrintEvent 32;
731 +typedef struct _xPrintAttributeEvent {
732 + BYTE type; /* XPAttributeNotify + extEntry->eventBase */
733 + BYTE detail; /* XPJobAttr, XPDocAttr, XPPageAttr,
734 + XPPrinterAttr, XPSpoolerAttr,
735 + XPMediumAttr, XPServerAttr */
736 + CARD16 sequenceNumber B16;
737 + PCONTEXT printContext B32; /* print context */
738 + CARD32 pad1 B32;
739 + CARD32 pad2 B32;
740 + CARD32 pad3 B32;
741 + CARD32 pad4 B32;
742 + CARD32 pad5 B32;
743 + CARD32 pad6 B32;
744 +} xPrintAttributeEvent;
745 +#define sz_xPrintAttributeEvent 32;
748 +/*********************************************************************
750 + * Requests
751 + */
752 +typedef struct _PrintQueryVersion {
753 + CARD8 reqType; /* always PrintReqCode */
754 + CARD8 printReqType; /* always X_PrintQueryVersion */
755 + CARD16 length B16;
756 +} xPrintQueryVersionReq;
757 +#define sz_xPrintQueryVersionReq 4
759 +typedef struct {
760 + BYTE type; /* X_Reply */
761 + CARD8 unused; /* not used */
762 + CARD16 sequenceNumber B16;
763 + CARD32 length B32;
764 + CARD16 majorVersion B16; /* major version of Xp protocol */
765 + CARD16 minorVersion B16; /* minor version of Xp protocol */
766 + CARD32 pad1 B32;
767 + CARD32 pad2 B32;
768 + CARD32 pad3 B32;
769 + CARD32 pad4 B32;
770 + CARD32 pad5 B32;
771 +} xPrintQueryVersionReply;
772 +#define sz_xPrintQueryVersionReply 32
775 +typedef struct _PrintGetPrinterList {
776 + CARD8 reqType; /* always PrintReqCode */
777 + CARD8 printReqType; /* always X_PrintGetPrinterList */
778 + CARD16 length B16;
779 + CARD32 printerNameLen B32; /* length of printer name */
780 + CARD32 localeLen B32; /* length of locale string */
782 + /* variable portion *****************************************
783 + STRING8 printerName; * printer name *
784 + BYTE pad(printerNameLen) * unused *
785 + STRING8 locale; * locale *
786 + BYTE pad(localeLen) * unused *
787 + ************************************************************/
788 +} xPrintGetPrinterListReq;
789 +#define sz_xPrintGetPrinterListReq 12
791 +typedef struct {
792 + BYTE type; /* X_Reply */
793 + CARD8 unused; /* not used */
794 + CARD16 sequenceNumber B16;
795 + CARD32 length B32;
796 + CARD32 listCount B32; /* of PRINTER recs below */
797 + CARD32 pad1 B32;
798 + CARD32 pad2 B32;
799 + CARD32 pad3 B32;
800 + CARD32 pad4 B32;
801 + CARD32 pad5 B32;
803 + /* variable portion *****************************************
804 + CARD32 nameLen B32; * length of name in bytes *
805 + STRING8 name; * name *
806 + BYTE pad(nameLen) * unused *
808 + CARD32 descLen B32; * length of desc in bytes *
809 + STRING8 desc; * localized description *
810 + BYTE pad(descLen) * unused *
811 + ************************************************************/
812 +} xPrintGetPrinterListReply;
813 +#define sz_xPrintGetPrinterListReply 32
816 +typedef struct _PrintRehashPrinterList {
817 + CARD8 reqType; /* always PrintReqCode */
818 + CARD8 printReqType; /* always X_PrintRehashPrinterList */
819 + CARD16 length B16;
820 +} xPrintRehashPrinterListReq;
821 +#define sz_xPrintRehashPrinterListReq 4
824 +typedef struct _PrintCreateContext {
825 + CARD8 reqType; /* always PrintReqCode */
826 + CARD8 printReqType; /* always X_PrintInitSetContext */
827 + CARD16 length B16;
828 + CARD32 contextID B32; /* ID for context */
829 + CARD32 printerNameLen B32; /* length of printerName in bytes */
830 + CARD32 localeLen B32; /* length of locale in bytes */
832 + /* variable portion *****************************************
833 + STRING8 printerName * printer name *
834 + BYTE pad(printerNameLen) * unused *
835 + STRING8 locale * locale *
836 + BYTE pad(locale) * unused *
837 + ************************************************************/
838 +} xPrintCreateContextReq;
839 +#define sz_xPrintCreateContextReq 16
842 +typedef struct _PrintSetContext {
843 + CARD8 reqType; /* always PrintReqCode */
844 + CARD8 printReqType; /* always X_PrintSetContext */
845 + CARD16 length B16;
846 + PCONTEXT printContext B32; /* print context */
847 +} xPrintSetContextReq;
848 +#define sz_xPrintSetContextReq 8
851 +typedef struct _PrintGetContext {
852 + CARD8 reqType; /* always PrintReqCode */
853 + CARD8 printReqType; /* always X_PrintGetContext */
854 + CARD16 length B16;
855 +} xPrintGetContextReq;
856 +#define sz_xPrintGetContextReq 4
858 +typedef struct {
859 + BYTE type; /* X_Reply */
860 + CARD8 unused; /* not used */
861 + CARD16 sequenceNumber B16;
862 + CARD32 length B32;
863 + PCONTEXT printContext B32; /* print context */
864 + CARD32 pad1 B32;
865 + CARD32 pad2 B32;
866 + CARD32 pad3 B32;
867 + CARD32 pad4 B32;
868 + CARD32 pad5 B32;
869 +} xPrintGetContextReply;
870 +#define sz_xPrintGetContextReply 32
873 +typedef struct _PrintDestroyContext {
874 + CARD8 reqType; /* always PrintReqCode */
875 + CARD8 printReqType; /* always X_PrintDestroyContext */
876 + CARD16 length B16;
877 + PCONTEXT printContext B32; /* print context */
878 +} xPrintDestroyContextReq;
879 +#define sz_xPrintDestroyContextReq 8
882 +typedef struct _PrintGetContextScreen {
883 + CARD8 reqType; /* always PrintReqCode */
884 + CARD8 printReqType; /* always X_PrintGetContextScreen */
885 + CARD16 length B16;
886 + PCONTEXT printContext B32; /* print context */
887 +} xPrintGetContextScreenReq;
888 +#define sz_xPrintGetContextScreenReq 8
890 +typedef struct {
891 + BYTE type; /* X_Reply */
892 + CARD8 unused; /* not used */
893 + CARD16 sequenceNumber B16;
894 + CARD32 length B32;
895 + WINDOW rootWindow; /* screenPtr represented as rootWin */
896 + CARD32 pad1 B32;
897 + CARD32 pad2 B32;
898 + CARD32 pad3 B32;
899 + CARD32 pad4 B32;
900 + CARD32 pad5 B32;
901 +} xPrintGetContextScreenReply;
902 +#define sz_xPrintGetContextScreenReply 32
905 +typedef struct _PrintStartJob {
906 + CARD8 reqType; /* always PrintReqCode */
907 + CARD8 printReqType; /* always X_PrintStartJob */
908 + CARD16 length B16;
909 + CARD8 saveData; /* save data boolean */
910 + CARD8 pad1;
911 + CARD16 pad2 B16;
912 +} xPrintStartJobReq;
913 +#define sz_xPrintStartJobReq 8
915 +typedef struct _PrintEndJob {
916 + CARD8 reqType; /* always PrintReqCode */
917 + CARD8 printReqType; /* always X_PrintEndJob */
918 + CARD16 length B16;
919 + BOOL cancel; /* cancel boolean */
920 + CARD8 pad1;
921 + CARD16 pad2 B16;
922 +} xPrintEndJobReq;
923 +#define sz_xPrintEndJobReq 8
926 +typedef struct _PrintStartDoc {
927 + CARD8 reqType; /* always PrintReqCode */
928 + CARD8 printReqType; /* always X_PrintStartDoc */
929 + CARD16 length B16;
930 + CARD8 type; /* type for document */
931 + CARD8 pad1;
932 + CARD16 pad2 B16;
933 +} xPrintStartDocReq;
934 +#define sz_xPrintStartDocReq 8
936 +typedef struct _PrintEndDoc {
937 + CARD8 reqType; /* always PrintReqCode */
938 + CARD8 printReqType; /* always X_PrintEndDoc */
939 + CARD16 length B16;
940 + BOOL cancel; /* cancel boolean */
941 + CARD8 pad1;
942 + CARD16 pad2 B16;
943 +} xPrintEndDocReq;
944 +#define sz_xPrintEndDocReq 8
947 +typedef struct _PrintPutDocumentData {
948 + CARD8 reqType; /* always PrintReqCode */
949 + CARD8 printReqType; /* always X_PrintPutDocumentData */
950 + CARD16 length B16;
951 + DRAWABLE drawable B32; /* target drawable */
952 + CARD32 len_data B32; /* big len in bytes */
953 + CARD16 len_fmt; /* len in bytes */
954 + CARD16 len_options; /* len in bytes */
956 + /* variable portion *****************************************
957 + LISTofBYTE data; * data *
958 + BYTE pad(len_data) * unused *
959 + STRING8 doc_fmt; * ISO compliant desc of data type *
960 + BYTE pad(len_fmt) * unused *
961 + STRING8 options; * additional device-dependent desc *
962 + BYTE pad(len_options) * unused *
963 + ************************************************************/
964 +} xPrintPutDocumentDataReq;
965 +#define sz_xPrintPutDocumentDataReq 16
968 +typedef struct _PrintGetDocumentData {
969 + CARD8 reqType; /* always PrintReqCode */
970 + CARD8 printReqType; /* always X_PrintGetDocumentData */
971 + CARD16 length B16;
972 + PCONTEXT printContext B32; /* print context */
973 + CARD32 maxBufferSize B32; /* maximum buffer size requested */
974 +} xPrintGetDocumentDataReq;
975 +#define sz_xPrintGetDocumentDataReq 12
977 +typedef struct {
978 + BYTE type; /* X_Reply */
979 + CARD8 unused; /* not used */
980 + CARD16 sequenceNumber B16;
981 + CARD32 length B32;
982 + CARD32 statusCode B32; /* status code for reply */
983 + CARD32 finishedFlag B32; /* is this the last reply */
984 + CARD32 dataLen B32; /* data length */
985 + CARD32 pad1 B32;
986 + CARD32 pad2 B32;
987 + CARD32 pad3 B32;
989 + /* variable portion *****************************************
990 + LISTofBYTE data; * data *
991 + BYTE pad(count) * unused *
992 + ************************************************************/
993 +} xPrintGetDocumentDataReply;
994 +#define sz_xPrintGetDocumentDataReply 32
997 +typedef struct _PrintStartPage {
998 + CARD8 reqType; /* always PrintReqCode */
999 + CARD8 printReqType; /* always X_PrintStartPage */
1000 + CARD16 length B16;
1001 + WINDOW window B32; /* window */
1002 +} xPrintStartPageReq;
1003 +#define sz_xPrintStartPageReq 8
1005 +typedef struct _PrintEndPage {
1006 + CARD8 reqType; /* always PrintReqCode */
1007 + CARD8 printReqType; /* always X_PrintEndPage */
1008 + CARD16 length B16;
1009 + BOOL cancel; /* cancel boolean */
1010 + CARD8 pad1;
1011 + CARD16 pad2 B16;
1012 +} xPrintEndPageReq;
1013 +#define sz_xPrintEndPageReq 8
1016 +typedef struct _PrintSelectInput {
1017 + CARD8 reqType; /* always PrintReqCode */
1018 + CARD8 printReqType; /* always X_PrintSelectInput */
1019 + CARD16 length B16;
1020 + PCONTEXT printContext B32; /* print context */
1021 + BITMASK eventMask B32;
1022 +} xPrintSelectInputReq;
1023 +#define sz_xPrintSelectInputReq 12
1026 +typedef struct _PrintInputSelected {
1027 + CARD8 reqType; /* always PrintReqCode */
1028 + CARD8 printReqType; /* always X_PrintInputSelected */
1029 + CARD16 length B16;
1030 + PCONTEXT printContext B32; /* print context */
1031 +} xPrintInputSelectedReq;
1032 +#define sz_xPrintInputSelectedReq 8
1034 +typedef struct {
1035 + BYTE type; /* X_Reply */
1036 + CARD8 unused; /* not used */
1037 + CARD16 sequenceNumber B16;
1038 + CARD32 length B32;
1039 + BITMASK eventMask B32; /* your event mask */
1040 + BITMASK allEventsMask B32; /* all event mask */
1041 + CARD32 pad1 B32;
1042 + CARD32 pad2 B32;
1043 + CARD32 pad3 B32;
1044 + CARD32 pad4 B32;
1045 +} xPrintInputSelectedReply;
1046 +#define sz_xPrintInputSelectedReply 32
1048 +typedef struct _PrintGetAttributes {
1049 + CARD8 reqType; /* always PrintReqCode */
1050 + CARD8 printReqType; /* always X_PrintGetAttributes */
1051 + CARD16 length B16;
1052 + PCONTEXT printContext B32; /* print context */
1053 + CARD8 type; /* type */
1054 + CARD8 pad1; /* unused */
1055 + CARD16 pad2 B16; /* unused */
1056 +} xPrintGetAttributesReq;
1057 +#define sz_xPrintGetAttributesReq 12
1059 +typedef struct {
1060 + BYTE type; /* X_Reply */
1061 + CARD8 unused; /* not used */
1062 + CARD16 sequenceNumber B16;
1063 + CARD32 length B32;
1064 + CARD32 stringLen B32; /* length of xrm db string */
1065 + CARD32 pad1 B32;
1066 + CARD32 pad2 B32;
1067 + CARD32 pad3 B32;
1068 + CARD32 pad4 B32;
1069 + CARD32 pad5 B32;
1071 + /* variable portion *****************************************
1072 + STRING8 string; * xrm db as a string *
1073 + BYTE pad(stringLen) * unused *
1074 + ************************************************************/
1075 +} xPrintGetAttributesReply;
1076 +#define sz_xPrintGetAttributesReply 32
1079 +typedef struct _PrintSetAttributes {
1080 + CARD8 reqType; /* always PrintReqCode */
1081 + CARD8 printReqType; /* always X_PrintSetAttributes */
1082 + CARD16 length B16;
1083 + PCONTEXT printContext B32; /* print context */
1084 + CARD32 stringLen B32; /* length of xrm db string */
1085 + CARD8 type; /* type */
1086 + CARD8 rule; /* replacement rule */
1087 + CARD16 pad1 B16; /* unused */
1089 + /* variable portion *****************************************
1090 + STRING8 string; * xrm db as a string *
1091 + BYTE pad(stringLen) * unused *
1092 + ************************************************************/
1093 +} xPrintSetAttributesReq;
1094 +#define sz_xPrintSetAttributesReq 16
1097 +typedef struct _PrintGetOneAttribute {
1098 + CARD8 reqType; /* always PrintReqCode */
1099 + CARD8 printReqType; /* always X_PrintGetOneAttribute */
1100 + CARD16 length B16;
1101 + PCONTEXT printContext B32; /* print context */
1102 + CARD32 nameLen; /* length of name string */
1103 + CARD8 type; /* type */
1104 + CARD8 pad1; /* unused */
1105 + CARD16 pad2 B16; /* unused */
1107 + /* variable portion *****************************************
1108 + STRING8 name; * name as a string *
1109 + BYTE pad(name) * unused *
1110 + ************************************************************/
1111 +} xPrintGetOneAttributeReq;
1112 +#define sz_xPrintGetOneAttributeReq 16
1114 +typedef struct {
1115 + BYTE type; /* X_Reply */
1116 + CARD8 unused; /* not used */
1117 + CARD16 sequenceNumber B16;
1118 + CARD32 length B32;
1119 + CARD32 valueLen B32; /* length of value string */
1120 + CARD32 pad1 B32;
1121 + CARD32 pad2 B32;
1122 + CARD32 pad3 B32;
1123 + CARD32 pad4 B32;
1124 + CARD32 pad5 B32;
1126 + /* variable portion *****************************************
1127 + STRING8 value; * value as a string *
1128 + BYTE pad(value) * unused *
1129 + ************************************************************/
1130 +} xPrintGetOneAttributeReply;
1131 +#define sz_xPrintGetOneAttributeReply 32
1134 +typedef struct _PrintGetPageDimensions {
1135 + CARD8 reqType; /* always PrintReqCode */
1136 + CARD8 printReqType; /* always X_PrintGetPageDimensions */
1137 + CARD16 length B16;
1138 + PCONTEXT printContext B32; /* print context */
1139 +} xPrintGetPageDimensionsReq;
1140 +#define sz_xPrintGetPageDimensionsReq 8
1142 +typedef struct {
1143 + BYTE type; /* X_Reply */
1144 + CARD8 unused; /* not used */
1145 + CARD16 sequenceNumber B16;
1146 + CARD32 length B32;
1147 + CARD16 width; /* total pixel width */
1148 + CARD16 height; /* total pixel height */
1149 + CARD16 rx; /* reproducable x pixel offset */
1150 + CARD16 ry; /* reproducable y pixel offset */
1151 + CARD16 rwidth; /* reproducable x pixel width */
1152 + CARD16 rheight; /* reproducable y pixel width */
1153 + CARD32 pad1 B32;
1154 + CARD32 pad2 B32;
1155 + CARD32 pad3 B32;
1156 +} xPrintGetPageDimensionsReply;
1157 +#define sz_xPrintGetPageDimensionsReply 32
1160 +typedef struct _PrintQueryScreens {
1161 + CARD8 reqType; /* always PrintReqCode */
1162 + CARD8 printReqType; /* always X_PrintQueryScreens */
1163 + CARD16 length B16;
1164 +} xPrintQueryScreensReq;
1165 +#define sz_xPrintQueryScreensReq 4
1167 +typedef struct {
1168 + BYTE type; /* X_Reply */
1169 + CARD8 unused; /* not used */
1170 + CARD16 sequenceNumber B16;
1171 + CARD32 length B32;
1172 + CARD32 listCount; /* number of screens following */
1173 + CARD32 pad1 B32;
1174 + CARD32 pad2 B32;
1175 + CARD32 pad3 B32;
1176 + CARD32 pad4 B32;
1177 + CARD32 pad5 B32;
1179 + /* variable portion *****************************************
1180 + WINDOW rootWindow; * root window of screen *
1181 + ************************************************************/
1182 +} xPrintQueryScreensReply;
1183 +#define sz_xPrintQueryScreensReply 32
1185 +typedef struct _PrintSetImageResolution {
1186 + CARD8 reqType; /* always PrintReqCode */
1187 + CARD8 printReqType; /* always X_PrintSetImageResolution */
1188 + CARD16 length B16;
1189 + PCONTEXT printContext B32; /* print context */
1190 + CARD16 imageRes B16; /* image resolution */
1191 + CARD16 pad1 B16;
1192 +} xPrintSetImageResolutionReq;
1193 +#define sz_xPrintSetImageResolutionReq 12
1195 +typedef struct {
1196 + BYTE type; /* X_Reply */
1197 + BOOL status; /* accepted or not */
1198 + CARD16 sequenceNumber B16;
1199 + CARD32 length B32;
1200 + CARD16 prevRes B16; /* previous resolution */
1201 + CARD16 pad1 B32;
1202 + CARD32 pad2 B32;
1203 + CARD32 pad3 B32;
1204 + CARD32 pad4 B32;
1205 + CARD32 pad5 B32;
1206 + CARD32 pad6 B32;
1207 +} xPrintSetImageResolutionReply;
1208 +#define sz_xPrintSetImageResolutionReply 32
1210 +typedef struct _PrintGetImageResolution {
1211 + CARD8 reqType; /* always PrintReqCode */
1212 + CARD8 printReqType; /* always X_PrintGetImageResolution */
1213 + CARD16 length B16;
1214 + PCONTEXT printContext B32; /* print context */
1215 +} xPrintGetImageResolutionReq;
1216 +#define sz_xPrintGetImageResolutionReq 8
1218 +typedef struct {
1219 + BYTE type; /* X_Reply */
1220 + CARD8 unused;
1221 + CARD16 sequenceNumber B16;
1222 + CARD32 length B32;
1223 + CARD16 imageRes B16; /* image resolution */
1224 + CARD16 pad1 B32;
1225 + CARD32 pad2 B32;
1226 + CARD32 pad3 B32;
1227 + CARD32 pad4 B32;
1228 + CARD32 pad5 B32;
1229 + CARD32 pad6 B32;
1230 +} xPrintGetImageResolutionReply;
1231 +#define sz_xPrintGetImageResolutionReply 32
1233 +#ifndef _XP_PRINT_SERVER_
1234 +/***********************************************************************
1236 + * Library-only definitions.
1237 + */
1238 +extern XPHinterProc _xp_hinter_proc;
1239 +extern char *_xp_hinter_desc;
1240 +extern int _xp_hinter_init;
1242 +#else /* _XP_PRINT_SERVER_ */
1244 +/***********************************************************************
1246 + * Server-only definitions shared between the extension and DDX layers.
1248 + */
1251 + * Internal return code used to indicate that the requesting
1252 + * client has been suspended.
1253 + */
1254 +#define Suspended 84
1256 +struct _XpContext;
1258 +extern void XpRegisterPrinterScreen(
1259 + ScreenPtr pScreen,
1260 + int (*CreateContext)(struct _XpContext *));
1262 +typedef struct _xpprintFuncs {
1263 + int (*StartJob)(
1264 + struct _XpContext * /* pContext */,
1265 + Bool /* sendClientData */,
1266 + ClientPtr /* client */);
1267 + int (*EndJob)(struct _XpContext *, int);
1268 + int (*StartDoc)(
1269 + struct _XpContext * /* pContext */,
1270 + XPDocumentType /* type */);
1271 + int (*EndDoc)(struct _XpContext *, int);
1272 + int (*StartPage)(
1273 + struct _XpContext * /* pContext */,
1274 + WindowPtr /* pWin */);
1275 + int (*EndPage)(
1276 + struct _XpContext * /* pContext */,
1277 + WindowPtr /* pWin */);
1278 + int (*PutDocumentData)(
1279 + struct _XpContext * /* pContext */,
1280 + DrawablePtr /* pDraw */,
1281 + char * /* pData */,
1282 + int /* len_data */,
1283 + char * /* pDoc_fmt */,
1284 + int /* len_fmt */,
1285 + char * /* pOptions */,
1286 + int /* len_options */,
1287 + ClientPtr /* client */);
1288 + int (*GetDocumentData)(
1289 + struct _XpContext * /* pContext */,
1290 + ClientPtr /* client */,
1291 + int /* maxBufferSize */);
1292 + int (*DestroyContext)(
1293 + struct _XpContext *); /* pContext */
1294 + char *(*GetAttributes)(
1295 + struct _XpContext *,
1296 + XPAttributes /* pool */);
1297 + char *(*GetOneAttribute)(
1298 + struct _XpContext * /* pContext */,
1299 + XPAttributes /* pool */,
1300 + char * /* attrs */);
1301 + int (*SetAttributes)(
1302 + struct _XpContext * /* pContext */,
1303 + XPAttributes /* pool */,
1304 + char * /* attrs */);
1305 + int (*AugmentAttributes)(
1306 + struct _XpContext * /* pContext */,
1307 + XPAttributes /* pool */,
1308 + char * /* attrs */);
1309 + int (*GetMediumDimensions)(
1310 + struct _XpContext * /* pPrintContext */,
1311 + CARD16 * /* pWidth */,
1312 + CARD16 * /* pHeight */);
1313 + int (*GetReproducibleArea)(
1314 + struct _XpContext * /* pPrintContext */,
1315 + xRectangle * /* pRect */);
1316 + int (*SetImageResolution)(
1317 + struct _XpContext * /* pPrintContext */,
1318 + int /* imageRes */,
1319 + Bool * /* pStatus */);
1320 +} XpDriverFuncs, *XpDriverFuncsPtr;
1323 + * Each print context is represented by one of the following structs
1324 + * associated with a resource ID of type RTcontext . A pointer to
1325 + * the context is placed in the Xp extension's devPrivates
1326 + * element in each client * which establishes a context via
1327 + * either initContext or setContext.
1328 + * The context pointer is also placed in the struct indicated by the
1329 + * RTpage resource associated with each StartPage'd window.
1330 + */
1331 +typedef struct _XpContext {
1332 + XID contextID;
1333 + char *printerName;
1334 + int screenNum; /* screen containing the printer */
1335 + struct _XpClient *clientHead; /* list of clients */
1336 + CARD32 state;
1337 + VisualID pageWin;
1338 + DevUnion *devPrivates;
1339 + XpDriverFuncs funcs;
1340 + ClientPtr clientSlept;
1341 + int imageRes;
1342 +} XpContextRec, *XpContextPtr;
1344 +#include <X11/fonts/fontstruct.h> /* FontResolutionPtr */
1346 +extern Bool XpAllocateContextPrivate(int, unsigned);
1347 +extern FontResolutionPtr XpGetClientResolutions(ClientPtr, int *);
1348 +extern XpContextPtr XpContextOfClient(ClientPtr);
1349 +extern XpContextPtr XpGetPrintContext(ClientPtr);
1350 +extern int XpAllocateContextPrivateIndex(void);
1351 +extern int XpRehashPrinterList(void);
1352 +extern void XpSetFontResFunc(ClientPtr);
1353 +extern void XpUnsetFontResFunc(ClientPtr);
1354 +extern void XpRegisterInitFunc(ScreenPtr, char *, int (*)(struct _XpContext *));
1356 +#endif /* _XP_PRINT_SERVER_ */
1358 +_XFUNCPROTOEND
1360 +#endif /* _XpPrintstr_H_ */
1361 diff -Nurp libXp-1.0.4/Makefile.am libXp-1.0.4-printproto/Makefile.am
1362 --- libXp-1.0.4/Makefile.am 2022-09-12 20:50:17.000000000 +0000
1363 +++ libXp-1.0.4-printproto/Makefile.am 2022-11-17 17:10:05.105444432 +0000
1364 @@ -23,10 +23,18 @@ AM_CFLAGS = $(XPRINT_CFLAGS)
1366 SUBDIRS = src man
1368 +printdir = $(includedir)/X11/extensions
1369 +print_HEADERS = \
1370 + $(top_srcdir)/include/X11/extensions/Print.h \
1371 + $(top_srcdir)/include/X11/extensions/Printstr.h
1373 pkgconfigdir = $(libdir)/pkgconfig
1374 pkgconfig_DATA = xp.pc
1376 -EXTRA_DIST = xp.pc.in ChangeLog README.md
1377 +sharedpkgconfigdir = $(datarootdir)/pkgconfig
1378 +sharedpkgconfig_DATA = printproto.pc
1380 +EXTRA_DIST = xp.pc.in printproto.pc.in ChangeLog README.md
1381 MAINTAINERCLEANFILES = ChangeLog
1383 .PHONY: ChangeLog
1384 diff -Nurp libXp-1.0.4/printproto.pc.in libXp-1.0.4-printproto/printproto.pc.in
1385 --- libXp-1.0.4/printproto.pc.in 1970-01-01 00:00:00.000000000 +0000
1386 +++ libXp-1.0.4-printproto/printproto.pc.in 2022-11-17 17:08:24.769225832 +0000
1387 @@ -0,0 +1,10 @@
1388 +prefix=@prefix@
1389 +exec_prefix=@exec_prefix@
1390 +libdir=@libdir@
1391 +includedir=@includedir@
1393 +Name: PrintProto
1394 +Description: Print extension headers
1395 +Version: @PACKAGE_VERSION@
1396 +Requires: xau
1397 +Cflags: -I${includedir}
1398 diff -Nurp libXp-1.0.4/src/Makefile.am libXp-1.0.4-printproto/src/Makefile.am
1399 --- libXp-1.0.4/src/Makefile.am 2022-09-12 20:50:17.000000000 +0000
1400 +++ libXp-1.0.4-printproto/src/Makefile.am 2022-11-17 17:08:24.769225832 +0000
1401 @@ -24,7 +24,7 @@ libXp_la_LIBADD = $(XPRINT_LIBS)
1403 AM_CFLAGS = $(CWARNFLAGS) $(XPRINT_CFLAGS) $(MALLOC_ZERO_CFLAGS)
1405 -AM_CPPFLAGS = -I$(top_srcdir)/include/X11/extensions
1406 +AM_CPPFLAGS = -I$(top_srcdir)/include/
1409 # Library version number. This must match old versions on