PreviousUpNext

15.4.1658  src/lib/x-kit/xclient/src/window/xevent-router-to-keymap.pkg

## xevent-router-to-keymap.pkg
#
# Requests from app/widget code to keymap_ximp.
#
# For the big picture see the imp dataflow diagrams in
#
#     src/lib/x-kit/xclient/src/window/xclient-ximps.pkg
#

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



stipulate
    include package   threadkit;                                                                # threadkit                                     is from   src/lib/src/lib/thread-kit/src/core-thread-kit/threadkit.pkg
    #
    package xet =  xevent_types;                                                                # xevent_types                                  is from   src/lib/x-kit/xclient/src/wire/xevent-types.pkg
    package v1u =  vector_of_one_byte_unts;                                                     # vector_of_one_byte_unts                       is from   src/lib/std/src/vector-of-one-byte-unts.pkg
    package g2d =  geometry2d;                                                                  # geometry2d                                    is from   src/lib/std/2d/geometry2d.pkg
    package xt  = xtypes;                                                                       # xtypes                                        is from   src/lib/x-kit/xclient/src/wire/xtypes.pkg
herein


    # This port is implemented in:
    #
    #     src/lib/x-kit/xclient/src/window/keymap-ximp.pkg
    #     
    package xevent_router_to_keymap {
        #
        Xevent_Router_To_Keymap
          =
          {
            refresh_keymap:     Void -> Void,

            keycode_to_keysym:  xet::Key_Xevtinfo -> (xt::Keysym, xt::Modifier_Keys_State),

            given_keycode_pass_keysym                                                           # Imp-to-imp version of previous.
                :
                xet::Key_Xevtinfo -> Replyqueue
                                 -> (xt::Keysym -> Void)
                                 -> Void,

            keysym_to_keycode:  xt::Keysym -> Null_Or(xt::Keycode),                             # Useful for selfcheck code generating keystrokes.
                #
                # Translate a keysym to a keycode.  This is intended
                # only for occasional selfcheck use, so we just do
                # a brute-force search down every list in every slot
                # of the KEYCODE_MAP.
                #
                # Currently we ignore modifier key issues, so this
                # logic won't work very well for SHIFT-ed chars or
                # control chars.   XXX BUGGO FIXME
        
            given_keysym_pass_keycode                                                           # Imp-to-imp version of previous.
                :
                xt::Keysym -> Replyqueue
                           -> (Null_Or(xt::Keycode) -> Void)
                           -> Void
          };
    };                                                                                          # package keymap_ximp_from_app_clientport
end;




Comments and suggestions to: bugs@mythryl.org

PreviousUpNext