gok-modifier

gok-modifier

Synopsis

#define             MODIFIER_NORMAL
enum                ModifierStates;
enum                ModifierTypes;
gboolean            gok_modifier_add                    (gchar *Name);
gboolean            gok_modifier_set_pre                (gchar *Name,
                                                         GokOutput *pOutput);
gboolean            gok_modifier_set_post               (gchar *Name,
                                                         GokOutput *pOutput);
void                gok_modifier_set_type               (gchar *Name,
                                                         gint Type);
void                gok_modifier_output_pre             (void);
void                gok_modifier_output_post            (void);
void                gok_modifier_all_off                (void);
int                 gok_modifier_get_state              (gchar *pNameModifier);
int                 gok_modifier_get_type               (gchar *pNameModifier);
gboolean            gok_modifier_get_normal             (void);
void                gok_modifier_update_modifier_keys   (GokKeyboard *pKeyboard);

Description

Details

MODIFIER_NORMAL

#define MODIFIER_NORMAL ""


enum ModifierStates

typedef enum {
MODIFIER_STATE_OFF,
MODIFIER_STATE_ON,
MODIFIER_STATE_LOCKED
} ModifierStates;


enum ModifierTypes

typedef enum {
/* a normal modifier like shift or CTRL */
MODIFIER_TYPE_NORMAL,
/* a toggle type of modifier like Capslock */
MODIFIER_TYPE_TOGGLE
} ModifierTypes;


gok_modifier_add ()

gboolean            gok_modifier_add                    (gchar *Name);

Adds a modifier to the list of modifiers.

Name :

Name of the modifier.

Returns :

TRUE if the modifier was created, FALSE if not.

gok_modifier_set_pre ()

gboolean            gok_modifier_set_pre                (gchar *Name,
                                                         GokOutput *pOutput);

Sets the wrapper 'pre' output for the given modifier.

Name :

Name of the modifier.

pOutput :

Pointer to the output that will be set as the modifier wrapper 'pre'.

Returns :

TRUE if the modifier 'pre' was set, FALSE if not.

gok_modifier_set_post ()

gboolean            gok_modifier_set_post               (gchar *Name,
                                                         GokOutput *pOutput);

Sets the 'post' output for the given modifier.

Name :

Name of the modifier.

pOutput :

Pointer to the output that will be set as the modifier wrapper 'post'.

Returns :

TRUE if the modifier 'pre' was set, FALSE if not.

gok_modifier_set_type ()

void                gok_modifier_set_type               (gchar *Name,
                                                         gint Type);

Sets the 'Type' attribute for the given modifier.

Name :

Name of the modifier.

Type :

The type of the modifier.

gok_modifier_output_pre ()

void                gok_modifier_output_pre             (void);

Sends all the wrapper 'pre' outputs to the system.


gok_modifier_output_post ()

void                gok_modifier_output_post            (void);

Sends all the wrapper 'post' outputs to the system.


gok_modifier_all_off ()

void                gok_modifier_all_off                (void);

Changes the state of modifier keys to OFF, unless they are locked on.


gok_modifier_get_state ()

int                 gok_modifier_get_state              (gchar *pNameModifier);

pNameModifier :

Returns :

The state of the modifier

gok_modifier_get_type ()

int                 gok_modifier_get_type               (gchar *pNameModifier);

pNameModifier :

Returns :

The type of the modifier

gok_modifier_get_normal ()

gboolean            gok_modifier_get_normal             (void);

Returns :

TRUE if there are no modifiers on (or locked on). Returns FALSE if one or more modifiers are on (or locked on).

gok_modifier_update_modifier_keys ()

void                gok_modifier_update_modifier_keys   (GokKeyboard *pKeyboard);

Updates the indicator on all the modifier keys for the current keyboard.

pKeyboard :