Common parameters and error values

This chapter provides an overview of the common parameter types and the enumeration used for error reporting.

Common parameter types

The VGLite graphics API uses a naming convention scheme wherein definitions are preceded by vg_lite.

Below is the list of types and structures in the driver implementation.

Name

Typedef

Value

vg_lite_bool_t

int

A signed 32-bit integer 0: FALSE; 1: TRUE.

vg_lite_int8_t

char

A signed 8-bit integer

vg_lite_uint8_t

unsigned char

An unsigned 8-bit integer

vg_lite_int16_t

short

A signed 16-bit integer

vg_lite_uint16_t

unsigned short

An unsigned 16-bit integer

vg_lite_int32_t

int

A signed 32-bit integer

vg_lite_uint32_t

unsigned int

An unsigned 32-bit integer

vg_lite_uint64_t

unsigned long long

An unsigned 64-bit integer

vg_lite_float_t

float

A 32-bit single precision floating point number

vg_lite_double_t

double

A 64-bit double precision floating point number

vg_lite_char_t

char

A signed 8-bit integer

vg_lite_string

char*

A pointer to a character string

vg_lite_pointer

void*

A generic address pointer (void *). On 32-bit OS, it is a 32-bit address pointer. On 64-bit OS, it is a 64-bit address pointer.

vg_lite_void

void

The void type

vg_lite_color_t

vg_lite_uint32_t

A 32-bit color value
The color value specifies the color used in various functions.
The color is formed using 8-bit RGBA channels.
The red channel is in the lower 8-bit of the color value, followed by the green and blue channels.
The alpha channel is in the upper 8-bit of the color value.
For L8 target formats, the RGB color is converted to L8 by using the default ITU-R BT.709 conversion rules.

VG_LITE_S8

enum vg_lite_format_t

A signed 8-bit integer coordinate

VG_LITE_S16

enum vg_lite_format_t

A signed 16 bit integer coordinate

VG_LITE_S32

enum vg_lite_format_t

A signed 32-bit integer coordinate

VG_LITE_FP32

enum vg_lite_format_t

A 32-bit floating point coordinate

Parent topic:Common parameters and error values

Enumerations for error reporting

This section describes enumerations used for error reporting.

vg_lite_error_t enumeration

Most functions in the API include an error status via the vg_lite_error_tenumeration. API functions return the status of the command and will report VG_LITE_SUCCESS if successful with no errors. Possible error values include the values in the table below. vg_lite_error_tenumeration is used in many functions, including initialization, flush, blit, draw, gradient, and pattern functions.

vg_lite_error_t string values

Description

VG_LITE_GENERIC_IO

Cannot communicate with the kernel driver

VG_LITE_INVALID_ARGUMENT

An invalid argument was specified

VG_LITE_MULTI_THREAD_FAIL

Multi-thread/tasks fail (available from June 2020)

VG_LITE_NO_CONTEXT

No context specified

VG_LITE_NOT_SUPPORT

Function call is not supported. Hardware support is not available.

VG_LITE_OUT_OF_MEMORY

Out of memory (driver heap)

VG_LITE_OUT_OF_RESOURCES

Out of resources (OS heap)

VG_LITE_SUCCESS

Successful with no errors

VG_LITE_TIMEOUT

Timeout

VG_LITE_ALREADY_EXISTS

Object exists (available from August 2021)

VG_LITE_NOT_ALIGNED

Data alignment error (available from August 2021)

Parent topic:Enumerations for error reporting

Parent topic:Common parameters and error values