EekSection

EekSection — Base class of a section

Functions

Properties

int angle Read / Write

Signals

void key-cancelled Run Last
void key-locked Run Last
void key-pressed Run Last
void key-released Run Last
void key-unlocked Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── EekElement
        ╰── EekContainer
            ╰── EekSection

Description

The EekSectionClass class represents a section, which consists of one or more keys of the EekKeyClass class.

Functions

eek_section_add_row ()

void
eek_section_add_row (EekSection *section,
                     gint num_columns,
                     EekOrientation orientation);

Add a row which has num_columns columns and whose orientation is orientation to section .

Parameters

section

an EekSection

 

num_columns

the number of column in the row

 

orientation

EekOrientation of the row

 

eek_section_create_key ()

EekKey *
eek_section_create_key (EekSection *section,
                        guint keycode,
                        gint column,
                        gint row);

Create an EekKey instance and append it to section . This function is rarely called by application but called by EekLayout implementation.

Parameters

section

an EekSection

 

keycode

a keycode

 

column

the column index of the key

 

row

the row index of the key

 

eek_section_find_key_by_keycode ()

EekKey *
eek_section_find_key_by_keycode (EekSection *section,
                                 guint keycode);

eek_section_get_angle ()

gint
eek_section_get_angle (EekSection *section);

Get rotation angle of section .

Parameters

section

an EekSection

 

eek_section_get_n_rows ()

gint
eek_section_get_n_rows (EekSection *section);

Get the number of rows in section .

Parameters

section

an EekSection

 

eek_section_get_row ()

void
eek_section_get_row (EekSection *section,
                     gint index,
                     gint *num_columns,
                     EekOrientation *orientation);

Get the information about the index -th row in section .

Parameters

section

an EekSection

 

index

the index of row

 

num_columns

pointer where the number of column in the row will be stored

 

orientation

pointer where EekOrientation of the row will be stored

 

eek_section_set_angle ()

void
eek_section_set_angle (EekSection *section,
                       gint angle);

Set rotation angle of section to angle .

Parameters

section

an EekSection

 

angle

rotation angle

 

Types and Values

EekSection

typedef struct _EekSection EekSection;

The EekSection structure contains only private data and should only be accessed using the provided API.


struct EekSectionClass

struct EekSectionClass {
    gint    (* get_n_rows)          (EekSection     *self);
    void    (* add_row)             (EekSection     *self,
                                     gint            num_columns,
                                     EekOrientation  orientation);
    void    (* get_row)             (EekSection     *self,
                                     gint            index,
                                     gint           *num_columns,
                                     EekOrientation *orientation);

    EekKey *(* create_key)          (EekSection     *self,
                                     guint           keycode,
                                     gint            row,
                                     gint            column);

    /* signals */
    void    (* key_pressed)         (EekSection     *self,
                                     EekKey         *key);
    void    (* key_released)        (EekSection     *self,
                                     EekKey         *key);
    void    (* key_locked)          (EekSection     *self,
                                     EekKey         *key);
    void    (* key_unlocked)        (EekSection     *self,
                                     EekKey         *key);
    void    (* key_cancelled)       (EekSection     *self,
                                     EekKey         *key);
};

Members

get_n_rows ()

virtual function for getting the number of rows in the section

 

add_row ()

virtual function for adding a new row to the section

 

get_row ()

virtual function for accessing a row in the section

 

create_key ()

virtual function for creating key in the section

 

key_pressed ()

class handler for “key-pressed” signal

 

key_released ()

class handler for “key-released” signal

 

key_locked ()

class handler for “key-locked” signal

 

key_unlocked ()

class handler for “key-unlocked” signal

 

key_cancelled ()

class handler for “key-cancelled” signal

 

Property Details

The “angle” property

  “angle”                    int

The rotation angle of EekSection.

Owner: EekSection

Flags: Read / Write

Allowed values: [-360,360]

Default value: 0

Signal Details

The “key-cancelled” signal

void
user_function (EekSection *section,
               EekKey     *key,
               gpointer    user_data)

The ::key-cancelled signal is emitted each time a key in section is shifted to the cancelled state.

Parameters

section

an EekSection

 

key

an EekKey

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “key-locked” signal

void
user_function (EekSection *section,
               EekKey     *key,
               gpointer    user_data)

The ::key-locked signal is emitted each time a key in section is shifted to the locked state.

Parameters

section

an EekSection

 

key

an EekKey

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “key-pressed” signal

void
user_function (EekSection *section,
               EekKey     *key,
               gpointer    user_data)

The ::key-pressed signal is emitted each time a key in section is shifted to the pressed state.

Parameters

section

an EekSection

 

key

an EekKey

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “key-released” signal

void
user_function (EekSection *section,
               EekKey     *key,
               gpointer    user_data)

The ::key-released signal is emitted each time a key in section is shifted to the released state.

Parameters

section

an EekSection

 

key

an EekKey

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “key-unlocked” signal

void
user_function (EekSection *section,
               EekKey     *key,
               gpointer    user_data)

The ::key-unlocked signal is emitted each time a key in section is shifted to the unlocked state.

Parameters

section

an EekSection

 

key

an EekKey

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

See Also

EekKey