Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/eXene/lib/iccc/xatoms.sml
ViewVC logotype

Annotation of /sml/trunk/src/eXene/lib/iccc/xatoms.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (view) (download)

1 : monnier 2 (* xatoms.sml
2 :     *
3 :     * COPYRIGHT (c) 1990,1991 by John H. Reppy. See COPYRIGHT file for details.
4 :     *
5 :     * Operations on atoms.
6 :     *)
7 :    
8 :     structure XAtoms : sig
9 :    
10 :     val internAtom : Display.display -> string -> XProtTypes.atom
11 :     val lookupAtom : Display.display -> string -> XProtTypes.atom option
12 :     val nameOfAtom : Display.display -> XProtTypes.atom -> string
13 :    
14 :     end = struct
15 :    
16 :     fun intern dpy arg = XReply.decodeInternAtomReply (
17 :     CML.sync (Display.dpyRequestReply dpy (XRequest.encodeInternAtom arg)))
18 :    
19 :     fun internAtom dpy name = intern dpy {name = name, only_if_exists = false}
20 :    
21 :     fun lookupAtom dpy name = (case (intern dpy {name = name, only_if_exists = true})
22 :     of (XProtTypes.XAtom 0w0) => NONE
23 :     | xa => SOME xa
24 :     (* end case *))
25 :    
26 :     fun nameOfAtom dpy atom = XReply.decodeGetAtomNameReply (
27 :     CML.sync (
28 :     Display.dpyRequestReply dpy (XRequest.encodeGetAtomName{atom = atom})))
29 :    
30 :     end (* XAtoms *)

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0