-
Notifications
You must be signed in to change notification settings - Fork 912
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
stdweb support for eventloop 2.0 #797
Closed
Closed
Changes from 24 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
fd4db40
Create the type layout
ryanisaacg f44e98d
Implemented a few easy methods
ryanisaacg c088f8b
Create the outline of event input and handler calls
ryanisaacg f698d45
Add key and mouse event support that typechecks
ryanisaacg 37d354c
Get to a state where a canvas is spawned
ryanisaacg 283a8de
Refactor out the stdweb functionality into different modules
ryanisaacg 3dd0e31
Merge eventloop-2.0 into stdweb-eventloop-2
ryanisaacg aaee724
Rearchitect to allow API compliance
ryanisaacg d1deba8
Rename modules
ryanisaacg a5166ba
Implement request_redraw
ryanisaacg 96786bb
Implement focus event
ryanisaacg 85446d8
Fix warnings
ryanisaacg b09629f
Handle ControlFlow::Exit
ryanisaacg 7c6bdcc
Handle ControlFlow::Exit and dealing with events-in-events
ryanisaacg 9e25561
Fix compile failures and add canvas positioning
ryanisaacg fe5e300
Clean up and document the core of stdweb event handling
ryanisaacg 9f801cf
Only send the request-redraw on the next animation frame
ryanisaacg 70c7382
Fix the request_animation_frame lifetimes
ryanisaacg 37dadab
Add access to the canvas in the Window
ryanisaacg 1409f83
Add support for mouse wheel
ryanisaacg f2b6ef2
Merge master into stdweb-eventloop-2
ryanisaacg b59e3c6
WIP
ryanisaacg 2690306
Implement Poll and WaitUntil in the stdweb backend
ryanisaacg 182beb4
Indicate that I will be maintaing the stdweb backend
ryanisaacg b571362
Fix a panic due to double-borrow
ryanisaacg cf28751
Remove unnecessary set-to-wait in example
ryanisaacg a0f280e
Update how timeouts are cleared to avoid possible double-clearing
ryanisaacg 94387c4
Merge master Monitor APIs to stdweb
ryanisaacg e94a006
Merge remote-tracking branch 'upstream/master' into stdweb-eventloop-2
ryanisaacg 7bbc829
Fix a few warnings
ryanisaacg c76ab65
Add on-close event listening
ryanisaacg 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
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
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
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
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
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
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,6 @@ pub mod macos; | |
pub mod unix; | ||
pub mod windows; | ||
|
||
pub mod stdweb; | ||
|
||
pub mod desktop; |
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,8 @@ | ||
#![cfg(feature = "stdweb")] | ||
|
||
use stdweb::web::html_element::CanvasElement; | ||
|
||
pub trait WindowExtStdweb { | ||
fn canvas(&self) -> CanvasElement; | ||
} | ||
|
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
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.
You might want to revert the changes in this file.
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, before merge I'll be doing some cleanup (this is still actively in development and I use this example to test.)