[ANNOUNCE] libei 0.2

Peter Hutterer peter.hutterer at who-t.net
Wed Mar 2 00:58:52 UTC 2022


libei 0.2 is now available. libei is a library to send
Emulated Input (EI) to a matching Emulated Input Server (EIS) which can
receive those events with libeis, also part of this project.

libei uses GitLab releases, for tarballs please see:
https://gitlab.freedesktop.org/libinput/libei/-/releases/0.2

This is a development snapshot and neither API nor ABI should be considered
stable. Anyone using libei or libeis must keep both in sync, there are no
accommodations made for libei/libeis from different versions and the wire
protocol may break at any time.

Please see the API documentation here:
https://libinput.pages.freedesktop.org/libei/

The git shortlog is below:

David Edmundson (1):
      tools/demo-server: create a seat in uinput mode

David Redondo (3):
      Implement support for scroll events
      Allow compiling against newer protobuf-c
      Free lockfile path

Olivier Fourdan (1):
      libei: Do not abort if LIBEI_SOCKET is not set

Peter Hutterer (429):
      Initial commit
      libei: change the device creation API a bit
      libei: make the pointer/touch ranges constant and client-determined
      libeis: caps shouldn't be a bitmask
      Simplify the suspend/resume behavior
      Update keymap handling
      examples: update for the latest API changes
      Drop the _ctx suffix to the main structs
      libei: add a HELLO message on connect
      libeis: add the init bits for a new libeis context for unix sockets
      libeis: declare a few extra functions that will be useful
      Add the minimal implementation for a UNIX socket libeis server
      libeis: remove existing devices before disconnecting the client
      libeis: avoid a cleanup double-free
      client: handle the case of zero data bytes
      tools: handle device removal
      tools: handle multiple events after a single dispatch()
      libeis: whitespace fix
      libeis: fix wrong message field assignment
      libeis: only log client state transitions if they changed
      Add the minimal implementation for a UNIX socket libei client
      tools: terminate the example server correctly on SIGINT
      meson: fix header installation and pkgconfig libraries
      tools: make the socket server example take a socket path
      README: add some clarification for why libei
      libei: add a hook to configure the client name
      libei: take the LIBEI_SOCKET variable if the socket path is NULL
      libeis: remove the socket on exit
      tools: default to the LIBEI_SOCKET if present
      Send the trailing null byte for composed string messages
      utils: update the buffer length when appending data
      util: remove the source from the removed_list on destroy
      libeis: only remove the source on disconnect, don't destroy it
      meson.build: drop spaces before colon
      util: fix the fd reading
      util: add some documentation for the iobuf helpers
      test: add a test for the util-io helpers
      Replace the custom message parsing with protobuf
      README: make a note about the Xwayland PoC and short-lived apps
      Process multiple messages in one dispatch
      Use send() instead of write() to prevent SIGPIPE
      Add a missing empty line
      utils: Rename OBJECT_DECLARE... to OBJECT_IMPLEMENT
      proto: add a protocol specification
      proto: add a fixed-length frame message
      Implement pointer button and keyboard key events
      tools: add key events to the example client
      Make the button events carry event codes, not indices
      libei: switch to passive naming for accepted/removed messages
      libei: implement a few missing functions
      libei: add a few comments and extra checks
      libei: documentation updates
      test: add some internal unit-tests to libei
      test: remove an unnecssary arg for the iotest
      libei: switch to a single ei_new() function
      libei: rename to ei_setup_backend_socket()
      libei: don't ref the event on return
      libeis: handle other events during unref
      libeis: don't ref the event on return
      tools: stop immediately on a disconnect event
      libei: add a backend to work off a single fd
      libeis: switch to a single eis_new() function
      libei: remove unused connection field
      libei: fix source removal on ei_disconnect
      utils: rename the sources close behavior for extra clarity
      tools: fix a few memleaks on errors
      libeis: rename to eis_setup_backend_socket()
      libei: implement device_get_name()
      libei: implement ei_peek_event()
      util: add flag_set and flag_clear helpers
      eis: implement eis_peek_event() and eis_next_event_type()
      util: fix the example for DEFINE_TRIVIAL_CLEANUP_FUNC
      eis: implement an fd backend
      libei: fix the source ref handling
      util: add a tristate helper
      Add a test suite
      Fix the sources ref handling again
      util: add a realloc helper
      test: add a test for the sources utility functions
      libei: rename _NEW state to _HELLO
      More source ref fixes
      test: fix a memleak in the unit tests
      libeis: fix the client ref handling and move the list to the eis context
      test: fix a leaking client name in the unit tests
      libeis: disconnect clients on context destroy
      libei: free all devices on context removal
      test: drain all events before exiting
      libei: discard all events on the final unref
      libeis: drain events before destroying the context
      util: change the sources API to source_new and sink_add_source
      libeis: fix a crasher if the socket is removed before a listener starts
      Drop the "hello" message
      libeis: a device in NEW state must be disconnected too
      Add configuration messages to the protocol
      util: add a missing include to util-io.h
      test: switch to SOCK_STREAM for the test sockets
      proto: specify that the protocol isn't batch-compatible after all
      libei: update the API docs a bit
      libreis: update the API docs a bit
      Rename "accepted" to "added" for consistency with the public API
      Add a prefix to the logger
      Add capabilities to the Added event
      test: fix the device add test
      Downgrade the ECANCELED warning to a mere info
      util: add name lookup to tristate handling
      eis: send the removed deviceid down the wire
      Add a bunch of log_debug messages
      test: fix the default behaviour of the peck EI context
      test: fix the accept/reject behaviour for peck eis contexts
      test: add a test for a device dropped to zero caps and refused
      test: use drop caps, not reject caps as terminology
      README: add a blurb about libreis
      README: update the blurb about batched processing
      More log messages for debugging
      libei: send the name in the original connect message
      meson.build: eierpecken helper lib must link against ei and eis
      meson.build: rename the test binary eitest
      test: move the with_server/with_client helper macros to eierpecken.h
      test: fix the suite name for the EI integration tests
      test: add EIS integration tests
      util: add a errno wrapper
      tools: change the default socket to $XDG_RUNTIME_DIR/eis-0
      libeis: plug a memory leak if we get more than one message per dispatch
      libeis: keep a ref of the client during dispatch
      libeis: unify the wire message logging in one place
      Improve naming for the DeviceAdded message
      libei: drop the nested event types
      libei: unify the wire message logging in one place
      libei: define a cleanup helper for the internal message
      libei: ei_get_user_data() is a public API
      libei: use a macro to define the tests
      libei: rework the wire message parsing for slightly better readability
      Switch the various coordinates to doubles
      tools: use a cleanup function for unlinking the socket
      libei: plug a memleak if we get more than one message
      test: fix an unused variable complaint
      Drop ei_next_event_type() and eis_next_event_type()
      libei: some more API documentation
      libei: use a #define for cleaning up a device
      test: terminate the test list with NULL
      test: better event type logging
      test: add a helper to wait until a stable state
      test: fix behavior handling for accepting/rejecting clients
      test: add helpers for the next event
      libei: add the hooks for pointer/touch ranges
      libeis: flatten the event hierarchy
      libeis: two coding style fixes
      libei: move the protocol parsing into a separate file
      libeis: move the protocol parsing into a separate file
      Move the next message helper into a shared function
      libeis: use the shared next_message helper
      test: fix the naming of some unit tests
      brei: add a dispatch helper function for protocol messages
      Factor out munit test handling into a set of helpers
      test: rename two tests to reflect current nomenclature
      test: rename a helper function
      test: add some documentation for the test helpers
      libei: if we get disconnected after ei_device_add(), queue a removed event
      libei: change the behavior of the REMOVED message
      test: expand the ei tests
      libei: drop two unimplemented example init functions
      libei: some more documentation
      libei: add ei_device_get/set_user_data
      libeis: rename get_x/get_y to get_dx/get_dy
      libeis: make the device ref/unref public
      test: add helper functions for checking for no events
      Implement device suspend/resume with starting state of "suspended"
      util: remove a libinput leftover
      libei: handle a late device connect correctly
      util: move the ansi color escape sequences into a separate header
      util: add a wrapper macro for running code only once
      meson: hook up unit tests for eis as well
      libeis: use get/set user_data, not userdata
      libeis: set the user data we passed to libeis_new()
      libei: replace the logger utility with a custom logger handling
      libeis: replace the logger utility with a custom logger handling
      tools: pretty colors for the demos
      Add gitlab CI
      Fix maybe-uninitialized warnings
      util: fix use of uninitialized variable
      brei: fix use of uninitialized data
      libei: hook up the API for keymap assignments
      util: typo fix in comment
      util: add sending and receiving fds to the io utilities
      util: add fd passing to the iobufs
      brei: abstract the message type away
      libei: push the new brei_message one level up into eiproto
      brei: hook up the brei message so we can retrieve an fd
      libeis: push the new brei_message one level up into eisproto
      libei: integration of keymap fd parsing
      test: enable debug logging again
      test: add another dispatch for the suspend test
      utils: basic helper for creating a file in memory
      tools: add keymap handling to the socket demos
      Add size handling for the keymap
      util: fix a valgrind warning in xsend_with_fd
      util: fix receiving of multiple fds
      brei: fix a compiler warning in release mode
      Include stddef.h for size_t
      tools: don't re-add devices on removed
      tools: rename the ei-socket-client to ei-demo-client
      tools/ei-demo: add hooks for choosing a backend
      tools: rename the socket server tool to eis-demo-server
      tools/demo-client: hook up --verbose
      tools/demo-server: add option parsing
      tools/demo-client: make the XKB layout a commandline argument
      libeis: correct the name of the set_keymap function
      tools/demo-server: add support for keymap overrides
      tools/demo-client: print a server-side keymap if there was one
      libeis: fix the client-side keymap assignment
      test: make a separate binary for the utils tests
      test: move the sources and io tests to the util unit tests
      util: add xconnect to connect to a socket
      libei: implement org.freedesktop.portal.EmulatedInput support
      README: add a graphic to illustrate how XWayland looks like
      replace the fallthrough comments with __attribute__((fallthrough))
      libeis: implement eis_device user_data getters/setters
      util: move the colorprint to util-color
      tools/demo-client, demo-server: use the new color print functions
      tools/demo-server: use _cleanup_foo_ functions for eis and eis_event
      tools/demo-server: abstract the event handler
      tools/demo-server: add a uinput example handler
      README: jot down some notes regarding XTest vs libei
      libei: namespace the capability-specific configure calls
      libeis: namespace the capability-specific getters and setters
      meson.build: rename the libei portal pkgconfig variable to just "portal"
      Make sure the keymap_fd is always -1
      util: use xclose for the _cleanup_close_
      gitlab CI: change the repo location to the proper upstream one
      util: make the OBJECT_IMPLEMENT_CREATE no longer static by default
      Fix two minor typos
      eis: include util-object for the socket backend
      util: allow source_remove(NULL)
      eis: switch to eis_device_allow_capability()
      test: make the peck_dispatch_until_stable() a macro
      Print the event type name for debugging
      libeis: better logging of new device capabilities
      libei: export the eis_get_user_data() function
      test: use the event fetching helpers
      test: better debugging for missing events
      test: improve debug logging for the integration tests
      test: add a new peck EI behavior flag
      eis: pointer motion is in doubles, not ints
      Move the CASE_RETURN_STRING macro to util-macros.h
      libei: drop two obsolete declarations
      libei: rename a set of functions for clarity
      libei: remove ei_ prefix from the internal queue functions
      libei: better debugging of message types
      libei: move the event to string conversion to the top
      libei: better device state debugging
      libei: log the error when writing a message
      Fix client-side removal of devices
      Implement eis_device_set_name and get_name
      Add support for absolute pointer motion events
      Drop mentions of capability monitoring
      Add support for touch events
      README: fix an outdated repo link
      doc: hook up doxygen
      libei: drop a no longer useful declaration
      meson.build: drop unused install command
      meson.build: fix the doxygen generation
      test: switch the libei unit tests to the munit helpers
      Add a crawly to the bug message
      Mark the log functions as printf
      Add C++ header guards
      util: disable coredumps for the munit helper
      doc: fix a missing word
      libeis: warn if connecting a device without capabilities
      libei: better logging of capabilities
      libei: switch the keymap to be a separate object
      libei: add a bunch of log messages for client bugs
      libeis: switch the keymap to be a separate object
      libeis: better logging of client bugs
      doc: fix typos
      libei: some more documentation and reshuffling
      tools/demo-server: add --force to remove a leftover socket path
      libei: rename added to device_added
      Add an EIS-controlled seat to the hierarchy
      libei: Improve function namespacing
      tools: use a cleanup func for the event in the demo client
      util: add a macro to create unref cleanup functions
      util: add an _unref_ cleanup + declaration function
      libeis: don't treat it as bug when the client doesn't send a keymap
      tools/demo-server: set the server keymap in our local struct
      tools/demo-server: split the keymap handling into two functions
      libeis: add eis_client_get/set_user_data
      libei: print the device IDs as hex in the added/resumed/suspended debug logs
      examples: update the examples for seats
      README: mention seats in the high-level overview
      libeis: better message debugging
      test: some better debugging of events
      Fix double device removal
      test: add a test to simulate the xdotool/xwayland behavior
      test: handle dispatch helpers for NULL contexts
      test: when dropping the ei context, also drop our seat ref
      libei: fix the device/seat ref handling once again
      test: add a few more tests for disconnection behavior
      libei: skip logging if we don't have a log handler
      libei: require ei_device_remove() for a never-added device
      libei: only log the state when it changed
      libei: immediately remove devices added for a removed seat
      tools/demo-server: handle abs motion events
      Include stddef.h for size_t
      Shut up two doxygen warnings about undocumented parameters
      util: add _unused_ macro
      util: indent the object.h code by tabs
      util: add more useless structs to avoid semicolon issues
      Change to use server-created devices
      eis: start the device IDs at 1
      ei: make the device refcounting a bit easier to follow
      Add support for seat unbinding
      eis: insert an unbind event if we had a bound seat
      test: rename the main test to eierpecken
      test: split the ei tests up into different files
      test: better debugging of event passing
      eis: remove some leftover if 0 code from the server devices
      util: comment the list interface
      util: add a list_nth_entry() macro
      eis: include util-macros in the private header for _printf_
      test: don't print the message type for debug
      util: pass the file/line/func information through to the logger
      Pass the file/line/func information through to the ei/eis loggers
      util: remove the need for a tmp argument in list_for_each_safe
      doc: change to doxygen-awesome
      doc: fix some doxygen markup errors
      Add a DeviceAddedDone message to the protocol
      Add DeviceRegions to replace the pointer/touch ranges
      Add a physical scale factor for the regions
      Add two convenience methods for region point conversion
      tools: add an abs device and regions to the demo server
      ei: two more bug log messages
      ei: drop pointer/touch width and height
      Fix a debug message
      doc: fix the docs for the connect event
      tools: fix keyboard cap in the EIS demo server
      tools: fix a typo
      eis: change the regions API to use eis_region_add()
      test: check for 2 empty dispatch run before considering a stable state
      Restructure keymap handling to server-side only
      tools: use the linux event codes now that we're including the header
      proto: split the keymap message out from the device added message
      test: bring back the keymap tests
      proto: swap the ei message parsing for an interface struct
      ei: abstract the requests into an interface struct too
      ei: remove another layer of indirection before we hit the protocol
      eis: fix the object creation API again
      eis: switch eis to use interface structs
      eis: split the internal touch API into three functions for down/up/motion
      proto: split the touch event into its three separate events
      Use a helper macro for the protobuf message setup
      Add user data to keymaps
      tools: hook up absolute pointer motion in the demo client
      meson.build: disable documentation by default
      editorconfig: add yml files
      gitlab CI: bump the Fedora version to 34
      gitlab CI: bump the pages job to F34 too
      ei: ignore button codes below BTN_MOUSE
      eis: fix the seat assignment
      eis: close the socket fd on error
      eis: use a lockfile to determine whether we can remove the old socket
      ei: add missing ei_seat_has_capability implementation
      Fix a typo
      Rename suspend to pause to indicate it's a "lighter" form of suspending
      ei: remove an outdated comment
      ei: remove non-existing ei_client reference
      ei: use a getter for ei_event_get_seat
      ei: split event handling into its own source file
      test: drop an obsolete test
      test: move the unhandled event type assertion out of the switch
      Add missing scroll/scroll discrete to the test debugging
      proto: rename the Frame message to Packet
      Implement key modifier mask events similar to Wayland
      Add a frame event to logically group events together
      test: add a scroll test
      Add a scroll stop/cancel event
      test: fix segfault if we're expecting an event on an empty queue
      tools: fix the demo clients' frame events for kbd/abs
      test: add color printing to the test log output
      proto: add a start/stop emulating message pair
      Split connect into an additional connect_done
      eis: fix some documentation copy/paste-o's
      Add a property API for generic key/value exchanges
      tools: fix the wrong default busname documentation for the fake portal
      tools: fix a whitespace issue/compiler warning in the fake portal
      reis: use the same message helper macro we already use for eis/ei
      reis: duplicate the device capabilities
      reis: simplify the library a bit
      reis: add property support
      eis: differ between eis vs ei property updates
      ei: add an ei.connection.type property to be filled in automatically
      tools: print the default properties from the demo server
      tools: set the default properties in the fake portal
      ei: always queue a disconnect event locally
      tools: whitespace fixes in the demo client
      util: add a strreplace function
      tools: update the portal for the latest version
      tools: default to LIBEI_SOCKET in the fake portal too
      tools: no need to abort on errors in the fake portal
      tools: add a blurb to each tool to list what it is for
      Add the two XML files for the current portal implementation
      Add static asserts to ensure our enums are sizeof(int)
      gitlab CI: update to build on F35 and latest ci-templates
      gitlab CI: update the pages job to F35 too
      README: some updates for the current implementation state
      meson.build: use gnu_symbol_visibility option
      proto: correct a few comments dating to an earlier version of this
      proto: remove two superfluous semicolons
      eis: remove a default statement for better compiler warnings
      test: remove a set of unused variables
      Remove some if 0 code
      eis: fix an error when the seat is removed twice
      eis-demo-server: add ei client tracking
      proto: group the client messages vs events
      ei: add a helper function to create an event from a device
      eis: streamline the event handlers a bit
      eis: namespace the internal event handlers
      doc: expand the mainpage with an illustration
      doc: fix some invalid \ref commands
      doc: fix a doxygen complaint
      meson.build: use the SPDX identifier for the license
      Drain all data from the fd if we are disconnecting anyway
      Fix a bunch of compiler warnings
      Drop "static" from some clang-says-the-re-not-const variables
      util-object: define the cleanup helper functions as used
      util-tristate: mark the inline functions as used for clang's benefit
      util-io: avoid variable length arrays for clang's benefit
      meson.build: add a few compiler flags
      meson.build: add -Wno-unused-variables when buildling with clang
      libei 0.2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20220302/56e3aba4/attachment.sig>


More information about the wayland-devel mailing list