Forge

Functions

FGAPI fg_err fg_create_window (fg_window *pWindow, const int pWidth, const int pHeight, const char *pTitle, const fg_window pShareWindow, const bool pInvisible)
 Create a Window object. More...
 
FGAPI fg_err fg_destroy_window (fg_window pWindow)
 Destroy Window Object. More...
 
FGAPI fg_err fg_set_window_font (fg_window pWindow, fg_font pFont)
 Set font object to be used by Window Object. More...
 
FGAPI fg_err fg_set_window_title (fg_window pWindow, const char *pTitle)
 Set the title of Window Object. More...
 
FGAPI fg_err fg_set_window_position (fg_window pWindow, const int pX, const int pY)
 Set the window origin of Window Object w.r.t screen origin. More...
 
FGAPI fg_err fg_set_window_size (fg_window pWindow, const unsigned pWidth, const unsigned pHeight)
 Set the window dimensions of Window Object. More...
 
FGAPI fg_err fg_set_window_colormap (fg_window pWindow, const fg_color_map pColorMap)
 Set the colormap to be used by the Window Object. More...
 
FGAPI fg_err fg_get_window_context_handle (long long *pContext, const fg_window pWindow)
 Get the backend specific context handle of Window. More...
 
FGAPI fg_err fg_get_window_display_handle (long long *pDisplay, const fg_window pWindow)
 Get the display device handle of Window. More...
 
FGAPI fg_err fg_get_window_width (int *pWidth, const fg_window pWindow)
 Get the width of Window. More...
 
FGAPI fg_err fg_get_window_height (int *pHeight, const fg_window pWindow)
 Get the height of Window. More...
 
FGAPI fg_err fg_make_window_current (const fg_window pWindow)
 Make the window's backend specific context the active context in given thread. More...
 
FGAPI fg_err fg_get_window_grid (int *pRows, int *pCols, const fg_window pWindow)
 Get the window's grid size. More...
 
FGAPI fg_err fg_hide_window (const fg_window pWindow)
 Hide the Window. More...
 
FGAPI fg_err fg_show_window (const fg_window pWindow)
 Show the Window. More...
 
FGAPI fg_err fg_close_window (bool *pIsClosed, const fg_window pWindow)
 Check if the Window is closed. More...
 
FGAPI fg_err fg_draw_image (const fg_window pWindow, const fg_image pImage, const bool pKeepAspectRatio)
 Render given image to Window. More...
 
FGAPI fg_err fg_draw_chart (const fg_window pWindow, const fg_chart pChart)
 Render given chart to Window. More...
 
FGAPI fg_err fg_setup_window_grid (int pRows, int pCols, fg_window pWindow)
 Setup grid layout for multiple view rendering on Window. More...
 
FGAPI fg_err fg_draw_image_to_cell (const fg_window pWindow, int pRowId, int pColId, const fg_image pImage, const char *pTitle, const bool pKeepAspectRatio)
 Render given image to Window's particular sub-view. More...
 
FGAPI fg_err fg_draw_chart_to_cell (const fg_window pWindow, int pRowId, int pColId, const fg_chart pChart, const char *pTitle)
 Render given chart to Window's particular sub-view. More...
 
FGAPI fg_err fg_swap_window_buffers (const fg_window pWindow)
 Swap back buffer with front buffer. More...
 
FGAPI fg_err fg_save_window_framebuffer (const char *pFullPath, const fg_window pWindow)
 Save the current frame buffer to a file at provided path. More...
 

Detailed Description

Function Documentation

◆ fg_close_window()

FGAPI fg_err fg_close_window ( bool *  pIsClosed,
const fg_window  pWindow 
)

Check if the Window is closed.

Parameters
[out]pIsClosedis set to boolean value if the window is closed
[in]pWindowis Window handle
Returns
fg_err error code

◆ fg_create_window()

FGAPI fg_err fg_create_window ( fg_window pWindow,
const int  pWidth,
const int  pHeight,
const char *  pTitle,
const fg_window  pShareWindow,
const bool  pInvisible 
)

Create a Window object.

Parameters
[out]pWindowis set to the window created
[in]pWidthWidth of the display window
[in]pHeightHeight of the display window
[in]pTitlewindow Title
[in]pShareWindowis an already existing window with which the window to be created should share the rendering context.
[in]pInvisibleindicates if the window is created in invisible mode.
Returns
fg_err error code

◆ fg_destroy_window()

FGAPI fg_err fg_destroy_window ( fg_window  pWindow)

Destroy Window Object.

Parameters
[in]pWindowis Window handle
Returns
fg_err error code

◆ fg_draw_chart()

FGAPI fg_err fg_draw_chart ( const fg_window  pWindow,
const fg_chart  pChart 
)

Render given chart to Window.

Parameters
[in]pWindowis Window handle
[in]pChartis chart handle
Returns
fg_err error code

◆ fg_draw_chart_to_cell()

FGAPI fg_err fg_draw_chart_to_cell ( const fg_window  pWindow,
int  pRowId,
int  pColId,
const fg_chart  pChart,
const char *  pTitle 
)

Render given chart to Window's particular sub-view.

Parameters
[in]pWindowis Window handle
[in]pColIdis the column identifier of sub-view where image is to be rendered
[in]pRowIdis the row identifier of sub-view where image is to be rendered
[in]pChartis chart handle
[in]pTitleis the title of the sub-view
Returns
fg_err error code

◆ fg_draw_image()

FGAPI fg_err fg_draw_image ( const fg_window  pWindow,
const fg_image  pImage,
const bool  pKeepAspectRatio 
)

Render given image to Window.

Parameters
[in]pWindowis Window handle
[in]pImageis Image handle
[in]pKeepAspectRatiois boolean indicating if the image aspect ratio has to be maintained while rendering the image
Returns
fg_err error code

◆ fg_draw_image_to_cell()

FGAPI fg_err fg_draw_image_to_cell ( const fg_window  pWindow,
int  pRowId,
int  pColId,
const fg_image  pImage,
const char *  pTitle,
const bool  pKeepAspectRatio 
)

Render given image to Window's particular sub-view.

Parameters
[in]pWindowis Window handle
[in]pColIdis the column identifier of sub-view where image is to be rendered
[in]pRowIdis the row identifier of sub-view where image is to be rendered
[in]pImageis image handle
[in]pTitleis the title of the sub-view
[in]pKeepAspectRatiois boolean indicating if the image aspect ratio has to be maintained while rendering the image
Returns
fg_err error code

◆ fg_get_window_context_handle()

FGAPI fg_err fg_get_window_context_handle ( long long *  pContext,
const fg_window  pWindow 
)

Get the backend specific context handle of Window.

Parameters
[out]pContextis set to the backend specific context handle
[in]pWindowis Window handle
Returns
fg_err error code

◆ fg_get_window_display_handle()

FGAPI fg_err fg_get_window_display_handle ( long long *  pDisplay,
const fg_window  pWindow 
)

Get the display device handle of Window.

Parameters
[out]pDisplayis set to the display device handle
[in]pWindowis Window handle
Returns
fg_err error code

◆ fg_get_window_grid()

FGAPI fg_err fg_get_window_grid ( int *  pRows,
int *  pCols,
const fg_window  pWindow 
)

Get the window's grid size.

Parameters
[out]pRowsreturns the number of rows in the grid
[out]pColsreturns the number of columns in the grid
[in]pWindowis Window handle
Returns
fg_err error code

◆ fg_get_window_height()

FGAPI fg_err fg_get_window_height ( int *  pHeight,
const fg_window  pWindow 
)

Get the height of Window.

Parameters
[out]pHeightis set to the height of the Window
[in]pWindowis Window handle
Returns
fg_err error code

◆ fg_get_window_width()

FGAPI fg_err fg_get_window_width ( int *  pWidth,
const fg_window  pWindow 
)

Get the width of Window.

Parameters
[out]pWidthis set to the width of the Window
[in]pWindowis Window handle
Returns
fg_err error code

◆ fg_hide_window()

FGAPI fg_err fg_hide_window ( const fg_window  pWindow)

Hide the Window.

Parameters
[in]pWindowis Window handle
Returns
fg_err error code

◆ fg_make_window_current()

FGAPI fg_err fg_make_window_current ( const fg_window  pWindow)

Make the window's backend specific context the active context in given thread.

Parameters
[in]pWindowis Window handle
Returns
fg_err error code

◆ fg_save_window_framebuffer()

FGAPI fg_err fg_save_window_framebuffer ( const char *  pFullPath,
const fg_window  pWindow 
)

Save the current frame buffer to a file at provided path.

The frame buffer stored to the disk is saved in the image format based on the extension provided in the full file path string.

Parameters
[in]pFullPathis the path at which frame buffer is stored.
[in]pWindowis Window handle
Returns
fg_err error code

◆ fg_set_window_colormap()

FGAPI fg_err fg_set_window_colormap ( fg_window  pWindow,
const fg_color_map  pColorMap 
)

Set the colormap to be used by the Window Object.

Parameters
[in]pWindowis Window handle
[in]pColorMaptakes one of the values of enum fg_color_map
Returns
fg_err error code

◆ fg_set_window_font()

FGAPI fg_err fg_set_window_font ( fg_window  pWindow,
fg_font  pFont 
)

Set font object to be used by Window Object.

Parameters
[in]pWindowis Window handle
[in]pFontis Font handle
Returns
fg_err error code

◆ fg_set_window_position()

FGAPI fg_err fg_set_window_position ( fg_window  pWindow,
const int  pX,
const int  pY 
)

Set the window origin of Window Object w.r.t screen origin.

Parameters
[in]pWindowis Window handle
[in]pXis the x coordinate of window top left corner
[in]pYis the y coordinate of window top left corner
Returns
fg_err error code

◆ fg_set_window_size()

FGAPI fg_err fg_set_window_size ( fg_window  pWindow,
const unsigned  pWidth,
const unsigned  pHeight 
)

Set the window dimensions of Window Object.

Parameters
[in]pWindowis Window handle
[in]pWidthis the width of window
[in]pHeightis the height of window
Returns
fg_err error code

◆ fg_set_window_title()

FGAPI fg_err fg_set_window_title ( fg_window  pWindow,
const char *  pTitle 
)

Set the title of Window Object.

Parameters
[in]pWindowis Window handle
[in]pTitleis the window tile
Returns
fg_err error code

◆ fg_setup_window_grid()

FGAPI fg_err fg_setup_window_grid ( int  pRows,
int  pCols,
fg_window  pWindow 
)

Setup grid layout for multiple view rendering on Window.

Parameters
[in]pRowsis the number of rows in multiview mode
[in]pColsis the number of columns in multiview mode
[in]pWindowis Window handle
Returns
fg_err error code

◆ fg_show_window()

FGAPI fg_err fg_show_window ( const fg_window  pWindow)

Show the Window.

Parameters
[in]pWindowis Window handle
Returns
fg_err error code

◆ fg_swap_window_buffers()

FGAPI fg_err fg_swap_window_buffers ( const fg_window  pWindow)

Swap back buffer with front buffer.

Parameters
[in]pWindowis Window handle
Returns
fg_err error code