home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
InfoMagic Source Code 1993 July
/
THE_SOURCE_CODE_CD_ROM.iso
/
X
/
mit
/
doc
/
CLX
/
s11.doc
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Interleaf document
|
1989-10-18
|
33.7 KB
|
1,095 lines
<!OPS, Version = 5.2>
<!Document,
Print Rev Bars = no,
Final Output Device = "ps",
Default Printer = "nearest-adps">
<!Font Definitions,
F2 = Times 10 Italic,
F3 = Times 10,
F4 = Times 18 Bold,
F5 = Times 18,
F6 = Times 12 Bold,
F7 = Times 10 Bold,
F8 = Times 8 Italic,
F9 = Symbol_B 8>
<!Page,
Bottom Margin = 1 inches,
Left Margin = 1 inches,
Right Margin = 1.15 inches,
First Page = Right,
Starting Page # = Inherit,
Page # Prefix = "11<#1e>",
Hyphenation = on,
Consecutive Hyphens = 2,
Vert. Just. = off>
<!Autonumber Stream, List, 2,
Level 2 Suffix = ,
Level 2 Starting Value = 0,
Level 2 Show = no>
<!Autonumber Stream, Outline, 3,
Level 1 Symbol Type = UPPER ROMAN,
Level 2 Symbol Type = UPPER ALPHA>
<!Autonumber Stream, figure, 2,
Level 1 Prefix = "Figure ",
Level 1 Suffix = "<#1e>",
Level 1 Show = no,
Level 2 Suffix = ,
Level 2 Starting Value = 0,
Level 2 Show = no>
<!Autonumber Stream, figurelet, 2,
Level 1 Symbol Type = UPPER ALPHA,
Level 1 Prefix = "Figure ",
Level 1 Suffix = "<#1e>",
Level 1 Show = no,
Level 2 Suffix = "<#04>">
<!Autonumber Stream, invisible, 1,
Level 1 Suffix = ,
Level 1 Show = no>
<!Autonumber Stream, item, 2,
Level 2 Symbol Type = LOWER ALPHA,
Level 2 Trail = yes>
<!Autonumber Stream, paralet, 4,
Level 1 Symbol Type = UPPER ALPHA,
Level 1 Suffix = ,
Level 1 Show = no,
Level 2 Prefix = .,
Level 2 Suffix = ,
Level 3 Prefix = .,
Level 3 Suffix = ,
Level 4 Prefix = .,
Level 4 Suffix = >
<!Autonumber Stream, paranum, 4,
Level 1 Suffix = ,
Level 1 Show = no,
Level 2 Prefix = .,
Level 2 Suffix = ,
Level 3 Prefix = .,
Level 3 Suffix = ,
Level 4 Prefix = .,
Level 4 Suffix = >
<!Autonumber Stream, table, 2,
Level 1 Prefix = "Table ",
Level 1 Suffix = "<#1e>",
Level 1 Show = no,
Level 2 Suffix = >
<!Autonumber Stream, tablelet, 2,
Level 1 Symbol Type = UPPER ALPHA,
Level 1 Prefix = "Table ",
Level 1 Suffix = "<#1e>",
Level 1 Show = no,
Level 2 Suffix = "<#04>">
<!Class, arg,
Bottom Margin = 0.08 inches,
Left Margin = 1.85 inches,
First Indent = -0.25 inches,
Line Spacing = 1.121 lines,
Font = F2,
Left Tab = -0.25/0 inches>
<!Class, bullet,
Bottom Margin = 0.153 inches,
Left Margin = 1.85 inches,
First Indent = -0.25 inches,
Line Spacing = 1.121 lines,
Font = F3,
Allow Page Break Within = no,
Left Tab = -0.50/0 inches>
<!Class, caption,
Top Margin = 0.07 inches,
Bottom Margin = 0.07 inches,
Line Spacing = 1.100 lines,
Font = F4>
<!Class, fig,
Top Margin = 0.07 inches,
Bottom Margin = 0.07 inches,
Line Spacing = 1.100 lines,
Alignment = Left,
Font = F4>
<!Class, newpage,
Bottom Margin = 0 inches,
Line Spacing = 1 lines,
Alignment = Left,
Font = F5,
Hyphenation = off,
New Page = yes,
Left Tab = >
<!Class, "note",
Top Margin = 0.177 inches,
Bottom Margin = 0.334 inches,
Left Margin = 1.60 inches,
Line Spacing = 1.121 lines,
Font = F3,
Allow Page Break Within = no,
Left Tab = 0 inches,
Right Tab = 6.50 inches>
<!Class, p1para,
Bottom Margin = 0.153 inches,
Left Margin = 1.60 inches,
First Indent = -1.60 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F6,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = -1.70/0 inches>
<!Class, p1rule,
Bottom Margin = 0 inches,
Line Spacing = 1 lines,
Font = F3,
Hyphenation = off,
Allow Page Break After = no,
Left Tab = 0/0.75*13 inches>
<!Class, para,
Bottom Margin = 0.153 inches,
Left Margin = 1.60 inches,
Line Spacing = 1.121 lines,
Font = F3,
Allow Page Break Within = no,
Left Tab = 0/0.75*13 inches>
<!Class, return,
Bottom Margin = 0.077 inches,
Left Margin = 1.60 inches,
First Indent = -0.90 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F7,
Hyphenation = off,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
<!Class, secno,
Top Margin = 0.07 inches,
Bottom Margin = 0.07 inches,
Line Spacing = 1.100 lines,
Alignment = Left,
Font = F4,
Autonumber Name = paranum>
<!Class, secrule,
Bottom Margin = 0 inches,
Line Spacing = 1 lines,
Font = F3,
Hyphenation = off,
Allow Page Break After = no,
Left Tab = 0/0.75*13 inches,
Autonumber Name = table>
<!Class, sectitle,
Bottom Margin = 0 inches,
Line Spacing = 1 lines,
Alignment = Right,
Font = F4,
Hyphenation = off,
New Page = yes,
Left Tab = 0/0.75*13 inches>
<!Class, syntax,
Bottom Margin = 0.077 inches,
Left Margin = 1.60 inches,
First Indent = -0.90 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F7,
Hyphenation = off,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = -0.90/0 inches,
Right Tab = 8 inches>
<!Class, syntax0,
Bottom Margin = 0 inches,
Left Margin = 1.60 inches,
First Indent = -0.90 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F7,
Hyphenation = off,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = -0.90/0 inches,
Right Tab = 8 inches>
<!Class, "table",
Top Margin = 0.07 inches,
Bottom Margin = 0.07 inches,
Line Spacing = 1.100 lines,
Font = F7,
Autonumber Name = table>
<!Class, title,
Top Margin = 0.07 inches,
Bottom Margin = 0.07 inches,
Line Spacing = 1.100 lines,
Alignment = Right,
Font = F4,
TOC Doc Name = TOC>
<!Class, wtablin,
Bottom Margin = 0 inches,
Line Spacing = 1.121 lines,
Alignment = Left,
Font = F3,
Hyphenation = off,
Allow Page Break Within = no,
Allow Page Break After = no,
Left Tab = 0/1.50/2.50/3.70/5.20/7.50 inches>
<!Master Frame,
Name = "At Anchor",
Placement = At Anchor,
Width = 0.41 inches,
Height = 0.137 inches,
Vertical Alignment = 0.03 inches,
Diagram =
V4,
(g9,32767,0
(E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,1,0,1,1,0.066667,0.066667,6,6,0,0.066
667,6))>
<!Master Frame,
Name = p1rule,
Placement = At Anchor,
Width = 6.35 inches,
Height = 0.153 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes,
Diagram =
V4,
(g9,1,0
(v4,1,0,0.006667,0.066723,6.326667,0.066611,17,2,0)
(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
667,6))>
<First Page Header, Frame =
V4,
(g9,0,0
(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
667,6))>
<Right Page Header, Frame =
V4,
(g9,1,0
(T8,1,12,3.333333,0.32,3,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,102,11
01,2,
<title,
Font = F8>
Atoms, Properties, and Selections
<End Text>)
(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
667,6))>
<Left Page Header, Frame =
V4,
(g9,1,0
(T8,1,12,0,0.293333,3,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,102,1101,
2,
<title,
Alignment = Left,
Font = F8>
Atoms, Properties, and Selections
<End Text>)
(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
667,6))>
<Right Page Footer, Frame =
V4,
(g9,1,0
(t8,1,4,6.333333,0.266667,2,17,@nntimsps10b,\240)
(t8,2,4,0.006667,0.266667,0,17,@nntimsps8i,CLX\ Programmer's\ Reference)
(v4,3,0,0,0.066667,6.333333,0.066554,17,2,0)
(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
667,6))>
<Left Page Footer, Frame =
V4,
(g9,1,0
(t8,1,4,0,0.266667,0,17,@nntimsps10b,\240)
(t8,2,4,6.333333,0.266667,2,17,@nntimsps8i,CLX\ Programmer's\ Reference)
(v4,3,0,0.026667,0.066667,6.333333,0.066554,17,2,0)
(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
667,6))>
<sectitle,
Allow Page Break Within = no,
Allow Page Break After = no>
<|,"11<#1e>111">
<Frame,
Name = "At Anchor",
Placement = At Anchor,
Width = 4.72 inches,
Height = 0.94 inches,
Vertical Alignment = 0.03 inches,
Diagram =
V4,
(g9,1,0
(T8,1,12,0.133333,0.426667,4.563333,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048
,512,102,1101,3,
<title>
ATOMS, PROPERTIES,<HR>
AND SELECTIONS
<End Text>)
(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
667,6))>
<Frame,
Name = "At Anchor",
Placement = At Anchor,
Width = 1.626 inches,
Height = 0.938 inches,
Vertical Alignment = 0 inches,
Diagram =
V4,
(g9,1,0
(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
2,1101,3,
<secno,
TOC Doc Name = TOC>
<Autonum, paranum, 1, First = Yes>
<End Text>)
(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
2,1101,3,
<"table">
<Autonum, table, 1, First = Yes>
<End Text>)
(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
1,3,
<fig,
Alignment = Both,
Font = F7,
Autonumber Name = figure>
<Autonum, figure, 1, First = Yes>
<End Text>)
(g9,5,0
(p7,5,8,19
(g9,5,0
(g9,5,0
(v4,5,0,0.266667,0,1.6,0,17,1,0)
(v4,6,0,1.6,0,1.6,0.933333,17,1,0)
(v4,7,0,1.6,0.933333,0.266667,0.933333,17,1,0)
(v4,8,0,0.266667,0.933333,0.266667,0,17,1,0))))
(g9,10,0
(g9,10,8
(p7,10,1032,13
(g9,10,0
(g9,10,0
(v4,10,0,1.44772,0.934819,1.44772,0.146673,17,1,0)
(v4,11,0,1.44772,0.146673,1.303158,0.146673,17,1,0)
(v4,12,0,1.303158,0.146673,1.158596,0.296795,17,1,0)
(v4,13,0,1.158596,0.296795,1.158596,0.371855,17,1,0)
(v4,14,0,1.158596,0.371855,1.285088,0.371855,17,1,0)
(v4,15,0,1.285088,0.371855,1.285088,0.934819,17,1,0)
(v4,16,0,1.285088,0.934819,1.44772,0.934819,17,1,0))))
(g9,17,2048
(v4,17,33,1.140526,0.146673,1.140526,0.146673,17,0,0)
(v4,18,33,1.140526,1.160003,1.140526,1.160003,17,0,0)
(v4,19,33,1.52,1.160003,1.52,1.160003,17,0,0)
(v4,20,33,1.52,0.146673,1.52,0.146673,17,0,0)))
(g9,22,8
(p7,22,1032,13
(g9,22,0
(g9,22,0
(v4,22,0,1.074386,0.934819,1.074386,0.146673,17,1,0)
(v4,23,0,1.074386,0.146673,0.929824,0.146673,17,1,0)
(v4,24,0,0.929824,0.146673,0.785263,0.296795,17,1,0)
(v4,25,0,0.785263,0.296795,0.785263,0.371855,17,1,0)
(v4,26,0,0.785263,0.371855,0.911755,0.371855,17,1,0)
(v4,27,0,0.911755,0.371855,0.911755,0.934819,17,1,0)
(v4,28,0,0.911755,0.934819,1.074386,0.934819,17,1,0))))
(g9,29,2048
(v4,29,33,0.767192,0.146673,0.767192,0.146673,17,0,0)
(v4,30,33,0.767192,1.160003,0.767192,1.160003,17,0,0)
(v4,31,33,1.146667,1.160003,1.146667,1.160003,17,0,0)
(v4,32,33,1.146667,0.146673,1.146667,0.146673,17,0,0)))))
(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
667,6))>
<secrule,
Allow Page Break Within = no,
Allow Page Break After = yes,
Autonumber Name = >
<Index, "atom", To Named = p1rule>
<Frame,
Name = "At Anchor",
Placement = At Anchor,
Width = 6.35 inches,
Height = 0.153 inches,
Vertical Alignment = 0.007 inches,
Diagram =
V4,
(g9,1,0
(v4,1,0,0.006667,0.066723,6.333333,0.066611,17,2,0)
(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
667,6))>
<p1para,
Alignment = Both,
Font = F3,
Allow Page Break After = yes>
<F6>Atoms<Tab><F7>11.1<F0><#04>In X, an <F2>atom<F0> is a unique
ID used as the name for certain server resources <#1f> properties
and selections.
<para>
In CLX, an atom is represented by a keyword symbol. For convenience,
CLX functions also allow atoms to be specified by strings and non<#1e>keyword<SP>
symbols. <F7>xatom<F0> is a CLX data type that permits either string
or symbol<SP>values. A string is equivalent to the <F7>xatom<F0>
given by (<F7>intern<F0> <F2>string<F0> <F7>'keyword<F0>). A<SP>symbol
is equivalent to the <F7>xatom<F0> given by (<F7>intern<F0> (<F7>symbol<#1e>
name<F0> <F2>symbol<F0>) <F7>'keyword<F0>).<SP>The symbol name
string of an <F7>xatom<F0> must consist only of ISO Latin<SP>characters.
Note that the case of <F7>xatom<F0> strings is important; the <F7>xatom
<F0><SP><#7f>Atom" is not the same as the <F7>xatom<F0> <#7f>ATOM".
Certain atoms are already predefined by every X server. Predefined
atoms are designed to represent common names that are likely to be
useful for many client applications. Note that these atoms are predefined
only in the sense of having <F7>xatom<F0> and <F7>card29<F0> values,
not in the sense of having required semantics. No interpretation is
placed on the meaning or use of an atom by the server. The <F7>xatom<F0>
objects predefined by CLX are listed below.<Index, "CLX", Sort String = clx, "xatom objects">
<wtablin,
Bottom Margin = 0.15 inches,
Left Margin = 1.60 inches,
Left Tab = 0/1.45/2.50/3.30/5.20/7.50 inches>
<F7>:arc<Tab>:italic_angle<Tab><Tab>:string<HR>
:atom<Tab>:max_space<Tab><Tab>:subscript_x<HR>
:bitmap<Tab>:min_space<Tab><Tab>:subscript_y<HR>
:cap_height<Tab>:norm_space<Tab><Tab>:superscript_x<HR>
:cardinal<Tab>:notice<Tab><Tab>:superscript_y<HR>
:colormap<Tab>:pixmap<Tab><Tab>:underline_position<HR>
:copyright<Tab>:point<Tab><Tab>:underline_thickness<HR>
:cursor<Tab>:point_size<Tab><Tab>:visualid<HR>
:cut_buffer0<Tab>:primary<Tab><Tab>:weight<HR>
:cut_buffer1<Tab>:quad_width<Tab><Tab>:window<HR>
:cut_buffer2<Tab>:rectangle<Tab><Tab>:wm_class<HR>
:cut_buffer3<Tab>:resolution<Tab><Tab>:wm_client_machine<HR>
:cut_buffer4<Tab>:resource_manager<Tab>:wm_command<HR>
:cut_buffer5<Tab>:rgb_best_map<Tab><Tab>:wm_hints<HR>
:cut_buffer6<Tab>:rgb_blue_map<Tab><Tab>:wm_icon_name<HR>
:cut_buffer7<Tab>:rgb_color_map<Tab><Tab>:wm_icon_size<HR>
:drawable<Tab>:rgb_default_map<Tab>:wm_name<HR>
:end_space<Tab>:rgb_gray_map<Tab><Tab>:wm_normal_hints<HR>
:family_name<Tab>:rgb_green_map<Tab>:wm_size_hints<HR>
:font<Tab>:rgb_red_map<Tab><Tab>:wm_transient_for<HR>
:font_name<Tab>:secondary<Tab><Tab>:wm_zoom_hints<HR>
:full_name<Tab>:strikeout_ascent<Tab>:x_height<HR>
:integer<Tab>:strikeout_descent
<para,
New Page = yes>
<|,"11<#1e>112">When creating a new atom, the following conventions should be
obeyed in order to minimize the conflict between atom names:
<bullet>
<F9>w<Tab><F0>Symbol names beginning with an underscore should be
used for atoms that are private to a particular vendor or organization.
An additional prefix should identify the organization.
<F9>w<Tab><F0>Symbol names beginning with two underscores should
be used for atoms that are private to a single application or end
user.
<para>
CLX provides functions to convert between an <F7>xatom<F0> and its
corresponding ID<SP>integer. The data type of an atom ID is<F7> card29<F0>.
The <F7>xatom<F0> representation<SP>is usually sufficient for most
CLX programs. However, it is occasionally<SP>useful to be able to
convert an atom ID returned in events or properties<SP>into its corresponding
<F7>xatom<F0>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
atom<#1e>name <F2>display atom<#1e>id<F0><Tab><F3>Function<Index, Doc = operations, "xlib:atom<#1e>name", Sort String = "atom<#1e>name">
<return>
<Tab><F3>Returns: <F2><HR>
atom<#1e>name<F3> <#1f> Type <F0>keyword<F3>.<F2>
<para>
Returns the atom keyword for the <F2>atom<#1e>id<F0> on the given <F2>displa
y<F0> server.
<arg>
display <#1f> <F3>A <F7>display<F3> object.
atom<#1e>id <#1f> <F3>A <F7>card29<F3>.
<syntax0>
find<#1e>atom <F2>display atom<#1e>name<F0><Tab><F3>Function<Index, Doc = operations, "xlib:find<#1e>atom", Sort String = "find<#1e>atom">
<return>
<Tab><F3>Returns: <F2><HR>
atom<#1e>id<F3> <#1f> Type <F0>card29<F3> or <F0>null<F3>.
<para>
Returns the atom ID for the given <F2>atom<#1e>nam<F0>e, if it exists.
If no atom of<SP>that name exists for the display server, <F7>nil<F0>
is returned.
<arg>
display <#1f> <F3>A <F7>display<F3> object.
atom<#1e>name <#1f> <F3>An <F7>xatom<F3>.
<syntax0>
intern<#1e>atom <F2>display atom<#1e>name<F0><Tab><F3>Function<Index, Doc = operations, "xlib:intern<#1e>atom", Sort String = "intern<#1e>atom">
<return>
<Tab><F3>Returns: <F2><HR>
atom<#1e>id<F3> <#1f> Type <F0>card29<F3> or<F0> null<F3>.
<para>
Creates an atom with the given name and returns its atom ID. The atom
can<SP>survive the interning client; it exists until the last server
connection has<SP>been closed and the server resets itself.
<arg>
display <#1f> <F3>A <F7>display<F3> object.
atom<#1e>name <#1f> <F3>An<F7> xatom<F3>.
<p1rule>
<Index, "property", To Named = p1rule>
<Frame,
Name = p1rule,
Placement = At Anchor,
Width = 6.35 inches,
Height = 0.153 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes>
<p1para,
Alignment = Both,
Font = F3,
Allow Page Break After = yes>
<F6>Properties<Tab><F7>11.2<F0><#04>For each window, an X server
can record a set of <F2>properties<F0>.<SP>Properties are a general
mechanism for clients to associate arbitrary data<SP>with a window,
and for clients to communicate window data to each other via<SP>the
server. No interpretation is placed on property data by the server<SP>itself.
<para>
A property consists of a name, a type, a data format, and data. The
name of<SP>a property is given by an atom. The property type is another
atom used to<SP>denote the intended interpretation of the property
data. The property<SP>formats specifies whether the property data
should be treated as a set of<SP>8<#1e>, 16<#1e>, or 32<#1e>bit elements.
The property format must be specified so that the<SP>X server can
communicate property data with the correct byte order.
CLX provides functions to:
<bullet>
<|,"11<#1e>113"><F9>w<Tab><F0>Create or change a property
<F9>w<Tab><F0>Return property data
<F9>w<Tab><F0>List window properties
<F9>w<Tab><F0>Delete a property
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
change<#1e>property <F2>window property data type format <F3>&key
(<F0>:mode<F3> <F0>:replace<F3>) <F0><Tab><F3>Function<Index, Doc = operations, "xlib:change<#1e>property", Sort String = "change<#1e>property"><HR>
(<F0>:start<F3> 0) <F0>:end<F2> <F0>:transform
<para>
Creates a new window property or changes an existing property. A<SP><F7>:prope
rty<#1e>notify<F0> event is generated for the <F2>window<F0>.
If the <F7>:mode<F0> is <F7>:replace<F0>, the new <F2>data<F0>, <F2>type
<F0>, and <F2>format<F0> replace any<SP>previous values. The subsequence
of previous data elements that are<SP>replaced is defined by the <F7>:start
<F0> and <F7>:end<F0> indexes.
If the <F7>:mode<F0> is <F7>:prepend<F0> or <F7>:append<F0>,
no previous data is changed, but<FJ>
the new <F2>data<F0> is added at the beginning or the end, respectively.
For these<SP>modes, if the <F2>property<F0> already exists, the
new <F2>type<F0> and <F2>format<F0> must<SP>match the previous
values.
The <F7>:transform<F0>, if given, is a function used to compute
the actual property<SP>data stored. The <F7>:transform<F0>, which
must accept a single data element and<SP>return a single transformed
data element, is called for each data element.<SP>If the <F2>data<F0>
is a string, the default <F7>:transform<F0> function transforms<SP>each
character into its ASCII code; otherwise, the default is to store
the<SP><F2>data<F0> unchanged.
<arg>
window <#1f> <F3>A <F7>window<F3>.
property<F3> <F0><#1f> <F3>A property name <F7>xatom<F3>.
data <#1f> <F3>A sequence of property data elements.
type <#1f> <F3>The property type <F7>xatom<F3>.
format <#1f> <F3>One of 8, 16, or 32.
<F7>:mode<F0> <#1f> <F3>One of <F7>:replace<F3>, <F7>:append<F3>,
or <F7>:prepend<F3>.
<F7>:start, :end <F3><#1f><F0> <F3>Specify the subsequence of
previous data replaced when <F7>:mode<F3><SP>is <F7>:replace<F3>.
<F7>:transform<F0> <#1f> <F3>A function that transforms each data
element into a data<SP>value to store.
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
delete<#1e>property <F2>window property<F0><Tab><F3>Function<Index, Doc = operations, "xlib:delete<#1e>property", Sort String = "delete<#1e>property">
<para>
Deletes the <F2>window property<F0>. If the <F2>property<F0> already
exists, a<SP><F7>:property<#1e>notify<F0> event is generated for
the <F2>window<F0>.
<arg>
window <#1f> <F3>A <F7>window<F3>.
property <#1f> <F3>A property name <F7>xatom<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
<|,"11<#1e>114">get<#1e>property <F2>window property <F3>&key <F0>:type<F3>
(<F0>:start<F3> 0) <F0>:end :delete<#1e>p <Tab><F3>Function<Index, Doc = operations, "xlib:get<#1e>property", Sort String = "get<#1e>property"><HR>
(<F0>:result<#1e>type 'list<F3>) <F0>:transform
<return>
<Tab><F3>Returns: <F2><HR>
data <F3><#1f> Type <F0>sequence<F3>.<F2> <HR>
type <F3><#1f> Type <F0>xatom<F3>.<F2> <HR>
format <F3><#1f> Type (<F0>member 8 16 32<F3>).<F2> <HR>
bytes<#1e>after <F3><#1f> Type <F0>card32<F3>.
<para>
Returns a subsequence of the data for the window property. The <F7>:start
<F0> and<SP><F7>:end<F0> indexes specify the property <F2>data<F0>
elements returned. The <F7>:transform<F0><SP>function is called
for elements of the specified subsequence to compute the<SP><F2>data<F0>
sequence returned. The property <F2>type<F0> and <F2>format<F0>
are also returned.<SP>The final return value gives the actual number
of data bytes (not elements)<SP>following the last data element returned.
If the <F2>property<F0> does not exist, the returned <F2>data<F0>
and <F2>type<F0> are <F7>nil<F0> and<SP>the returned <F2>format<F0>
and <F2>bytes<#1e>after<F0> are zero.
If the given <F7>:type<F2> <F0>is non<#1e><F7>nil<F0> but does
not match the actual property type,<SP>then the <F2>data<F0> returned
is <F7>nil<F0>, the <F2>type<F0> and <F2>format<F0> returned
give the actual<SP>property values, and the <F2>bytes<#1e>after<F0>
returned gives the total number of bytes<SP>(not elements) in the
property data.
If the given <F7>:type<F0> is <F7>nil<F0> or if it matches the
actual property type, then:
<bullet>
<F9>w<Tab><F0>The <F2>data<F0> returned is the transformed subsequence
of the property data.
<F9>w<Tab><F0>The <F2>type<F0><SP>and <F2>format<F0> returned
give the actual property values.
<F9>w<Tab><F0>The <F2>bytes<#1e>after<F0><SP>returned gives the
actual number of data bytes (not elements) following the<SP>last data
element returned.
<para>
In this case, the <F7>:delete<#1e>p<F0> argument is also<SP>examined.
If <F7>:delete<#1e>p<F0> is true and <F2>bytes<#1e>after<F0> is
zero, the property<SP>is deleted and a <F7>:property<#1e>notify<F0>
event is generated for the <F2>window<F0>.
<arg>
window <#1f> <F3>A <F7>window<F3>.
property <#1f> <F3>A property name <F7>xatom<F3>.
<F7>:type<F0> <#1f> <F3>The requested type <F7>xatom<F3> or <F7>nil<F3>.
<F7>:start<F3>, <F7>:end<F0> <#1f> <F3>Specify the subsequence
of property <F0>data<F3> returned.
<F7>:transform<F0> <#1f> <F3>A function that transforms each data
element into a data<SP>value to return.
<F7>:delete<#1e>p<F0> <#1f> <F3>If true, the existing <F0>property<F3>
can be deleted.
<F7>:result<#1e>type<F0> <#1f> <F3>The t<F0>ype<F3> of data sequence
to return. Default is <F7>'list<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
list<#1e>properties <F2>window <F3>&key (<F0>:result<#1e>type 'list<F3>)
<F0><Tab><F3>Function<Index, Doc = operations, "xlib:list<#1e>properties", Sort String = "list<#1e>properties">
<return>
<Tab><F3>Returns: <F2><HR>
properties <F3><#1f> Type <F0>sequence<F3> of <F0>keyword<F3>.<F2>
<para>
Returns a sequence containing the names of all <F2>window<F0> <F2>properties
<F0>.
<arg>
window <#1f> <F3>A <F7>window<F3>.
<F7>:result<#1e>type<F0> <#1f> <F3>The type of sequence to return.
Default is <F7>'list<F3>.
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
rotate<#1e>properties <F2>window properties <F3>&optional (<F2>delta<F3>
1)<F0><Tab><F3>Function<Index, Doc = operations, "xlib:rotate<#1e>properties", Sort String = "rotate<#1e>properties">
<para>
Rotates the values of the given <F2>window properties<F0>. The value
of property <F2>i<F0> in the given sequence is changed to the value
of the property at<SP>index (<F7>mod<F0> (+ <F2>i<F0> <F2>delta<F0>)
(<F7>length<F0> <F2>properties<F0>)). This function operates much<SP>like
the <F7>rotatef<F0> macro in Common Lisp.
<|,"11<#1e>115">If (<F7>mod<F0> <F2>delta<F0> (<F7>length<F0> <F2>properties<F0>)
) is non<#1e>zero, a <F7>:property<#1e>notify<F0><SP>event is generated
on the window for each property, in the same order as<SP>they appear
in the <F2>properties<F0> sequence.
<arg>
window <#1f> <F3>A <F7>window<F3>.
properties <#1f> <F3>A sequence of <F7>xatom<F3> values.
delta <#1f> <F3>The index interval between source and destination
elements of <F0>properties<F3>.
<p1rule>
<Index, "selection", To Named = p1rule>
<Frame,
Name = p1rule,
Placement = At Anchor,
Width = 6.35 inches,
Height = 0.153 inches,
Vertical Alignment = 0.007 inches,
Shared Contents = yes>
<p1para,
Alignment = Both,
Font = F3,
Allow Page Break After = yes>
<F6>Selections<Tab><F7>11.3<F0><#04>A selection is an atom used
to identify data that can be shared among all<SP>client programs connected
to an X server. Unlike properties, the data<SP>represented by a selection
is stored by some client program, not by the<SP>server.
<para>
The data named by a selection is associated with a client window,
which is<SP>referred to as the <F2>selection owner<F0>. The server
always knows which<SP>window is the owner of a selection. Selections
can be created freely by<SP>clients using <F7>intern<#1e>atom<F0>
to create an atom. CLX provides functions to<SP>inquire or change
the owner of a selection and to <F2>convert<F0> a<SP>selection.
Conversion is the key to the use of selections for inter<#1e>client<SP>communic
ation. Suppose Client A wants to paste the contents of the data<SP>named
by selection <F2>S<F0> into his window <F2>WA<F0>. Client A calls <F7>conv
ert<#1e>selection<F0><SP>on selection atom <F2>S<F0>, sending a
conversion request to the server. The<SP>server, in turn, sends a <F7>:selecti
on<#1e>request<F0> event to the current owner of <F2>S<F0>, which
is window <F2>WB<F0> belonging to Client B. The <F7>:selection<#1e>request
<F0> event<SP>contains the <F2>requestor<F0> window (<F2>WA<F0>),
the selection atom (<F2>S<F0>), an atom<SP>identifying a requested
data type, and the name of a property of <F2>WA<F0> into<SP>which
the value of <F2>S<F0> will be stored.
Since <F2>WB<F0> is the owner of <F2>S<F0>, it must be associated
with the data defined by<SP>Client B as the value of <F2>S<F0>.
When <F2>WB<F0> gets the <F7>:selection<#1e>request<F0> event,<SP>Client
B is expected to convert the value of <F2>S<F0> to the requested
data type<SP>(if possible) and store the converted value in the given
requestor property.<SP>Client B is then expected to send a <F7>:selection<#1e>
notify<F0> event to the requestor<SP>window <F2>WA<F0>, informing
the requestor that the converted value for <F2>S<F0> is ready.<SP>Upon
receiving the <F7>:selection<#1e>notify<F0> event, Client A can
call <F7>get<#1e>property<F0><SP>to retrieve the converted value
and to paste it into <F2>WA<F0>.
<"note",
Top Margin = 0.15 inches,
Bottom Margin = 0.23 inches>
<Tab-><HR>
<F7>NOTE: <F0>Clients using selections must always be prepared to
handle<SP><F7>:selection<#1e>request<F0> events and/or <F7>:selection<#1e>no
tify<F0> events. There is no way<SP>for a client to ask not to receive
these types of events.<HR>
<Tab->
<para>
Type atoms used in selection conversion can represent arbitrary<SP>client<#1e>d
efined interpretations of the selection data. For example, if the<SP>value
of selection <F2>S<F0> is a text string, Client A might request
its typeface<SP>by requesting conversion to the <F7>:font<F0> type.
A type <F7>atom<F0> can also represent<SP>a request to the selection
owner to perform some action as a side<#1e>effect of<SP>conversion
(for example, <F7>:delete<F0>). Some of the predefined atoms of
an X<SP>server are intended to be used as selection types (for example, <F7>:c
olormap<F0>,<SP><F7>:bitmap<F0>, <F7>:string<F0>, and so forth)
However, X does not impose any requirements on the<SP>interpretation
of type atoms.
<|,"11<#1e>116">When multiple clients negotiate for ownership of a selection,
certain race<SP>conditions might be possible. For example, two clients
might each receive a<SP>user command to assert ownership of the <F7>:primary
<F0> selection, but the order in<SP>which the server processes these
client requests is unpredictable. As a<SP>result, the ownership request
initiated most recently by the user might be<SP>incorrectly overridden
by the other earlier ownership request. To prevent such<SP>anomalies,
the server records a <F2>last<#1e>changed<F0> timestamp for each
change of<SP>selection ownership.
Although inter<#1e>client communication via selections is rather complex,
it<SP>offers important benefits. Since selection communication is
mediated by an<SP>X server, clients can share data even though they
are running on different hosts<SP>and using different networking protocols.
Data storage and conversion is<SP>distributed among clients so that
the server is not required to provide all<SP>possible data types or
to store multiple forms of selection data.
Certain predefined atoms are used as standard selections, as described
in<SP>the X11 Inter<#1e>client Communications Conventions Manual.
Some of the<SP>standard selections covered by these conventions are:
<bullet>
<F9>w<Tab><F7>:primary<F2> <#1f> <F0>The <F2>primary selection<F0>.
The main vehicle for inter<#1e>client cut and paste operations.
<F9>w<Tab><F7>:secondary<F2> <#1f> <F0>The <F2>secondary selection<F0>.
In some environments, clients can use this as an auxiliary to <F7>:primary
<F0>.
<F9>w<Tab><F7>:clipboard<F2> <#1f> <F0>Analogous to akill ring.
Represents the most<SP>recently deleted data item.
<syntax,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
convert<#1e>selection <F2>selection type requestor <F3>&optional <F2>propert
y time<F0><Tab><F3>Function<Index, Doc = operations, "xlib:convert<#1e>selection", Sort String = "convert<#1e>selection">
<para>
Requests that the value of the <F2>selection<F0> be converted to
the specified <F2>type<F0><SP>and stored in the given <F2>property<F0>
of the <F2>requestor<F0> window.
If the <F2>selection<F0> has an owner, the X server sends a :<F7>selection<#1e>
request<F0><SP>event to the owner window. Otherwise, if no owner
exists, the server<SP>generates on the requestor a <F7>:selection<#1e>notify
<F0> event containing a <F7>nil<F0><SP><F2>property<F0> atom.
<para,
Bottom Margin = 0.10 inches>
The given <F2>property<F0> specifies the requestor property that
will receive the<SP>converted value. If the <F2>property<F0> is
omitted, the <F2>selection<F0> owner will<SP>define a property to
use. The <F2>time<F0> furnishes a timestamp representing the<SP>time
of the conversion request; by default, the current server time is
used.
<"note",
Top Margin = 0.10 inches,
Bottom Margin = 0.20 inches>
<Tab-><HR>
<F7>NOTE: <F0>Standard conventions for inter<#1e>client communication
require that both<SP>the requestor property and the time must be specified.
If possible, the<SP>time should be the time of a user event which
initiated the conversion.<SP>Alternatively, a timestamp can be obtained
by calling <F7>change<#1e>property<F0> to<SP>append zero<#1e>length
data to some property; the timestamp in the resulting<SP><F7>:property<#1e>not
ify<F0> event can then be used.<HR>
<Tab->
<arg>
selection <#1f> <F3>The <F7>xatom<F3> for the selection name.
type <#1f> <F3>The <F7>xatom<F3> for the requested data type.
requestor <#1f> <F3>The <F7>window<F3> to receive the converted <F0>selecti
on<F3> value.
property <#1f> <F3>The <F7>xatom<F3> for the requestor property
to receive the converted<SP>value.
time <#1f> <F3>A <F7>timestamp<F3>.
<syntax,
Bottom Margin = 0 inches,
Left Tab = -0.90/0 inches,
Right Tab = 7.50 inches>
<|,"11<#1e>117">selection<#1e>owner <F2>display selection<F3> &optional <F2>time<F0><Tab>
<F3>Function<Index, Doc = operations, "xlib:selection<#1e>owner", Sort String = "selection<#1e>owner">
<return>
<Tab><F3>Returns: <F2><HR>
owner <F3><#1f> Type <F0>window<F3> or <F0>null<F3>.
<para,
Bottom Margin = 0.14 inches>
Returns and (with <F7>setf<F0>) changes the owner and the last<#1e>changed
<F2>time<F0> for the<SP><F2>selection<F0>. If the owner is <F7>nil<F0>,
no owner for the <F2>selection<F0> exists. <SP>When the owner window
for a <F2>selection<F0> is destroyed, the <F2>selection<F0> owner<SP>is
set to <F7>nil<F0> without affecting the last<#1e>changed <F2>time<F0>.
The <F2>time<F0> argument is used only when changing the <F2>selection<F0>
owner. If the <F2>time<F0><SP>is <F7>nil<F0>, the current server
time is used. If the <F2>time<F0> is earlier than the<SP>current
last<#1e>changed time of the <F2>selection<F0> or if the <F2>time<F0>
is later<FJ>
than the<SP>current server time, the owner is not changed. Therefore,
a client<SP>should always confirm successful change of ownership by
immediately calling<SP><F7>selection<#1e>owner<F0>. If the change
in ownership is successful, the<SP>last<#1e>changed time of the <F2>selection
<F0> is set to the specified <F2>time<F0>.
<para>
If the change in ownership is successful and the new owner is different
from<SP>the previous owner, and if the previous owner is not <F7>nil<F0>,
a<SP><F7>:selection<#1e>clear<F0> event is generated for the previous
owner window.
<"note",
Top Margin = 0.10 inches,
Bottom Margin = 0.20 inches>
<Tab-><HR>
<F7>NOTE: <F0>Standard conventions for inter<#1e>client communication
require that a<SP>non<#1e>nil time must be specified. If possible,
the time should be the time<FJ>
of a<SP>user event which initiated the change of ownership. Alternatively,
a<FJ>
timestamp can be obtained by calling change<#1e>property to append
zero<#1e>length<SP>data to some property; the timestamp in the resulting <F7>:
property<#1e>notify<F0> event can then be used.<HR>
<Tab->
<arg>
display<F3> <#1f> A <F7>display<F3>.
selection<F3> <#1f> The <F7>xatom<F3> for the selection name.
time<F3> <#1f> A <F7>timestamp<F3>.
<newpage>
<|,"11<#1e>118">