libgaminggear
Data Structures | Macros | Typedefs | Functions
gaminggear_profile_table.h File Reference

GaminggearProfileTable. More...

Data Structures

struct  _GaminggearProfileTable
 

Macros

#define GAMINGGEAR_PROFILE_TABLE_TYPE   (gaminggear_profile_table_get_type())
 
#define GAMINGGEAR_PROFILE_TABLE(obj)   (G_TYPE_CHECK_INSTANCE_CAST((obj), GAMINGGEAR_PROFILE_TABLE_TYPE, GaminggearProfileTable))
 
#define IS_GAMINGGEAR_PROFILE_TABLE(obj)   (G_TYPE_CHECK_INSTANCE_TYPE((obj), GAMINGGEAR_PROFILE_TABLE_TYPE))
 

Typedefs

typedef struct _GaminggearProfileTable GaminggearProfileTable
 
typedef struct _GaminggearProfileTablePrivate GaminggearProfileTablePrivate
 

Functions

GType gaminggear_profile_table_get_type (void)
 
GtkWidget * gaminggear_profile_table_new (GType type, gchar const *path, guint profile_num)
 Create new profile table. More...
 
void gaminggear_profile_table_add_profile (GaminggearProfileTable *table)
 Add profile. More...
 
gboolean gaminggear_profile_table_load (GaminggearProfileTable *table, GError **error)
 Load filesystem profile_data. More...
 
gboolean gaminggear_profile_table_fill (GaminggearProfileTable *table, GaminggearDevice *device, guint count, GError **error)
 Fill profile data list with missing hardware profiles. More...
 
gboolean gaminggear_profile_table_read (GaminggearProfileTable *table, GaminggearDevice *device, GError **error)
 Read hardware profile_data. More...
 
gboolean gaminggear_profile_table_store (GaminggearProfileTable *table, GaminggearDevice *device, GError **error)
 Saves and writes all profile datas. More...
 
gboolean gaminggear_profile_table_get_modified (GaminggearProfileTable *table)
 Get modified state. More...
 
const gchar * gaminggear_profile_table_get_default_profile_name (GaminggearProfileTable *table)
 Get name of default profile. More...
 
void gaminggear_profile_table_set_default_profile_name (GaminggearProfileTable *table, gchar const *name)
 Set default profile. More...
 

Detailed Description

GaminggearProfileTable.

Macro Definition Documentation

◆ GAMINGGEAR_PROFILE_TABLE

#define GAMINGGEAR_PROFILE_TABLE (   obj)    (G_TYPE_CHECK_INSTANCE_CAST((obj), GAMINGGEAR_PROFILE_TABLE_TYPE, GaminggearProfileTable))

◆ GAMINGGEAR_PROFILE_TABLE_TYPE

#define GAMINGGEAR_PROFILE_TABLE_TYPE   (gaminggear_profile_table_get_type())

◆ IS_GAMINGGEAR_PROFILE_TABLE

#define IS_GAMINGGEAR_PROFILE_TABLE (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE((obj), GAMINGGEAR_PROFILE_TABLE_TYPE))

Typedef Documentation

◆ GaminggearProfileTable

◆ GaminggearProfileTablePrivate

typedef struct _GaminggearProfileTablePrivate GaminggearProfileTablePrivate

Function Documentation

◆ gaminggear_profile_table_add_profile()

void gaminggear_profile_table_add_profile ( GaminggearProfileTable table)

Add profile.

Adds new profile_data with default values.

Parameters
tableInstance.
Since
1.0

◆ gaminggear_profile_table_fill()

gboolean gaminggear_profile_table_fill ( GaminggearProfileTable table,
GaminggearDevice device,
guint  count,
GError **  error 
)

Fill profile data list with missing hardware profiles.

Filesystem data has to be read before hardware data since it contains the hardware profile index.

Only reads the missing profiles from hardware.

Parameters
tableInstance.
deviceDevice to read from or NULL.
countNumber of profiles to fill.
errorLocation to return an error.
Return values
boolTRUE if successful, else FALSE.
Since
1.0

◆ gaminggear_profile_table_get_default_profile_name()

const gchar* gaminggear_profile_table_get_default_profile_name ( GaminggearProfileTable table)

Get name of default profile.

Parameters
tableInstance.
Return values
stringwhich shouldn't be freed or NULL if no default profile is selected.
Since
1.0

◆ gaminggear_profile_table_get_modified()

gboolean gaminggear_profile_table_get_modified ( GaminggearProfileTable table)

Get modified state.

Returns TRUE if any profile data has been modified.

Parameters
tableInstance.
Return values
boolTRUE if modified, else FALSE.
Since
1.0

◆ gaminggear_profile_table_get_type()

GType gaminggear_profile_table_get_type ( void  )

◆ gaminggear_profile_table_load()

gboolean gaminggear_profile_table_load ( GaminggearProfileTable table,
GError **  error 
)

Load filesystem profile_data.

Filesystem data has to be read before hardware data since it contains the hardware profile index.

Parameters
tableInstance.
errorLocation to return an error.
Return values
boolTRUE if successful, else FALSE.
Since
1.0

◆ gaminggear_profile_table_new()

GtkWidget* gaminggear_profile_table_new ( GType  type,
gchar const *  path,
guint  profile_num 
)

Create new profile table.

Parameters
typeType of profile_data to handle.
pathPath to load files from.
profile_numMaximum count of profiles the device can handle.
Return values
newprofile table.
Since
1.0

◆ gaminggear_profile_table_read()

gboolean gaminggear_profile_table_read ( GaminggearProfileTable table,
GaminggearDevice device,
GError **  error 
)

Read hardware profile_data.

Filesystem data has to be read before hardware data since it contains the hardware profile index.

Parameters
tableInstance.
deviceDevice to read from or NULL.
errorLocation to return an error.
Return values
boolTRUE if successful, else FALSE.
Since
1.0

◆ gaminggear_profile_table_set_default_profile_name()

void gaminggear_profile_table_set_default_profile_name ( GaminggearProfileTable table,
gchar const *  name 
)

Set default profile.

If no profile with the given name exists, no profile is selected as default profile. If more than one profile with the same name exists, one is randomly selected.

Parameters
tableInstance.
nameof the profile to select.
Since
1.0

◆ gaminggear_profile_table_store()

gboolean gaminggear_profile_table_store ( GaminggearProfileTable table,
GaminggearDevice device,
GError **  error 
)

Saves and writes all profile datas.

Parameters
tableInstance.
deviceDevice to write to or NULL.
errorLocation to return an error.
Return values
boolTRUE if successful, else FALSE.
Since
1.0