![]() |
![]() |
![]() |
libeek Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
EekKey; struct EekKeyClass; void eek_key_set_keycode (EekKey *key
,guint keycode
); guint eek_key_get_keycode (EekKey *key
); void eek_key_set_symbol_matrix (EekKey *key
,EekSymbolMatrix *matrix
); EekSymbolMatrix * eek_key_get_symbol_matrix (EekKey *key
); EekSymbol * eek_key_get_symbol (EekKey *key
); EekSymbol * eek_key_get_symbol_with_fallback (EekKey *key
,gint fallback_group
,gint fallback_level
); EekSymbol * eek_key_get_symbol_at_index (EekKey *key
,gint group
,gint level
,gint fallback_group
,gint fallback_level
); void eek_key_set_index (EekKey *key
,gint column
,gint row
); void eek_key_get_index (EekKey *key
,gint *column
,gint *row
); void eek_key_set_oref (EekKey *key
,gulong oref
); gulong eek_key_get_oref (EekKey *key
); gboolean eek_key_is_pressed (EekKey *key
); gboolean eek_key_is_locked (EekKey *key
); EekKeyPrivate;
"column" gint : Read / Write "keycode" guint : Read / Write "oref" gulong : Read / Write "row" gint : Read / Write "symbol-matrix" EekSymbolMatrix* : Read / Write
"cancelled" :Run Last
"locked" :Run First
"pressed" :Run First
"released" :Run Last
"unlocked" :Run Last
typedef struct _EekKey EekKey;
The EekKey structure contains only private data and should only be accessed using the provided API.
struct EekKeyClass { void (* set_keycode) (EekKey *self, guint keycode); guint (* get_keycode) (EekKey *self); void (* set_symbol_matrix) (EekKey *self, EekSymbolMatrix *matrix); EekSymbolMatrix *(* get_symbol_matrix) (EekKey *self); void (* set_index) (EekKey *self, gint column, gint row); void (* get_index) (EekKey *self, gint *column, gint *row); void (* set_oref) (EekKey *self, gulong oref); gulong (* get_oref) (EekKey *self); gboolean (* is_pressed) (EekKey *self); void (* pressed) (EekKey *key); void (* released) (EekKey *key); gboolean (* is_locked) (EekKey *self); void (* locked) (EekKey *key); void (* unlocked) (EekKey *key); void (* cancelled) (EekKey *key); };
virtual function for setting keycode of the key | |
virtual function for getting keycode of the key | |
virtual function for setting symbol matrix of the key | |
virtual function for getting symbol matrix of the key | |
virtual function for setting position of the key in the section | |
virtual function for getting position of the key in the section | |
virtual function for setting outline id of the key | |
virtual function for getting outline id of the key | |
virtual function for getting whether the key is pressed | |
class handler for "pressed" signal | |
class handler for "released" signal | |
virtual function for getting whether the key is locked | |
class handler for "locked" signal | |
class handler for "unlocked" signal | |
class handler for "cancelled" signal |
void eek_key_set_keycode (EekKey *key
,guint keycode
);
Set the keycode of key
to keycode
. Since typically the keycode
value is used to find a key in a keyboard by calling
eek_keyboard_find_key_by_keycode, it is not necessarily the same as
the X keycode but it should be unique in the keyboard key
belongs
to.
|
an EekKey |
|
keycode |
guint eek_key_get_keycode (EekKey *key
);
Get keycode of key
.
|
an EekKey |
Returns : |
keycode or EEK_INVALID_KEYCODE on failure |
void eek_key_set_symbol_matrix (EekKey *key
,EekSymbolMatrix *matrix
);
Set the symbol matrix of key
to matrix
.
|
an EekKey |
|
an EekSymbolMatrix |
EekSymbolMatrix * eek_key_get_symbol_matrix (EekKey *key
);
Get the symbol matrix of key
.
|
an EekKey |
Returns : |
EekSymbolMatrix or NULL . [transfer none]
|
EekSymbol * eek_key_get_symbol (EekKey *key
);
Get the current symbol of key
.
|
an EekKey |
Returns : |
the current EekSymbol or NULL on failure. [transfer none]
|
EekSymbol * eek_key_get_symbol_with_fallback (EekKey *key
,gint fallback_group
,gint fallback_level
);
Get the current symbol of key
.
|
an EekKey |
|
fallback group index |
|
fallback level index |
Returns : |
the current EekSymbol or NULL on failure. [transfer none]
|
EekSymbol * eek_key_get_symbol_at_index (EekKey *key
,gint group
,gint level
,gint fallback_group
,gint fallback_level
);
Get the symbol at (group
, level
) in the symbol matrix of key
.
|
an EekKey |
|
group index of the symbol matrix |
|
level index of the symbol matrix |
|
fallback group index |
|
fallback level index |
Returns : |
an EekSymbol at (group , level ), or NULL . [transfer none]
|
void eek_key_set_index (EekKey *key
,gint column
,gint row
);
Set the location of key
in EekSection with column
and row
.
|
an EekKey |
|
column index of key in EekSection
|
|
row index of key in EekSection
|
void eek_key_get_index (EekKey *key
,gint *column
,gint *row
);
Get the location of key
in EekSection.
|
an EekKey |
|
pointer where the column index of key in EekSection will be stored |
|
pointer where the row index of key in EekSection will be stored |
void eek_key_set_oref (EekKey *key
,gulong oref
);
Set the outline id of key
to oref
.
|
an EekKey |
|
outline id of key
|
gulong eek_key_get_oref (EekKey *key
);
Get the outline id of key
.
|
an EekKey |
Returns : |
a non-zero unsigned integer on success, 0 if the id is not set |
gboolean eek_key_is_pressed (EekKey *key
);
Return TRUE
if key is marked as pressed.
|
an EekKey |
gboolean eek_key_is_locked (EekKey *key
);
Return TRUE
if key is marked as locked.
|
an EekKey |
"column"
property"column" gint : Read / Write
The column index of EekKey in the parent EekSection.
Allowed values: >= G_MAXULONG
Default value: -1
"row"
property"row" gint : Read / Write
The row index of EekKey in the parent EekSection.
Allowed values: >= G_MAXULONG
Default value: -1
"symbol-matrix"
property "symbol-matrix" EekSymbolMatrix* : Read / Write
The symbol matrix of EekKey.
"cancelled"
signalvoid user_function (EekKey *key,
gpointer user_data) : Run Last
The ::cancelled signal is emitted each time key
is shifted to
the cancelled state.
|
an EekKey |
|
user data set when the signal handler was connected. |
"locked"
signalvoid user_function (EekKey *key,
gpointer user_data) : Run First
The ::locked signal is emitted each time key
is shifted to
the locked state. The class handler runs before signal
handlers to allow signal handlers to read the status of key
with eek_key_is_locked()
.
|
an EekKey |
|
user data set when the signal handler was connected. |
"pressed"
signalvoid user_function (EekKey *key,
gpointer user_data) : Run First
The ::pressed signal is emitted each time key
is shifted to
the pressed state. The class handler runs before signal
handlers to allow signal handlers to read the status of key
with eek_key_is_pressed()
.
|
an EekKey |
|
user data set when the signal handler was connected. |
"released"
signalvoid user_function (EekKey *key,
gpointer user_data) : Run Last
The ::released signal is emitted each time key
is shifted to
the released state.
|
an EekKey |
|
user data set when the signal handler was connected. |