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

Create windows on mac #20

Merged
merged 3 commits into from
Feb 17, 2019
Merged

Create windows on mac #20

merged 3 commits into from
Feb 17, 2019

Conversation

raphlinus
Copy link
Contributor

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.

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: What is PresentStrategy?

Copy link
Contributor Author

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)
Copy link
Collaborator

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?

@raphlinus
Copy link
Contributor Author

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.

@rylev
Copy link
Collaborator

rylev commented Feb 17, 2019

This looks good. Might be worth getting this in before adding the other stuff

@raphlinus raphlinus merged commit c050466 into master Feb 17, 2019
@raphlinus raphlinus deleted the mac_win branch February 20, 2019 17:53
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.

2 participants