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

Initial refactoring of displayz #3

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft

Conversation

shymega
Copy link

@shymega shymega commented Jun 6, 2023

  • Bump Cargo.lock and dependencies.
  • Use cfg_attr to expose platform-specific APIs in the platform module, then export with pub use.
  • Create initial common module for abstracting displays.
  • Make examples only run on Windows - pending refactoring of Windows backend.
  • Add lints.

Resolves #2.

src/lib.rs Outdated Show resolved Hide resolved
src/common/mod.rs Outdated Show resolved Hide resolved
src/common/mod.rs Outdated Show resolved Hide resolved
src/common/mod.rs Outdated Show resolved Hide resolved
src/platforms/macos/mod.rs Outdated Show resolved Hide resolved
src/common/mod.rs Outdated Show resolved Hide resolved
@shymega
Copy link
Author

shymega commented Jun 7, 2023

OK, some updates. I've added a note to Resolutions, and wrapped get_edid in an Option.

@michidk michidk added the enhancement New feature or request label Jun 8, 2023
@shymega shymega force-pushed the refactor branch 3 times, most recently from b772975 to b29f0cc Compare June 21, 2023 15:40
- Bump Cargo.lock and dependencies.
- Use `cfg_attr` to expose platform-specific APIs in the `platform`
  module, then export with `pub use`.
- Create initial `common` module for abstracting displays.
- Make examples only run on Windows - pending refactoring of Windows
  backend.
- Add lints.

Resolves michidk#2.
(Also, change `usize` to `i32` to allow for negative Positions.
Resolution was changed for consistency)
This is in preparation for the Linux platform support.
We now use feature flags to control X11/Wayland exporting.
This way we can support the BSDs, as well as Linux. I now know that
FreeBSD supports Wayland.
This reverts commit 364433a.

As per @michidk's review comment on PR michidk#3.
This allows `displayz` to run on KDE, which uses a different set of
protocols to the usual `wlr` crate.
- Change `Resolutions` into tuple struct.
- Impl `Debug` & `Display` for `Position` and `Resolutions`.
- Use `Default` trait for default trait impl.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
2 participants