libgaminggear
Data Structures | Macros | Typedefs | Enumerations | Functions
gfx.h File Reference

Data Structures

struct  GfxPosition
 

Macros

#define GFX_SYMBOL_INITIALIZE   "gfx_initialize"
 
#define GFX_SYMBOL_RELEASE   "gfx_release"
 
#define GFX_SYMBOL_GET_NUM_DEVICES   "gfx_get_num_devices"
 
#define GFX_SYMBOL_GET_DEVICE_DESCRIPTION   "gfx_get_device_description"
 
#define GFX_SYMBOL_GET_NUM_LIGHTS   "gfx_get_num_lights"
 
#define GFX_SYMBOL_GET_LIGHT_DESCRIPTION   "gfx_get_light_description"
 
#define GFX_SYMBOL_GET_LIGHT_POSITION   "gfx_get_light_position"
 
#define GFX_SYMBOL_GET_LIGHT_COLOR   "gfx_get_light_color"
 
#define GFX_SYMBOL_SET_LIGHT_COLOR   "gfx_set_light_color"
 
#define GFX_SYMBOL_RESET   "gfx_reset"
 
#define GFX_SYMBOL_UPDATE   "gfx_update"
 
#define GFX_SYMBOL_LIGHT   "gfx_light"
 

Typedefs

typedef GfxResult(* GFX_INITIALIZE) (void)
 
typedef GfxResult(* GFX_RELEASE) (void)
 
typedef GfxResult(* GFX_GET_NUM_DEVICES) (unsigned int *const num_devices)
 
typedef GfxResult(* GFX_GET_DEVICE_DESCRIPTION) (unsigned int const device_index, char *const device_description, unsigned int const device_description_size, GfxDevtype *const device_type)
 
typedef GfxResult(* GFX_GET_NUM_LIGHTS) (unsigned int const device_index, unsigned int *const num_lights)
 
typedef GfxResult(* GFX_GET_LIGHT_DESCRIPTION) (unsigned int const device_index, unsigned int const light_index, char *const light_description, unsigned int const light_description_size)
 
typedef GfxResult(* GFX_GET_LIGHT_POSITION) (unsigned int const device_index, unsigned int const light_index, GfxPosition *const light_position)
 
typedef GfxResult(* GFX_GET_LIGHT_COLOR) (unsigned int const device_index, unsigned int const light_index, uint32_t *const color)
 
typedef GfxResult(* GFX_SET_LIGHT_COLOR) (unsigned int const device_index, unsigned int const light_index, uint32_t const color)
 
typedef GfxResult(* GFX_RESET) (void)
 
typedef GfxResult(* GFX_UPDATE) (void)
 
typedef GfxResult(* GFX_LIGHT) (uint32_t const location_mask, uint32_t const color)
 

Enumerations

enum  GfxResult {
  GFX_SUCCESS, GFX_FAILURE, GFX_ERROR_NODEVS, GFX_ERROR_NOLIGHTS,
  GFX_ERROR_NOINIT
}
 
enum  GfxDevtype { GFX_DEVTYPE_MOUSE, GFX_DEVTYPE_KEYBOARD }
 
enum  GfxLocation {
  GFX_LOCATION_FRONT_LOWER_LEFT = 0b000000000000000000000000001, GFX_LOCATION_FRONT_LOWER_MIDDLE = 0b000000000000000000000000010, GFX_LOCATION_FRONT_LOWER_RIGHT = 0b000000000000000000000000100, GFX_LOCATION_FRONT_MIDDLE_LEFT = 0b000000000000000000000001000,
  GFX_LOCATION_FRONT_MIDDLE_MIDDLE = 0b000000000000000000000010000, GFX_LOCATION_FRONT_MIDDLE_RIGHT = 0b000000000000000000000100000, GFX_LOCATION_FRONT_UPPER_LEFT = 0b000000000000000000001000000, GFX_LOCATION_FRONT_UPPER_MIDDLE = 0b000000000000000000010000000,
  GFX_LOCATION_FRONT_UPPER_RIGHT = 0b000000000000000000100000000, GFX_LOCATION_MIDDLE_LOWER_LEFT = 0b000000000000000001000000000, GFX_LOCATION_MIDDLE_LOWER_MIDDLE = 0b000000000000000010000000000, GFX_LOCATION_MIDDLE_LOWER_RIGHT = 0b000000000000000100000000000,
  GFX_LOCATION_MIDDLE_MIDDLE_LEFT = 0b000000000000001000000000000, GFX_LOCATION_MIDDLE_MIDDLE_MIDDLE = 0b000000000000010000000000000, GFX_LOCATION_MIDDLE_MIDDLE_RIGHT = 0b000000000000100000000000000, GFX_LOCATION_MIDDLE_UPPER_LEFT = 0b000000000001000000000000000,
  GFX_LOCATION_MIDDLE_UPPER_MIDDLE = 0b000000000010000000000000000, GFX_LOCATION_MIDDLE_UPPER_RIGHT = 0b000000000100000000000000000, GFX_LOCATION_REAR_LOWER_LEFT = 0b000000001000000000000000000, GFX_LOCATION_REAR_LOWER_MIDDLE = 0b000000010000000000000000000,
  GFX_LOCATION_REAR_LOWER_RIGHT = 0b000000100000000000000000000, GFX_LOCATION_REAR_MIDDLE_LEFT = 0b000001000000000000000000000, GFX_LOCATION_REAR_MIDDLE_MIDDLE = 0b000010000000000000000000000, GFX_LOCATION_REAR_MIDDLE_RIGHT = 0b000100000000000000000000000,
  GFX_LOCATION_REAR_UPPER_LEFT = 0b001000000000000000000000000, GFX_LOCATION_REAR_UPPER_MIDDLE = 0b010000000000000000000000000, GFX_LOCATION_REAR_UPPER_RIGHT = 0b100000000000000000000000000, GFX_LOCATION_ALL_LEFT = 0b001001001001001001001001001,
  GFX_LOCATION_ALL_RIGHT = 0b100100100100100100100100100, GFX_LOCATION_ALL_LOWER = 0b000000111000000111000000111, GFX_LOCATION_ALL_UPPER = 0b111000000111000000111000000, GFX_LOCATION_ALL_FRONT = 0b000000000000000000111111111,
  GFX_LOCATION_ALL_REAR = 0b111111111000000000000000000, GFX_LOCATION_ALL = 0b111111111111111111111111111
}
 

Functions

static void gfx_color_set_brightness (uint32_t *const color, uint8_t const brightness)
 
static void gfx_color_set_red (uint32_t *const color, uint8_t const red)
 
static void gfx_color_set_green (uint32_t *const color, uint8_t const green)
 
static void gfx_color_set_blue (uint32_t *const color, uint8_t const blue)
 
static uint8_t gfx_color_get_brightness_raw (uint32_t const color)
 
static uint8_t gfx_color_get_red_raw (uint32_t const color)
 
static uint8_t gfx_color_get_green_raw (uint32_t const color)
 
static uint8_t gfx_color_get_blue_raw (uint32_t const color)
 
static uint8_t gfx_color_get_red (uint32_t const color)
 
static uint8_t gfx_color_get_green (uint32_t const color)
 
static uint8_t gfx_color_get_blue (uint32_t const color)
 
GfxResult gfx_initialize (void)
 
GfxResult gfx_release (void)
 
GfxResult gfx_get_num_devices (unsigned int *const num_devices)
 
GfxResult gfx_get_device_description (unsigned int const device_index, char *const device_description, unsigned int const device_description_size, GfxDevtype *const device_type)
 
GfxResult gfx_get_num_lights (unsigned int const device_index, unsigned int *const num_lights)
 
GfxResult gfx_get_light_description (unsigned int const device_index, unsigned int const light_index, char *const light_description, unsigned int const light_description_size)
 
GfxResult gfx_get_light_position (unsigned int const device_index, unsigned int const light_index, GfxPosition *const light_position)
 
GfxResult gfx_get_light_color (unsigned int const device_index, unsigned int const light_index, uint32_t *const color)
 
GfxResult gfx_set_light_color (unsigned int const device_index, unsigned int const light_index, uint32_t const color)
 
GfxResult gfx_reset (void)
 
GfxResult gfx_update (void)
 
GfxResult gfx_light (uint32_t const location_mask, uint32_t const color)
 

Macro Definition Documentation

◆ GFX_SYMBOL_GET_DEVICE_DESCRIPTION

#define GFX_SYMBOL_GET_DEVICE_DESCRIPTION   "gfx_get_device_description"

◆ GFX_SYMBOL_GET_LIGHT_COLOR

#define GFX_SYMBOL_GET_LIGHT_COLOR   "gfx_get_light_color"

◆ GFX_SYMBOL_GET_LIGHT_DESCRIPTION

#define GFX_SYMBOL_GET_LIGHT_DESCRIPTION   "gfx_get_light_description"

◆ GFX_SYMBOL_GET_LIGHT_POSITION

#define GFX_SYMBOL_GET_LIGHT_POSITION   "gfx_get_light_position"

◆ GFX_SYMBOL_GET_NUM_DEVICES

#define GFX_SYMBOL_GET_NUM_DEVICES   "gfx_get_num_devices"

◆ GFX_SYMBOL_GET_NUM_LIGHTS

#define GFX_SYMBOL_GET_NUM_LIGHTS   "gfx_get_num_lights"

◆ GFX_SYMBOL_INITIALIZE

#define GFX_SYMBOL_INITIALIZE   "gfx_initialize"

◆ GFX_SYMBOL_LIGHT

#define GFX_SYMBOL_LIGHT   "gfx_light"

◆ GFX_SYMBOL_RELEASE

#define GFX_SYMBOL_RELEASE   "gfx_release"

◆ GFX_SYMBOL_RESET

#define GFX_SYMBOL_RESET   "gfx_reset"

◆ GFX_SYMBOL_SET_LIGHT_COLOR

#define GFX_SYMBOL_SET_LIGHT_COLOR   "gfx_set_light_color"

◆ GFX_SYMBOL_UPDATE

#define GFX_SYMBOL_UPDATE   "gfx_update"

Typedef Documentation

◆ GFX_GET_DEVICE_DESCRIPTION

typedef GfxResult(* GFX_GET_DEVICE_DESCRIPTION) (unsigned int const device_index, char *const device_description, unsigned int const device_description_size, GfxDevtype *const device_type)

◆ GFX_GET_LIGHT_COLOR

typedef GfxResult(* GFX_GET_LIGHT_COLOR) (unsigned int const device_index, unsigned int const light_index, uint32_t *const color)

◆ GFX_GET_LIGHT_DESCRIPTION

typedef GfxResult(* GFX_GET_LIGHT_DESCRIPTION) (unsigned int const device_index, unsigned int const light_index, char *const light_description, unsigned int const light_description_size)

◆ GFX_GET_LIGHT_POSITION

typedef GfxResult(* GFX_GET_LIGHT_POSITION) (unsigned int const device_index, unsigned int const light_index, GfxPosition *const light_position)

◆ GFX_GET_NUM_DEVICES

typedef GfxResult(* GFX_GET_NUM_DEVICES) (unsigned int *const num_devices)

◆ GFX_GET_NUM_LIGHTS

typedef GfxResult(* GFX_GET_NUM_LIGHTS) (unsigned int const device_index, unsigned int *const num_lights)

◆ GFX_INITIALIZE

typedef GfxResult(* GFX_INITIALIZE) (void)

◆ GFX_LIGHT

typedef GfxResult(* GFX_LIGHT) (uint32_t const location_mask, uint32_t const color)

◆ GFX_RELEASE

typedef GfxResult(* GFX_RELEASE) (void)

◆ GFX_RESET

typedef GfxResult(* GFX_RESET) (void)

◆ GFX_SET_LIGHT_COLOR

typedef GfxResult(* GFX_SET_LIGHT_COLOR) (unsigned int const device_index, unsigned int const light_index, uint32_t const color)

◆ GFX_UPDATE

typedef GfxResult(* GFX_UPDATE) (void)

Enumeration Type Documentation

◆ GfxDevtype

enum GfxDevtype
Enumerator
GFX_DEVTYPE_MOUSE 
GFX_DEVTYPE_KEYBOARD 

◆ GfxLocation

Enumerator
GFX_LOCATION_FRONT_LOWER_LEFT 
GFX_LOCATION_FRONT_LOWER_MIDDLE 
GFX_LOCATION_FRONT_LOWER_RIGHT 
GFX_LOCATION_FRONT_MIDDLE_LEFT 
GFX_LOCATION_FRONT_MIDDLE_MIDDLE 
GFX_LOCATION_FRONT_MIDDLE_RIGHT 
GFX_LOCATION_FRONT_UPPER_LEFT 
GFX_LOCATION_FRONT_UPPER_MIDDLE 
GFX_LOCATION_FRONT_UPPER_RIGHT 
GFX_LOCATION_MIDDLE_LOWER_LEFT 
GFX_LOCATION_MIDDLE_LOWER_MIDDLE 
GFX_LOCATION_MIDDLE_LOWER_RIGHT 
GFX_LOCATION_MIDDLE_MIDDLE_LEFT 
GFX_LOCATION_MIDDLE_MIDDLE_MIDDLE 
GFX_LOCATION_MIDDLE_MIDDLE_RIGHT 
GFX_LOCATION_MIDDLE_UPPER_LEFT 
GFX_LOCATION_MIDDLE_UPPER_MIDDLE 
GFX_LOCATION_MIDDLE_UPPER_RIGHT 
GFX_LOCATION_REAR_LOWER_LEFT 
GFX_LOCATION_REAR_LOWER_MIDDLE 
GFX_LOCATION_REAR_LOWER_RIGHT 
GFX_LOCATION_REAR_MIDDLE_LEFT 
GFX_LOCATION_REAR_MIDDLE_MIDDLE 
GFX_LOCATION_REAR_MIDDLE_RIGHT 
GFX_LOCATION_REAR_UPPER_LEFT 
GFX_LOCATION_REAR_UPPER_MIDDLE 
GFX_LOCATION_REAR_UPPER_RIGHT 
GFX_LOCATION_ALL_LEFT 
GFX_LOCATION_ALL_RIGHT 
GFX_LOCATION_ALL_LOWER 
GFX_LOCATION_ALL_UPPER 
GFX_LOCATION_ALL_FRONT 
GFX_LOCATION_ALL_REAR 
GFX_LOCATION_ALL 

◆ GfxResult

enum GfxResult
Enumerator
GFX_SUCCESS 
GFX_FAILURE 
GFX_ERROR_NODEVS 
GFX_ERROR_NOLIGHTS 
GFX_ERROR_NOINIT 

Function Documentation

◆ gfx_color_get_blue()

static uint8_t gfx_color_get_blue ( uint32_t const  color)
inlinestatic

◆ gfx_color_get_blue_raw()

static uint8_t gfx_color_get_blue_raw ( uint32_t const  color)
inlinestatic

◆ gfx_color_get_brightness_raw()

static uint8_t gfx_color_get_brightness_raw ( uint32_t const  color)
inlinestatic

◆ gfx_color_get_green()

static uint8_t gfx_color_get_green ( uint32_t const  color)
inlinestatic

◆ gfx_color_get_green_raw()

static uint8_t gfx_color_get_green_raw ( uint32_t const  color)
inlinestatic

◆ gfx_color_get_red()

static uint8_t gfx_color_get_red ( uint32_t const  color)
inlinestatic

◆ gfx_color_get_red_raw()

static uint8_t gfx_color_get_red_raw ( uint32_t const  color)
inlinestatic

◆ gfx_color_set_blue()

static void gfx_color_set_blue ( uint32_t *const  color,
uint8_t const  blue 
)
inlinestatic

◆ gfx_color_set_brightness()

static void gfx_color_set_brightness ( uint32_t *const  color,
uint8_t const  brightness 
)
inlinestatic

◆ gfx_color_set_green()

static void gfx_color_set_green ( uint32_t *const  color,
uint8_t const  green 
)
inlinestatic

◆ gfx_color_set_red()

static void gfx_color_set_red ( uint32_t *const  color,
uint8_t const  red 
)
inlinestatic

◆ gfx_get_device_description()

GfxResult gfx_get_device_description ( unsigned int const  device_index,
char *const  device_description,
unsigned int const  device_description_size,
GfxDevtype *const  device_type 
)

◆ gfx_get_light_color()

GfxResult gfx_get_light_color ( unsigned int const  device_index,
unsigned int const  light_index,
uint32_t *const  color 
)

◆ gfx_get_light_description()

GfxResult gfx_get_light_description ( unsigned int const  device_index,
unsigned int const  light_index,
char *const  light_description,
unsigned int const  light_description_size 
)

◆ gfx_get_light_position()

GfxResult gfx_get_light_position ( unsigned int const  device_index,
unsigned int const  light_index,
GfxPosition *const  light_position 
)

◆ gfx_get_num_devices()

GfxResult gfx_get_num_devices ( unsigned int *const  num_devices)

◆ gfx_get_num_lights()

GfxResult gfx_get_num_lights ( unsigned int const  device_index,
unsigned int *const  num_lights 
)

◆ gfx_initialize()

GfxResult gfx_initialize ( void  )

◆ gfx_light()

GfxResult gfx_light ( uint32_t const  location_mask,
uint32_t const  color 
)

◆ gfx_release()

GfxResult gfx_release ( void  )

◆ gfx_reset()

GfxResult gfx_reset ( void  )

◆ gfx_set_light_color()

GfxResult gfx_set_light_color ( unsigned int const  device_index,
unsigned int const  light_index,
uint32_t const  color 
)

◆ gfx_update()

GfxResult gfx_update ( void  )