MPLABĀ® Harmony Graphics Suite  GFX v3.13.0
Legato API Documentation
legato_stringtable.h File Reference

String table functions and definitions. More...

Include dependency graph for legato_stringtable.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  leStringTable
 This struct represents string a string table. More...
 
struct  leStringInfo
 This struct represents string a string table entry. More...
 

Macros

#define LE_STRING_ARRAY_SIZE   4
 
#define LE_STRING_ENTRY_SIZE   2
 
#define LE_STRING_MAX_CHAR_WIDTH   6
 

Typedefs

typedef enum leStringEncodingMode leStringEncodingMode
 This enum represents string encoding modes. More...
 
typedef struct leStringTable leStringTable
 This struct represents string a string table. More...
 
typedef struct leStringInfo leStringInfo
 This struct represents string a string table entry.
 

Enumerations

enum  leStringEncodingMode { LE_STRING_ENCODING_ASCII, LE_STRING_ENCODING_UTF8, LE_STRING_ENCODING_UTF16 }
 This enum represents string encoding modes. More...
 

Functions

uint32_t leStringTable_GetStringCount (const leStringTable *table)
 Gets the number of strings in a string table. More...
 
uint32_t leStringTable_GetLanguageCount (const leStringTable *table)
 Get number of languages in a string table. More...
 
uint32_t leStringTable_GetStringOffset (const leStringTable *table, uint32_t stringID, uint32_t languageID)
 Get offset of a string in table by string and language ID. More...
 
uint32_t leStringTable_GetActiveStringOffset (const leStringTable *table, uint32_t stringID)
 Get offset of a string in table using active global language. More...
 
leFontleStringTable_GetStringFont (const leStringTable *table, uint32_t stringID, uint32_t languageID)
 Get font for a string table string. More...
 
leResult leStringTable_StringLookup (const leStringTable *table, leStringInfo *info)
 Get info for a string table string. More...
 
leResult leStringTable_GetStringLength (const leStringTable *table, leStringInfo *info)
 Get length of a string in the string table in codepoints. More...
 

Detailed Description

String table functions and definitions.

Typedef Documentation

◆ leStringEncodingMode

This enum represents string encoding modes.

String encoding modes are used to encode text.

◆ leStringTable

typedef struct leStringTable leStringTable

This struct represents string a string table.

String table is used to describe a string table asset. There is typically only ever one of these defined at any one time.

Enumeration Type Documentation

◆ leStringEncodingMode

This enum represents string encoding modes.

String encoding modes are used to encode text.

Function Documentation

◆ leStringTable_GetActiveStringOffset()

uint32_t leStringTable_GetActiveStringOffset ( const leStringTable table,
uint32_t  stringID 
)

Get offset of a string in table using active global language.

Gets the offset of a string in table by stringID.

uint32_t off = leStringTable_GetActiveStringOffset(table, stringID);
Parameters
tableis the table to query.
stringIDis the search criteria.
Returns
the offset of the string in bytes.
Here is the call graph for this function:

◆ leStringTable_GetLanguageCount()

uint32_t leStringTable_GetLanguageCount ( const leStringTable table)

Get number of languages in a string table.

Gets the number of languages in table.

uint32_t cnt = leStringTable_GetLanguageCount(table);
Parameters
tableis the table to query.
Returns
the number of languages in the table.

◆ leStringTable_GetStringCount()

uint32_t leStringTable_GetStringCount ( const leStringTable table)

Gets the number of strings in a string table.

Gets the number of strings in table.

uint32_t cnt = leStringTable_GetStringCount(table);
Parameters
tableis the table to query.
Returns
the number of strings in the table.

◆ leStringTable_GetStringFont()

leFont* leStringTable_GetStringFont ( const leStringTable table,
uint32_t  stringID,
uint32_t  languageID 
)

Get font for a string table string.

Gets the font in table by stringID and languageID.

uint32_t stringID;
uint32_t languageID;
leFont* font = leStringTable_GetActiveStringOffset(table, stringID, languageID);
Parameters
tableis the table to query.
stringIDthe string search criteria.
languageIDthe language search criteria.
Returns
the font for the string.

◆ leStringTable_GetStringLength()

leResult leStringTable_GetStringLength ( const leStringTable table,
leStringInfo info 
)

Get length of a string in the string table in codepoints.

Gets the length of a string in table by info.

Parameters
tableis the table to query.
infois the info search criteria.
Returns
LE_SUCCESS if set, otherwise LE_FAILURE.

◆ leStringTable_GetStringOffset()

uint32_t leStringTable_GetStringOffset ( const leStringTable table,
uint32_t  stringID,
uint32_t  languageID 
)

Get offset of a string in table by string and language ID.

Gets the offset of a string in table by stringID and languageID.

uint32_t off = leStringTable_GetStringOffset(table, stringID, languageID);
Parameters
tableis the table to query.
stringIDthe search criteria.
languageIDthe search criteria.
Returns
the offset of the string in bytes.
Here is the caller graph for this function:

◆ leStringTable_StringLookup()

leResult leStringTable_StringLookup ( const leStringTable table,
leStringInfo info 
)

Get info for a string table string.

Gets the offset of a string in table by info.

Parameters
tableis the table to query.
infois the filled leStringInfo structure
Returns
LE_SUCCESS if set, otherwise LE_FAILURE.