moaxcp / x11

An x11 protocol implementation and client for the jvm
MIT License
20 stars 3 forks source link

Library features #37

Open kqvanity opened 3 months ago

kqvanity commented 3 months ago

Hi, I've been working on a java project that relies on system events e.g., text highlight cords, mouse click/release, etc.

I'm currently relying on this JNA sample, which allow me to

I was wondering if this library supports the following

note: I mainly work with Android APIs using kotlin, but wanted to work on the JVM, so I'm completely unfamiliar with C++ concepts, X11 and how the windowing system works under Linux, so I'm sorry for my noob question.

Thanks

moaxcp commented 3 months ago

Don't worry I am am still learning a lot about x11 as well. Yes I think this client could do these things. The difference is in x11-client the protocol is used directly. You have to look for the protocol structs that would be used in the x11lib functions to get the exact objects to use.

This can be done by looking at the x11lib code. But most of the function names will match the protocol class to use in this library. For instance SelectSelectionInput from the example.

kqvanity commented 3 months ago

I've been trying to come up with a working example in C under bspwm, and only got mouse click events and selected text. Problem is that I can't figure out how to map it to the library APIs.

If obtaining selection metadata e.g., highlighted text, its cords isn't overly complex, could you please provide a minimal working example.

Also for some reason the library is only available from maven central up until v0.17.0