diff --git a/include/libliftoff.h b/include/libliftoff.h index b7a224b..7052d6c 100644 --- a/include/libliftoff.h +++ b/include/libliftoff.h @@ -47,6 +47,11 @@ struct liftoff_plane *liftoff_plane_create(struct liftoff_device *device, */ void liftoff_plane_destroy(struct liftoff_plane *plane); +/** + * Obtain the object ID of the plane. + */ +uint32_t liftoff_plane_get_id(struct liftoff_plane *plane); + /** * Build a layer to plane mapping and append the plane configuration to `req`. * diff --git a/plane.c b/plane.c index 791bb7a..243d63c 100644 --- a/plane.c +++ b/plane.c @@ -147,6 +147,11 @@ void liftoff_plane_destroy(struct liftoff_plane *plane) free(plane); } +uint32_t liftoff_plane_get_id(struct liftoff_plane *plane) +{ + return plane->id; +} + struct liftoff_plane_property *plane_get_property(struct liftoff_plane *plane, const char *name) {