## atom.pkg
#
# Atoms are short integer representations
# of strings maintained by the X server.
#
# The X Inter-Client Communication Convention
# (ICCC) defines a standard set of atoms; see:
#
#
src/lib/x-kit/xclient/pkg/iccc/standard-x11-atoms.pkg#
# See also:
#
#
src/lib/x-kit/xclient/pkg/iccc/atom-imp.pkg# Compiled by:
#
src/lib/x-kit/xclient/xclient-internals.sublib# This functionality gets exported as part of the selection
# stuff in
#
#
src/lib/x-kit/xclient/xclient.pkg#
# This package also gets used in:
#
#
src/lib/x-kit/xclient/pkg/wire/value-to-wire.pkg#
src/lib/x-kit/xclient/pkg/wire/wire-to-value.pkg#
src/lib/x-kit/xclient/pkg/wire/xsocket.pkg#
src/lib/x-kit/xclient/pkg/iccc/standard-x11-atoms.pkg#
src/lib/x-kit/xclient/pkg/iccc/atom-imp.pkg#
src/lib/x-kit/xclient/pkg/iccc/atom-table.pkg#
src/lib/x-kit/xclient/pkg/window/window.pkg#
src/lib/x-kit/xclient/pkg/window/selection-imp.pkg#
src/lib/x-kit/xclient/pkg/window/window-property-imp.pkgpackage atom: (weak) api {
make_atom: xsession::Xsession -> String -> xtypes::Atom;
find_atom: xsession::Xsession -> String -> Null_Or( xtypes::Atom );
atom_to_string: xsession::Xsession -> xtypes::Atom -> String;
} {
package sn = xsession; # xsession is from
src/lib/x-kit/xclient/pkg/window/xsession.pkg fun intern xsession arg
=
wire_to_value::decode_intern_atom_reply
(
threadkit::do_mailop
(
sn::send_xrequest_and_read_reply
xsession
(value_to_wire::encode_intern_atom arg)
)
);
fun make_atom xsession name
=
intern
xsession
{ name, only_if_exists => FALSE };
fun find_atom xsession name
=
case (intern xsession { name, only_if_exists => TRUE } )
#
(xtypes::XATOM 0u0) => NULL;
xa => THE xa;
esac;
fun atom_to_string xsession atom
=
wire_to_value::decode_get_atom_name_reply
(
threadkit::do_mailop
(
sn::send_xrequest_and_read_reply
xsession
(value_to_wire::encode_get_atom_name { atom } )
)
);
}; # package xatom
## COPYRIGHT (c) 1990, 1991 by John H. Reppy. See COPYRIGHT file for details.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2012,
## released under Gnu Public Licence version 3.