[][src]Struct android_ndk::configuration::Configuration

pub struct Configuration { /* fields omitted */ }

A native AConfiguration *.

This stores information about configuration.

Methods

impl Configuration[src]

pub unsafe fn from_ptr(ptr: NonNull<AConfiguration>) -> Self[src]

Construct a Configuration from a pointer.

By calling this function, you assert that it is a valid pointer to a native AConfiguration, and give ownership of it to the Configuration instance.

pub unsafe fn clone_from_ptr(ptr: NonNull<AConfiguration>) -> Self[src]

Create a new Configuration, with the same contents as the AConfiguration referenced by the pointer.

This is useful if you have a pointer, but not ownership of it.

pub fn ptr(&self) -> NonNull<AConfiguration>[src]

The pointer to the native AConfiguration. Keep in mind that the Configuration object still has ownership, and will free it when dropped.

pub fn new() -> Self[src]

Create a new Configuration, with none of the values set.

pub fn copy(&mut self, other: &Self)[src]

dest.copy(&src) copies the contents of src to dest

pub fn diff(&self, other: &Self) -> DiffResult[src]

Information about what fields differ between the two configurations

pub fn matches(&self, requested: &Self) -> bool[src]

Returns false if anything in self conflicts with requested

pub fn country(&self) -> String[src]

Returns the country code. It will always be two letters.

pub fn density(&self) -> Density[src]

Returns the screen density class.

pub fn keyboard(&self) -> Keyboard[src]

Returns the keyboard type.

pub fn language(&self) -> Option<String>[src]

Returns the language, as a String of two characters, if a language is set

pub fn layout_direction(&self) -> LayoutDir[src]

Returns the layout direction

pub fn mcc(&self) -> i32[src]

Returns the mobile country code.

pub fn mnc(&self) -> Option<i32>[src]

Returns the mobile network code, if one is defined

pub fn nav_hidden(&self) -> NavHidden[src]

pub fn navigation(&self) -> Navigation[src]

pub fn orientation(&self) -> Orientation[src]

pub fn screen_height_dp(&self) -> Option<i32>[src]

pub fn screen_width_dp(&self) -> Option<i32>[src]

pub fn screen_long(&self) -> ScreenLong[src]

pub fn screen_round(&self) -> ScreenRound[src]

pub fn screen_size(&self) -> ScreenSize[src]

pub fn sdk_version(&self) -> i32[src]

pub fn smallest_screen_width_dp(&self) -> Option<i32>[src]

pub fn touchscreen(&self) -> Touchscreen[src]

pub fn ui_mode_night(&self) -> UiModeNight[src]

pub fn ui_mode_type(&self) -> UiModeType[src]

Trait Implementations

impl Send for Configuration[src]

impl Drop for Configuration[src]

impl Eq for Configuration[src]

impl Sync for Configuration[src]

impl Clone for Configuration[src]

impl PartialEq<Configuration> for Configuration[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<'a, T> Desc<'a, T> for T[src]