PreviousUpNext

15.3.765  src/lib/x-kit/xclient/src/window/hash-window-old.api

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

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


# This api is implemented in:
#
#     src/lib/x-kit/xclient/src/window/hash-window-old.pkg

stipulate
    package dt =  draw_types_old;                                       # draw_types_old        is from   src/lib/x-kit/xclient/src/window/draw-types-old.pkg
    package xt =  xtypes;                                       # xtypes        is from   src/lib/x-kit/xclient/src/wire/xtypes.pkg
herein
    api Hash_Window_Old {
        #
        Window_Map(X);

        exception WINDOW_NOT_FOUND;

        # Create a new table:
        #
        make_map:  Void ->  Window_Map(X);

        # Insert an item:
        #
        set:   Window_Map(X) -> (dt::Window, X) -> Void;

        # Find an item, the exception WINDOW_NOT_FOUND is raised if the
        # item doesn't exist.
        #
        get:   Window_Map(X) -> dt::Window -> X;

        # Find an item (using an id as the key), the exception WINDOW_NOT_FOUND
        # is raised if the item doesn't exist
        #
        get_window_id:   Window_Map(X) -> xt::Window_Id -> X;

        get_and_drop:   Window_Map(X) -> dt::Window -> Null_Or(X);                      # Remove a value by key, returning (THE value) if key is found, else NULL.
        drop:            Window_Map(X) -> dt::Window -> Void;                           # Remove a value by key. This is a no-op if the key is not found.

        vals_list:   Window_Map(X) ->  List(X);                                         # Return a list of the items in the table.
    };
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