MPLABĀ® Harmony Graphics Suite
GFX v3.13.0
Legato API Documentation
|
A linked list implementation. More...
#include "gfx/legato/common/legato_common.h"
Go to the source code of this file.
Data Structures | |
struct | leListNode |
This struct represents a list node . More... | |
struct | leList |
This struct represents a list. More... | |
Typedefs | |
typedef struct leListNode | leListNode |
This struct represents a list node . More... | |
typedef struct leList | leList |
This struct represents a list. More... | |
Functions | |
int32_t | leList_Create (leList *list) |
Create a new list. More... | |
int32_t | leList_Assign (leList *list, size_t idx, void *val) |
Assignes a new pointer. More... | |
int32_t | leList_PushFront (leList *list, void *) |
Push value on front. More... | |
void | leList_PopFront (leList *list) |
Pop value from front. More... | |
int32_t | leList_PushBack (leList *list, void *val) |
Push value on back. More... | |
int32_t | leList_PopBack (leList *list) |
Pop value from back. More... | |
void * | leList_Get (const leList *list, uint32_t idx) |
Get a value from the list. More... | |
int32_t | leList_Find (const leList *list, void *val) |
Find index of a value. More... | |
int32_t | leList_InsertAt (leList *list, void *val, uint32_t idx) |
Insert value at index. More... | |
int32_t | leList_Remove (leList *list, void *val) |
Remove item. More... | |
int32_t | leList_RemoveAt (leList *list, uint32_t idx) |
Remove item at index. More... | |
int32_t | leList_Copy (leList *l, leList *r) |
Copy list. More... | |
void | leList_Clear (leList *list) |
Clear array. More... | |
void | leList_Destroy (leList *list) |
Remove array. More... | |
A linked list implementation.
This is a linked list implementation that is used internally by the Legato user interface library.
This struct represents a list.
List is used use to hold a size limit of list nodes.
typedef struct leListNode leListNode |
This struct represents a list node .
List node is used to hold a list of items.
int32_t leList_Assign | ( | leList * | list, |
size_t | idx, | ||
void * | val | ||
) |
Assignes a new pointer.
Assigns val at the specified index for the specified list.
list | is the array to modify. |
idx | is the location to update. |
val | is the value to assign. |
void leList_Clear | ( | leList * | list | ) |
Clear array.
Removes all values from list. The array capacity remains the same.
list | the list to modify. |
Copy list.
Copies the contents of l to the array pointed to by r.
l | the source list. |
r | the result list. |
int32_t leList_Create | ( | leList * | list | ) |
Create a new list.
Creates a new list using list.
Pointer | to the list to create. |
void leList_Destroy | ( | leList * | list | ) |
Remove array.
Removes all values from list. The function frees the data of each node.
list | the list to modify. |
int32_t leList_Find | ( | const leList * | list, |
void * | val | ||
) |
Find index of a value.
Finds the index of val from list. All existing values from index are shifted right one place.
pointer | to the list to reference. |
the | value to search for. |
void* leList_Get | ( | const leList * | list, |
uint32_t | idx | ||
) |
Get a value from the list.
Gets val from list at the specified idx. All existing values from index are shifted right one place.
pointer | to the list to reference. |
the | index of the value to retrieve. |
int32_t leList_InsertAt | ( | leList * | list, |
void * | val, | ||
uint32_t | idx | ||
) |
Insert value at index.
Inserts val into list at the specified idx. All existing values from index are shifted right one place.
list | is the array to modify. |
val | is value to insert. |
idx | is the location at which to insert. |
int32_t leList_PopBack | ( | leList * | list | ) |
Pop value from back.
Pops a value from the back list. This is the last value from the list. of the array pointed to by list.
list | is the array to modify. |
void leList_PopFront | ( | leList * | list | ) |
Pop value from front.
Removes the first value from the front of list. This function shuffles all other values forward one index.
list | is the array to modify. |
int32_t leList_PushBack | ( | leList * | list, |
void * | val | ||
) |
Push value on back.
Pushes val onto the back of list.
list | is the array to modify. |
val | is the value to push. |
int32_t leList_PushFront | ( | leList * | list, |
void * | |||
) |
Push value on front.
Pushes val onto the front of the specified list. This function shuffles all other values backward one index.
list | is the array to modify. |
val | is the value to push. |
int32_t leList_Remove | ( | leList * | list, |
void * | val | ||
) |
Remove item.
Removes the first instance of val from list. The function shuffles all values left to fill the gap.
list | is the array to modify. |
val | is the value removed. |
int32_t leList_RemoveAt | ( | leList * | list, |
uint32_t | idx | ||
) |
Remove item at index.
Removes an item from list at the specified idx.
list | is the array to modify. |
idx | is the location at which to remove. |