Commit graph

26 commits

Author SHA1 Message Date
Peter Hutterer
6230e187fd README: reword the blurb about short lived applications
This particular wording dates to when libei created devices and the EIS
implementation would ack/nack those devices. This isn't the case anymore
so let's reword this a bit.

Closes #62
2024-08-22 12:12:20 +10:00
Peter Hutterer
5215be1079 README: fix the paragraph talking about the protocol 2023-05-17 12:28:12 +10:00
Peter Hutterer
6ee202569f doc: point to the main branch, not the master branch 2023-05-04 14:11:34 +10:00
Peter Hutterer
e1b2db8c10 Purge the pseudo-code examples
They haven't been kept up-to-date with API changes, so let's point to
the actual working demo tools instead.
2023-05-04 14:11:34 +10:00
Peter Hutterer
717900f6fe Generate the protocol documentation in gitlab pages 2023-03-03 15:24:42 +10:00
Peter Hutterer
479bda259a Purge libreis from the repo
libreis was intended for an intermediary to set some information that
the libei client cannot be entrusted with. In particular this was the
application name, the allowed capabilities, and some properties that -
once set - the client could no longer change (appid as probably the only
really useful one). The price for this was a rather complicated version
negotiation dance before the initial CONNECT request.

Now that we have a clear view of what's going to happen -
RemoteDesktop.ConnectToEIS and the InputCapture portal - there is no
longer any need for libreis. The extra information that libreis would've
sent is communicated out-of-band in both portals and are known to the
compositor at the time the connection is being established.

So we can simply drop this, it's no longer required and dropping it
makes the protocol significantly simpler anyway.
2023-02-09 11:48:28 +10:00
Peter Hutterer
eeefb3dc00 liboeffis is a wrapper library for the RemoteDesktop communication
libei used to have direct portal support code (see the git history) but:
- that code was a custom proposed portal that never went anywhere
- libei has slowly changed to be more an input event transport layer since
  it is now also used sending events *to* a libei context
- a number of libei users will never need the DBus code, either because they
  don't want it or because they talk Dbus themselves na ddon't need this
  abstraction.

Luckily, it's quite easy to move this into a separate library with a
simple API that does, effectively, the same trick as the old portal backend.
This API is aiming to be as simple as possible because the tools that
require anything more complex should talk to DBus directly.

An example tool that uses the API to retrieve an EIS fd over the
RemoteDesktop portal is included in this patch.

"Öffis" is a German word meaning public transport. It also sounds like the
French Œuf, the word for egg.

Co-authored-by: Olivier Fourdan <ofourdan@redhat.com>
2022-12-08 11:22:50 +10:00
Peter Hutterer
97254391dc README: swap to RemoteDesktop over the nonexistent EmulatedInput portal
At least for event replaying it looks like we'll go through the
RemoteDesktop portal instead of creating another one that doesn't
provide any additional benefits.

See https://github.com/flatpak/xdg-desktop-portal/pull/762
2022-12-08 10:45:34 +10:00
Olivier Fourdan
1ef00d449c README: Xwayland is a Wayland client
Xwayland is not a compositor, it's a Wayland client.

Also fix a few typos while at it (XWayland -> Xwayland).

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2022-07-18 10:28:22 +02:00
Peter Hutterer
b4a7cc9655 README: update with info about sender/receiver modes
And make a note about the protocol eventually maybe becoming an actual
protocol.
2022-06-07 10:34:09 +10:00
Peter Hutterer
6801ab188b README: some updates for the current implementation state
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-02-17 13:40:31 +10:00
Peter Hutterer
fa7b624f93 Rename suspend to pause to indicate it's a "lighter" form of suspending
There's nothing in the protocol to modify the client device state from
the server, so a pause/resume cycle must leave the client with the
same(-ish) state. Pause is really just that, a short "no event now
please". Anything that would require e.g. modifying the device state by
releasing keys or buttons should result in the device being removed and
re-added.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-08-23 08:34:44 +10:00
Peter Hutterer
ebe6261c89 README: mention seats in the high-level overview
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-10-26 12:02:45 +10:00
Peter Hutterer
96ba358984 doc: hook up doxygen
Build the doxygen API documentation. This is copied from libinput so it takes
over that style (which is more readable than the default doxygen style).
Some extra documentation is added too and all the immediate errors are fixed
in this commit but doxygen still warns about undocumented parameters.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-28 12:00:08 +10:00
Peter Hutterer
9db3e80cf4 README: fix an outdated repo link
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-28 11:08:14 +10:00
Peter Hutterer
a27276b4c5 Drop mentions of capability monitoring
The original idea here was that a libei client could request the Pointer
capability to be notified of any pointer movements, thus providing a simple
way to capture input for the synergy use-case.

This is a can of worms better left untouched. How input events are captured
and what information is available is quite specific to the display server, let
alone the triggers for when it needs to start and stop. To have that in libei
requires something like triggers ("start when pointer hits the edge") which
again opens a new can of worms. Which seat are we referring to? What is a
screen edge? How about shortcuts?

Receiving input events can be handled by libeis anyway: any EIS server is
capable of receiving input events by definition so the capability monitoring
could be solved by making the capturing compositor a libei client and the
other process an EIS server. i.e. the circle is closed with:

[compositor|libei] -> [EIS|synergy-client]
                               ||
	                  [synergy-server|libei] -> [EIS|compositor]

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-24 05:22:26 +00:00
Peter Hutterer
da1b31fa59 README: jot down some notes regarding XTest vs libei
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-28 13:11:39 +10:00
Peter Hutterer
3b90296237 tools/demo-server: add a uinput example handler
This is a basic example on how an EIS server can map to uinput, just to
illustrate that there's nothing in libeis that requires a display server
protocol (X or Wayland). All that's done here is we set up a keyboard and
pointer device and route the input events through that.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-27 12:52:50 +10:00
Peter Hutterer
f8a2729d7f README: add a graphic to illustrate how XWayland looks like
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-25 14:30:17 +10:00
Peter Hutterer
6b3d9255cf libei: implement org.freedesktop.portal.EmulatedInput support
The current implementation of that portal has two methods: EmulateInput to
authenticate and Connect to get the fd to the EIS implementation. The portal
implementation is in charge of finding EIS and restricting it if need be.

This uses libsystemd because we can integrate that with epoll and our
libei_dispatch() method. GDBus requires a glib mainloop, so it's not really
suitable here. Given how simple this is anyway, it's easy to just do the DBus
bits in the caller and then hand the fd to ei_setup_backend_fd().

A eis-fake-portal is provided for testing, this "portal" can use the custom
portal bus name and connect the eis-demo-client to the eis-demo-server.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-25 13:35:18 +10:00
Peter Hutterer
017260798b README: update the blurb about batched processing
Short story, we can't do it but it's simple enough to work around in the
caller so let them do it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-12 14:16:09 +10:00
Peter Hutterer
78b0b99883 README: add a blurb about libreis
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-12 14:16:09 +10:00
Peter Hutterer
68fe48c02f README: make a note about the Xwayland PoC and short-lived apps
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-31 14:02:33 +10:00
Peter Hutterer
f228927b1f README: add some clarification for why libei
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-29 20:56:47 +10:00
Peter Hutterer
1fea949114 Update keymap handling
keymap handling is difficult because a lot of it relies on specific server
implementation details. So let's provide the API for a client to assign a
specific keymap to the device and for the server to accept/refuse/override
that keymap.

Where the server refuses, it's up to the client to figure out the rest.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-16 13:32:27 +10:00
Peter Hutterer
5e649f682a Initial commit
This is the outline of the API intended with a minimal compiler just to verify
there are no immediate parsing issues.
2020-07-16 10:17:09 +10:00