PreviousUpNext

15.4.1628  src/lib/x-kit/xclient/src/window/hash-window.pkg

## hash-window.pkg
#
# A hashtable package for hashing on windows.

# Compiled by:
#     src/lib/x-kit/xclient/xclient-internals.sublib



stipulate
    package sn  =  xsession_junk;                       # xsession_junk                 is from   src/lib/x-kit/xclient/src/window/xsession-junk.pkg
#   package dt =  draw_types;                           # draw_types                    is from   src/lib/x-kit/xclient/src/window/draw-types.pkg
    package hx =  hash_xid;                             # hash_xid                      is from   src/lib/x-kit/xclient/src/stuff/hash-xid.pkg
herein


    package   hash_window
    : (weak)  Hash_Window                               # Hash_Window                   is from   src/lib/x-kit/xclient/src/window/hash-window.api
    {
        Window_Map(X) =  hx::Xid_Map(X);

        exception WINDOW_NOT_FOUND
            =
            lib_base::NOT_FOUND;

        make_map =  hx::make_map;

        fun get m ({ window_id, ... }: sn::Window)
            =
            hash_xid::get  m  window_id;

        get_window_id =  hx::get;

        fun set          m ({ window_id, ... }: sn::Window, a) =  hx::set           m  (window_id, a);
        fun drop         m ({ window_id, ... }: sn::Window   ) =  hx::drop          m   window_id;
        fun get_and_drop m ({ window_id, ... }: sn::Window   ) =  hx::get_and_drop  m   window_id;

        fun vals_list  table
            =
            map #2 (hx::keyvals_list table);

    };                                  # package hash_window
end;

## COPYRIGHT (c) 1990, 1991 by John H. Reppy.  See SMLNJ-COPYRIGHT file for details.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext