-
Notifications
You must be signed in to change notification settings - Fork 38
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
feat: implement wrappers for GUI APIs #29
Draft
JarvisCraft
wants to merge
60
commits into
flipperzero-rs:main
Choose a base branch
from
JarvisCraft:gui-bindings
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
c4f990b
feat: implement wrapper for `ViewPort` API
JarvisCraft ebf0cb1
feat: implement basic APIs of `canvas` and `gui`
JarvisCraft 1bb29b7
Merge remote-tracking branch 'upstream/main' into gui-bindings
JarvisCraft 1d087b3
fix: revert changes to `bindings.rs`
JarvisCraft 38a04c0
fix: resolve issues with `canvas.rs`
JarvisCraft 164eb82
feat: implement test callback support
JarvisCraft 3f4c26b
feat: no vcall callbacks
JarvisCraft aaa4eb0
feat: implement effective callback API
JarvisCraft 3783da9
refactor: make `as_raw` safe
JarvisCraft a7beba0
feat: make `gui` example fully safe
JarvisCraft 7a9f9e9
feat: add `icon` and `icon_animation`
JarvisCraft fd16159
feat: add more drawing methods to `canvas`
JarvisCraft 49ea98c
feat: add `xbm!` macro
JarvisCraft 4008c30
fix: use correct XBM endianness
JarvisCraft 79a0c9e
refactor: make XbmImage generic
JarvisCraft e248c56
chore: use `XbmImage::new_from_array` where possible
JarvisCraft c903808
chore: minor cleanups in core APIs
JarvisCraft 2c392bb
Merge remote-tracking branch 'upstream/main' into gui-bindings
JarvisCraft da0e7c2
refactor: move gui APIs to `flipperzero`
JarvisCraft 0898485
chore: make `dialogs` service depend on `gui` service
JarvisCraft cc85081
chore: resolve most TODOs in `IconAnimation`
JarvisCraft 6ece5f2
chore: cleanup `canvas.rs`
JarvisCraft b95c981
Merge remote-tracking branch 'origin/main' into gui-bindings
JarvisCraft 012101f
Merge remote-tracking branch 'upstream/main' into gui-bindings
JarvisCraft 902ea0a
feat: add `is_irq_or_masked()`
JarvisCraft 9171372
chore: enhance callbacks implementation
JarvisCraft 3a37055
Merge remote-tracking branch 'origin/main' into gui-bindings
JarvisCraft 2d289a0
chore: remove `.idea` directory
JarvisCraft 4670f74
chore: cleanup macros and internals
JarvisCraft 1dea65d
Merge branch 'main' into gui-bindings
JarvisCraft 7b504d6
docs: enhance exammples of `UnsendUnsync` and `Unsend`
JarvisCraft 097ebca
Merge branch 'main' into gui-bindings
JarvisCraft f28c4a7
feat: add ident-checks to `xbm` macro
JarvisCraft b166c5e
fix: correctly set XBM image dimensions
JarvisCraft 045b72f
chore: fix remaining compilation errors
JarvisCraft 3af3d7e
chore: bring back `.vscode`
JarvisCraft 46b7003
docs: enhance alignment of doc attribute in `kernel::LockGuard`
JarvisCraft 2b138c5
chore(gui): flatten module structure
JarvisCraft b48da0a
test(gui): remove `xbm` tests from `tests_runner` since they require …
JarvisCraft 09d70ed
docs: enable automatic cfg documentation
JarvisCraft 8d689b9
build: specify required example features
JarvisCraft 5de6811
chore: start using `gui` features in `view_dispatcher`
JarvisCraft 1329195
feat: make `images` example almost safe
JarvisCraft feed3e9
chore: change XMB coordinate formulas
JarvisCraft 025b7f8
fix: resolve math errors in `xbm.rs`
JarvisCraft e0a0391
docs: fix docs for unstable features
JarvisCraft 5ed96dc
docs: disable scrape examples
JarvisCraft e8f7708
docs: configure docs.rs metadata in crate root
JarvisCraft 64cf882
Merge branch 'main' into gui-bindings
JarvisCraft 2035e06
chore: move error types to separate files
JarvisCraft 6b48e68
docs: add documentation to error types
JarvisCraft c06ac5a
fix: do not store `Box`es when their pointers are shared
JarvisCraft 20a6d0e
chore(#29): address initial PR review by @dcoles
JarvisCraft d587aec
feat: start implementing sound `ViewDispatcher`
JarvisCraft 0a5822f
chore: fix invalid mentions of `ViewPort` with `ViewDispatcher`
JarvisCraft 9ede8a9
chore: continue experimenting with `ViewDispatcher` APIs
JarvisCraft 6a1c1c7
chore: simplify `div_ceil_u8`
JarvisCraft d8e2db7
Merge branch 'main' into gui-bindings
JarvisCraft c4d4571
Merge branch 'main' into gui-bindings
JarvisCraft 90eb38b
Merge remote-tracking branch 'upstream/main' into gui-bindings
JarvisCraft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,4 @@ rustflags = [ | |
] | ||
|
||
[build] | ||
target = ["thumbv7em-none-eabihf"] | ||
target = "thumbv7em-none-eabihf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ members = [ | |
"flipperzero", | ||
"sys", | ||
"rt", | ||
"gui", | ||
] | ||
resolver = "2" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[package] | ||
name = "flipperzero-gui" | ||
version = "0.6.0-alpha" | ||
description = "Rust GUI bindings for Flipper Zero" | ||
repository = "https://github.com/dcoles/flipperzero-rs" | ||
readme = "../../README.md" | ||
license = "MIT" | ||
edition = "2021" | ||
rust-version = "1.64.0" | ||
autobins = false | ||
autoexamples = false | ||
autotests = false | ||
autobenches = false | ||
|
||
[package.metadata.docs.rs] | ||
default-target = "thumbv7em-none-eabihf" | ||
targets = [] | ||
all-features = true | ||
|
||
[lib] | ||
bench = false | ||
test = false | ||
|
||
[dependencies] | ||
flipperzero-sys = { path = "../sys", version = "0.6.0-alpha" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//! Safe wrappers for Flipper GUI APIs. | ||
#![no_std] | ||
|
||
pub mod view_port; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to decide whether we should put this in the main
flipperzero
crate or not.There's some argument to be made that for putting each service under its own
flipperzero-{service}
crate, but I'm wondering if it is worth the hassle (especially if it's all part of one SDK). Thewindows
crate takes the approach of putting each API under its own feature flag, so you don't have to build the entire set of bindings for every app.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, at the moment I am not that sure about the placement thus I use
gui
as some form of incubator for the new APIs, but I already see this separation being a problem (as can be seen by a comment aboutAlign
type in thisCargo.toml
). In the end I am planning to either move all this APIs toflipperzero
(probably behind feature-flags) all provide more logical separation.