PreviousUpNext

15.4.1483  src/lib/x-kit/xclient/pkg/window/selection.pkg

## selection.pkg
#
# A window-level view of the low-level selection operations.
#
# See also:
#     src/lib/x-kit/xclient/pkg/window/selection-imp.pkg

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






###              "If there is a problem you can't solve,
###               then there is an easier problem you
###               can't solve: find it."
###
###                                 -- George Polya


# This stuff is likely based on Dusty Deboer's
# thesis work: See Chapter 5 (pp46) in:
#     http:://mythryl.org/pub/exene/dusty-thesis.pdf

stipulate
    package sn = xsession;                      # xsession              is from   src/lib/x-kit/xclient/pkg/window/xsession.pkg
    package dt = draw_types;                    # draw_types            is from   src/lib/x-kit/xclient/pkg/window/draw-types.pkg
    package ts = xserver_timestamp;             # xserver_timestamp     is from   src/lib/x-kit/xclient/pkg/wire/xserver-timestamp.pkg
    package si = selection_imp;                 # selection_imp         is from   src/lib/x-kit/xclient/pkg/window/selection-imp.pkg
    package xt = xtypes;                        # xtypes                is from   src/lib/x-kit/xclient/pkg/wire/xtypes.pkg
herein


    package   selection
    : (weak)  Selection                         # Selection             is from   src/lib/x-kit/xclient/pkg/window/selection.api
    {
        Selection_Handle = si::Selection_Handle;

        Atom = xt::Atom;

        Xserver_Timestamp = ts::Xserver_Timestamp;

        fun selection_imp_of_screen (sn::SCREEN { xsession=>sn::XSESSION { selection_imp, ... }, ... } )
            =
            selection_imp;

        fun acquire_selection (dt::WINDOW { window_id, screen, ... }, selection, time)
            =
            si::acquire_selection
                (selection_imp_of_screen  screen)
                (window_id, selection, time);

        release_selection    = si::release_selection;
        selection_of         = si::selection_of;
        timestamp_of         = si::timestamp_of;
        selection_req_mailop = si::plea_mailop;
        selection_rel_mailop = si::release_mailop;

        fun request_selection
            {
              window => dt::WINDOW { window_id, screen, ... },
              selection,
              target,
              property,
              timestamp
            }
            =
            si::request_selection
                (selection_imp_of_screen  screen)
                {
                  window  => window_id,
                  selection,
                  target,
                  property,
                  timestamp
                };
    };

end;


## COPYRIGHT (c) 1994 by AT&T Bell Laboratories.  See COPYRIGHT file for details.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2012,
## released under Gnu Public Licence version 3.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext