-
Notifications
You must be signed in to change notification settings - Fork 567
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
Create windows on mac #20
Conversation
Implement a subset of the window creation API. At this point, it compiles and runs the examples in druid-shell, but with much functionality stubbed out, and no attempt to run the higher level. Uploading this as a checkpoint.
A few small things were broken.
@@ -26,9 +26,12 @@ use time::get_time; | |||
use kurbo::{Line, Rect}; | |||
use piet::{FillRule, FontBuilder, RenderContext, Text, TextLayoutBuilder}; | |||
|
|||
#[cfg(target_os = "windows")] | |||
use druid_shell::platform::PresentStrategy; |
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.
Q: What is PresentStrategy?
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.
See xi-editor/xi-win#17 . It's part of my quest to make window resizing smooth on Windows. It's not something that's meaningful on other platforms, and most actual users will use the default. It's exposed for experimentation.
/// This is an NSView, as our concept of "window" is more the top-level container holding | ||
/// a view. Also, this is better for hosted applications such as VST. | ||
/// | ||
/// TODO: remove option (issue has been filed against objc, or we could manually impl default with nil) |
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.
Can you link the issue number?
FWIW, I have an implementation of IdleHandler and anim (the latter is crude, based on continual invalidation, rather than CVDisplayLink, but is ok to get this into a working state) in my local repo. I can add to this PR or file a new one. |
This looks good. Might be worth getting this in before adding the other stuff |
Implement a subset of the window creation API. At this point, it
compiles and runs the examples in druid-shell, but with much
functionality stubbed out, and no attempt to run the higher level.
Uploading this as a checkpoint.