Loading include/android/choreographer.h +6 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ typedef void (*AChoreographer_frameCallback64)(int64_t frameTimeNanos, void* dat /** * Get the AChoreographer instance for the current thread. This must be called * on an ALooper thread. * * Available since API level 24. */ AChoreographer* AChoreographer_getInstance() __INTRODUCED_IN(24); Loading @@ -82,6 +84,8 @@ void AChoreographer_postFrameCallbackDelayed(AChoreographer* choreographer, /** * Power a callback to be run on the next frame. The data pointer provided will * be passed to the callback function when it's called. * * Available since API level 29. */ void AChoreographer_postFrameCallback64(AChoreographer* chroreographer, AChoreographer_frameCallback64 callback, void* data) __INTRODUCED_IN(29); Loading @@ -90,6 +94,8 @@ void AChoreographer_postFrameCallback64(AChoreographer* chroreographer, * Post a callback to be run on the frame following the specified delay. The * data pointer provided will be passed to the callback function when it's * called. * * Available since API level 29. */ void AChoreographer_postFrameCallbackDelayed64(AChoreographer* choreographer, AChoreographer_frameCallback64 callback, void* data, uint32_t delayMillis) __INTRODUCED_IN(29); Loading include/android/configuration.h +10 −8 Original line number Diff line number Diff line Loading @@ -675,50 +675,52 @@ int32_t AConfiguration_getUiModeNight(AConfiguration* config); */ void AConfiguration_setUiModeNight(AConfiguration* config, int32_t uiModeNight); #if __ANDROID_API__ >= 13 /** * Return the current configuration screen width in dp units, or * ACONFIGURATION_SCREEN_WIDTH_DP_ANY if not set. */ int32_t AConfiguration_getScreenWidthDp(AConfiguration* config) __INTRODUCED_IN(13); int32_t AConfiguration_getScreenWidthDp(AConfiguration* config); /** * Set the configuration's current screen width in dp units. */ void AConfiguration_setScreenWidthDp(AConfiguration* config, int32_t value) __INTRODUCED_IN(13); void AConfiguration_setScreenWidthDp(AConfiguration* config, int32_t value); /** * Return the current configuration screen height in dp units, or * ACONFIGURATION_SCREEN_HEIGHT_DP_ANY if not set. */ int32_t AConfiguration_getScreenHeightDp(AConfiguration* config) __INTRODUCED_IN(13); int32_t AConfiguration_getScreenHeightDp(AConfiguration* config); /** * Set the configuration's current screen width in dp units. */ void AConfiguration_setScreenHeightDp(AConfiguration* config, int32_t value) __INTRODUCED_IN(13); void AConfiguration_setScreenHeightDp(AConfiguration* config, int32_t value); /** * Return the configuration's smallest screen width in dp units, or * ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY if not set. */ int32_t AConfiguration_getSmallestScreenWidthDp(AConfiguration* config) __INTRODUCED_IN(13); int32_t AConfiguration_getSmallestScreenWidthDp(AConfiguration* config); /** * Set the configuration's smallest screen width in dp units. */ void AConfiguration_setSmallestScreenWidthDp(AConfiguration* config, int32_t value) __INTRODUCED_IN(13); #endif /* __ANDROID_API__ >= 13 */ void AConfiguration_setSmallestScreenWidthDp(AConfiguration* config, int32_t value); #if __ANDROID_API__ >= 17 /** * Return the configuration's layout direction, or * ACONFIGURATION_LAYOUTDIR_ANY if not set. * * Available since API level 17. */ int32_t AConfiguration_getLayoutDirection(AConfiguration* config) __INTRODUCED_IN(17); /** * Set the configuration's layout direction. * * Available since API level 17. */ void AConfiguration_setLayoutDirection(AConfiguration* config, int32_t value) __INTRODUCED_IN(17); #endif /* __ANDROID_API__ >= 17 */ Loading include/android/font.h +18 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,8 @@ struct AFont; /** * Close an AFont. * * Available since API level 29. * * \param font a font returned by ASystemFontIterator_next or AFontMatchert_match. * Do nothing if NULL is passed. */ Loading @@ -116,6 +118,8 @@ void AFont_close(AFont* _Nullable font) __INTRODUCED_IN(29); * The font file returned is guaranteed to be opend with O_RDONLY. * Note that the returned pointer is valid until AFont_close() is called for the given font. * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \return a string of the font file path. */ Loading Loading @@ -184,6 +188,8 @@ const char* _Nonnull AFont_getFontFilePath(const AFont* _Nonnull font) __INTRODU * * For more information about font weight, read [OpenType usWeightClass](https://docs.microsoft.com/en-us/typography/opentype/spec/os2#usweightclass) * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \return a positive integer less than or equal to {@link ASYSTEM_FONT_MAX_WEIGHT} is returned. */ Loading @@ -192,6 +198,8 @@ uint16_t AFont_getWeight(const AFont* _Nonnull font) __INTRODUCED_IN(29); /** * Return true if the current font is italic, otherwise returns false. * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \return true if italic, otherwise false. */ Loading @@ -204,6 +212,8 @@ bool AFont_isItalic(const AFont* _Nonnull font) __INTRODUCED_IN(29); * * Note that the returned pointer is valid until AFont_close() is called. * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \return a IETF BCP47 compliant language tag or nullptr if not available. */ Loading @@ -216,6 +226,8 @@ const char* _Nullable AFont_getLocale(const AFont* _Nonnull font) __INTRODUCED_I * returns a non-negative value as an font offset in the collection. This * always returns 0 if the target font file is a regular font. * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \return a font collection index. */ Loading Loading @@ -247,6 +259,8 @@ size_t AFont_getCollectionIndex(const AFont* _Nonnull font) __INTRODUCED_IN(29); * * For more information about font variation settings, read [Font Variations Table](https://docs.microsoft.com/en-us/typography/opentype/spec/fvar) * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \return a number of font variation settings. */ Loading @@ -258,6 +272,8 @@ size_t AFont_getAxisCount(const AFont* _Nonnull font) __INTRODUCED_IN(29); * * See AFont_getAxisCount for more details. * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \param axisIndex an index to the font variation settings. Passing value larger than or * equal to {@link AFont_getAxisCount} is not allowed. Loading @@ -271,6 +287,8 @@ uint32_t AFont_getAxisTag(const AFont* _Nonnull font, uint32_t axisIndex) * * See AFont_getAxisCount for more details. * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \param axisIndex an index to the font variation settings. Passing value larger than or * equal to {@link ASYstemFont_getAxisCount} is not allwed. Loading include/android/font_matcher.h +13 −1 Original line number Diff line number Diff line Loading @@ -130,13 +130,17 @@ struct AFontMatcher; */ /** * Creates a new AFontMatcher object * Creates a new AFontMatcher object. * * Available since API level 29. */ AFontMatcher* _Nonnull AFontMatcher_create() __INTRODUCED_IN(29); /** * Destroy the matcher object. * * Available since API level 29. * * \param matcher a matcher object. Passing NULL is not allowed. */ void AFontMatcher_destroy(AFontMatcher* _Nonnull matcher) __INTRODUCED_IN(29); Loading @@ -147,6 +151,8 @@ void AFontMatcher_destroy(AFontMatcher* _Nonnull matcher) __INTRODUCED_IN(29); * If this function is not called, the matcher performs with {@link ASYSTEM_FONT_WEIGHT_NORMAL} * with non-italic style. * * Available since API level 29. * * \param matcher a matcher object. Passing NULL is not allowed. * \param weight a font weight value. Only from 0 to 1000 value is valid * \param italic true if italic, otherwise false. Loading @@ -161,6 +167,8 @@ void AFontMatcher_setStyle( * * If this function is not called, the matcher performs with empty locale list. * * Available since API level 29. * * \param matcher a matcher object. Passing NULL is not allowed. * \param languageTags a null character terminated comma separated IETF BCP47 compliant language * tags. Loading @@ -174,6 +182,8 @@ void AFontMatcher_setLocales( * * If this function is not called, the matcher performs with {@link AFAMILY_VARIANT_DEFAULT}. * * Available since API level 29. * * \param matcher a matcher object. Passing NULL is not allowed. * \param familyVariant Must be one of {@link AFAMILY_VARIANT_DEFAULT}, * {@link AFAMILY_VARIANT_COMPACT} or {@link AFAMILY_VARIANT_ELEGANT} is valid. Loading @@ -190,6 +200,8 @@ void AFontMatcher_setFamilyVariant( * Even if no font can render the given text, this function will return a non-null result for * drawing Tofu character. * * Available since API level 29. * * \param matcher a matcher object. Passing NULL is not allowed. * \param familyName a null character terminated font family name * \param text a UTF-16 encoded text buffer to be rendered. Do not pass empty string. Loading include/android/hardware_buffer_jni.h +4 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,8 @@ __BEGIN_DECLS * that is returned. To keep the AHardwareBuffer live after the Java * HardwareBuffer object got garbage collected, be sure to use AHardwareBuffer_acquire() * to acquire an additional reference. * * Available since API level 26. */ AHardwareBuffer* AHardwareBuffer_fromHardwareBuffer(JNIEnv* env, jobject hardwareBufferObj) __INTRODUCED_IN(26); Loading @@ -49,6 +51,8 @@ AHardwareBuffer* AHardwareBuffer_fromHardwareBuffer(JNIEnv* env, /** * Return a new Java HardwareBuffer object that wraps the passed native * AHardwareBuffer object. * * Available since API level 26. */ jobject AHardwareBuffer_toHardwareBuffer(JNIEnv* env, AHardwareBuffer* hardwareBuffer) __INTRODUCED_IN(26); Loading Loading
include/android/choreographer.h +6 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ typedef void (*AChoreographer_frameCallback64)(int64_t frameTimeNanos, void* dat /** * Get the AChoreographer instance for the current thread. This must be called * on an ALooper thread. * * Available since API level 24. */ AChoreographer* AChoreographer_getInstance() __INTRODUCED_IN(24); Loading @@ -82,6 +84,8 @@ void AChoreographer_postFrameCallbackDelayed(AChoreographer* choreographer, /** * Power a callback to be run on the next frame. The data pointer provided will * be passed to the callback function when it's called. * * Available since API level 29. */ void AChoreographer_postFrameCallback64(AChoreographer* chroreographer, AChoreographer_frameCallback64 callback, void* data) __INTRODUCED_IN(29); Loading @@ -90,6 +94,8 @@ void AChoreographer_postFrameCallback64(AChoreographer* chroreographer, * Post a callback to be run on the frame following the specified delay. The * data pointer provided will be passed to the callback function when it's * called. * * Available since API level 29. */ void AChoreographer_postFrameCallbackDelayed64(AChoreographer* choreographer, AChoreographer_frameCallback64 callback, void* data, uint32_t delayMillis) __INTRODUCED_IN(29); Loading
include/android/configuration.h +10 −8 Original line number Diff line number Diff line Loading @@ -675,50 +675,52 @@ int32_t AConfiguration_getUiModeNight(AConfiguration* config); */ void AConfiguration_setUiModeNight(AConfiguration* config, int32_t uiModeNight); #if __ANDROID_API__ >= 13 /** * Return the current configuration screen width in dp units, or * ACONFIGURATION_SCREEN_WIDTH_DP_ANY if not set. */ int32_t AConfiguration_getScreenWidthDp(AConfiguration* config) __INTRODUCED_IN(13); int32_t AConfiguration_getScreenWidthDp(AConfiguration* config); /** * Set the configuration's current screen width in dp units. */ void AConfiguration_setScreenWidthDp(AConfiguration* config, int32_t value) __INTRODUCED_IN(13); void AConfiguration_setScreenWidthDp(AConfiguration* config, int32_t value); /** * Return the current configuration screen height in dp units, or * ACONFIGURATION_SCREEN_HEIGHT_DP_ANY if not set. */ int32_t AConfiguration_getScreenHeightDp(AConfiguration* config) __INTRODUCED_IN(13); int32_t AConfiguration_getScreenHeightDp(AConfiguration* config); /** * Set the configuration's current screen width in dp units. */ void AConfiguration_setScreenHeightDp(AConfiguration* config, int32_t value) __INTRODUCED_IN(13); void AConfiguration_setScreenHeightDp(AConfiguration* config, int32_t value); /** * Return the configuration's smallest screen width in dp units, or * ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY if not set. */ int32_t AConfiguration_getSmallestScreenWidthDp(AConfiguration* config) __INTRODUCED_IN(13); int32_t AConfiguration_getSmallestScreenWidthDp(AConfiguration* config); /** * Set the configuration's smallest screen width in dp units. */ void AConfiguration_setSmallestScreenWidthDp(AConfiguration* config, int32_t value) __INTRODUCED_IN(13); #endif /* __ANDROID_API__ >= 13 */ void AConfiguration_setSmallestScreenWidthDp(AConfiguration* config, int32_t value); #if __ANDROID_API__ >= 17 /** * Return the configuration's layout direction, or * ACONFIGURATION_LAYOUTDIR_ANY if not set. * * Available since API level 17. */ int32_t AConfiguration_getLayoutDirection(AConfiguration* config) __INTRODUCED_IN(17); /** * Set the configuration's layout direction. * * Available since API level 17. */ void AConfiguration_setLayoutDirection(AConfiguration* config, int32_t value) __INTRODUCED_IN(17); #endif /* __ANDROID_API__ >= 17 */ Loading
include/android/font.h +18 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,8 @@ struct AFont; /** * Close an AFont. * * Available since API level 29. * * \param font a font returned by ASystemFontIterator_next or AFontMatchert_match. * Do nothing if NULL is passed. */ Loading @@ -116,6 +118,8 @@ void AFont_close(AFont* _Nullable font) __INTRODUCED_IN(29); * The font file returned is guaranteed to be opend with O_RDONLY. * Note that the returned pointer is valid until AFont_close() is called for the given font. * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \return a string of the font file path. */ Loading Loading @@ -184,6 +188,8 @@ const char* _Nonnull AFont_getFontFilePath(const AFont* _Nonnull font) __INTRODU * * For more information about font weight, read [OpenType usWeightClass](https://docs.microsoft.com/en-us/typography/opentype/spec/os2#usweightclass) * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \return a positive integer less than or equal to {@link ASYSTEM_FONT_MAX_WEIGHT} is returned. */ Loading @@ -192,6 +198,8 @@ uint16_t AFont_getWeight(const AFont* _Nonnull font) __INTRODUCED_IN(29); /** * Return true if the current font is italic, otherwise returns false. * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \return true if italic, otherwise false. */ Loading @@ -204,6 +212,8 @@ bool AFont_isItalic(const AFont* _Nonnull font) __INTRODUCED_IN(29); * * Note that the returned pointer is valid until AFont_close() is called. * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \return a IETF BCP47 compliant language tag or nullptr if not available. */ Loading @@ -216,6 +226,8 @@ const char* _Nullable AFont_getLocale(const AFont* _Nonnull font) __INTRODUCED_I * returns a non-negative value as an font offset in the collection. This * always returns 0 if the target font file is a regular font. * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \return a font collection index. */ Loading Loading @@ -247,6 +259,8 @@ size_t AFont_getCollectionIndex(const AFont* _Nonnull font) __INTRODUCED_IN(29); * * For more information about font variation settings, read [Font Variations Table](https://docs.microsoft.com/en-us/typography/opentype/spec/fvar) * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \return a number of font variation settings. */ Loading @@ -258,6 +272,8 @@ size_t AFont_getAxisCount(const AFont* _Nonnull font) __INTRODUCED_IN(29); * * See AFont_getAxisCount for more details. * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \param axisIndex an index to the font variation settings. Passing value larger than or * equal to {@link AFont_getAxisCount} is not allowed. Loading @@ -271,6 +287,8 @@ uint32_t AFont_getAxisTag(const AFont* _Nonnull font, uint32_t axisIndex) * * See AFont_getAxisCount for more details. * * Available since API level 29. * * \param font a font object. Passing NULL is not allowed. * \param axisIndex an index to the font variation settings. Passing value larger than or * equal to {@link ASYstemFont_getAxisCount} is not allwed. Loading
include/android/font_matcher.h +13 −1 Original line number Diff line number Diff line Loading @@ -130,13 +130,17 @@ struct AFontMatcher; */ /** * Creates a new AFontMatcher object * Creates a new AFontMatcher object. * * Available since API level 29. */ AFontMatcher* _Nonnull AFontMatcher_create() __INTRODUCED_IN(29); /** * Destroy the matcher object. * * Available since API level 29. * * \param matcher a matcher object. Passing NULL is not allowed. */ void AFontMatcher_destroy(AFontMatcher* _Nonnull matcher) __INTRODUCED_IN(29); Loading @@ -147,6 +151,8 @@ void AFontMatcher_destroy(AFontMatcher* _Nonnull matcher) __INTRODUCED_IN(29); * If this function is not called, the matcher performs with {@link ASYSTEM_FONT_WEIGHT_NORMAL} * with non-italic style. * * Available since API level 29. * * \param matcher a matcher object. Passing NULL is not allowed. * \param weight a font weight value. Only from 0 to 1000 value is valid * \param italic true if italic, otherwise false. Loading @@ -161,6 +167,8 @@ void AFontMatcher_setStyle( * * If this function is not called, the matcher performs with empty locale list. * * Available since API level 29. * * \param matcher a matcher object. Passing NULL is not allowed. * \param languageTags a null character terminated comma separated IETF BCP47 compliant language * tags. Loading @@ -174,6 +182,8 @@ void AFontMatcher_setLocales( * * If this function is not called, the matcher performs with {@link AFAMILY_VARIANT_DEFAULT}. * * Available since API level 29. * * \param matcher a matcher object. Passing NULL is not allowed. * \param familyVariant Must be one of {@link AFAMILY_VARIANT_DEFAULT}, * {@link AFAMILY_VARIANT_COMPACT} or {@link AFAMILY_VARIANT_ELEGANT} is valid. Loading @@ -190,6 +200,8 @@ void AFontMatcher_setFamilyVariant( * Even if no font can render the given text, this function will return a non-null result for * drawing Tofu character. * * Available since API level 29. * * \param matcher a matcher object. Passing NULL is not allowed. * \param familyName a null character terminated font family name * \param text a UTF-16 encoded text buffer to be rendered. Do not pass empty string. Loading
include/android/hardware_buffer_jni.h +4 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,8 @@ __BEGIN_DECLS * that is returned. To keep the AHardwareBuffer live after the Java * HardwareBuffer object got garbage collected, be sure to use AHardwareBuffer_acquire() * to acquire an additional reference. * * Available since API level 26. */ AHardwareBuffer* AHardwareBuffer_fromHardwareBuffer(JNIEnv* env, jobject hardwareBufferObj) __INTRODUCED_IN(26); Loading @@ -49,6 +51,8 @@ AHardwareBuffer* AHardwareBuffer_fromHardwareBuffer(JNIEnv* env, /** * Return a new Java HardwareBuffer object that wraps the passed native * AHardwareBuffer object. * * Available since API level 26. */ jobject AHardwareBuffer_toHardwareBuffer(JNIEnv* env, AHardwareBuffer* hardwareBuffer) __INTRODUCED_IN(26); Loading