Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 896a661d authored by Marijn Suijten's avatar Marijn Suijten Committed by Dan Albert
Browse files

surface_control: Add ABI type information to `enum`s



By declaring the ABI of `enum` types, the `enum` type can now be used in
place of a raw and untyped integer in function parameters and structure
fields, self-documenting what the possible values are.

Test: treehugger
Change-Id: I6b9cf8b36b16e23c0e992f8155452bd194e6e1ad
Signed-off-by: default avatarMarijn Suijten <marijns95@gmail.com>
parent 2d0d712f
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -303,7 +303,7 @@ void ASurfaceTransaction_reparent(ASurfaceTransaction* transaction,
/**
 * Parameter for ASurfaceTransaction_setVisibility().
 */
enum {
enum ASurfaceTransactionVisibility : int8_t {
    ASURFACE_TRANSACTION_VISIBILITY_HIDE = 0,
    ASURFACE_TRANSACTION_VISIBILITY_SHOW = 1,
};
@@ -315,7 +315,8 @@ enum {
 * Available since API level 29.
 */
void ASurfaceTransaction_setVisibility(ASurfaceTransaction* transaction,
                                       ASurfaceControl* surface_control, int8_t visibility)
                                       ASurfaceControl* surface_control,
                                       enum ASurfaceTransactionVisibility visibility)
                                       __INTRODUCED_IN(29);

/**
@@ -436,7 +437,7 @@ void ASurfaceTransaction_setScale(ASurfaceTransaction* transaction,
/**
 * Parameter for ASurfaceTransaction_setBufferTransparency().
 */
enum {
enum ASurfaceTransactionTransparency : int8_t {
    ASURFACE_TRANSACTION_TRANSPARENCY_TRANSPARENT = 0,
    ASURFACE_TRANSACTION_TRANSPARENCY_TRANSLUCENT = 1,
    ASURFACE_TRANSACTION_TRANSPARENCY_OPAQUE = 2,
@@ -450,7 +451,7 @@ enum {
 */
void ASurfaceTransaction_setBufferTransparency(ASurfaceTransaction* transaction,
                                               ASurfaceControl* surface_control,
                                               int8_t transparency)
                                               enum ASurfaceTransactionTransparency transparency)
                                               __INTRODUCED_IN(29);

/**