Documentation
¶
Overview ¶
Package window provides Go bindings for Android NativeWindow.
Index ¶
- type Error
- type Format
- type NativeWindowTransform
- type NativeWindow_Buffer
- type NativeWindow_ChangeFrameRateStrategy
- type NativeWindow_FrameRateCompatibility
- type Window
- func (h *Window) Acquire()
- func (h *Window) ClearFrameRate() error
- func (h *Window) Close() error
- func (h *Window) Format() int32
- func (h *Window) GetBuffersDataSpace() error
- func (h *Window) GetBuffersDefaultDataSpace() error
- func (h *Window) Height() int32
- func (h *Window) Pointer() unsafe.Pointer
- func (h *Window) SetBuffersDataSpace(dataSpace int32) error
- func (h *Window) SetBuffersGeometry(width int32, height int32, format Format) error
- func (h *Window) SetBuffersTransform(transform int32) error
- func (h *Window) SetFrameRate(frameRate float32, compatibility int8) error
- func (h *Window) SetFrameRateWithChangeStrategy(frameRate float32, compatibility int8, changeFrameRateStrategy int8) error
- func (h *Window) TryAllocateBuffers()
- func (h *Window) UnlockAndPost() error
- func (h *Window) Width() int32
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NativeWindowTransform ¶
type NativeWindowTransform int32
const ( ANATIVEWINDOW_TRANSFORM_IDENTITY NativeWindowTransform = 0 ANATIVEWINDOW_TRANSFORM_MIRROR_HORIZONTAL NativeWindowTransform = 1 ANATIVEWINDOW_TRANSFORM_MIRROR_VERTICAL NativeWindowTransform = 2 ANATIVEWINDOW_TRANSFORM_ROTATE_90 NativeWindowTransform = 4 ANATIVEWINDOW_TRANSFORM_ROTATE_180 NativeWindowTransform = 3 ANATIVEWINDOW_TRANSFORM_ROTATE_270 NativeWindowTransform = 7 )
type NativeWindow_Buffer ¶
type NativeWindow_Buffer struct {
// contains filtered or unexported fields
}
NativeWindow_Buffer wraps the NDK ANativeWindow_Buffer handle.
func NewNativeWindow_BufferFromPointer ¶
func NewNativeWindow_BufferFromPointer(ptr unsafe.Pointer) *NativeWindow_Buffer
NewNativeWindow_BufferFromPointer wraps a raw ANativeWindow_Buffer pointer.
func (*NativeWindow_Buffer) Pointer ¶
func (h *NativeWindow_Buffer) Pointer() unsafe.Pointer
Pointer returns the underlying pointer as unsafe.Pointer.
type NativeWindow_ChangeFrameRateStrategy ¶
type NativeWindow_ChangeFrameRateStrategy int32
const ( ANATIVEWINDOW_CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS NativeWindow_ChangeFrameRateStrategy = 0 ANATIVEWINDOW_CHANGE_FRAME_RATE_ALWAYS NativeWindow_ChangeFrameRateStrategy = 1 )
type NativeWindow_FrameRateCompatibility ¶
type NativeWindow_FrameRateCompatibility int32
const ( ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_DEFAULT NativeWindow_FrameRateCompatibility = 0 ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_FIXED_SOURCE NativeWindow_FrameRateCompatibility = 1 )
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
Window wraps the NDK ANativeWindow handle.
func NewWindowFromPointer ¶
NewWindowFromPointer wraps a raw ANativeWindow pointer.
func (*Window) ClearFrameRate ¶
ClearFrameRate calls the underlying NDK function.
func (*Window) GetBuffersDataSpace ¶
GetBuffersDataSpace calls the underlying NDK function.
func (*Window) GetBuffersDefaultDataSpace ¶
GetBuffersDefaultDataSpace calls the underlying NDK function.
func (*Window) SetBuffersDataSpace ¶
SetBuffersDataSpace calls the underlying NDK function.
func (*Window) SetBuffersGeometry ¶
SetBuffersGeometry calls the underlying NDK function.
func (*Window) SetBuffersTransform ¶
SetBuffersTransform calls the underlying NDK function.
func (*Window) SetFrameRate ¶
SetFrameRate calls the underlying NDK function.
func (*Window) SetFrameRateWithChangeStrategy ¶
func (h *Window) SetFrameRateWithChangeStrategy(frameRate float32, compatibility int8, changeFrameRateStrategy int8) error
SetFrameRateWithChangeStrategy calls the underlying NDK function.
func (*Window) TryAllocateBuffers ¶
func (h *Window) TryAllocateBuffers()
TryAllocateBuffers calls the underlying NDK function.
func (*Window) UnlockAndPost ¶
UnlockAndPost calls the underlying NDK function.