Closed idanarye closed 3 years ago
Problem - GDK's FromEvent
is private, which means I can't have param_event
and have to resort to the uglier API. This was not a problem for the BuilderSignal
derive macro, because it could just use downast
without having to specify a trait bound, but now that we use generics it becomes a problem.
I opened a ticket - https://github.com/gtk-rs/gtk-rs/issues/392. But I may have to accept this ergonomic hit for now, and add param_event
in a future release...
I must admit that I'm a bit overwhelmed by the complexity of the current code – or maybe it's just the fact that I lost track of all the approaches and design iterations we already had. There are also quite a few use cases to cover …
Yes, this is a big change. But so far 62% of it is line deletions, so I consider it a simplification of what we previously had.
I think the examples are what you should be looking at - after all, they are the thing that represents how the new API looks like.
I'd really like to try it out right now, but I fear that I'm blocked on the resolution of #21
woab::route_signal
. Take a look at tests/connect_nonbuilder_signals.rs
.
This is an implementation of the macroless from #15, described in this comment.