Documentation ¶
Index ¶
- Constants
- func ANativeActivity_onCreate(act *Activity, savedState unsafe.Pointer, savedStateSize C.size_t)
- func ANativeActivity_onCreateB(act *Activity, savedState unsafe.Pointer, savedStateSize C.size_t)
- func FindMatchLibrary(pattern string) []string
- func GetLibraryPath() string
- func GetPackageName() string
- func JNI_OnLoad(vm *C.JavaVM, reserved unsafe.Pointer) C.jint
- func Loop() bool
- func PropGet(k string) string
- func PropVisit(cb func(k, v string))
- func SetMainCB(fn func(*Context))
- type Activity
- func (a *Activity) AssetManager() *AssetManager
- func (a *Activity) Configuration() *Configuration
- func (act *Activity) Context() *Context
- func (a *Activity) ExternalDataPath() string
- func (a *Activity) Finish()
- func (a *Activity) HideSoftInput(flags int)
- func (a *Activity) Instance() unsafe.Pointer
- func (a *Activity) InternalDataPath() string
- func (a *Activity) JActivity() uintptr
- func (a *Activity) ObbPath() string
- func (a *Activity) SdkVersion() int
- func (a *Activity) SetWindowFlags(addFlags, removeFlags int)
- func (a *Activity) SetWindowFormat(format int)
- func (a *Activity) ShowSoftInput(flags int)
- func (act *Activity) String() string
- type AdditionalInfoEvent
- type Asset
- func (asset *Asset) Close() error
- func (asset *Asset) GetBuffer() []byte
- func (asset *Asset) GetRemainingLength() int64
- func (asset *Asset) IsAllocated() bool
- func (asset *Asset) Length() int64
- func (asset *Asset) Read(buf []byte) (int, error)
- func (asset *Asset) Seek(offset int64, whence int) (int64, error)
- type AssetDir
- type AssetManager
- type Callbacks
- type Camera
- func (c Camera) Antibanding() CameraAntibanding
- func (c Camera) ApplyProperties()
- func (c Camera) Disconnect()
- func (c Camera) Exposure() int
- func (c Camera) FlashMode() CameraFlashMode
- func (c Camera) FocalLength() float32
- func (c Camera) FocusDistance(index CameraFocusDistance) float32
- func (c Camera) FocusMode() CameraFocusMode
- func (c Camera) Fps() int
- func (c Camera) FrameSize() (int, int)
- func (c Camera) IsExposeLock() bool
- func (c Camera) IsWhiteBalanceLock() bool
- func (c Camera) PreviewFormat() string
- func (c Camera) SetAntibanding(v CameraAntibanding)
- func (c Camera) SetExposeLock(b bool)
- func (c Camera) SetExposure(v int)
- func (c Camera) SetFlashMode(v CameraFlashMode)
- func (c Camera) SetFocusMode(v CameraFocusMode)
- func (c Camera) SetFrameSize(w, h int)
- func (c Camera) SetWhiteBalance(v CameraWhiteBalance)
- func (c Camera) SetWhiteBalanceLock(b bool)
- func (c Camera) SupportedPreviewSizes() string
- func (c Camera) WhiteBalance() CameraWhiteBalance
- type CameraAntibanding
- type CameraCallback
- type CameraFlashMode
- type CameraFocusDistance
- type CameraFocusMode
- type CameraWhiteBalance
- type Context
- func (ctx *Context) Begin(cb Callbacks)
- func (ctx *Context) Call(fun func(), sync bool)
- func (ctx *Context) Debug(enable bool)
- func (ctx *Context) Loop()
- func (ctx *Context) Name() string
- func (ctx *Context) Package() string
- func (ctx *Context) PollEvent() bool
- func (ctx *Context) Release()
- func (ctx *Context) Run(cb Callbacks)
- func (ctx *Context) String() string
- func (ctx *Context) WaitEvent() bool
- func (ctx *Context) Wake()
- func (ctx *Context) WillDestory() bool
- type DynamicSensorEvent
- type HardwareBuffer
- type HeartRateEvent
- type Looper
- type LooperCallback
- type MagneticVector
- type MetaDataEvent
- type ObbCallbackFunc
- type ObbInfo
- type Rect
- type SENSOR_TYPE
- type Sensor
- func (s *Sensor) Disable(act *Activity)
- func (s *Sensor) Enable(act *Activity)
- func (sensor *Sensor) GetMinDelay() time.Duration
- func (sensor *Sensor) GetName() string
- func (sensor *Sensor) GetResolution() float32
- func (sensor *Sensor) GetType() SENSOR_TYPE
- func (sensor *Sensor) GetVendor() string
- func (s *Sensor) SetEventRate(act *Activity, t time.Duration)
- type SensorEvent
- type SensorEventQueue
- type SensorManager
- type SensorVector
- type StorageManager
- func (mgr *StorageManager) Delete()
- func (mgr *StorageManager) GetMountedObbPath(filename string) string
- func (mgr *StorageManager) IsObbMounted(filename string) bool
- func (mgr *StorageManager) MountObb(filename, key string, cb ObbCallbackFunc)
- func (mgr *StorageManager) UnmountObb(filename string, force bool, cb ObbCallbackFunc)
- type UncalibratedEvent
- type Window
- func (w *Window) Acquire()
- func (w *Window) Format() int
- func (w *Window) Height() int
- func (w *Window) Lock(inDirtyBounds Rect) (*WindowBuffer, Rect, bool)
- func (w *Window) Pointer() *C.ANativeWindow
- func (w *Window) Release()
- func (w *Window) SetBuffersGeometry(width, height, format int) int
- func (win *Window) String() string
- func (w *Window) UnlockAndPost() bool
- func (w *Window) Width() int
- type WindowBuffer
Constants ¶
const ( ACTIVITY_SHOW_SOFT_INPUT_IMPLICIT = C.ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT ACTIVITY_SHOW_SOFT_INPUT_FORCED = C.ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED )
*
- Flags for ANativeActivity_showSoftInput; see the Java InputMethodManager
- API for documentation.
const ( ACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY = C.ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY ACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS = C.ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS )
*
- Flags for ANativeActivity_hideSoftInput; see the Java InputMethodManager
- API for documentation.
const ( ASSET_MODE_UNKNOWN = C.AASSET_MODE_UNKNOWN ASSET_MODE_RANDOM = C.AASSET_MODE_RANDOM ASSET_MODE_STREAMING = C.AASSET_MODE_STREAMING ASSET_MODE_BUFFER = C.AASSET_MODE_BUFFER )
Available modes for opening assets
const ( CAMERA_FLASH_MODE_AUTO = CameraFlashMode(C.ANDROID_CAMERA_FLASH_MODE_AUTO) CAMERA_FLASH_MODE_OFF = CameraFlashMode(C.ANDROID_CAMERA_FLASH_MODE_OFF) CAMERA_FLASH_MODE_ON = CameraFlashMode(C.ANDROID_CAMERA_FLASH_MODE_ON) CAMERA_FLASH_MODE_RED_EYE = CameraFlashMode(C.ANDROID_CAMERA_FLASH_MODE_RED_EYE) CAMERA_FLASH_MODE_TORCH = CameraFlashMode(C.ANDROID_CAMERA_FLASH_MODE_TORCH) CAMERA_FLASH_MODES_NUM = CameraFlashMode(C.ANDROID_CAMERA_FLASH_MODES_NUM) CAMERA_FOCUS_MODE_AUTO = CameraFocusMode(C.ANDROID_CAMERA_FOCUS_MODE_AUTO) CAMERA_FOCUS_MODE_CONTINUOUS_VIDEO = CameraFocusMode(C.ANDROID_CAMERA_FOCUS_MODE_CONTINUOUS_VIDEO) CAMERA_FOCUS_MODE_EDOF = CameraFocusMode(C.ANDROID_CAMERA_FOCUS_MODE_EDOF) CAMERA_FOCUS_MODE_FIXED = CameraFocusMode(C.ANDROID_CAMERA_FOCUS_MODE_FIXED) CAMERA_FOCUS_MODE_INFINITY = CameraFocusMode(C.ANDROID_CAMERA_FOCUS_MODE_INFINITY) CAMERA_FOCUS_MODE_MACRO = CameraFocusMode(C.ANDROID_CAMERA_FOCUS_MODE_MACRO) CAMERA_FOCUS_MODE_CONTINUOUS_PICTURE = CameraFocusMode(C.ANDROID_CAMERA_FOCUS_MODE_CONTINUOUS_PICTURE) CAMERA_FOCUS_MODES_NUM = CameraFocusMode(C.ANDROID_CAMERA_FOCUS_MODES_NUM) CAMERA_WHITE_BALANCE_AUTO = CameraWhiteBalance(C.ANDROID_CAMERA_WHITE_BALANCE_AUTO) CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT = CameraWhiteBalance(C.ANDROID_CAMERA_WHITE_BALANCE_CLOUDY_DAYLIGHT) CAMERA_WHITE_BALANCE_DAYLIGHT = CameraWhiteBalance(C.ANDROID_CAMERA_WHITE_BALANCE_DAYLIGHT) CAMERA_WHITE_BALANCE_FLUORESCENT = CameraWhiteBalance(C.ANDROID_CAMERA_WHITE_BALANCE_FLUORESCENT) CAMERA_WHITE_BALANCE_INCANDESCENT = CameraWhiteBalance(C.ANDROID_CAMERA_WHITE_BALANCE_INCANDESCENT) CAMERA_WHITE_BALANCE_SHADE = CameraWhiteBalance(C.ANDROID_CAMERA_WHITE_BALANCE_SHADE) CAMERA_WHITE_BALANCE_TWILIGHT = CameraWhiteBalance(C.ANDROID_CAMERA_WHITE_BALANCE_TWILIGHT) CAMERA_WHITE_BALANCE_WARM_FLUORESCENT = CameraWhiteBalance(C.ANDROID_CAMERA_WHITE_BALANCE_WARM_FLUORESCENT) CAMERA_WHITE_BALANCE_MODES_NUM = CameraWhiteBalance(C.ANDROID_CAMERA_WHITE_BALANCE_MODES_NUM) CAMERA_ANTIBANDING_50HZ = CameraAntibanding(C.ANDROID_CAMERA_ANTIBANDING_50HZ) CAMERA_ANTIBANDING_60HZ = CameraAntibanding(C.ANDROID_CAMERA_ANTIBANDING_60HZ) CAMERA_ANTIBANDING_AUTO = CameraAntibanding(C.ANDROID_CAMERA_ANTIBANDING_AUTO) CAMERA_ANTIBANDING_OFF = CameraAntibanding(C.ANDROID_CAMERA_ANTIBANDING_OFF) CAMERA_ANTIBANDING_MODES_NUM = CameraAntibanding(C.ANDROID_CAMERA_ANTIBANDING_MODES_NUM) CAMERA_FOCUS_DISTANCE_NEAR_INDEX = CameraFocusDistance(C.ANDROID_CAMERA_FOCUS_DISTANCE_NEAR_INDEX) CAMERA_FOCUS_DISTANCE_OPTIMAL_INDEX = CameraFocusDistance(C.ANDROID_CAMERA_FOCUS_DISTANCE_OPTIMAL_INDEX) CAMERA_FOCUS_DISTANCE_FAR_INDEX = CameraFocusDistance(C.ANDROID_CAMERA_FOCUS_DISTANCE_FAR_INDEX) )
const ( KEYCODE_UNKNOWN = C.AKEYCODE_UNKNOWN KEYCODE_SOFT_LEFT = C.AKEYCODE_SOFT_LEFT KEYCODE_SOFT_RIGHT = C.AKEYCODE_SOFT_RIGHT KEYCODE_HOME = C.AKEYCODE_HOME KEYCODE_BACK = C.AKEYCODE_BACK KEYCODE_CALL = C.AKEYCODE_CALL KEYCODE_ENDCALL = C.AKEYCODE_ENDCALL KEYCODE_0 = C.AKEYCODE_0 KEYCODE_1 = C.AKEYCODE_1 KEYCODE_2 = C.AKEYCODE_2 KEYCODE_3 = C.AKEYCODE_3 KEYCODE_4 = C.AKEYCODE_4 KEYCODE_5 = C.AKEYCODE_5 KEYCODE_6 = C.AKEYCODE_6 KEYCODE_7 = C.AKEYCODE_7 KEYCODE_8 = C.AKEYCODE_8 KEYCODE_9 = C.AKEYCODE_9 KEYCODE_STAR = C.AKEYCODE_STAR KEYCODE_POUND = C.AKEYCODE_POUND KEYCODE_DPAD_UP = C.AKEYCODE_DPAD_UP KEYCODE_DPAD_DOWN = C.AKEYCODE_DPAD_DOWN KEYCODE_DPAD_LEFT = C.AKEYCODE_DPAD_LEFT KEYCODE_DPAD_RIGHT = C.AKEYCODE_DPAD_RIGHT KEYCODE_DPAD_CENTER = C.AKEYCODE_DPAD_CENTER KEYCODE_VOLUME_UP = C.AKEYCODE_VOLUME_UP KEYCODE_VOLUME_DOWN = C.AKEYCODE_VOLUME_DOWN KEYCODE_POWER = C.AKEYCODE_POWER KEYCODE_CAMERA = C.AKEYCODE_CAMERA KEYCODE_CLEAR = C.AKEYCODE_CLEAR KEYCODE_A = C.AKEYCODE_A KEYCODE_B = C.AKEYCODE_B KEYCODE_C = C.AKEYCODE_C KEYCODE_D = C.AKEYCODE_D KEYCODE_E = C.AKEYCODE_E KEYCODE_F = C.AKEYCODE_F KEYCODE_G = C.AKEYCODE_G KEYCODE_H = C.AKEYCODE_H KEYCODE_I = C.AKEYCODE_I KEYCODE_J = C.AKEYCODE_J KEYCODE_K = C.AKEYCODE_K KEYCODE_L = C.AKEYCODE_L KEYCODE_M = C.AKEYCODE_M KEYCODE_N = C.AKEYCODE_N KEYCODE_O = C.AKEYCODE_O KEYCODE_P = C.AKEYCODE_P KEYCODE_Q = C.AKEYCODE_Q KEYCODE_R = C.AKEYCODE_R KEYCODE_S = C.AKEYCODE_S KEYCODE_T = C.AKEYCODE_T KEYCODE_U = C.AKEYCODE_U KEYCODE_V = C.AKEYCODE_V KEYCODE_W = C.AKEYCODE_W KEYCODE_X = C.AKEYCODE_X KEYCODE_Y = C.AKEYCODE_Y KEYCODE_Z = C.AKEYCODE_Z KEYCODE_COMMA = C.AKEYCODE_COMMA KEYCODE_PERIOD = C.AKEYCODE_PERIOD KEYCODE_ALT_LEFT = C.AKEYCODE_ALT_LEFT KEYCODE_ALT_RIGHT = C.AKEYCODE_ALT_RIGHT KEYCODE_SHIFT_LEFT = C.AKEYCODE_SHIFT_LEFT KEYCODE_SHIFT_RIGHT = C.AKEYCODE_SHIFT_RIGHT KEYCODE_TAB = C.AKEYCODE_TAB KEYCODE_SPACE = C.AKEYCODE_SPACE KEYCODE_SYM = C.AKEYCODE_SYM KEYCODE_EXPLORER = C.AKEYCODE_EXPLORER KEYCODE_ENVELOPE = C.AKEYCODE_ENVELOPE KEYCODE_ENTER = C.AKEYCODE_ENTER KEYCODE_DEL = C.AKEYCODE_DEL KEYCODE_GRAVE = C.AKEYCODE_GRAVE KEYCODE_MINUS = C.AKEYCODE_MINUS KEYCODE_EQUALS = C.AKEYCODE_EQUALS KEYCODE_LEFT_BRACKET = C.AKEYCODE_LEFT_BRACKET KEYCODE_RIGHT_BRACKET = C.AKEYCODE_RIGHT_BRACKET KEYCODE_BACKSLASH = C.AKEYCODE_BACKSLASH KEYCODE_SEMICOLON = C.AKEYCODE_SEMICOLON KEYCODE_APOSTROPHE = C.AKEYCODE_APOSTROPHE KEYCODE_SLASH = C.AKEYCODE_SLASH KEYCODE_AT = C.AKEYCODE_AT KEYCODE_NUM = C.AKEYCODE_NUM KEYCODE_HEADSETHOOK = C.AKEYCODE_HEADSETHOOK KEYCODE_FOCUS = C.AKEYCODE_FOCUS KEYCODE_PLUS = C.AKEYCODE_PLUS KEYCODE_MENU = C.AKEYCODE_MENU KEYCODE_NOTIFICATION = C.AKEYCODE_NOTIFICATION KEYCODE_SEARCH = C.AKEYCODE_SEARCH KEYCODE_MEDIA_PLAY_PAUSE = C.AKEYCODE_MEDIA_PLAY_PAUSE KEYCODE_MEDIA_STOP = C.AKEYCODE_MEDIA_STOP KEYCODE_MEDIA_NEXT = C.AKEYCODE_MEDIA_NEXT KEYCODE_MEDIA_PREVIOUS = C.AKEYCODE_MEDIA_PREVIOUS KEYCODE_MEDIA_REWIND = C.AKEYCODE_MEDIA_REWIND KEYCODE_MEDIA_FAST_FORWARD = C.AKEYCODE_MEDIA_FAST_FORWARD KEYCODE_MUTE = C.AKEYCODE_MUTE KEYCODE_PAGE_UP = C.AKEYCODE_PAGE_UP KEYCODE_PAGE_DOWN = C.AKEYCODE_PAGE_DOWN KEYCODE_PICTSYMBOLS = C.AKEYCODE_PICTSYMBOLS KEYCODE_SWITCH_CHARSET = C.AKEYCODE_SWITCH_CHARSET KEYCODE_BUTTON_A = C.AKEYCODE_BUTTON_A KEYCODE_BUTTON_B = C.AKEYCODE_BUTTON_B KEYCODE_BUTTON_C = C.AKEYCODE_BUTTON_C KEYCODE_BUTTON_X = C.AKEYCODE_BUTTON_X KEYCODE_BUTTON_Y = C.AKEYCODE_BUTTON_Y KEYCODE_BUTTON_Z = C.AKEYCODE_BUTTON_Z KEYCODE_BUTTON_L1 = C.AKEYCODE_BUTTON_L1 KEYCODE_BUTTON_R1 = C.AKEYCODE_BUTTON_R1 KEYCODE_BUTTON_L2 = C.AKEYCODE_BUTTON_L2 KEYCODE_BUTTON_R2 = C.AKEYCODE_BUTTON_R2 KEYCODE_BUTTON_THUMBL = C.AKEYCODE_BUTTON_THUMBL KEYCODE_BUTTON_THUMBR = C.AKEYCODE_BUTTON_THUMBR KEYCODE_BUTTON_START = C.AKEYCODE_BUTTON_START KEYCODE_BUTTON_SELECT = C.AKEYCODE_BUTTON_SELECT KEYCODE_BUTTON_MODE = C.AKEYCODE_BUTTON_MODE KEYCODE_ESCAPE = C.AKEYCODE_ESCAPE KEYCODE_FORWARD_DEL = C.AKEYCODE_FORWARD_DEL KEYCODE_CTRL_LEFT = C.AKEYCODE_CTRL_LEFT KEYCODE_CTRL_RIGHT = C.AKEYCODE_CTRL_RIGHT KEYCODE_CAPS_LOCK = C.AKEYCODE_CAPS_LOCK KEYCODE_SCROLL_LOCK = C.AKEYCODE_SCROLL_LOCK KEYCODE_META_LEFT = C.AKEYCODE_META_LEFT KEYCODE_META_RIGHT = C.AKEYCODE_META_RIGHT KEYCODE_FUNCTION = C.AKEYCODE_FUNCTION KEYCODE_SYSRQ = C.AKEYCODE_SYSRQ KEYCODE_BREAK = C.AKEYCODE_BREAK KEYCODE_MOVE_HOME = C.AKEYCODE_MOVE_HOME KEYCODE_MOVE_END = C.AKEYCODE_MOVE_END KEYCODE_INSERT = C.AKEYCODE_INSERT KEYCODE_FORWARD = C.AKEYCODE_FORWARD KEYCODE_MEDIA_PLAY = C.AKEYCODE_MEDIA_PLAY KEYCODE_MEDIA_PAUSE = C.AKEYCODE_MEDIA_PAUSE KEYCODE_MEDIA_CLOSE = C.AKEYCODE_MEDIA_CLOSE KEYCODE_MEDIA_EJECT = C.AKEYCODE_MEDIA_EJECT KEYCODE_MEDIA_RECORD = C.AKEYCODE_MEDIA_RECORD KEYCODE_F1 = C.AKEYCODE_F1 KEYCODE_F2 = C.AKEYCODE_F2 KEYCODE_F3 = C.AKEYCODE_F3 KEYCODE_F4 = C.AKEYCODE_F4 KEYCODE_F5 = C.AKEYCODE_F5 KEYCODE_F6 = C.AKEYCODE_F6 KEYCODE_F7 = C.AKEYCODE_F7 KEYCODE_F8 = C.AKEYCODE_F8 KEYCODE_F9 = C.AKEYCODE_F9 KEYCODE_F10 = C.AKEYCODE_F10 KEYCODE_F11 = C.AKEYCODE_F11 KEYCODE_F12 = C.AKEYCODE_F12 KEYCODE_NUM_LOCK = C.AKEYCODE_NUM_LOCK KEYCODE_NUMPAD_0 = C.AKEYCODE_NUMPAD_0 KEYCODE_NUMPAD_1 = C.AKEYCODE_NUMPAD_1 KEYCODE_NUMPAD_2 = C.AKEYCODE_NUMPAD_2 KEYCODE_NUMPAD_3 = C.AKEYCODE_NUMPAD_3 KEYCODE_NUMPAD_4 = C.AKEYCODE_NUMPAD_4 KEYCODE_NUMPAD_5 = C.AKEYCODE_NUMPAD_5 KEYCODE_NUMPAD_6 = C.AKEYCODE_NUMPAD_6 KEYCODE_NUMPAD_7 = C.AKEYCODE_NUMPAD_7 KEYCODE_NUMPAD_8 = C.AKEYCODE_NUMPAD_8 KEYCODE_NUMPAD_9 = C.AKEYCODE_NUMPAD_9 KEYCODE_NUMPAD_DIVIDE = C.AKEYCODE_NUMPAD_DIVIDE KEYCODE_NUMPAD_MULTIPLY = C.AKEYCODE_NUMPAD_MULTIPLY KEYCODE_NUMPAD_SUBTRACT = C.AKEYCODE_NUMPAD_SUBTRACT KEYCODE_NUMPAD_ADD = C.AKEYCODE_NUMPAD_ADD KEYCODE_NUMPAD_DOT = C.AKEYCODE_NUMPAD_DOT KEYCODE_NUMPAD_COMMA = C.AKEYCODE_NUMPAD_COMMA KEYCODE_NUMPAD_ENTER = C.AKEYCODE_NUMPAD_ENTER KEYCODE_NUMPAD_EQUALS = C.AKEYCODE_NUMPAD_EQUALS KEYCODE_NUMPAD_LEFT_PAREN = C.AKEYCODE_NUMPAD_LEFT_PAREN KEYCODE_NUMPAD_RIGHT_PAREN = C.AKEYCODE_NUMPAD_RIGHT_PAREN KEYCODE_VOLUME_MUTE = C.AKEYCODE_VOLUME_MUTE KEYCODE_INFO = C.AKEYCODE_INFO KEYCODE_CHANNEL_UP = C.AKEYCODE_CHANNEL_UP KEYCODE_CHANNEL_DOWN = C.AKEYCODE_CHANNEL_DOWN KEYCODE_ZOOM_IN = C.AKEYCODE_ZOOM_IN KEYCODE_ZOOM_OUT = C.AKEYCODE_ZOOM_OUT KEYCODE_TV = C.AKEYCODE_TV KEYCODE_WINDOW = C.AKEYCODE_WINDOW KEYCODE_GUIDE = C.AKEYCODE_GUIDE KEYCODE_DVR = C.AKEYCODE_DVR KEYCODE_BOOKMARK = C.AKEYCODE_BOOKMARK KEYCODE_CAPTIONS = C.AKEYCODE_CAPTIONS KEYCODE_SETTINGS = C.AKEYCODE_SETTINGS KEYCODE_TV_POWER = C.AKEYCODE_TV_POWER KEYCODE_TV_INPUT = C.AKEYCODE_TV_INPUT KEYCODE_STB_POWER = C.AKEYCODE_STB_POWER KEYCODE_STB_INPUT = C.AKEYCODE_STB_INPUT KEYCODE_AVR_POWER = C.AKEYCODE_AVR_POWER KEYCODE_AVR_INPUT = C.AKEYCODE_AVR_INPUT KEYCODE_PROG_RED = C.AKEYCODE_PROG_RED KEYCODE_PROG_GREEN = C.AKEYCODE_PROG_GREEN KEYCODE_PROG_YELLOW = C.AKEYCODE_PROG_YELLOW KEYCODE_PROG_BLUE = C.AKEYCODE_PROG_BLUE KEYCODE_APP_SWITCH = C.AKEYCODE_APP_SWITCH KEYCODE_BUTTON_1 = C.AKEYCODE_BUTTON_1 KEYCODE_BUTTON_2 = C.AKEYCODE_BUTTON_2 KEYCODE_BUTTON_3 = C.AKEYCODE_BUTTON_3 KEYCODE_BUTTON_4 = C.AKEYCODE_BUTTON_4 KEYCODE_BUTTON_5 = C.AKEYCODE_BUTTON_5 KEYCODE_BUTTON_6 = C.AKEYCODE_BUTTON_6 KEYCODE_BUTTON_7 = C.AKEYCODE_BUTTON_7 KEYCODE_BUTTON_8 = C.AKEYCODE_BUTTON_8 KEYCODE_BUTTON_9 = C.AKEYCODE_BUTTON_9 KEYCODE_BUTTON_10 = C.AKEYCODE_BUTTON_10 KEYCODE_BUTTON_11 = C.AKEYCODE_BUTTON_11 KEYCODE_BUTTON_12 = C.AKEYCODE_BUTTON_12 KEYCODE_BUTTON_13 = C.AKEYCODE_BUTTON_13 KEYCODE_BUTTON_14 = C.AKEYCODE_BUTTON_14 KEYCODE_BUTTON_15 = C.AKEYCODE_BUTTON_15 KEYCODE_BUTTON_16 = C.AKEYCODE_BUTTON_16 KEYCODE_LANGUAGE_SWITCH = C.AKEYCODE_LANGUAGE_SWITCH KEYCODE_MANNER_MODE = C.AKEYCODE_MANNER_MODE KEYCODE_3D_MODE = C.AKEYCODE_3D_MODE KEYCODE_CONTACTS = C.AKEYCODE_CONTACTS KEYCODE_CALENDAR = C.AKEYCODE_CALENDAR KEYCODE_MUSIC = C.AKEYCODE_MUSIC KEYCODE_CALCULATOR = C.AKEYCODE_CALCULATOR KEYCODE_ZENKAKU_HANKAKU = C.AKEYCODE_ZENKAKU_HANKAKU KEYCODE_EISU = C.AKEYCODE_EISU KEYCODE_MUHENKAN = C.AKEYCODE_MUHENKAN KEYCODE_HENKAN = C.AKEYCODE_HENKAN KEYCODE_KATAKANA_HIRAGANA = C.AKEYCODE_KATAKANA_HIRAGANA KEYCODE_YEN = C.AKEYCODE_YEN KEYCODE_RO = C.AKEYCODE_RO KEYCODE_KANA = C.AKEYCODE_KANA KEYCODE_ASSIST = C.AKEYCODE_ASSIST KEYCODE_BRIGHTNESS_DOWN = C.AKEYCODE_BRIGHTNESS_DOWN KEYCODE_BRIGHTNESS_UP = C.AKEYCODE_BRIGHTNESS_UP KEYCODE_MEDIA_AUDIO_TRACK = C.AKEYCODE_MEDIA_AUDIO_TRACK )
* Key codes.
const ( /** * Result from ALooper_pollOnce() and ALooper_pollAll(): * The poll was awoken using wake() before the timeout expired * and no callbacks were executed and no other file descriptors were ready. */ LOOPER_POLL_WAKE = C.ALOOPER_POLL_WAKE /** * Result from ALooper_pollOnce() and ALooper_pollAll(): * One or more callbacks were executed. */ LOOPER_POLL_CALLBACK = C.ALOOPER_POLL_CALLBACK /** * Result from ALooper_pollOnce() and ALooper_pollAll(): * The timeout expired. */ LOOPER_POLL_TIMEOUT = C.ALOOPER_POLL_TIMEOUT /** * Result from ALooper_pollOnce() and ALooper_pollAll(): * An error occurred. */ LOOPER_POLL_ERROR = C.ALOOPER_POLL_ERROR )
const ( /** * The file descriptor is available for read operations. */ LOOPER_EVENT_INPUT = C.ALOOPER_EVENT_INPUT /** * The file descriptor is available for write operations. */ LOOPER_EVENT_OUTPUT = C.ALOOPER_EVENT_OUTPUT /** * The file descriptor has encountered an error condition. * * The looper always sends notifications about errors; it is not necessary * to specify this event flag in the requested event set. */ LOOPER_EVENT_ERROR = C.ALOOPER_EVENT_ERROR /** * The file descriptor was hung up. * For example, indicates that the remote end of a pipe or socket was closed. * * The looper always sends notifications about hangups; it is not necessary * to specify this event flag in the requested event set. */ LOOPER_EVENT_HANGUP = C.ALOOPER_EVENT_HANGUP /** * The file descriptor is invalid. * For example, the file descriptor was closed prematurely. * * The looper always sends notifications about invalid file descriptors; it is not necessary * to specify this event flag in the requested event set. */ LOOPER_EVENT_INVALID = C.ALOOPER_EVENT_INVALID )
const ( PROP_NAME_MAX = C.PROP_NAME_MAX PROP_VALUE_MAX = C.PROP_VALUE_MAX )
const ( /** * Invalid sensor type. Returned by {@link ASensor_getType} as error value. */ SENSOR_TYPE_INVALID = SENSOR_TYPE(C.ASENSOR_TYPE_INVALID) /** * {@link ASENSOR_TYPE_ACCELEROMETER} * reporting-mode: continuous * * All values are in SI units (m/s^2) and measure the acceleration of the * device minus the force of gravity. */ SENSOR_TYPE_ACCELEROMETER = SENSOR_TYPE(C.ASENSOR_TYPE_ACCELEROMETER) /** * {@link ASENSOR_TYPE_MAGNETIC_FIELD} * reporting-mode: continuous * * All values are in micro-Tesla (uT) and measure the geomagnetic * field in the X, Y and Z axis. */ SENSOR_TYPE_MAGNETIC_FIELD = SENSOR_TYPE(C.ASENSOR_TYPE_MAGNETIC_FIELD) /** * {@link ASENSOR_TYPE_GYROSCOPE} * reporting-mode: continuous * * All values are in radians/second and measure the rate of rotation * around the X, Y and Z axis. */ SENSOR_TYPE_GYROSCOPE = SENSOR_TYPE(C.ASENSOR_TYPE_GYROSCOPE) /** * {@link ASENSOR_TYPE_LIGHT} * reporting-mode: on-change * * The light sensor value is returned in SI lux units. */ SENSOR_TYPE_LIGHT = SENSOR_TYPE(C.ASENSOR_TYPE_LIGHT) /** * {@link ASENSOR_TYPE_PROXIMITY} * reporting-mode: on-change * * The proximity sensor which turns the screen off and back on during calls is the * wake-up proximity sensor. Implement wake-up proximity sensor before implementing * a non wake-up proximity sensor. For the wake-up proximity sensor set the flag * SENSOR_FLAG_WAKE_UP. * The value corresponds to the distance to the nearest object in centimeters. */ SENSOR_TYPE_PROXIMITY = SENSOR_TYPE(C.ASENSOR_TYPE_PROXIMITY) /** * {@link ASENSOR_TYPE_LINEAR_ACCELERATION} * reporting-mode: continuous * * All values are in SI units (m/s^2) and measure the acceleration of the * device not including the force of gravity. */ SENSOR_TYPE_LINEAR_ACCELERATION = SENSOR_TYPE(C.ASENSOR_TYPE_LINEAR_ACCELERATION) // java SENSOR_TYPE_ORIENTATION = SENSOR_TYPE(3) SENSOR_TYPE_PRESSURE = SENSOR_TYPE(6) SENSOR_TYPE_TEMPERATURE = SENSOR_TYPE(7) SENSOR_TYPE_GRAVITY = SENSOR_TYPE(9) SENSOR_TYPE_ROTATION_VECTOR = SENSOR_TYPE(11) SENSOR_TYPE_RELATIVE_HUMIDITY = SENSOR_TYPE(12) SENSOR_TYPE_AMBIENT_TEMPERATURE = SENSOR_TYPE(13) SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED = SENSOR_TYPE(14) SENSOR_TYPE_GAME_ROTATION_VECTOR = SENSOR_TYPE(15) SENSOR_TYPE_GYROSCOPE_UNCALIBRATED = SENSOR_TYPE(16) SENSOR_TYPE_SIGNIFICANT_MOTION = SENSOR_TYPE(17) SENSOR_TYPE_STEP_DETECTOR = SENSOR_TYPE(18) SENSOR_TYPE_STEP_COUNTER = SENSOR_TYPE(19) SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR = SENSOR_TYPE(20) SENSOR_TYPE_HEART_RATE = SENSOR_TYPE(21) SENSOR_TYPE_TILT_DETECTOR = SENSOR_TYPE(22) SENSOR_TYPE_WAKE_GESTURE = SENSOR_TYPE(23) SENSOR_TYPE_GLANCE_GESTURE = SENSOR_TYPE(24) SENSOR_TYPE_PICK_UP_GESTURE = SENSOR_TYPE(25) SENSOR_TYPE_WRIST_TILT_GESTURE = SENSOR_TYPE(26) SENSOR_TYPE_DEVICE_ORIENTATION = SENSOR_TYPE(27) SENSOR_TYPE_POSE_6DOF = SENSOR_TYPE(28) SENSOR_TYPE_STATIONARY_DETECT = SENSOR_TYPE(29) SENSOR_TYPE_MOTION_DETECT = SENSOR_TYPE(30) SENSOR_TYPE_HEART_BEAT = SENSOR_TYPE(31) SENSOR_TYPE_DYNAMIC_SENSOR_META = SENSOR_TYPE(32) SENSOR_TYPE_LOW_LATENCY_OFFBODY_DETECT = SENSOR_TYPE(34) SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED = SENSOR_TYPE(35) )
const ( /** no contact */ SENSOR_STATUS_NO_CONTACT = C.ASENSOR_STATUS_NO_CONTACT /** unreliable */ SENSOR_STATUS_UNRELIABLE = C.ASENSOR_STATUS_UNRELIABLE /** low accuracy */ SENSOR_STATUS_ACCURACY_LOW = C.ASENSOR_STATUS_ACCURACY_LOW /** medium accuracy */ SENSOR_STATUS_ACCURACY_MEDIUM = C.ASENSOR_STATUS_ACCURACY_MEDIUM /** high accuracy */ SENSOR_STATUS_ACCURACY_HIGH = C.ASENSOR_STATUS_ACCURACY_HIGH )
*
- Sensor accuracy measure.
const ( /** invalid reporting mode */ REPORTING_MODE_INVALID = C.AREPORTING_MODE_INVALID /** continuous reporting */ REPORTING_MODE_CONTINUOUS = C.AREPORTING_MODE_CONTINUOUS /** reporting on change */ REPORTING_MODE_ON_CHANGE = C.AREPORTING_MODE_ON_CHANGE /** on shot reporting */ REPORTING_MODE_ONE_SHOT = C.AREPORTING_MODE_ONE_SHOT /** special trigger reporting */ REPORTING_MODE_SPECIAL_TRIGGER = C.AREPORTING_MODE_SPECIAL_TRIGGER )
*
- Sensor Reporting Modes.
const ( /** stopped */ SENSOR_DIRECT_RATE_STOP = C.ASENSOR_DIRECT_RATE_STOP /** nominal 50Hz */ SENSOR_DIRECT_RATE_NORMAL = C.ASENSOR_DIRECT_RATE_NORMAL /** nominal 200Hz */ SENSOR_DIRECT_RATE_FAST = C.ASENSOR_DIRECT_RATE_FAST /** nominal 800Hz */ SENSOR_DIRECT_RATE_VERY_FAST = C.ASENSOR_DIRECT_RATE_VERY_FAST )
*
- Sensor Direct Report Rates.
const ( /** shared memory created by ASharedMemory_create */ SENSOR_DIRECT_CHANNEL_TYPE_SHARED_MEMORY = C.ASENSOR_DIRECT_CHANNEL_TYPE_SHARED_MEMORY /** AHardwareBuffer */ SENSOR_DIRECT_CHANNEL_TYPE_HARDWARE_BUFFER = C.ASENSOR_DIRECT_CHANNEL_TYPE_HARDWARE_BUFFER )
*
- Sensor Direct Channel Type.
const ( /* * The OBB container is now mounted and ready for use. Can be returned * as the status for callbacks made during asynchronous OBB actions. */ OBB_STATE_MOUNTED = C.AOBB_STATE_MOUNTED /* * The OBB container is now unmounted and not usable. Can be returned * as the status for callbacks made during asynchronous OBB actions. */ OBB_STATE_UNMOUNTED = C.AOBB_STATE_UNMOUNTED /* * There was an internal system error encountered while trying to * mount the OBB. Can be returned as the status for callbacks made * during asynchronous OBB actions. */ OBB_STATE_ERROR_INTERNAL = C.AOBB_STATE_ERROR_INTERNAL /* * The OBB could not be mounted by the system. Can be returned as the * status for callbacks made during asynchronous OBB actions. */ OBB_STATE_ERROR_COULD_NOT_MOUNT = C.AOBB_STATE_ERROR_COULD_NOT_MOUNT /* * The OBB could not be unmounted. This most likely indicates that a * file is in use on the OBB. Can be returned as the status for * callbacks made during asynchronous OBB actions. */ OBB_STATE_ERROR_COULD_NOT_UNMOUNT = C.AOBB_STATE_ERROR_COULD_NOT_UNMOUNT /* * A call was made to unmount the OBB when it was not mounted. Can be * returned as the status for callbacks made during asynchronous OBB * actions. */ OBB_STATE_ERROR_NOT_MOUNTED = C.AOBB_STATE_ERROR_NOT_MOUNTED /* * The OBB has already been mounted. Can be returned as the status for * callbacks made during asynchronous OBB actions. */ OBB_STATE_ERROR_ALREADY_MOUNTED = C.AOBB_STATE_ERROR_ALREADY_MOUNTED /* * The current application does not have permission to use this OBB. * This could be because the OBB indicates it's owned by a different * package. Can be returned as the status for callbacks made during * asynchronous OBB actions. */ OBB_STATE_ERROR_PERMISSION_DENIED = C.AOBB_STATE_ERROR_PERMISSION_DENIED )
const ( WINDOW_FORMAT_RGBA_8888 = C.WINDOW_FORMAT_RGBA_8888 WINDOW_FORMAT_RGBX_8888 = C.WINDOW_FORMAT_RGBX_8888 WINDOW_FORMAT_RGB_565 = C.WINDOW_FORMAT_RGB_565 )
* Pixel formats that a window can use.
const ( FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = C.AWINDOW_FLAG_ALLOW_LOCK_WHILE_SCREEN_ON FLAG_DIM_BEHIND = C.AWINDOW_FLAG_DIM_BEHIND FLAG_BLUR_BEHIND = C.AWINDOW_FLAG_BLUR_BEHIND FLAG_NOT_FOCUSABLE = C.AWINDOW_FLAG_NOT_FOCUSABLE FLAG_NOT_TOUCHABLE = C.AWINDOW_FLAG_NOT_TOUCHABLE FLAG_NOT_TOUCH_MODAL = C.AWINDOW_FLAG_NOT_TOUCH_MODAL FLAG_TOUCHABLE_WHEN_WAKING = C.AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING FLAG_KEEP_SCREEN_ON = C.AWINDOW_FLAG_KEEP_SCREEN_ON FLAG_LAYOUT_IN_SCREEN = C.AWINDOW_FLAG_LAYOUT_IN_SCREEN FLAG_LAYOUT_NO_LIMITS = C.AWINDOW_FLAG_LAYOUT_NO_LIMITS FLAG_FULLSCREEN = C.AWINDOW_FLAG_FULLSCREEN FLAG_FORCE_NOT_FULLSCREEN = C.AWINDOW_FLAG_FORCE_NOT_FULLSCREEN FLAG_DITHER = C.AWINDOW_FLAG_DITHER FLAG_SECURE = C.AWINDOW_FLAG_SECURE FLAG_SCALED = C.AWINDOW_FLAG_SCALED FLAG_IGNORE_CHEEK_PRESSES = C.AWINDOW_FLAG_IGNORE_CHEEK_PRESSES FLAG_LAYOUT_INSET_DECOR = C.AWINDOW_FLAG_LAYOUT_INSET_DECOR FLAG_ALT_FOCUSABLE_IM = C.AWINDOW_FLAG_ALT_FOCUSABLE_IM FLAG_WATCH_OUTSIDE_TOUCH = C.AWINDOW_FLAG_WATCH_OUTSIDE_TOUCH FLAG_SHOW_WHEN_LOCKED = C.AWINDOW_FLAG_SHOW_WHEN_LOCKED FLAG_SHOW_WALLPAPER = C.AWINDOW_FLAG_SHOW_WALLPAPER FLAG_TURN_SCREEN_ON = C.AWINDOW_FLAG_TURN_SCREEN_ON FLAG_DISMISS_KEYGUARD = C.AWINDOW_FLAG_DISMISS_KEYGUARD )
const AOBBINFO_OVERLAY = 0x0001
const ( /** * Option for ALooper_prepare: this looper will accept calls to * ALooper_addFd() that do not have a callback (that is provide NULL * for the callback). In this case the caller of ALooper_pollOnce() * or ALooper_pollAll() MUST check the return from these functions to * discover when data is available on such fds and process it. */ LOOPER_PREPARE_ALLOW_NON_CALLBACKS = C.ALOOPER_PREPARE_ALLOW_NON_CALLBACKS )
const SENSOR_DELAY_INVALID = C.ASENSOR_DELAY_INVALID //INT32_MIN
const SENSOR_FIFO_COUNT_INVALID = C.ASENSOR_FIFO_COUNT_INVALID //(-1)
const RESOLUTION_INVALID = C.ASENSOR_RESOLUTION_INVALID //(nanf(""))
const SENSOR_MAGNETIC_FIELD_EARTH_MAX = C.ASENSOR_MAGNETIC_FIELD_EARTH_MAX //(60.0f)
* Maximum magnetic field on Earth's surface in uT
const SENSOR_MAGNETIC_FIELD_EARTH_MIN = C.ASENSOR_MAGNETIC_FIELD_EARTH_MIN //(30.0f)
* Minimum magnetic field on Earth's surface in uT
const SENSOR_STANDARD_GRAVITY = C.ASENSOR_STANDARD_GRAVITY //(9.80665f)
* Earth's gravity in m/s^2
Variables ¶
This section is empty.
Functions ¶
func FindMatchLibrary ¶
func GetLibraryPath ¶
func GetLibraryPath() string
func GetPackageName ¶
func GetPackageName() string
Types ¶
type Activity ¶
type Activity C.ANativeActivity
func (*Activity) AssetManager ¶
func (a *Activity) AssetManager() *AssetManager
func (*Activity) Configuration ¶
func (a *Activity) Configuration() *Configuration
func (*Activity) ExternalDataPath ¶
func (*Activity) Finish ¶
func (a *Activity) Finish()
*
- Finish the given activity. Its finish() method will be called, causing it
- to be stopped and destroyed. Note that this method can be called from
- *any* thread; it will send a message to the main thread of the process
- where the Java finish call will take place.
func (*Activity) HideSoftInput ¶
*
- Hide the IME while in the given activity. Calls InputMethodManager.hideSoftInput()
- for the given activity. Note that this method can be called from
- *any* thread; it will send a message to the main thread of the process
- where the Java finish call will take place.
func (*Activity) InternalDataPath ¶
func (*Activity) SdkVersion ¶
func (*Activity) SetWindowFlags ¶
*
- Change the window flags of the given activity. Calls getWindow().setFlags()
- of the given activity. Note that this method can be called from
- *any* thread; it will send a message to the main thread of the process
- where the Java finish call will take place. See window.h for flag constants.
func (*Activity) SetWindowFormat ¶
*
- Change the window format of the given activity. Calls getWindow().setFormat()
- of the given activity. Note that this method can be called from
- *any* thread; it will send a message to the main thread of the process
- where the Java finish call will take place.
func (*Activity) ShowSoftInput ¶
*
- Show the IME while in the given activity. Calls InputMethodManager.showSoftInput()
- for the given activity. Note that this method can be called from
- *any* thread; it will send a message to the main thread of the process
- where the Java finish call will take place.
type AdditionalInfoEvent ¶
type AdditionalInfoEvent struct {
Type, Serial int32
// contains filtered or unexported fields
}
type Asset ¶
func (*Asset) Close ¶
*
- Close the asset, freeing all associated resources.
void AAsset_close(AAsset* asset);
func (*Asset) GetBuffer ¶
*
- Get a pointer to a buffer holding the entire contents of the assset. *
- Returns NULL on failure.
const void* AAsset_getBuffer(AAsset* asset);
func (*Asset) GetRemainingLength ¶
*
- Report the total amount of asset data that can be read from the current position. *
- Uses a 64-bit number instead of a 32-bit number as AAsset_getRemainingLength does.
off64_t AAsset_getRemainingLength64(AAsset* asset);
func (*Asset) IsAllocated ¶
*
- Returns whether this asset's internal buffer is allocated in ordinary RAM (i.e. not
- mmapped).
int AAsset_isAllocated(AAsset* asset);
func (*Asset) Length ¶
*
- Report the total size of the asset data. Reports the size using a 64-bit
- number insted of 32-bit as AAsset_getLength.
off64_t AAsset_getLength64(AAsset* asset);
func (*Asset) Read ¶
*
- Attempt to read 'count' bytes of data from the current offset. *
- Returns the number of bytes read, zero on EOF, or < 0 on error.
int AAsset_read(AAsset* asset, void* buf, size_t count);
func (*Asset) Seek ¶
*
- Seek to the specified offset within the asset data. 'whence' uses the
- same constants as lseek()/fseek(). *
- Uses 64-bit data type for large files as opposed to the 32-bit type used
- by AAsset_seek. *
- Returns the new position on success, or (off64_t) -1 on error.
off64_t AAsset_seek64(AAsset* asset, off64_t offset, int whence);
type AssetDir ¶
func (*AssetDir) Close ¶
func (assetDir *AssetDir) Close()
*
- Close an opened AAssetDir, freeing any related resources.
void AAssetDir_close(AAssetDir* assetDir);
func (*AssetDir) GetNextFileName ¶
*
- Iterate over the files in an asset directory. A NULL string is returned
- when all the file names have been returned. *
- The returned file name is suitable for passing to AAssetManager_open(). *
- The string returned here is owned by the AssetDir implementation and is not
- guaranteed to remain valid if any other calls are made on this AAssetDir
- instance.
const char* AAssetDir_getNextFileName(AAssetDir* assetDir);
type AssetManager ¶
type AssetManager C.AAssetManager
func (*AssetManager) Open ¶
func (mgr *AssetManager) Open(filename string, mode int) *Asset
*
- Open an asset. *
- The object returned here should be freed by calling AAsset_close().
AAsset* AAssetManager_open(AAssetManager* mgr, const char* filename, int mode);
func (*AssetManager) OpenDir ¶
func (mgr *AssetManager) OpenDir(dirName string) *AssetDir
*
- Open the named directory within the asset hierarchy. The directory can then
- be inspected with the AAssetDir functions. To open the top-level directory,
- pass in "" as the dirName. *
- The object returned here should be freed by calling AAssetDir_close().
AAssetDir* AAssetManager_openDir(AAssetManager* mgr, const char* dirName);
type Callbacks ¶
type Callbacks struct { Create func(*Activity, []byte) Start func(*Activity) Stop func(*Activity) Pause func(*Activity) Resume func(*Activity) Destroy func(*Activity) SaveState func(*Activity) []byte FocusChanged func(*Activity, bool) ContentRectChanged func(*Activity, *Rect) ConfigurationChanged func(*Activity) LowMemory func(*Activity) // Window WindowCreated func(*Activity, *Window) WindowDestroyed func(*Activity, *Window) WindowDraw func(*Activity, *Window) WindowResized func(*Activity, *Window) WindowRedrawNeeded func(*Activity, *Window) // Touch is called by the app when a touch event occurs. Event func(*Activity, *InputEvent) // Sensor Sensor func(*Activity, []SensorEvent) }
Callbacks is the set of functions called by the activity.
type Camera ¶
type Camera uintptr
func CameraConnect ¶
func CameraConnect(cameraId int, cb CameraCallback) Camera
func (Camera) Antibanding ¶
func (c Camera) Antibanding() CameraAntibanding
func (Camera) ApplyProperties ¶
func (c Camera) ApplyProperties()
func (Camera) Disconnect ¶
func (c Camera) Disconnect()
func (Camera) FlashMode ¶
func (c Camera) FlashMode() CameraFlashMode
func (Camera) FocalLength ¶
func (Camera) FocusDistance ¶
func (c Camera) FocusDistance(index CameraFocusDistance) float32
func (Camera) FocusMode ¶
func (c Camera) FocusMode() CameraFocusMode
func (Camera) IsExposeLock ¶
func (Camera) IsWhiteBalanceLock ¶
func (Camera) PreviewFormat ¶
func (Camera) SetAntibanding ¶
func (c Camera) SetAntibanding(v CameraAntibanding)
func (Camera) SetExposeLock ¶
func (Camera) SetExposure ¶
func (Camera) SetFlashMode ¶
func (c Camera) SetFlashMode(v CameraFlashMode)
func (Camera) SetFocusMode ¶
func (c Camera) SetFocusMode(v CameraFocusMode)
func (Camera) SetWhiteBalance ¶
func (c Camera) SetWhiteBalance(v CameraWhiteBalance)
func (Camera) SetWhiteBalanceLock ¶
func (Camera) SupportedPreviewSizes ¶
func (Camera) WhiteBalance ¶
func (c Camera) WhiteBalance() CameraWhiteBalance
type CameraAntibanding ¶
type CameraAntibanding int
type CameraCallback ¶
type CameraFlashMode ¶
type CameraFlashMode int
type CameraFocusDistance ¶
type CameraFocusDistance int
type CameraFocusMode ¶
type CameraFocusMode int
type CameraWhiteBalance ¶
type CameraWhiteBalance int
type Context ¶
type Context struct { Callbacks // contains filtered or unexported fields }
func (*Context) Run ¶
Run starts the activity.
It must be called directly from from the main function and will block until the app exits.
func (*Context) WillDestory ¶
type DynamicSensorEvent ¶
type DynamicSensorEvent struct {
Connected, Handle int32
}
type HardwareBuffer ¶
type HardwareBuffer C.AHardwareBuffer
type HeartRateEvent ¶
type Looper ¶
func (*Looper) Acquire ¶
func (looper *Looper) Acquire()
*
- Acquire a reference on the given ALooper object. This prevents the object
- from being deleted until the reference is removed. This is only needed
- to safely hand an ALooper from one thread to another.
func (*Looper) Release ¶
func (looper *Looper) Release()
*
- Remove a reference that was previously acquired with ALooper_acquire().
func (*Looper) RemoveFd ¶
*
- Removes a previously added file descriptor from the looper. *
- When this method returns, it is safe to close the file descriptor since the looper
- will no longer have a reference to it. However, it is possible for the callback to
- already be running or for it to run one last time if the file descriptor was already
- signalled. Calling code is responsible for ensuring that this case is safely handled.
- For example, if the callback takes care of removing itself during its own execution either
- by returning 0 or by calling this method, then it can be guaranteed to not be invoked
- again at any later time unless registered anew. *
- Returns 1 if the file descriptor was removed, 0 if none was previously registered
- or -1 if an error occurred. *
- This method can be called on any thread.
- This method may block briefly if it needs to wake the poll.
/int ALooper_removeFd(ALooper* looper, int fd);
type LooperCallback ¶
*
- For callback-based event loops, this is the prototype of the function
- that is called when a file descriptor event occurs.
- It is given the file descriptor it is associated with,
- a bitmask of the poll events that were triggered (typically ALOOPER_EVENT_INPUT),
- and the data pointer that was originally supplied. *
- Implementations should return 1 to continue receiving callbacks, or 0
- to have this file descriptor and callback unregistered from the looper.
/typedef int (*ALooper_callbackFunc)(int fd, int events, void* data);
type MagneticVector ¶
type MetaDataEvent ¶
type MetaDataEvent struct {
What, Sensor int32
}
type ObbCallbackFunc ¶
*
- Callback function for asynchronous calls made on OBB files.
typedef void (*AStorageManager_obbCallbackFunc)(const char* filename, const int32_t state, void* data);
type ObbInfo ¶
func GetObbInfo ¶
*
- Scan an OBB and get information about it.
AObbInfo* AObbScanner_getObbInfo(const char* filename);
func (*ObbInfo) Delete ¶
func (info *ObbInfo) Delete()
*
- Destroy the AObbInfo object. You must call this when finished with the object.
void AObbInfo_delete(AObbInfo* obbInfo);
func (*ObbInfo) GetFlags ¶
*
- Get the flags of an OBB file.
int32_t AObbInfo_getFlags(AObbInfo* obbInfo);
func (*ObbInfo) GetPackageName ¶
*
- Get the package name for the OBB.
const char* AObbInfo_getPackageName(AObbInfo* obbInfo);
func (*ObbInfo) GetVersion ¶
*
- Get the version of an OBB file.
int32_t AObbInfo_getVersion(AObbInfo* obbInfo);
type Sensor ¶
*
- {@link ASensor} is an opaque type that provides information about
- an hardware sensors. *
- A {@link ASensor} pointer can be obtained using
- ASensorManager_getDefaultSensor(),
- ASensorManager_getDefaultSensorEx() or from a {@link ASensorList}. *
- This file provides a set of functions to access properties of a
- {@link ASensor}:
- - ASensor_getName()
- - ASensor_getVendor()
- - ASensor_getType()
- - ASensor_getResolution()
- - ASensor_getMinDelay()
- - ASensor_getFifoMaxEventCount()
- - ASensor_getFifoReservedEventCount()
- - ASensor_getStringType()
- - ASensor_getReportingMode()
- - ASensor_isWakeUpSensor()
func (*Sensor) GetMinDelay ¶
*
- Returns the minimum delay allowed between events in microseconds.
- A value of zero means that this sensor doesn't report events at a
- constant rate, but rather only when a new data is available.
int ASensor_getMinDelay(ASensor const* sensor);
func (*Sensor) GetName ¶
*
- Returns this sensor's name (non localized)
const char* ASensor_getName(ASensor const* sensor);
func (*Sensor) GetResolution ¶
*
- Returns this sensors's resolution
float ASensor_getResolution(ASensor const* sensor) __NDK_FPABI__;
func (*Sensor) GetType ¶
func (sensor *Sensor) GetType() SENSOR_TYPE
*
- Return this sensor's type
int ASensor_getType(ASensor const* sensor);
func (*Sensor) GetVendor ¶
*
- Returns this sensor's vendor's name (non localized)
const char* ASensor_getVendor(ASensor const* sensor);
func (*Sensor) SetEventRate ¶
Sets the delivery rate of events in microseconds for the given sensor.
This function has to be called after Enable. Note that this is a hint only, generally event will arrive at a higher rate. It is an error to set a rate inferior to the value returned by GetMinDelay().
type SensorEvent ¶
type SensorEvent C.ASensorEvent
NOTE: Must match hardware/sensors.h
func (*SensorEvent) GetData ¶
func (event *SensorEvent) GetData(data interface{})
func (*SensorEvent) GetSensor ¶
func (event *SensorEvent) GetSensor() int
func (*SensorEvent) GetTimestamp ¶
func (event *SensorEvent) GetTimestamp() time.Duration
func (*SensorEvent) GetType ¶
func (event *SensorEvent) GetType() SENSOR_TYPE
type SensorEventQueue ¶
type SensorEventQueue C.ASensorEventQueue
*
- {@link ASensorEventQueue} is an opaque type that provides access to
- {@link ASensorEvent} from hardware sensors. *
- A new {@link ASensorEventQueue} can be obtained using ASensorManager_createEventQueue(). *
- This file provides a set of functions to enable and disable
- sensors, check and get events, and set event rates on a {@link
- ASensorEventQueue}.
- - ASensorEventQueue_enableSensor()
- - ASensorEventQueue_disableSensor()
- - ASensorEventQueue_hasEvents()
- - ASensorEventQueue_getEvents()
- - ASensorEventQueue_setEventRate()
type SensorManager ¶
type SensorManager C.ASensorManager
*
- {@link ASensorManager} is an opaque type to manage sensors and
- events queues. *
- {@link ASensorManager} is a singleton that can be obtained using
- ASensorManager_getInstance(). *
- This file provides a set of functions that uses {@link
- ASensorManager} to access and list hardware sensors, and
- create and destroy event queues:
- - ASensorManager_getSensorList()
- - ASensorManager_getDefaultSensor()
- - ASensorManager_getDefaultSensorEx()
- - ASensorManager_createEventQueue()
- - ASensorManager_destroyEventQueue()
func SensorManagerInstance ¶
func SensorManagerInstance() *SensorManager
*
- Get a reference to the sensor manager. ASensorManager is a singleton
- per package as different packages may have access to different sensors. *
- Deprecated: Use ASensorManager_getInstanceForPackage(const char*) instead. *
- Example: *
- ASensorManager* sensorManager = ASensorManager_getInstance(); *
#if __ANDROID_API__ >= __ANDROID_API_O__ __attribute__ ((deprecated)) ASensorManager* ASensorManager_getInstance(); #endif
func (*SensorManager) GetDefaultSensor ¶
func (manager *SensorManager) GetDefaultSensor(typ SENSOR_TYPE) *Sensor
*
- Returns the default sensor for the given type, or NULL if no sensor
- of that type exists.
ASensor const* ASensorManager_getDefaultSensor(ASensorManager* manager, int type);
func (*SensorManager) GetSensorList ¶
func (manager *SensorManager) GetSensorList() []*Sensor
*
- Returns the list of available sensors.
int ASensorManager_getSensorList(ASensorManager* manager, ASensorList* list);
type SensorVector ¶
NOTE: Must match hardware/sensors.h
type StorageManager ¶
type StorageManager C.AStorageManager
func NewStorageManager ¶
func NewStorageManager() *StorageManager
*
- Obtains a new instance of AStorageManager.
AStorageManager* AStorageManager_new();
func (*StorageManager) Delete ¶
func (mgr *StorageManager) Delete()
*
- Release AStorageManager instance.
void AStorageManager_delete(AStorageManager* mgr);
func (*StorageManager) GetMountedObbPath ¶
func (mgr *StorageManager) GetMountedObbPath(filename string) string
*
- Get the mounted path for an OBB.
const char* AStorageManager_getMountedObbPath(AStorageManager* mgr, const char* filename);
func (*StorageManager) IsObbMounted ¶
func (mgr *StorageManager) IsObbMounted(filename string) bool
*
- Check whether an OBB is mounted.
int AStorageManager_isObbMounted(AStorageManager* mgr, const char* filename);
func (*StorageManager) MountObb ¶
func (mgr *StorageManager) MountObb(filename, key string, cb ObbCallbackFunc)
*
- Attempts to mount an OBB file. This is an asynchronous operation.
void AStorageManager_mountObb(AStorageManager* mgr, const char* filename, const char* key,
AStorageManager_obbCallbackFunc cb, void* data);
func (*StorageManager) UnmountObb ¶
func (mgr *StorageManager) UnmountObb(filename string, force bool, cb ObbCallbackFunc)
*
- Attempts to unmount an OBB file. This is an asynchronous operation.
void AStorageManager_unmountObb(AStorageManager* mgr, const char* filename, const int force,
AStorageManager_obbCallbackFunc cb, void* data);
type UncalibratedEvent ¶
type Window ¶
type Window C.ANativeWindow
func FromSurface ¶
*
- Return the ANativeWindow associated with a Java Surface object,
- for interacting with it through native code. This acquires a reference
- on the ANativeWindow that is returned; be sure to use ANativeWindow_release()
- when done with it so that it doesn't leak.
func (*Window) Acquire ¶
func (w *Window) Acquire()
*
- Acquire a reference on the given ANativeWindow object. This prevents the object
- from being deleted until the reference is removed.
func (*Window) Format ¶
* Return the current pixel format of the window surface. Returns a * negative value on error.
func (*Window) Height ¶
* Return the current height in pixels of the window surface. Returns a * negative value on error.
func (*Window) Lock ¶
func (w *Window) Lock(inDirtyBounds Rect) (*WindowBuffer, Rect, bool)
*
- Lock the window's next drawing surface for writing.
- inOutDirtyBounds is used as an in/out parameter, upon entering the
- function, it contains the dirty region, that is, the region the caller
- intends to redraw. When the function returns, inOutDirtyBounds is updated
- with the actual area the caller needs to redraw -- this region is often
- extended by ANativeWindow_lock.
func (*Window) Pointer ¶
func (w *Window) Pointer() *C.ANativeWindow
func (*Window) Release ¶
func (w *Window) Release()
*
- Remove a reference that was previously acquired with ANativeWindow_acquire().
func (*Window) SetBuffersGeometry ¶
* Change the format and size of the window buffers. * * The width and height control the number of pixels in the buffers, not the * dimensions of the window on screen. If these are different than the * window's physical size, then it buffer will be scaled to match that size * when compositing it to the screen. * * For all of these parameters, if 0 is supplied then the window's base * value will come back in force. * * width and height must be either both zero or both non-zero. *
func (*Window) UnlockAndPost ¶
*
- Unlock the window's drawing surface after previously locking it,
- posting the new buffer to the display.
type WindowBuffer ¶
type WindowBuffer C.ANativeWindow_Buffer
func (*WindowBuffer) Bit16s ¶
func (b *WindowBuffer) Bit16s() []uint16
func (*WindowBuffer) Bit32s ¶
func (b *WindowBuffer) Bit32s() []uint32
func (*WindowBuffer) Bits ¶
func (b *WindowBuffer) Bits() []byte
func (*WindowBuffer) Format ¶
func (b *WindowBuffer) Format() int
func (*WindowBuffer) Height ¶
func (b *WindowBuffer) Height() int
func (*WindowBuffer) Stride ¶
func (b *WindowBuffer) Stride() int
func (*WindowBuffer) Width ¶
func (b *WindowBuffer) Width() int