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

Framebuffer object interface. More...

#include <terminals.h>

Inheritance diagram for gate_terminal_t:
gate_console_t gate_resourcestream_t gate_stream_t gate_object_t

Public Member Functions

gate_enumint_t get_type (void)
 Returns the type of the terminal interface.
gate_result_t get_size (gate_uint16_t *ptr_width, gate_uint16_t *ptr_height)
 Returns the dimension sizes (width, height) of the console buffer.
gate_result_t get_cursor_pos (gate_uint16_t *ptr_x, gate_uint16_t *ptr_y)
 Returns the position of the cursor inside the console screen buffer.
gate_result_t set_cursor_pos (gate_uint16_t x, gate_uint16_t y)
 Moves the console cursor to a new position.
gate_result_t set_cursor_mode (gate_uint16_t mode)
 Changes the cursor mode.
gate_result_t clear (void)
 Clears the console buffer.
gate_result_t get_text_color (gate_uint8_t *ptr_color_code)
 Returns the currently active text color.
gate_result_t set_text_color (gate_uint8_t color_code)
 Sets a new active text color.
gate_result_t get_back_color (gate_uint8_t *ptr_color_code)
 Returns the currently active background color.
gate_result_t set_back_color (gate_uint8_t color_code)
 Sets a new active background color.
Public Member Functions inherited from gate_console_t
gate_result_t await_char (gate_char32_t *ptr_char, gate_uint32_t timeout_ms)
 Awaits the availabilty of a character to be read from the input stream or until a timeout is reached.
gate_result_t read_char (gate_char32_t *ptr_char)
 Reads a single input character from the console in a given time range.
gate_result_t write_err (char const *buffer, gate_size_t bufferlength, gate_size_t *written)
 Writes the contents of the given buffer to the error ouput side of the stream.
gate_result_t flush_err ()
 Flushes the error output side of the stream.
Public Member Functions inherited from gate_resourcestream_t
gate_result_t get_resource (gate_int32_t resource_type, gate_uintptr_t *resource_handle)
 Returns a resouce handle to the requested resource type (GATE_STREAM_RESOURCE_*)
Public Member Functions inherited from gate_stream_t
gate_result_t read (char *buffer, gate_size_t bufferlength, gate_size_t *returned)
 Read bytes from stream and stores them in the given buffer.
gate_result_t peek (char *buffer, gate_size_t bufferlength, gate_size_t *returned)
 Tries to read bytes from the stream, but leaves them in its input buffer to be read again.
gate_result_t write (char const *buffer, gate_size_t bufferlength, gate_size_t *written)
 Writes bytes from the given buffer into the stream.
gate_result_t flush ()
 Instructs the stream to flush its internal buffers and make current status persistent.
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_type()

gate_enumint_t get_type ( void )

Returns the type of the terminal interface.

Returns
GATE_TERMINAL_TYPE_* value

◆ get_size()

gate_result_t get_size ( gate_uint16_t * ptr_width,
gate_uint16_t * ptr_height )

Returns the dimension sizes (width, height) of the console buffer.

Parameters
[out]ptr_widthPointer to integer to be filled with width
[out]ptr_heightPointer to integer to be filled with height
Returns
GATE_RESULT_* result value

◆ get_cursor_pos()

gate_result_t get_cursor_pos ( gate_uint16_t * ptr_x,
gate_uint16_t * ptr_y )

Returns the position of the cursor inside the console screen buffer.

Parameters
[out]ptr_xPointer to integer to be filled with x value
[out]ptr_yPointer to integer to be filled with y value
Returns
GATE_RESULT_* result value

◆ set_cursor_pos()

gate_result_t set_cursor_pos ( gate_uint16_t x,
gate_uint16_t y )

Moves the console cursor to a new position.

Parameters
[in]xNew X coordinate for cursor
[in]yNew Y coordinate for cursor
Returns
GATE_RESULT_* result value

◆ set_cursor_mode()

gate_result_t set_cursor_mode ( gate_uint16_t mode)

Changes the cursor mode.

Parameters
[in]modeNew cursor mode as GATE_TERMINAL_CURSOR_MODE_* value
Returns
GATE_RESULT_* result value

◆ clear()

gate_result_t clear ( void )

Clears the console buffer.

Returns
GATE_RESULT_* result value

◆ get_text_color()

gate_result_t get_text_color ( gate_uint8_t * ptr_color_code)

Returns the currently active text color.

Parameters
[out]ptr_color_codePointer to integer receiving the text color
Returns
GATE_RESULT_* result value

◆ set_text_color()

gate_result_t set_text_color ( gate_uint8_t color_code)

Sets a new active text color.

Parameters
[in]color_codeNew text color value
Returns
GATE_RESULT_* result value

◆ get_back_color()

gate_result_t get_back_color ( gate_uint8_t * ptr_color_code)

Returns the currently active background color.

Parameters
[out]ptr_color_codePointer to integer receiving the background color
Returns
GATE_RESULT_* result value

◆ set_back_color()

gate_result_t set_back_color ( gate_uint8_t color_code)

Sets a new active background color.

Parameters
[in]color_modeNew background color value
Returns
GATE_RESULT_* result value

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