PreviousUpNext

15.4.1655  src/lib/x-kit/xclient/src/window/windowsystem-to-xevent-router.pkg

## windowsystem-to-xevent-router.pkg
#
# Requests from app/widget code to the font.
#
# 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 xt  =  xtypes;                                                                      # xtypes                                        is from   src/lib/x-kit/xclient/src/wire/xtypes.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
herein


    # This port is implemented in:
    #
    #     src/lib/x-kit/xclient/src/window/xevent-router-ximp.pkg
    #
    package windowsystem_to_xevent_router {
        #
        Envelope_Route
          = ENVELOPE_ROUTE_END  xt::Window_Id
          | ENVELOPE_ROUTE     (xt::Window_Id, Envelope_Route)
          ;
                        # XXX BUGGO FIXME Envelope_Route should be defined elswhere, with Envelope.
                        # Current Envelope is defined in src/lib/x-kit/xclient/src/window/widget-cable-old.pkg

        Windowsystem_To_Xevent_Router
          =
          {
            note_new_hostwindow
              :
              ( xt::Window_Id,
                g2d::Window_Site,
                (Envelope_Route, xet::x::Event) -> Void                                         # Where to send events headed for this window.
              )
              ->
              Void,

            get_window_site:  xt::Window_Id -> g2d::Box,

            given_window_id_pass_site
                :
                xt::Window_Id
                 -> Replyqueue
                 -> (g2d::Box -> Void)
                 -> Void,

            # This function makes the above oneshot
            # available to clients with access to
            # the Window but not the Widget.  Clients
            # with access to the Widget should use the
            #
            #     widget::seen_first_redraw_oneshot_of
            #
            # call because it is guaranteed to return
            # the required oneshot;  the below call may
            # return NULL, in which case the client thread
            # will have to sleep a bit and then retry:
            #
            get_''seen_first_expose''_oneshot_of
                :
                xt::Window_Id
                ->
                Oneshot_Maildrop(Void),


            # Application threads can wait on the oneshot
            # returned by this call; when it fires they
            # can be confident that the GUI windows exist
            # and the widget threads have been created and
            # in general the widgettree is go.
            #
            # Currently this oneshot it set when the first
            # EXPOSE xevent is received from the X server,
            # but that is internal implementation, not
            # supported external semantics:
            #
            get_''gui_startup_complete''_oneshot_of
                :
                Void
                ->
                Oneshot_Maildrop(Void)
          };
    };                                                                                          # package windowsystem_to_xevent_router
end;




Comments and suggestions to: bugs@mythryl.org

PreviousUpNext