PreviousUpNext

15.3.794  src/lib/x-kit/xclient/src/wire/decode-xpackets-ximp.api

## decode-xpackets-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 };
#
#       xrx_state = xrx::make_xsequencer_ximp_state ();
#       xrx_ports = xrx::make_xsequencer_ximp "Some name";
#       xrx       = xrx_ports.clientport;                                                       # The clientport represents the imp for most purposes.
#
#       ...                                                                                     # Create other app imps.
#
#       xrx::configure_sequencer_imp (xrxports.configstate, xrx_state, { ... }, run_gun' );     # 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.
#
#       xrx::do_something           (xrx, 12);                                                  # 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 xes =  xevent_sink;                                                                 # xevent_sink                           is from   src/lib/x-kit/xclient/src/wire/xevent-sink.pkg
    package xps =  xpacket_sink;                                                                # xpacket_sink                          is from   src/lib/x-kit/xclient/src/wire/xpacket-sink.pkg
herein


    # This api is implemented in:
    #
    #     src/lib/x-kit/xclient/src/wire/decode-xpackets-ximp.pkg
    #
    api Decode_Xpackets_Ximp
    {
        Exports   = {                                                                           # Ports we provide for use by other imps.
                      xpacket_sink:             xps::Xpacket_Sink                               # Carries packets to us from xserver via inbuf-ximp and then sequencer-ximp.
                    };

        Imports   = {                                                                           # Ports we use which are provided by other imps.
                      xevent_sink:              xes::Xevent_Sink                                # Carries Xevents from us toward the widget tree.
                    };
        
        Option = MICROTHREAD_NAME String;                                                       # 

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

        make_decode_xpackets_egg:   List(Option) -> Decode_Xpackets_Egg;                        # 
    };                                                                                          # api Decode_Xpackets_Ximp
end;




Comments and suggestions to: bugs@mythryl.org

PreviousUpNext