-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added options to switch display input
- Loading branch information
1 parent
43b0aac
commit 08a922b
Showing
6 changed files
with
209 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
mod ascii; | ||
mod ddc; | ||
mod error; | ||
use core::marker::PhantomData; | ||
pub use ddc::*; | ||
use error::Result; | ||
|
||
/// The main entry point for the library. | ||
/// This contains the main struct that will be used to interact with all the monitors | ||
pub struct DDC {} | ||
|
||
/// The ddc driver that will be used to interact with the monitors | ||
pub enum DDCDriver { | ||
Windows(WindowsDDC), | ||
Linux(LinuxDDC), | ||
} | ||
|
||
/// Uses windows native functions to interact | ||
pub struct WindowsDDC {} | ||
|
||
/// Uses ddcutil to interact with the monitors | ||
pub struct LinuxDDC {} | ||
|
||
/// A display identifier | ||
/// Placeholder | ||
pub struct DisplayIdent { | ||
__marker: PhantomData<()>, | ||
} | ||
|
||
/// Placeholder | ||
pub struct VCPFeature { | ||
__marker: PhantomData<()>, | ||
} | ||
|
||
pub trait DDCDriverTrait { | ||
fn probe(&self) -> Result<DisplayList>; | ||
fn get_vcp(&self, display: &DisplayIdent, vcp: u8) -> Result<VCPFeature>; | ||
fn set_vcp(&self, display: &DisplayIdent, vcp: u8) -> Result<()>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters