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