You.i Engine
CYIScreenProperty Class Reference

#include <screen/YiScreenProperty.h>

Public Types

enum  Orientation {
  Orientation::Landscape,
  Orientation::Portrait,
  Orientation::Auto,
  Orientation::LandscapeRight,
  Orientation::LandscapeLeft,
  Orientation::PortraitUpright,
  Orientation::AutoUpright
}
 
enum  StatusBar {
  StatusBar::Visible,
  StatusBar::Hidden
}
 
enum  NavigationBar {
  NavigationBar::Visible,
  NavigationBar::Hidden
}
 
enum  SurfaceSizingMode {
  SurfaceSizingMode::UnderScreenElements,
  SurfaceSizingMode::OutsideScreenElements,
  SurfaceSizingMode::Legacy
}
 

Public Member Functions

 CYIScreenProperty ()=delete
 

Static Public Member Functions

static bool IsLandscape (CYIScreenProperty::Orientation orientation)
 
static bool IsPortrait (CYIScreenProperty::Orientation orientation)
 
static bool IsAuto (CYIScreenProperty::Orientation orientation)
 

Member Enumeration Documentation

◆ NavigationBar

Enumerator
Visible 
Hidden 

◆ Orientation

Enumerator
Landscape 

Force device to landscape mode. App can rotate between landscape orientations.

Portrait 

Force device to portrait mode. App can rotate between portrait orientations.

Auto 

App can rotate between all available orientations. Where capable, this setting will respect user orientation preferences. Due to differences in the underlying platform APIs, this setting behaves slightly differently on iOS vs Android.
On iOS this setting is mapped to UIInterfaceOrientationMaskAll (see https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplication_Class/#//apple_ref/c/tdef/UIInterfaceOrientationMask for details).
On Android this setting is mapped to fullUser on Android API levels 18 and above, and fullSensor on earlier versions (see http://developer.android.com/reference/android/R.attr.html#screenOrientation for details)

LandscapeRight 

Force device to landscape right. App cannot rotate.

LandscapeLeft 

Force device to landscape left. App cannot rotate.

PortraitUpright 

Force device to portrait upright. App cannot rotate.

AutoUpright 

App can rotate between available orientations, but not upside-down. Due to differences in the underlying platform APIs, this setting behaves slightly differently on iOS vs Android.
On iOS this setting is mapped to UIInterfaceOrientationMaskAllButUpsideDown (see https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplication_Class/#//apple_ref/c/tdef/UIInterfaceOrientationMask for details).
On Android this setting is mapped to sensor . Note that some Android devices will allow the UI to rotate 'upside-down' even with this setting. (see http://developer.android.com/reference/android/R.attr.html#screenOrientation for details).

◆ StatusBar

Enumerator
Visible 
Hidden 

◆ SurfaceSizingMode

Enumerator
UnderScreenElements 

Causes the rendering surface to be 'under' the screen elements such that the screen elements are overlaid on top of the rendering surface.

OutsideScreenElements 

Causes the rendering surface to be shrunk so that it doesn't overlap with the screen elements.

Legacy 

Causes the rendering surface to adopt the sizing and rendering behavior from before configurable surface sizing modes were introduced. This behavior is inconsistent across platforms and devices, and it's use is only recommended to maintain the surface sizing behaviour of legacy applications.

Constructor & Destructor Documentation

◆ CYIScreenProperty()

CYIScreenProperty::CYIScreenProperty ( )
delete

Member Function Documentation

◆ IsAuto()

static bool CYIScreenProperty::IsAuto ( CYIScreenProperty::Orientation  orientation)
inlinestatic

returns true if orientation is an auto type.

◆ IsLandscape()

static bool CYIScreenProperty::IsLandscape ( CYIScreenProperty::Orientation  orientation)
inlinestatic

returns true if orientation is a landscape type.

◆ IsPortrait()

static bool CYIScreenProperty::IsPortrait ( CYIScreenProperty::Orientation  orientation)
inlinestatic

returns true if orientation is a portrait type.


The documentation for this class was generated from the following file: