pub struct DisplayConfiguration {
pub width: u32,
pub height: u32,
pub dpi: u32,
pub flags: u32,
pub display: u32,
}Expand description
A DisplayConfiguration describes a primary or secondary display available to the emulator. The screen aspect ratio cannot be longer (or wider) than 21:9 (or 9:21). Screen sizes larger than 4k will be rejected.
Common configurations (w x h) are:
- 480p (480x720) 142 dpi
- 720p (720x1280) 213 dpi
- 1080p (1080x1920) 320 dpi
- 4K (2160x3840) 320 dpi
- 4K (2160x3840) 640 dpi (upscaled)
The behavior of the virtual display depends on the flags that are provided to this method. By default, virtual displays are created to be private, non-presentation and unsecure.
Fields§
§width: u32The width of the display, restricted to: 320 * (dpi / 160) <= width
height: u32The heigh of the display, restricted to:
- 320 * (dpi / 160) <= height
dpi: u32The pixel density (dpi). See https://developer.android.com/training/multiscreen/screendensities for details. This value should be in the range [120, …, 640]
flags: u32A combination of virtual display flags. These flags can be constructed by combining the DisplayFlags enum described above.
The behavior of the virtual display depends on the flags. By default virtual displays are created to be private, non-presentation and unsecure.
display: u32The id of the display. The primary (default) display has the display ID of 0. A secondary display has a display ID not 0.
A display with the id in the range [1, userConfigurable] can be modified. See DisplayConfigurations below for details.
The id can be used to get or stream a screenshot.
Trait Implementations§
Source§impl Clone for DisplayConfiguration
impl Clone for DisplayConfiguration
Source§fn clone(&self) -> DisplayConfiguration
fn clone(&self) -> DisplayConfiguration
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DisplayConfiguration
impl Debug for DisplayConfiguration
Source§impl Default for DisplayConfiguration
impl Default for DisplayConfiguration
Source§impl Hash for DisplayConfiguration
impl Hash for DisplayConfiguration
Source§impl Message for DisplayConfiguration
impl Message for DisplayConfiguration
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for DisplayConfiguration
impl PartialEq for DisplayConfiguration
impl Copy for DisplayConfiguration
impl Eq for DisplayConfiguration
impl StructuralPartialEq for DisplayConfiguration
Auto Trait Implementations§
impl Freeze for DisplayConfiguration
impl RefUnwindSafe for DisplayConfiguration
impl Send for DisplayConfiguration
impl Sync for DisplayConfiguration
impl Unpin for DisplayConfiguration
impl UnwindSafe for DisplayConfiguration
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request