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 4 times, most recently from b29f0cc to 3d1318a Compare June 21, 2023 15:41
shymega added a commit to shymega/displayz that referenced this pull request Jun 23, 2023
This reverts commit 364433a.

As per @michidk's review comment on PR michidk#3.
- 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.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
(Also, change `usize` to `i32` to allow for negative Positions.
Resolution was changed for consistency)

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
This is in preparation for the Linux platform support.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
We now use feature flags to control X11/Wayland exporting.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
This way we can support the BSDs, as well as Linux. I now know that
FreeBSD supports Wayland.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
This reverts commit 364433a.

As per @michidk's review comment on PR michidk#3.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
This allows `displayz` to run on KDE, which uses a different set of
protocols to the usual `wlr` crate.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
- Change `Resolutions` into tuple struct.
- Impl `Debug` & `Display` for `Position` and `Resolutions`.
- Use `Default` trait for default trait impl.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Working on extending displayz to other platforms.
2 participants