PreviousUpNext

15.4.1571  src/lib/x-kit/widget/xkit/app/gui-event-to-xevent.pkg

## gui-event-to-xevent.pkg
#
# Conversions that go the opposite direction to

#     src/lib/x-kit/widget/xkit/app/xevent-to-gui-event.pkg

# To date at least I haven't needed fullscale event
# conversion, so at the moment here we have just a
# few conversions needed by
#
#    send_fake_key_press_event
#    send_fake_key_release_event
#    send_fake_mousebutton_press_event
#    send_fake_mousebutton_release_event
#    send_fake_mouse_motion_event
#    send_fake_''mouse_enter''_event
#    send_fake_''mouse_leave''_event
#
# in
#     src/lib/x-kit/widget/xkit/app/guishim-imp-for-x.pkg

# Compiled by:
#     src/lib/x-kit/widget/xkit-widget.sublib

stipulate
    include package   threadkit;                                # threadkit                     is from   src/lib/src/lib/thread-kit/src/core-thread-kit/threadkit.pkg
    #
#   package ap  =  client_to_atom;                              # client_to_atom                is from   src/lib/x-kit/xclient/src/iccc/client-to-atom.pkg
    package au  =  authentication;                              # authentication                is from   src/lib/x-kit/xclient/src/stuff/authentication.pkg
    package gtg =  guiboss_to_guishim;                          # guiboss_to_guishim            is from   src/lib/x-kit/widget/theme/guiboss-to-guishim.pkg
#   package cpm =  cs_pixmap;                                   # cs_pixmap                     is from   src/lib/x-kit/xclient/src/window/cs-pixmap.pkg
    package cpt =  cs_pixmat;                                   # cs_pixmat                     is from   src/lib/x-kit/xclient/src/window/cs-pixmat.pkg
    package dy  =  display;                                     # display                       is from   src/lib/x-kit/xclient/src/wire/display.pkg
    package exa =  exercise_x_appwindow;                        # exercise_x_appwindow          is from   src/lib/x-kit/widget/xkit/app/exercise-x-appwindow.pkg
    package w2x =  windowsystem_to_xserver;                     # windowsystem_to_xserver       is from   src/lib/x-kit/xclient/src/window/windowsystem-to-xserver.pkg
#   package fil =  file__premicrothread;                        # file__premicrothread          is from   src/lib/std/src/posix/file--premicrothread.pkg
    package fti =  font_index;                                  # font_index                    is from   src/lib/x-kit/xclient/src/window/font-index.pkg
    package gd  =  gui_displaylist;                             # gui_displaylist               is from   src/lib/x-kit/widget/theme/gui-displaylist.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 mtx =  rw_matrix;                                   # rw_matrix                     is from   src/lib/std/src/rw-matrix.pkg
    package pen =  pen;                                         # pen                           is from   src/lib/x-kit/xclient/src/window/pen.pkg
    package r8  =  rgb8;                                        # rgb8                          is from   src/lib/x-kit/xclient/src/color/rgb8.pkg
#   package rgb =  rgb;                                         # rgb                           is from   src/lib/x-kit/xclient/src/color/rgb.pkg
    package rop =  ro_pixmap;                                   # ro_pixmap                     is from   src/lib/x-kit/xclient/src/window/ro-pixmap.pkg
    package rw  =  root_window;                                 # root_window                   is from   src/lib/x-kit/widget/lib/root-window.pkg
#   package rwv =  rw_vector;                                   # rw_vector                     is from   src/lib/std/src/rw-vector.pkg
    package a2r =  windowsystem_to_xevent_router;               # windowsystem_to_xevent_router is from   src/lib/x-kit/xclient/src/window/windowsystem-to-xevent-router.pkg
    package sep =  client_to_selection;                         # client_to_selection           is from   src/lib/x-kit/xclient/src/window/client-to-selection.pkg
    package shp =  shade;                                       # shade                         is from   src/lib/x-kit/widget/lib/shade.pkg
    package sj  =  socket_junk;                                 # socket_junk                   is from   src/lib/internet/socket-junk.pkg
    package x2s =  xclient_to_sequencer;                        # xclient_to_sequencer          is from   src/lib/x-kit/xclient/src/wire/xclient-to-sequencer.pkg
#   package tr  =  logger;                                      # logger                        is from   src/lib/src/lib/thread-kit/src/lib/logger.pkg
#   package tsr =  thread_scheduler_is_running;                 # thread_scheduler_is_running   is from   src/lib/src/lib/thread-kit/src/core-thread-kit/thread-scheduler-is-running.pkg
#   package u1  =  one_byte_unt;                                # one_byte_unt                  is from   src/lib/std/one-byte-unt.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 v2w =  value_to_wire;                               # value_to_wire                 is from   src/lib/x-kit/xclient/src/wire/value-to-wire.pkg
#   package wg  =  widget;                                      # widget                        is from   src/lib/x-kit/widget/old/basic/widget.pkg
    package wi  =  window;                                      # window                        is from   src/lib/x-kit/xclient/src/window/window.pkg
    package wme =  window_map_event_sink;                       # window_map_event_sink         is from   src/lib/x-kit/xclient/src/window/window-map-event-sink.pkg
    package wpp =  client_to_window_watcher;                    # client_to_window_watcher      is from   src/lib/x-kit/xclient/src/window/client-to-window-watcher.pkg
    package wy  =  widget_style;                                # widget_style                  is from   src/lib/x-kit/widget/lib/widget-style.pkg
#   package xc  =  xclient;                                     # xclient                       is from   src/lib/x-kit/xclient/xclient.pkg
    package g2d =  geometry2d;                                  # geometry2d                    is from   src/lib/std/2d/geometry2d.pkg
    package xj  =  xsession_junk;                               # xsession_junk                 is from   src/lib/x-kit/xclient/src/window/xsession-junk.pkg
#   package xtr =  xlogger;                                     # xlogger                       is from   src/lib/x-kit/xclient/src/stuff/xlogger.pkg

    package xet =  xevent_types;                                # xevent_types                  is from   src/lib/x-kit/xclient/src/wire/xevent-types.pkg
    package e2s =  xevent_to_string;                            # xevent_to_string              is from   src/lib/x-kit/xclient/src/to-string/xevent-to-string.pkg
    package xt  =  xtypes;                                      # xtypes                        is from   src/lib/x-kit/xclient/src/wire/xtypes.pkg
    package ts  =  xserver_timestamp;                           # xserver_timestamp             is from   src/lib/x-kit/xclient/src/wire/xserver-timestamp.pkg
    #
    # The above three are the X-specific versions of the
    # below two platform-independent packages.  X events
    # come to us from the X server in xet:: encoding.  We       # For the big dataflow diagram see   src/lib/x-kit/xclient/src/window/xclient-ximps.pkg
    # translate them to evt:: encoding and forward them to
    # guiboss_imp, which forwards them to appropriate imps.     # guiboss_imp                   is from   src/lib/x-kit/widget/gui/guiboss-imp.pkg
    #
    package evt =  gui_event_types;                             # gui_event_types               is from   src/lib/x-kit/widget/gui/gui-event-types.pkg
    package gts =  gui_event_to_string;                         # gui_event_to_string           is from   src/lib/x-kit/widget/gui/gui-event-to-string.pkg

    tracefile   =  "widget-unit-test.trace.log";
herein

    api Gui_Event_To_Xevent {
        #
        gui_keycode_to_x_keycode:               evt::Keycode     -> xt::Keycode;
        gui_mousebutton_to_x_mousebutton:       evt::Mousebutton -> xt::Mousebutton;
    };


    package gui_event_to_xevent
    :       Gui_Event_To_Xevent
    {
        fun gui_keycode_to_x_keycode ((evt::KEYCODE int): evt::Keycode)
            =
            xt::KEYCODE int;

        fun gui_mousebutton_to_x_mousebutton ((evt::MOUSEBUTTON unt): evt::Mousebutton)
            =
            xt::MOUSEBUTTON unt;
    };
end;





Comments and suggestions to: bugs@mythryl.org

PreviousUpNext