Embedded SDK
Embedded SDK
|
Implementation of a graphical objects pool, to be used by any page, or by predefined layout management. More...
Go to the source code of this file.
Classes | |
struct | genericObj_t |
Macros | |
#define | OBJ_POOL_LEN 80 |
Max number of objects retrievable from pool. More... | |
#define | OBJ_CONTAINER_POOL_LEN 128 |
Max number of objects pointers usable for container pool. More... | |
#define | INVALID_LAYER 0xFF |
Functions | |
void | nbgl_objPoolRelease (uint8_t layer) |
Release the objects from the pool for the given layer. More... | |
uint8_t | nbgl_objPoolGetNbUsed (uint8_t layer) |
returns the number of objects currently used in the pool More... | |
nbgl_obj_t * | nbgl_objPoolGet (nbgl_obj_type_t type, uint8_t layer) |
Gets a new graphic object from the pool, with the given type. The type field of the object is set. More... | |
nbgl_obj_t * | nbgl_objPoolGetPrevious (nbgl_obj_t *obj, uint8_t layer) |
Gets a link to the previous object in the pool, for the given layer. (to be used with care) More... | |
uint8_t | nbgl_objPoolGetId (nbgl_obj_t *obj) |
Gets a unique index for the given object, in the pool. More... | |
int | nbgl_objPoolGetArray (nbgl_obj_type_t type, uint8_t nbObjs, uint8_t layer, nbgl_obj_t **objArray) |
Gets nbObjects new graphic object from the pool, with the given type, for the given layer (screen). The type field of the object is set. More... | |
void | nbgl_containerPoolRelease (uint8_t layer) |
Release the objects pointers from the pool for the given layer. More... | |
nbgl_obj_t ** | nbgl_containerPoolGet (uint8_t nbObjs, uint8_t layer) |
Gets a new container from the pool, with the given number of obj pointers. More... | |
uint8_t | nbgl_containerPoolGetNbUsed (uint8_t layer) |
returns the number of containers currently used in the pool More... | |
Implementation of a graphical objects pool, to be used by any page, or by predefined layout management.
Definition in file nbgl_obj_pool.c.
#define INVALID_LAYER 0xFF |
Definition at line 39 of file nbgl_obj_pool.c.
#define OBJ_CONTAINER_POOL_LEN 128 |
Max number of objects pointers usable for container pool.
Definition at line 34 of file nbgl_obj_pool.c.
#define OBJ_POOL_LEN 80 |
Max number of objects retrievable from pool.
Definition at line 25 of file nbgl_obj_pool.c.
nbgl_obj_t** nbgl_containerPoolGet | ( | uint8_t | nbObjs, |
uint8_t | layer | ||
) |
Gets a new container from the pool, with the given number of obj pointers.
nbObjs | number of objects pointers for the container |
layer | layer (screen) to get the container to |
Definition at line 290 of file nbgl_obj_pool.c.
returns the number of containers currently used in the pool
Definition at line 334 of file nbgl_obj_pool.c.
void nbgl_containerPoolRelease | ( | uint8_t | layer | ) |
Release the objects pointers from the pool for the given layer.
layer | layer to release objects pointers from |
Definition at line 265 of file nbgl_obj_pool.c.
nbgl_obj_t* nbgl_objPoolGet | ( | nbgl_obj_type_t | type, |
uint8_t | layer | ||
) |
Gets a new graphic object from the pool, with the given type. The type field of the object is set.
type | type of object to get from the pool |
layer | layer to get object for |
Definition at line 164 of file nbgl_obj_pool.c.
int nbgl_objPoolGetArray | ( | nbgl_obj_type_t | type, |
uint8_t | nbObjs, | ||
uint8_t | layer, | ||
nbgl_obj_t ** | objArray | ||
) |
Gets nbObjects new graphic object from the pool, with the given type, for the given layer (screen). The type field of the object is set.
type | type of objects to get from the pool |
nbObjs | number of objects to get from the pool |
layer | layer (screen) to get the object to |
objArray | array of objs pointers |
Definition at line 242 of file nbgl_obj_pool.c.
uint8_t nbgl_objPoolGetId | ( | nbgl_obj_t * | obj | ) |
Gets a unique index for the given object, in the pool.
obj | object to get id from |
Definition at line 223 of file nbgl_obj_pool.c.
returns the number of objects currently used in the pool
Definition at line 147 of file nbgl_obj_pool.c.
nbgl_obj_t* nbgl_objPoolGetPrevious | ( | nbgl_obj_t * | obj, |
uint8_t | layer | ||
) |
Gets a link to the previous object in the pool, for the given layer. (to be used with care)
obj | object to get previous from |
layer | layer (screen) in which to retrieve the object |
Definition at line 201 of file nbgl_obj_pool.c.
void nbgl_objPoolRelease | ( | uint8_t | layer | ) |
Release the objects from the pool for the given layer.
layer | layer to release object from |
Definition at line 126 of file nbgl_obj_pool.c.