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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (download) (annotate)
Thu Jun 1 18:34:03 2000 UTC (21 years, 3 months ago) by monnier
File size: 923 byte(s)
bring revisions from the vendor branch to the trunk
(* xatoms.sml
 *
 * COPYRIGHT (c) 1990,1991 by John H. Reppy.  See COPYRIGHT file for details.
 *
 * Operations on atoms.
 *)

structure XAtoms : sig

    val internAtom : Display.display -> string -> XProtTypes.atom
    val lookupAtom : Display.display -> string -> XProtTypes.atom option
    val nameOfAtom : Display.display -> XProtTypes.atom -> string

  end = struct

    fun intern dpy arg = XReply.decodeInternAtomReply (
	  CML.sync (Display.dpyRequestReply dpy (XRequest.encodeInternAtom arg)))

    fun internAtom dpy name = intern dpy {name = name, only_if_exists = false}

    fun lookupAtom dpy name = (case (intern dpy {name = name, only_if_exists = true})
	   of (XProtTypes.XAtom 0w0) => NONE
	    | xa => SOME xa
	  (* end case *))

    fun nameOfAtom dpy atom = XReply.decodeGetAtomNameReply (
	  CML.sync (
	    Display.dpyRequestReply dpy (XRequest.encodeGetAtomName{atom = atom})))

  end (* XAtoms *)

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