GATE
C/C++ Framework
Loading...
Searching...
No Matches
gate_framebuffer_t Interface Reference

Framebuffer object interface. More...

#include <framebuffers.h>

Inheritance diagram for gate_framebuffer_t:
gate_object_t

Public Member Functions

gate_result_t get_info (gate_framebuffer_info_t *ptr_info)
 Returns frame and image parameters of the covered framebuffer resource.
gate_result_t get_property (gate_string_t const *name, gate_property_t *prop)
 Returns a generic property value from the framebuffer address by its string name.
gate_result_t set_property (gate_string_t const *name, gate_property_t const *prop)
 Sets a generatic property of the framebuffer to a new value.
gate_result_t update (void)
 Updates the framebuffer image resources (e.g. synchronize internal with external buffers)
gate_result_t get_pixel (gate_uint32_t x, gate_uint32_t y, gate_color_t *ptr_col)
 Reads a single pixel from the framebuffer's image.
gate_result_t set_pixel (gate_uint32_t x, gate_uint32_t y, gate_color_t col)
 Writes a single pixel to the framebuffer's image.
gate_result_t get_image (gate_uint32_t src_x, gate_uint32_t src_y, gate_uint32_t width, gate_uint32_t height, gate_rasterimage_t *ptr_image)
 Extract an image from the current frame buffer image.
gate_result_t set_image (gate_rasterimage_t const *ptr_image, gate_uint32_t dest_x, gate_uint32_t dest_y)
 Paints the contents of a raster image on a framebuffer's current image.
gate_result_t await_event (gate_uint32_t timeout_ms, gate_framebuffer_event_t *ptr_received_evt)
 Waits for a event from the framebuffer's sources (like user input)
Public Member Functions inherited from gate_object_t
char const * get_interface_name ()
 Returns on object's interface path name.
void release ()
 Decrease object's reference counter, releases the object when count reaches zero.
int retain ()
 Increase object's reference counter.

Detailed Description

Framebuffer object interface.

Member Function Documentation

◆ get_info()

gate_result_t get_info ( gate_framebuffer_info_t * ptr_info)

Returns frame and image parameters of the covered framebuffer resource.

Parameters
[out]ptr_infoPointer to info structure filled with requested informations
Returns
GATE_RESULT_* result code

◆ get_property()

gate_result_t get_property ( gate_string_t const * name,
gate_property_t * prop )

Returns a generic property value from the framebuffer address by its string name.

Parameters
[in]nameName of property to access
[out]propPointer to property to be initialized with requested value
Returns
GATE_RESULT_* result code

◆ set_property()

gate_result_t set_property ( gate_string_t const * name,
gate_property_t const * prop )

Sets a generatic property of the framebuffer to a new value.

Parameters
[in]nameName of property to update
[out]propPointer to property to be copied into the framebuffer property
Returns
GATE_RESULT_* result code

◆ update()

gate_result_t update ( void )

Updates the framebuffer image resources (e.g. synchronize internal with external buffers)

Returns
GATE_RESULT_* result code

◆ get_pixel()

gate_result_t get_pixel ( gate_uint32_t x,
gate_uint32_t y,
gate_color_t * ptr_col )

Reads a single pixel from the framebuffer's image.

Parameters
[in]xX coordinate of pixel in image
[in]yY coordinate of pixel in image
[out]ptr_colPointer to pixel
Returns
GATE_RESULT_* result code

◆ set_pixel()

gate_result_t set_pixel ( gate_uint32_t x,
gate_uint32_t y,
gate_color_t col )

Writes a single pixel to the framebuffer's image.

Parameters
[in]xX coordinate of pixel in iamge to write
[in]yY coordinate on pixel in image to write
[in]colPixel color to be written into image
Returns
GATE_RESULT_* result code

◆ get_image()

gate_result_t get_image ( gate_uint32_t src_x,
gate_uint32_t src_y,
gate_uint32_t width,
gate_uint32_t height,
gate_rasterimage_t * ptr_image )

Extract an image from the current frame buffer image.

Parameters
[in]src_xX coordinate of top-left corner in framebuffer where image extraction starts
[in]src_yY coordinate of top-left corner in framebuffer where image extraction starts
[in]widthwidth of image to extracted
[in]heightheight of image to extract
[out]ptr_imagepointer to raster image to be initialized with new extracted image
Returns
GATE_RESULT_* result code

◆ set_image()

gate_result_t set_image ( gate_rasterimage_t const * ptr_image,
gate_uint32_t dest_x,
gate_uint32_t dest_y )

Paints the contents of a raster image on a framebuffer's current image.

Parameters
[in]ptr_imagePointer to raster image to be painted onto framebuffer
[in]xX coordinate inside framebuffer to start painting
[in]yY coordinate inside framebuffer to start painting
Returns
GATE_RESULT_* result code

◆ await_event()

gate_result_t await_event ( gate_uint32_t timeout_ms,
gate_framebuffer_event_t * ptr_received_evt )

Waits for a event from the framebuffer's sources (like user input)

Parameters
[in]timeout_msMaximum timeout in milliseconds to wait for an event
[out]ptr_received_evtPointer to event structure to be initialized with event data
Returns
GATE_RESULT_* result code, GATE_RESULT_TIMEOUT indicates no event has occurred within timeout range

The documentation for this interface was generated from the following file: