C API SharedText functions

From RL3 Wiki
Jump to: navigation, search

rl3_sharedtext_create

struct RL3_SharedText* rl3_sharedtext_create(struct RL3_Engine* engine, const char* text);

Create a SharedText structure (used with multiple facts found in different parts of one text instance).

engine: a pointer to an engine structure
text: a pointer to the first character in the text to be used as shared
Returns: a pointer to a new SharedText structure

rl3_sharedtext_release

void rl3_sharedtext_release(struct RL3_Engine* engine, struct RL3_SharedText* text);

Destroy a SharedText structure when not needed.

engine: a pointer to an engine structure
text: a pointer to a SharedText structure
Returns: nothing

rl3_sharedtext_get_value

const char* rl3_sharedtext_get_value(struct RL3_Engine* engine, struct RL3_SharedText* text);

Get the value of a SharedText structure.

engine: a pointer to an engine structure
text: a pointer to a SharedText structure
Returns: a pointer to the first character in the return string