client: Use the new @property and @beautiful tags.

Also improve the documentation.
This commit is contained in:
Emmanuel Lepage Vallee 2016-03-31 04:10:52 -04:00
parent e5f7a27860
commit 5655521ec3
2 changed files with 955 additions and 165 deletions

385
docs/images/client_geo.svg Normal file
View File

@ -0,0 +1,385 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="519pt"
height="240pt"
viewBox="0 0 519.00001 240"
version="1.1"
id="svg6069"
inkscape:version="0.91 r13725"
sodipodi:docname="client_geo.svg">
<metadata
id="metadata6144">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6142">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath6269">
<circle
r="26.388889"
cy="32.5"
cx="276.94446"
id="circle6271"
style="opacity:1;fill:#806600;fill-opacity:1;stroke:#617fff;stroke-width:1.39999998;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</clipPath>
</defs>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1918"
inkscape:window-height="1032"
id="namedview6140"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="1.44"
inkscape:cx="449.22086"
inkscape:cy="116.99803"
inkscape:window-x="0"
inkscape:window-y="16"
inkscape:window-maximized="1"
inkscape:current-layer="g6212" />
<path
inkscape:connector-curvature="0"
id="path6072"
d="m 58.889889,0.75 402.388891,0 0,238.5 -402.388891,0 z"
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:10, 4;stroke-dashoffset:1;stroke-opacity:0.26666703"
sodipodi:nodetypes="ccccc" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:13.13514996px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:0.2;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="63.513626"
y="13.124383"
id="text6180"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan6182"
x="63.513626"
y="13.124383">Screen</tspan></text>
<g
id="g6212"
transform="translate(34.806558,12.777778)">
<path
sodipodi:nodetypes="sssssssss"
style="fill:#617fff;fill-opacity:0.49019602;fill-rule:nonzero;stroke:#617fff;stroke-width:1.39999998;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 30.606602,25.392837 c 0,-2.761719 2.238281,-5 5,-5 l 245.644098,0 c 2.76172,0 5,2.238281 5,5 l 0,190.000003 c 0,2.76172 -2.23828,5 -5,5 l -245.644098,0 c -2.761719,0 -5,-2.23828 -5,-5 z"
id="path6078"
inkscape:connector-curvature="0" />
<g
id="g6483">
<path
sodipodi:nodetypes="sssssssss"
style="fill:#617fff;fill-opacity:0.49019602;fill-rule:nonzero;stroke:#617fff;stroke-width:0.68181419;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 31.289175,23.996573 c 0,-1.344985 1.090066,-2.435051 2.435051,-2.435051 l 248.876614,0 c 1.34498,0 2.43505,1.090066 2.43505,2.435051 l 0,7.679111 c 0,1.34499 -1.09007,2.43506 -2.43505,2.43506 l -248.876614,0 c -1.344985,0 -2.435051,-1.09007 -2.435051,-2.43506 z"
id="path6184"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.9279623px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="131.39223"
y="30.661503"
id="text6192"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan6194"
x="131.39223"
y="30.661503">Top titlebar</tspan></text>
</g>
<g
id="g6494">
<path
inkscape:connector-curvature="0"
id="path6186"
d="m 31.289175,209.41568 c 0,-1.34498 1.090066,-2.43505 2.435051,-2.43505 l 248.876614,0 c 1.34498,0 2.43505,1.09007 2.43505,2.43505 l 0,7.67912 c 0,1.34499 -1.09007,2.43506 -2.43505,2.43506 l -248.876614,0 c -1.344985,0 -2.435051,-1.09007 -2.435051,-2.43506 z"
style="fill:#617fff;fill-opacity:0.49019602;fill-rule:nonzero;stroke:#617fff;stroke-width:0.68181419;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
sodipodi:nodetypes="sssssssss" />
<text
sodipodi:linespacing="125%"
id="text6196"
y="217.16113"
x="122.56128"
style="font-style:normal;font-weight:normal;font-size:10.9279623px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="217.16113"
x="122.56128"
id="tspan6198"
sodipodi:role="line">Bottom titlebar</tspan></text>
</g>
<g
id="g6478">
<path
inkscape:connector-curvature="0"
id="path6188"
d="m 34.31226,205.97371 c -1.34498,0 -2.43505,-1.09006 -2.43505,-2.43505 l 0,-166.37878 c 0,-1.34498 1.09007,-2.43505 2.43505,-2.43505 l 7.67911,0 c 1.34499,0 2.43506,1.090071 2.43506,2.43505 l 0,166.37878 c 0,1.34499 -1.09007,2.43505 -2.43506,2.43505 z"
style="fill:#617fff;fill-opacity:0.49019602;fill-rule:nonzero;stroke:#617fff;stroke-width:0.68181419;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
sodipodi:nodetypes="sssssssss" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.9279623px;line-height:108.00000429%;font-family:sans-serif;letter-spacing:-0.024px;word-spacing:0px;writing-mode:tb-rl;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="37.922375"
y="38.963093"
id="text6200"
sodipodi:linespacing="108%"><tspan
sodipodi:role="line"
id="tspan6202"
x="38.963093"
y="37.922375"
style="line-height:100%;letter-spacing:-0.024px">Left titlebar</tspan></text>
</g>
<g
id="g6467">
<path
sodipodi:nodetypes="sssssssss"
style="fill:#617fff;fill-opacity:0.49019602;fill-rule:nonzero;stroke:#617fff;stroke-width:0.68181419;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 274.72857,206.29548 c -1.34498,0 -2.43505,-1.09006 -2.43505,-2.43505 l 0,-166.378778 c 0,-1.34498 1.09007,-2.43505 2.43505,-2.43505 l 7.67911,0 c 1.34499,0 2.43506,1.090071 2.43506,2.43505 l 0,166.378778 c 0,1.34499 -1.09007,2.43505 -2.43506,2.43505 z"
id="path6190"
inkscape:connector-curvature="0" />
<text
sodipodi:linespacing="125%"
id="text6204"
y="32.857822"
x="278.37604"
style="font-style:normal;font-weight:normal;font-size:10.9279623px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;writing-mode:tb-rl;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="278.37604"
x="32.857822"
id="tspan6206"
sodipodi:role="line">Right titlebar</tspan></text>
</g>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.9279623px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="124.76434"
y="124.29873"
id="text6208"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan6210"
x="124.76434"
y="124.29873">Client content</tspan></text>
</g>
<g
id="g6294"
transform="matrix(2.2305168,0,0,2.2305168,435.74175,23.132349)">
<g
clip-path="url(#clipPath6269)"
transform="translate(-296.66667,17.777778)"
id="g6229">
<path
sodipodi:nodetypes="sssssssss"
style="fill:#617fff;fill-opacity:0.49019602;fill-rule:nonzero;stroke:#617fff;stroke-width:1.39999998;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 30.606602,25.392837 c 0,-2.761719 2.238281,-5 5,-5 l 245.644098,0 c 2.76172,0 5,2.238281 5,5 l 0,190.000003 c 0,2.76172 -2.23828,5 -5,5 l -245.644098,0 c -2.761719,0 -5,-2.23828 -5,-5 z"
id="path6231"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path6233"
d="m 31.289175,23.996573 c 0,-1.344985 1.090066,-2.435051 2.435051,-2.435051 l 248.876614,0 c 1.34498,0 2.43505,1.090066 2.43505,2.435051 l 0,7.679111 c 0,1.34499 -1.09007,2.43506 -2.43505,2.43506 l -248.876614,0 c -1.344985,0 -2.435051,-1.09007 -2.435051,-2.43506 z"
style="fill:#617fff;fill-opacity:0.49019602;fill-rule:nonzero;stroke:#617fff;stroke-width:0.68181419;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
sodipodi:nodetypes="sssssssss" />
<path
sodipodi:nodetypes="sssssssss"
style="fill:#617fff;fill-opacity:0.49019602;fill-rule:nonzero;stroke:#617fff;stroke-width:0.68181419;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 31.289175,209.41568 c 0,-1.34498 1.090066,-2.43505 2.435051,-2.43505 l 248.876614,0 c 1.34498,0 2.43505,1.09007 2.43505,2.43505 l 0,7.67912 c 0,1.34499 -1.09007,2.43506 -2.43505,2.43506 l -248.876614,0 c -1.344985,0 -2.435051,-1.09007 -2.435051,-2.43506 z"
id="path6235"
inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="sssssssss"
style="fill:#617fff;fill-opacity:0.49019602;fill-rule:nonzero;stroke:#617fff;stroke-width:0.68181419;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 34.31226,205.97371 c -1.34498,0 -2.43505,-1.09006 -2.43505,-2.43505 l 0,-166.37878 c 0,-1.34498 1.09007,-2.43505 2.43505,-2.43505 l 7.67911,0 c 1.34499,0 2.43506,1.090071 2.43506,2.43505 l 0,166.37878 c 0,1.34499 -1.09007,2.43505 -2.43506,2.43505 z"
id="path6237"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path6239"
d="m 274.72857,206.29548 c -1.34498,0 -2.43505,-1.09006 -2.43505,-2.43505 l 0,-166.378778 c 0,-1.34498 1.09007,-2.43505 2.43505,-2.43505 l 7.67911,0 c 1.34499,0 2.43506,1.090071 2.43506,2.43505 l 0,166.378778 c 0,1.34499 -1.09007,2.43505 -2.43506,2.43505 z"
style="fill:#617fff;fill-opacity:0.49019602;fill-rule:nonzero;stroke:#617fff;stroke-width:0.68181419;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
sodipodi:nodetypes="sssssssss" />
<text
sodipodi:linespacing="125%"
id="text6241"
y="30.661503"
x="131.39223"
style="font-style:normal;font-weight:normal;font-size:10.9279623px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="30.661503"
x="131.39223"
id="tspan6243"
sodipodi:role="line">Top titlebar</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.9279623px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="122.56128"
y="217.16113"
id="text6245"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan6247"
x="122.56128"
y="217.16113">Bottom titlebar</tspan></text>
<text
sodipodi:linespacing="108%"
id="text6249"
y="38.963093"
x="37.922375"
style="font-style:normal;font-weight:normal;font-size:10.9279623px;line-height:108.00000429%;font-family:sans-serif;letter-spacing:-0.024px;word-spacing:0px;writing-mode:tb-rl;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="line-height:100%;letter-spacing:-0.024px"
y="37.922375"
x="38.963093"
id="tspan6251"
sodipodi:role="line">Left titlebar</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.9279623px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;writing-mode:tb-rl;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="278.37604"
y="32.857822"
id="text6253"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan6255"
x="32.857822"
y="278.37604">Right titlebar</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.9279623px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="124.76434"
y="124.29873"
id="text6257"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan6259"
x="124.76434"
y="124.29873">Client content</tspan></text>
</g>
<circle
r="26.388889"
cy="50.277779"
cx="-19.722223"
id="path6261"
style="opacity:1;fill:none;fill-opacity:1;stroke:#617fff;stroke-width:1.39999998;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<circle
r="26.388889"
cy="44.166668"
cx="313.97321"
id="circle6292"
style="opacity:1;fill:none;fill-opacity:1;stroke:#617fff;stroke-width:1.39999998;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:#617fff;stroke-width:1.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 327.02878,21.111111 419.251,82.222224"
id="path6313"
inkscape:connector-curvature="0" />
<path
style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:#617fff;stroke-width:1.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 295.08433,62.638889 339.251,162.77778"
id="path6315"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#ff0202;stroke-width:2.88000011;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 386.5517,105.25687 c 7.05033,-0.0468 12.5887,0.3286 16.84282,0.41946 5.43752,0.11613 11.28508,5.54811 11.61592,10.79433 0.19715,3.12624 0.007,7.00671 0.21837,11.9636"
id="path6319"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cssc" />
<path
sodipodi:nodetypes="cssc"
inkscape:connector-curvature="0"
id="path6321"
d="m 386.39337,110.80386 c 5.59189,-0.20902 10.42005,0.0276 14.15455,0.0712 5.96201,0.0696 9.42365,2.72239 9.41883,9.41645 -0.003,4.0189 -0.21637,9.3958 -0.25876,17.77458"
style="fill:none;fill-rule:evenodd;stroke:#ff0202;stroke-width:2.36934948;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
sodipodi:linespacing="125%"
id="text6192-0"
y="221.88589"
x="327.72714"
style="font-style:normal;font-weight:normal;font-size:10.9279623px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="221.88589"
x="327.72714"
id="tspan6194-9"
sodipodi:role="line">Shape bounding outline</tspan></text>
<text
sodipodi:linespacing="125%"
id="text6192-5"
y="208.45212"
x="328.16382"
style="font-style:normal;font-weight:normal;font-size:10.9279623px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="208.45212"
x="328.16382"
id="tspan6194-4"
sodipodi:role="line">Shape clip outline</tspan></text>
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.80000001px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 415.22882,118.2205 40.06938,0 0,99.78062 -6.2854,0"
id="path6349"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.80000001px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 410.63989,133.61111 18.88889,0 0,71.11111 -6.94444,0"
id="path6351"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.80000001px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 418.93898,200.35818 3.33912,0 0,8.64241 -3.33912,0"
id="path6353"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path6355"
d="m 445.91815,214.03874 3.33912,0 0,8.64241 -3.33912,0"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.80000001px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path6357"
d="m 371.60211,105.68444 3.33912,0 0,5.30329 -3.33912,0"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.80000001px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
sodipodi:nodetypes="cccc" />
<path
inkscape:connector-curvature="0"
id="path6359"
d="m 385.31699,32.441513 -3.33912,0 0,8.64241 3.33912,0"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.80000001px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.80000001px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 375.36211,108.26388 2.77778,0 0,-71.319435 3.61111,0"
id="path6361"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.9279623px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="386.21936"
y="40.118782"
id="text6363"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan6365"
x="386.21936"
y="40.118782">Border </tspan></text>
</svg>

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1,4 +1,4 @@
/*
/*
* client.c - client management
*
* Copyright © 2007-2009 Julien Danjou <julien@danjou.info>
@ -19,7 +19,21 @@
*
*/
/** awesome client API
/** A process window.
*
* Clients are the name used by Awesome (and X11) to refer to a window. An
* application can have multiple clients (like for dialogs) or none at all
* (like command line applications). Clients are usually grouped by classes. A
* class is the name used by X11 to help window manager distinguish between
* window and write rules for them. See the `xprop` command line application. A
* client also have a `type` and `size_hints` used to define its behavior.
*
* ![Client geometry](../images/client_geo.svg)
*
* The client `:geometry()` return a table with *x*, *y*, *width* and *height*.
* The area returned **exclude the border width**. All clients also have a
* `shape_bounding` and `shape_clip` used to "crop" the client content. Finally,
* each clients can have titlebars (see `awful.titlebar`).
*
* Furthermore to the classes described here, one can also use signals as
* described in @{signals} and X properties as described in @{xproperties}.
@ -28,6 +42,40 @@
* the documentation generation, you get the real signal name by
* removing the starting dot.
*
* Accessing client objects can be done in multiple ways depending on the
* context. To get the current focused client, use:
*
* local c = client.focus
*
* if c then
* -- do something
* end
*
* To get a list of all clients, use `client:get`
*
* for _, c in ipairs(client.get()) do
* -- do something
* end
*
* To get a callback when a new client is added, use the `manage` signal:
*
* client.connect_signal("manage", function(c)
* -- do something
* end
*
* To be notified a property changed in a client, use:
*
* client.connect_signal("property::name", function(c)
* -- do something
* end
*
* To be notified when a property change for a specific client (assuming it is
* stored in the variable `c`), use:
*
* c:connect_signal("property::name", function()
* -- do something
* end
*
* @author Julien Danjou &lt;julien@danjou.info&gt;
* @copyright 2008-2009 Julien Danjou
* @release @AWESOME_VERSION@
@ -53,57 +101,529 @@
/** Client class.
*
* @table class
* @field focus The focused `client.object`.
* @table object
*/
/** Client object.
/**
* The focused `client` or nil (in case there is none).
*
* @field window The X window id.
* @field name The client title.
* @field skip_taskbar True if the client does not want to be in taskbar.
* @field type The window type (desktop, normal, dock, ).
* @field class The client class.
* @field instance The client instance.
* @field pid The client PID, if available.
* @field role The window role, if available.
* @field machine The machine client is running on.
* @field icon_name The client name when iconified.
* @field icon The client icon.
* @field screen Client screen.
* @field hidden Define if the client must be hidden, i.e. never mapped,
* @tfield client focus
*/
/**
* The X window id.
*
* **Signal:**
*
* * *property::window*
*
* @property window
* @param string
*/
/**
* The client title.
*
* **Signal:**
*
* * *property::name*
*
* @property name
* @param string
*/
/**
* True if the client does not want to be in taskbar.
*
* **Signal:**
*
* * *property::skip\_taskbar*
*
* @property skip_taskbar
* @param boolean
*/
/**
* The window type.
*
* Valid types are:
*
* * **desktop**: The root client, it cannot be moved or resized.
* * **dock**: A client attached to the side of the screen.
* * **splash**: A client, usually without titlebar shown when an application starts.
* * **dialog**: A dialog, see `transient_for`.
* * **menu**: A context menu.
* * **toolbar**: A floating toolbar.
* * **utility**:
* * **dropdown_menu**: A context menu attached to a parent position.
* * **popup_menu**: A context menu.
* * **notification**: A notification popup.
* * **combo**: A combobox list menu.
* * **dnd**: A drag and drop indicator.
* * **normal**: A normal application main window.
*
* More information can be found [here](https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472629520)
*
* **Signal:**
*
* * *property::type*
*
* @property type
* @param string
*/
/**
* The client class.
*
* If the client has multiple classes, the first one is used.
*
* To get a client class from the command line, use te `xprop` command.
*
* **Signal:**
*
* * *property::class*
*
* @property class
* @param string
*/
/**
* The client instance.
*
* **Signal:**
*
* * *property::instance*
*
* @property instance
* @param string
*/
/**
* The client PID, if available.
*
* **Signal:**
*
* * *property::pid*
*
* @property pid
* @param number
*/
/**
* The window role, if available.
*
* **Signal:**
*
* * *property::role*
*
* @property role
* @param string
*/
/**
* The machine client is running on.
*
* **Signal:**
*
* * *property::machine*
*
* @property machine
* @param string
*/
/**
* The client name when iconified.
*
* **Signal:**
*
* * *property::icon\_name*
*
* @property icon_name
* @param string
*/
/**
* The client icon.
*
* **Signal:**
*
* * *property::icon*
*
* @property icon
* @param surface
*/
/**
* Client screen.
*
* **Signal:**
*
* * *property::screen*
*
* @property screen
* @param screen
*/
/**
* Define if the client must be hidden, i.e. never mapped,
* invisible in taskbar.
* @field minimized Define it the client must be iconify, i.e. only visible in
*
* **Signal:**
*
* * *property::hidden*
*
* @property hidden
* @param boolean
*/
/**
* Define it the client must be iconify, i.e. only visible in
* taskbar.
* @field size_hints_honor Honor size hints, i.e. respect size ratio.
* @field border_width The client border width.
* @field border_color The client border color.
* @field urgent The client urgent state.
* @field content An image representing the client window content (screenshot).
* @field opacity The client opacity between 0 and 1.
* @field ontop The client is on top of every other windows.
* @field above The client is above normal windows.
* @field below The client is below normal windows.
* @field fullscreen The client is fullscreen or not.
* @field maximized The client is maximized (horizontally and vertically) or not.
* @field maximized_horizontal The client is maximized horizontally or not.
* @field maximized_vertical The client is maximized vertically or not.
* @field transient_for The client the window is transient for.
* @field group_window Window identification unique to a group of windows.
* @field leader_window Identification unique to windows spawned by the same command.
* @field size_hints A table with size hints of the client: `user_position`,
* `user_size`, `program_position`, `program_size`, etc.
* @field sticky Set the client sticky, i.e. available on all tags.
* @field modal Indicate if the client is modal.
* @field focusable True if the client can receive the input focus.
* @field shape_bounding The client's bounding shape as set by awesome as a (native) cairo surface.
* @field shape_clip The client's clip shape as set by awesome as a (native) cairo surface.
* @field shape_client_bounding The client's bounding shape as set by the program as a (native) cairo surface.
* @field shape_client_clip The client's clip shape as set by the program as a (native) cairo surface.
* @field startup_id The FreeDesktop StartId.
* @field valid If the client that this object refers to is still managed by awesome.
* @field first_tag The first tag of the client. Optimized form of `c:tags()[1]`.
* @table object
*
* **Signal:**
*
* * *property::minimized*
*
* @property minimized
* @param boolean
*/
/**
* Honor size hints, e.g. respect size ratio.
*
* For example, a terminal such as `xterm` require the client size to be a
* multiple of the character size. Honoring size hints will cause the terminal
* window to have a small gap at the bottom.
*
* This is enabled by default. To disable it by default, see `awful.rules`.
*
* **Signal:**
*
* * *property::size\_hints\_honor*
*
* @property size_hints_honor
* @param boolean
* @see size_hints
*/
/**
* The client border width.
* @property border_width
* @param integer
*/
/**
* The client border color.
*
* **Signal:**
*
* * *property::border\_color*
*
* @see gears.color
*
* @property border_color
* @param pattern Any string, gradients and patterns will be converted to a
* cairo pattern.
*/
/**
* The client urgent state.
*
* **Signal:**
*
* * *property::urgent*
*
* @property urgent
* @param boolean
*/
/**
* A cairo surface for the client window content.
*
* To get the screenshot, use:
*
* gears.surface(c.content)
*
* To save it, use:
*
* gears.surface(c.content):write_to_png(path)
*
* @property content
* @param surface
*/
/**
* The client opacity.
*
* **Signal:**
*
* * *property::opacity*
*
* @property opacity
* @param number Between 0 (transparent) to 1 (opaque)
*/
/**
* The client is on top of every other windows.
* @property ontop
* @param boolean
*/
/**
* The client is above normal windows.
*
* **Signal:**
*
* * *property::above*
*
* @property above
* @param boolean
*/
/**
* The client is below normal windows.
*
* **Signal:**
*
* * *property::below*
*
* @property below
* @param boolean
*/
/**
* The client is fullscreen or not.
*
* **Signal:**
*
* * *property::fullscreen*
*
* @property fullscreen
* @param boolean
*/
/**
* The client is maximized (horizontally and vertically) or not.
*
* **Signal:**
*
* * *property::maximized*
*
* @property maximized
* @param boolean
*/
/**
* The client is maximized horizontally or not.
*
* **Signal:**
*
* * *property::maximized\_horizontal*
*
* @property maximized_horizontal
* @param boolean
*/
/**
* The client is maximized vertically or not.
*
* **Signal:**
*
* * *property::maximized\_vertical*
*
* @property maximized_vertical
* @param boolean
*/
/**
* The client the window is transient for.
*
* **Signal:**
*
* * *property::transient\_for*
*
* @property transient_for
* @param client
*/
/**
* Window identification unique to a group of windows.
*
* **Signal:**
*
* * *property::group\_window*
*
* @property group_window
* @param client
*/
/**
* Identification unique to windows spawned by the same command.
* @property leader_window
* @param client
*/
/**
* A table with size hints of the client.
*
* **Signal:**
*
* * *property::size\_hints*
*
* @property size_hints
* @param table
* @tfield integer table.user_position
* @tfield integer table.user_size
* @tfield integer table.program_position
* @tfield integer table.program_size
* @tfield integer table.max_width
* @tfield integer table.max_height
* @tfield integer table.min_width
* @tfield integer table.min_height
* @tfield integer table.width_inc
* @tfield integer table.height_inc
* @see size_hints_honor
*/
/**
* Set the client sticky, i.e. available on all tags.
*
* **Signal:**
*
* * *property::sticky*
*
* @property sticky
* @param boolean
*/
/**
* Indicate if the client is modal.
*
* **Signal:**
*
* * *property::modal*
*
* @property modal
* @param boolean
*/
/**
* True if the client can receive the input focus.
*
* **Signal:**
*
* * *property::focusable*
*
* @property focusable
* @param boolean
*/
/**
* The client's bounding shape as set by awesome as a (native) cairo surface.
*
* **Signal:**
*
* * *property::shape\_bounding*
*
* @see gears.surface.apply_shape_bounding
* @property shape_bounding
* @param surface
*/
/**
* The client's clip shape as set by awesome as a (native) cairo surface.
*
* **Signal:**
*
* * *property::shape\_clip*
*
* @property shape_clip
* @param surface
*/
/**
* The client's bounding shape as set by the program as a (native) cairo surface.
*
* **Signal:**
*
* * *property::shape\_client\_bounding*
*
* @property shape_client_bounding
* @param surface
*/
/**
* The client's clip shape as set by the program as a (native) cairo surface.
*
* **Signal:**
*
* * *property::shape\_client\_clip*
*
* @property shape_client_clip
* @param surface
*/
/**
* The FreeDesktop StartId.
*
* When a client is spawned (like using a terminal or `awful.spawn`, a startup
* notification identifier is created. When the client is created, this
* identifier remain the same. This allow to match a spawn event to an actual
* client.
*
* **Signal:**
*
* * *property::startup\_id*
*
* @property startup_id
* @param string
*/
/**
* If the client that this object refers to is still managed by awesome.
*
* To avoid errors, use:
*
* local is_valid = pcall(function() return c.valid end) and c.valid
*
* **Signal:**
*
* * *property::valid*
*
* @property valid
* @param boolean
*/
/**
* The first tag of the client. Optimized form of `c:tags()[1]`.
*
* **Signal:**
*
* * *property::first\_tag*
*
* @property first_tag
* @param tag
*/
/**
* The border color when the client is focused.
*
* @beautiful beautiful.border_focus
* @param string
*/
/**
* The border color when the client is not focused.
*
* @beautiful beautiful.border_normal
* @param string
*/
/**
* The client border width.
*
* @beautiful beautiful.border_width
* @param integer
*/
/** Return client struts (reserved space at the edge of the screen).
@ -2854,161 +3374,46 @@ client_class_setup(lua_State *L)
* @signal mouse::move
*/
signal_add(&client_class.signals, "mouse::move");
/**
* @signal property::above
*/
/* Those signals are documented elsewhere */
signal_add(&client_class.signals, "property::above");
/**
* @signal property::below
*/
signal_add(&client_class.signals, "property::below");
/**
* @signal property::class
*/
signal_add(&client_class.signals, "property::class");
/**
* @signal property::focusable
*/
signal_add(&client_class.signals, "property::focusable");
/**
* @signal property::fullscreen
*/
signal_add(&client_class.signals, "property::fullscreen");
/**
* @signal property::geometry
*/
signal_add(&client_class.signals, "property::geometry");
/**
* @signal property::group_window
*/
signal_add(&client_class.signals, "property::group_window");
/**
* @signal property::height
*/
signal_add(&client_class.signals, "property::height");
/**
* @signal property::hidden
*/
signal_add(&client_class.signals, "property::hidden");
/**
* @signal property::icon
*/
signal_add(&client_class.signals, "property::icon");
/**
* @signal property::icon_name
*/
signal_add(&client_class.signals, "property::icon_name");
/**
* @signal property::instance
*/
signal_add(&client_class.signals, "property::instance");
/**
* @signal property::keys
*/
signal_add(&client_class.signals, "property::keys");
/**
* @signal property::machine
*/
signal_add(&client_class.signals, "property::machine");
/**
* @signal property::maximized
*/
signal_add(&client_class.signals, "property::maximized");
/**
* @signal property::maximized_horizontal
*/
signal_add(&client_class.signals, "property::maximized_horizontal");
/**
* @signal property::maximized_vertical
*/
signal_add(&client_class.signals, "property::maximized_vertical");
/**
* @signal property::minimized
*/
signal_add(&client_class.signals, "property::minimized");
/**
* @signal property::modal
*/
signal_add(&client_class.signals, "property::modal");
/**
* @signal property::name
*/
signal_add(&client_class.signals, "property::name");
/**
* @signal property::ontop
*/
signal_add(&client_class.signals, "property::ontop");
/**
* @signal property::pid
*/
signal_add(&client_class.signals, "property::pid");
/**
* @signal property::role
*/
signal_add(&client_class.signals, "property::role");
/**
* @signal property::screen
*/
signal_add(&client_class.signals, "property::screen");
/**
* @signal property::shape_bounding
*/
signal_add(&client_class.signals, "property::shape_bounding");
/**
* @signal property::shape_client_bounding
*/
signal_add(&client_class.signals, "property::shape_client_bounding");
/**
* @signal property::shape_client_clip
*/
signal_add(&client_class.signals, "property::shape_client_clip");
/**
* @signal property::shape_clip
*/
signal_add(&client_class.signals, "property::shape_clip");
/**
* @signal property::size_hints_honor
*/
signal_add(&client_class.signals, "property::size_hints_honor");
/**
* @signal property::skip_taskbar
*/
signal_add(&client_class.signals, "property::skip_taskbar");
/**
* @signal property::sticky
*/
signal_add(&client_class.signals, "property::sticky");
/**
* @signal property::struts
*/
signal_add(&client_class.signals, "property::struts");
/**
* @signal property::titlebar_bottom
*/
signal_add(&client_class.signals, "property::titlebar_bottom");
/**
* @signal property::titlebar_left
*/
signal_add(&client_class.signals, "property::titlebar_left");
/**
* @signal property::titlebar_right
*/
signal_add(&client_class.signals, "property::titlebar_right");
/**
* @signal property::titlebar_top
*/
signal_add(&client_class.signals, "property::titlebar_top");
/**
* @signal property::transient_for
*/
signal_add(&client_class.signals, "property::transient_for");
/**
* @signal property::type
*/
signal_add(&client_class.signals, "property::type");
/**
* @signal property::urgent
*/
signal_add(&client_class.signals, "property::urgent");
/**
* @signal property::width