General API reference¶
-
class Manager¶
grvl manager class.
This class is used as an entry point for all operations invoked on the library.
Public Functions¶
-
Manager &SetTransparency(float value, uint32_t milliseconds)¶
Sets transparency. TODO - Adjust the description
Remark
Calling this method will invoke registered callback called ‘set_layer_transparency’ with provided argument. It does not change internal state of a library.
-
Manager &SetActiveScreen(const char *activeScreenId, int8_t direction)¶
Changes currently displayed screen with optional animation.
-
Manager &SetLoadingImage(const Image &image)¶
Sets an image that is displayed while the application is loading its resources.
Remark
In order to switch from loading to normal state, application should call InitializationFinished method.
-
Manager &SetCollectionImage(const Image &image)¶
Sets image that is displayed as screen collection indicator.
-
Manager &SetBackgroundColor(uint32_t color)¶
Sets background color for underlying layer.
Remark
Calling this method will invoke registered callback called ‘set_background_color’ with provided argument. It does not change internal state of a library.
-
void ShowKeyboard(TextInput *destinationInput)¶
Displays keyboard pop-up window if defined.
-
void SwitchKeyboardKeys()¶
Switches keyboard pop-up keys.
-
void ClosePopup()¶
Closes last pop-up window.
-
void InitializationFinished()¶
Switches library to normal state when screens are displayed.
Remark
Before calling this method loading image (if defined) is displayed.
-
Manager &AddImageContentToContainer(string name, ImageContent *image)¶
Registers image content in content manager.
The image content will be accessible for other components by the provided name.
Remark
It is advised to use content manager when image content is shared by different components, as it will save memory.
-
Manager &BindImageContentToImage(const string &contentName, Image *image)¶
Binds registered image content to an image object.
-
Manager &AddCallbackToContainer(const string &name, Event::CallbackPointer Callback)¶
Registers callback method for an event.
Remark
This method filters out empty callbacks (i.e., NULLs).
-
Event GetOrCreateCallback(const string &callbackFunctionName, const Event::ArgVector &callbackArgs)¶
Tries to search if there is callback defined with C/C++ code (added by AddCallbackToContainer), if not then it creates new one that will call JavaScript code with provided constant args.
-
Manager &AddFontToFontContainer(const string &name, Font *font)¶
Register font in content manager.
The font will be accessible for other components by the provided name.
Remark
It is advised to use content manager when font is used by multiple components, as it will save memory.
-
void Draw()¶
Redraws content of a display based on current state of components.
-
void MainLoopIteration()¶
Executes an iteration of processing loop.
This method handles pop-up windows, processes events and redraw screen if needed.
-
Manager &SetExternalContentRequestCallback(ContentManager::ContentCallback requestCallback)¶
Registers method that is called when request for external content is issued by the library.
-
class KeyData¶
-
Manager &SetTransparency(float value, uint32_t milliseconds)¶
-
class ImageContent¶
Represents content of an image loaded into memory.
-
struct FromJPEG : public grvl::ImageContent::FromPNG¶
-
struct FromPNG¶
Subclassed by grvl::ImageContent::FromJPEG, grvl::ImageContent::FromRAW
-
struct FromRAW : public grvl::ImageContent::FromPNG¶
-
struct FromJPEG : public grvl::ImageContent::FromPNG¶