summaryrefslogtreecommitdiff
path: root/specs/lbx.xml
blob: f42f9f9f52b4061218cffd7b0a1496dfa51cab62 (plain)
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
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE article
          PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
          "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">

<article id="lbx">

<articleinfo>
   <title>Low Bandwidth X Extension</title>
   <subtitle>X Consortium Standard</subtitle>
   <authorgroup>
     <author>
       <firstname>D.</firstname>
       <surname>Converse</surname>
     </author>
     <author>
       <firstname>J.</firstname>
       <surname>Fulton</surname>
     </author>
     <author>
       <firstname>D.</firstname>
       <surname>Lemke</surname>
     </author>
     <author>
       <firstname>R.</firstname>
       <surname>Mor</surname>
     </author>
     <author>
       <firstname>K.</firstname>
       <surname>Packard</surname>
     </author>
     <author>
       <firstname>R.</firstname>
       <surname>Tice</surname>
     </author>
     <author>
       <firstname>D.</firstname>
       <surname>Tonogai</surname>
     </author>
   </authorgroup>
   <releaseinfo>Protocol Version 1.0</releaseinfo>


<legalnotice>
<para>
Copyright (c) 1996 X Consortium
</para>
<para>
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
sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to
the following conditions:
</para>
<para>
The above copyright notice and this permission notice shall be included in all
copies or substantial portions
of the Software.
</para>
<para>
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 X
CONSORTIUM 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.
</para>
<para>
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise
to promote the sale, use or other dealings in this Software without prior
written authorization from the
X Consortium.


</para>
</legalnotice>

</articleinfo>

<sect1 id='introduction'>
<title>Introduction</title>

<para>
Low Bandwidth X (LBX) is a network-transparent protocol for running X Window
System applications over transport channels whose bandwidth and latency are
significantly worse than that used in local area networks. It combines a
variety of caching and reencoding techniques to reduce the volume of data that
must be sent over the wire. It can be used with existing clients by placing a
proxy between the clients and server, so that the low bandwidth/high latency
communication occurs between the proxy and server.
</para>


<para>
This extension was designed and implemented by Jim Fulton, David Lemke, Keith
Packard, and Dale Tonogai, all of Network Computing Devices (NCD). Chris Kent
Kantarjiev (Xerox PARC) participated in early design discussions. Ralph Mor (X
Consortium) designed and implemented additional sections. Donna Converse (X
Consortium) authored the protocol description and encoding from design notes
and the implementation. Ray Tice (X Consortium) resolved the open issues in the
design and specification. Bob Scheifler (X Consortium) helped out in many areas.
</para>


<para>
The extension name is &quot;LBX&quot;.
</para>


</sect1>
<sect1 id='description'>
<title>Description</title>

<para>
The design center for LBX is to use a proxy as an intermediary between the
client and server. The proxy reencodes and compresses requests, events, replies
and errors, as well as the resulting data stream. Additionally, the proxy can
cache information from the server to provide low-latency replies to clients.
This reply generation by the proxy is known as short-circuiting. A proxy can
handle multiple clients for a given server, but does not prevent clients from
connecting directly to the server. The design allows the proxy to multiplex
multiple clients into a single data stream to the server.
</para>


<para>
Much of LBX is implemented as an extension. The compression and reencoding
changes can be isolated to the transport and dispatch portions of the server,
while short-circuiting requires minor changes to the server’s colormap and
property code.
</para>


<para>
LBX employs several different compression and short-circuiting methods. Use of
these methods is negotiable, and in some cases, the algorithm used by a given
method is negotiable as well. LBX also provides for negotiation of extensions
to LBX.
</para>


<sect2 id='data_flow'>
<title>Data Flow</title>

<para>
The LBX data stream goes through a number of layers:
</para>


<orderedlist>
  <listitem>
<para>Client requests</para>
  </listitem>
  <listitem>
<para>Read by LBX and potential byte-swapping</para>
  </listitem>
  <listitem>
<para>Request-specific compression</para>
  </listitem>
  <listitem>
<para>Potential byte swapping</para>
  </listitem>
  <listitem>
<para>Multiplexing of client request streams</para>
  </listitem>
  <listitem>
<para>Delta replacement</para>
  </listitem>
  <listitem>
<para>Stream compression</para>
  </listitem>
</orderedlist>

<para>
Transport
</para>

<!-- FIXME:  descending -->
<orderedlist>
  <listitem>
<para>Stream decompression</para>
  </listitem>
  <listitem>
<para>Delta substitution</para>
  </listitem>
  <listitem>
<para>Demultiplexing of client request streams</para>
  </listitem>
  <listitem>
<para>Potential byte swapping</para>
  </listitem>
  <listitem>
<para>Reencoding</para>
  </listitem>
  <listitem>
<para>Request processing</para>
  </listitem>
</orderedlist>

<para>
The reverse process occurs with X server replies, events, and errors.
</para>


</sect2>
<sect2 id='tags'>
<title>Tags</title>

<para>
Tags are used to support caching of large data items that are expected to be
queried multiple times. Such things as the keyboard map and font metrics are
often requested by multiple clients. Rather than send the data each time, the
first time the data is sent it includes a tag. The proxy saves this data, so
that subsequent requests can send only the tag to refer to that same data. The
different types of tags are used for connection information, keyboard maps,
modifier maps, fonts information and properties.
</para>


<para>
Tag usage is negotiated as a boolean in the <emphasis>
LbxStartProxy</emphasis>
 message. The proxy controls how many tags are stored in the proxy. The server
may wish to observe the proxy’s InvalidateTag behavior to limit how many tags
are cached at any one time. Tagged data is not shared across types of tags, but
the number space used for the tag ids is. The tag ids are generated by the
server.
</para>


<para>
The X server keeps track of what tags are known to the proxy. The proxy can
invalidate a tag if no tag bearing replies of that type are pending. The proxy
sends an <emphasis>
LbxInvalidateTag</emphasis>
 message to release the tagged data. The proxy must not invalidate connection
tags unless instructed to do so by the server.
</para>


<para>
If the server wishes to discard tagged data, it must either have received an
<emphasis>
LbxInvalidateTag</emphasis>
 request from the proxy or send an <emphasis>
LbxInvalidateTag</emphasis>
 event to the proxy for that tag.
</para>


<sect3 id='tag_substitution_in_requests'>
<title>Tag Substitution in Requests</title>

<para>
Many substitution requests have a tag field, followed by fields marked
optional. For these requests, if the optional fields are present, the
data in them is stored in the indicated tag, unless the tag is 0. If
the optional fields are absent, the tag field indicates the tag that
contains the data for the &quot;optional&quot; fields.
</para>


</sect3>
<sect3 id='property_tags'>
<title>Property Tags</title>

<para>
Property data makes special use of tags. A common use of properties is for
inter-client communication. If both clients use the proxy, it is wasteful to
send the data to the server and then back, when the server may never need it.
<emphasis>
LbxChangeProperty</emphasis>
 request does the same work as the core <emphasis>
ChangeProperty</emphasis>
 request, but it does not send the data. The reply to this request contains a
tag id corresponding to the data. If the property information is used locally,
the server responds to <emphasis>
LbxGetProperty</emphasis>
 with the tag, and the property data need never be sent to the server. If the
server does require the data, it can issue an <emphasis>
LbxQueryTag</emphasis>
 message. The proxy can also send the data on at any time if it judges it
appropriate (i.e., when the wire goes idle). Since the proxy owns the property
data, it must not invalidate the tag before sending the data back to the server
via an <emphasis>
LbxTagData</emphasis>
 request.
</para>


</sect3>
</sect2>
<sect2 id='short_circuiting'>
<title>Short-circuiting</title>

<para>
Short-circuiting is used to handle constant data. This includes atoms, color
name/RGB mappings, and <emphasis>
AllocColor</emphasis>
 calls. Atoms and color name/RGB mappings stay constant for the life of the
server. <emphasis>
AllocColor</emphasis>
<emphasis>
 </emphasis>
replies are constant for each colormap. Short-circuiting replaces round-trip
requests with one-way requests, and can sometimes use one in place of many.
</para>


<para>
Atoms are used heavily for ICCCM communication. Once the proxy knows the string
to atom mapping, it has no need to send subsequent requests for this atom to
the server.
</para>


<para>
Colorname/RGB mappings are constant, so once the proxy sees the response from
<emphasis>
LookupColor</emphasis>
, it need not forward any subsequent requests.
</para>


<para>
Clients often use the same color cells, so once a read-only color allocation
has occurred, the proxy knows what RGB values should be returned to the client.
The proxy doesn't need to forward any <emphasis>
AllocColor</emphasis>
 requests it can resolve, but it must tell the server to modify the color
cell's reference count. <emphasis>
LbxIncrementPixel</emphasis>
 is used to support this.
</para>


<para>
For all three classes of short-circuiting, the proxy must still tell the server
a request has occurred, so that the request sequence numbers stay in sync. This
is done with <emphasis>
LbxModifySequence</emphasis>
.
</para>


<para>
Sequence numbers cause the major complication with short-circuiting. X
guarantees that any replies, events or errors generated by a previous request
will be sent before those of a later request. This means that any requests that
can be handled by the proxy must have their reply sent after any previous
events or errors.
</para>


<para>
If a proxy’s applications do not require strict adherence to the X protocol
ordering of errors or events, a proxy might provide further optimization by
avoiding the overhead of maintaining this ordering, however, the resulting
protocol is not strictly X11 compliant.
</para>


</sect2>
<sect2 id='graphics_re_encoding'>
<title>Graphics Re-encoding</title>

<para>
The LBX proxy attempts to reencode <emphasis>PolyPoint</emphasis>,
<emphasis>PolyLine</emphasis>, <emphasis>PolySegment</emphasis>,
<emphasis>PolyRectangle</emphasis>, <emphasis>PolyArc</emphasis>,
<emphasis>FillPoly</emphasis>, <emphasis>PolyFillRectangle</emphasis>,
<emphasis>PolyFillArc</emphasis>, <emphasis>CopyArea</emphasis>,
<emphasis>CopyPlane</emphasis>, <emphasis>PolyText8</emphasis>,
<emphasis>PolyText16</emphasis>, <emphasis>ImageText8</emphasis>,
and <emphasis>ImageText16</emphasis> requests. If the request can be
reencoded, it may be replaced by an equivalent LBX form of the request.
The requests are reencoded by attempting to reduce 2-byte coordinate,
length, width and angle fields to 1 byte. Where applicable, the
coordinate mode is also converted to <emphasis>Previous</emphasis>
 to improve the compressibility of the resulting data. In image requests,
the image data may also be compressed.
</para>

</sect2>
<sect2 id='motion_events'>
<title>Motion events</title>

<para>
To prevent clogging the wire with <emphasis>MotionNotify</emphasis>
 events, the server and proxy work together to control the number
of events on the wire. This is done with the
<emphasis>LbxAllowMotion</emphasis>
 request. The request adds an amount to an allowed motion count in
the server, which is kept on a per-proxy basis. Every motion notify
event sent to the proxy decrements the allowed motion counter. If
the allowed motion count is less than or equal to zero, motion
events not required by the X protocol definition are not sent to the
proxy. The allowed motion counter has a minimum value of -2^31.
</para>

</sect2>
<sect2 id='event_squishing'>
<title>Event Squishing</title>

<para>
In the core protocol, all events are padded as needed to be 32 bytes long. The
LBX extension reduces traffic by removing padding at the end of events, and
implying the event length from its type. This is known as squishing.
</para>

</sect2>
<sect2 id='master_client_'>
<title>Master Client </title>

<para>
When the initial X connection between the proxy and the server is converted to
LBX mode, the proxy itself becomes the master client. New client requests and
some tag messages are sent in the context of the master client.
</para>


</sect2>
<sect2 id='multiplexing_of_clients'>
<title>Multiplexing of Clients</title>

<para>
The LBX proxy multiplexes the data streams of all its clients into one stream,
and then splits them apart again when they are received. The <emphasis>
LbxSwitch</emphasis>
 message is used to tell each end which client is using the wire at the time.
</para>


<para>
The server should process delta requests in the order that they appear on the
LBX connection. If the server does not maintain the interclient request order
for requests sent by the proxy, it must still obey the semantics implied by the
interclient request order so that the delta cache functions correctly.
</para>


<para>
The server can affect the multiplexing of clients by the proxy using the
<emphasis>
LbxListenToOne</emphasis>
 and <emphasis>
LbxListenToAll</emphasis>
 messages. This is useful during grabs, since the master connection can not be
blocked during grabs like other clients. The proxy is responsible for tracking
server grabs issued by its clients so that the proxy can multiplex the client
streams in an order executable by the server.
</para>


<para>
Replies must be ordered in the multiplexed data stream from the server to the
proxy such that the reply carrying tagged data precedes replies that refer to
that tagged data.
</para>


</sect2>
<sect2 id='swapping'>
<title>Swapping</title>

<para>
Swapping is handled as with any X extension, with one caveat. Since a proxy can
be supporting clients with different byte orders, and they all share the same
wire, the length fields of all messages between the server and proxy are
expressed in the proxy byte order. This prevents any problems with length
computation that may occur when clients are switched.
</para>


</sect2>
<sect2 id='delta_cache'>
<title>Delta cache</title>

<para>
LBX takes advantage of the fact that an X message may be very similar to one
that has been previously sent. For example, a <emphasis>
KeyPress</emphasis>
 event may differ from a previous <emphasis>
KeyPress</emphasis>
 event in just a few bytes. By sending just the bytes that differ (or
"deltas"), the number of bytes sent over the wire can be substantially reduced.
Delta compaction is used on requests being sent by the proxy as well as on
replies and events being sent by the server.
</para>


<para>
The server and the proxy each keep per-proxy request and response caches. The
response cache contains events, errors and replies. All messages are saved in
the appropriate delta cache if they are of an appropriate type and more than 8
bytes long but fit within the delta cache. The number of entries in the delta
cache and the maximum saved message size are negotiated in the <emphasis>
LbxStartProxy</emphasis>
 request.
</para>


<para>
The LBX requests that are never stored in the request delta cache are the
<emphasis>
LbxQueryVersion</emphasis>
, <emphasis>
LbxStartProxy</emphasis>
, <emphasis>
LbxSwitch</emphasis>
, <emphasis>
LbxNewClient</emphasis>
, <emphasis>
LbxAllowMotion</emphasis>
, <emphasis>
LbxDelta</emphasis>
, <emphasis>
LbxQueryExtension</emphasis>
, <emphasis>
LbxPutImage</emphasis>
, <emphasis>
LbxGetImage</emphasis>
, <emphasis>
LbxBeginLargeRequest</emphasis>
, <emphasis>
LbxLargeRequestData</emphasis>
, <emphasis>
LbxEndLargeRequest</emphasis>
 and <emphasis>
LbxInternAtoms</emphasis>
 requests. The responses that are never stored in the response cache are
<emphasis>
LbxSwitchEvent</emphasis>
 and <emphasis>
LbxDeltaResponse</emphasis>
. The message carried by a <emphasis>
delta </emphasis>
message is also cached, if it meets the other requirements. Messages after the
<emphasis>
LbxStartProxy</emphasis>
 request are cached starting at index 0, and incrementing the index, modulo the
number of entries, thereafter. The request and response caches are
independently indexed.
</para>


<para>
If the current message is cachable and the same length as a message in the
corresponding delta cache, a delta message may be substituted in place of the
original message in the protocol stream.
</para>


</sect2>
<sect2 id='stream_compression'>
<title>Stream Compression</title>

<para>
Before being passed down to the transport layer messages can be passed through
a general purpose data compressor. The choice of compression algorithm is
negotiated with <ulink url="lbx.htm#20870">See LbxStartProxy</ulink>. The proxy
and server are not required to support any specific stream compressor. As an
example, however, the X Consortium implementation of a ZLIB based compressor is
described below.
</para>

<note><para>
The XC-ZLIB compressor is presented with a simple byte stream - the X and LBX
message boundaries are not apparent. The data is broken up into fixed sized
blocks. Each block is compressed using zlib 1.0 (by Gailly &amp; Adler), then a
two byte header is prepended, and then the entire packet is transmitted. The
header has the following information:
</para></note>
<para><programlisting>
      out[0] = (length &amp; 0xfff) &gt;&gt; 8 | ((compflag) ? 0x80 : 0);
      out[1] = length &amp; 0xff;
</programlisting></para>

</sect2>
<sect2 id='authentication_protocols'>
<title>Authentication Protocols</title>

<para>
The current version of LBX does not support multipass authentication protocols
for clients of the proxy. These authentication protocols return an <emphasis>
Authenticate</emphasis>
 message in response to a connection setup request, and require additional
authentication data from the client after the <emphasis>
LbxNewClient</emphasis>
 request, and before the reply to <emphasis>
LbxNewClient</emphasis>
. One example of such a protocol is XC-QUERY-SECURITY-1.
</para>


</sect2>
</sect1>
<sect1 id='c_library_interfaces_'>
<title>C Library Interfaces </title>

<para>
The C Library routines for LBX are in the Xext library. The prototypes are
located in a file named &quot;XLbx.h&quot;.
</para>


<sect2 id='application_library_interfaces'>
<title>Application Library Interfaces</title>

<para>
In a proxy environment, applications do not need to call these routines to take
advantage of LBX. Clients can, however, obtain information about the LBX
extension to the server using this interface. Use of this routine may be
altered when connected through a proxy, as described in <ulink
url="lbx.htm#33319">See C Library Interfaces</ulink>.
</para>


<sect3 id='xlbxqueryversion'>
<title>XLbxQueryVersion</title>

<para>
To determine the version of LBX supported by the X server, call <emphasis>
XLbxQueryVersion</emphasis>
.
</para>

<funcsynopsis>
<funcprototype>
<funcdef>Bool <function>XLbxQueryVersion</function></funcdef>
      <paramdef>Display * <parameter>display</parameter></paramdef>
      <paramdef>int * <parameter>major_version_return</parameter></paramdef>
      <paramdef>int * <parameter>minor_version_return</parameter></paramdef>
</funcprototype>
</funcsynopsis>

<variablelist>
  <varlistentry>
    <term>display</term>
    <listitem><para>Specifies the connection to the X server.</para></listitem>
  </varlistentry>
  <varlistentry>
    <term>major_version_return</term>
    <listitem><para>Returns the extension major version number.</para></listitem>
  </varlistentry>
  <varlistentry>
    <term>minor_version_return</term>
    <listitem><para>Returns the extension minor version number.</para></listitem>
  </varlistentry>
</variablelist>

<para>
The <emphasis>
XLbxQueryVersion</emphasis>
 function determines if the LBX extension is present. If the extension is not
present, <emphasis>
XLbxQueryVersion</emphasis>
 returns <emphasis>
False</emphasis>
; otherwise, it returns <emphasis>
True</emphasis>
. If the extension is present, <emphasis>
XLbxQueryVersion</emphasis>
 returns the major and minor version numbers of the extension as supported by
the X server.
</para>


</sect3>
</sect2>
<sect2 id='proxy_library_interfaces'>
<title>Proxy Library Interfaces</title>

<para>
The following interfaces are intended for use by the proxy.
</para>

<sect3 id='xlbxqueryextension'>
<title>XLbxQueryExtension</title>

<para>
To determine the dynamically assigned codes for the extension, use the Xlib
function <emphasis>
XQueryExtension</emphasis>
 or the LBX function <emphasis>
XLbxQueryExtension</emphasis>
.</para>


<funcsynopsis>
<funcprototype>
<funcdef>Bool <function>XLbxQueryExtension</function></funcdef>
      <paramdef>Display * <parameter>display</parameter></paramdef>
      <paramdef>int * <parameter>major_opcode_return</parameter></paramdef>
      <paramdef>int * <parameter>first_event_return</parameter></paramdef>
      <paramdef>int * <parameter>first_error_return</parameter></paramdef>
</funcprototype>
</funcsynopsis>

<variablelist>
  <varlistentry>
    <term>display</term>
    <listitem><para>Specifies the connection to the X server.</para></listitem>
  </varlistentry>
  <varlistentry>
    <term>major_opcode_return</term>
    <listitem><para>Returns the major opcode.</para></listitem>
  </varlistentry>
  <varlistentry>
    <term>first_event_return</term>
    <listitem><para>Returns the first event code.</para></listitem>
  </varlistentry>
  <varlistentry>
    <term>first_error_return</term>
    <listitem><para>Returns the first error code.</para></listitem>
  </varlistentry>
</variablelist>

<para>
The <emphasis>
XLbxQueryExtension</emphasis>
 function determines if the LBX extension is present. If the extension is not
present, <emphasis>
XLbxQueryExtension</emphasis>
 returns <emphasis>
False</emphasis>
; otherwise, it returns <emphasis>
True</emphasis>
. If the extension is present, <emphasis>
XLbxQueryExtension</emphasis>
 returns the major opcode for the extension to major_opcode_return, the base
event type code to first_event_return, and the base error code to
first_error_return; otherwise, the return values are undefined.
</para>

</sect3>

<sect3 id='xlbxgeteventbase'>
<title>XLbxGetEventBase</title>
<para>
To determine the base event type code, use the Xlib function <emphasis>
XQueryExtension</emphasis>
 or the LBX function <emphasis>
XLbxGetEventBase</emphasis>.
</para>


<funcsynopsis>
<funcprototype>
<funcdef>int <function>XLbxGetEventBase</function></funcdef>
      <paramdef>Display * <parameter>display</parameter></paramdef>
</funcprototype>
</funcsynopsis>

<variablelist>
  <varlistentry>
    <term>display</term>
    <listitem><para>Specifies the connection to the X server.</para></listitem>
  </varlistentry>
</variablelist>

<para>
The <emphasis>XLbxGetEventBase</emphasis>
function returns the base event type code if the extension is
present; otherwise, it returns -1.
</para>

</sect3>
</sect2>
</sect1>


<sect1 id='protocol'>
<title>Protocol</title>

<sect2 id='syntactic_conventions_and_common_types'>
<title>Syntactic Conventions and Common Types</title>

<para>
Please refer to the X Window System Protocol specification,
as this document uses the syntactic conventions established
there and references types defined there.
</para>


<para>
The following additional types are defined by this extension:
</para>

<literallayout>
<emphasis role='bold'>DIFFITEM</emphasis>
1      CARD8      offset
1      CARD8      diff
</literallayout>

<literallayout>
<emphasis role='bold'>LBXANGLE: CARD8 or 2 BYTE</emphasis>
      where (in order of precedence):
      (0 &lt;= in &lt;= A(95)) &amp;&amp; !(in % A(5))       out = 0x5a + (in /
A(5))
      A(105) &lt;= in &lt;= A(360) &amp;&amp; !(in % A(15))      out = 0x67 +
(in / A(15))
      -A(100) &lt;= in &lt;= -A(5) &amp;&amp; !(in % A(5))      out = 0xa6 +
(in / A(5))
      -A(360) &lt; in &lt;= -A(105) &amp;&amp; !(in % A(15))      out = 0x98 +
(in / A(15))
      -A(360) &lt; in &lt;= A(360)      out[0] = in &gt;&gt; 8; out[1] = in
</literallayout>

<literallayout>
<emphasis role='bold'>LBXARC:</emphasis>
      [x, y: LBXINT16,
      width, height: LBXCARD16,
      angle1, angle2: LBXANGLE]
</literallayout>

<para>
Within a list of arcs, after the first arc, x and y are
relative to the corresponding fields of the prior arc.
</para>

<literallayout>
<emphasis role='bold'>LBXCARD16: CARD8 or 2 BYTE</emphasis>
      where:
      0x0000 &lt;= in &lt; 0x00F0      CARD8
      0x00F0 &lt;= in &lt; 0x10F0      out[0] = 0xF0 | ((in - 0xF0) &gt;&gt;
8)
            out[1] = in - 0xF0
</literallayout>

<literallayout>
<emphasis role='bold'>LBXGCANDDRAWENT</emphasis>
[ gc-cache-index, drawable-cache-index: CARD4 ]
</literallayout>

<literallayout>
<emphasis role='bold'>LBXGCANDDRAWUPDATE</emphasis>
      drawable: DRAWABLE      /* present only if
<emphasis>drawable-cache-index</emphasis>
 == 0 */
gc: GC]      /* present only if <emphasis>gc-cache-index</emphasis> == 0 */
</literallayout>

<literallayout>
<emphasis role='bold'>LBXGCANDDRAWABLE</emphasis>
      cache-entries: LBXGCANDDRAWENT
      updates: LBXGCANDDRAWUPDATE
</literallayout>

<literallayout>
<emphasis role='bold'>LBXINT16</emphasis>: INT8 or 2 BYTE
      where:
      0xF790 &lt;= in &lt; 0xFF90      out[0] = 0x80 | (((in + 0x70) &gt;&gt;
8) &amp; 0x0F)
            out[1] = in + 0x70
      0xFF90 &lt;= in &lt; 0x0080      CARD8
      0x0080 &lt;= in &lt; 0x0880      out[0] = 0x80 | (((in - 0x80) &gt;&gt;
8) &amp; 0x0F)
            out[1] = in - 0x80
</literallayout>

<literallayout>
<emphasis role='bold'>LBXPINT16</emphasis>: CARD8 or 2 BYTE       /* for
usually positive numbers */
      where:
      0xFE00 &lt;= in &lt; 0x0000      out[0] = 0xF0 | (((in + 0x1000)
&gt;&gt; 8) &amp; 0x0F)
            out[1] = in + 0x1000
      0x0000 &lt;= in &lt; 0x00F0       CARD8
      0x00F0 &lt;= in &lt; 0x0EF0      out[0] = 0xF0 | ((in - 0xF0) &gt;&gt;8)
            out[1] = in - 0xF0
</literallayout>

<literallayout>
<emphasis role='bold'>LBXPOINT</emphasis>: [x, y: LBXINT16]
      Within a list of points, after the first rectangle, x and y are
relative to the corresponding fields of the prior point.
</literallayout>

<literallayout>
<emphasis role='bold'>LBXRECTANGLE</emphasis>:
      [x, y: LBXINT16,
      width, height: LBXCARD16]
</literallayout>

<para>
Within a list of rectangles, after the first rectangle, x and
y are relative to the corresponding fields of the prior rectangle.
</para>

<para>
MASK: CARD8
</para>


</sect2>
<sect2 id='errors'>
<title>Errors</title>

<para>
As with the X11 protocol, when a request terminates with an error,
the request has no side effects (that is, there is no partial execution).
</para>


<para>
There is one error, <emphasis>
LbxClient</emphasis>
. This error indicates that the client field of an LBX request was invalid, or
that the proxy’s connection was in an invalid state for a start or stop proxy
request.
</para>


</sect2>
<sect2 id='requests'>
<title>Requests</title>

<para>
There is one request that is expected to be used only by the client: <emphasis>
LbxQueryVersion</emphasis>
</para>


<para>
There is one request that is expected to be used by the client or the proxy:
<emphasis>
LbxQueryExtension</emphasis>
.
</para>


<para>
The following requests are expected to be used only by the proxy, and are
instigated by the proxy: <emphasis>
LbxStartProxy</emphasis>
, <emphasis>
LbxStopProxy</emphasis>
, <emphasis>
LbxNewClient</emphasis>
, <emphasis>
LbxSwitch</emphasis>
, <emphasis>
LbxCloseClient</emphasis>
, <emphasis>
LbxModifySequence</emphasis>
, <emphasis>
LbxAllowMotion</emphasis>
, <emphasis>
LbxInvalidateTag</emphasis>
, <emphasis>
LbxTagData</emphasis>
 and <emphasis>
LbxQueryTag</emphasis>
.
</para>


<para>
All other requests are sent by the proxy to the LBX server and are instigated
by reception of an X request from the client. They replace the X request.
</para>


<sect3 id='requests_initiated_by_the_proxy_or_by_the_client'>
<title>Requests Initiated by the Proxy or by the Client</title>

<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxQueryVersion</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
     <entry>=&gt;;</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>majorVersion: CARD16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>minorVersion: CARD16</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request returns the major and minor version numbers of the LBX protocol.
</para>


<para>
The encoding of this request is on <ulink url="lbx.htm#34166">See
LbxQueryVersion</ulink>.
</para>



</sect3>
<sect3 id='requests_initiated_or_substituted_by_the_proxy'>
<title>Requests Initiated or Substituted by the Proxy</title>

<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxQueryExtension</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
nbytes</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
name</emphasis>
: STRING8</entry>
    </row>
    <row rowsep='0'>
      <entry>=&gt;</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>num-requests: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>present: BOOL</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>major-opcode: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>first-event: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>first-error: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>reply-mask: LISTofMASK      /* optional */</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>event-mask:LISTofMASK      /* optional */</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request is identical to the <emphasis>
QueryExtension</emphasis>
 request, with an additional field, and two optional additional fields. When
the client issues an <emphasis>
QueryExtension</emphasis>
 request, the proxy will substitute an <emphasis>
LbxQueryExtension</emphasis>
 request.
</para>


<para>
This request determines if the named extension is present. If so, the major
opcode for the extension is returned, if it has one. Otherwise, zero is
returned. Any minor opcode and the request formats are specific to the
extension. If the extension involves additional event types, the base event
type code is returned. Otherwise, zero is returned. The format of events is
specific to the extension. If the extension involves additional error codes,
the base error code is returned. Otherwise, zero is returned. The format of
additional data in the errors is specific to the extension.
</para>


<para>
In addition, the number of requests defined by the named extension is returned.
If the number of requests is nonzero, and if the information is available,
reply-mask and event-mask will be included in the reply. The reply-mask
represents a bit-wise one-to-one correspondence with the extension requests.
The least significant bit corresponds to the first request, and the next bit
corresponds to the next request, and so on. Each element in the list contains
eight meaningful bits, except for the last element, which contains eight or
fewer meaningful bits. Unused bits are not guaranteed to be zero. The bit
corresponding to a request is set if the request could generate a reply,
otherwise it is zero. In the same way, the event-mask represents a bit-wise
one-to-one correspondence with the extension requests. A bit is set if the
corresponding request could result in the generation of one or more extension
or X11 events. If reply-mask is present in the reply, event-mask will also be
present.
</para>


<para>
The encoding of this request is on <ulink url="lbx.htm#37117">See
LbxQueryExtension</ulink>.
</para>



</sect3>
<sect3 id='control_requests_initiated_by_the_proxy'>
<title>Control Requests Initiated by the Proxy</title>

<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxStartProxy</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
options</emphasis>
: LISTofOPTION</entry>
    </row>
    <row rowsep='0'>
      <entry>=&gt;</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>choices: LISTofCHOICE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
LbxClient</emphasis>
, <emphasis>
Alloc</emphasis>
</entry>
    </row>
    <row rowsep='0'>
      <entry>where:</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>OPTION       [optcode: CARD8,</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      len: OPTLEN,</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      option:       (See <ulink
url="lbx.htm#35444">See StartProxy Options</ulink>) ]</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>CHOICE      [optcode: CARD8,</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      len: OPTLEN,</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      choice:        (See <ulink
url="lbx.htm#35444">See StartProxy Options</ulink>) ]</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>
<!--
    <row rowsep='0'>
      <entry role='protoargs'> -->


<table frame='none'>
 <title>StartProxy Options</title>
 <tgroup cols='4'>
 <colspec colsep='0'/>
 <colspec colsep='0'/>
 <colspec colsep='0'/>
 <colspec colsep='0'/>
<thead>
<row rowsep='0'>
  <entry>optcode</entry>
  <entry>option</entry>
  <entry>choice</entry>
  <entry>default</entry>
</row>
</thead>
<tbody>
<row rowsep='0'>
    <entry>delta-proxy</entry>
    <entry>DELTAOPT</entry>
    <entry>DELTACHOICE</entry>
    <entry>entries=16, maxlen=64</entry>
</row>
<row rowsep='0'>
    <entry>delta-server</entry>
    <entry>DELTAOPT</entry>
    <entry>DELTACHOICE</entry>
    <entry>entries=16, maxlen=64</entry>
</row>
<row rowsep='0'>
    <entry>stream-comp</entry>
    <entry>LISTofNAMEDOPT</entry>
    <entry>INDEXEDCHOICE</entry>
    <entry>No Compression</entry>
</row>
<row rowsep='0'>
    <entry>bitmap-comp</entry>
    <entry>LISTofSTRING8</entry>
    <entry>LISTofINDEXEDOPT</entry>
    <entry>No Compression</entry>
</row>
<row rowsep='0'>
    <entry>pixmap-comp</entry>
    <entry>LISTofPIXMAPMETHOD</entry>
    <entry>LISTofPIXMAPCHOICE</entry>
    <entry>No Compression</entry>
</row>
<row rowsep='0'>
    <entry>use-squish</entry>
    <entry>BOOL</entry>
    <entry>BOOL</entry>
    <entry>True</entry>
</row>
<row rowsep='0'>
    <entry>use-tags</entry>
    <entry>BOOL</entry>
    <entry>BOOL</entry>
    <entry>True</entry>
</row>
<row rowsep='0'>
    <entry>colormap</entry>
    <entry>LISTofSTRING8</entry>
    <entry>INDEXEDCHOICE</entry>
    <entry>No Colormap Grabbing</entry>
</row>
<row rowsep='0'>
    <entry>extension</entry>
    <entry>NAMEDOPT</entry>
    <entry>INDEXEDCHOICE</entry>
    <entry>Extension Disabled</entry>
  </row>
</tbody>
</tgroup>
</table>
<!--      </entry>
    </row>
-->
<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'>&nbsp;</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>DELTAOPT       [minN, maxN, prefN: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      minMaxMsgLen, maxMaxMsgLen, prefMaxMsgLen:
CARD8]</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>DELTACHOICE      [entries, maxlen:
CARD8]</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>INDEXEDCHOICE      [index: CARD8,</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      data: LISTofBYTE]</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>INDEXEDOPT      [index, opcode: CARD8]</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>NAMEDOPT      [name: STRING8,</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      detail: LISTofBYTE]</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>OPTLEN      1 or 3 CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      where:</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      (0 &lt; in &lt;= 0xFF):       out =
in</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      (0 &lt;= in&lt;= 0xFFFF):       out[0] =
0; out[1] = in &gt;&gt; 8; out[2] = in&amp; 0xFF;</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>PIXMAPMETHOD      [name: STRING8,</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      format-mask: BITMASK,</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      depths: LISTofCARD8]</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>PIXMAPCHOICE      [index, opcode: CARD8,</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      format-mask: BITMASK,</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      depths: LISTofCARD8]</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'></entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request negotiates LBX protocol options, and switches the proxy-server
connection from X11 protocol to LBX protocol.
</para>


<para>
The proxy gives the preferred protocol options in the request. The server
chooses from the given options and informs the proxy which to use. The options
may be listed in any order, and the proxy may choose which options to
negotiate. If an option is not successfully negotiated, the default is used.
</para>


<para>
The server delta cache and proxy delta caches can be configured for number of
entries, and the length of entries. (See <ulink url="lbx.htm#22595">See Delta
cache</ulink> for details.) The delta caches are configured using the <emphasis>
delta-server</emphasis>
 and <emphasis>
delta-proxy</emphasis>
 options. To configure a cache, the proxy sends the minimum, maximum and
preferred values for the number of cache entries, (<emphasis>
minN, maxN, prefN</emphasis>
), and the length of the cache entries, (<emphasis>
minMaxMsgLen, maxMaxMsgLen, prefMaxMsgLen</emphasis>
). The server’s reply fields, <emphasis>
entries</emphasis>
 and <emphasis>
maxlen</emphasis>
, contains the values to use. These values must be within the ranges specified
by the proxy. The server may also specify an <emphasis>
entries</emphasis>
 value of 0 to disable delta caching. The cache entry lengths are specified in
units of 4 bytes.
</para>


<para>
The stream compression algorithm is selected using the <emphasis>
stream-comp </emphasis>
option. (Stream compression is described in <ulink url="lbx.htm#11596">See
Stream Compression</ulink>.) Each algorithm has a name that follows the naming
conventions in <ulink url="lbx.htm#13570">See Algorithm Naming</ulink>. To
negotiate using the stream-comp option, the proxy lists its available
compressors. For each candidate algorithm, the proxy sends the name in the
<emphasis>
name</emphasis>
 field, and uses the <emphasis>
detail</emphasis>
 field to send any additional data specific to each compression algorithm. The
reply contains a 0-based index into the list of algorithms to indicate which
algorithm to use, followed by data specific to that algorithm.
</para>


<para>
Bitmap compression is negotiated using the <emphasis>
bitmap-comp</emphasis>
 option. The proxy sends a list of names of available algorithms, and the
server reply lists the algorithms to use. For each bitmap algorithm in the
reply, a 0-based index into the list of algorithms indicates the algorithm, and
the <emphasis>
opcode</emphasis>
 field gives the value for use in requests. The algorithm names follow the
conventions in <ulink url="lbx.htm#13570">See Algorithm Naming</ulink>.
</para>


<para>
Pixmap compression is negotiated using the <emphasis>
pixmap-comp</emphasis>
 option. The proxy sends a list of available algorithms. For each algorithm,
the list includes, the name, a bitmask of supported formats, and a list of
depths that the format supports. The server reply lists the algorithms to use.
For each pixmap algorithm in the reply, the reply contains a 0-based index into
the list of proxy algorithms, the opcode to use in requests when referring to
this algorithm, a mask of valid formats, and a list of valid depths. Algorithm
names follow the conventions in <ulink url="lbx.htm#13570">See Algorithm
Naming</ulink>.
</para>


<para>
Squishing is negotiated using the use-squish option. If the proxy desires
squishing, it sends a true value. The reply from the server indicates whether
to do squishing, and will indicate squishing only if <emphasis>
use-squish</emphasis>
 is set to true in the request.
</para>


<para>
Tag caching, described in <ulink url="lbx.htm#11018">See Tags</ulink>, is
negotiated using the use-tag option. If the proxy desires tag caching, it sends
a true value. The reply from the server indicates whether to do tag caching,
and will demand caching only if <emphasis>
use-tag</emphasis>
 is set to true in the request.
</para>


<para>
The colormap option is used to negotiate what color matching algorithm will be
used by the proxy when the proxy uses the <emphasis>
LbxAllocColor</emphasis>
 request to allocate pixels in a grabbed colormap. To negotiate using the
colormap option, the proxy lists the names of available colormap algorithms.
The choice in the reply contains a 0-based index into the list of algorithms to
indicate which algorithm to use, followed by data specific to that algorithm.
If no colormap algorithm is successfully negotiated, then the <emphasis>
LbxAllocColor</emphasis>
, <emphasis>
LbxGrabCmap</emphasis>
, and <emphasis>
LbxReleaseCmap</emphasis>
 requests will not be used.
</para>


<para>
The extension option is used to control extensions to LBX. These extensions
may, for example, enable other types of compression. To negotiate an extension,
the name of the extension is sent, followed by any data specific to that
extension. The extension name follows the conventions in <ulink
url="lbx.htm#13570">See Algorithm Naming</ulink>. The extension option may
occur multiple times in the start proxy message, since multiple extensions can
be negotiated. The reply to an extension option contains the zero-based index
of the extension option, as counted in the <emphasis>
LbxStartProxy</emphasis>
 message. This index is followed by extension-specific information. The server
does not respond to extensions it does not recognize.
</para>


<para>
An <emphasis>
LbxClient</emphasis>
 error is returned when a client which is already communicating through an LBX
proxy to the X server sends a <emphasis>
LbxStartProxy</emphasis>
 request.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#27452">See
LbxStartProxy</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxStopProxy</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
LbxClient</emphasis>
</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request terminates the connection between the proxy and X server, and
terminates any clients connected through the proxy.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#23471">See
LbxStopProxy</ulink>.
</para>


<para>
An <emphasis>
LbxClient</emphasis>
 error is returned if the requesting client is not an LBX proxy.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxNewClient</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
byte-order</emphasis>
: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
client-id</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
protocol-major-version</emphasis>
: CARD16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
protocol-minor-version:</emphasis>
 CARD16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
authorization-protocol-name</emphasis>
: STRING8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
authorization-protocol-data</emphasis>
: STRING8</entry>
    </row>
    <row rowsep='0'>
      <entry>=&gt;</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>Core X reply (if connection is rejected)</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>&nbsp;</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>OR</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>&nbsp;</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>success: BOOL</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>change-type: {NoDeltas, NormalClientDeltas,
AppGroupDeltas}</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>protocol-major-version: CARD16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>protocol-minor-version: CARD16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>tag-id: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>length: CARD16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>connection-data: CONINFO or CONDIF or
CONDIFROOT</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>&nbsp;</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>where:</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>CONINFO:       (the &quot;additional data&quot;
portion of the core connection reply for successes)</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>CONDIF:      [resource-id-base: CARD32,</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      root-input-masks: LISTofSETofEVENT]</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>CONDIFROOT:      [resource-id-base:
CARD32,</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      root: WINDOW</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      root-visual: VISUALID</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      default-colormap: COLORMAP</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      white-pixel, black-pixel: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      root-input-masks: LISTofSETofEVENT]</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
Errors: LbxClient, Alloc
</para>


<para>
This request, which is sent by the proxy over the control connection, creates a
new virtual connection to the server.
</para>


<para>
Much of the information in the <emphasis>
LbxNewClient</emphasis>
 request and reply is identical to the connection setup and reply information
in the core X protocol.
</para>


<para>
For the <emphasis>
LbxNewClient</emphasis>
 request, the field unique to LBX is client-id. For the <emphasis>
LbxNewClient</emphasis>
 reply, <emphasis>
tag-id</emphasis>
 and <emphasis>
change-type</emphasis>
 are fields unique to LBX, and the contents of connection-data may be different
in LBX from the core X protocol (see below).
</para>


<para>
The proxy assigns each virtual connection a unique identifier using the
<emphasis>
client-id</emphasis>
 field in the <emphasis>
LbxNewClient</emphasis>
 request. This client-id is used in the LBX protocol to specify the current
client (see the <emphasis>
LbxSwitch</emphasis>
 request and the <emphasis>
LbxSwitchEvent</emphasis>
). client-id 0 is reserved for the proxy control connection. An <emphasis>
LbxClient</emphasis>
 error will result if the <emphasis>
LbxNewClient</emphasis>
 request contains a client-id of 0 or an already in use client-id.
</para>


<para>
If the server rejects this new virtual connection, the server sends a core X
connection failure reply to the proxy. The current version of LBX does not
support the return of an <emphasis>
Authenticate</emphasis>
 reply.
</para>


<para>
If the <emphasis>
change-type</emphasis>
 field is set to <emphasis>
NoDeltas</emphasis>
, then <emphasis>
connection-data</emphasis>
 is sent using the CONINFO structure, which is identical to the additional data
of the core connection reply. If the <emphasis>
tag-id</emphasis>
 is non-zero, then the connection-data is stored by the proxy using this tag
value. Tagged connection data must be stored by the proxy, and can not be
invalidated by the proxy until an <emphasis>
LbxInvalidateTag</emphasis>
 event is received for that tag.
</para>


<para>
When the <emphasis>
change-type</emphasis>
 field is not set to <emphasis>
NoDeltas</emphasis>
, then connection data is sent as changes against connection information
previously sent to the proxy. The <emphasis>
tag-id</emphasis>
 field, if non-zero, has the tag of the previously sent data to apply the
changes to. A zero tag-id indicates that the changes are with respect to the
connection information sent when the proxy connected to the server.
</para>


<para>
If the <emphasis>
change-type</emphasis>
 field is set to <emphasis>
NormalClientDeltas</emphasis>
, then <emphasis>
connection-data</emphasis>
 is sent using the CONDIF structure. The values in the CONDIF structure are
substituted for the identically named fields of the connection information for
the new connection.
</para>


<para>
If the <emphasis>
change-type</emphasis>
 field is set to <emphasis>
AppGroupDeltas</emphasis>
, then <emphasis>
connection-data</emphasis>
 is sent using the CONDIFROOT structure. The <emphasis>
root</emphasis>
, <emphasis>
root-visual</emphasis>
, and <emphasis>
default-colormap</emphasis>
 fields, when nonzero, are substituted for the corresponding fields in the
reference connection information. The <emphasis>
white-pixel</emphasis>
 and <emphasis>
black-pixel</emphasis>
 fields are substituted only when the <emphasis>
default-colormap</emphasis>
 field of the reply is non-zero. When <emphasis>
default-colormap</emphasis>
 field of the reply is zero, so are <emphasis>
white-pixel</emphasis>
 and <emphasis>
black-pixel</emphasis>
. The first entry in the <emphasis>
root-input-masks</emphasis>
 field is the current-input-mask for the default root window. The remaining
entries in <emphasis>
root-input-masks</emphasis>
 are input masks for non-video screens, as defined by the X Print Extension.
The number of non-video screens is one less than the number of entries in
<emphasis>
root-input-masks</emphasis>
. These screens are at the end of screen list in the reference connection
information.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#15166">See The
description of this request is on page 13.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxCloseClient</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
client</emphasis>
: CARD32</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
LbxClient</emphasis>
</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This requests the server to close down the connection represented by the
specified proxy’s client identifier. If the specified client wasn’t
previously registered with the server by a <emphasis>
LbxNewClient</emphasis>
 request, the server will send the <emphasis>
LbxClient</emphasis>
 error.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#21121">See The
description of this request is on page 12.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxSwitch</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
client</emphasis>
: CARD32</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
LbxClient</emphasis>
</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request causes the X server to treat subsequent requests as being from a
connection to the X server represented by the specified client identifier.
</para>


<para>
If the client making the request is not the proxy, or if the client identifier
sent in the request was not previously sent in a <emphasis>
LbxNewClient</emphasis>
 request, an <emphasis>
LbxClient</emphasis>
 error is returned.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#36790">See
LbxSwitch</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxSync</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry>=&gt;</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
The sync request causes the server to send a reply when all requests before the
sync request have been processed.
</para>


<para>
The encoding for this client is on <ulink url="lbx.htm#21186">See
LbxSync</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxModifySequence</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
adjust</emphasis>
: CARD32</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: None</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request advances the sequence number of the virtual client connection by
the specified amount. The proxy sends the <emphasis>
LbxModifySequence</emphasis>
 request to the server when it replies to a client request without forwarding
the client request on to the X server.
</para>


<para>
The encoding for this client is on <ulink url="lbx.htm#10940">See The
description of this request is on page 13.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxAllowMotion</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
num</emphasis>
: CARD32</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: None</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request controls the delivery of optional motion notify events, as
described in <ulink url="lbx.htm#15503">See Motion events</ulink>. The num
field specifies an increase in the allowed number of motion notify events sent.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#11897">See The
description of this request is on page 14.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxInvalidateTag</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
tag</emphasis>
: CARD32</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
The LBX proxy sends this notification to the X server when it refuses to store
tagged data, or when it releases tagged data which was previously stored and
which was not invalidated by a notification from the X server.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#37545">See
LbxInvalidateTag</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxTagData</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
tag</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
real-length</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
data</emphasis>
: LISTofBYTE</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request specifies the data associated with a previously assigned tag. It
is sent in two circumstances: in response to receiving a <emphasis>
SendTagDataEvent</emphasis>
, and spontaneously, when the proxy must rely on the server to store data which
was not previously received from the server. The data is carried in the byte
order and structure as would have originally been sent in the core protocol
request.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#37174">See
LbxTagData</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxGrabCmap</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
cmap</emphasis>
: Colormap </entry>
    </row>
    <row rowsep='0'>
      <entry>=&gt;</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
smart-grab</emphasis>
: BOOL</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
large-pixel: </emphasis>
BOOL      /* optional */</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
auto-release: </emphasis>
BOOL      /* optional */</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
three-channels</emphasis>
: BOOL      /* optional */</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
bits-per-rgb: </emphasis>
CARD4      /* optional */</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
cells</emphasis>
: LISTofCHAN      /* optional */</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>&nbsp;</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>where:</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>CHAN:      LISTofLBXPIXEL</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>LBXPIXEL:       PIXELPRIVATE or PIXELPRIVATERANGE
or </entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      PIXELALLOC or PIXELALLOCRANGE </entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>PIXEL:      CARD8 or CARD16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>PIXELPRIVATE:       [ pixel: PIXEL ]</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>PIXELPRIVATERANGE:       [ first-pixel,
last-pixel: PIXEL]</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>PIXELALLOC:       [ pixel: PIXEL,</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      color: COLORSINGLE or COLORTRIPLE]</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>PIXELALLOCRANGE:       [ first-pixel,
last-pixel: PIXEL,</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      colors: LISTofCOLORSINGLE or
LISTofCOLORTRIPLE]</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>COLORSINGLE:      [ value: CARD8 or CARD16
]</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>COLORTRIPLE:      [ r, g, b:
COLORSINGLE]</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Colormap</emphasis>
</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request asks the server for control of allocating new colormap cells in
the specified colormap. The server grants control by replying to this request.
If no changes have occurred since the last time this proxy grabbed this
colormap, then the <emphasis>
smart-grab</emphasis>
 field of the reply is set to true, and the optional fields are not sent.
Otherwise, the current contents of the colormap are placed in the reply, as
described later in this section.
</para>


<para>
Once the proxy has received the reply, it can use the <emphasis>
LbxAllocColor</emphasis>
 request to allocate new colormap cells without the performance penalty of
round trips. The proxy is still permitted to use the normal colormap and
<emphasis>
LbxIncrementPixel</emphasis>
 requests while the colormap is grabbed. The grab is valid across all virtual
connections of the proxy.
</para>


<para>
The <emphasis>
LbxGrabCmap</emphasis>
 request is limited to colormaps for the visual types negotiated as part of the
colormap algorithm negotiation in the start proxy request at connection setup.
</para>


<para>
The server and other proxies may not allocate new colormap cells in the
colormap while the colormap is grabbed by this proxy. If the server or another
proxy needs to allocate new colormap cells, the server sends a Lbx<emphasis>
ReleaseCmap</emphasis>
 event to the proxy holding the grab, which then issues an <emphasis>
LbxReleaseCmap</emphasis>
 request.
</para>


<para>
The server and other proxies may free colormap cells in a colormap grabbed by a
proxy. The server will send an <emphasis>
LbxFreeCells</emphasis>
 event to the proxy that currently has the colormap grabbed when the cell
reference count reaches 0.
</para>


<para>
If the colormap is a of a static visual type, such as <emphasis>
StaticGray</emphasis>
, <emphasis>
StaticColor</emphasis>
, <emphasis>
GrayScale</emphasis>
, or <emphasis>
TrueColor</emphasis>
, then the proxy’s grab is immediately released by the server, and the proxy
must use <emphasis>
LbxIncrementPixel</emphasis>
 requests in place of <emphasis>
LbxAllocColor</emphasis>
 requests for this colormap.
</para>


<para>
If the cmap field does not refer to a valid colormap or the colormap is already
grabbed by this proxy then a <emphasis>
Colormap</emphasis>
 error is generated.
</para>


<para>
The reply describes the contents of the colormap via several arguments and a
descriptive list containing one or three channels, with each channel describing
allocations in the colormap.
</para>


<para>
The <emphasis>
large-pixel</emphasis>
 argument, if True, specifies that PIXEL indices will be listed as CARD16
quantities instead of CARD8. The<emphasis>
 auto-release</emphasis>
 field, if True, indicates that this colormap is of a static visual type and
the proxy’s grab is immediately released by the server.
</para>


<para>
If <emphasis>
three-channels</emphasis>
 is False, a single channel is enclosed and color values are described using
COLORTRIPLE, which has fields for red, green and blue. A single channel is used
when the visual type is not <emphasis>
DirectColor</emphasis>
 or <emphasis>
TrueColor</emphasis>
.
</para>


<para>
If <emphasis>
three-channels</emphasis>
 is True, separate red, green and blue channel lists are enclosed, for
describing a <emphasis>
DirectColor</emphasis>
 or <emphasis>
TrueColor</emphasis>
 colormap. Color values for entries in each channel are sent using COLORSINGLE
and the corresponding PIXEL value refers to the RGB subfield of the current
channel, as defined by the corresponding red-mask, green-mask and blue-mask of
the visual.
</para>


<para>
The <emphasis>
bits-per-rgb</emphasis>
 value is one less than the bits-per-rgb-value field of the visual that the
colormap belongs to. If the value is 7 or less, then COLORSINGLE values in the
descriptive list are sent using CARD8 fields. Otherwise these values are sent
using CARD16 fields.
</para>


<para>
The list describing current colormap allocations contains entries of the
following types:
</para>


<para>
An LBXPIXELPRIVATE entry indicates that the pixel in the <emphasis>
pixel </emphasis>
field is unavailable for allocation.
</para>


<para>
An LBXPIXELPRIVATERANGE entry indicates that a contiguous range of pixels are
unavailable for allocation. The range is <emphasis>
first-pixel</emphasis>
 to <emphasis>
last-pixel</emphasis>
, and includes <emphasis>
last-pixel</emphasis>
.
</para>


<para>
An LBXPIXELALLOC entry indicates that the pixel in the <emphasis>
pixel </emphasis>
field is allocated as a read-only pixel. The <emphasis>
color</emphasis>
 field carries the color information of the pixel.
</para>


<para>
An LBXPIXELALLOCRANGE entry indicates that a contiguous range of pixels are
allocated as read-only. The range starts <emphasis>
first-pixel</emphasis>
 to <emphasis>
last-pixel</emphasis>
, and includes <emphasis>
last-pixel</emphasis>
. These fields are followed by a list of COLORSINGLE or COLORTRIPLE, depending
on the value of <emphasis>
three-channels</emphasis>
.
</para>


<para>
A NEXTCHANNEL entry indicates that the next channel of the colormap will be
described.
</para>


<para>
A LISTEND entry indicates the end of the colormap description.
</para>


<para>
All pixels not described in the reply are unallocated.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#17198">See
LbxGrabCmap</ulink>.
</para>



<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxReleaseCmap</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
cmap</emphasis>
: Colormap</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request releases the specified grabbed colormap. If the <emphasis>
cmap</emphasis>
 field does not refer to a colormap, a <emphasis>
BadColormap</emphasis>
 error is produced.
</para>


<para>
The proxy must remember the state of the colormap when the <emphasis>
LbxReleaseCmap</emphasis>
 request is issued if this proxy may at some future time issue another
<emphasis>
LbxGrabCmap</emphasis>
 request on this colormap before the state of the colormap changes.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#14796">See
LbxReleaseCmap</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxInternAtoms</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
count</emphasis>
: CARD16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
names: LISTofSTRING8</emphasis>
</entry>
    </row>
    <row rowsep='0'>
      <entry>=&gt;</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
atoms</emphasis>
: LISTofATOM</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request allows the proxy to intern a group of atoms in a single round
trip. The server will create any atoms that do not exist.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#34140">See
LbxInternAtoms</ulink>.
</para>



</sect3>
<sect3 id='substitution_requests'>
<title>Substitution Requests</title>

<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxAllocColor</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
cmap</emphasis>
: Colormap</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
pixel</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
red</emphasis>
, <emphasis>
green</emphasis>
, <emphasis>
blue</emphasis>
: CARD16</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request is sent by a proxy that has given colormap grabbed to allocate a
new read-only cell in the colormap. The proxy may substitute this request for
the core <emphasis>
AllocColor</emphasis>
 and <emphasis>
AllocNamedColor</emphasis>
 requests.
</para>


<para>
The <emphasis>
pixel</emphasis>
 field identifies the colormap cell to allocate. The <emphasis>
red</emphasis>
, <emphasis>
green</emphasis>
, and <emphasis>
blue</emphasis>
 fields are the hardware specific color values of the corresponding fields of
the core <emphasis>
AllocColor</emphasis>
 request. The mapping to hardware specific colormap values by the proxy is
performed using the color algorithm negotiated by <emphasis>
LbxStartProxy</emphasis>
.
</para>


<para>
For colormaps of static visual types, the <emphasis>
LbxIncrementPixel</emphasis>
 request is used instead of LBX <emphasis>
AllocColor</emphasis>
.
</para>


<para>
If the <emphasis>
cmap</emphasis>
 field does not identify a grabbed colormap then a <emphasis>
BadAccess</emphasis>
 error is produced. If the <emphasis>
pixel</emphasis>
 field refers to a read-write entry, or the pixel field refers to a pixel
outside of the range of this colormap, a <emphasis>
BadAlloc</emphasis>
 error is produced.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#28429">See
LbxAllocColor</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxIncrementPixel</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
cmap</emphasis>
: COLORMAP</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
pixel</emphasis>
: CARD32</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: None</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request replaces the <emphasis>
AllocColor</emphasis>
 request for read-only pixels currently allocated for the current client. If
the visual type of the colormap is of a static type, this request may be used
on currently unallocated pixels. The colormap is not required to be grabbed to
use this request.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#38053">See The
description of this request is on page 14.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxDelta</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
count</emphasis>
: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
cache-index</emphasis>
: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
diffs</emphasis>
: LISTofDIFFITEM</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request contains a minimal amount of information relative to a similar
prior request. The information is in the form of a difference comparison to a
prior request. The prior request is specified by an index to a cache,
independently maintained by both the proxy and the server.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#39838">See The
description of this request is on page 18.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxGetModifierMapping</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry>=&gt;</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
keyspermod</emphasis>
: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
tag</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
keycodes</emphasis>
: LISTofKEYCODE             /* optional */</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request is identical to the core <emphasis>
GetModifierMapping</emphasis>
 request, with the addition of a tag being returned in the reply. See <ulink
url="lbx.htm#26534">See Tag Substitution in Requests</ulink> for a description
of the <emphasis>
tag</emphasis>
 field and optional fields.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#40057">See
LbxGetModifierMapping</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxGetKeyboardMapping</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
firstKeyCode</emphasis>
: KEYCODE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
count</emphasis>
: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry>=&gt;</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
keysperkeycode</emphasis>
: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
tag</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
keysyms</emphasis>
: LISTofKEYSYM      /* optional */</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Value</emphasis>
</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request is identical to the X <emphasis>
GetKeyboardMapping</emphasis>
 protocol request, with the addition that a tag is returned in the reply. See
<ulink url="lbx.htm#26534">See Tag Substitution in Requests</ulink> for a
description of the <emphasis>
tag</emphasis>
 field and optional fields.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#21702">See
LbxGetKeyboardMapping</ulink>.
</para>



<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxGetWinAttrAndGeom</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
window</emphasis>
: WINDOW</entry>
    </row>
    <row rowsep='0'>
      <entry>=&gt;</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoargs'>visual: VISUALID</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>class: {InputOutput, InputOnly}</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>bit-gravity: BITGRAVITY</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>win-gravity: WINGRAVITY</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>backing-store: {NotUseful, WhenMapped,
Always}</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>backing-planes: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>backing-pixel: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>save-under: BOOL</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>colormap: COLORMAP or None</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>map-is-installed: BOOL</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>map-state: {Unmapped, Unviewable,
Viewable}</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>all-event-masks, your-event-mask:
SETofEVENT</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>do-not-propagate-mask: SETofDEVICEEVENT</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>override-redirect: BOOL</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>root: WINDOW</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>depth: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>x, y: INT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>width, height, border-width: CARD16</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Window</emphasis>
</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
<emphasis>
GetWindowAttributes</emphasis>
 and <emphasis>
GetGeometry</emphasis>
 are frequently used together in the X protocol. <emphasis>
LbxGetWinAttrAndGeom</emphasis>
 allows the proxy to request the same information in one round trip.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#41440">See
LbxGetWinAttrAndGeom</ulink>.
</para>



<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxQueryFont</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
font</emphasis>
: FONTABLE</entry>
    </row>
    <row rowsep='0'>
      <entry>=&gt;</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>compression: BOOL</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>tag: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>font-info: FONTINFO                  /* optional
*/</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>char-infos: LISTofCHARINFO or LISTofLBXCHARINFO
               /* optional */</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>where:</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>LBXCHARINFO:       [left-side-bearing:
INT6</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      right-side-bearing: INT7</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      character-width: INT6</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      ascent: INT6</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>      descent: INT7]</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Font,Alloc</emphasis>
      </entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request is used to replace the core <emphasis>
QueryFont</emphasis>
 request and has identical semantics.
</para>


<para>
See <ulink url="lbx.htm#26534">See Tag Substitution in Requests</ulink> for a
description of the <emphasis>
tag</emphasis>
 field and optional fields.
</para>


<para>
The <emphasis>
compression</emphasis>
 field is True if the <emphasis>
char-infos</emphasis>
 field is represented using LBXCHARINFO.
</para>


<para>
The per-character information will be encoded in an LBXCHARINFO when, for every
character, the character-width, left-side-bearing, and ascent can each be
represented in not more than 6 bits, and the right-side-bearing and descent can
each be represented in not more than 7 bits, and the attributes field is
identical the attributes field of the max_bounds of the <emphasis>
font_info</emphasis>
 field of the font.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#24597">See
LbxQueryFont</ulink>.
</para>



<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxChangeProperty</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
window</emphasis>
: WINDOW</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
property</emphasis>
: ATOM</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
type</emphasis>
: ATOM</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
format</emphasis>
: {0,8,16,32}</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
mode</emphasis>
: {Replace, Prepend, Append}</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
nUnits</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry>=&gt;</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>tag: CARD32</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request is sent to the server when the client sends an X <emphasis>
ChangeProperty </emphasis>
request through the proxy. The size of the data is sent with this request, but
not the property data itself. The server reply contains a tag identifier for
the data, which is stored in the proxy. The proxy must not discard this data
before it is sent to the server, or invalidated by the server. This means that
before issuing an <emphasis>
LbxStopProxy</emphasis>
 request, or exiting, the proxy must send Lbx<emphasis>
TagData</emphasis>
 requests for these items. If the server loses the connection before the
information is sent back, the server should revert the property value to its
last known value, if possible.
</para>


<para>
If the <emphasis>
mode</emphasis>
 field is <emphasis>
Prepend</emphasis>
 or <emphasis>
Append</emphasis>
, the tag refers only to the prepended or appended data.
</para>


<para>
If the tag in the reply is zero, then the change was ignored by the server, as
defined in the security extension. The proxy should dump the associated data,
since the server will never ask for it.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#18013">See
LbxChangeProperty</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxGetProperty</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
window</emphasis>
: WINDOW</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
property</emphasis>
: ATOM</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
type</emphasis>
: ATOM or AnyPropertyType</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
long-offset</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
long-length</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
delete</emphasis>
: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry>=&gt;</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoargs'>type: ATOM or None</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>format: {0, 8, 16, 32}</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>bytes-after: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>nItems: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>tag: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>value: LISTofINT8 or LISTofINT16 or
LISTofINT32</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request may be used by the proxy as a substitution for a core <emphasis>
GetProperty</emphasis>
 request. It allows tags to be used for property data that is unlikely to
change often in value, but is likely to be fetched by multiple clients.
</para>


<para>
The <emphasis>
LbxGetProperty</emphasis>
 request has the same arguments as the core <emphasis>
GetProperty</emphasis>
 request. The reply for <emphasis>
LbxGetProperty</emphasis>
 has all of the fields from the core <emphasis>
GetProperty</emphasis>
 reply, but has the additional fields of <emphasis>
nItems</emphasis>
 and <emphasis>
tag</emphasis>
.
</para>


<para>
In order to utilize tags in <emphasis>
LbxGetProperty</emphasis>
 for a specific property, the server must first send the complete property data
to the proxy and associate this data with a tag. More precisely, the server
sends an <emphasis>
LbxGetProperty</emphasis>
 reply with a new <emphasis>
tag</emphasis>
, <emphasis>
nItems</emphasis>
 set to the number of items in the property, the size of the property data in
the reply length field, and the complete property data in value. The proxy
stores the property data in its tag cache and associates it with the specified
tag.
</para>


<para>
In response to future <emphasis>
LbxGetProperty</emphasis>
 requests for the same property, if the server thinks that the proxy has the
actual property data in its tag cache, it may choose to send an <emphasis>
LbxGetProperty</emphasis>
 reply without the actual property data. In this case, the reply would include
a non-zero <emphasis>
tag</emphasis>
, a zero reply length, and no data for value.
</para>


<para>
If the server chooses not to generate a tagged reply to <emphasis>
LbxGetProperty</emphasis>
, or for some reason is unable to do so, it would send a reply with a <emphasis>
tag</emphasis>
 of zero, the size of the property data in the reply length field, and the
complete property data in value.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#13863">See
LbxGetProperty</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxPolyPoint</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
gc-and-drawable: </emphasis>
LBXGCANDDRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
points</emphasis>
: LISTofLBXPOINT</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
 and those given for the corresponding X request.</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request replaces the <emphasis>
PolyPoint</emphasis>
 request. Not all <emphasis>
PolyPoint</emphasis>
 requests can be represented as <emphasis>
LbxPolyPoint</emphasis>
 requests.
</para>


<para>
The proxy will convert the representation of the points to be relative to the
previous point, as described by previous coordinate mode in the X protocol.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#29719">See
LbxPolyPoint</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxPolyLine</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
gc-and-drawable: </emphasis>
LBXGCANDDRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
points</emphasis>
: LISTofLBXPOINT</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
 and those given for the corresponding X request.</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request replaces the <emphasis>
PolyLine</emphasis>
 request. Not all <emphasis>
PolyLine</emphasis>
 requests can be represented as <emphasis>
LbxPolyline</emphasis>
 requests.
</para>


<para>
The proxy will convert the representation of the points to be relative to the
previous point, as described by previous coordinate mode in the X protocol.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#31086">See The
description of this request is on page 21.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxPolySegment</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
gc-and-drawable: </emphasis>
LBXGCANDDRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
segments</emphasis>
: LISTofLBXSEGMENT</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>&nbsp;</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>where:</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>LBXSEGEMENT; [x1, y1, x2, y2: LBXINT16]</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
 and those given for the corresponding X request.</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request replaces the <emphasis>
PolySegment</emphasis>
 request. Not all <emphasis>
PolySegment</emphasis>
 requests can be represented as <emphasis>
LbxPolySegment</emphasis>
 requests.
</para>


<para>
For segments other than the first segment of the request, [x1, y1] is
relative to [x1, y1] of the previous segment. For all segments, [x2, y2] is
relative to that segment’s [x1, y1].
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#27528">See
LbxPolySegment</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxPolyRectangle</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
gc-and-drawable: </emphasis>
LBXGCANDDRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
rectangles</emphasis>
: LISTofLBXRECTANGLE</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
 and those given for the corresponding X request.</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request replaces the <emphasis>
PolyRectangle</emphasis>
 request. Not all <emphasis>
PolyRectangle</emphasis>
 requests can be represented as <emphasis>
LbxPolyRectangle</emphasis>
 requests.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#33628">See The
description of this request is on page 22.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxPolyArc</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
gc-and-drawable: </emphasis>
LBXGCANDDRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
arcs</emphasis>
: LISTofLBXARC</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
 and those given for the corresponding X request.</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request replaces the <emphasis>
PolyArc</emphasis>
 request. Not all <emphasis>
PolyArc</emphasis>
 requests can be represented as <emphasis>
LbxPolyArc</emphasis>
 requests.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#25855">See
LbxPolyArc</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxPolyFillRectangle</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
gc-and-drawable: </emphasis>
LBXGCANDDRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
rectangles</emphasis>
: LISTofLBXRECTANGLE</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
 and those given for the corresponding X request.</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request replaces the <emphasis>
PolyFillRectangle</emphasis>
 request. Not all <emphasis>
PolyFillRectangle</emphasis>
 requests can be represented as <emphasis>
LbxPolyFillRectangle</emphasis>
 requests.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#26399">See
LbxPolyFillRectangle</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxPolyFillArc</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
gc-and-drawable: </emphasis>
LBXGCANDDRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
arcs</emphasis>
: LISTofLBXARC</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
 and those given for the corresponding X request.</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request replaces the <emphasis>
PolyFillArc</emphasis>
 request. Not all <emphasis>
PolyFillArc</emphasis>
 requests can be represented as <emphasis>
LbxPolyFillArc</emphasis>
 requests.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#19081">See The
description of this request is on page 22.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxFillPoly</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
gc-and-drawable: </emphasis>
LBXGCANDDRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
shape</emphasis>
: BYTE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
points</emphasis>
: LISTofLBXPOINT</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
 and those given for the corresponding X request.</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request replaces the <emphasis>
FillPoly</emphasis>
 request. Not all <emphasis>
FillPoly</emphasis>
 requests can be represented as <emphasis>
LbxFillPoly</emphasis>
 requests.
</para>


<para>
The proxy will convert the representation of the points to be relative to the
previous point, as described by previous coordinate mode in the X protocol.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#24998">See
LbxFillPoly</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxCopyArea</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
srcCache</emphasis>
: CARD8      /* source drawable */</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
gc-and-drawable: </emphasis>
LBXGCANDDRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
src-Drawable</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
src-x</emphasis>
: LBXPINT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
src-y</emphasis>
: LBXPINT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
width</emphasis>
: LBXCARD16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
height</emphasis>
: LBXCARD16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
dst-x</emphasis>
: LBXPINT16 </entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
dst-y</emphasis>
: LBXPINT16</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: Those given for the corresponding X
request.</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request replaces the <emphasis>
CopyArea</emphasis>
 request for requests within its encoding range.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#10231">See
LbxCopyArea</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxCopyPlane</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
bit-plane</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
src-cache</emphasis>
: CARD8      /* cache reference for source drawable */</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
gc-and-drawable: </emphasis>
LBXGCANDDRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
src-drawable</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
src-x</emphasis>
: LBXPINT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
src-y</emphasis>
: LBXPINT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
width</emphasis>
: LBXCARD16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
height</emphasis>
: LBXCARD16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
dst-x</emphasis>
: LBXPINT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
dst-y</emphasis>
: LBXPINT16</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: Those given for the corresponding X
request.</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request replaces the <emphasis>
CopyPlane</emphasis>
 request for requests within its coding range.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#18847">See
LbxCopyPlane</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxPolyText8</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
gc-and-drawable: </emphasis>
LBXGCANDDRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
x</emphasis>
: LBXPINT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
y</emphasis>
: LBXPINT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
items</emphasis>
: LISTofTEXTITEM8</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
, and those given for the corresponding X request.</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request replaces the <emphasis>
PolyText8</emphasis>
 request for requests within its encoding range.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#39640">See The
description of this request is on page 23.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxPolyText16</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
gc-and-drawable: </emphasis>
LBXGCANDDRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
x:</emphasis>
 LBXPINT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
y</emphasis>
: LBXPINT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
items</emphasis>
: LISTofTEXTITEM16</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
, and those given for the corresponding X request.</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request replaces the <emphasis>
PolyText16</emphasis>
 request for requests within its encoding range.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#32634">See The
description of this request is on page 24.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxImageText8</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
gc-and-drawable: </emphasis>
LBXGCANDDRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
nChars</emphasis>
: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
x</emphasis>
: LBXPINT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
y</emphasis>
: LBXPINT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
string</emphasis>
: STRING8</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
, and those given for the corresponding X request.</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request replaces the <emphasis>
ImageText8</emphasis>
 request for requests within its encoding range.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#17018">See The
description of this request is on page 24.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxImageText16</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
nChars</emphasis>
: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
gc-and-drawable: </emphasis>
LBXGCANDDRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>x: LBXPINT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
y</emphasis>
: LBXPINT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
string</emphasis>
: STRING16</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
, and those given for the corresponding X request.</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request replaces the <emphasis>
ImageText16</emphasis>
 request for requests within its encoding range.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#23910">See The
description of this request is on page 24.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxPutImage</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
compression-method</emphasis>
: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
format</emphasis>
: {<emphasis>
Bitmap</emphasis>
, <emphasis>
XYPixmap</emphasis>
, <emphasis>
ZPixmap</emphasis>
}                  /* packed */</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
gc-and-drawable: </emphasis>
LBXGCANDDRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
width</emphasis>
, <emphasis>
height</emphasis>
: LBXCARD16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
dst-x</emphasis>
, <emphasis>
dst-y</emphasis>
: LBXPINT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
depth</emphasis>
: CARD8                  /* packed */</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
left-pad</emphasis>
: CARD8                  /* packed */</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
pad-bytes</emphasis>
: CARD8                  /* packed */</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
data</emphasis>
:LISTofBYTE</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
, <emphasis>
Value</emphasis>
</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
When the request can be usefully compressed, this request replaces the
<emphasis>
PutImage</emphasis>
 request. The <emphasis>
compression-method</emphasis>
 parameter contains the opcode of a compression method returned in the
<emphasis>
LbxStartProxy</emphasis>
 reply. The <emphasis>
pad-bytes</emphasis>
 parameter gives the number of unused pad bytes that follow the compressed
image data. All other parameters are as in the X request. If the specified
compression method is not recognized, the server returns a <emphasis>
Value</emphasis>
 error.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#12268">See
LbxPutImage</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxGetImage</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
drawable</emphasis>
: DRAWABLE</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
x</emphasis>
, <emphasis>
y</emphasis>
: INT16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
width</emphasis>
, <emphasis>
height</emphasis>
: CARD16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
plane-mask</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
format</emphasis>
: {XYPixmap, ZPixmap}</entry>
    </row>
    <row rowsep='0'>
      <entry>=&gt;</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>depth: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>x-length: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>visual: VISUALID or None</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>compression-method: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'>data: LISTofBYTE</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc,Match,Value</emphasis>
</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request can replace the <emphasis>
GetImage</emphasis>
 request. The same semantics apply, with the following exceptions.
</para>


<para>
The <emphasis>
compression-method</emphasis>
 field contains the opcode of the compression method used in the reply. The
compression opcodes are supplied in the <emphasis>
LbxStartProxy</emphasis>
 reply. The <emphasis>
x-length </emphasis>
field<emphasis>
 </emphasis>
contains the length of the uncompressed version of the reply in 4 byte units.
</para>


<para>
A <emphasis>
Value</emphasis>
 error is returned if the format is not recognized by the X server. A <emphasis>
Match</emphasis>
 error is returned under the same circumstances as described by the <emphasis>
GetImage</emphasis>
 request.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#10066">See
LbxGetImage</ulink>.
</para>



<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxBeginLargeRequest</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
large-request-length</emphasis>
: CARD32</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request, along with the Lbx<emphasis>
LargeRequestData</emphasis>
 and Lbx<emphasis>
EndLargeRequest</emphasis>
 requests, is used to transport a large request in pieces. The smaller size of
the resulting requests allows smoother multiplexing of clients on a single low
bandwidth connection to the server. The resulting finer-grained multiplexing
improves responsiveness for the other clients.
</para>


<para>
After a <emphasis>
LbxBeginLargeRequest</emphasis>
 request is sent, multiple <emphasis>
LbxLargeRequestData</emphasis>
 requests are sent to transport all of the data in the large request, and
finally an <emphasis>
LbxEndLargeRequest</emphasis>
 request is sent. The large-request-length field expresses the total length of
the transported large request, expressed as the number of bytes in the
transported request divided by four.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#22013">See The
description of this request is on page 25.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxLargeRequestData</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
data</emphasis>
: LISTofBYTE</entry>
    </row>

    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Alloc</emphasis>
</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This request is used to carry the segments of a larger request, as described in
the definition of <emphasis>
LbxBeginLargeRequest</emphasis>
. The data must be carried in order, starting with the request header, and each
segment must be multiples of 4 bytes long. If the <emphasis>
LbxLargeRequestData</emphasis>
 is not preceded by a corresponding <emphasis>
LbxBeginLargeRequest</emphasis>
, a <emphasis>
BadAlloc</emphasis>
 error is generated.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#31469">See The
description of this request is on page 26.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxEndLargeRequest</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoerror'>Errors: <emphasis>
Length, Alloc</emphasis>
</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
As described in the definition of <emphasis>
LbxBeginLargeRequest</emphasis>
, <emphasis>
LbxEndLargeRequest</emphasis>
 is used to signal the end of a series of <emphasis>
LargeRequestData</emphasis>
 requests. If the total length of the data transported by the <emphasis>
LbxLargeRequestData</emphasis>
 requests does not match the large-request-length field of the preceding
<emphasis>
LbxBeginLargeRequest</emphasis>
 request, then a <emphasis>
Length</emphasis>
 error occurs. If the <emphasis>
LbxEndLargeRequest</emphasis>
 is not preceded by a corresponding <emphasis>
LbxBeginLargeRequest</emphasis>
, a <emphasis>
BadAlloc</emphasis>
 error is generated. The request is executed in order for that client as if it
were the request after the request preceding <emphasis>
LbxEndLargeRequest</emphasis>
.
</para>


<para>
The encoding for this request is on <ulink url="lbx.htm#31037">See
LbxEndLargeRequest</ulink>.
</para>



</sect3>
</sect2>
<sect2 id='events'>
<title>Events</title>

<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxSwitchEvent</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
client</emphasis>
: CARD32</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
Notify the proxy that the subsequent replies, events, and errors are relative
to the specified client.
</para>


<para>
The encoding for this event is on <ulink url="lbx.htm#17348">See
LbxSwitchEvent</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxCloseEvent</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
client</emphasis>
: CARD32</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
Notify the proxy that the specified client's connection to the server is closed.
</para>


<para>
The encoding for this event is on <ulink url="lbx.htm#41814">See The
description of this event is on page 27.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxInvalidateTagEvent</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
tag</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
tag-type</emphasis>
: {Modmap, Keymap, Property, Font, ConnInfo}</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This message informs the proxy that the tag and the server data referenced by
the tag are obsolete, and should be discarded. The tag type may be one of the
following values: <emphasis>
LbxTagTypeModmap</emphasis>
, <emphasis>
LbxTagTypeKeymap</emphasis>
, <emphasis>
LbxTagTypeProperty</emphasis>
, <emphasis>
LbxTagTypeFont</emphasis>
, <emphasis>
LbxTagTypeConnInfo</emphasis>
.
</para>


<para>
The encoding for this event is on <ulink url="lbx.htm#34406">See
LbxInvalidateTagEvent</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxSendTagDataEvent</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
tag</emphasis>
: CARD32</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
tag-type</emphasis>
: {Property}</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
The server sends this event to the proxy to request a copy of tagged data which
is being stored by the proxy. The request contains a tag which was previously
assigned to the data by the server. The proxy should respond to <emphasis>
SendTagData</emphasis>
 by sending a <emphasis>
TagData</emphasis>
 request to the server. The tag type may be one of the following values:
<emphasis>
LbxTagTypeProperty</emphasis>
.
</para>


<para>
The encoding for this event is on <ulink url="lbx.htm#22353">See
LbxSendTagDataEvent</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxListenToOne</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
client</emphasis>
: CARD32 or <emphasis>
0xffffffff</emphasis>
</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
When the server is grabbed, <emphasis>
ListenToOne</emphasis>
 is sent to the proxy. As an X client, the proxy itself is unaffected by grabs,
in order that it may respond to requests for data from the X server.
</para>


<para>
When the client grabbing the server is managed through the proxy, the proxy
will permit messages from itself and the grabbing client to be sent immediately
to the server, and may buffer requests from other clients of the proxy. The
client is identified in the event.
</para>


<para>
When the client grabbing the server is not managed through the proxy, the
client field in the event will be <emphasis>
0xffffffff</emphasis>
. The proxy will communicate with the server, and it may buffer requests from
other clients. The proxy will continue to handle new connections while the
server is grabbed.
</para>


<para>
The server will send <emphasis>
ListenToAll</emphasis>
 to the proxy when the server is ungrabbed. There is no time-out for this
interval in the protocol.
</para>


<para>
The encoding for this event is on <ulink url="lbx.htm#18630">See The
description of this event is on page 27.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <tbody>
    <row rowsep='0'>
      <entry role='protoname'>LbxListenToAll</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
Notify the proxy that the server has been ungrabbed, and that the proxy may now
send all buffered client requests on to the server.
</para>


<para>
The encoding for this event is on <ulink url="lbx.htm#30610">See The
description of this event is on page 27.</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxQuickMotionDeltaEvent</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
deltaTime</emphasis>
: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
deltaX</emphasis>
: INT8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
deltaY</emphasis>
: INT8</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This event is used as a replacement for the <emphasis>
MotionNotify</emphasis>
 event when possible. The fields are used as deltas to the most recent
<emphasis>
MotionNotify</emphasis>
 event encoded as a <emphasis>
MotionNotify</emphasis>
 event, <emphasis>
LbxQuickMotionDeltaEvent</emphasis>
, or <emphasis>
LbxMotionDeltaEvent</emphasis>
. Not every <emphasis>
MotionNotify</emphasis>
 event can be encoded as a <emphasis>
LbxQuickMotionDeltaEvent</emphasis>
.
</para>


<para>
The encoding for this event is on <ulink url="lbx.htm#35213">See
LbxQuickMotionDeltaEvent</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxMotionDeltaEvent</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
deltaX</emphasis>
: INT8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
deltaY</emphasis>
: INT8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
deltaTime</emphasis>
: CARD16</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
deltaSequence</emphasis>
: CARD16</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This event is used as a replacement for the <emphasis>
MotionNotify</emphasis>
 event when possible. The fields are used as deltas to the most recent
<emphasis>
MotionNotify</emphasis>
 event encoded as a <emphasis>
MotionNotify</emphasis>
 event, <emphasis>
LbxQuickMotionDeltaEvent</emphasis>
, or <emphasis>
LbxMotionDeltaEvent</emphasis>
. Not every <emphasis>
MotionNotify</emphasis>
 event can be encoded as <emphasis>
a LbxMotionDeltaEvent</emphasis>
.
</para>


<para>
The encoding for this event is on <ulink url="lbx.htm#35310">See
LbxMotionDeltaEvent</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxReleaseCmapEvent</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
colormap</emphasis>
: Colormap</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This event notifies the proxy that it must release the grab on this colormap
via the ReleaseCmap request. <ulink url="lbx.htm#34675">See
LbxReleaseCmap</ulink>
</para>


<para>
The encoding for this event is on <ulink url="lbx.htm#14052">See
LbxReleaseCmapEvent</ulink>.
</para>


<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxFreeCellsEvent</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
colormap</emphasis>
: Colormap</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
pixelStart, pixelEnd</emphasis>
: CARD32</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
The <emphasis>
LbxFreeCells</emphasis>
 event is sent to a proxy that has a colormap grabbed to notify the proxy that
the reference count of the described cells were decremented to zero by the
server or another proxy. The reference count includes those by this proxy. The
proxy must update its copy of the colormap state accordingly if the colormap is
still grabbed, or if the proxy may in the future grab the colormap using
smart-grab mode. <ulink url="lbx.htm#10922">See LbxGrabCmap</ulink>
</para>


<para>
The pixelStart and pixelEnd fields of the event denote a continuous range of
cells that were freed.
</para>


<para>
The encoding for this event is on <ulink url="lbx.htm#14731">See
LbxFreeCellsEvent</ulink>.
</para>

</sect2>
<sect2 id='responses'>
<title>Responses</title>

<para>
Responses are messages from the server to the proxy that not, strictly
speaking, events, replies or errors.
</para>

<informaltable frame='none' tabstyle='proto'>
<tgroup cols='1'>
<colspec colsep='0'/>
  <thead>
    <row rowsep='0'>
      <entry role='protoname'>LbxDeltaResponse</entry>
    </row>
  </thead>
  <tbody>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
count</emphasis>
: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
cache-index</emphasis>
: CARD8</entry>
    </row>
    <row rowsep='0'>
      <entry role='protoargs'><emphasis>
diffs</emphasis>
: LISTofDIFFITEM</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
This response carries an event, reply, or error that has been encoded relative
to a message in the response delta cache. The <emphasis>
cache-index</emphasis>
 field is the index into the cache. Each entry in <emphasis>
diffs</emphasis>
 provides a byte offset and replacement value to use in reconstructing the
response.
</para>


<para>
The encoding for this event is on <ulink url="lbx.htm#17100">See
LbxDeltaResponse</ulink>.
</para>


</sect2>
</sect1>
<sect1 id='algorithm_naming'>
<title>Algorithm Naming</title>

<para>
To avoid potential clashes between different but similar algorithms for stream,
bitmap, and pixmap compression, the following naming scheme will be adhered to:
</para>


<para>
Each algorithm has a unique name, which is a STRING8, of the following form:
</para>


<para>
   &lt;organization&gt;-&lt;some-descriptive-name&gt;
</para>


<para>
The organization field above is the organization name as registered in section
1 of the X Registry (the registry is provided as a free service by the X
Consortium.) This prevents conflicts among different vendor’s extensions.
</para>


<para>
As an example, the X Consortium defines a zlib-based stream compression
algorithm called XC-ZLIB.
</para>


</sect1>
<sect1 id='encoding'>
<title>Encoding</title>

<para>
The syntax and types used in the encoding are taken from the X protocol
encoding. Where LBX defines new types, they are defined earlier in this
document.
</para>


<para>
As in the X protocol, in various cases, the number of bytes occupied by a
component will be specified by a lowercase single-letter variable name instead
of a specific numeric value, and often some other component will have its value
specified as a simple numeric expression involving these variables. Components
specified with such expressions are always interpreted as unsigned integers.
The scope of such variables is always just the enclosing request, reply, error,
event, or compound type structure.
</para>


<para>
For unused bytes, the encode-form is:
</para>

<literallayout>
N            unused
</literallayout>

<para>
If the number of unused bytes is variable, the encode-form typically is:
</para>

<literallayout>
p            unused, p=pad(E)
</literallayout>

<para>
where E is some expression, and pad(E) is the number of bytes needed to round E
up to a multiple of four.
</para>


<para>
pad(E) = (4 - (E mod 4)) mod 4
</para>


<para>
In many of the encodings, the length depends on many variable length fields.
The variable L is used to indicate the number of padded 4 byte units needed to
carry the request. Similarly, the variable Lpad indicates the number of bytes
needed to pad the request to a 4 byte boundary.
</para>

<literallayout>
For counted lists there is a common encoding of NLISTofFOO:
</literallayout>

<literallayout class='monospaced'>
<emphasis role='bold'>NLISTofFOO</emphasis>
1      m      num items
m      LISTofFOO      items
</literallayout>

<para>
For cached GC and Drawables:
</para>

<literallayout>
<emphasis role='bold'>LBXGCANDDRAWUPDATE</emphasis>
4 or 0      DRAWBLE      optional drawable
4 or 0      GC           optional GC
</literallayout>



<literallayout>
<emphasis role='bold'>LBXGCANDDRAWABLE</emphasis>
8      LBXGCANDDRAWENT      cache-entries
8                           unused
m      LBXGCANDDRAWUPDATE   optional GC and Drawable
</literallayout>


<sect2 id='errors2'>
<title>Errors</title>

<literallayout class='monospaced'>
<emphasis role='bold'>LbxClient</emphasis>
1      0          Error
1      CARD8      error-base + 0
2      CARD16     sequence number
4                 unused
2      CARD16     lbx opcode
1      CARD8      major opcode
21                unused
</literallayout>

</sect2>
<sect2 id='requests2'>
<title>Requests</title>

<literallayout class='monospaced'>
<emphasis role='bold'>LbxQueryVersion</emphasis>
1      CARD8      opcode
1      0          lbx opcode
2      1          request length
=&gt;
1      1          Reply
1                 unused
2      CARD16     sequence number
4      0          reply length
2      CARD16     major version
2      CARD16     minor version
20                unused
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#18761">See
LbxQueryVersion</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxStartProxy</emphasis>
1      CARD8                      opcode
1      1                          lbx opcode
2      L                          request length
n      NLISTofOPTION-REQUEST      options
p                                 unused, p=pad(n)

<emphasis role='bold'>OPTION-REQUEST</emphasis>
1      OPTCODE                    option-code
m      OPTLEN                     option-request-byte-length, (b=m+a+1)
a      DELTAOPT or                option
       NLISTofNAMEDOPT or
       NLISTofSTR or
       NLISTofPIXMAPMETHOD or
       BOOL
</literallayout>

<para>
The encoding of the option field depends on the option-code.
See <ulink url="lbx.htm#35444">See StartProxy Options</ulink>.
</para>

<literallayout class='monospaced'>
1      OPTCODE                               option-code
0      LbxOptionDeltaProxy
1      LbxOptionDeltaServer
2      LbxOptionStreamCompression
3      LbxOptionBitmapCompression
4      LbxOptionPixmapCompression
5      LbxOptionMessageCompression              /* also known as squishing */
6      LbxOptionUseTags
7      LbxOptionColormapAllocation
255    LbxOptionExtension
</literallayout>

<para>
OPTLEN has two possible encodings, depending on the size of the value carried:
</para>

<literallayout class='monospaced'>
<emphasis role='bold'>OPTLEN</emphasis>
1      CARD8              b (0 &lt; b &lt;= 255)

<emphasis role='bold'>OPTLEN</emphasis>
1      0                  long length header
1      c                  length0, c = b &gt;&gt; 8
1      d                  length1, d= b &amp; #xff

<emphasis role='bold'>DELTAOPT</emphasis>
1      CARD8      min-cache-size
1      CARD8      max-cache-size
1      CARD8      preferred-cache-size
1      CARD8      min-message-length
1      CARD8      max-message-length (in 4-byte units)
1      CARD8      preferred-message-length

<emphasis role='bold'>NAMEDOPT</emphasis>
f      STR             type-name
1      g+1             option-data-length
g      LISTofBYTE      option-data (option specific)

<emphasis role='bold'>PIXMAPMETHOD</emphasis>
h      STR              name
1      BITMASK          format mask
1      j                depth count
j      LISTofCARD8      depths

=&gt;
=&gt;

1      1                 Reply
1      CARD8             count

0xff      options in request cannot be decoded
2      CARD16            sequence number
4      (a+p-32)/4        reply length
a      LISTofCHOICE      options-reply
p            unused, if (n&lt;24) p=24-n else p=pad(n)

<emphasis role='bold'>CHOICE</emphasis>
1      CARD8                request-option-index
b      OPTLEN               reply-option-byte-length
c      DELTACHOICE or       choice
      INDEXEDCHOICE or
      NLISTofINDEXEDOPT or
      NLISTofPIXMAPCHOICE or
      BOOL or
      INDEXEDCHOICE
</literallayout>

<para>
The encoding of the choice field depends on the option-code. See <ulink
url="lbx.htm#35444">See StartProxy Options</ulink>.
</para>

<literallayout class='monospaced'>
<emphasis role='bold'>DELTACHOICE</emphasis>
1      CARD8      preferred cache size
1      CARD8      preferred message length in 4-byte units

<emphasis role='bold'>INDEXEDCHOICE</emphasis>
1      CARD8           index
d      LISTofBYTE      data

<emphasis role='bold'>PIXMAPCHOICE</emphasis>
1      CARD8           index
1      CARD8           opcode
1      BITMASK         format mask
e      NLISTofCARD8    depths
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#20870">See
LbxStartProxy</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxStopProxy</emphasis>
1      CARD8      opcode
1      2          lbx opcode
2      1          request length
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#27455">See
LbxStopProxy</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxSwitch</emphasis>
1      CARD8      opcode
1      3          lbx opcode
2      2          request length
4      CARD32     client
</literallayout>

<para>
The description of this request is on
<ulink url="lbx.htm#33500">See LbxSwitch</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxNewClient</emphasis>
1      CARD8      opcode
1      4          lbx opcode
2      L          request length
4      CARD32     client
The remaining bytes of the request are the core connection setup.
=&gt;
If the connection is rejected, a core connection reply is sent. Otherwise the
reply has the form:
1      BOOL      success
1                change type
      0          no-deltas
      1          normal-client-deltas
      2          app-group-deltas
2      CARD16    major version
2      CARD16    minor version
2      1 + a     length
4      CARD32    tag id
</literallayout>

<para>
The remaining bytes depend on the value of change-type and length.
</para>

<para>
For no-deltas, the remaining bytes are the &quot;additional data&quot;
bytes of the core reply. (a = length of core reply, in 4 byte quantities).
</para>

<para>
For normal-client-deltas, the additional bytes have the form, with a length (a
= 1 +b):
</para>

<literallayout class='monospaced'>
4      CARD32                 resource id base
4b      LISTofSETofEVENT      root input masks
</literallayout>

<para>
For app-group-deltas, the additional bytes have the following form, with a
length of (a = 1 + 4c):
</para>

<literallayout class='monospaced'>
4      CARD32                resource id base
4      WINDOW                root id base
4      VISUALID              visual
4      COLORMAP              colormap
4      CARD32                white pixel
4      CARD32                black pixel
4c     LISTofSETofEVENT      root input masks
</literallayout>

<para>
The description of this request is on
<ulink url="lbx.htm#17810">See LbxNewClient</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxCloseClient</emphasis>
1      CARD8      opcode
1      5          lbx opcode
2      2          request length
4      CARD32     client
</literallayout>

<para>
The description of this request is on
<ulink url="lbx.htm#21625">See LbxCloseClient</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxModifySequence</emphasis>
1      CARD8      opcode
1      6          lbx opcode
2      2          request length
4      CARD32     offset to sequence number
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#36693">See
LbxModifySequence</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxAllowMotion</emphasis>
1      CARD8      opcode
1      7          lbx opcode
2      2          request length
4      CARD32     number of MotionNotify events
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#15895">See
LbxAllowMotion</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxIncrementPixel</emphasis>
1      CARD8      opcode
1      8          lbx opcode
2      3          request length
4      COLORMAP   colormap
4      CARD32      pixel
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#27227">See
LbxIncrementPixel</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxDelta</emphasis>
1      CARD8              opcode
1      9                  lbx opcode
2      1+(2n +p+2)/4      request length
1      n                  count of diffs
1      CARD8              cache index
2n      LISTofDIFFITEM    offsets and differences
p                         unused, p=pad(2n + 2)
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#26857">See
LbxDelta</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxGetModifierMapping</emphasis>
1      CARD8      opcode
1      10         lbx opcode
2      1          request length
=&gt;
1      1          Reply
1      n          keycodes-per-modifier
2      CARD16     sequence number
4      2n         reply length
4      CARD32     tag
20                unused
8n     LISTofKEYCODE      keycodes
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#37687">See
LbxGetModifierMapping</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxInvalidateTag</emphasis>
1      CARD8      opcode
1      12         lbx opcode
2      2          request length
4      CARD32     tag
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#12515">See
LbxInvalidateTag</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxPolyPoint</emphasis>
1      CARD8      opcode
1      13      lbx opcode
2      1+(m+n+p)/4      request length
m      LBXGCANDDRAWABLE      cache entries
n      LISTofLBXPOINT      points (n is data-dependent)
p      0      unused, p=Lpad
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#37179">See
LbxPolyPoint</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxPolyLine</emphasis>
1      CARD8      opcode
1      14      lbx opcode
2      1+(m+n+p)/4      request length
m      LBXGCANDDRAWABLE      cache entries
n      LISTofLBXPOINT      points (n is data-dependent)
p      0      unused, p=Lpad
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#16574">See
LbxPolyLine</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxPolySegment</emphasis>
1      CARD8      opcode
1      15      lbx opcode
2      1+(m+n+p)/4      request length
m      LBXGCANDDRAWABLE      cache entries
n      LISTofLBXSEGMENT      segments (n is data-dependent)
p      0      unused, p=Lpad
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#26077">See
LbxPolySegment</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxPolyRectangle</emphasis>
1      CARD8      opcode
1      16      lbx opcode
2      1+(m+n+p)/4      request length
m      LBXGCANDDRAWABLE      cache entries
n      LISTofLBXRECTANGLE      rectangles (n is data-dependent)
p      0      unused, p=pad(m+n)
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#40958">See
LbxPolyRectangle</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxPolyArc</emphasis>
1      CARD8      opcode
1      17      lbx opcode
2      1+(m+n+p)/4      request length
m      LBXGCANDDRAWABLE      cache entries
n      LISTofLBXARCS      arcs (n is data-dependent)
p      0      unused, p=Lpad
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#15317">See
LbxPolyArc</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxFillPoly</emphasis>
1      CARD8      opcode
1      18      lbx opcode
2      1+(3+m+n+p)/4      request length
1      LBXGCANDDRAWENT      cache entries
1            shape
0      Complex
1      Nonconvex
2      Convex
1      p      pad byte count
m      LBXGCANDDRAWUPDATE      optional gc and drawable
n      LISTofLBXPOINT      points (n is data-dependent)
p      0      unused, p=Lpad
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#35796">See
LbxFillPoly</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxPolyFillRectangle</emphasis>
1      CARD8      opcode
1      19      lbx opcode
2      1+(m+n+p)/4      request length
m      LBXGCANDDRAWABLE      cache entries
n      LISTofLBXRECTANGLE      rectangles (n is data-dependent)
p      0      unused, p=Lpad
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#25511">See
LbxPolyFillRectangle</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxPolyFillArc</emphasis>
1      CARD8      opcode
1      20      lbx opcode
2      1+(m+n+p)/4      request length
m      LBXGCANDDRAWABLE      cache entries
n      LISTofLBXARC      arcs (n is data-dependent)
p      0      unused, p=Lpad
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#42698">See
LbxPolyFillArc</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxGetKeyboardMapping</emphasis>
1      CARD8      opcode
1      21      lbx opcode
2      2      request length
1      KEYCODE      first keycode
1      m      count
2            unused
=&gt;
1      1      Reply
1      n      keysyms-per-keycode
2      CARD16      sequence number
4      nm      reply length (m = count field from the request)
4      CARD32      tag
20            unused
4nm      LISTofKEYSYM      keysyms
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#33719">See
LbxGetKeyboardMapping</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxQueryFont</emphasis>
1      CARD8      opcode
1      22      lbx opcode
2      2      request length
4      FONTABLE      font
=&gt;
1      1      Reply
1      BOOL      compression
2      CARD16      sequence number
4      L      reply length
4      CARD32      tag
20            unused
All of the following is conditional:
12      CHARINFO      min-bounds
4            unused
12      CHARINFO      max-bounds
4            unused
2      CARD16      min-char-or-byte2
2      CARD16      max-char-or-byte2
2      CARD16      default-char
2      n      number of FONTPROPs in properties
1            draw-direction
0      <emphasis>LeftToRight</emphasis>
1      <emphasis>RightToLeft</emphasis>
1      CARD8      min-byte1
1      CARD8      max-byte1
1      BOOL      all-chars-exist
2      INT16      font-ascent
2      INT16      font-descent
4      m      number of elements in char-infos
8n      LISTofFONTPROP      properties
and either
12m      LISTofCHARINFO      char-infos
or
m      LISTofLBXCHARINFO      char-infos
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#18818">See
LbxQueryFont</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxChangeProperty</emphasis>
1      CARD8      opcode
1      23      lbx opcode
2      6      request length
4      WINDOW      window
4      ATOM      property
4      ATOM      type
1      CARD8      format
1            mode
0      Replace
1      Preprend
2      Append
2            unused
4      CARD32      length of data in format units
            (= n for format = 8)
            (= n/2 for format = 16)
            (= n/4 for format = 32)
=&gt;
1      1      Reply
1            unused
2      CARD16      sequence number
4      0      reply length
4      CARD32      tag
20            unused
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#40098">See
LbxChangeProperty</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxGetProperty</emphasis>
1      CARD8      opcode
1      24      lbx opcode
2      7      request length
4      WINDOW      window
4      ATOM      property
4      ATOM      type
0      AnyPropertyType
1      CARD8      delete
3            unused
4      CARD32      long-offset
4      CARD32      long-length
=&gt;
1      1      Reply
1      CARD8      format
2      CARD16      sequence number
4      CARD32      reply length
4      ATOM      type
0      None
4      CARD32      bytes-after
4      CARD32      length of value in format units
            (= 0 for format = 0)
            (= n for format = 8)
            (= n/2 for format = 16)
            (= n/4 for format = 32)
4      CARD32      tag
8            unused
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#31397">See
LbxGetProperty</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxTagData</emphasis>
1      CARD8      opcode
1      25      lbx opcode
2      3+(n+p)/4      request length
4      CARD32      tag
4      CARD32      length of data in bytes
n      LISTofBYTE      data
p            unused, p=pad(n)
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#17987">See
LbxTagData</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxCopyArea</emphasis>
1      CARD8      opcode
1      26      lbx opcode
2      L      request length
1      CARD8      source drawable cache entry
1      LBXGCANDDRAWENT      cache entries
4 or 0      DRAWABLE      optional source drawable
b      LBXGCANDDRAWUPDATE      optional gc and dest drawable
c      LBXPINT16      src-x
d      LBXPINT16      src-y
e      LBXPINT16      dst-x
f      LBXPINT16      dst-y
g      LBXCARD16      width
h      LBXCARD16      height
p            unused, p=Lpad
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#11409">See
LbxCopyArea</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxCopyPlane</emphasis>
1      CARD8      opcode
1      27      lbx opcode
2      L      request length
4      CARD32      bit plane
1      CARD8      source drawable cache entry
1      LBXGCANDDRAWENT      cache entries
4 or 0      DRAWABLE      optional source drawable
b      LBXGCANDDRAWUPDATE      optional gc and dest drawable
c      LBXPINT16      src-x
d      LBXPINT16      src-y
e      LBXPINT16      dst-x
f      LBXPINT16      dst-y
g      LBXCARD16      width
h      LBXCARD16      height
p            unused, p=Lpad
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#36772">See
LbxCopyPlane</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxPolyText8</emphasis>
1      CARD8      opcode
1      28      lbx opcode
2      L      request length
1      LBXGCANDDRAWENT      cache entries
a      LBXGCANDDRAWUPDATE      optional gc and drawable
b      LBXPINT16      x
c      LBXPINT16      y
n      LISTofTEXTITEM8      items
p            unused, p=Lpad
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#23201">See
LbxPolyText8</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxPolyText16</emphasis>
1      CARD8      opcode
1      29      lbx opcode
2      L      request length
1      LBXGCANDDRAWENT      cache entries
a      LBXGCANDDRAWUPDATE      optional gc and drawable
b      LBXPINT16      x
c      LBXPINT16      y
2n      LISTofTEXTITEM16      items
p            unused, p=Lpad
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#13228">See
LbxPolyText16</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxImageText8</emphasis>
1      CARD8      opcode
1      30      lbx opcode
2      L      request length
1      LBXGCANDDRAWENT      cache entries
a      LBXGCANDDRAWUPDATE      optional gc and drawable
b      LBXPINT16      x
c      LBXPINT16      y
n      STRING8      string
p            unused, p=Lpad
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#10990">See
LbxImageText8</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxImageText16</emphasis>
1      CARD8      opcode
1      31      lbx opcode
2      L      request length
1      LBXGCANDDRAWENT      cache entries
a      LBXGCANDDRAWUPDATE      optional gc and drawable
b      LBXPINT16      x
c      LBXPINT16      y
2n      STRING16      string
p            unused, p=Lpad
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#39584">See
LbxImageText16</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxQueryExtension</emphasis>
1      CARD8      opcode
1      32      lbx opcode
2      2+(n+p)/4      request length
4      n      length of extension name
n      STRING8      extension name
p            unused, p=pad(n)
=&gt;
1      1      Reply
1      n      number of requests in the extension
2      CARD16      sequence number
4      0 or 2*(m + p)      reply length, m = (n+7)/8
1      BOOL      present
1      CARD8      major opcode
1      CARD8      first event
1      CARD8      first error
20            unused
m      LISTofMASK      optional reply-mask
p            unused, p=pad(m)
m      LISTofMASK      optional event-mask
p            unused, p=pad(m)
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#36662">See
LbxQueryExtension</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxPutImage</emphasis>
1      CARD8      opcode
1      33      lbx opcode
2      L      request length
1      CARD8      compression method
1      LBXGCANDDRAWENT      cache entries
a      PIPACKED            bit-packed
b      LBXGCANDDRAWUPDATE      optional gc and drawable
c      LBXCARD16      width
d      LBXCARD16      height
e      LBXPINT16      x
f      LBXPINT16      y
n      LISTofBYTE      compressed image data
p            unused, p=Lpad
</literallayout>

<para>
If there is no left padding and the depth is less than or equal to nine,
PIPPACKED is encoded as follows:
</para>

<literallayout class='monospaced'>
<emphasis role='bold'>PIPACKED</emphasis>
1      #x80 | (format &lt;&lt; 5) | ((depth -1) &lt;&lt; 2)
</literallayout>

<para>
Otherwise PIPACKED is defined as:
</para>

<literallayout class='monospaced'>
<emphasis role='bold'>PIPACKED</emphasis>
1      (depth -1) &lt;&lt; 2)
1      (format &lt;&lt; 5) | left-pad
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#21218">See
LbxPutImage</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxGetImage</emphasis>
1      CARD8      opcode
1      34      lbx opcode
2      6      request length
4      DRAWABLE      drawable
2      INT16      x
2      INT16      y
2      CARD16      width
2      CARD16      height
4      CARD32      plane mask
1      CARD8      format
3            unused
=&gt;
1      1      Reply
1      CARD8      depth
2      CARD16      sequence number
4      (n+p)/4      reply length
4      (m+p)/4      X reply length; if uncompressed, m=n
4      VISUALID      visual
0      None
1            compression method
15            unused
n      LISTofBYTE      data
p            unused, p=pad(n)
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#26896">See
LbxGetImage</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxBeginLargeRequest</emphasis>
1      CARD8      opcode
1      35      lbx opcode
2      2      request length
4      CARD32      large request length
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#31209">See
LbxBeginLargeRequest</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxLargeRequestData</emphasis>
1      CARD8      opcode
1      36      lbx opcode
2      1+n      request length
4n      LISTofBYTE      data
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#36982">See
LbxLargeRequestData</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxEndLargeRequest</emphasis>
1      CARD8      opcode
1      37      lbx opcode
2      1      request length
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#31841">See
LbxEndLargeRequest</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxInternAtoms</emphasis>
1      CARD8      opcode
1      38      lbx opcode
2      1+(2+m+n+p)/4      request length
2      m      num-atoms
n      LISTofLONGSTR      names
p            pad p=Lpad
=&gt;
1      1      Reply
1            unused
2      CARD16      sequence number
4      a      reply length, a = MAX(m - 6, 0)
4*m      LISTofATOM      atoms
p            pad p = MAX(0, 4*(6 - m))
&nbsp;
LONGSTR
2      c      string length
c      STRING8      string
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#21636">See
LbxInternAtoms</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxGetWinAttrAndGeom</emphasis>
1      CARD8      opcode
1      39      lbx opcode
2      2      request length
4      CARD32      window id
=&gt;
1      1      Reply
1            backing store
0      NotUseful
1      WhenMapped
2      Always
2      CARD16      sequence number
4      7      reply length
4      VISUALID      visual id
2            class
1      InputOutput
2      InputOnly
1      BITGRAVITY      bit gravity
1      WINGRAVITY      window gravity
4      CARD32      backing bit planes
4      CARD32      backing pixel
1      BOOL      save under
1      BOOL      map installed
1            map state
0      Unmapped
1      Unviewable
2      Viewable
1      BOOL      override
4      COLORMAP      colormap
4      SETofEVENT      all events mask
4      SETofEVENT      your event mask
2      SETofDEVICEEVENT      do not propagate mask
2            unused
4      WINDOW      root
2      INT16      x
2      INT16      y
2      CARD16      width
2      CARD16      height
2      CARD16      border width
1      CARD8      depth
1            unused
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#39382">See
LbxGetWinAttrAndGeom</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxGrabCmap</emphasis>
1      CARD8      opcode
1      40      lbx opcode
2      2      request length
4      COLORMAP      colormap
=&gt;
</literallayout>

<para>
If smart-grab is true, the reply is as follows:
</para>

<literallayout class='monospaced'>
1      1      Reply
1      #x80      flags
2      CARD16      sequence number
4      0      reply length
24            unused

If smart-grab is false, the reply is as follows:

1      1      Reply
1            flags (set of)
       #x40      auto-release
       #x20      three-channels
       #x10      two-byte-pixels
lower four bits specifies bits-per-pixel
2      CARD16      sequence number
4      L      reply length
m      CHAN or CHANNELS      cells (CHAN if !three-channels)
p      0      pad(m)

<emphasis role='bold'>CHANNELS</emphasis>
a      CHAN      red
1      5            next channel
b      CHAN      green
1      5      next channel
c      CHAN      blue
1      0      list end

<emphasis role='bold'>CHAN</emphasis>
d      LISTofLBXPIXEL

<emphasis role='bold'>LBXPIXEL</emphasis>
e      PIXELPRIVATE or
      PIXELPRIVATERANGE or
      PIXELALLOC or
      PIXELALLOCRANGE

<emphasis role='bold'>PIXELPRIVATE</emphasis>
1      1      pixel-private
f      PIXEL      pixel

<emphasis role='bold'>PIXEL</emphasis>
f      CARD8 or CARD16      (CARD8 if !two-byte-pixels)

<emphasis role='bold'>PIXELPRIVATERANGE</emphasis>
1      2      pixel-private-range
f      PIXEL      fist-pixel
f      PIXEL      last-pixel

<emphasis role='bold'>PIXELALLOC</emphasis>
1      3      pixel-private
f      PIXEL      pixel
g      COLORSINGLE or COLORTRIPLE      color       (COLORSINGLE if
three-channels)

<emphasis role='bold'>COLORSINGLE</emphasis>
h      CARD8 or CARD16      value (CARD8       if bits-per-rgb =&lt; 7)

<emphasis role='bold'>COLORTRIPLE</emphasis>
h      COLORSINGLE      red
h      COLORSINGLE      green
h      COLORSINGLE      blue

<emphasis role='bold'>PIXELALLOCRANGE</emphasis>
1      4      pixel-private
f      PIXEL      first-pixel
f      PIXEL      last-pixel
j      LISTofCOLORSINGLE or       color       (COLORSINGLE if three-channels)
      LISTofCOLORTRIPLE
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#10922">See
LbxGrabCmap</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxReleaseCmap</emphasis>
1      CARD8      opcode
1      41      lbx opcode
2      2      request length
4      COLORMAP      cmap
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#34675">See
LbxReleaseCmap</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxAllocColor</emphasis>
1      CARD8      opcode
1      42      lbx opcode
2      5      request length
4      COLORMAP      colormap
4      CARD32      pixel
2      CARD16      red
2      CARD16      green
2      CARD16            blue
2            unused
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#10446">See
LbxAllocColor</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxSync</emphasis>
1      CARD8      opcode
1      43      lbx opcode
2      1      request length
=&gt;
1      1      Reply
1      n      unused
2      CARD16      sequence number
4      0      reply length
24            unused
</literallayout>

<para>
The description of this request is on <ulink url="lbx.htm#30719">See
LbxSync</ulink>.
</para>



</sect2>
<sect2 id='events2'>
<title>Events</title>

<literallayout class='monospaced'>
<emphasis role='bold'>LbxSwitchEvent</emphasis>
1      base + 0      code
1      0      lbx type
2      CARD16      sequence number
4      CARD32      client
24            unused
</literallayout>

<para>
The description of this event is on <ulink url="lbx.htm#33748">See
LbxSwitchEvent</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxCloseEvent</emphasis>
1      base + 0      code
1      1      lbx type
2      CARD16      sequence number
4      CARD32      client
24            unused
</literallayout>

<para>
The description of this event is on <ulink url="lbx.htm#17292">See
LbxCloseEvent</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxInvalidateTagEvent</emphasis>
1      base + 0      code
1      3      lbx type
2      CARD16      sequence number
4      CARD32      tag
4            tag-type
1      <emphasis>LbxTagTypeModmap</emphasis>
2      <emphasis>LbxTagTypeKeymap</emphasis>
3      <emphasis>LbxTagTypeProperty</emphasis>
4      <emphasis>LbxTagTypeFont</emphasis>
5      <emphasis>LbxTagTypeConnInfo</emphasis>
20            unused
</literallayout>

<para>
The description of this event is on <ulink url="lbx.htm#23016">See
LbxInvalidateTagEvent</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxSendTagDataEvent</emphasis>
1      base + 0      code
1      4      lbx type
2      CARD16      sequence number
4      CARD32      tag
4            tag-type
3      <emphasis>LbxTagTypeProperty</emphasis>
20            unused
</literallayout>

<para>
The description of this event is on <ulink url="lbx.htm#20373">See
LbxSendTagDataEvent</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxListenToOne</emphasis>
1      base + 0      code
1      5      lbx type
2      CARD16      sequence number
4      CARD32      client
<emphasis>#xFFFFFFFF</emphasis>
a client not managed by the proxy
24            unused
</literallayout>

<para>
The description of this event is on <ulink url="lbx.htm#25209">See
LbxListenToOne</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxListenToAll</emphasis>
1      base + 0      code
1      6      lbx type
2      CARD16      sequence number
28            unused
</literallayout>

<para>
The description of this event is on <ulink url="lbx.htm#11095">See
LbxListenToAll</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxQuickMotionDeltaEvent</emphasis>
1      base + 1      code
1      CARD8      delta-time
1      INT8      delta-x
1      INT8      delta-y
</literallayout>

<para>
This event is not padded to 32 bytes.
</para>


<para>
The description of this event is on <ulink url="lbx.htm#40268">See
LbxQuickMotionDeltaEvent</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxMotionDeltaEvent</emphasis>
1      base + 0      code
1      7                  lbx type
1      INT8      delta-x
1      INT8      delta-y
2      CARD16      delta-time
2      CARD16      delta-sequence
</literallayout>

<para>
This event is not padded to 32 bytes.
</para>


<para>
The description of this event is on <ulink url="lbx.htm#30033">See
LbxMotionDeltaEvent</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxReleaseCmapEvent</emphasis>
1      base + 0      code
1      8                  lbx type
2      CARD16      sequence number
4      COLORMAP      colormap
24            unused
</literallayout>

<para>
The description of this event is on <ulink url="lbx.htm#19129">See
LbxReleaseCmapEvent</ulink>.
</para>


<literallayout class='monospaced'>
<emphasis role='bold'>LbxFreeCellsEvent</emphasis>
1      base + 0      code
1      9                  lbx type
2      CARD16      sequence number
4      COLORMAP      colormap
4      PIXEL      pixel start
4      PIXEL      pixel end
16            unused
</literallayout>

<para>
The description of this event is on <ulink url="lbx.htm#38041">See
LbxFreeCellsEvent</ulink>.
</para>


</sect2>
<sect2 id='re_encoding_of_x_events'>
<title>Re-encoding of X Events</title>

<para>
The X protocol requires all X events to be 32 bytes. The LBX server reduces the
number of bytes sent between the server and the proxy for some X events by not
appending unused pad bytes to the event data. The offsets of X event data are
unchanged. The proxy will pad the events to 32 bytes before passing them on to
the client.
</para>


<para>
LBX reencodes X event representations into the following sizes, if squishing is
enabled:
</para>

<para><programlisting>
KeyOrButton            32
EnterOrLeave           32
Keymap                 32
Expose                 20
GraphicsExposure       24
NoExposure             12
VisibilityNotify       12
CreateNotify           24
DestroyNotify          12
UnmapNotify            16
MapNotify              16
MapRequest             12
Reparent               24
ConfigureNotify        28
ConfigureRequest       28
GravityNotify          16
ResizeRequest          12
Circulate              20
Property      Notify   20
SelectionClear         20
SelectionRequest       28
SelectionNotify        24
Colormap      Notify   16
MappingNotify          8
ClientMessage          32
Unknown                32
</programlisting></para>

</sect2>
<sect2 id='responses2'>
<title>Responses</title>

<literallayout class='monospaced'>
<emphasis role='bold'>LbxDeltaResponse</emphasis>
1      event_base + 0      event code
1      2      lbx type
2      1+(2+2n+p)/4      request length
1      n      count of diffs
1      CARD8      cache index
2n      LISTofDIFFITEM      offsets and differences
p            unused, p=pad(2n)
</literallayout>

<para>
The description of this response is on <ulink url="lbx.htm#34042">See
LbxDeltaResponse</ulink>.
</para>

</sect2>
</sect1>
</article>