EekSection

EekSection — Base class of a section

Synopsis

                    EekSectionClass;
                    EekSectionPrivate;
                    EekSection;
void                eek_section_set_angle               (EekSection *section,
                                                         gint angle);
gint                eek_section_get_angle               (EekSection *section);
gint                eek_section_get_n_rows              (EekSection *section);
void                eek_section_add_row                 (EekSection *section,
                                                         gint num_columns,
                                                         EekOrientation orientation);
void                eek_section_get_row                 (EekSection *section,
                                                         gint index,
                                                         gint *num_columns,
                                                         EekOrientation *orientation);
EekKey *            eek_section_create_key              (EekSection *section,
                                                         gint column,
                                                         gint row);
EekKey *            eek_section_find_key_by_keycode     (EekSection *section,
                                                         guint keycode);

Description

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

Details

EekSectionClass

typedef struct {
    void    (* set_angle)           (EekSection     *self,
                                     gint            angle);
    gint    (* get_angle)           (EekSection     *self);

    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,
                                     gint            row,
                                     gint            column);

    EekKey *(* find_key_by_keycode) (EekSection     *self,
                                     guint           keycode);
} EekSectionClass;

set_angle ()

virtual function for setting rotation angle of the section

get_angle ()

virtual function for getting rotation angle of the section

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

find_key_by_keycode ()

virtual function for accessing a key in the section by keycode

EekSectionPrivate

typedef struct _EekSectionPrivate EekSectionPrivate;

EekSection

typedef struct {
} EekSection;

eek_section_set_angle ()

void                eek_section_set_angle               (EekSection *section,
                                                         gint angle);

Set rotation angle of section to angle.

section :

an EekSection

angle :

rotation angle

eek_section_get_angle ()

gint                eek_section_get_angle               (EekSection *section);

Get rotation angle of section.

section :

an EekSection

eek_section_get_n_rows ()

gint                eek_section_get_n_rows              (EekSection *section);

Get the number of rows in section.

section :

an EekSection

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.

section :

an EekSection

num_columns :

the number of column in the row

orientation :

EekOrientation of the row

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.

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_create_key ()

EekKey *            eek_section_create_key              (EekSection *section,
                                                         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.

section :

an EekSection

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);

Find an EekKey whose keycode is keycode.

section :

an EekSection

keycode :

a keycode

Returns :

an EekKey or NULL (if not found)

See Also

EekKey