PreviousUpNext

15.3.786  src/lib/x-kit/xclient/src/window/xevent-router-ximp.api

## xevent-router-ximp.api
#
# For the big picture see the imp dataflow diagrams in
#
#     src/lib/x-kit/xclient/src/window/xclient-ximps.pkg
#
# Use protocol is:
#
# Next up is parameter support for:
#    error_sink
#    to_x_sink
#    from_x_mailqueue
#
#   {   (make_run_gun ())   ->   { run_gun', fire_run_gun };
#       (make_end_gun ())   ->   { end_gun', fire_end_gun };
#
#       sx_state = sx::make_xevent_router_ximp_state ();
#       sx_ports = sx::make_xevent_router_ximp "Some name";
#       sx       = sx_ports.clientport;                                                         # The clientport represents the imp for most purposes.
#
#       ...                                                                                     # Create other app imps.
#
#       sx::configure_xevent_to_window_imp
#         (sxports.configstate, sx_state, { ... }, run_gun', end_gun', display);                # Wire imp to other imps.
#                                                                                               # All imps will start when run_gun' fires.
#
#       ...                                                                                     # Wire up other app imps similarly.
#
#       fire_run_gun ();                                                                        # Start all app imps running.
#
#       sx.send_xrequest(...);                                                                  # Many calls like this over lifetime of imp.
#       ...                                                                                     # Similar calls to other app imps.
#
#       fire_end_gun ();                                                                        # Shut the imp down cleanly.
#   };

# 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 r2k =  xevent_router_to_keymap;                                                     # xevent_router_to_keymap                       is from   src/lib/x-kit/xclient/src/window/xevent-router-to-keymap.pkg
    package xwp =  windowsystem_to_xevent_router;                                               # windowsystem_to_xevent_router                 is from   src/lib/x-kit/xclient/src/window/windowsystem-to-xevent-router.pkg
    package xes =  xevent_sink;                                                                 # xevent_sink                                   is from   src/lib/x-kit/xclient/src/wire/xevent-sink.pkg
    package xt  =  xtypes;                                                                      # xtypes                                        is from   src/lib/x-kit/xclient/src/wire/xtypes.pkg
herein


    # This api is implemented in:
    #
    #     src/lib/x-kit/xclient/src/window/xevent-router-ximp.pkg
    #
    api Xevent_Router_Ximp
    {
        Imports   = {                                                                           # Ports we use, exported by other imps.
                      xevent_router_to_keymap:          r2k::Xevent_Router_To_Keymap,           #
                      window_property_xevent_sink:      xes::Xevent_Sink,                       # 
                      selection_xevent_sink:            xes::Xevent_Sink                        # 
                    };

        Exports   = {                                                                           # Ports we export for use by other imps.
                      xevent_sink:                      xes::Xevent_Sink,                       # For xpackets from xserver via inbuf.
                      windowsystem_to_xevent_router:    xwp::Windowsystem_To_Xevent_Router              # Requests from widget/application code.
                    };

        Option = MICROTHREAD_NAME String;                                                       # 

        Xevent_Router_Egg =  Void -> (Exports,   (Imports, Run_Gun, End_Gun) -> Void);

        make_xevent_router_egg:   List(Option) -> Xevent_Router_Egg;                    # 
    };                                                                                          # api Xevent_Router_Ximp
end;




Comments and suggestions to: bugs@mythryl.org

PreviousUpNext