## xclient-ximps.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_xsequencer_ximp_state ();
# sx_ports = sx::make_xsequencer_ximp "Some name";
# sx = sx_ports.clientport; # The clientport represents the imp for most purposes.
#
# ... # Create other app imps.
#
# sx::configure_sequencer_imp
# (sxports.configstate, sx_state, { ... }, run_gun', end_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.
#
# 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.sublibstipulate
include package threadkit; # threadkit is from
src/lib/src/lib/thread-kit/src/core-thread-kit/threadkit.pkg #
package w2x = windowsystem_to_xserver; # windowsystem_to_xserver is from
src/lib/x-kit/xclient/src/window/windowsystem-to-xserver.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 x2s = xclient_to_sequencer; # xclient_to_sequencer is from
src/lib/x-kit/xclient/src/wire/xclient-to-sequencer.pkg package xes = xevent_sink; # xevent_sink is from
src/lib/x-kit/xclient/src/wire/xevent-sink.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 xew = xerror_well; # xerror_well is from
src/lib/x-kit/xclient/src/wire/xerror-well.pkg package sok = socket__premicrothread; # socket__premicrothread is from
src/lib/std/socket--premicrothread.pkg# oldworld -- do not use:
# package dy = display_old; # display_old is from
src/lib/x-kit/xclient/src/wire/display-old.pkg package dy = display; # display is from
src/lib/x-kit/xclient/src/wire/display.pkg package xt = xtypes; # xtypes is from
src/lib/x-kit/xclient/src/wire/xtypes.pkgherein
# This api is implemented in:
#
#
src/lib/x-kit/xclient/src/window/xclient-ximps.pkg #
api Xclient_Ximps
{
Exports = { # Ports we provide for use by other imps.
windowsystem_to_xserver: w2x::Windowsystem_To_Xserver, # Used to encode and send (almost) all requests to X server. (A few requests sent during set-up bypass it.)
xevent_router_to_keymap: r2k::Xevent_Router_To_Keymap, # Used to translate X keycodes to ascii keysyms.
windowsystem_to_xevent_router: xwp::Windowsystem_To_Xevent_Router, # Provides note_new_hostwindow() and get_window_site().
xclient_to_sequencer: x2s::Xclient_To_Sequencer, #
xerror_well: xew::Xerror_Well # Used to report X-server errors to outside world.
};
Imports = { # Ports we use, provided by other imps.
window_property_xevent_sink: xes::Xevent_Sink, # We'll forward X server PropertyNotify events to this sink.
selection_xevent_sink: xes::Xevent_Sink # We'll forward X server SelectionNotify, SelectionRequest and SelectionClear events to this sink.
};
Option = MICROTHREAD_NAME String; #
Xclient_Ximps_Egg = Void -> (Exports, (Imports, Run_Gun, End_Gun) -> Void);
make_xclient_ximps_egg
:
( sok::Socket (X, sok::Stream(sok::Active)),
dy::Xdisplay,
xt::Drawable_Id,
List(Option)
)
->
Xclient_Ximps_Egg;
}; # api Xclient_Ximps
end;