home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / doc / CLX / s01.doc < prev    next >
Encoding:
Interleaf document  |  1989-10-18  |  89.9 KB  |  2,675 lines

  1. <!OPS, Version = 5.2>
  2.  
  3. <!Document,
  4.     Print Rev Bars =    no,
  5.     Final Output Device =    "ps",
  6.     Default Printer =    "nearest-adps">
  7.  
  8. <!Font Definitions,
  9.     F2 = Times 10 Italic,
  10.     F3 = Times 10,
  11.     F4 = Times 8 Italic,
  12.     F5 = Times 18 Bold,
  13.     F6 = Courier 8,
  14.     F7 = Times 12 Bold,
  15.     F8 = Times 10 Bold,
  16.     F9 = Symbol_B 8,
  17.     F10 = Symbol_B 10,
  18.     F11 = Symbol_A 10>
  19.  
  20. <!Page,
  21.     Bottom Margin =        1 inches,
  22.     Left Margin =        1 inches,
  23.     Right Margin =        1.15 inches,
  24.     First Page =        Right,
  25.     Starting Page # =     Inherit,
  26.     Page # Prefix =        "1<#1e>",
  27.     Hyphenation =        on,
  28.     Consecutive Hyphens =    2,
  29.     Vert. Just. =        off>
  30.  
  31. <!Autonumber Stream, List, 2,
  32.     Level 2 Suffix =    ,
  33.     Level 2 Starting Value = 0,
  34.     Level 2 Show =        no>
  35.  
  36. <!Autonumber Stream, Outline, 3,
  37.     Level 1 Symbol Type =    UPPER ROMAN,
  38.     Level 2 Symbol Type =    UPPER ALPHA>
  39.  
  40. <!Autonumber Stream, figure, 2,
  41.     Level 1 Prefix =    "Figure ",
  42.     Level 1 Suffix =    "<#1e>",
  43.     Level 1 Show =        no,
  44.     Level 2 Suffix =    ,
  45.     Level 2 Starting Value = 0,
  46.     Level 2 Show =        no>
  47.  
  48. <!Autonumber Stream, figurelet, 2,
  49.     Level 1 Symbol Type =    UPPER ALPHA,
  50.     Level 1 Prefix =    "Figure ",
  51.     Level 1 Suffix =    "<#1e>",
  52.     Level 1 Show =        no,
  53.     Level 2 Suffix =    "<#04>">
  54.  
  55. <!Autonumber Stream, invisible, 1,
  56.     Level 1 Suffix =    ,
  57.     Level 1 Show =        no>
  58.  
  59. <!Autonumber Stream, item, 2,
  60.     Level 2 Symbol Type =    LOWER ALPHA,
  61.     Level 2 Trail =        yes>
  62.  
  63. <!Autonumber Stream, paralet, 4,
  64.     Level 1 Symbol Type =    UPPER ALPHA,
  65.     Level 1 Suffix =    ,
  66.     Level 1 Show =        no,
  67.     Level 2 Prefix =    .,
  68.     Level 2 Suffix =    ,
  69.     Level 3 Prefix =    .,
  70.     Level 3 Suffix =    ,
  71.     Level 4 Prefix =    .,
  72.     Level 4 Suffix =    >
  73.  
  74. <!Autonumber Stream, paranum, 4,
  75.     Level 1 Suffix =    ,
  76.     Level 1 Show =        no,
  77.     Level 2 Prefix =    .,
  78.     Level 2 Suffix =    ,
  79.     Level 3 Prefix =    .,
  80.     Level 3 Suffix =    ,
  81.     Level 4 Prefix =    .,
  82.     Level 4 Suffix =    >
  83.  
  84. <!Autonumber Stream, table, 2,
  85.     Level 1 Prefix =    "Table ",
  86.     Level 1 Suffix =    "<#1e>",
  87.     Level 1 Show =        no,
  88.     Level 2 Suffix =    >
  89.  
  90. <!Autonumber Stream, tablelet, 2,
  91.     Level 1 Symbol Type =    UPPER ALPHA,
  92.     Level 1 Prefix =    "Table ",
  93.     Level 1 Suffix =    "<#1e>",
  94.     Level 1 Show =        no,
  95.     Level 2 Suffix =    "<#04>">
  96.  
  97. <!Class, arg,
  98.     Bottom Margin =        0.153 inches,
  99.     Left Margin =        1.85 inches,
  100.     First Indent =        -0.25 inches,
  101.     Line Spacing =        1.121 lines,
  102.     Font =            F2,
  103.     Left Tab =        -0.50/0 inches>
  104.  
  105. <!Class, argtable,
  106.     Bottom Margin =        0.153 inches,
  107.     Left Margin =        1.60 inches,
  108.     Line Spacing =        1.121 lines,
  109.     Font =            F3,
  110.     Allow Page Break Within = no,
  111.     Left Tab =        0/0.60/1.80/2.50/2.80/3.80/6.75/0.75*4 inches>
  112.  
  113. <!Class, bullet,
  114.     Bottom Margin =        0.153 inches,
  115.     Left Margin =        1.85 inches,
  116.     First Indent =        -0.25 inches,
  117.     Line Spacing =        1.121 lines,
  118.     Font =            F3,
  119.     Allow Page Break Within = no,
  120.     Left Tab =        -0.50/0 inches>
  121.  
  122. <!Class, caption,
  123.     Top Margin =        0.07 inches,
  124.     Bottom Margin =        0.07 inches,
  125.     Line Spacing =        1.100 lines,
  126.     Font =            F4>
  127.  
  128. <!Class, fig,
  129.     Top Margin =        0.07 inches,
  130.     Bottom Margin =        0.07 inches,
  131.     Line Spacing =        1.100 lines,
  132.     Alignment =        Left,
  133.     Font =            F5>
  134.  
  135. <!Class, lisp,
  136.     Bottom Margin =        0.153 inches,
  137.     Left Margin =        1.60 inches,
  138.     Line Spacing =        1.140 lines,
  139.     Alignment =        Left,
  140.     Font =            F6,
  141.     Hyphenation =        off,
  142.     Allow Page Break Within = no,
  143.     Left Tab =        0/0.20*26/6/7/8 inches>
  144.  
  145. <!Class, p1para,
  146.     Bottom Margin =        0.153 inches,
  147.     Left Margin =        1.60 inches,
  148.     First Indent =        -1.60 inches,
  149.     Line Spacing =        1.121 lines,
  150.     Font =            F7,
  151.     Allow Page Break Within = no,
  152.     Allow Page Break After = no,
  153.     Left Tab =        -1.70/0 inches>
  154.  
  155. <!Class, p1rule,
  156.     Bottom Margin =        0 inches,
  157.     Line Spacing =        1 lines,
  158.     Font =            F3,
  159.     Hyphenation =        off,
  160.     Allow Page Break After = no,
  161.     Left Tab =        0/0.75*13 inches>
  162.  
  163. <!Class, p1stacked,
  164.     Bottom Margin =        0 inches,
  165.     Left Margin =        1.60 inches,
  166.     First Indent =        -1.60 inches,
  167.     Line Spacing =        1 lines,
  168.     Font =            F8,
  169.     Allow Page Break Within = no,
  170.     Allow Page Break After = no,
  171.     Left Tab =        -1.60/-0.17/0 inches>
  172.  
  173. <!Class, p2para,
  174.     Bottom Margin =        0.153 inches,
  175.     Left Margin =        1.60 inches,
  176.     First Indent =        -1.60 inches,
  177.     Line Spacing =        1.121 lines,
  178.     Font =            F8,
  179.     Left Tab =        0 inches,
  180.     Right Tab =        -1.60/-0.17 inches>
  181.  
  182. <!Class, p2rule,
  183.     Bottom Margin =        0 inches,
  184.     Left Margin =        1.60 inches,
  185.     Line Spacing =        1 lines,
  186.     Alignment =        Left,
  187.     Font =            F3,
  188.     Hyphenation =        off,
  189.     Allow Page Break After = no,
  190.     Left Tab =        0/0.75*13 inches>
  191.  
  192. <!Class, p2stacked,
  193.     Bottom Margin =        0 inches,
  194.     Left Margin =        1.60 inches,
  195.     First Indent =        -1.60 inches,
  196.     Line Spacing =        1.121 lines,
  197.     Font =            F8,
  198.     Allow Page Break Within = no,
  199.     Allow Page Break After = no,
  200.     Left Tab =        0 inches,
  201.     Right Tab =        -1.60/-0.17 inches>
  202.  
  203. <!Class, para,
  204.     Bottom Margin =        0.153 inches,
  205.     Left Margin =        1.60 inches,
  206.     Line Spacing =        1.121 lines,
  207.     Font =            F3,
  208.     Allow Page Break Within = no,
  209.     Left Tab =        0/0.75*13 inches>
  210.  
  211. <!Class, return,
  212.     Bottom Margin =        0.077 inches,
  213.     Left Margin =        1.60 inches,
  214.     First Indent =        -0.90 inches,
  215.     Line Spacing =        1.121 lines,
  216.     Alignment =        Left,
  217.     Font =            F8,
  218.     Hyphenation =        off,
  219.     Allow Page Break Within = no,
  220.     Allow Page Break After = no,
  221.     Left Tab =        -0.90/0 inches,
  222.     Right Tab =        7.50 inches>
  223.  
  224. <!Class, secno,
  225.     Top Margin =        0.07 inches,
  226.     Bottom Margin =        0.07 inches,
  227.     Line Spacing =        1.100 lines,
  228.     Alignment =        Left,
  229.     Font =            F5,
  230.     Autonumber Name =    paranum>
  231.  
  232. <!Class, secrule,
  233.     Bottom Margin =        0 inches,
  234.     Line Spacing =        1 lines,
  235.     Font =            F3,
  236.     Hyphenation =        off,
  237.     Allow Page Break After = no,
  238.     Left Tab =        0/0.75*13 inches,
  239.     Autonumber Name =    table>
  240.  
  241. <!Class, sectitle,
  242.     Bottom Margin =        0 inches,
  243.     Line Spacing =        1 lines,
  244.     Alignment =        Right,
  245.     Font =            F5,
  246.     Hyphenation =        off,
  247.     New Page =        yes,
  248.     Left Tab =        0/0.75*13 inches>
  249.  
  250. <!Class, synpara,
  251.     Bottom Margin =        0.153 inches,
  252.     Left Margin =        1.60 inches,
  253.     Line Spacing =        1.121 lines,
  254.     Font =            F3,
  255.     Allow Page Break Within = no,
  256.     Allow Page Break After = no,
  257.     Left Tab =        0/0.75/1/2.25/0.75*10 inches>
  258.  
  259. <!Class, syntax,
  260.     Bottom Margin =        0.077 inches,
  261.     Left Margin =        1.60 inches,
  262.     First Indent =        -0.90 inches,
  263.     Line Spacing =        1.121 lines,
  264.     Alignment =        Left,
  265.     Font =            F8,
  266.     Hyphenation =        off,
  267.     Allow Page Break Within = no,
  268.     Allow Page Break After = no,
  269.     Left Tab =        -0.90/0 inches,
  270.     Right Tab =        8 inches>
  271.  
  272. <!Class, "table",
  273.     Top Margin =        0.07 inches,
  274.     Bottom Margin =        0.07 inches,
  275.     Line Spacing =        1.100 lines,
  276.     Font =            F8,
  277.     Autonumber Name =    table>
  278.  
  279. <!Class, thinrule,
  280.     Bottom Margin =        0 inches,
  281.     Left Margin =        1.60 inches,
  282.     Line Spacing =        1 lines,
  283.     Alignment =        Left,
  284.     Font =            F3,
  285.     Hyphenation =        off,
  286.     Allow Page Break After = no,
  287.     Left Tab =        0/0.75*13 inches>
  288.  
  289. <!Class, title,
  290.     Top Margin =        0.07 inches,
  291.     Bottom Margin =        0.07 inches,
  292.     Line Spacing =        1.100 lines,
  293.     Alignment =        Right,
  294.     Font =            F5,
  295.     TOC Doc Name =        TOC>
  296.  
  297. <!Master Frame,
  298.     Name =            "At Anchor",
  299.     Placement =        At Anchor,
  300.     Width =            0.41 inches,
  301.     Height =        0.137 inches,
  302.     Vertical Alignment =    0.03 inches,
  303.     Diagram =
  304. V4,
  305. (g9,32767,0
  306.  (E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,1,1,1,0.066667,0.066667,6,6,0,0.066
  307.   667,6))>
  308.  
  309. <!Master Frame,
  310.     Name =            p1rule,
  311.     Placement =        At Anchor,
  312.     Width =            6.35 inches,
  313.     Height =        0.153 inches,
  314.     Vertical Alignment =    0.007 inches,
  315.     Shared Contents =    yes,
  316.     Diagram =
  317. V4,
  318. (g9,1,0
  319.  (v4,1,0,0.2,0.066667,6.333333,0.066667,13,1,0)
  320.  (v4,2,0,6.326667,0.066667,0.006667,0.066667,17,2,0)
  321.  (E10,0,0,0,-1,1,0.053333,1,15,0,0,1,0,0,0,0,0,1,1,0.066667,0.066667,6,6,0,0.06
  322.   6667,6))>
  323.  
  324. <!Master Frame,
  325.     Name =            p2rule,
  326.     Placement =        At Anchor,
  327.     Width =            4.75 inches,
  328.     Height =        0.15 inches,
  329.     Vertical Alignment =    0.007 inches,
  330.     Shared Contents =    yes,
  331.     Diagram =
  332. V4,
  333. (g9,1,0
  334.  (v4,1,0,4.733333,0.066611,0.006667,0.066723,17,2,0)
  335.  (E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,0,1,1,0.066667,0.066667,6,6,0,0.066
  336.   667,6))>
  337.  
  338. <First Page Header, Frame =
  339. V4,
  340. (g9,0,0
  341.  (E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,1,1,1,1,0.066667,0.066667,6,6,0,0.066
  342.   667,6))>
  343.  
  344. <Right Page Header, Frame =
  345. V4,
  346. (g9,1,0
  347.  (T8,1,12,5.24,0.293333,1.133333,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512
  348.   ,102,1101,2,
  349. <caption>
  350.  
  351. Introduction to CLX
  352.  
  353. <End Text>)
  354.  (E10,0,0,0,1,0,0.053333,1,15,0,0,1,0,0,0,0,1,0,1,0.066667,0.066667,6,6,0,0.066
  355.   667,6))>
  356.  
  357. <Left Page Header, Frame =
  358. V4,
  359. (g9,1,0
  360.  (T8,1,12,0,0.293333,2.866667,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,10
  361.   2,1101,2,
  362. <caption>
  363.  
  364. Introduction to CLX
  365.  
  366. <End Text>)
  367.  (E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,1,1,1,0.066667,0.066667,6,6,0,0.066
  368.   667,6))>
  369.  
  370. <Right Page Footer, Frame =
  371. V4,
  372. (g9,1,0
  373.  (t8,1,4,6.333333,0.266667,2,17,@nntimsps10b,\240)
  374.  (t8,2,4,0.006667,0.266667,0,17,@nntimsps8i,CLX\ Programmer's\ Reference)
  375.  (v4,3,0,0,0.066667,6.333333,0.066554,17,2,0)
  376.  (E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,1,1,1,0.066667,0.066667,6,6,0,0.066
  377.   667,6))>
  378.  
  379. <Left Page Footer, Frame =
  380. V4,
  381. (g9,1,0
  382.  (t8,1,4,0,0.266667,0,17,@nntimsps10b,\240)
  383.  (t8,2,4,6.333333,0.266667,2,17,@nntimsps8i,CLX\ Programmer's\ Reference)
  384.  (v4,3,0,0.026667,0.066667,6.333333,0.066554,17,2,0)
  385.  (E10,0,0,0,1,0,0.053333,1,15,0,0,1,0,0,0,0,1,0,1,0.066667,0.066667,6,6,0,0.066
  386.   667,6))>
  387.  
  388. <sectitle,
  389.     Allow Page Break Within = no,
  390.     Allow Page Break After = no>
  391.  
  392. <|,"1<#1e>1">
  393. <Frame,
  394.     Name =            "At Anchor",
  395.     Placement =        At Anchor,
  396.     Width =            4.72 inches,
  397.     Height =        0.94 inches,
  398.     Vertical Alignment =    0.03 inches,
  399.     Diagram =
  400. V4,
  401. (g9,1,0
  402.  (T8,1,12,0.133333,0.72,4.563333,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512
  403.   ,102,1101,3,
  404. <title>
  405.  
  406. INTRODUCTION TO CLX
  407.  
  408. <End Text>)
  409.  (E10,0,0,0,1,0,0.053333,1,15,0,0,1,0,0,0,0,1,0,1,0.066667,0.066667,6,6,0,0.066
  410.   667,6))>
  411. <Frame,
  412.     Name =            "At Anchor",
  413.     Placement =        At Anchor,
  414.     Width =            1.626 inches,
  415.     Height =        0.938 inches,
  416.     Vertical Alignment =    0 inches,
  417.     Diagram =
  418. V4,
  419. (g9,1,0
  420.  (T8,1,12,0.066667,0.276667,0,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,10
  421.   2,1101,3,
  422. <secno,
  423.     TOC Doc Name =        TOC>
  424.  
  425. <Autonum, paranum, 1, First = Yes>
  426.  
  427. <End Text>)
  428.  (T8,2,12,0.026667,0.733333,0,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,10
  429.   2,1101,3,
  430. <"table">
  431.  
  432. <Autonum, table, 1, First = Yes>
  433.  
  434. <End Text>)
  435.  (T8,3,12,0.066667,0.6,0,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,102,110
  436.   1,3,
  437. <fig,
  438.     Alignment =        Both,
  439.     Font =            F8,
  440.     Autonumber Name =    figure>
  441.  
  442. <Autonum, figure, 1, First = Yes>
  443.  
  444. <End Text>)
  445.  (g9,5,0
  446.    (p7,5,8,19
  447.      (g9,5,0
  448.        (g9,5,0
  449.          (v4,5,0,0.266667,0,1.6,0,17,1,0)
  450.          (v4,6,0,1.6,0,1.6,0.933333,17,1,0)
  451.          (v4,7,0,1.6,0.933333,0.266667,0.933333,17,1,0)
  452.          (v4,8,0,0.266667,0.933333,0.266667,0,17,1,0))))
  453.    (g9,10,8
  454.      (p7,10,0,13
  455.        (g9,10,0
  456.          (g9,10,0
  457.            (v4,10,0,1.471112,0.927404,1.471112,0.159997,17,1,0)
  458.            (v4,11,0,1.471112,0.159997,1.293333,0.159997,17,1,0)
  459.            (v4,12,0,1.293333,0.159997,1.115556,0.306168,17,1,0)
  460.            (v4,13,0,1.115556,0.306168,1.115556,0.379256,17,1,0)
  461.            (v4,14,0,1.115556,0.379256,1.271111,0.379256,17,1,0)
  462.            (v4,15,0,1.271111,0.379256,1.271111,0.927404,17,1,0)
  463.            (v4,16,0,1.271111,0.927404,1.471112,0.927404,17,1,0))))
  464.      (g9,17,2048
  465.        (v4,17,33,1.093333,0.159997,1.093333,0.159997,17,0,0)
  466.        (v4,18,33,1.093333,1.146663,1.093333,1.146663,17,0,0)
  467.        (v4,19,33,1.56,1.146663,1.56,1.146663,17,0,0)
  468.        (v4,20,33,1.56,0.159997,1.56,0.159997,17,0,0))))
  469.  (E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,1,1,1,0.066667,0.066667,6,6,0,0.066
  470.   667,6))>
  471.  
  472. <secrule,
  473.     Allow Page Break Within = no,
  474.     Allow Page Break After = yes,
  475.     Autonumber Name =    >
  476.  
  477. <Index, "CLX", Sort String = clx, "overview", To Named = sectitle>
  478. <Frame,
  479.     Name =            "At Anchor",
  480.     Placement =        At Anchor,
  481.     Width =            6.35 inches,
  482.     Height =        0.153 inches,
  483.     Vertical Alignment =    0.007 inches,
  484.     Diagram =
  485. V4,
  486. (g9,1,0
  487.  (v4,1,0,0.006667,0.066723,6.333333,0.066611,17,2,0)
  488.  (E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,0,1,1,0.066667,0.066667,6,6,0,0.066
  489.   667,6))>
  490.  
  491. <p1para,
  492.     Font =            F3,
  493.     Allow Page Break After = yes>
  494.  
  495. <F7>Introduction<Tab><F8>1.1<F0><#04>This manual assumes a basic 
  496. understanding of window systems and the Common Lisp programming language. 
  497. To provide an introduction to the Common Lisp X Interface (CLX) programming, 
  498. this section discusses the following:<#04>
  499.  
  500. <bullet>
  501.  
  502. <F9>w<Tab><F0>Overview of the X Window System 
  503.  
  504. <F9>w<Tab><F0>Naming and argument conventions 
  505.  
  506. <F9>w<Tab><F0>Programming considerations 
  507.  
  508. <p1rule>
  509.  
  510. <Index, "X Window System", Sort String = "x window system", "overview", To Named = p1rule>
  511. <Frame,
  512.     Name =            p1rule,
  513.     Placement =        At Anchor,
  514.     Width =            6.35 inches,
  515.     Height =        0.153 inches,
  516.     Vertical Alignment =    0.007 inches,
  517.     Shared Contents =    yes>
  518.  
  519. <p1stacked,
  520.     Font =            F3,
  521.     Left Tab =        -1.70/0 inches>
  522.  
  523. <F7>The X Window<Tab><F8>1.2<F0><#04>The X Window System was developed 
  524. at the Massachusetts Institute of
  525.  
  526. <p1para,
  527.     Font =            F3,
  528.     Allow Page Break After = yes>
  529.  
  530. <F7>System<Tab><F0>Technology (MIT) and first released in 1985. 
  531. Since then, the X Window System has become an industry<#1e>standard 
  532. product available on virtually every type of bit<#1e>mapped workstation. 
  533. The current version of X, Version 11, has been implemented for several 
  534. different computer architectures, for a wide variety of display hardware, 
  535. and also for many different operating systems. X Version 11 represents 
  536. the fulfillment of the original design goals proposed by MIT, as follows:<#04>
  537.  
  538. <bullet>
  539.  
  540. <F9>w<Tab><F0>Portable <#1f> Support virtually any bitmap display 
  541. and any interactive input device (including keyboards, mice, tablets, 
  542. joysticks, and touch screens). Make it easy to implement the window 
  543. system on different operating systems.
  544.  
  545. <F9>w<Tab><F0>Device<#1e>Independent Applications <#1f> Avoid rewriting, 
  546. recompiling, or even relinking in order to use different display/input 
  547. hardware. Make it easy for an application to work on both monochrome 
  548. and color hardware.
  549.  
  550. <F9>w<Tab><F0>Network Transparent <#1f> Let an application run on 
  551. one computer while using another computer's display, even if the other 
  552. computer has a different operating system or hardware architecture.
  553.  
  554. <F9>w<Tab><F0>Multitasking <#1f> Support multiple applications being 
  555. displayed simultaneously.
  556.  
  557. <F9>w<Tab><F0>No User Interface Policy <#1f> Since no one agrees 
  558. on what constitutes the best user interface, make it possible for 
  559. a broad range of user interface styles (or policies) to be implemented, 
  560. external to the window system and to the application programs.
  561.  
  562. <F9>w<Tab><F0>Cheap Windows <#1f> Windows should be abundant, and 
  563. ubiquitous. Provide overlapping windows and a simple mechanism for 
  564. window hierarchy.
  565.  
  566. <F9>w<Tab><F0>High<#1e>Performance Graphics <#1f> Provide powerful 
  567. interfaces for synthesizing 2<#1e>D images (geometric primitives, 
  568. high<#1e>quality text with multiple typefaces, and scanned images).
  569.  
  570. <F9>w<Tab><F0>Extensible <#1f> Include a mechanism for adding new 
  571. capabilities. Allow separate sites to develop independent extensions 
  572. without becoming incompatible with remote applications.
  573.  
  574. <para>
  575.  
  576. <|,"1<#1e>2"><Index, "client">Some of these goals lead directly to the 
  577. basic X architecture <#1f> the client<#1e>server model. The basic 
  578. window system is implemented by the X <F2>server<F0> program. An 
  579. application program (the <F2>client<F0>) sends window system <F2>requests
  580. <F0> to the X server through a reliable two<#1e>way byte<#1e>stream. 
  581.  
  582. In general, the server and the client can be executing on separate 
  583. host computers, in which case the byte<#1e>stream is implemented via 
  584. some network protocol (TCP, DECnet<F10>]<F0>, Chaosnet, and so forth). 
  585. The X server, which is connected to several client programs running 
  586. concurrently, executes client requests in round<#1e>robin fashion. 
  587. The server is responsible for drawing client graphics on the display 
  588. screen and for making sure that graphics output to a window stays 
  589. inside its boundary.
  590.  
  591. <Index, "reply"><Index, "event">The other primary job of the 
  592. X server is to channel input from the keyboard, pointer, and other 
  593. input devices back to the appropriate client programs. Input arrives 
  594. at the client asynchronously in the form of input <F2>events<F0> 
  595. representing up/down transitions of keys or pointer buttons, changes 
  596. in the pointer position, and so on. In some cases, a request generates 
  597. a return value (or <F2>reply<F0>) from the server, which is another 
  598. kind of client input. Replies and input events are received via the 
  599. same byte<#1e>stream connecting the client with the server.
  600.  
  601. <p2rule>
  602.  
  603. <Index, "display"><Index, "screen">
  604. <Frame,
  605.     Name =            p2rule,
  606.     Placement =        At Anchor,
  607.     Width =            4.75 inches,
  608.     Height =        0.15 inches,
  609.     Vertical Alignment =    0.007 inches,
  610.     Shared Contents =    yes>
  611.  
  612. <p2para,
  613.     Font =            F3>
  614.  
  615. <Tab><F8>Windows<Tab>1.2.1<F0><#04>The X Window System supports 
  616. one or more screens containing overlapping windows and subwindows. 
  617. A <F2>screen<F0> is a physical monitor and hardware, which can be 
  618. either color or black and white. There can be multiple screens per 
  619. display workstation. A single server can provide display services 
  620. for any number of screens. A set of screens for a single user with 
  621. one keyboard and one mouse is called a <F2>display<F0>.
  622.  
  623. <para>
  624.  
  625. <Index, "root">All windows in an X server are arranged in a strict 
  626. hierarchy. At the top of the hierarchy are the <F2>root windows<F0>, 
  627. which cover each of the display screens. Each root window is either 
  628. partially or completely covered by child windows. All windows, except 
  629. for root windows, have parents. Any window can in turn have its own 
  630. children. In this way, an application program can create a window 
  631. tree of arbitrary depth on each screen.
  632.  
  633. <Index, "window", "obscure"><Index, "obscuring window">A child window can be larger 
  634. than its parent. That is, part or all of the child window can extend 
  635. beyond the boundaries of the parent. However, all output to a window 
  636. is clipped by the boundaries of its parent window. If several children 
  637. of a window have overlapping locations, one of the children is considered 
  638. to be on top of/or raised over the others, <F2>obscuring<F0> them. 
  639. Window output to areas that are covered by other windows is suppressed. 
  640.  
  641. A window has a border that is zero or more pixels in width and can 
  642. be any pattern (pixmap) or solid color. A window usually has a background 
  643. pattern that is drawn by the X server. Each window has its own coordinate 
  644. system. Child windows obscure their parents unless the child windows 
  645. have no background. Graphics operations in the parent window are usually 
  646. clipped by the children.
  647.  
  648. <Index, "drawable"><Index, "tile"><Index, "bitmap"><Index, "pixmap">
  649. X also provides objects called <F2>pixmaps<F0> for off<#1e>screen 
  650. storage of graphics. Single<#1e>plane pixmaps (that is, of depth 1) 
  651. are sometimes referred to as <F2>bitmaps<F0>. Both pixmaps and windows 
  652. can be used interchangeably in most graphics functions. Pixmaps are 
  653. also used in various graphics operations to define patterns, or <F2>tiles
  654. <F0>. Windows and pixmaps together are referred to as <F2>drawables<F0>.
  655.  
  656. <p2rule>
  657.  
  658. <Index, "input", "event"><Index, "event", "input">
  659. <Frame,
  660.     Name =            p2rule,
  661.     Placement =        At Anchor,
  662.     Width =            4.75 inches,
  663.     Height =        0.15 inches,
  664.     Vertical Alignment =    0.007 inches,
  665.     Shared Contents =    yes>
  666.  
  667. <p2para,
  668.     Font =            F3>
  669.  
  670. <Tab><F8>Input Events<Tab>1.2.2<F0><#04>The X input mechanism is 
  671. conceptually simple yet quite powerful. Most events are attached to 
  672. a particular window (that is, contain an identifier for the window 
  673. receiving the event). A client program can receive multiple window 
  674. input streams, all multiplexed over the single byte<#1e>stream connection 
  675. to the server.
  676.  
  677. <para>
  678.  
  679. <|,"1<#1e>3">Clients can tailor their input by expressing interest in only 
  680. certain event types. The server uses special event types to send important 
  681. messages to the client. For example, the client can elect to receive 
  682. an <F8>:enter<#1e>notify<F0> event when the pointer cursor moves 
  683. into a certain window. Another vital message from the server is an <F8>:exposu
  684. re<F0> event. This is a signal to the client indicating that at least 
  685. some portion of the window has suddenly become visible (perhaps the 
  686. user moved another window which had been overlapping it). The client 
  687. is then responsible for doing what is necessary to redisplay the window's 
  688. image. Client programs must be prepared to regenerate the contents 
  689. of windows in this way on demand.
  690.  
  691. Input is also subject to policy decisions about which client window 
  692. receives keyboard and pointer events. Since the pointer is free to 
  693. roam between windows, just clicking on a window is often enough to 
  694. send a pointer event to that window. Keyboard events, however, must 
  695. go to a keyboard focus window which has to be designated in some other 
  696. way. Usually, the arbiter of such input management policy is a program 
  697. called the <F2>window manager<F0>. The window manager gives the 
  698. human user a way to make a window the keyboard focus, to manage the 
  699. layout of windows on the screen, to represent windows with icons, 
  700. and so forth. In fact, the window manager client determines most of 
  701. the so<#1e>called look and feel of the X Window System.
  702.  
  703. <p1rule>
  704.  
  705. <Index, "examples", "CLX", Sort String = clx, See = "CLX examples"><Index, "CLX", Sort String = clx, "examples", To Named = p1rule>
  706. <Frame,
  707.     Name =            p1rule,
  708.     Placement =        At Anchor,
  709.     Width =            6.35 inches,
  710.     Height =        0.153 inches,
  711.     Vertical Alignment =    0.007 inches,
  712.     Shared Contents =    yes>
  713.  
  714. <p1stacked,
  715.     Font =            F3,
  716.     Left Tab =        -1.70/0 inches>
  717.  
  718. <F7>A Quick Tour<Tab><F8>1.3<F0><#04>The X Window System is defined 
  719. by the X Window System Protocol<FJ>
  720.  
  721. <p1para,
  722.     Font =            F3,
  723.     Allow Page Break After = yes>
  724.  
  725. <F7>of CLX<Tab><F0>Specification, a detailed description of the 
  726. encoding and the meaning of requests and events sent between a client 
  727. and a server. This standard protocol does not depend on any particular 
  728. programming language. As a result, each programming language must 
  729. define its own functional interface for using the X protocol. The 
  730. standard X interface used by Common Lisp programmers is called CLX. 
  731. CLX is a set of data types, functions, and macros which allow a Common 
  732. Lisp client program to interact with an X server to send requests 
  733. and to receive input events and replies.<F8><#04>
  734.  
  735. <para>
  736.  
  737. For the most part, CLX functions are closely tied to the underlying 
  738. requests in the X protocol. Many CLX functions simply add requests 
  739. to an output buffer. These requests later execute asynchronously on 
  740. the X display server. However, some functions of CLX lie outside the 
  741. scope of the protocol<#1f>for example, reading events and managing 
  742. a client<#1e>side event queue. CLX is also responsible for important 
  743. batching and caching tasks that minimize network communication.
  744.  
  745. The following paragraphs show an example of a CLX client program. 
  746. All CLX functions and macros are shown in upper case. Note that some 
  747. of the terms used are unique to X, while other terms that are common 
  748. to other window systems have different meanings in X. It may be helpful 
  749. to refer to the glossary when you are uncertain of a term's meaning 
  750. in the context of the X Window System.
  751.  
  752. <p2rule>
  753.  
  754. <Frame,
  755.     Name =            p2rule,
  756.     Placement =        At Anchor,
  757.     Width =            4.75 inches,
  758.     Height =        0.15 inches,
  759.     Vertical Alignment =    0.007 inches,
  760.     Shared Contents =    yes>
  761.  
  762. <p2para,
  763.     Font =            F3>
  764.  
  765. <Tab><Index, "CLX", Sort String = clx, "examples", "definition of menu structure"><F8>A Simple Menu<Tab>1.3.1<F0><#04>The 
  766. example client program creates and displays a simple pop<#1e>up menu 
  767. consisting of a column of strings<#1f>a title string followed by selectable 
  768. menu item strings. The implementation uses one window to represent 
  769. the entire menu, plus a set of subwindows, one for each menu item. 
  770. Here is the definition of a structure which represents such a menu.
  771.  
  772. <lisp,
  773.     Left Tab =        0/0.15/0.40/0.20*24/6/7/8 inches>
  774.  
  775. <|,"1<#1e>4">(defstruct (menu)<HR>
  776. <Tab><#7f>A simple menu of text strings."<HR>
  777. <Tab>(title <#7f>Choose an item:")<HR>
  778. <Tab>item-alist              ;((item-window item-string))<HR>
  779. <Tab>window<HR>
  780. <Tab>gcontext<HR>
  781. <Tab>width<HR>
  782. <Tab>title-width<HR>
  783. <Tab>item-width<HR>
  784. <Tab>item-height<HR>
  785. <Tab>(geometry-changed-p t)) ;nil if unchanged since displayed 
  786.  
  787. <para>
  788.  
  789. The <F6>window<F0> slot will contain the <F8>window<F0> object 
  790. that represents the menu. The <F6>item<#1e>alist<F0> represents 
  791. the relationship between the menu items and their associated subwindows. 
  792. Each entry in <F6>item<#1e>alist<F0> is a list whose first element 
  793. is a (sub)window object and whose second element is the corresponding 
  794. item string. A <F8>window<F0> object is an instance of a CLX<#1e>defined 
  795. data type which represents X windows. A <F8>window<F0> object actually 
  796. carries two pieces of information: an X window ID integer and a <F8>display
  797. <F0> object. A <F8>display<F0> is another CLX<#1e>defined data 
  798. type that represents a connection to a specific X display server. 
  799. The <F6>gcontext<F0> slot contains an instance of a CLX data type 
  800. known as a <F2>graphics context<F0>. A graphics context is a set 
  801. of display attribute values, such as foreground color, fill style, 
  802. line style, text font, and so forth. Each X graphics request (and 
  803. hence each CLX graphics function call) must supply a graphics context 
  804. to use in displaying the request. The menu's <F6>gcontext<F0> will 
  805. thus hold all of the attribute values used during menu display.
  806.  
  807. <para,
  808.     New Page =        yes>
  809.  
  810. <|,"1<#1e>5"><Index, "CLX", Sort String = clx, "examples", "creating menu window">The first thing to do is make an instance 
  811. of a <F6>menu<F0> object:
  812.  
  813. <lisp,
  814.     Left Margin =        0.50 inches,
  815.     Left Tab =        0/0.15/0.28/0.60/0.20*6/2.08/2.40/0.20*14/6/7/8 inches>
  816.  
  817. (defun create-menu (parent-window text-color background-color<HR>
  818. <#04>text-font)<HR>
  819. <Tab>(make-menu<HR>
  820. <Tab><Tab>;; Create menu graphics context<HR>
  821. <Index, Doc = operations, "xlib:create<#1e>gcontext", Sort String = "create<#1e>gcontext", "example"><Tab><Tab>:gcontext (CREATE-GCONTEXT :drawable   
  822. parent-window<HR>
  823. <Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab>:foreground text-color<HR>
  824. <Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab>:background background-color<HR>
  825. <Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab>:font       text-font)<HR>
  826. <HR>
  827. <Tab><Tab>;; Create menu window<HR>
  828. <Index, Doc = operations, "xlib:create<#1e>window", Sort String = "create<#1e>window", "example"><Tab><Tab>:window   (CREATE-WINDOW<HR>
  829. <Tab><Tab><Tab><Tab><Tab>:parent       parent-window<HR>
  830. <Tab><Tab><Tab><Tab><Tab>:class        :input-output<HR>
  831. <Tab><Tab><Tab><Tab><Tab>:x            0                 ;temporary 
  832. value<HR>
  833. <Tab><Tab><Tab><Tab><Tab>:y            0                 ;temporary 
  834. value<HR>
  835. <Tab><Tab><Tab><Tab><Tab>:width        16                ;temporary 
  836. value<HR>
  837. <Tab><Tab><Tab><Tab><Tab>:height       16                ;temporary 
  838. value  <HR>
  839. <Tab><Tab><Tab><Tab><Tab>:border-width 2<HR>
  840. <Tab><Tab><Tab><Tab><Tab>:border       text-color<HR>
  841. <Tab><Tab><Tab><Tab><Tab>:background   background-color<HR>
  842. <Tab><Tab><Tab><Tab><Tab>:save-under   :on<HR>
  843. <Tab><Tab><Tab><Tab><Tab>:override-redirect :on          ;override 
  844. window mgr when positioning<HR>
  845. <Index, Doc = operations, "xlib:make<#1e>event<#1e>mask", Sort String = "make<#1e>event<#1e>mask", "example"><Tab><Tab><Tab><Tab><Tab>:event-mask   (MAKE-EVENT-MASK 
  846. :leave-window  <HR>
  847. <HR>
  848. <Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab> 
  849. :exposure))))
  850.  
  851. <para>
  852.  
  853. <F8>create<#1e>window<F0> is one of the most important CLX functions, 
  854. since it creates and returns a <F8>window<F0> object. Several of 
  855. its options are shown here. The default window class is <F8>:input<#1e>output
  856. <F0>, but X provides for <F8>:input<#1e>only<F0> windows, too. 
  857. Every window must have a parent window, except for a system<#1e>defined <F2>ro
  858. ot window<F0>, which represents an entire display screen. The <F8>:event<#1e>
  859. mask<F0> keyword value, a CLX <F8>event<#1e>mask<F0> data type, 
  860. says that an input event will be received for the menu window when 
  861. the window is exposed and also when the pointer cursor leaves the 
  862. window. The window border is a pattern<#1e>filled or (as in this case) 
  863. a solid<#1e>colored boundary which is maintained automatically by 
  864. the X server; a client cannot draw in a window's border, since all 
  865. graphics requests are relative to the origin (upper<#1e>left corner) 
  866. of the window's interior and are clipped by the server to this inside 
  867. region. Turning on the <F8>:save<#1e>under<F0> option is a hint 
  868. to the X server that, when this window is made visible, it may be 
  869. more efficient to save the pixels it obscures, rather than require 
  870. several client programs to refresh their windows when the pop<#1e>up 
  871. menu disappears. This is a way to work around X's client<#1e>managed 
  872. refresh policy when only a small amount of screen space is needed 
  873. temporarily. 
  874.  
  875. Why is <F8>:override<#1e>redirect<F0> turned on for the menu window? 
  876. This is actually a little unusual, because it prevents any window 
  877. manager client from <F2>redirecting<F0> the position of the menu 
  878. when it is popped up. Remember that the window manager represents 
  879. the user's policy for controlling the positions of his windows, so 
  880. this kind of redirection is ordinarily correct. However, in this case, 
  881. as a favor to the user, the menu avoids redirection in order to pop 
  882. up the menu at a very specific location; that is, under the pointer 
  883. cursor.
  884.  
  885. <Index, "CLX", Sort String = clx, "examples", "creating subwindows", To Next>What about the item subwindows? The <F6>menu<#1e>set<#1e>i
  886. tem<#1e>list<F0> function in the following example creates them whenever 
  887. the menu's item list is changed. The upper<#1e>left x and y coordinates 
  888. and the width and height are not important yet, because they are computed 
  889. just before the menu is displayed. This function also calls <F8>create<#1e>win
  890. dow<F0>, demonstrating the equal treatment of parent and children 
  891. windows in the X window hierarchy.
  892.  
  893. <lisp,
  894.     Left Margin =        1 inches,
  895.     Left Tab =        0/0.15/0.40/0.53/1/0.20*21/6/7/8 inches>
  896.  
  897. <|,"1<#1e>6">(defun menu-set-item-list (menu &rest item-strings)<HR>
  898. <Tab>;; Assume the new items will change the menu's width and height<HR>
  899. <Tab>(setf (menu-geometry-changed-p menu) t)<HR>
  900. <HR>
  901. <Tab>;; Destroy any existing item windows<HR>
  902. <Tab>(dolist (item (menu-item-alist menu))<HR>
  903. <Index, Doc = operations, "xlib:destroy<#1e>window", Sort String = "destroy<#1e>window", "example"><Tab>  (DESTROY-WINDOW (first item)))<HR>
  904. <HR>
  905. <Tab>;; Add (item-window item-string) elements to item-alist<HR>
  906. <Tab>(setf (menu-item-alist menu)<HR>
  907. <Tab><Tab><Tab>(let (alist)<HR>
  908. <Tab><Tab><Tab>  (dolist (item item-strings (nreverse alist))<HR>
  909. <Index, Doc = operations, "xlib:create<#1e>window", Sort String = "create<#1e>window", "example"><Tab><Tab><Tab>    (push (list (CREATE-WINDOW<HR>
  910. <Tab><Tab><Tab><Tab><Tab><Tab><Tab>  :parent     (menu-window menu)<HR>
  911. <Tab><Tab><Tab><Tab><Tab><Tab><Tab>  :x          0         ;temporary 
  912. value<HR>
  913. <Tab><Tab><Tab><Tab><Tab><Tab><Tab>  :y          0         ;temporary 
  914. value<HR>
  915. <Tab><Tab><Tab><Tab><Tab><Tab><Tab>  :width      16        ;temporary 
  916. value<HR>
  917. <Tab><Tab><Tab><Tab><Tab><Tab><Tab>  :height     16        ;temporary 
  918. value<HR>
  919. <Index, Doc = operations, "xlib:gcontext<#1e>background", Sort String = "gcontext<#1e>background", "example"><Tab><Tab><Tab><Tab><Tab><Tab><Tab>  :background 
  920. (GCONTEXT-BACKGROUND (menu-gcontext menu))<HR>
  921. <Index, Doc = operations, "xlib:make<#1e>event<#1e>mask", Sort String = "make<#1e>event<#1e>mask", "example"><Tab><Tab><Tab><Tab><Tab><Tab><Tab>  :event-mask 
  922. (MAKE-EVENT-MASK :enter-window<HR>
  923. <Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab>    
  924. :leave-window<HR>
  925. <Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab>    
  926. :button-press<HR>
  927. <Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab>    
  928. :button-release))<HR>
  929. <Tab><Tab><Tab><Tab><Tab><Tab><Tab>item)<HR>
  930. <Tab><Tab> <Tab><Tab><Tab>alist)))))
  931.  
  932. <p2rule>
  933.  
  934. <Frame,
  935.     Name =            p2rule,
  936.     Placement =        At Anchor,
  937.     Width =            4.75 inches,
  938.     Height =        0.15 inches,
  939.     Vertical Alignment =    0.007 inches,
  940.     Shared Contents =    yes>
  941.  
  942. <p2stacked,
  943.     Font =            F3>
  944.  
  945. <Tab><Index, "CLX", Sort String = clx, "examples", "calculating menu size", To Next><F8>Displaying<Tab>1.3.2<F0><#04>The <F6>menu<#1e>r
  946. ecompute<#1e>geometry<F0> function (shown in the following<F8><FJ>
  947.  
  948. <p2para,
  949.     Font =            F3>
  950.  
  951. <Tab><F8>the Menu<Tab><F0>example) handles the job of calculating 
  952. the size of the menu, based on its current item list and its current 
  953. text font. CLX provides a way to inquire the geometrical properties 
  954. of a font object (for example, its ascent and descent from the baseline) 
  955. and also a <F8>text<#1e>extents<F0> function. <F8>text<#1e>extents<F0> 
  956. returns the geometry of a given string as displayed in a given font. 
  957. Notice the use of the <F8>with<#1e>state<F0> macro when setting 
  958. a window's geometry attributes. CLX strives to preserve the familiar <F8>setf
  959. <F0> style of accessing individual window attributes, even though 
  960. an attribute access actually involves sending a request to a (possibly 
  961. remote) server and/or waiting for a reply. <F8>with<#1e>state<F0> 
  962. tells CLX to batch together all read and write accesses to a given 
  963. window, using a local cache to minimize the number of server requests. 
  964. This CLX feature can result in a dramatic improvement in client performance 
  965. without burdening the programmer interface.<F8><#04>
  966.  
  967. <para>
  968.  
  969. <F6>menu<#1e>recompute<#1e>geometry<F0> causes all the item subwindows 
  970. to become <F2>mapped<F0>. Mapping a window means attempting to make 
  971. it visible on the screen. However, a subwindow will not actually be <F2>visibl
  972. e<F0> until it and all of its ancestors are mapped. Even then, another 
  973. window might be covering up the subwindow.
  974.  
  975. <lisp,
  976.     Left Margin =        0.50 inches,
  977.     Left Tab =        0/0.15/0.40/0.20*24/6/7/8 inches>
  978.  
  979. <|,"1<#1e>7"><Index, Doc = operations, "xlib:gcontext<#1e>font", Sort String = "gcontext<#1e>font", "example"><Index, Doc = operations, "xlib:text<#1e>extents", Sort String = "text<#1e>extents", "example"><Index, Doc = operations, "xlib:font<#1e>ascent", Sort String = "font<#1e>ascent", "example"><Index, Doc = operations, "xlib:font<#1e>descent", Sort String = "font<#1e>descent", "example"><Index, Doc = operations, "xlib:with<#1e>state", Sort String = "with<#1e>state", "example"><Index, Doc = operations, "xlib:drawable<#1e>width", Sort String = "drawable<#1e>width", "example"><Index, Doc = operations, "xlib:drawable<#1e>height", Sort String = "drawable<#1e>height", "example"><Index, Doc = operations, "xlib:drawable<#1e>x", Sort String = "drawable<#1e>x", "example"><Index, Doc = operations, "xlib:drawable<#1e>y", Sort String = "drawable<#1e>y", "example"><Index, Doc = operations, "xlib:map<#1e>subwindows", Sort String = "map<#1e>subwindows", "example">
  980. (defun menu-recompute-geometry (menu)<HR>
  981.   (when (menu-geometry-changed-p menu)<HR>
  982.     (let* ((menu-font   (GCONTEXT-FONT (menu-gcontext menu)))<HR>
  983.           (title-width (TEXT-EXTENTS menu-font (menu-title menu)))<HR>
  984.           (item-height (+ (FONT-ASCENT menu-font)<HR>
  985.                           (FONT-DESCENT menu-font)<HR>
  986.                           *menu-item-margin*))<HR>
  987.           (item-width  0)<HR>
  988.           (items       (menu-item-alist menu))<HR>
  989.           menu-width)<HR>
  990. <HR>
  991.      ;; Find max item string width<HR>
  992.      (setf item-width<HR>
  993.            (+ *menu-item-margin*<HR>
  994.               (dolist (next-item items item-width)<HR>
  995.                 (setf item-width (max item-width <HR>
  996.                                       (TEXT-EXTENTS menu-font (second 
  997. next-item)))))))<HR>
  998. <HR>
  999.      ;; Compute final menu width, taking margins into account<HR>
  1000.      (setf menu-width (max title-width (+ item-width *menu-item-margin*)))<HR>
  1001.      (let ((window  (menu-window menu)))<HR>
  1002.  <HR>
  1003. <Tab>   ;; Update width and height of menu window <HR>
  1004.      (WITH-STATE (window)<HR>
  1005.        (setf (DRAWABLE-WIDTH  window) menu-width<HR>
  1006.              (DRAWABLE-HEIGHT window) (* (1+ (length items)) item-height)))<HR>
  1007. <HR>
  1008. <Tab>   ;; Update width, height, position of item windows<HR>
  1009. <Tab>   (let ((item-left     (round (- menu-width item-width) 2))<HR>
  1010.            (next-item-top (- item-height (round *menu-item-margin* 
  1011. 2))))<HR>
  1012.        (dolist (next-item items)<HR>
  1013.          (let ((window (first next-item)))<HR>
  1014.            (WITH-STATE (window)<HR>
  1015.              (setf (DRAWABLE-HEIGHT window) item-height<HR>
  1016.                    (DRAWABLE-WIDTH  window) item-width<HR>
  1017.                    (DRAWABLE-X      window) item-left<HR>
  1018.                    (DRAWABLE-Y      window) next-item-top)))<HR>
  1019.          (incf next-item-top item-height))))<HR>
  1020. <HR>
  1021.      ;; Map all item windows<HR>
  1022.      (MAP-SUBWINDOWS (menu-window menu))<HR>
  1023. <HR>
  1024.      ;; Save item geometry<HR>
  1025.      (setf (menu-item-width menu)         item-width<HR>
  1026.            (menu-item-height menu)        item-height<HR>
  1027.            (menu-width menu)              menu-width<HR>
  1028.            (menu-title-width menu)        title-width<HR>
  1029.            (menu-geometry-changed-p menu) nil))))
  1030.  
  1031. <para>
  1032.  
  1033. Of course, the sample client must know how to draw/redraw the menu 
  1034. and its items, so the function <F6>menu<#1e>refresh<F0> is defined 
  1035. next to handle that task (shown in the following example). Note that 
  1036. the location of window output is given relative to the window origin. 
  1037. Windows and subwindows have different coordinate systems. The location 
  1038. of the origin (upper<#1e>left corner) of a subwindow's coordinate 
  1039. system is given with respect to its parent window's coordinate system. 
  1040. Negative coordinates are valid, although only output to the +x/+y 
  1041. quadrant of a window's coordinate system will ever be visible.<Index, "CLX", Sort String = clx, "examples", "drawing/redrawing menus", To Next>
  1042.  
  1043. <lisp>
  1044.  
  1045. <|,"1<#1e>8"><Index, Doc = operations, "xlib:font<#1e>ascent", Sort String = "font<#1e>ascent", "example"><Index, Doc = operations, "xlib:gcontext<#1e>font", Sort String = "gcontext<#1e>font", "example"><Index, Doc = operations, "xlib:gcontext<#1e>background", Sort String = "gcontext<#1e>background", "example"><Index, Doc = operations, "xlib:gcontext<#1e>foreground", Sort String = "gcontext<#1e>foreground", "example"><Index, Doc = operations, "xlib:with<#1e>gcontext", Sort String = "with<#1e>gcontext", "example"><Index, Doc = operations, "xlib:draw<#1e>image<#1e>glyphs", Sort String = "draw<#1e>image<#1e>glyphs", "example">
  1046. (defun menu-refresh (menu)<HR>
  1047.  (let* ((gcontext   (menu-gcontext menu))<HR>
  1048.         (baseline-y (FONT-ASCENT (GCONTEXT-FONT gcontext))))<HR>
  1049.    ;; Show title centered in <#7f>reverse-video"<HR>
  1050.    (let ((fg (GCONTEXT-BACKGROUND gcontext))<HR>
  1051.          (bg (GCONTEXT-FOREGROUND gcontext)))<HR>
  1052.      (WITH-GCONTEXT (gcontext :foreground fg :background bg)<HR>
  1053.        (DRAW-IMAGE-GLYPHS<HR>
  1054.          (menu-window menu)<HR>
  1055.          gcontext<HR>
  1056.          (round (- (menu-width menu)<HR>
  1057.                    (menu-title-width menu)) 2)  ;start x<HR>
  1058.          baseline-y                             ;start y<HR>
  1059.          (menu-title menu))))<HR>
  1060. <HR>
  1061.    ;; Show each menu item (position is relative to item window)<HR>
  1062.    (let ((box-margin (round *menu-item-margin*  2)))<HR>
  1063.      (dolist (item (menu-item-alist menu))<HR>
  1064.        (DRAW-IMAGE-GLYPHS<HR>
  1065.          (first item) gcontext<HR>
  1066.          box-margin                             ;start x<HR>
  1067.          (+ baseline-y box-margin)              ;start y<HR>
  1068.          (second item))))))
  1069.  
  1070. <para>
  1071.  
  1072. <F8>with<#1e>gcontext<F0> is a CLX macro that allows you temporarily 
  1073. to modify a graphics context within the dynamic scope of the macro 
  1074. body. <F8>draw<#1e>image<#1e>glyphs<F0> is a CLX text drawing function 
  1075. which produces a terminal<#1e>like rendering: foreground character 
  1076. on a background block. (More sophisticated text rendering functions 
  1077. are also available.) The strange use of <F2>glyphs<F0> instead of <F2>string
  1078. <F0> here actually highlights an important fact: X and Common Lisp 
  1079. have totally different concepts of a character. A Common Lisp character 
  1080. is an object whose implementation can comprehend a vast universe of 
  1081. text complexities (typefaces, type styles, international character 
  1082. sets, symbols, and so forth). However, to X, a string is just a sequence 
  1083. of integer indexes into the array of bitmaps represented by a CLX 
  1084. font object. In general, <F8>draw<#1e>image<#1e>glyphs<F0>, <F8>text<#1e>ext
  1085. ents<F0>, and other CLX text functions accept a <F8>:translate<F0> 
  1086. keyword argument. Its value is a function which translates the characters 
  1087. of a string argument into the appropriate font<#1e>and<#1e>index pairs 
  1088. needed by CLX. This example relies upon the default translation function, 
  1089. which simply uses <F8>char<#1e>code<F0> to compute an index into 
  1090. the current font.
  1091.  
  1092. <p2rule>
  1093.  
  1094. <Frame,
  1095.     Name =            p2rule,
  1096.     Placement =        At Anchor,
  1097.     Width =            4.75 inches,
  1098.     Height =        0.15 inches,
  1099.     Vertical Alignment =    0.007 inches,
  1100.     Shared Contents =    yes>
  1101.  
  1102. <p2para,
  1103.     Font =            F3>
  1104.  
  1105. <Tab><Index, "CLX", Sort String = clx, "examples", "menu processing of user input", To Next><F8>Menu Input<Tab>1.3.3<F0><#04>Now that 
  1106. a menu can be displayed, the sample client program must define how 
  1107. the menu will process user input. The <F6>menu<#1e>choose<F0> function 
  1108. (shown in the following example) has the classic structure of an X 
  1109. client program. First, do some initialization (for example, present 
  1110. the menu at a given location). Then, enter an input event loop. Read 
  1111. an input event, process it, and repeat the loop until a termination 
  1112. event is received. The <F8>event<#1e>case<F0> macro continues reading 
  1113. an event from the menu window's display object until one of its clauses 
  1114. returns non<#1e><F8>nil<F0>. These clauses specify the action to 
  1115. be taken for each event type and also bind values from the event report 
  1116. to local variables, such as the <F8>event<#1e>window<F0> receiving 
  1117. the event. Notice that the <F8>:force<#1e>output<#1e>p<F0> option 
  1118. is enabled, causing <F8>event<#1e>case<F0> to begin by sending any 
  1119. client requests which CLX has not yet output to the server. To improve 
  1120. performance, CLX quietly queues up requests and periodically sends 
  1121. them off in a batch. However, in an interactive feedback loop such 
  1122. as this, it is important to keep the display crisply up<#1e>to<#1e>date.
  1123.  
  1124. <lisp,
  1125.     Left Margin =        1.25 inches>
  1126.  
  1127. <|,"1<#1e>9"><Index, Doc = operations, "xlib:event<#1e>case", Sort String = "event<#1e>case", "example"><Index, Doc = operations, "xlib:drawable<#1e>display", Sort String = "drawable<#1e>display", "example"><F8><Index, "event", ":exposure", Sort String = exposure, "example"><Index, ":exposure event", Sort String = "exposure event", "example"><Index, ":button<#1e>release event", Sort String = "button<#1e>release event", "example"><Index, "event", ":button<#1e>release", Sort String = "button<#1e>release", "example"><Index, ":enter<#1e>notify event", Sort String = "enter<#1e>notify event", "example"><Index, "event", ":enter<#1e>notify", Sort String = "enter<#1e>notify", "example"><Index, ":leave<#1e>notify event", Sort String = "leave<#1e>notify event", "example"><Index, "event", ":leave<#1e>notify", Sort String = "leave<#1e>notify", "example"><Index, Doc = operations, "xlib:unmap<#1e>window", Sort String = "unmap<#1e>window", "example">
  1128. <F0>(defun menu-choose (menu x y)<HR>
  1129.   ;; Display the menu so that first item is at x,y.<HR>
  1130.   (menu-present menu x y)<HR>
  1131. <HR>
  1132.    (let ((items (menu-item-alist menu))<HR>
  1133.          (mw    (menu-window menu))<HR>
  1134.          selected-item)<HR>
  1135.    <HR>
  1136.     ;; Event processing loop<HR>
  1137.     (do () (selected-item)<HR>
  1138.       (EVENT-CASE ((DRAWABLE-DISPLAY mw) :force-output-p t)<HR>
  1139.         (:exposure<HR>
  1140.           (count)<HR>
  1141.           ;; Discard all but final :exposure then display the menu<HR>
  1142.           (when (zerop count) (menu-refresh menu))<HR>
  1143.           t)<HR>
  1144. <HR>
  1145.         (:button-release<HR>
  1146.           (event-window)<HR>
  1147.           ;;Select an item<HR>
  1148.           (setf selected-item (second (assoc event-window items)))<HR>
  1149.           t)<HR>
  1150. <HR>
  1151.         (:enter-notify<HR>
  1152.           (window)<HR>
  1153.           ;;Highlight an item<HR>
  1154.           (menu-highlight-item menu (find window items :key #'first))<HR>
  1155.           t)<HR>
  1156. <HR>
  1157.         (:leave-notify<HR>
  1158.           (window kind)<HR>
  1159.           (if (eql mw window)<HR>
  1160.               ;; Quit if pointer moved out of main menu window<HR>
  1161.               (setf selected-item (when (eq kind :ancestor) :none))<HR>
  1162.               ;; Otherwise, unhighlight the item window left<HR>
  1163.               (menu-unhighlight-item menu (find window items :key 
  1164. #'first)))<HR>
  1165.             t) <HR>
  1166. <HR>
  1167.           (otherwise<HR>
  1168.             ()<HR>
  1169.             ;;Ignore and discard any other event<HR>
  1170.             t)))<HR>
  1171. <HR>
  1172.         ;; Erase the menu<HR>
  1173.         (UNMAP-WINDOW mw)<HR>
  1174. <HR>
  1175.         ;; Return selected item string, if any<HR>
  1176.         (unless (eq selected-item :none) selected-item)))    
  1177.  
  1178. <para>
  1179.  
  1180. The event loop in <F6>menu<#1e>choose<F0> demonstrates an idiom 
  1181. used in all X programs: the contents of a window are displayed (in 
  1182. this case, by calling <F6>menu<#1e>refresh<F0>) only when an <F8>:exposure
  1183. <F0> event<F8> <F0>is received, signaling that the server has actually 
  1184. made the window <F2>viewable<F0>. The handling of <F8>:exposure<F0> 
  1185. in <F6>menu<#1e>choose<F0> also implements a little trick for improving 
  1186. efficiency. In general, when a window is exposed after being previously 
  1187. obscured (perhaps only partially), the server is free to send several <F8>:exp
  1188. osure<F0> events, one for each rectangular tile of the exposed region. 
  1189. For small windows like this menu, it is not worth the trouble to redraw 
  1190. the image one tile at a time. So the code above just ignores all but 
  1191. the last tile exposure and redraws everything in one call to <F6>menu<#1e>refr
  1192. esh<F0>.
  1193.  
  1194. <p2rule,
  1195.     New Page =        yes>
  1196.  
  1197. <|,"1<#1e>10">
  1198. <Frame,
  1199.     Name =            p2rule,
  1200.     Placement =        At Anchor,
  1201.     Width =            4.75 inches,
  1202.     Height =        0.15 inches,
  1203.     Vertical Alignment =    0.007 inches,
  1204.     Shared Contents =    yes>
  1205.  
  1206. <p2stacked,
  1207.     Font =            F3>
  1208.  
  1209. <Tab><Index, "CLX", Sort String = clx, "examples", "main client program"><F8>The Main<Tab>1.3.4<F0><#04>After all 
  1210. the preceding build<#1e>up and the other functions referenced<F8><FJ>
  1211.  
  1212. <p2para,
  1213.     Font =            F3>
  1214.  
  1215. <Tab><F8> Program<Tab><F0>(but not shown here) have been implemented, 
  1216. the code for the main client program is very small.
  1217.  
  1218. <lisp,
  1219.     Left Margin =        1.45 inches>
  1220.  
  1221. <Index, Doc = operations, "xlib:open<#1e>display", Sort String = "open<#1e>display", "example"><Index, Doc = operations, "xlib:display<#1e>roots", Sort String = "display<#1e>roots", "example"><Index, Doc = operations, "xlib:screen<#1e>black<#1e>pixel", Sort String = "screen<#1e>black<#1e>pixel", "example"><Index, Doc = operations, "xlib:screen<#1e>white<#1e>pixel", Sort String = "screen<#1e>white<#1e>pixel", "example"><Index, Doc = operations, "xlib:open<#1e>font", Sort String = "open<#1e>font", "example"><Index, Doc = operations, "xlib:screen<#1e>root", Sort String = "screen<#1e>root", "example"><Index, Doc = operations, "xlib:query<#1e>pointer", Sort String = "query<#1e>pointer", "example"><Index, Doc = operations, "xlib:close<#1e>display", Sort String = "close<#1e>display", "example">
  1222. (defun just-say-lisp (host &optional (font-name <#7f>fg-16"))<HR>
  1223.   (let* ((display   (OPEN-DISPLAY host))<HR>
  1224.          (screen    (first (DISPLAY-ROOTS display)))<HR>
  1225.          (fg-color  (SCREEN-BLACK-PIXEL screen))<HR>
  1226.          (bg-color  (SCREEN-WHITE-PIXEL screen))<HR>
  1227.          (nice-font (OPEN-FONT display font-name))<HR>
  1228. <HR>
  1229.          ;; Create a menu as a child of the root window.<HR>
  1230.          (a-menu    (create-menu (SCREEN-ROOT screen)<HR>
  1231.                                  fg-color bg-color nice-font)))<HR>
  1232. <HR>
  1233.     (setf (menu-title a-menu) <#7f>Please pick your favorite language:")<HR>
  1234.     (menu-set-item-list a-menu <#7f>Fortran" <#7f>APL" <#7f>Forth" 
  1235. <#7f>Lisp")<HR>
  1236. <HR>
  1237.     ;; Bedevil the user until he picks a nice programming language<HR>
  1238.     (unwind-protect<HR>
  1239.         (loop<HR>
  1240.           ;; Determine the current root window position of the pointer<HR>
  1241.           (multiple-value-bind (x y) (QUERY-POINTER (SCREEN-ROOT screen))<HR>
  1242. <HR>
  1243.            (let ((choice (menu-choose a-menu x y)))<HR>
  1244.              (when (string-equal <#7f>Lisp" choice)<HR>
  1245.                (return))))) <HR>
  1246. <HR>
  1247. <HR>
  1248.      (CLOSE-DISPLAY display))))
  1249.  
  1250. <para>
  1251.  
  1252. Note that the main program event loop lies in the body of an <F8>unwind<#1e>pr
  1253. otect<F0> form. This is a good programming technique because, without 
  1254. this protection, an unexpected error could cause the program to terminate 
  1255. without freeing the <F2>server resources<F0> it has created. Server 
  1256. resources are CLX objects which refer to objects actually stored on 
  1257. the X server. Examples of these are <F8>window<F0>,<F8> font<F0>,<F8> 
  1258. pixmap<F0>,<F8> cursor<F0>,<F8> colormap<F0>, and <F8>gcontext <F0>objec
  1259. ts. These server resources are created and destroyed by user requests. 
  1260. Server resources created by a client are also destroyed when its display 
  1261. connection is closed. If client resources are repeatedly created without 
  1262. being destroyed, then the server will eventually run out of memory 
  1263. and fail.
  1264.  
  1265. Most server resources are potentially sharable between applications. 
  1266. In fact, windows are manipulated explicitly by window manager programs. 
  1267. Fonts and cursors are typically shared automatically since the X server 
  1268. loads and unloads font storage as needed. <F8>gcontext<F0> objects 
  1269. are not ordinarily shared between client applications.
  1270.  
  1271. <p2rule>
  1272.  
  1273. <Frame,
  1274.     Name =            p2rule,
  1275.     Placement =        At Anchor,
  1276.     Width =            4.75 inches,
  1277.     Height =        0.15 inches,
  1278.     Vertical Alignment =    0.007 inches,
  1279.     Shared Contents =    yes>
  1280.  
  1281. <p2stacked,
  1282.     Font =            F3>
  1283.  
  1284. <Tab><F8>Debugging<Tab>1.3.5<F0><#04>Typically, most CLX programs 
  1285. do not need to control the buffering<F8><FJ>
  1286.  
  1287. <p2para,
  1288.     Font =            F3>
  1289.  
  1290. <Tab><F8>With CLX<Tab><F0>of output requests directly. However, 
  1291. CLX programmers need to be aware of the asynchronous nature of client<#1e>serve
  1292. r communication. It may be convenient to control the CLX output buffer 
  1293. more directly, especially during debugging.
  1294.  
  1295. <para>
  1296.  
  1297. A client that wants a request to execute immediately instead of asynchronously 
  1298. can follow it with a call to <F8>display<#1e>force<#1e>output<F0>. 
  1299. This function <F2>blocks<F0> (does not return) until all previously 
  1300. buffered output requests have been sent. Otherwise, the output buffer 
  1301. is always flushed by a call to any function which returns a value 
  1302. from the server or which waits for input (for example, <F8>get<#1e>property
  1303. <F0>). Certain output requests can cause input events to be sent. 
  1304. For example, <F8>map<#1e>window<F0> can cause <F8>:exposure<F0> 
  1305. events to be sent. Synchronizing output with the resulting input can 
  1306. be done with the <F8>display<#1e>finish<#1e>output<F0> function. 
  1307. This function blocks until all previously buffered output has been 
  1308. sent and all resulting input events have been received.
  1309.  
  1310. <|,"1<#1e>11">Functions that return information from the server block until 
  1311. an explicit reply is received or an error occurs. If a nonblocking 
  1312. call results in an error, the error is generally not reported until 
  1313. later. All errors (synchronous and asynchronous) are processed by 
  1314. calling an error handler defined for the display. If the handler is 
  1315. a sequence it is expected to contain handler functions specific to 
  1316. each error. The error code is used to index the sequence, fetching 
  1317. the appropriate handler. Any results returned by the handler are ignored 
  1318. since it is assumed that the handler either takes care of the error 
  1319. completely, or else signals.
  1320.  
  1321. <p1rule>
  1322.  
  1323. <Frame,
  1324.     Name =            p1rule,
  1325.     Placement =        At Anchor,
  1326.     Width =            6.35 inches,
  1327.     Height =        0.153 inches,
  1328.     Vertical Alignment =    0.007 inches,
  1329.     Shared Contents =    yes>
  1330.  
  1331. <p1stacked,
  1332.     Font =            F3,
  1333.     Left Tab =        -1.70/0 inches>
  1334.  
  1335. <F7>Naming and<Tab><F8>1.4<F0><#04>Throughout CLX, a number of 
  1336. conventions for naming and syntax of<FJ>
  1337.  
  1338. <p1stacked,
  1339.     Left Tab =        -1.60/0 inches>
  1340.  
  1341. <F7>Argument<F0><Tab><F3>the CLX functions have been followed. 
  1342. These conventions are intended to<FJ>
  1343.  
  1344. <p1para,
  1345.     Font =            F3,
  1346.     Allow Page Break After = yes>
  1347.  
  1348. <F7>Conventions<Tab><F0>make the syntax of the functions more predictable. 
  1349. <F8><#04>
  1350.  
  1351. <para>
  1352.  
  1353. The major naming conventions are as follows: 
  1354.  
  1355. <bullet>
  1356.  
  1357. <F9>w<Tab><F0>To better differentiate the CLX symbols from other 
  1358. symbols, they have all been placed in the package XLIB. External symbols 
  1359. have been explicitly exported. 
  1360.  
  1361. <F9>w<Tab><F0>The <F2>display<F0> argument, where used, is always 
  1362. first in the argument list. 
  1363.  
  1364. <F9>w<Tab><F0>All server resource objects, where used, occur at 
  1365. the beginning of the argument list, immediately after the display 
  1366. variable. 
  1367.  
  1368. <F9>w<Tab><F0>When a graphics context (<F2>gcontext<F0>) is present 
  1369. together with another type of server resource (most commonly, a <F2>drawable
  1370. <F0>), the graphics context occurs in the argument list after the 
  1371. other server resource. Drawables out rank all other server resources.
  1372.  
  1373. <F9>w<Tab><F0>Source arguments always precede the destination arguments 
  1374. in the argument list. 
  1375.  
  1376. <F9>w<Tab><F0>The <F2>x<F0> argument always precedes the <F2>y<F0> 
  1377. argument in the argument list. 
  1378.  
  1379. <F9>w<Tab><F0>The <F2>width<F0> argument always precedes the <F2>height
  1380. <F0> argument in the argument list. 
  1381.  
  1382. <bullet,
  1383.     Bottom Margin =        0.14 inches>
  1384.  
  1385. <F9>w<Tab><F0>Where the <F2>x<F0>, <F2>y<F0>, <F2>width<F0> 
  1386. and <F2>height<F0> arguments are used together, the <F2>x<F0> 
  1387. and <F2>y<F0> arguments always precede the <F2>width<F0> and <F2>height
  1388. <F0> arguments. 
  1389.  
  1390. <F9>w<Tab><F0>Where a <F2>mask<F0> is accompanied with a <F2>structure
  1391. <F0>, the mask always precedes the structure in the argument list. 
  1392.  
  1393. <p1rule>
  1394.  
  1395. <Frame,
  1396.     Name =            p1rule,
  1397.     Placement =        At Anchor,
  1398.     Width =            6.35 inches,
  1399.     Height =        0.153 inches,
  1400.     Vertical Alignment =    0.007 inches,
  1401.     Shared Contents =    yes>
  1402.  
  1403. <p1stacked,
  1404.     Font =            F3,
  1405.     Left Tab =        -1.70/0 inches>
  1406.  
  1407. <F7>Programming<Tab><F8>1.5<F0><#04>The major programming considerations 
  1408. are as follows: <F8><#04>
  1409.  
  1410. <p1para,
  1411.     Bottom Margin =        0 inches,
  1412.     Font =            F3,
  1413.     Allow Page Break After = yes>
  1414.  
  1415. <F7>Considerations<Tab>
  1416.  
  1417. <bullet,
  1418.     Bottom Margin =        0.14 inches>
  1419.  
  1420. <F9>w<Tab><F0>Keyboards are the greatest variable between different 
  1421. manufacturer's workstations. If you want your program to be portable, 
  1422. you should be particularly conservative here. 
  1423.  
  1424. <F9>w<Tab><F0>Many display systems have limited amounts of off<#1e>screen 
  1425. memory. If you can, you should minimize use of pixmaps and backing 
  1426. store. 
  1427.  
  1428. <F9>w<Tab><F0>The user should have control of his screen real<#1e>estate. 
  1429. Therefore, you should write your applications to react to window management, 
  1430. rather than presume control of the entire screen. What you do inside 
  1431. of your top level window, however, is up to your application. 
  1432.  
  1433. <|,"1<#1e>12"><F9>w<Tab><F0>Coordinates and sizes in X are actually 16<#1e>bit 
  1434. quantities. They usually are declared as an <F8>int16<F0> in the 
  1435. functions. Values larger than 16 bits can be truncated silently. Sizes 
  1436. (width and height) are unsigned quantities. 
  1437.  
  1438. <F9>w<Tab><F0>The types <F8>color<F0>, <F8>colormap<F0>, <F8>cursor
  1439. <F0>, <F8>display<F0>, <F8>font<F0>, <F8>gcontext<F0>, <F8>pixmap<F0>, 
  1440. <F8>screen<F0>, and <F8>window<F0> are defined solely by a functional 
  1441. interface. Even though they are treated like structures in this document, 
  1442. it is not specified whether they are implemented as structures or 
  1443. classes. Although some interfaces are described as functions, they 
  1444. are not required to be defined using <F8>defun.<F0> (It is a requirement 
  1445. that they be functions as opposed to macros or special forms.) 
  1446.  
  1447. <p1rule>
  1448.  
  1449. <Frame,
  1450.     Name =            p1rule,
  1451.     Placement =        At Anchor,
  1452.     Width =            6.35 inches,
  1453.     Height =        0.153 inches,
  1454.     Vertical Alignment =    0.007 inches,
  1455.     Shared Contents =    yes>
  1456.  
  1457. <p1stacked,
  1458.     Font =            F3,
  1459.     Left Tab =        -1.70/0 inches>
  1460.  
  1461. <F7>Data Types<Tab><F8>1.6<F0><#04>The following are some data 
  1462. type definitions that are commonly used in
  1463.  
  1464. <p1para,
  1465.     Font =            F3,
  1466.     Allow Page Break After = yes>
  1467.  
  1468. <F7><Tab><F0>CLX function definitions.
  1469.  
  1470. <syntax,
  1471.     Left Tab =        -0.90/0 inches,
  1472.     Right Tab =        7.50 inches>
  1473.  
  1474. alist <F3>(<F2>key<#1e>type<#1e>and<#1e>name datum<#1e>type<#1e>and<#1e>name
  1475. <F3>) <F0>'list<F3><Tab>Type<Index, Doc = flavors, "xlib:alist", Sort String = alist>
  1476.  
  1477. <para>
  1478.  
  1479. <F8>alist<F0> defines an association list. An association list is 
  1480. a sequence, containing zero or more repetitions of the given elements 
  1481. with each of the elements expressed as (<F2>type name<F0>). 
  1482.  
  1483. <syntax>
  1484.  
  1485. angle <F3>`(<F0>number<F3> ,(* -2pi) ,(* 2pi))<Tab>Type<Index, Doc = flavors, "xlib:angle", Sort String = angle>
  1486.  
  1487. <para>
  1488.  
  1489. <F8>angle<F0> defines an angle in units of radians and is bounded 
  1490. by (-2<F11>p<F0>) and (2<F11>p<F0>). Note that we are explicitly 
  1491. using a different angle representation than what is actually transmitted 
  1492. in the protocol. 
  1493.  
  1494. <syntax>
  1495.  
  1496. arc<#1e>seq <F3>'(<F0>repeat<#1e>seq<F3> (<F0>int16<F3> <F2>x<F3>) 
  1497. (<F0>int16<F3> <F2>y<F3>) (<F0>card16<F3> <F2>width<F3>) (<F0>card16
  1498. <F3> <F2>height<F3>) <Tab>Type<Index, Doc = flavors, "xlib:arc<#1e>seq", Sort String = "arc<#1e>seq"><HR>
  1499. (<F0>angle<F3> <F2>angle1<F3>) (<F0>angle<F3> <F2>angle2<F3>))
  1500.  
  1501. <para>
  1502.  
  1503. <F8>arc<#1e>seq<F0> defines a six<#1e>tuple sequence of the form 
  1504. (<F2>x<F0>, <F2>y<F0>, <F2>width<F0>, <F2>height<F0>, <F2>angle1<F0>, 
  1505. <F2>angle2<F0>). The points <F2>x<F0> and <F2>y<F0> are signed, 
  1506. 16<#1e>bit quantities with a range from -32,768 to 32,767. The <F2>width<F0> 
  1507. and <F2>height<F0> values are unsigned, 16<#1e>bit quantities and 
  1508. range from 0 to 65,535. <F2>angle1<F0> and <F2>angle2<F0> are 
  1509. in units of radians, and bounded by (-2<F11>p<F0>) and (2<F11>p<F0>). 
  1510.  
  1511. <syntax>
  1512.  
  1513. array<#1e>index <F3>`(<F0>integer<F3> 0 ,<F2>array<#1e>dimension<#1e>limit
  1514. <F3>)<Tab>Type<Index, Doc = flavors, "xlib:array<#1e>index", Sort String = "array<#1e>index">
  1515.  
  1516. <para>
  1517.  
  1518. <F8>array<#1e>index<F0> defines a type which is a subtype of the 
  1519. integers and can be used to describe all variables that can be array 
  1520. indices. The range is inclusive because start and end array index 
  1521. specifiers can be one (1) past the end. 
  1522.  
  1523. <syntax,
  1524.     Bottom Margin =        0.08 inches,
  1525.     Left Tab =        -0.90/0 inches,
  1526.     Right Tab =        7.50 inches>
  1527.  
  1528. bit<#1e>gravity <F3>'<F6>(<F0>member <F2>gravity*<F3>)<Tab>Type<Index, Doc = flavors, "xlib:bit<#1e>gravity", Sort String = "bit<#1e>gravity">
  1529.  
  1530. <para>
  1531.  
  1532. A keyword that specifies which region of a window should be retained 
  1533. when the window is resized.
  1534.  
  1535. <arg,
  1536.     Bottom Margin =        0.08 inches,
  1537.     Left Tab =        -0.25/0 inches>
  1538.  
  1539.  gravity <F3><#1f> One of the following:
  1540.  
  1541. <argtable,
  1542.     Left Tab =        0/0.80/1.80/2.50/2.80/3.80/6.75/0.75*4 inches>
  1543.  
  1544. <F8>:center<Tab>:north<Tab>:south<Tab><Tab>:static<F0><HR>
  1545. <F8>:east<Tab>:north<#1e>east<Tab>:south<#1e>east<Tab>:west<F0><HR>
  1546. <F8>:forget<Tab>:north<#1e>west<Tab>:south<#1e>west
  1547.  
  1548. <para>
  1549.  
  1550. If a window is reconfigured without changing its inside width or height, 
  1551. then the contents of the window moves with the window and are not 
  1552. lost. Otherwise, the contents of a resized window are either moved 
  1553. or lost, depending on its bit<#1e>gravity attribute. See <F8>window<#1e>bit<#1e>
  1554. gravity<F0>, in paragraph 4.3, Window Attributes, for additional 
  1555. information.
  1556.  
  1557. <syntax,
  1558.     Left Tab =        -0.90/0 inches,
  1559.     Right Tab =        7.50 inches>
  1560.  
  1561. bitmap <F3>'(<F0>array bit<F3> (* *))<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:bitmap", Sort String = bitmap>
  1562.  
  1563. <para>
  1564.  
  1565. Specifies a two<#1e>dimensional array of bits.
  1566.  
  1567. <thinrule,
  1568.     Left Margin =        0 inches>
  1569.  
  1570. <|,"1<#1e>13"><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab->
  1571.  
  1572. <syntax,
  1573.     Left Tab =        -0.90/0 inches,
  1574.     Right Tab =        7.50 inches>
  1575.  
  1576. bitmap<#1e>format<Tab><F3>Structure<Index, Doc = flavors, "xlib:bitmap<#1e>format", Sort String = "bitmap<#1e>format">
  1577.  
  1578. <para>
  1579.  
  1580. A structure that describes the storage format of a bitmap.
  1581.  
  1582. The <F8>bitmap<#1e>format<F0> structure contains slots for <F8>unit<F0>, 
  1583. <F8>pad<F0>, and <F8>lsb<#1e>first<#1e>p<F0>. The <F8>unit<F0> 
  1584. member indicates the unit of increments used to maintain the bitmap 
  1585. data. The units available for use are 8, 16, or 32 bits. The <F8>pad<F0> 
  1586. member indicates how many bits are needed to pad the left edge of 
  1587. the scan<#1e>line. The <F8>lsb<#1e>first<#1e>p<F0> member is a predicate 
  1588. which indicates the ordering of bits with the bitmap unit.
  1589.  
  1590. <syntax,
  1591.     Left Tab =        -0.90/0 inches,
  1592.     Right Tab =        7.50 inches>
  1593.  
  1594. unit<Tab><F3><Tab>Slot of <F0>bitmap<#1e>format
  1595.  
  1596. <synpara>
  1597.  
  1598. Type: (<F8>member <F0>8 16 32).
  1599.  
  1600. <para>
  1601.  
  1602. The size of a contiguous grouping of bits, which can be 8, 16, or 
  1603. 32. The default is 8.
  1604.  
  1605. <syntax,
  1606.     Left Tab =        -0.90/0 inches,
  1607.     Right Tab =        7.50 inches>
  1608.  
  1609. pad<Tab><F3><Tab>Slot of <F0>bitmap<#1e>format
  1610.  
  1611. <synpara>
  1612.  
  1613. Type: (<F8>member <F0>8 16 32).
  1614.  
  1615. <para>
  1616.  
  1617. The number of bits to left<#1e>pad the scan<#1e>line, which can be 
  1618. 8, 16, or 32. The default is 8.
  1619.  
  1620. <syntax,
  1621.     Left Tab =        -0.90/0 inches,
  1622.     Right Tab =        7.50 inches>
  1623.  
  1624. lsb<#1e>first<#1e>p<Tab><F3><Tab>Slot of <F0>bitmap<#1e>format
  1625.  
  1626. <synpara>
  1627.  
  1628. Type: <F8>boolean<F0>.
  1629.  
  1630. <para>
  1631.  
  1632. A predicate indicating whether the least significant bit comes first 
  1633. (<F8>true<F0>) or not (<F8>nil<F0>).
  1634.  
  1635. <thinrule,
  1636.     Left Margin =        0 inches>
  1637.  
  1638. <Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab->
  1639.  
  1640. <syntax,
  1641.     New Page =        yes>
  1642.  
  1643. <|,"1<#1e>14">boolean <F3>'(<F0>or<F3> <F0>nil<F3> (<F0>not<F3> <F0>nil<F3>))<Tab>
  1644. Type<Index, Doc = flavors, "xlib:boolean", Sort String = boolean>
  1645.  
  1646. <para>
  1647.  
  1648. <F8>boolean<F0> defines a type which is all inclusive. It is used 
  1649. for variables that can take on a true (non<#1e><F8>nil<F0>) or false 
  1650. (<F8>nil<F0>) value. 
  1651.  
  1652. <syntax>
  1653.  
  1654. boole<#1e>constant <F3>`(<F0>member<F3> <F2>value<F3>*)<Tab> 
  1655. Type<Index, Doc = flavors, "xlib:boole<#1e>constant", Sort String = "boole<#1e>constant">
  1656.  
  1657. <para>
  1658.  
  1659. <F8>boole-constant<F0> defines a type that is a set of the values 
  1660. associated with the 16 boolean operation<#1e>code constants for the 
  1661. Common Lisp language. It is used for the set of allowed source and 
  1662. destination combination functions in a graphics context. 
  1663.  
  1664. <arg>
  1665.  
  1666. value <#1f> <F3>One of the following:
  1667.  
  1668. <argtable,
  1669.     Left Tab =        0/0.60/1.10/1.50/2.10/2.60/3.10/9.75 inches>
  1670.  
  1671. <F8>boole<#1e>1<Tab><Tab>boole<#1e>c1<Tab>boole<#1e>nand<Tab>boole<#1e>xor<HR>
  1672. boole<#1e>2<Tab><Tab>boole<#1e>c2<Tab>boole<#1e>nor<Tab><HR>
  1673. boole<#1e>and<Tab>boole<#1e>clr<Tab>boole<#1e>orc1<Tab><HR>
  1674. boole<#1e>andc1<Tab>boole<#1e>eqv<Tab>boole<#1e>orc2<Tab><HR>
  1675. boole<#1e>andc2<Tab>boole<#1e>ior<Tab>boole<#1e>set<F0><Tab>
  1676.  
  1677. <syntax>
  1678.  
  1679. card8 <F3>'(<F0>unsigned<#1e>byte<F3> 8)<Tab>Type<Index, Doc = flavors, "xlib:card8", Sort String = card8>
  1680.  
  1681. <para>
  1682.  
  1683. An unsigned integer value that is a maximum of eight bits long. This 
  1684. gives a number of this type a range from 0 to 255. 
  1685.  
  1686. <syntax>
  1687.  
  1688. card16 <F3>'(<F0>unsigned<#1e>byte<F3> 16)<Tab>Type<Index, Doc = flavors, "xlib:card16", Sort String = card16>
  1689.  
  1690. <para>
  1691.  
  1692. An unsigned integer value that is a maximum of 16 bits long. This 
  1693. gives a number of this type a range from 0 to 65,535. 
  1694.  
  1695. <syntax>
  1696.  
  1697. card29 <F3>'(<F0>unsigned<#1e>byte<F3> 29)<Tab>Type<Index, Doc = flavors, "xlib:card29", Sort String = card29>
  1698.  
  1699. <para>
  1700.  
  1701. An unsigned integer value that is a maximum of 29 bits long. This 
  1702. gives a number of this type a range from 0 to 536,870,911. 
  1703.  
  1704. <syntax>
  1705.  
  1706. card32 <F3>'(<F0>unsigned<#1e>byte<F3> 32)<Tab>Type<Index, Doc = flavors, "xlib:card32", Sort String = card32>
  1707.  
  1708. <para>
  1709.  
  1710. An unsigned integer value that is a maximum of 32 bits long. This 
  1711. gives a number of this type a range from 0 to 4,294,967,295. 
  1712.  
  1713. <syntax>
  1714.  
  1715. color <F3>'(<F0>satisfies<F3> <F0>color<#1e>p<F3>)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:color", Sort String = color>
  1716.  
  1717. <para>
  1718.  
  1719. A <F8>color<F0>. See paragraph 9.2, Color Functions, for additional 
  1720. information.
  1721.  
  1722. <syntax>
  1723.  
  1724. colormap <F3>'(<F0>satisfies<F3> <F0>colormap<#1e>p<F3>)<F0><Tab><F3>Typ
  1725. e<Index, Doc = flavors, "xlib:colormap", Sort String = colormap>
  1726.  
  1727. <para>
  1728.  
  1729. A <F8>colormap<F0>. See paragraph 9.3, Colormap Functions, for additional 
  1730. information.
  1731.  
  1732. <syntax>
  1733.  
  1734. cursor <F3>'(<F0>satisfies<F3> <F0>cursor<#1e>p<F3>)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:cursor", Sort String = cursor>
  1735.  
  1736. <para>
  1737.  
  1738. A <F8>cursor<F0>. See Section 10, Cursors, for additional information. 
  1739.  
  1740. <syntax,
  1741.     Left Tab =        -0.90/0 inches,
  1742.     Right Tab =        7.50 inches>
  1743.  
  1744. device<#1e>event<#1e>mask <F3>'(<F0>or mask32<F3> (<F0>list device<#1e>even
  1745. t<#1e>mask<#1e>class<F3>))<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:device<#1e>event<#1e>mask", Sort String = "device<#1e>event<#1e>mask">
  1746.  
  1747. <para>
  1748.  
  1749. Provides a way to specify a set of bits for an event bitmask. Two 
  1750. ways of specifying the bits are allowed: by setting the event bits 
  1751. in a 32 bit mask, or by listing the keyword names of the device related 
  1752. event bits in a list.
  1753.  
  1754. <syntax,
  1755.     Left Tab =        -0.90/0 inches,
  1756.     Right Tab =        7.50 inches>
  1757.  
  1758. device<#1e>event<#1e>mask<#1e>class <F3>'<F6>(<F0>member <F2>event*<F3>)
  1759. <F0><Tab><F3>Type<Index, Doc = flavors, "xlib:device<#1e>event<#1e>mask<#1e>class", Sort String = "device<#1e>event<#1e>mask<#1e>class">
  1760.  
  1761. <para>
  1762.  
  1763. A keyword name, for a device related event, that corresponds to a 
  1764. particular bit in an event bitmask. The set of names is a subset of 
  1765. the names in the type <F8>event<#1e>mask<#1e>class<F0>.
  1766.  
  1767. <arg,
  1768.     Bottom Margin =        0.08 inches,
  1769.     Left Tab =        -0.25/0 inches>
  1770.  
  1771. event <#1f> <F3>One of the following:
  1772.  
  1773. <argtable,
  1774.     Left Tab =        0/0.60/1.35/2.50/2.80/3.80/6.75/0.75*4 inches>
  1775.  
  1776. <|,"1<#1e>15"><F8>:button<#1e>1<#1e>motion<Tab>:button<#1e>motion<Tab><Tab><HR>
  1777. :button<#1e>2<#1e>motion<Tab>:button<#1e>press<Tab><Tab><HR>
  1778. :button<#1e>3<#1e>motion<Tab>:key<#1e>press<Tab><Tab><HR>
  1779. :button<#1e>4<#1e>motion<Tab>:key<#1e>release<Tab><Tab><HR>
  1780. :button<#1e>5<#1e>motion<Tab>:pointer<#1e>motion<Tab><Tab>
  1781.  
  1782. <syntax>
  1783.  
  1784. display <F3>'(<F0>satisfies<F3> <F0>display<#1e>p<F3>)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:display", Sort String = display>
  1785.  
  1786. <para>
  1787.  
  1788. A connection to an X server. See Section 2, Displays, for additional 
  1789. information.
  1790.  
  1791. <syntax>
  1792.  
  1793. drawable <F3>'(<F0>or window pixmap<F3>)<Tab>Type<Index, Doc = flavors, "xlib:drawable", Sort String = drawable>
  1794.  
  1795. <para>
  1796.  
  1797. Both <F8>windows<F0> and <F8>pixmaps<F0> can be used as sources 
  1798. and destinations in graphics operations. <F8>windows<F0> and <F8>pixmaps
  1799. <F0> together are known as <F2>drawables<F0>. However, an <F8>:input<#1e>on
  1800. ly<F0> window cannot be used as a source or destination in a graphics 
  1801. operation. 
  1802.  
  1803. <syntax>
  1804.  
  1805. draw<#1e>direction <F3>'(<F0>member<F3> <F0>:left<#1e>to<#1e>right<F3> 
  1806. <F0>:right<#1e>to<#1e>left<F3>)<Tab>Type<Index, Doc = flavors, "xlib:draw<#1e>direction", Sort String = "draw<#1e>direction">
  1807.  
  1808. <para>
  1809.  
  1810. Defines a list of rotation directions for drawing arcs and fonts. <F8>draw<#1e>
  1811. direction<F0> can have the values of <F8>:left<#1e>to<#1e>right<F0> 
  1812. or <F8>:right<#1e>to<#1e>left<F0>. 
  1813.  
  1814. <syntax>
  1815.  
  1816. error<#1e>key <F3>'(<F0>member<F3> <F2>error<F3>*)<Tab>Type<Index, Doc = flavors, "xlib:error<#1e>key", Sort String = "error<#1e>key">
  1817.  
  1818. <para,
  1819.     Bottom Margin =        0.14 inches>
  1820.  
  1821. Defines a list of all predefined errors. All errors (synchronous and 
  1822. asynchronous) are processed by calling an error handler in the display. 
  1823. The handler is called with the display as the first argument and the 
  1824. error<#1e>key as its second argument. 
  1825.  
  1826. <arg>
  1827.  
  1828. error<F3> <#1f> One of the following:
  1829.  
  1830. <argtable,
  1831.     Left Tab =        0/0.85/1.10/2/3.20/3.80/6.75/0.75*4 inches>
  1832.  
  1833. <F8>:access<F0><Tab><F8>:drawable<F0><Tab><F8>:implementation<Tab>:value
  1834. <F0><HR>
  1835. <F8>:alloc<F0><Tab><F8>:font<F0><Tab><F8>:length<F0><Tab><F8>:window
  1836. <F0><HR>
  1837. <F8>:atom<F0><Tab><F8>:gcontext<F0><Tab><F8>:match<F0><Tab><HR>
  1838. <F8>:colormap<F0><Tab><F8>:id<#1e>choice<F0><Tab><F8>:name<F0><Tab><HR>
  1839. <F8>:cursor<F0><Tab><F8>:illegal<#1e>request<Tab>:pixmap<F0><Tab>
  1840.  
  1841. <syntax>
  1842.  
  1843. event<#1e>key <F3>'(<F0>member<F3> <F2>event<#1e>type<F3>*) <Tab>Type<Index, Doc = flavors, "xlib:event<#1e>key", Sort String = "event<#1e>key">
  1844.  
  1845. <para,
  1846.     Bottom Margin =        0.14 inches>
  1847.  
  1848. Defines a list that specifies all predefined event<#1e>types. Clients 
  1849. are informed of information asynchronously by means of events. These 
  1850. events can be either asynchronously generated from devices or generated 
  1851. as side effects of client requests. 
  1852.  
  1853. <arg>
  1854.  
  1855. event<#1e>type<F3> <#1f> One of the following:
  1856.  
  1857. <argtable,
  1858.     Left Tab =        0/1.40/2.90/3.80/6.75/0.75*4 inches>
  1859.  
  1860. <F8>:button<#1e>press<F0><Tab><F8>:exposure<F0><Tab><F8>:motion<#1e>notify
  1861. <F0><HR>
  1862. <F8>:button<#1e>release<F0><Tab><F8>:focus<#1e>in <F0><Tab><F8>:no<#1e>exp
  1863. osure <F0><HR>
  1864. <F8>:circulate<#1e>notify<F0><Tab><F8>:focus<#1e>out<F0><Tab><F8>:property
  1865. <#1e>notify<F0><HR>
  1866. <F8>:circulate<#1e>request<F0><Tab><F8>:graphics<#1e>exposure<F0><Tab>
  1867. <F8>:reparent<#1e>notify<F0><HR>
  1868. <F8>:client<#1e>message<F0><Tab><F8>:gravity<#1e>notify<Tab>:resize<#1e>requ
  1869. est<F0><HR>
  1870. <F8>:colormap<#1e>notify<F0><Tab><F8>:keymap<#1e>notify<F0><Tab><F8>:selec
  1871. tion<#1e>clear<F0><HR>
  1872. <F8>:configure<#1e>notify <F0><Tab><F8>:key<#1e>press <F0><Tab><F8>:select
  1873. ion<#1e>notify<F0><HR>
  1874. <F8>:configure<#1e>request<F0><Tab><F8>:key<#1e>release<F0><Tab><F8>:selec
  1875. tion<#1e>request <F0><HR>
  1876. <F8>:create<#1e>notify<F0><Tab><F8>:leave<#1e>notify<F0><Tab><F8>:unmap<#1e>
  1877. notify<F0><HR>
  1878. <F8>:destroy<#1e>notify<F0><Tab><F8>:map<#1e>notify<F0><Tab><F8>:visibilit
  1879. y<#1e>notify<F0><HR>
  1880. <F8>:enter<#1e>notify<F0><Tab><F8>:map<#1e>request <F0><Tab>
  1881.  
  1882. <syntax,
  1883.     Left Tab =        -0.90/0 inches,
  1884.     Right Tab =        7.50 inches>
  1885.  
  1886. event<#1e>mask <F3>'(<F0>or mask32<F3> (<F0>list<F3> <F0>event<#1e>mask<#1e>
  1887. class<F3>))<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:event<#1e>mask", Sort String = "event<#1e>mask">
  1888.  
  1889. <para>
  1890.  
  1891. Provides a way to specify a set of bits for an event bitmask. Two 
  1892. ways of specifying the bits are allowed: by setting the event bits 
  1893. in a 32 bit mask, or by listing the keyword names of the event bits 
  1894. in a list.
  1895.  
  1896. <thinrule,
  1897.     Left Margin =        0 inches>
  1898.  
  1899. <|,"1<#1e>16"><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab->
  1900.  
  1901. <syntax,
  1902.     Left Tab =        -0.90/0 inches,
  1903.     Right Tab =        7.50 inches>
  1904.  
  1905. event<#1e>mask<#1e>class <F3>'<F6>(<F0>member <F2>event*<F3>)<F0><Tab>
  1906. <F3>Type<Index, Doc = flavors, "xlib:event<#1e>mask<#1e>class", Sort String = "event<#1e>mask<#1e>class">
  1907.  
  1908. <para>
  1909.  
  1910. The elements of the type<F8> event<#1e>mask<#1e>class<F0> are keyword 
  1911. names that correspond to a particular bit in an event bitmask.
  1912.  
  1913. <arg,
  1914.     Bottom Margin =        0.08 inches,
  1915.     Left Tab =        -0.25/0 inches>
  1916.  
  1917. event <#1f> <F3>One of the following:
  1918.  
  1919. <argtable,
  1920.     Left Tab =        0/0.60/1.35/2.50/2.80/3.80/6.75/0.75*4 inches>
  1921.  
  1922. <F8>:button<#1e>1<#1e>motion<Tab>:enter<#1e>window<Tab><Tab>:pointer<#1e>motio
  1923. n<#1e>hint<HR>
  1924. :button<#1e>2<#1e>motion<Tab>:exposure<Tab><Tab>:property<#1e>change<HR>
  1925. :button<#1e>3<#1e>motion<Tab>:focus<#1e>change<Tab><Tab>:resize<#1e>redirect<HR>
  1926. :button<#1e>4<#1e>motion<Tab>:key<#1e>press<Tab><Tab>:structure<#1e>notify<HR>
  1927. :button<#1e>5<#1e>motion<Tab>:key<#1e>release<Tab><Tab>:substructure<#1e>notify<HR>
  1928. :button<#1e>motion<Tab>:keymap<#1e>state<Tab><Tab>:substructure<#1e>redirect<HR>
  1929. :button<#1e>press<Tab>:leave<#1e>window<Tab><Tab>:visibility<#1e>change<HR>
  1930. :button<#1e>release<Tab>:owner<#1e>grab<#1e>button<Tab><HR>
  1931. :colormap<#1e>change<Tab>:pointer<#1e>motion<Tab><Tab>
  1932.  
  1933. <syntax,
  1934.     Bottom Margin =        0 inches,
  1935.     Left Tab =        -0.90/0 inches,
  1936.     Right Tab =        7.50 inches>
  1937.  
  1938. make<#1e>event<#1e>keys <F2>event<#1e>mask<F0><Tab><F3>Function<Index, Doc = operations, "xlib:make<#1e>event<#1e>keys", Sort String = "make<#1e>event<#1e>keys">
  1939.  
  1940. <return>
  1941.  
  1942. <Tab><F3>Returns:<F2> event<#1e>keywords <F3><#1f> Type <F0>list<F3>.
  1943.  
  1944. <para>
  1945.  
  1946. Returns a list of <F8>event<#1e>mask<#1e>class<F0> keyword names 
  1947. for the event bits that are set in the specified event mask. 
  1948.  
  1949. <arg,
  1950.     Bottom Margin =        0.08 inches,
  1951.     Left Tab =        -0.25/0 inches>
  1952.  
  1953. event<#1e>mask <F3><#1f> An event mask (type <F8>mask32<F3>).
  1954.  
  1955. <syntax,
  1956.     Bottom Margin =        0 inches,
  1957.     Left Tab =        -0.90/0 inches,
  1958.     Right Tab =        7.50 inches>
  1959.  
  1960. make<#1e>event<#1e>mask<F3> &rest <F2>keys<F0><Tab><F3>Function<Index, Doc = operations, "xlib:make<#1e>event<#1e>mask", Sort String = "make<#1e>event<#1e>mask">
  1961.  
  1962. <return>
  1963.  
  1964. <Tab><F3>Returns:<F2> <HR>
  1965.   event<#1e>mask <F3><#1f> Type <F0>mask32<F3>.
  1966.  
  1967. <para>
  1968.  
  1969. Constructs an event mask from a set of <F8>event<#1e>mask<#1e>class<F0> 
  1970. keyword names.
  1971.  
  1972. <arg,
  1973.     Bottom Margin =        0.08 inches,
  1974.     Left Tab =        -0.25/0 inches>
  1975.  
  1976. keys <F3><#1f> <F8>event<#1e>mask<#1e>class<F3> keywords.
  1977.  
  1978. <thinrule,
  1979.     Left Margin =        0 inches>
  1980.  
  1981. <Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab->
  1982.  
  1983. <syntax>
  1984.  
  1985. font <F3>'(<F0>satisfies<F3> <F0>font<#1e>p<F3>)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:font", Sort String = font>
  1986.  
  1987. <para>
  1988.  
  1989. A text font. See Section 8, Fonts and Characters, for additional information. 
  1990.  
  1991. <syntax>
  1992.  
  1993. fontable <F3>'(<F0>or stringable font<F3>)<Tab>Type<Index, Doc = flavors, "xlib:fontable", Sort String = fontable>
  1994.  
  1995. <para,
  1996.     Bottom Margin =        0.14 inches>
  1997.  
  1998. A <F8>fontable<F0> is either a <F8>font<F0> object or the name 
  1999. of one of the fonts in the font database. 
  2000.  
  2001. <syntax>
  2002.  
  2003. font<#1e>props <F3>'<F0>list<Tab><F3>Type<Index, Doc = flavors, "xlib:font<#1e>props", Sort String = "font<#1e>props">
  2004.  
  2005. <para,
  2006.     Bottom Margin =        0.14 inches>
  2007.  
  2008. A <F8>list<F0> that contains alternating keywords and integers. 
  2009.  
  2010. <syntax>
  2011.  
  2012. gcontext <F3>'(<F0>satisfies<F3> <F0>gcontext<#1e>p<F3>)<F0><Tab><F3>Typ
  2013. e<Index, Doc = flavors, "xlib:gcontext", Sort String = gcontext>
  2014.  
  2015. <para>
  2016.  
  2017. A graphics context. See Section 5, Graphics Contexts, for additional 
  2018. information.
  2019.  
  2020. <syntax>
  2021.  
  2022. gcontext<#1e>key <F3>'(<F0>member<F3> <F2>type<F3>*)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:gcontext<#1e>key", Sort String = "gcontext<#1e>key">
  2023.  
  2024. <para,
  2025.     Bottom Margin =        0.14 inches>
  2026.  
  2027. A list of predefined types for use in <F8>gcontext<F0> processing. 
  2028. Various information for graphics output is stored in a graphics context 
  2029. (GC or GContext), such as foreground pixel, background pixel, line 
  2030. width, clipping region, and so forth. 
  2031.  
  2032. <arg>
  2033.  
  2034. type<F3> <#1f> One of the following:
  2035.  
  2036. <argtable,
  2037.     Left Tab =        0/0.60/1/2/2.80/3.80/6.75/0.75*4 inches>
  2038.  
  2039. <|,"1<#1e>17"><F8>:arc<#1e>mode<F0><Tab><F8>:exposures<F0><Tab><F8>:line<#1e>width 
  2040. <F0><Tab><HR>
  2041. <F8>:background<F0><Tab><F8>:fill<#1e>rule<F0><Tab><F8>:plane-mask<HR>
  2042. :cap<#1e>style<F0><Tab><F8>:fill<#1e>style <F0><Tab><F8>:stipple<HR>
  2043. :clip<#1e>mask <F0><Tab><F8>:font<F0><Tab><F8>:subwindow<#1e>mode<F0><HR>
  2044. <F8>:clip<#1e>x<F0><Tab><F8><Tab>:foreground<F0><Tab><F8>:tile<F0><HR>
  2045. <F8>:clip<#1e>y<F0><Tab><F8><Tab>:function<F0><Tab><F8>:ts<#1e>x<F0><HR>
  2046. <F8>:dash<#1e>offset  <F0><Tab><F8>:join<#1e>style<F0><Tab><F8>:ts<#1e>y
  2047. <F0><HR>
  2048. <F8>:dashes<F0><Tab><F8><Tab>:line<#1e>style
  2049.  
  2050. <syntax>
  2051.  
  2052. grab<#1e>status <F3>'(<F0>member<F3> <F2>grab<#1e>type<F3>*)<F0><Tab>
  2053. <F3>Type<Index, Doc = flavors, "xlib:grab<#1e>status", Sort String = "grab<#1e>status">
  2054.  
  2055. <para,
  2056.     Bottom Margin =        0.14 inches>
  2057.  
  2058. There are two kinds of grabs: active and passive. An <F2>active grab <F0>occu
  2059. rs when a single client grabs the keyboard and/or pointer explicitly. 
  2060. Clients can also grab a particular keyboard key or pointer button 
  2061. in a window. The grab activates when the key or button is actually 
  2062. pressed, and is called a <F2>passive grab<F0>. Passive grabs can 
  2063. be very convenient for implementing reliable pop<#1e>up menus. 
  2064.  
  2065. <arg>
  2066.  
  2067. <F3> <F0>grab<#1e>type<F3> <#1f> One of the following:
  2068.  
  2069. <argtable>
  2070.  
  2071. <F8>:already<#1e>grabbed<F0><HR>
  2072. <F8>:frozen<F0><Tab><HR>
  2073. <F8>:invalid<#1e>time<F0><HR>
  2074. <F8>:not<#1e>viewable<F0><HR>
  2075. <F8>:success<F0><Tab>
  2076.  
  2077. <syntax>
  2078.  
  2079. image<#1e>depth <F3>'(<F0>integer<F3> 0 32)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:image<#1e>depth", Sort String = "image<#1e>depth">
  2080.  
  2081. <para,
  2082.     Bottom Margin =        0.14 inches>
  2083.  
  2084. Used in determining the depth of a pixmap, window, or image. The value 
  2085. specifies the number of bits deep<F2> <F0>that a given pixel has 
  2086. within a given pixmap, window, or image. 
  2087.  
  2088. <syntax,
  2089.     Left Tab =        -0.90/0 inches,
  2090.     Right Tab =        7.50 inches>
  2091.  
  2092. index<#1e>size <F3>'(<F0>member :default<F3> 8 16)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:index<#1e>size", Sort String = "index<#1e>size">
  2093.  
  2094. <para>
  2095.  
  2096. Used to control the element size of the destination buffer given to 
  2097. the translate function when drawing glyphs. If <F8>:default<F0> 
  2098. is specified, the size is based on the current font, if known; otherwise, 
  2099. 16 is used.
  2100.  
  2101. <syntax>
  2102.  
  2103. int8 <F3>'(<F0>signed<#1e>byte<F3> 8)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:int8", Sort String = int8>
  2104.  
  2105. <para,
  2106.     Bottom Margin =        0.14 inches>
  2107.  
  2108. A signed integer value that is a maximum of eight bits long. A number 
  2109. of this type can have a range from -128 to 127. 
  2110.  
  2111. <syntax>
  2112.  
  2113. int16 <F3>'(<F0>signed<#1e>byte<F3> 16)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:int16", Sort String = int16>
  2114.  
  2115. <para>
  2116.  
  2117. A signed integer value that is a maximum of 16 bits long. A number 
  2118. of this type can have a range from -32,768 to 32,767. 
  2119.  
  2120. <syntax>
  2121.  
  2122. int32 <F3>'(<F0>signed<#1e>byte<F3> 32)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:int32", Sort String = int32>
  2123.  
  2124. <para>
  2125.  
  2126. A signed integer value that is a maximum of 32 bits long. A number 
  2127. of this type can have a range from -2,147,483,648 to 2,147,483,647. 
  2128.  
  2129. <syntax>
  2130.  
  2131. keysym <F3>'<F0>card32<Tab><F3>Type<Index, Doc = flavors, "xlib:keysym", Sort String = keysym>
  2132.  
  2133. <para>
  2134.  
  2135. Used as an encoding of a symbol on a keycap on a keyboard. It is an 
  2136. unsigned integer value represented in a maximum of 32 bits long. A <F8>keysym
  2137. <F0> type can have a range from 0 to 4,294,967,295. 
  2138.  
  2139. <syntax>
  2140.  
  2141. mask16 <F3>' <F0>card16<Tab><F3>Type<Index, Doc = flavors, "xlib:mask16", Sort String = mask16>
  2142.  
  2143. <para>
  2144.  
  2145. A positional bitmask that contains 16 boolean flags. 
  2146.  
  2147. <syntax>
  2148.  
  2149. <|,"1<#1e>18">mask32 <F3>' <F0>card32<Tab><F3>Type<Index, Doc = flavors, "xlib:mask32", Sort String = mask32>
  2150.  
  2151. <para>
  2152.  
  2153. A positional bitmask that contains 32 boolean flags. 
  2154.  
  2155. <syntax,
  2156.     Left Tab =        -0.90/0 inches,
  2157.     Right Tab =        7.50 inches>
  2158.  
  2159. modifier<#1e>key <F3>'(<F0>member <F2>modifier<F0>*<F3>)<F0><Tab><F3>Typ
  2160. e<Index, Doc = flavors, "xlib:modifier<#1e>key", Sort String = "modifier<#1e>key">
  2161.  
  2162. <para>
  2163.  
  2164. A keyword identifying one of the modifier keys on the keyboard device.
  2165.  
  2166. <arg,
  2167.     Bottom Margin =        0.08 inches,
  2168.     Left Tab =        -0.25/0 inches>
  2169.  
  2170. modifier <F3><#1f> One of the following:
  2171.  
  2172. <argtable,
  2173.     Left Tab =        0/0.90/1.80/2.50/2.80/3.80/6.75/0.75*4 inches>
  2174.  
  2175. <F8>:shift<Tab>:mod<#1e>2<F0><HR>
  2176. <F8>:lock<Tab>:mod<#1e>3<F0><HR>
  2177. <F8>:control<Tab>:mod<#1e>4<F0><HR>
  2178. <F8>:mod<#1e>1<Tab>:mod<#1e>5
  2179.  
  2180. <syntax,
  2181.     Left Tab =        -0.90/0 inches,
  2182.     Right Tab =        7.50 inches>
  2183.  
  2184. modifier<#1e>mask <F3>'(<F0>or <F3>(<F0>member :any<F3>)<F0> 
  2185. mask16 <F3>(<F0>list modifier<#1e>key<F3>))<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:modifier<#1e>mask", Sort String = "modifier<#1e>mask">
  2186.  
  2187. <para>
  2188.  
  2189. A bitmask or list of keywords that specifies a set of modifier keys. 
  2190. The keyword <F8>:any<F0> is equivalent to any subset of modifier 
  2191. key.
  2192.  
  2193. <syntax>
  2194.  
  2195. pixarray <F3>'(<F0>or<F3> (<F0>array pixel<F3> (* *))<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:pixarray", Sort String = pixarray><HR>
  2196.         (<F0>array card16<F3> (* *))<HR>
  2197.         (<F0>array card8<F3> (* *))<HR>
  2198.         (<F0>array<F3> (<F0>unsigned<#1e>byte 4<F3>) (* *))<HR>
  2199.         (<F0>array bit<F3> (* *)))
  2200.  
  2201. <para>
  2202.  
  2203. Specifies a two<#1e>dimensional array of pixels.  
  2204.  
  2205. <syntax>
  2206.  
  2207. pixel <F3>'(<F0>unsigned<#1e>byte<F3> 32)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:pixel", Sort String = pixel>
  2208.  
  2209. <para>
  2210.  
  2211. An unsigned integer value that is a maximum of 32 bits long. This 
  2212. gives a pixel type a value range from 0 to 4,294,967,295. Useful values 
  2213. are dependent on the class of colormap being used. 
  2214.  
  2215. <syntax>
  2216.  
  2217. pixmap <F3>'(<F0>satisfies<F3> <F0>pixmap<#1e>p<F3>)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:pixmap", Sort String = pixmap>
  2218.  
  2219. <para>
  2220.  
  2221. A <F8>pixmap<F0>. See paragraph 4.8, Pixmaps, for additional information. 
  2222.  
  2223. <thinrule,
  2224.     Left Margin =        0 inches>
  2225.  
  2226. <Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab->
  2227.  
  2228. <syntax,
  2229.     Left Tab =        -0.90/0 inches,
  2230.     Right Tab =        7.50 inches>
  2231.  
  2232. pixmap<#1e>format<Tab><F3>Structure<Index, Doc = flavors, "xlib:pixmap<#1e>format", Sort String = "pixmap<#1e>format">
  2233.  
  2234. <para>
  2235.  
  2236. A structure that describes the storage format of a pixmap. 
  2237.  
  2238. The <F8>pixmap<#1e>format<F0> structure contains slots for <F8>depth<F0>, 
  2239. <F8>bits<#1e>per<#1e>pixel<F0>, and <F8>scanline<#1e>pad<F0>. 
  2240. The <F8>depth<F0> member indicates the number of bit planes in the 
  2241. pixmap. The <F8>bits<#1e>per<#1e>pixel<F0> member indicates the 
  2242. number of bits used to represent a single pixel. For X, a pixel can 
  2243. be 1, 4, 8, 16, 24, or 32 bits wide. As for <F8>bitmap<#1e>format<F0>, 
  2244. the <F8>scanline<#1e>pad<F0> member indicates how many pixels are 
  2245. needed to pad the left edge of the scan<#1e>line.
  2246.  
  2247. <syntax,
  2248.     Left Tab =        -0.90/0 inches,
  2249.     Right Tab =        7.50 inches>
  2250.  
  2251. depth<Tab><F3><Tab>Slot of <F0>pixmap<#1e>format
  2252.  
  2253. <synpara>
  2254.  
  2255. Type: <F8>image<#1e>depth<F0>.
  2256.  
  2257. <para>
  2258.  
  2259. The number of bit planes in the pixmap.
  2260.  
  2261. <syntax,
  2262.     Left Tab =        -0.90/0 inches,
  2263.     Right Tab =        7.50 inches>
  2264.  
  2265. bits<#1e>per<#1e>pixel<Tab><F3><Tab>Slot of <F0>pixmap<#1e>format
  2266.  
  2267. <synpara>
  2268.  
  2269. Type: (<F8>member <F0>1 4 8 16 24 32).
  2270.  
  2271. <para>
  2272.  
  2273. The number of consecutive bits used to encode a single pixel. The 
  2274. default<FJ>
  2275. is 8.
  2276.  
  2277. <syntax,
  2278.     Left Tab =        -0.90/0 inches,
  2279.     Right Tab =        7.50 inches>
  2280.  
  2281. <|,"1<#1e>19">scanline<#1e>pad<Tab><F3><Tab>Slot of <F0>pixmap<#1e>format
  2282.  
  2283. <synpara>
  2284.  
  2285. Type: (<F8>member <F0>8 16 32).
  2286.  
  2287. <para>
  2288.  
  2289. The number of bits to left<#1e>pad the scan<#1e>line, which can be 
  2290. 8, 16, or 32. The default is 8.
  2291.  
  2292. <thinrule,
  2293.     Left Margin =        0 inches>
  2294.  
  2295. <Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab->
  2296.  
  2297. <syntax>
  2298.  
  2299. point<#1e>seq <F3>'(<F0>repeat<#1e>seq<F3> (<F0>int16<F3> <F2>x<F3>) 
  2300. (<F0>int16<F3> <F2>y<F3>))<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:point<#1e>seq", Sort String = "point<#1e>seq">
  2301.  
  2302. <para>
  2303.  
  2304. The <F8>point<#1e>seq<F0> type is used to define sequences of (<F2>x<F0>,
  2305. <F2>y<F0>) pairs of points. The paired values are 16<#1e>bit, signed 
  2306. integer quantities. This gives the points in this type a range from 
  2307. -32,768 to 32,767. 
  2308.  
  2309. <syntax,
  2310.     Left Tab =        -0.90/0 inches,
  2311.     Right Tab =        7.50 inches>
  2312.  
  2313. pointer<#1e>event<#1e>mask <F3>'(<F0>or mask32<F3> (<F0>list pointer<#1e>ev
  2314. ent<#1e>mask<#1e>class<F3>))<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:pointer<#1e>event<#1e>mask", Sort String = "pointer<#1e>event<#1e>mask">
  2315.  
  2316. <para>
  2317.  
  2318. Provides a way to specify a set of bits for an event bitmask. Two 
  2319. ways of specifying the bits are allowed: by setting the event bits 
  2320. in a 32 bit mask, or by listing the keyword names of the pointer related 
  2321. event bits in a list.
  2322.  
  2323. <syntax,
  2324.     Left Tab =        -0.90/0 inches,
  2325.     Right Tab =        7.50 inches>
  2326.  
  2327. pointer<#1e>event<#1e>mask<#1e>class <F3>'<F6>(<F0>member <F2>event*<F3>)
  2328. <F0><Tab><F3>Type<Index, Doc = flavors, "xlib:pointer<#1e>event<#1e>mask<#1e>class", Sort String = "pointer<#1e>event<#1e>mask<#1e>class">
  2329.  
  2330. <para>
  2331.  
  2332. A keyword name, for a pointer related event, that corresponds to a 
  2333. particular bit in an event bitmask. The set of names is a subset of 
  2334. the names in the type <F8>event<#1e>mask<#1e>class<F0>.
  2335.  
  2336. <arg,
  2337.     Bottom Margin =        0.08 inches,
  2338.     Left Tab =        -0.25/0 inches>
  2339.  
  2340. event <#1f> <F3>One of the following:
  2341.  
  2342. <argtable,
  2343.     Left Tab =        0/0.60/1.35/2.50/2.80/3.80/6.75/0.75*4 inches>
  2344.  
  2345. <F8>:button<#1e>1<#1e>motion<Tab>:button<#1e>motion<Tab><Tab>:leave<#1e>window<HR>
  2346. :button<#1e>2<#1e>motion<Tab>:button<#1e>press<Tab><Tab>:pointer<#1e>motion<HR>
  2347. :button<#1e>3<#1e>motion<Tab>:button<#1e>release<Tab><Tab>:pointer<#1e>motion<#1e>
  2348. hint<HR>
  2349. :button<#1e>4<#1e>motion<Tab>:enter<#1e>window<Tab><Tab><HR>
  2350. :button<#1e>5<#1e>motion<Tab>:keymap<#1e>state<Tab><Tab>
  2351.  
  2352. <syntax>
  2353.  
  2354. rect<#1e>seq <F3>'(<F0>repeat<#1e>seq<F3> (<F0>int16<F3> <F2>x<F3>) 
  2355. (<F0>int16<F3> <F2>y<F3>) (<F0>card16<F3> <F2>width<F3>) (<F0>card16
  2356. <F3> <F2>height<F3>))<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:rect<#1e>seq", Sort String = "rect<#1e>seq">
  2357.  
  2358. <para>
  2359.  
  2360. <F8>rect<#1e>seq<F0> defines a four<#1e>tuple sequence of the form 
  2361. (<F2>x<F0>,<F2> y<F0>, <F2>width<F0>, <F2>height<F0>). The 
  2362. points <F2>x<F0> and <F2>y<F0> are signed, 16<#1e>bit quantities 
  2363. with a range from -32,768 to 32,767. The <F2>width<F0> and <F2>height<F0> 
  2364. values are unsigned, 16<#1e>bit quantities and range from 0 to 65,535. 
  2365.  
  2366. <syntax>
  2367.  
  2368. repeat<#1e>seq <F3>(&rest <F2>elts<F3>) '<F0>sequence<Tab><F3>Type<Index, Doc = flavors, "xlib:repeat<#1e>seq", Sort String = "repeat<#1e>seq">
  2369.  
  2370. <para>
  2371.  
  2372. A subtype used to define repeating sequences. 
  2373.  
  2374. <syntax,
  2375.     New Page =        yes>
  2376.  
  2377. <|,"1<#1e>20">resource<#1e>id <F3>'<F0>card29<Tab><F3>Type<Index, Doc = flavors, "xlib:resource<#1e>id", Sort String = "resource<#1e>id">
  2378.  
  2379. <para>
  2380.  
  2381. A numeric identifier that is assigned by the server to a server resource 
  2382. object.
  2383.  
  2384. <syntax>
  2385.  
  2386. rgb<#1e>val <F3>'(<F0>float<F3> 0.0 1.0)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:rgb<#1e>val", Sort String = "rgb<#1e>val">
  2387.  
  2388. <para>
  2389.  
  2390. An <F8>rgb<#1e>val<F0> is a floating<#1e>point value between 0 and 
  2391. 1 that specifies a saturation for a red, green, or blue additive primary. 
  2392. The 0 value indicates no saturation and 1 indicates full saturation. 
  2393.  
  2394. <syntax>
  2395.  
  2396. screen <F3>'(<F0>satisfies<F3> <F0>screen<#1e>p<F3>)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:screen", Sort String = screen>
  2397.  
  2398. <para>
  2399.  
  2400. A display screen. See Section 3, Screens, for further information. 
  2401.  
  2402. <syntax>
  2403.  
  2404. seg<#1e>seq <F3>'(<F0>repeat<#1e>seq<F3> (<F0>int16<F3> <F2>x1<F3>) 
  2405. (<F0>int16<F2> y1<F3>) (<F0>int16<F2> x2<F3>) (<F0>int16<F2> 
  2406. y2<F3>))<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:seg<#1e>seq", Sort String = "seg<#1e>seq">
  2407.  
  2408. <para>
  2409.  
  2410. Defines sequences of (<F2>x1<F0>, <F2>y1<F0>, <F2>x2<F0>, <F2>y2<F0>) 
  2411. sets of points. The point values are 16<#1e>bit, signed integer quantities. 
  2412. This gives the points in this type a range from -32,768 to 32,767. 
  2413.  
  2414. <thinrule,
  2415.     Left Margin =        0 inches>
  2416.  
  2417. <Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab->
  2418.  
  2419. <syntax>
  2420.  
  2421. state<#1e>mask<#1e>key <F3>'(<F0>or modifier<#1e>key<F3> (<F0>member<F3> 
  2422. <F2>button<F3>*)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:state<#1e>mask<#1e>key", Sort String = "state<#1e>mask<#1e>key">
  2423.  
  2424. <para>
  2425.  
  2426. A keyword identifying one of the display modifier keys or pointer 
  2427. buttons whose state is reported in device events.
  2428.  
  2429. <arg,
  2430.     Bottom Margin =        0.08 inches,
  2431.     Left Tab =        -0.25/0 inches>
  2432.  
  2433. button <F3><#1f> One of the following:
  2434.  
  2435. <argtable,
  2436.     Left Tab =        0/0.90/1.80/2.50/2.80/3.80/6.75/0.75*4 inches>
  2437.  
  2438. <F8>:button<#1e>1<F0><Tab><F8>:button<#1e>4<F0><HR>
  2439. <F8>:button<#1e>2<F0><Tab><F8>:button<#1e>5<F0><HR>
  2440. <F8>:button<#1e>3<F0><Tab>
  2441.  
  2442. <syntax,
  2443.     Bottom Margin =        0 inches,
  2444.     Left Tab =        -0.90/0 inches,
  2445.     Right Tab =        7.50 inches>
  2446.  
  2447. make<#1e>state<#1e>keys<F6> <F2>state<#1e>mask<F0><Tab><F3>Function<Index, Doc = operations, "xlib:make<#1e>state<#1e>keys", Sort String = "make<#1e>state<#1e>keys">
  2448.  
  2449. <return>
  2450.  
  2451. <Tab><F3>Returns:<F2> <HR>
  2452.   state<#1e>keywords <F3><#1f> Type <F0>list<F3>.
  2453.  
  2454. <para>
  2455.  
  2456. Returns a list of <F8>state<#1e>mask<#1e>key<F0> symbols corresponding 
  2457. to the <F2>state<#1e>mask<F0>. A symbol belongs to the returned 
  2458. list if, and only if, the corresponding <F2>state<#1e>mask<F0> bit 
  2459. is 1.
  2460.  
  2461. <arg,
  2462.     Bottom Margin =        0.08 inches,
  2463.     Left Tab =        -0.25/0 inches>
  2464.  
  2465. state<#1e>mask <F3><#1f> A 16<#1e>bit mask of type <F8>mask16<F3>.
  2466.  
  2467. <syntax,
  2468.     Bottom Margin =        0 inches,
  2469.     Left Tab =        -0.90/0 inches,
  2470.     Right Tab =        7.50 inches>
  2471.  
  2472. make<#1e>state<#1e>mask<F6> <F3>&rest <F2>keys<F0><Tab><F3>Function<Index, Doc = operations, "xlib:make<#1e>state<#1e>mask", Sort String = "make<#1e>state<#1e>mask">
  2473.  
  2474. <return>
  2475.  
  2476. <Tab><F3>Returns:<F2> <HR>
  2477.   mask <F3><#1f> Type <F0>mask16<F3>.
  2478.  
  2479. <para>
  2480.  
  2481. Returns a 16<#1e>bit <F2>mask<F0> representing the given <F8>state<#1e>mask<#1e>
  2482. key<F0> symbols. The returned <F2>mask<F0> contains a 1 bit for 
  2483. each keyword.
  2484.  
  2485. <arg,
  2486.     Bottom Margin =        0.08 inches,
  2487.     Left Tab =        -0.25/0 inches>
  2488.  
  2489. keys <F3><#1f> A list of <F8>state<#1e>mask<#1e>key<F3> symbols.
  2490.  
  2491. <thinrule,
  2492.     Left Margin =        0 inches>
  2493.  
  2494. <Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab->
  2495.  
  2496. <syntax>
  2497.  
  2498. stringable <F3>'(<F0>or string symbol<F3>)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:stringable", Sort String = stringable>
  2499.  
  2500. <para>
  2501.  
  2502. Used for naming something. This type can be either a string or a <F8>symbol
  2503. <F0> whose <F8>symbol<#1e>name<F0> is used as the string containing 
  2504. the name. The case of the characters in the string is ignored when 
  2505. comparing stringables. 
  2506.  
  2507. <syntax,
  2508.     New Page =        yes>
  2509.  
  2510. <|,"1<#1e>21">timestamp <F3>'(<F0>or null<F3> <F0>card32<F3>)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:timestamp", Sort String = timestamp>
  2511.  
  2512. <para>
  2513.  
  2514. An encoding of a time. <F8>nil<F0> stands for the current time. 
  2515.  
  2516. <thinrule,
  2517.     Left Margin =        0 inches>
  2518.  
  2519. <Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab->
  2520.  
  2521. <syntax,
  2522.     Left Tab =        -0.90/0 inches,
  2523.     Right Tab =        7.50 inches>
  2524.  
  2525. visual<#1e>info<Tab><Tab><F3>Structure<Index, Doc = flavors, "xlib:visual<#1e>info", Sort String = "visual<#1e>info">
  2526.  
  2527. <para>
  2528.  
  2529. A structure that represents a visual type. The elements of this structure 
  2530. are <F8>id<F0>, <F8>class<F0>, <F8>red<#1e>mask<F0>,<F8> green<#1e>mask
  2531. <F0>, <F8>blue<#1e>mask<F0>, <F8>bits<#1e>per<#1e>rgb<F0>, and <F8>colorm
  2532. ap<#1e>entries<F0>.
  2533.  
  2534. <syntax,
  2535.     Left Tab =        -0.90/0 inches,
  2536.     Right Tab =        7.50 inches>
  2537.  
  2538. id<Tab><Tab><F3>Slot of <F0>visual<#1e>info
  2539.  
  2540. <synpara>
  2541.  
  2542. Type: <F8>card29<F0>.
  2543.  
  2544. <para>
  2545.  
  2546. A unique identification number.
  2547.  
  2548. <syntax,
  2549.     Left Tab =        -0.90/0 inches,
  2550.     Right Tab =        7.50 inches>
  2551.  
  2552. class<Tab><Tab><F3>Slot of <F0>visual<#1e>info
  2553.  
  2554. <synpara>
  2555.  
  2556. Type: (<F8>member<F0> <F8>:direct<#1e>color<F0> <F8>:gray<#1e>scale<F0> 
  2557. <F8>:pseudo<#1e>color<F0> <F8>:static<#1e>color<HR>
  2558.       <F0> <F8> :static<#1e>gray<F0> <F8>:true<#1e>color<F0>).
  2559.  
  2560. <arg,
  2561.     Bottom Margin =        0.08 inches,
  2562.     Left Tab =        -0.25/0 inches>
  2563.  
  2564. <F3>The class of the visual type.
  2565.  
  2566. <syntax>
  2567.  
  2568. red<#1e>mask<F3>,<F0> green<#1e>mask<F3>,<F0> blue<#1e>mask<Tab><F3>Slots 
  2569. of <F0>visual<#1e>info
  2570.  
  2571. <synpara>
  2572.  
  2573. Type:<F8> pixel<F0>.
  2574.  
  2575. <para>
  2576.  
  2577. The <F8>red<#1e>mask<F0>, <F8>green<#1e>mask<F0>, and <F8>blue<#1e>mask
  2578. <F0> elements are only meaningful for the <F8>:direct<#1e>color<F0> 
  2579. and <F8>:true<#1e>color<F0> classes. Each mask has one contiguous 
  2580. set of bits with no intersections.
  2581.  
  2582. <syntax,
  2583.     Left Tab =        -0.90/0 inches,
  2584.     Right Tab =        7.50 inches>
  2585.  
  2586. bits<#1e>per<#1e>rgb<Tab><Tab><F3>Slot of <F0>visual<#1e>info
  2587.  
  2588. <synpara>
  2589.  
  2590. Type: <F8>card8<F0>.
  2591.  
  2592. <para>
  2593.  
  2594. Specifies the log base 2 of the approximate number of distinct color 
  2595. values (individually) of red, green, and blue. Actual RGB values are 
  2596. unsigned 16<#1e>bit numbers.
  2597.  
  2598. <syntax,
  2599.     Left Tab =        -0.90/0 inches,
  2600.     Right Tab =        7.50 inches>
  2601.  
  2602. colormap<#1e>entries<Tab><F3>Slot of <F0>visual<#1e>info
  2603.  
  2604. <synpara>
  2605.  
  2606. Type: <F8>card16<F0>.
  2607.  
  2608. <para>
  2609.  
  2610. Defines the number of available colormap entries in a newly created 
  2611. colormap. For <F8>:direct<#1e>color<F0> and <F8>:true<#1e>color<F0>, 
  2612. this is the size of an individual pixel subfield.
  2613.  
  2614. <thinrule,
  2615.     Left Margin =        0 inches>
  2616.  
  2617. <Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab-><Tab->
  2618.  
  2619. <syntax,
  2620.     Bottom Margin =        0.08 inches,
  2621.     New Page =        yes,
  2622.     Left Tab =        -0.90/0 inches,
  2623.     Right Tab =        7.50 inches>
  2624.  
  2625. <|,"1<#1e>22">win<#1e>gravity <F3>'<F6>(<F0>member <F2>gravity*<F3>)<Tab>Type<Index, Doc = flavors, "xlib:win<#1e>gravity", Sort String = "win<#1e>gravity">
  2626.  
  2627. <para>
  2628.  
  2629. A keyword that specifies how to reposition a window when its parent 
  2630. is resized.
  2631.  
  2632. <arg,
  2633.     Bottom Margin =        0.08 inches,
  2634.     Left Tab =        -0.25/0 inches>
  2635.  
  2636. gravity <F3><#1f> One of the following:
  2637.  
  2638. <argtable,
  2639.     Left Tab =        0/0.90/1.80/2.50/2.80/3.80/6.75/0.75*4 inches>
  2640.  
  2641. <F8>:center<F0><Tab><F8>:north<#1e>west<Tab>:static<Tab><F0><HR>
  2642. <F8>:east<F0><Tab><F8>:south<F0><Tab><F8>:unmap<F0><Tab><HR>
  2643. <F8>:north<F0><Tab><F8>:south<#1e>east<F0><Tab><F8>:west<F0><Tab><HR>
  2644. <F8>:north<#1e>east<F0><Tab><F8>:south<#1e>west<F0><Tab>
  2645.  
  2646. <para>
  2647.  
  2648. If a parent window is reconfigured without changing its inside width 
  2649. or height, then all child windows move with the parent and are not 
  2650. changed. Otherwise, each child of the resized parent is moved, depending 
  2651. on the child's gravity attribute. See <F8>window<#1e>gravity<F0>, 
  2652. in paragraph 4.3, Window Attributes, for additional information.
  2653.  
  2654. <syntax>
  2655.  
  2656. window <F3>'(<F0>satisfies<F3> <F0>window<#1e>p<F3>)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:window", Sort String = window>
  2657.  
  2658. <para>
  2659.  
  2660. A window. See Section 4, Windows and Pixmaps, for additional information.
  2661.  
  2662. <syntax>
  2663.  
  2664. xatom <F3>'(<F0>or string symbol<F3>)<F0><Tab><F3>Type<Index, Doc = flavors, "xlib:xatom", Sort String = xatom>
  2665.  
  2666. <para>
  2667.  
  2668. A name that has been assigned a corresponding unique ID by the server. <F8>xat
  2669. oms<F0> are used to identify properties, selections, and types defined 
  2670. in the X server. An <F8>xatom<F0> can be either a <F8>string<F0> 
  2671. or <F8>symbol<F0> whose <F8>symbol<#1e>name<F0> is used as the <F8>xatom
  2672. <F0> name. The case of the characters in the string are significant 
  2673. when comparing <F8>xatoms<F0>. 
  2674.  
  2675.