-
Notifications
You must be signed in to change notification settings - Fork 22
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
DRAFT: Remove ribir_gpu and winit dependencies from ribir_core #273
Conversation
fixes RibirX#233 Move the dependencies to a new create `ribir_app_winit` and create abstractions to break up dependencies in ribir_core code.
…d-window-out-of-core
@zoechi Thanks! There are some points as what I expect, I think it in the right way.
There are some points I'm concerned about:
From an overall perspective, we can make some adjustments:
|
@M-Adoo Thanks for the feedback! I guess I'll need a while to process your comments and dig deeper into the code for better understanding what this all means exactly. |
Do you mean with this, that the |
I tried to visualize how I interpreted your comments, but it didn't work out too well. I'll post it here anyway ---
title: Architecture
---
graph TD;
subgraph ribir_core
core::Event["core::Event (Window/Device/User)"]
core::Cursor
core::Key
core::Layout
core::Window
end
subgraph ribir_app
app::ShellWindow --> core::Window
end
subgraph winit
winit::Event["winit::Event (Window/Device/User)"]
winit::Cursor
winit::Key
winit::Window
end
subgraph ribir_winit
ribir_winit::FromEvent -..-> winit::Event
ribir_winit::FromEvent -..-> core::Event
ribir_winit::FromCursor -..-> winit::Cursor
ribir_winit::FromCursor -..-> core::Cursor
ribir_winit::FromKey -..-> winit::Key
ribir_winit::FromKey -..-> core::Key
ribir_winit::FromWindow -..-> winit::Window
ribir_winit::FromWindow -..-> core::Window
end
subgraph ribir_gpu
gpu::Backend
end
subgraph custom_app
custom::App -..-> winit::Window
custom::App -..-> gpu::Backend
custom::App -..-> app::ShellWindow
end
So the end result is, that a |
Do you think it adding a |
Yes. |
Just a little bit different, I don't think the user needs to implement a custom_app, that |
|
This is just supposed to be the project Ribir is used in to build the GUI Thanks for your comments. I think all is clear now. |
fixes #233
Move the dependencies to a new create
ribir_app_winit
and create abstractions to break up dependencies in ribir_core code.There is still some cleanup necessary (naming, tests, ...) but I first wanted some feedback if this goes in the right direction before I put more work into it.