pub struct Monitor { /* private fields */ }
Expand description
A handle to an attached monitor that allows the use of DDC/CI operations.
Implementations§
Source§impl Monitor
impl Monitor
Sourcepub unsafe fn new(monitor: PHYSICAL_MONITOR) -> Self
pub unsafe fn new(monitor: PHYSICAL_MONITOR) -> Self
Create a new monitor from the specified handle.
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Physical monitor description string.
Sourcepub fn winapi_get_timing_report(&self) -> Result<MC_TIMING_REPORT>
pub fn winapi_get_timing_report(&self) -> Result<MC_TIMING_REPORT>
Retrieves a monitor’s horizontal and vertical synchronization frequencies.
Sourcepub fn winapi_set_vcp_feature(&self, code: BYTE, value: DWORD) -> Result<()>
pub fn winapi_set_vcp_feature(&self, code: BYTE, value: DWORD) -> Result<()>
Sets the value of a Virtual Control Panel (VCP) code for a monitor.
Sourcepub fn winapi_save_current_settings(&self) -> Result<()>
pub fn winapi_save_current_settings(&self) -> Result<()>
Saves the current monitor settings to the display’s nonvolatile storage.
Sourcepub fn winapi_get_vcp_feature_and_vcp_feature_reply(
&self,
code: BYTE,
) -> Result<(MC_VCP_CODE_TYPE, DWORD, DWORD)>
pub fn winapi_get_vcp_feature_and_vcp_feature_reply( &self, code: BYTE, ) -> Result<(MC_VCP_CODE_TYPE, DWORD, DWORD)>
Retrieves the current value, maximum value, and code type of a Virtual Control Panel (VCP) code for a monitor.
Returns (vcp_type, current_value, max_value)
Sourcepub fn winapi_get_capabilities_string_length(&self) -> Result<DWORD>
pub fn winapi_get_capabilities_string_length(&self) -> Result<DWORD>
Retrieves the length of the buffer to pass to
winapi_capabilities_request_and_capabilities_reply
.
Sourcepub fn winapi_capabilities_request_and_capabilities_reply(
&self,
string: &mut [u8],
) -> Result<()>
pub fn winapi_capabilities_request_and_capabilities_reply( &self, string: &mut [u8], ) -> Result<()>
Retrieves a string describing a monitor’s capabilities.
This string is always ASCII and includes a terminating null character.
Trait Implementations§
Source§impl Ddc for Monitor
impl Ddc for Monitor
Source§fn capabilities_string(&mut self) -> Result<Vec<u8>, Self::Error>
fn capabilities_string(&mut self) -> Result<Vec<u8>, Self::Error>
Retrieve the capability string from the device. Read more
Source§fn get_vcp_feature(
&mut self,
code: FeatureCode,
) -> Result<VcpValue, Self::Error>
fn get_vcp_feature( &mut self, code: FeatureCode, ) -> Result<VcpValue, Self::Error>
Gets the current value of an MCCS VCP feature.
Source§fn set_vcp_feature(
&mut self,
code: FeatureCode,
value: u16,
) -> Result<(), Self::Error>
fn set_vcp_feature( &mut self, code: FeatureCode, value: u16, ) -> Result<(), Self::Error>
Sets a VCP feature to the specified value.
Source§fn save_current_settings(&mut self) -> Result<(), Self::Error>
fn save_current_settings(&mut self) -> Result<(), Self::Error>
Instructs the device to save its current settings.
Source§fn get_timing_report(&mut self) -> Result<TimingMessage, Self::Error>
fn get_timing_report(&mut self) -> Result<TimingMessage, Self::Error>
Retrieves a timing report from the device.
Auto Trait Implementations§
impl Freeze for Monitor
impl RefUnwindSafe for Monitor
impl !Send for Monitor
impl !Sync for Monitor
impl Unpin for Monitor
impl UnwindSafe for Monitor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more