Smithay / calloop

A callback-based Event Loop
MIT License
177 stars 34 forks source link

Windows support #161

Closed Redhawk18 closed 6 months ago

Redhawk18 commented 9 months ago

This is likely a giant undertaking, but this crate looks amazing. But I can't lock my ui library into not working on Windows. I use Linux daily but you still have to use libraries that work on every platform.

notgull commented 9 months ago

polling supports Windows. It's mostly the notification mechanism that needs to be ported.

Redhawk18 commented 9 months ago

so Windows support is planned?

elinorbgr commented 9 months ago

I personally know nothing about Windows support. In particular wrt to ui library, I don't even know if it is actually possible to plug UI events from the Windows API into an event loop like calloop, I was under the impression that X1//Wayland were more the exception than the rule.

However, if someone who actually knows about this stuff is willing to contribute the necessary logic to make it worth, that would absolutely be welcome.

Redhawk18 commented 9 months ago

I personally know nothing about Windows support. In particular wrt to ui library, I don't even know if it is actually possible to plug UI events from the Windows API into an event loop like calloop, I was under the impression that X1//Wayland were more the exception than the rule.

However, if someone who actually knows about this stuff is willing to contribute the necessary logic to make it worth, that would absolutely be welcome.

doesn't winit have a event loop that works on all platforms?

notgull commented 9 months ago

A notification can be created by using PollerIocpExt::post. If someone has a motivating use case I can write this.

Redhawk18 commented 9 months ago

A notification can be created by using PollerIocpExt::post. If someone has a motivating use case I can write this.

It would make my ui work on windows then. I would feel stupid if my tui library had to use winit because of the event loop.

elinorbgr commented 9 months ago

doesn't winit have a event loop that works on all platforms?

Not exactly, winit has a completely different event loop machinery on each platform it supports, tightly integrated in the specifics of that platform's GUI api. Something like that would be wildly out of scope for calloop.