--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ */
+
+#ifndef __RENDERER_EXT_API__
+#define __RENDERER_EXT_API__
+
+#include "renderer_ext_types.h"
+
+#ifndef EXPORT_API
+#define EXPORT_API __attribute__((visibility("default")))
+#endif
+
+
+extern "C"
+{
+ /**
+ * @brief GL initialization function
+ *
+ * @return void
+ */
+ EXPORT_API void InitializeGL();
+#ifdef TIZEN60
+ /**
+ * @brief function to render the frame
+ *
+ * @return void
+ */
+ EXPORT_API void RenderFrameGL();
+#else
+ /**
+ * @brief function to render the frame
+ *
+ * @return int
+ */
+ EXPORT_API int RenderFrameGL();
+#endif
+
+ /**
+ * @brief Redraw the full screen.
+ */
+ EXPORT_API void RenderFullyReDraw();
+
+ /**
+ * @brief function to clean up GL resources
+ *
+ * @return EXPORT_API
+ */
+ EXPORT_API void TerminateGL();
+
+ /**
+ * @brief Update Window Size
+ *
+ * @param w Window width
+ * @param h Window height
+ * @return void
+ */
+ EXPORT_API void UpdateGLWindowSize(int w, int h);
+
+ /**
+ * @brief Get Window Size
+ *
+ * @param w Window width
+ * @param h Window height
+ * @return void
+ */
+ EXPORT_API void GetGLWindowSize(int& w, int& h);
+
+ /**
+ * @brief Update Window Orientation
+ *
+ * @param angle Rotation angle
+ * @return void
+ */
+ EXPORT_API void UpdateGLWindowOrientation(int angle);
+
+ /**
+ * @brief Get Window Orientation
+ *
+ * @return int
+ */
+ EXPORT_API int GetGLWindowOrientation();
+
+ /**
+ * @brief Sets resource path
+ *
+ * @param resourcePath const char* resource path
+ * @return void
+ */
+ EXPORT_API void SetResourcePath(const char* resourcePath);
+
+ /**
+ * @brief Sets used dash array
+ *
+ * @param resourcePath const char* dash array
+ * @return void
+ */
+ EXPORT_API void SetDashArray(const char* dashArray);
+
+ /**
+ * @brief Gets resource path
+ *
+ * @return char*
+ */
+ EXPORT_API const char* GetResourcePath();
+
+ /**
+ * @brief Sets font path
+ *
+ * @param fontPath Font path.
+ * @return void
+ */
+ EXPORT_API void SetFontPath(const char* fontPath);
+
+ /**
+ * @brief Gets font path
+ *
+ * @return const char*
+ */
+ EXPORT_API const char* GetFontPath();
+
+ /**
+ * @brief Set the Texture Paths object
+ *
+ * @param texturePaths Texture paths.
+ * @param textureCount Number of textures.
+ * @return void
+ */
+ EXPORT_API void SetTexturePaths(const char* texturePaths[], int textureCount);
+
+ /**
+ * @brief Get the Texture Paths count
+ *
+ * @return int
+ */
+ EXPORT_API int GetTexturePathsCount();
+
+ /**
+ * @brief Get the Texture Path by it's index
+ *
+ * @return const char*
+ */
+ EXPORT_API const char* GetTexturePath(const int texturePathIndex);
+
+ /**
+ * @brief Start point for drawing
+ *
+ * @param x Point X coor
+ * @param y Point Y coor
+ * @return unsigned unique shape id
+ */
+ EXPORT_API unsigned BeginShapeDraw(float x, float y, unsigned time);
+
+ /**
+ * @brief Start point for drawing shape with specific attributes
+ *
+ * @param x float Point X coor
+ * @param y float Point Y coor
+ * @param shapeType int shape type
+ * @param radius float stroke radius
+ * @param hexColor const char* HEX code for color
+ * @param a float color alpha
+ * @param textureID int ID of brush texture, argument used only with brush
+ * @param textureDistance float distance between textures in brush, argument used only with brush
+ * @param dashArray const char* dashed stroke pattern, argument used only with dashed stroke
+ * @param ttime unsigned
+ * @return unsigned unique shape id
+ */
+ EXPORT_API unsigned BeginSpecificShapeDraw(float x, float y, int strokeType, const char* hexColor, float a, float radius, int textureID, float textureDistance, const char* dashArray, unsigned ttime);
+
+ /**
+ * @brief Draw points on cavas
+ *
+ * @param shapeID ID of drawn shape
+ * @param x Point X coor
+ * @param y Point Y coor
+ * @retval 0 No error in adding points
+ * @retval 1 Too many points (new shape has to be created)
+ * @retval 2 No canvas set
+ * @retval 3 No shapes in canvas
+ * @retval 4 Bad shapeID (not exists)
+ * @retval 5 Object with id=shapeID is not a shape
+ *
+ */
+ EXPORT_API int DrawShape(unsigned shapeID, float x, float y, unsigned time);
+
+ /**
+ * @brief Finish shape drawing
+ *
+ * @param shapeID ID of drawn shape
+ * @return void
+ * @retval 0 No error in adding points
+ * @retval 1 Too many points (new shape has to be created)
+ * @retval 2 No canvas set
+ * @retval 3 No shapes in canvas
+ * @retval 4 Bad shapeID (not exists)
+ * @retval 5 Object with id=shapeID is not a shape
+ */
+ EXPORT_API int EndShapeDraw(unsigned shapeID, unsigned time);
+
+ /**
+ * @brief Start point for line
+ *
+ * @param x Point X coor
+ * @param y Point Y coor
+ * @param ttime unsigned
+ * @return unsigned unique shape id
+ */
+ EXPORT_API unsigned BeginLineDraw(float x, float y, unsigned time);
+
+ /**
+ * @brief Draw line on cavas
+ *
+ * @param lineID ID of drawn line
+ * @param x Point X coor
+ * @param y Point Y coor
+ * @param ttime unsigned
+ * @retval 0 No error in adding points
+ * @retval 1 Too many points (new shape has to be created)
+ * @retval 2 No canvas set
+ * @retval 3 No shapes in canvas
+ * @retval 4 Bad shapeID (not exists)
+ * @retval 5 Object with id=shapeID is not a shape
+ *
+ */
+ EXPORT_API int DrawLine(unsigned lineID, float x, float y, unsigned time);
+
+ /**
+ * @brief End drawing line on cavas
+ *
+ * @param lineID ID of drawn line
+ * @param ttime unsigned
+ * @retval 0 No error in adding points
+ * @retval 1 Too many points (new shape has to be created)
+ * @retval 2 No canvas set
+ * @retval 3 No shapes in canvas
+ * @retval 4 Bad shapeID (not exists)
+ * @retval 5 Object with id=shapeID is not a shape
+ */
+ EXPORT_API int EndLineDraw(unsigned lineID, unsigned ttime);
+
+ /**
+ * @brief Adding rectangle with properties of current stroke
+ *
+ * @param xStart coor of upper left corner of rectangle
+ * @param yStart coor of upper left corner of rectangle
+ * @param x coor of bottom right corner
+ * @param y coor of bottom right corner
+ * @param finished true if drawing of rectangle is finished, false when it is set as current shape and has to be call FinishRectanglePath at the end of drawing
+
+ */
+ EXPORT_API unsigned AddRectanglePath(float xStart, float yStart, float x, float y, bool finished);
+
+ /**
+ * @brief Adding arc with properties of current stroke
+ *
+ * @param xCenter coor of center of circle
+ * @param yCenter coor of center of circle
+ * @param radius radius of circle
+ * @param x coor of start point
+ * @param y coor of start point
+ * @param finished true if drawing of rectangle is finished, false when it is set as current shape and has to be call FinishRectanglePath at the end of drawing
+
+ */
+ EXPORT_API unsigned AddArcPath(float xCenter, float yCenter, float radius, float x, float y, bool finished);
+ /**
+ * @brief Resize shape on canvas (rectangle or arc)
+ *
+ * @param shapeID ID of drawn shape
+ * @param x Point X coor of changed point
+ * @param y Point Y coor of changed point
+ * @retval 0 No error in adding points
+ * @retval 1 Too many points (new shape has to be created)
+ * @retval 2 No canvas set
+ * @retval 3 No shapes in canvas
+ * @retval 4 Bad shapeID (not exists)
+ * @retval 5 Object with id=shapeID is not a shape
+ *
+ */
+ EXPORT_API int ResizeShapePath(unsigned shapeID, float x, float y);
+
+ /**
+ * @brief End drawing shape on cavas (rectangle or arc)
+ *
+ * @param shapeID ID of drawn shape
+ * @retval 0 No error in adding points
+ * @retval 1 Too many points (new shape has to be created)
+ * @retval 2 No canvas set
+ * @retval 3 No shapes in canvas
+ * @retval 4 Bad shapeID (not exists)
+ * @retval 5 Object with id=shapeID is not a shape
+ */
+ EXPORT_API int FinishShapePath(unsigned shapeID);
+ /**
+ * @brief Zoom Canvas Begin
+ * @return false if some shape is being drawn, true otherwise
+ */
+ EXPORT_API bool CanvasZoomBegin();
+
+ /**
+ * @brief Zoom Canvas Point
+ *
+ * @param x Point X coord
+ * @param y Point Y coord
+ * @param zoom Zoom level
+ * @param dx
+ * @param dy
+ * @return false if zooming wasn't started with CanvasZoomBegin, true otherwise.
+ */
+ EXPORT_API bool CanvasZoom(float x, float y, float zoom, float dx, float dy);
+
+ /**
+ * @brief Zoom Canvas End
+ * @return false if zooming wasn't started with CanvasZoomBegin, true otherwise.
+ */
+ EXPORT_API bool CanvasZoomEnd();
+
+ /**
+ * @brief Set Zoom Canvas Value
+ *
+ * @param zoomValue set zoom level
+ * @return void
+ */
+ EXPORT_API void CanvasSetZoomValue(float zoomValue);
+
+ /**
+ * @brief Get Zoom Canvas Value
+ *
+ * @return int zoom level
+ */
+ EXPORT_API int CanvasGetZoomValue();
+
+ /**
+ * @brief Move Canvas Begin
+ * @return false if some shape is being drawn, true otherwise
+ */
+ EXPORT_API bool CanvasMoveBegin();
+
+ /**
+ * @brief Move Canvas Area
+ *
+ * @param x Point X coord
+ * @param y Point Y coord
+ * @return false if moving wasn't started with CanvasMoveBegin, true otherwise.
+ */
+ EXPORT_API bool CanvasMove(int x, int y);
+
+ /**
+ * @brief Move Canvas End
+ * @return false if moving wasn't started with CanvasMoveBegin, true otherwise.
+ */
+ EXPORT_API bool CanvasMoveEnd();
+
+ /**
+ * @brief Get canvas position
+ * @return void
+ */
+ EXPORT_API void CanvasGetPosition(int& x, int& y);
+
+ /**
+ * @brief Sets canvas size
+ *
+ * @param width new canvas width
+ * @param height new canvas height
+ * @return void
+ */
+ EXPORT_API void CanvasSetSize(int width, int height);
+
+ /**
+ * @brief Get current canvas size
+ *
+ * @param width canvas width
+ * @param height canvas height
+ * @return void
+ */
+ EXPORT_API void CanvasGetSize(int& width, int& height);
+
+ /**
+ * @brief Erase selected shape
+ *
+ * @param x Point X coord
+ * @param y Point Y coord
+ * @param partial If true, only the touched parts of the shape are erased, otherwise the whole shape is erased.
+ * @return bool
+ */
+ EXPORT_API bool EraseShape(int x, int y, float radius, bool partial);
+
+ /**
+ * @brief Erase slice of canvas
+ *
+ * @param x position of top left corner of slice
+ * @param y position of top left corner of slice
+ * @param width of slice to be ereased
+ * @param height of slice to be ereased
+ * @return bool
+ */
+ EXPORT_API bool EraseCanvasSlice(float x, float y, float width, float height);
+
+ /**
+ * @brief Set Canvas Color
+ *
+ * @param r float Red Color Value
+ * @param g float Green Color Value
+ * @param b float Blue Color Value
+ * @param a float Alpha Value
+ * @return void
+ */
+ EXPORT_API void CanvasSetColor(const char* hexColor, float a);
+
+ /**
+ * @brief Get Canvas Color
+ *
+ * @param hexColor string representig brush color in use
+ * @return float color alpha value
+ */
+ EXPORT_API float CanvasGetColor(char* hexColor);
+
+ /**
+ * @brief Set the radius of stroke line
+ *
+ * @param val float Brush size
+ * @return void
+ */
+ EXPORT_API void SetStrokeSize(float val);
+
+ /**
+ * @brief Set the stroke color
+ *
+ * @param r float Red Color Value
+ * @param g float Green Color Value
+ * @param b float Blue Color Value
+ * @param a float Alpha Value
+ * @return void
+ */
+
+ EXPORT_API void SetStrokeColor(const char* hexColor, float a);
+
+ /**
+ * @brief Set the stroke type
+ *
+ * @param strokeTypeId int Brush type
+ * @return void
+ */
+ EXPORT_API void SetStrokeType(int strokeTypeId);
+
+ /**
+ * @brief Set the brush texture
+ *
+ * @param textureId int Brush texture
+ * @return void
+ */
+ EXPORT_API void SetBrushTexture(int textureId);
+
+ /**
+ * @brief Set the distance between neighbouring textures in brush
+ *
+ * @param distance float Brush distance
+ * @return void
+ */
+ EXPORT_API void SetBrushDistance(float distance);
+
+ /**
+ * @brief Set the line angle
+ *
+ * @param angle float line angle in degrees
+ * @return void
+ */
+ EXPORT_API void SetLineAngle(float angle);
+
+ /**
+ * @brief Set the line type
+ *
+ * @param lineTypeId int Brush type
+ * @return void
+ */
+ EXPORT_API void SetLineType(int lineTypeId);
+
+ /**
+ * @brief Set current layer.
+ *
+ * @param layer unsigned layer index.
+ * @return void
+ */
+ EXPORT_API void SetCurrentLayer(unsigned layer);
+
+ /**
+ * @brief Create Canvas
+ *
+ * @param canvasWidth canvas width
+ * @param canvasHeight canvas height
+ * @return unsigned
+ */
+ EXPORT_API unsigned CreateCanvas(int canvasWidth, int canvasHeight);
+
+ /**
+ * @brief Create Canvas
+ *
+ * @param canvasWidth canvas page width
+ * @param canvasHeight canvas page height
+ * @param horizontal whether pages should scroll horizontally or vertically
+ * @return unsigned
+ */
+ EXPORT_API unsigned CreatePagedCanvas(int canvasWidth, int canvasHeight, bool horizontal);
+
+ /**
+ * @brief Create Canvas
+ *
+ * @param bgPath image path
+ * @return unsigned
+ */
+ EXPORT_API unsigned CreateCanvasWithBackgroundImage(const char* bgPath);
+
+ /**
+ * @brief Get Current Canvas ID
+ *
+ * @return unsigned
+ */
+ EXPORT_API unsigned GetCurrentCanvasID();
+
+ /**
+ * @brief Set Current Canvas
+ *
+ * @param canvasID canvas id
+ * @return void
+ */
+ EXPORT_API void SetCurrentCanvas(unsigned canvasID);
+
+ /**
+ * @brief Clear Current Canvas
+ *
+ * @return void
+ */
+ EXPORT_API void ClearCurrentCanvas();
+
+ /**
+ * @brief Check if canvas is clear
+ *
+ * @return bool
+ */
+ EXPORT_API bool CurrentCanvasEmpty();
+
+ /**
+ * @brief Save canvas to file
+ *
+ * @param canvasID id to save
+ * @param name Name to save
+ * @return bool
+ */
+ EXPORT_API bool SaveCanvas(unsigned canvasID, const char* name);
+
+ /**
+ * @brief Load canvas from file
+ *
+ * @param canvasID canvas id to load
+ * @param name canvas name to load
+ * @return bool
+ */
+ EXPORT_API bool LoadCanvas(unsigned canvasID, const char* name);
+
+ /**
+ * @brief Remove canvas specified by id.
+ *
+ * @param canvasID
+ * @return bool Returns true if canvas was successfully removed.
+ */
+ EXPORT_API bool RemoveCanvas(unsigned canvasID);
+
+ /**
+ * @brief Add new page to the current canvas, after the last one.
+ *
+ * @return bool true if canavs is paged an operation was succesfull, or false otherwise
+ */
+ EXPORT_API bool AddCanvasPage();
+
+ /**
+ * @brief Add new page to the current canvas, just after pageID-th one (pages are numbered from 1)
+ *
+ * @return bool true if canavs is paged an operation was succesfull, or false otherwise
+ */
+ EXPORT_API bool InsertCanvasPage(unsigned pageID);
+
+ /**
+ * @brief Deletes page from the current canvas with id = pageID (pages are numbered from 1)
+ *
+ * @return bool true if canavs is paged an operation was succesfull, or false otherwise
+ */
+ EXPORT_API bool DeleteCanvasPage(unsigned pageID);
+
+ /**
+ * @brief Returns number of current canvas pages currently, or 0 if canvas isn't paged
+ *
+ * @return Number of pages of the current canvas or 0 if it isn't paged.
+ */
+ EXPORT_API unsigned CanvasNumberOfPages();
+
+ /**
+ * @brief Dump canvas to bmp file
+ *
+ * @param canvasID
+ * @param path
+ * @param x
+ * @param y
+ * @param width
+ * @param height
+ * @param saved
+ * @return void
+ */
+ EXPORT_API void TakeScreenshot(unsigned canvasID, const char* path, int x, int y, int width, int height,
+ void *saved);
+
+ /**
+ * @brief Dump
+ *
+ * @return void
+ */
+ EXPORT_API void Dump();
+
+ /**
+ * @brief Export specific parts of canvas to pdf file
+ *
+ * @param filename path to export file
+ * @param x position X on canvas
+ * @param y position Y on canvas
+ * @param w width of canvas slice
+ * @param h height of canvas slice
+ * @param pageWidth width of pdf page
+ * @param pageHeight height of pdf page
+ * @return bool if file was saved successfully
+ */
+ EXPORT_API bool ExportToFile(const char* filename, float x, float y, float w, float h, float pageWidth, float pageHeight);
+
+ /**
+ * @brief Get Current Brush Size
+ *
+ * @return float Brush Size
+ */
+ EXPORT_API float GetBrushSize();
+
+ /**
+ * @brief Get Current Brush Color
+ * @param hexColor string representig brush color in use
+ *
+ * @return float alpha factor
+ */
+ EXPORT_API float GetBrushColor(char* hexColor);
+
+ /**
+ * @brief Get Current Brush Type
+ *
+ * @return int
+ */
+ EXPORT_API int GetBrushType();
+
+ /**
+ * @brief Get Current Brush Texture
+ *
+ * @return int
+ */
+ EXPORT_API int GetBrushTexture();
+
+ /**
+ * @brief Get the distance between neighbouring textures in brush
+ *
+ * @return float
+ */
+ EXPORT_API float GetBrushDistance();
+
+ /**
+ * @brief Get Current Line Angle
+ *
+ * @return float line angle in degrees
+ */
+ EXPORT_API float GetLineAngle();
+
+ /**
+ * @brief Get Current Line Type
+ *
+ * @return int
+ */
+ EXPORT_API int GetLineType();
+
+ /**
+ * @brief Get current layer index.
+ *
+ * @return unsigmed layer index.
+ */
+ EXPORT_API unsigned GetCurrentLayer();
+
+ /**
+ * @brief Return number of layers.
+ *
+ * @return unsigned should return at least 1, if 0 something went wrong.
+ */
+ EXPORT_API unsigned GetLayerCount();
+
+ /**
+ * @brief Start rotating selected shapes
+ *
+ * @param x float cursor position
+ * @param y float cursor position
+ * @return bool
+ */
+ EXPORT_API bool StartRotating(float x, float y);
+
+ /**
+ * @brief Rotate selected shapes
+ *
+ * @param x float cursor position
+ * @param y float cursor position
+ * @return bool
+ */
+ EXPORT_API bool RotateSelected(float x, float y);
+
+ /**
+ * @brief Finish rotating selected shapes
+ *
+ * @param x float cursor position
+ * @param y float cursor position
+ * @return bool
+ */
+ EXPORT_API bool EndRotating(float x, float y);
+
+ /**
+ * @brief Define Selecting Area
+ * @param x
+ * @param y
+ * The engine will display the selection
+ *
+ * @return void
+ */
+ EXPORT_API void StartSelectingArea(float x, float y);
+
+ /**
+ * @brief Define Selecting Area
+ * @param x
+ * @param y
+ * @param showSelection should engine display selected area
+ *
+ * @return void
+ */
+ EXPORT_API void StartSelectingAreaOptionalVisibility(float x, float y, bool showSelection);
+
+ /**
+ * @brief Resize Current Selected Area
+ *
+ * @return bool
+ */
+ EXPORT_API bool ResizeSelectedArea(float x, float y);
+
+ /**
+ * @brief Is inside selected area
+ * @param x
+ * @param y
+ *
+ * @return bool
+ */
+ EXPORT_API bool InsideSelectedArea(float x, float y);
+
+ /**
+ * @brief Get screen-space position of top-left corner and size of current selection
+ * @param x float destination reference for horizontal position or NaN if no selection is present
+ * @param y float destination reference for vertical position or NaN if no selection is present
+ * @param width float destination reference for selection width or NaN if no selection is present
+ * @param height float destination reference for selection height or NaN if no selection is present
+ *
+ * @return bool true if selection exists, false otherwise
+ */
+ EXPORT_API bool GetSelectionDimensions(float &x, float &y, float &width, float &height);
+
+ /**
+ * @brief if selection exists, toggles its visibility
+ *
+ * @return bool true if selection exists, false otherwise
+ */
+ EXPORT_API bool ToggleSelectionDisplay();
+
+ /**
+ * @brief TouchedDrawable
+ * @param x
+ * @param y
+ *
+ * @return int
+ */
+ EXPORT_API int TouchedDrawable(float x, float y);
+
+ /**
+ * @brief Select Drawable
+ * @param x
+ * @param y
+ * The engine will display selected area
+ *
+ * @return int
+ */
+ EXPORT_API int SelectDrawable(float x, float y);
+
+ /**
+ * @brief Select Drawable
+ * @param x
+ * @param y
+ * @param showSelection should engine display selected area
+ *
+ * @return int
+ */
+ EXPORT_API int SelectDrawableOptionalVisibility(float x, float y, bool showSelection);
+
+ /**
+ * @brief Select Drawables
+ *
+ * @return int
+ */
+ EXPORT_API int SelectDrawables();
+
+ /**
+ * @brief Drag Selected Drawables
+ * @param x
+ * @param y
+ *
+ * @return bool
+ */
+ EXPORT_API bool DragSelectedDrawables(float x, float y);
+
+ /**
+ * @brief End Draging
+ *
+ * @return bool
+ */
+ EXPORT_API bool EndDraging();
+
+ /**
+ * @brief Drop Selected Drawables
+ *
+ * @return void
+ */
+ EXPORT_API void DropSelectedDrawables();
+
+ /**
+ * @brief Raise Selected Drawables
+ *
+ * @return void
+ */
+ EXPORT_API void RaiseSelectedDrawables();
+
+ /**
+ * @brief Zoom Selected Area
+ * @param x
+ * @param y
+ * @param zoom
+ *
+ * @return void
+ */
+ EXPORT_API void SelectedAreaZoom(float x, float y, float zoom);
+
+ /**
+ * @brief Initialize scaling of selected area.
+ * Selecting neither or both of left/right or bottom/top anchor will put the anchor in the middle of relevant axis
+ * @param anchorLeft place anchor on the left side of current selection
+ * @param anchorRight place anchor on the right side of current selection
+ * @param anchorTop place anchor on the bottom side of current selection
+ * @param anchorBottom place anchor on the top side of current selection
+ * @param anchorX x cooridinate of anchor point
+ * @param anchorY y cooridinate of anchor point
+ *
+ * @return void
+ */
+ EXPORT_API void StartSelectionScale(bool anchorLeft, bool anchorRight, bool anchorTop, bool anchorBottom, float& anchorX, float& anchorY);
+
+ /**
+ * @brief Scale Selected Area
+ * @param scaleFactorX horizontal scale factor relative to initial size
+ * @param scaleFactorY vertical scale factor relative to initial size
+ *
+ * @return void
+ */
+ EXPORT_API void ScaleSelection(float scaleFactorX, float scaleFactorY);
+
+ /**
+ * @brief Finalize scaling of selected area
+ * @param scaleFactorX final horizontal scale factor relative to initial size
+ * @param scaleFactorY final vertical scale factor relative to initial size
+ *
+ * @return void
+ */
+ EXPORT_API void EndSelectionScale(float scaleFactorX, float scaleFactorY);
+
+ /**
+ * @brief ToggleGrid
+ *
+ * @return void
+ */
+ EXPORT_API void ToggleGrid(int densityType);
+
+ /**
+ * @brief GetGridDensity
+ *
+ * @return int
+ */
+ EXPORT_API int GetGridDensity();
+
+ /**
+ * @brief Toggle Chart Grid
+ * @param densityType grid density
+ *
+ * @return void
+ */
+ EXPORT_API void ToggleChartGrid(int densityType);
+
+ /**
+ * @brief Get Chart Grid Density
+ *
+ * @return int chart grid density
+ */
+ EXPORT_API int GetChartGridDensity();
+
+ /**
+ * @brief Copy shape
+ *
+ * @return bool copy result
+ */
+ EXPORT_API bool Copy();
+
+ /**
+ * @brief Paste shape in position
+ * @param x
+ * @param y
+ *
+ * @return int paste result
+ */
+ EXPORT_API int Paste(float x, float y);
+
+ /**
+ * @brief Cut shape
+ *
+ * @return bool cut result
+ */
+ EXPORT_API bool Cut();
+
+ /**
+ * @brief Remove selected shape
+ *
+ * @return bool remove result
+ */
+ EXPORT_API bool Remove();
+
+ /**
+ * @brief Add chart
+ * @param chartType chart type
+ * @param path path to chart
+ *
+ * @return void
+ */
+ EXPORT_API void AddChart(int chartType, const char* path);
+
+ /**
+ * @brief Change mode
+ * @param mode new mode
+ *
+ * @return void
+ */
+ EXPORT_API void ChangeMode(int mode);
+
+ /**
+ * @brief Chart Position
+ * @param x [out] current chart x position
+ * @param y [out] current chart y position
+ *
+ * @return void
+ */
+ EXPORT_API void ChartPosition(float& x, float& y);
+
+ /**
+ * @brief Add Picture to canvas with original size and at 0;0 position
+ * @param path to file
+ *
+ * @return void
+ */
+ EXPORT_API void AddPicture(const char* path);
+
+ /**
+ * @brief Place picture at specific position on canvas
+ * @param path to file
+ * @param x position on canvas
+ * @param y position on canvas
+ * @param width of picture
+ * @param height of picture
+ *
+ * @return void
+ */
+ EXPORT_API void PlacePicture(const char* path, float x, float y, float width, float height);
+
+ /**
+ * @brief Set Canvas Background
+ * @param path picture path
+ * @param x background x position on canvas
+ * @param y background y position on canvas
+ * @param width background width
+ * @param height background height
+ *
+ * @return void
+ */
+ EXPORT_API void SetCanvasBackground(const char* path, float x, float y, float width, float height);
+
+ /**
+ * @brief Add Text
+ * @param text text to add
+ * @param x text x position
+ * @param y text y position
+ * @param size text size
+ *
+ * @return void
+ */
+ EXPORT_API void AddText(const char* text, float x, float y, float size);
+
+ /**
+ * @brief Add layer, and set it as a current layer.
+ *
+ * @return unsigned layer index.
+ */
+ EXPORT_API unsigned AddLayer();
+
+ /**
+ * @brief Remove layer. If the layer was set as a current it will be changed to the previous layer. If there is only one layer nothing happens.
+ * @param layer unsigned layer index.
+ *
+ * @return void
+ */
+ EXPORT_API void RemoveLayer(unsigned layer);
+
+ /**
+ * @brief Hide layer. If there is only one, nothing will happen.
+ * @param layer unsigned layer index.
+ *
+ * @return void
+ */
+ EXPORT_API void HideLayer(unsigned layer);
+
+ /**
+ * @brief Show layer.
+ * @param layer unsigned layer index.
+ *
+ * @return void
+ */
+ EXPORT_API void ShowLayer(unsigned layer);
+
+ /**
+ * @brief Check if layer is hidden.
+ * @param layer unsigned layer index.
+ *
+ * @return bool true if layer is hidden.
+ */
+ EXPORT_API bool IsLayerHidden(unsigned layer);
+
+ /**
+ * @brief Move current layer index.
+ * @param newIndex unsigned new index of the current layer.
+ *
+ * @return void
+ */
+ EXPORT_API void MoveLayer(unsigned newIndex);
+
+ /**
+ * @brief Add Note.
+ * @param x float x position
+ * @param y float y position
+ * @param w float width
+ * @param h float height
+ *
+ * @return unsigned note id
+ */
+ EXPORT_API unsigned AddNote(float x, float y, float w, float h);
+
+ /**
+ * @brief Remove note with passed id.
+ * @param noteID unsigned id of the note
+ *
+ * @return void
+ */
+ EXPORT_API void RemoveNote(unsigned noteID);
+
+ /**
+ * @brief Get id of the current note.
+ *
+ * @return unsigned current note id, if there is no notes 0 is returned
+ */
+ EXPORT_API unsigned GetCurrentNote();
+
+ /**
+ * @brief Get number of notes.
+ *
+ * @return unsigned number of notes
+ */
+ EXPORT_API unsigned GetNoteCount();
+
+ /**
+ * @brief Clear all drawables from the active note.
+ *
+ * @return void
+ */
+ EXPORT_API void ClearNote();
+
+ /**
+ * @brief Drag the active note.
+ * @param x float x position
+ * @param y float y position
+ *
+ * @return void
+ */
+ EXPORT_API bool DragNote(float x, float y);
+
+ /**
+ * @brief End dragging of the active note.
+ *
+ * @return bool true if success
+ */
+ EXPORT_API bool EndNoteDragging();
+
+ /**
+ * @brief Resize the active note.
+ * @param w float width
+ * @param h float height
+ *
+ * @return void
+ */
+ EXPORT_API void ResizeNote(float w, float h);
+
+ /**
+ * @brief Set color of the active note.
+ * @param hexColor const char* hex code of the color
+ * @param a float alpha
+ *
+ * @return void
+ */
+ EXPORT_API void SetNoteColor(const char* hexColor, float a);
+
+ /**
+ * @brief Set active note.
+ * @param noteID unsigned id of the note
+ *
+ * @return void
+ */
+ EXPORT_API void SetActiveNote(unsigned noteID);
+
+ /**
+ * @brief Check if any of the notes was touched.
+ * @param x float x position
+ * @param y float y position
+ *
+ * @return unsigned id of the touched note, if the notes are overlaid the id of the top one will be returned
+ */
+ EXPORT_API unsigned TouchedNote(float x, float y);
+
+ /**
+ * @brief Save note to the file.
+ * @param noteID unsigned id of the note to be saved
+ * @param path const char* path where the note will be saved
+ *
+ * @return bool true if success
+ */
+ EXPORT_API bool SaveNote(unsigned noteID, const char* path);
+
+ /**
+ * @brief Load a note from the file.
+ * @param path const char* path with the filename
+ *
+ * @return unsigned id of the note
+ */
+ EXPORT_API unsigned LoadNote(const char* path);
+
+ /**
+ * @brief Creates Toolbar with UI for the given noteID.
+ * @param noteID unsigned id of the note
+ *
+ * @return void
+ */
+ EXPORT_API void AddNoteToolbar(unsigned noteID);
+
+ /**
+ * @brief Adds an icon to the note toolbar ui config.
+ * @param iconImagePath const char* path to the icon's image
+ *
+ * @return void
+ */
+ EXPORT_API void AddNoteToolbarIcon(const char* iconImagePath);
+
+ /**
+ * @brief Sets toolbar's position.
+ * @param position int enum ToolbarPosition::Top = 0, ToolbarPosition::Botom = 1
+ *
+ * @return void
+ */
+ EXPORT_API void SetNoteToolbarPosition(int position);
+
+ /**
+ * @brief Sets toolbar's height.
+ * @param h float height of the toolbar
+ *
+ * @return void
+ */
+ EXPORT_API void SetNoteToolbarHeight(float h);
+
+ /**
+ * @brief Sets toolbar's color brightness.
+ * @param factor float factor, values less than 1 make the color darker, greater make it brighter.
+ *
+ * @return void
+ */
+ EXPORT_API void SetNoteToolbarColorFactor(float factor);
+
+ /**
+ * @brief Sets toolbar's icon alignment.
+ * @param alignment int enum ToolbarIconAlignment::Left = 0, ToolbarIconAlignment::Middle = 1, ToolbarIconAlignment::Right = 3
+ *
+ * @return void
+ */
+ EXPORT_API void SetNoteToolbarIconAlignment(int alignment);
+
+ /**
+ * @brief Sets toolbar's icon spacing.
+ * @param spacing float icon spacing
+ *
+ * @return void
+ */
+ EXPORT_API void SetNoteToolbarIconSpacing(float spacing);
+
+ /**
+ * @brief Sets toolbar's icon size.
+ * @param w float width of the icon
+ * @param h float height of the icon
+ *
+ * @return void
+ */
+ EXPORT_API void SetNoteToolbarIconSize(float w, float h);
+
+ /**
+ * @brief Sets icon's vertical border.
+ * @param border float vertical border size
+ *
+ * @return void
+ */
+ EXPORT_API void SetNoteToolbarIconVerticalBorder(float border);
+
+ /**
+ * @brief Sets icon's horizontal border.
+ * @param border float horizontal border size
+ *
+ * @return void
+ */
+ EXPORT_API void SetNoteToolbarIconHorizontalBorder(float border);
+
+ /**
+ * @brief Sets border's thickness.
+ * @param border float thickness
+ *
+ * @return void
+ */
+ EXPORT_API void SetNoteToolbarBorderThickness(float thickness);
+
+ /**
+ * @brief Sets border's color brightness.
+ * @param factor float factor, values less than 1 make the color darker, greater make it brighter.
+ *
+ * @return void
+ */
+ EXPORT_API void SetNoteToolbarBorderColorFactor(float factor);
+
+ /**
+ * @brief Enables border around notes and toolbar
+ * @param enable bool
+ *
+ * @return void
+ */
+ EXPORT_API void SetNoteToolbarBorder(bool enable);
+
+ /**
+ * @brief Loads UI config from the file.
+ * @param filePath const char* path to the ui config file
+ *
+ * @return void
+ */
+ //TODO: EXPORT_API void LoadNoteToolbarConfig(const char* filePath)
+
+ /**
+ * @brief RecognizeShapesFromSelection
+ *
+ * @return void
+ */
+ EXPORT_API void RecognizeShapesFromSelection();
+
+ /**
+ * @brief ToggleShapesRecognition
+ *
+ * @return void
+ */
+ EXPORT_API void ToggleShapesRecognition();
+
+ /**
+ * @brief RecognizeTextFromSelection
+ *
+ * @return char*
+ */
+ EXPORT_API const char* RecognizeTextFromSelection();
+
+ /**
+ * @brief Undo
+ *
+ * @return bool
+ */
+ EXPORT_API bool Undo();
+
+ /**
+ * @brief Redo
+ *
+ * @return bool
+ */
+ EXPORT_API bool Redo();
+
+ /**
+ * @brief Reset Undo
+ *
+ * @return void
+ */
+ EXPORT_API void ResetUndo();
+
+ /**
+ * @brief Reset Redo
+ *
+ * @return void
+ */
+ EXPORT_API void ResetRedo();
+
+ /**
+ * @brief Stop Erasing
+ *
+ * @return bool
+ */
+ EXPORT_API bool StopErasing();
+
+ /**
+ * @brief Get All Configurations array from the engine
+ */
+ EXPORT_API ConfigParam* GetAllConfigurations(void);
+
+ /**
+ * @brief Get Configuration array count from the engine
+ */
+ EXPORT_API unsigned GetConfigurationCount();
+
+ /**
+ * @brief Get Specific Configuration from the engine
+ */
+ EXPORT_API ConfigParam* GetConfiguration(const char* name);
+
+ /**
+ * @brief Set Specific Configuration from the engine
+ */
+ EXPORT_API bool SetConfigurationInt(const char* name, int value);
+
+ /**
+ * @brief Set Specific Configuration from the engine
+ */
+ EXPORT_API bool SetConfigurationFloat(const char* name, float value);
+
+ /**
+ * @brief Set Specific Configuration from the engine
+ */
+ EXPORT_API bool SetConfigurationBool(const char* name, bool value);
+
+ /**
+ * @brief Set Specific Configuration from the engine
+ */
+ EXPORT_API bool SetConfigurationString(const char *name, const char *value);
+
+ /**
+ * @brief Save profiler
+ */
+ EXPORT_API void SaveProfiler(const char *path);
+
+ /**
+ * @brief Reset profiler
+ */
+ EXPORT_API void ResetProfiler();
+
+ /**
+ * @brief Begin shape
+ */
+ EXPORT_API unsigned BeginShape(float x, float y, const char* hexColor, float alpha, int brushTypeId, int textureId, float fRadius, unsigned ttime);
+}
+
+#endif