status_t blithe_init(void);
An initialization routine. This function must be called before any Blithe C functions are called.
int has_application_dictionary(int32 inLangID);
Determines the existance of an application dictionary for inLangID.It returns 1 if there is an application dictionary with that language ID or 0 if there isn't.
int32 get_default_language(void);
Returns the global default language ID. This is set through the Blithe settings application.
char *get_entry(int32 inStringID, int32 inLangID, char* inBuffer, int32 inBuffSize);
Retrieves the text from a dictionary. The text is specified by inStringID (the entry ID) and inLangID (the language ID). The user may also pass a buffer and the length of the buffer. If inBuffer is NULL, it allocates a buffer and returns the string in that; otherwise it uses and returns inBuffer.
It searches the application dictionaries first. If no entry found, it searches the common dictionaries. If none is found, it will try the application, ignoring inLangID. If this fails, it creates a string with the hex value of inStringID.
int32 get_entry_length(int32 inStringID, int32 inLangID);
Returns the number of character in a particular entry. The entry is specified by
inStringID and inLangID. It uses the same search path as
get_entry
.
void *get_blob(uint32 inResType,int32 inResID, int32 inLangID, void* inBuffer, size_t inBuffLength, size_t* outBlobSize);
Retrieves the resource from a dictionary, much like get_entry, except you specify the type_code in inResType. If there is no resource with a matching type and ID in the common, application, or built-in dictionaries, it will return null, instead of creating dummy data.
int32 get_max_length(int32 inLangID);
Returns the length of the longest string for the dictionaries with inLangID.
int32 get_language_list(char** outList);
Returns an array of strings. These are the names of the installed common dictionaries. This function allocates an array of char* in outList and a char array for each element in outList. It returns the number of elements in the list. It is up to you to free each buffer that contains the name, as well as the char**.
char* language_name(int32 inLangID, char* inBuffer, int32 inBuffSize);
Returns the name of the language associated with language ID inLangID. If inBuffer is null, it allocates a buffer and returns the name in that. Otherwise, it uses inBuffer.
int32 language_id(char *inName);
Returns the language ID associated with inName.
size_t get_raw_bits(void** theBits);
This function gets the raw bits for the Blithe bitmap.