Native Activity
Summary
Typedefs |
|
|---|---|
ADisplayLuts
|
typedefstruct ADisplayLuts
Used to get and set display luts. |
ADisplayLutsEntry
|
typedefstruct ADisplayLutsEntry
Used to get and set display luts entry. |
ADisplayLuts_Dimension
|
typedef |
ADisplayLuts_SamplingKey
|
typedef |
AInputReceiver
|
typedefstruct AInputReceiver
The InputReceiver that holds the reference to the registered input channel. |
AInputReceiverCallbacks
|
typedefstruct AInputReceiverCallbacks
|
AInputReceiver_onKeyEvent)(void *_Null_unspecified context, AInputEvent *_Nonnull keyEvent)
|
typedefbool(*
The AInputReceiver_onKeyEvent callback is invoked when the registered input channel receives a key event. |
AInputReceiver_onMotionEvent)(void *_Null_unspecified context, AInputEvent *_Nonnull motionEvent)
|
typedefbool(*
The AInputReceiver_onMotionEvent callback is invoked when the registered input channel receives a motion event. |
AInputTransferToken
|
typedefstruct AInputTransferToken
AInputTransferToken can be used to request focus on or to transfer touch gesture to and from an embedded SurfaceControl. |
ANativeActivity
|
typedefstruct ANativeActivity
This structure defines the native side of an android.app.NativeActivity. |
ANativeActivityCallbacks
|
typedefstruct ANativeActivityCallbacks
These are the callbacks the framework makes into a native application. |
ANativeActivity_createFunc(ANativeActivity *activity, void *savedState, size_t savedStateSize)
|
typedefvoid
This is the function that must be in the native code to instantiate the application's native activity. |
ARect
|
typedefstruct ARect
Rectangular window area. |
ASurfaceControl
|
typedefstruct ASurfaceControl
The SurfaceControl API can be used to provide a hierarchy of surfaces for composition to the system compositor. |
ASurfaceTransaction
|
typedefstruct ASurfaceTransaction
ASurfaceTransaction is a collection of updates to the surface tree that must be applied atomically. |
ASurfaceTransactionStats
|
typedefstruct ASurfaceTransactionStats
An opaque handle returned during a callback that can be used to query general stats and stats for surfaces which were either removed or for which buffers were updated after this transaction was applied. |
ASurfaceTransaction_OnBufferRelease)(void *_Null_unspecified context, int release_fence_fd)
|
typedefvoid(*
The ASurfaceTransaction_OnBufferRelease callback is invoked when a buffer that was passed in ASurfaceTransaction_setBuffer is ready to be reused. |
ASurfaceTransaction_OnCommit)(void *_Null_unspecified context, ASurfaceTransactionStats *_Nonnull stats)
|
typedefvoid(*
The ASurfaceTransaction_OnCommit callback is invoked when transaction is applied and the updates are ready to be presented. |
ASurfaceTransaction_OnComplete)(void *_Null_unspecified context, ASurfaceTransactionStats *_Nonnull stats)
|
typedefvoid(*
Since the transactions are applied asynchronously, the ASurfaceTransaction_OnComplete callback can be used to be notified when a frame including the updates in a transaction was presented. |
Variables |
|
|---|---|
ANativeActivity_onCreate
|
The name of the function that NativeInstance looks for when launching its native code.
|
Functions |
|
|---|---|
ADisplayLutsEntry_createEntry(float *_Nonnull buffer, int32_t length, ADisplayLuts_Dimension dimension, ADisplayLuts_SamplingKey key)
|
ADisplayLutsEntry *_Nonnull
Creates a ADisplayLutsEntry entry.
|
ADisplayLutsEntry_destroy(ADisplayLutsEntry *_Nullable entry)
|
void
Destroys the ADisplayLutsEntry instance.
|
ADisplayLutsEntry_getBuffer(const ADisplayLutsEntry *_Nonnull entry)
|
const float *_Nonnull
Gets the lut buffer of the entry.
|
ADisplayLutsEntry_getDimension(const ADisplayLutsEntry *_Nonnull entry)
|
Gets the dimension of the entry.
|
ADisplayLutsEntry_getSamplingKey(const ADisplayLutsEntry *_Nonnull entry)
|
Gets the sampling key used by the entry.
|
ADisplayLutsEntry_getSize(const ADisplayLutsEntry *_Nonnull entry)
|
int32_t
Gets the size for each dimension of the entry.
|
ADisplayLuts_create()
|
ADisplayLuts *_Nonnull
Creates a ADisplayLuts instance.
|
ADisplayLuts_destroy(ADisplayLuts *_Nullable luts)
|
void
Deletes the ADisplayLuts instance.
|
ADisplayLuts_setEntries(ADisplayLuts *_Nonnull luts, ADisplayLutsEntry *_Nullable *_Nullable entries, int32_t numEntries)
|
void
Sets Luts in order to be applied.
|
AInputReceiverCallbacks_create(void *_Nullable context)
|
AInputReceiverCallbacks *_Nonnull
Creates a AInputReceiverCallbacks object that is used when registering for an AInputReceiver.
|
AInputReceiverCallbacks_release(AInputReceiverCallbacks *_Nullable callbacks)
|
void
Releases the AInputReceiverCallbacks.
|
AInputReceiverCallbacks_setKeyEventCallback(AInputReceiverCallbacks *_Nonnull callbacks, AInputReceiver_onKeyEvent _Nonnull onKeyEvent)
|
void
Sets a AInputReceiver_onKeyEvent callback for an AInputReceiverCallbacks.
|
AInputReceiverCallbacks_setMotionEventCallback(AInputReceiverCallbacks *_Nonnull callbacks, AInputReceiver_onMotionEvent _Nonnull onMotionEvent)
|
void
Sets a AInputReceiver_onMotionEvent callback for an AInputReceiverCallbacks.
|
AInputReceiver_createBatchedInputReceiver(AChoreographer *_Nonnull aChoreographer, const AInputTransferToken *_Nonnull hostInputTransferToken, const ASurfaceControl *_Nonnull aSurfaceControl, AInputReceiverCallbacks *_Nonnull aInputReceiverCallbacks)
|
AInputReceiver *_Nonnull
Registers an input receiver for an ASurfaceControl that will receive batched input event.
|
AInputReceiver_createUnbatchedInputReceiver(ALooper *_Nonnull aLooper, const AInputTransferToken *_Nonnull hostInputTransferToken, const ASurfaceControl *_Nonnull aSurfaceControl, AInputReceiverCallbacks *_Nonnull aInputReceiverCallbacks)
|
AInputReceiver *_Nonnull
Registers an input receiver for an ASurfaceControl that will receive every input event.
|
AInputReceiver_getInputTransferToken(AInputReceiver *_Nonnull aInputReceiver)
|
const AInputTransferToken *_Nonnull
Returns the AInputTransferToken that can be used to transfer touch gesture to or from other windows.
|
AInputReceiver_release(AInputReceiver *_Nullable aInputReceiver)
|
void
Unregisters the input channel and deletes the AInputReceiver.
|
AInputTransferToken_fromJava(JNIEnv *_Nonnull env, jobject _Nonnull inputTransferTokenObj)
|
AInputTransferToken *_Nonnull
Return the AInputTransferToken wrapped by a Java InputTransferToken object.
|
AInputTransferToken_release(AInputTransferToken *_Nullable aInputTransferToken)
|
void
Removes a reference that was previously acquired in native.
|
AInputTransferToken_toJava(JNIEnv *_Nonnull env, const AInputTransferToken *_Nonnull aInputTransferToken)
|
jobject _Nonnull
Return the Java InputTransferToken object that wraps AInputTransferToken.
|
ANativeActivity_finish(ANativeActivity *activity)
|
void
Finish the given activity.
|
ANativeActivity_hideSoftInput(ANativeActivity *activity, uint32_t flags)
|
void
Hide the IME while in the given activity.
|
ANativeActivity_setWindowFlags(ANativeActivity *activity, uint32_t addFlags, uint32_t removeFlags)
|
void
Change the window flags of the given activity.
|
ANativeActivity_setWindowFormat(ANativeActivity *activity, int32_t format)
|
void
Change the window format of the given activity.
|
ANativeActivity_showSoftInput(ANativeActivity *activity, uint32_t flags)
|
void
Show the IME while in the given activity.
|
ANativeWindow_fromSurface(JNIEnv *env, jobject surface)
|
Return the ANativeWindow associated with a Java Surface object, for interacting with it through native code.
|
ANativeWindow_toSurface(JNIEnv *env, ANativeWindow *window)
|
jobject
Return a Java Surface object derived from the ANativeWindow, for interacting with it through Java code.
|
ASurfaceControl_acquire(ASurfaceControl *_Nonnull surface_control)
|
void
Acquires a reference on the given ASurfaceControl object.
|
ASurfaceControl_create(ASurfaceControl *_Nonnull parent, const char *_Nonnull debug_name)
|
See ASurfaceControl_createFromWindow.
|
ASurfaceControl_createFromWindow(ANativeWindow *_Nonnull parent, const char *_Nonnull debug_name)
|
Creates an ASurfaceControl with either ANativeWindow or an ASurfaceControl as its parent.
|
ASurfaceControl_fromJava(JNIEnv *_Nonnull env, jobject _Nonnull surfaceControlObj)
|
ASurfaceControl *_Nonnull
Return the ASurfaceControl wrapped by a Java SurfaceControl object.
|
ASurfaceControl_release(ASurfaceControl *_Nonnull surface_control)
|
void
Removes a reference that was previously acquired with one of the following functions: ASurfaceControl_createFromWindow ASurfaceControl_create ANativeWindow_acquire The surface and its children may remain on display as long as their parent remains on display.
|
ASurfaceTransactionStats_getASurfaceControls(ASurfaceTransactionStats *_Nonnull surface_transaction_stats, ASurfaceControl *_Nullable *_Nullable *_Nonnull outASurfaceControls, size_t *_Nonnull outASurfaceControlsSize)
|
void
outASurfaceControls returns an array of ASurfaceControl pointers that were updated during the transaction.
|
ASurfaceTransactionStats_getAcquireTime(ASurfaceTransactionStats *_Nonnull surface_transaction_stats, ASurfaceControl *_Nonnull surface_control)
|
int64_t
Returns the timestamp of when the CURRENT buffer was acquired. |
ASurfaceTransactionStats_getLatchTime(ASurfaceTransactionStats *_Nonnull surface_transaction_stats)
|
int64_t
Returns the timestamp of when the frame was latched by the framework.
|
ASurfaceTransactionStats_getPresentFenceFd(ASurfaceTransactionStats *_Nonnull surface_transaction_stats)
|
int
Returns a sync fence that signals when the transaction has been presented.
|
ASurfaceTransactionStats_getPreviousReleaseFenceFd(ASurfaceTransactionStats *_Nonnull surface_transaction_stats, ASurfaceControl *_Nonnull surface_control)
|
int
The returns the fence used to signal the release of the PREVIOUS buffer set on this surface.
|
ASurfaceTransactionStats_releaseASurfaceControls(ASurfaceControl *_Nonnull *_Nonnull surface_controls)
|
void
Releases the array of ASurfaceControls that were returned by ASurfaceTransactionStats_getASurfaceControls().
|
ASurfaceTransaction_apply(ASurfaceTransaction *_Nonnull transaction)
|
void
Applies the updates accumulated in transaction.
|
ASurfaceTransaction_clearFrameRate(ASurfaceTransaction *_Nonnull transaction, ASurfaceControl *_Nonnull surface_control)
|
void
Clears the frame rate which is set for surface_control.
|
ASurfaceTransaction_create()
|
ASurfaceTransaction *_Nonnull
The caller takes ownership of the transaction and must release it using ASurfaceTransaction_delete() below.
|
ASurfaceTransaction_delete(ASurfaceTransaction *_Nullable transaction)
|
void
Destroys the transaction object.
|
ASurfaceTransaction_fromJava(JNIEnv *_Nonnull env, jobject _Nonnull transactionObj)
|
ASurfaceTransaction *_Nonnull
Return the ASurfaceTransaction wrapped by a Java Transaction object.
|
ASurfaceTransaction_reparent(ASurfaceTransaction *_Nonnull transaction, ASurfaceControl *_Nonnull surface_control, ASurfaceControl *_Nullable new_parent)
|
void
Reparents the surface_control from its old parent to the new_parent surface control.
|
ASurfaceTransaction_setBuffer(ASurfaceTransaction *_Nonnull transaction, ASurfaceControl *_Nonnull surface_control, AHardwareBuffer *_Nonnull buffer, int acquire_fence_fd)
|
void
Updates the AHardwareBuffer displayed for surface_control.
|
ASurfaceTransaction_setBufferAlpha(ASurfaceTransaction *_Nonnull transaction, ASurfaceControl *_Nonnull surface_control, float alpha)
|
void
Sets the alpha for the buffer.
|
ASurfaceTransaction_setBufferDataSpace(ASurfaceTransaction *_Nonnull transaction, ASurfaceControl *_Nonnull surface_control, enum ADataSpace data_space)
|
|