Skip to content

Working on extending displayz to other platforms. #2

Description

@shymega

Hi,

I'm working on a Rust, cross-platform (Windows, macOS, Linux/BSD) profile-based display output manager. It's event-based but also can be controlled with JSON-RPC.

displayz looks perfect for Windows, but I found myself duplicating efforts in my usage of this crate.

I thought, maybe, it might be a good idea to work on creating a generic DisplayOutput trait for displayz, that, when combined with the target_os attribute, can provide platform-specific implementations of the display outputs.

To give you an idea of how I picture a DisplayOutput trait, here's some code I wrote, and then realized I was duplicating efforts, for automon:

pub type Resolution = (usize, usize);
pub type Position = (usize, usize);

pub trait DisplayOutput {
    pub fn is_primary(&self) -> bool;
    pub fn is_active(&self) -> bool;
    pub fn get_pos(&self) -> Position;
    pub fn get_res(&self) -> Resolution;
}

I'd really like to work on adding the modern API (but also maintaining backwards-compatibility, if possible) with you, and extending the scope of displayz to macOS, Linux, and BSD.

What do you think?

Have a great weekend! :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions