Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial refactor for more sane pan events #11

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

szbergeron
Copy link
Contributor

Refactor pan events as the "kitchen sink" approach to representing events really doesn't generalize well to less verbose reprs (wayland, cocoa), while a more slimmed repr can generalize fairly well to more verbose reprs (windows)

@szbergeron
Copy link
Contributor Author

szbergeron commented Mar 10, 2020

CC @glennsl for design approach (continuation of discussion in revery-ui/revery#766)

CC @Et7f3 for any C89 dumbness I've overlooked

@szbergeron
Copy link
Contributor Author

CI failure expected, need to fix the waylandevents usage of PanEvent

@glennsl
Copy link
Member

glennsl commented Mar 10, 2020

Not entirely sure what I'm looking at, since it seems like there's even syntax errors in SDL_events.h with the SDL_Pan struct being unterminated. I think I get the gist of it though.

I don't understand why the source is a separate pan type. I thought that was a field common to every type of event. And if it is, it looks like axis is common across all of them as well.

@szbergeron
Copy link
Contributor Author

Forgot to commit some more recent stuff, syntax errors should at least be fixed lol.

The source isn't actually possible to provide in the same event for wayland, since it's split out into its own event. If events are assumed to use the source from any prior events this should work. It might make sense to special case wayland for this and store the current source into a static var and plug that into any events that are dispatched.

@glennsl
Copy link
Member

glennsl commented Mar 11, 2020

Oh, that's weird. But that assumption has to be made somewhere, right? Might as well make it as early as possible.

@szbergeron
Copy link
Contributor Author

@glennsl should be slightly better now

src/video/wayland/SDL_waylandevents.c Outdated Show resolved Hide resolved
src/video/wayland/SDL_waylandevents.c Outdated Show resolved Hide resolved
@szbergeron
Copy link
Contributor Author

@glennsl @Et7f3 any thoughts? Am hoping to jump on the libscroll integration stuff if this is good to go

src/events/SDL_mouse.c Outdated Show resolved Hide resolved
src/events/SDL_mouse.c Show resolved Hide resolved
src/events/SDL_mouse.c Show resolved Hide resolved
src/events/SDL_mouse.c Show resolved Hide resolved
src/events/SDL_mouse.c Show resolved Hide resolved
src/events/SDL_mouse.c Outdated Show resolved Hide resolved
include/SDL_mouse.h Outdated Show resolved Hide resolved
src/events/SDL_mouse.c Outdated Show resolved Hide resolved
@CrossR
Copy link
Member

CrossR commented Aug 7, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@szbergeron
Copy link
Contributor Author

Those mojave checks didn't rerun, and were last run in april. Is something going on with CI?

https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml
```
macOS X Mojave 10.14	macOS-10.14	macOS-10.14	Link
macOS X Catalina 10.15	macOS-10.15	macOS-latest OR macOS-10.15	Link
```
@Et7f3
Copy link
Member

Et7f3 commented Aug 14, 2020

mojave was a bad name of 10.13 and not supported anymore in azure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants