Documentation
¶
Overview ¶
Package config provides Go bindings for Android AConfiguration.
Index ¶
- type CONFIGURATION
- type Config
- func (h *Config) Close() error
- func (h *Config) Copy(src *Config)
- func (h *Config) Country(outCountry string)
- func (h *Config) Density() int32
- func (h *Config) Diff(config2 *Config) error
- func (h *Config) GetGrammaticalGender() error
- func (h *Config) GetKeyboard() error
- func (h *Config) GetKeysHidden() error
- func (h *Config) GetLayoutDirection() error
- func (h *Config) GetMcc() error
- func (h *Config) GetMnc() error
- func (h *Config) GetNavHidden() error
- func (h *Config) GetNavigation() error
- func (h *Config) GetScreenLong() error
- func (h *Config) GetScreenRound() error
- func (h *Config) GetSmallestScreenWidthDp() error
- func (h *Config) GetTouchscreen() error
- func (h *Config) GetUiModeNight() error
- func (h *Config) GetUiModeType() error
- func (h *Config) IsBetterThan(test *Config, requested *Config) error
- func (h *Config) Language(outLanguage string)
- func (h *Config) Match(requested *Config) error
- func (h *Config) Orientation() int32
- func (h *Config) Pointer() unsafe.Pointer
- func (h *Config) ScreenHeightDp() int32
- func (h *Config) ScreenSize() int32
- func (h *Config) ScreenWidthDp() int32
- func (h *Config) SdkVersion() int32
- func (h *Config) SetCountry(country string)
- func (h *Config) SetDensity(density int32)
- func (h *Config) SetGrammaticalGender(value int32)
- func (h *Config) SetKeyboard(keyboard int32)
- func (h *Config) SetKeysHidden(keysHidden int32)
- func (h *Config) SetLanguage(language string)
- func (h *Config) SetLayoutDirection(value int32)
- func (h *Config) SetMcc(mcc int32)
- func (h *Config) SetMnc(mnc int32)
- func (h *Config) SetNavHidden(navHidden int32)
- func (h *Config) SetNavigation(navigation int32)
- func (h *Config) SetOrientation(orientation Orientation)
- func (h *Config) SetScreenHeightDp(value int32)
- func (h *Config) SetScreenLong(screenLong int32)
- func (h *Config) SetScreenSize(screenSize ScreenSize)
- func (h *Config) SetScreenWidthDp(value int32)
- func (h *Config) SetSdkVersion(sdkVersion int32)
- func (h *Config) SetSmallestScreenWidthDp(value int32)
- func (h *Config) SetTouchscreen(touchscreen int32)
- func (h *Config) SetUiModeNight(uiModeNight int32)
- func (h *Config) SetUiModeType(uiModeType int32)
- type Error
- type Orientation
- type ScreenSize
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CONFIGURATION ¶
type CONFIGURATION int32
const ( ACONFIGURATION_ORIENTATION_ANY CONFIGURATION = 0 ACONFIGURATION_ORIENTATION_PORT CONFIGURATION = 1 ACONFIGURATION_ORIENTATION_LAND CONFIGURATION = 2 ACONFIGURATION_ORIENTATION_SQUARE CONFIGURATION = 3 ACONFIGURATION_TOUCHSCREEN_ANY CONFIGURATION = 0 ACONFIGURATION_TOUCHSCREEN_NOTOUCH CONFIGURATION = 1 ACONFIGURATION_TOUCHSCREEN_STYLUS CONFIGURATION = 2 ACONFIGURATION_TOUCHSCREEN_FINGER CONFIGURATION = 3 ACONFIGURATION_DENSITY_DEFAULT CONFIGURATION = 0 ACONFIGURATION_DENSITY_LOW CONFIGURATION = 120 ACONFIGURATION_DENSITY_MEDIUM CONFIGURATION = 160 ACONFIGURATION_DENSITY_TV CONFIGURATION = 213 ACONFIGURATION_DENSITY_HIGH CONFIGURATION = 240 ACONFIGURATION_DENSITY_XHIGH CONFIGURATION = 320 ACONFIGURATION_DENSITY_XXHIGH CONFIGURATION = 480 ACONFIGURATION_DENSITY_XXXHIGH CONFIGURATION = 640 ACONFIGURATION_DENSITY_ANY CONFIGURATION = 65534 ACONFIGURATION_DENSITY_NONE CONFIGURATION = 65535 ACONFIGURATION_KEYBOARD_ANY CONFIGURATION = 0 ACONFIGURATION_KEYBOARD_NOKEYS CONFIGURATION = 1 ACONFIGURATION_KEYBOARD_QWERTY CONFIGURATION = 2 ACONFIGURATION_KEYBOARD_12KEY CONFIGURATION = 3 ACONFIGURATION_NAVIGATION_ANY CONFIGURATION = 0 ACONFIGURATION_NAVIGATION_NONAV CONFIGURATION = 1 ACONFIGURATION_NAVIGATION_DPAD CONFIGURATION = 2 ACONFIGURATION_NAVIGATION_TRACKBALL CONFIGURATION = 3 ACONFIGURATION_NAVIGATION_WHEEL CONFIGURATION = 4 ACONFIGURATION_KEYSHIDDEN_ANY CONFIGURATION = 0 ACONFIGURATION_KEYSHIDDEN_NO CONFIGURATION = 1 ACONFIGURATION_KEYSHIDDEN_YES CONFIGURATION = 2 ACONFIGURATION_KEYSHIDDEN_SOFT CONFIGURATION = 3 ACONFIGURATION_NAVHIDDEN_ANY CONFIGURATION = 0 ACONFIGURATION_NAVHIDDEN_NO CONFIGURATION = 1 ACONFIGURATION_NAVHIDDEN_YES CONFIGURATION = 2 ACONFIGURATION_SCREENSIZE_ANY CONFIGURATION = 0 ACONFIGURATION_SCREENSIZE_SMALL CONFIGURATION = 1 ACONFIGURATION_SCREENSIZE_NORMAL CONFIGURATION = 2 ACONFIGURATION_SCREENSIZE_LARGE CONFIGURATION = 3 ACONFIGURATION_SCREENSIZE_XLARGE CONFIGURATION = 4 ACONFIGURATION_SCREENLONG_ANY CONFIGURATION = 0 ACONFIGURATION_SCREENLONG_NO CONFIGURATION = 1 ACONFIGURATION_SCREENLONG_YES CONFIGURATION = 2 ACONFIGURATION_SCREENROUND_ANY CONFIGURATION = 0 ACONFIGURATION_SCREENROUND_NO CONFIGURATION = 1 ACONFIGURATION_SCREENROUND_YES CONFIGURATION = 2 ACONFIGURATION_WIDE_COLOR_GAMUT_ANY CONFIGURATION = 0 ACONFIGURATION_WIDE_COLOR_GAMUT_NO CONFIGURATION = 1 ACONFIGURATION_WIDE_COLOR_GAMUT_YES CONFIGURATION = 2 ACONFIGURATION_HDR_ANY CONFIGURATION = 0 ACONFIGURATION_HDR_NO CONFIGURATION = 1 ACONFIGURATION_HDR_YES CONFIGURATION = 2 ACONFIGURATION_UI_MODE_TYPE_ANY CONFIGURATION = 0 ACONFIGURATION_UI_MODE_TYPE_NORMAL CONFIGURATION = 1 ACONFIGURATION_UI_MODE_TYPE_DESK CONFIGURATION = 2 ACONFIGURATION_UI_MODE_TYPE_CAR CONFIGURATION = 3 ACONFIGURATION_UI_MODE_TYPE_TELEVISION CONFIGURATION = 4 ACONFIGURATION_UI_MODE_TYPE_APPLIANCE CONFIGURATION = 5 ACONFIGURATION_UI_MODE_TYPE_WATCH CONFIGURATION = 6 ACONFIGURATION_UI_MODE_TYPE_VR_HEADSET CONFIGURATION = 7 ACONFIGURATION_UI_MODE_NIGHT_ANY CONFIGURATION = 0 ACONFIGURATION_UI_MODE_NIGHT_NO CONFIGURATION = 1 ACONFIGURATION_UI_MODE_NIGHT_YES CONFIGURATION = 2 ACONFIGURATION_SCREEN_WIDTH_DP_ANY CONFIGURATION = 0 ACONFIGURATION_SCREEN_HEIGHT_DP_ANY CONFIGURATION = 0 ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY CONFIGURATION = 0 ACONFIGURATION_LAYOUTDIR_ANY CONFIGURATION = 0 ACONFIGURATION_LAYOUTDIR_LTR CONFIGURATION = 1 ACONFIGURATION_LAYOUTDIR_RTL CONFIGURATION = 2 ACONFIGURATION_MCC CONFIGURATION = 1 ACONFIGURATION_MNC CONFIGURATION = 2 ACONFIGURATION_LOCALE CONFIGURATION = 4 ACONFIGURATION_TOUCHSCREEN CONFIGURATION = 8 ACONFIGURATION_KEYBOARD CONFIGURATION = 16 ACONFIGURATION_KEYBOARD_HIDDEN CONFIGURATION = 32 ACONFIGURATION_NAVIGATION CONFIGURATION = 64 ACONFIGURATION_ORIENTATION CONFIGURATION = 128 ACONFIGURATION_DENSITY CONFIGURATION = 256 ACONFIGURATION_SCREEN_SIZE CONFIGURATION = 512 ACONFIGURATION_VERSION CONFIGURATION = 1024 ACONFIGURATION_SCREEN_LAYOUT CONFIGURATION = 2048 ACONFIGURATION_UI_MODE CONFIGURATION = 4096 ACONFIGURATION_SMALLEST_SCREEN_SIZE CONFIGURATION = 8192 ACONFIGURATION_LAYOUTDIR CONFIGURATION = 16384 ACONFIGURATION_SCREEN_ROUND CONFIGURATION = 32768 ACONFIGURATION_COLOR_MODE CONFIGURATION = 65536 ACONFIGURATION_GRAMMATICAL_GENDER CONFIGURATION = 131072 ACONFIGURATION_MNC_ZERO CONFIGURATION = 65535 ACONFIGURATION_GRAMMATICAL_GENDER_ANY CONFIGURATION = 0 ACONFIGURATION_GRAMMATICAL_GENDER_NEUTER CONFIGURATION = 1 ACONFIGURATION_GRAMMATICAL_GENDER_FEMININE CONFIGURATION = 2 ACONFIGURATION_GRAMMATICAL_GENDER_MASCULINE CONFIGURATION = 3 )
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config wraps the NDK AConfiguration handle.
func NewConfigFromPointer ¶
NewConfigFromPointer wraps a raw AConfiguration pointer.
func (*Config) GetGrammaticalGender ¶
GetGrammaticalGender calls the underlying NDK function.
func (*Config) GetKeyboard ¶
GetKeyboard calls the underlying NDK function.
func (*Config) GetKeysHidden ¶
GetKeysHidden calls the underlying NDK function.
func (*Config) GetLayoutDirection ¶
GetLayoutDirection calls the underlying NDK function.
func (*Config) GetNavHidden ¶
GetNavHidden calls the underlying NDK function.
func (*Config) GetNavigation ¶
GetNavigation calls the underlying NDK function.
func (*Config) GetScreenLong ¶
GetScreenLong calls the underlying NDK function.
func (*Config) GetScreenRound ¶
GetScreenRound calls the underlying NDK function.
func (*Config) GetSmallestScreenWidthDp ¶
GetSmallestScreenWidthDp calls the underlying NDK function.
func (*Config) GetTouchscreen ¶
GetTouchscreen calls the underlying NDK function.
func (*Config) GetUiModeNight ¶
GetUiModeNight calls the underlying NDK function.
func (*Config) GetUiModeType ¶
GetUiModeType calls the underlying NDK function.
func (*Config) IsBetterThan ¶
IsBetterThan calls the underlying NDK function.
func (*Config) Orientation ¶
Orientation returns the value directly.
func (*Config) ScreenHeightDp ¶
ScreenHeightDp returns the value directly.
func (*Config) ScreenSize ¶
ScreenSize returns the value directly.
func (*Config) ScreenWidthDp ¶
ScreenWidthDp returns the value directly.
func (*Config) SdkVersion ¶
SdkVersion returns the value directly.
func (*Config) SetCountry ¶
SetCountry calls the underlying NDK function.
func (*Config) SetDensity ¶
SetDensity calls the underlying NDK function.
func (*Config) SetGrammaticalGender ¶
SetGrammaticalGender calls the underlying NDK function.
func (*Config) SetKeyboard ¶
SetKeyboard calls the underlying NDK function.
func (*Config) SetKeysHidden ¶
SetKeysHidden calls the underlying NDK function.
func (*Config) SetLanguage ¶
SetLanguage calls the underlying NDK function.
func (*Config) SetLayoutDirection ¶
SetLayoutDirection calls the underlying NDK function.
func (*Config) SetNavHidden ¶
SetNavHidden calls the underlying NDK function.
func (*Config) SetNavigation ¶
SetNavigation calls the underlying NDK function.
func (*Config) SetOrientation ¶
func (h *Config) SetOrientation(orientation Orientation)
SetOrientation calls the underlying NDK function.
func (*Config) SetScreenHeightDp ¶
SetScreenHeightDp calls the underlying NDK function.
func (*Config) SetScreenLong ¶
SetScreenLong calls the underlying NDK function.
func (*Config) SetScreenSize ¶
func (h *Config) SetScreenSize(screenSize ScreenSize)
SetScreenSize calls the underlying NDK function.
func (*Config) SetScreenWidthDp ¶
SetScreenWidthDp calls the underlying NDK function.
func (*Config) SetSdkVersion ¶
SetSdkVersion calls the underlying NDK function.
func (*Config) SetSmallestScreenWidthDp ¶
SetSmallestScreenWidthDp calls the underlying NDK function.
func (*Config) SetTouchscreen ¶
SetTouchscreen calls the underlying NDK function.
func (*Config) SetUiModeNight ¶
SetUiModeNight calls the underlying NDK function.
func (*Config) SetUiModeType ¶
SetUiModeType calls the underlying NDK function.
type Orientation ¶
type Orientation int32
const ( OrientationAny Orientation = 0 OrientationPort Orientation = 1 OrientationLand Orientation = 2 OrientationSquare Orientation = 3 )
type ScreenSize ¶
type ScreenSize int32
const ( ScreensizeAny ScreenSize = 0 ScreensizeSmall ScreenSize = 1 ScreensizeNormal ScreenSize = 2 ScreensizeLarge ScreenSize = 3 ScreensizeXlarge ScreenSize = 4 )