GokButton

GokButton

Synopsis

#define             GOK_TYPE_BUTTON
#define             GOK_BUTTON_CLASS                    (k)
GType               gok_button_get_type                 (void);
GtkWidget *         gok_button_new_with_label           (const gchar *pText,
                                                         GokImagePlacementPolicy align);
gint                gok_button_enter_notify             (GtkWidget *widget,
                                                         GdkEventCrossing *event);
gint                gok_button_leave_notify             (GtkWidget *widget,
                                                         GdkEventCrossing *event);
void                gok_button_state_changed            (GtkWidget *widget,
                                                         GtkStateType state,
                                                         gpointer user_data);

Description

Details

GOK_TYPE_BUTTON

#define GOK_TYPE_BUTTON        (gok_button_get_type ())


GOK_BUTTON_CLASS()

#define GOK_BUTTON_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST (k, GOK_TYPE_BUTTON, GokButtonClass)

k :


gok_button_get_type ()

GType               gok_button_get_type                 (void);

Returns :


gok_button_new_with_label ()

GtkWidget *         gok_button_new_with_label           (const gchar *pText,
                                                         GokImagePlacementPolicy align);

Creates a new GOK button with a label.

pText :

Text string for the button's label.

align :

Returns :

A pointer to the new button, NULL if it could not be created.

gok_button_enter_notify ()

gint                gok_button_enter_notify             (GtkWidget *widget,
                                                         GdkEventCrossing *event);

This handler is called whenever a widget on the keyboard is entered.

widget :

Pointer to the widget that has just been entered.

event :

Not sure?

Returns :

TRUE if the given widget is associated with a GOK key, FALSE if the given button is not associated with a GOK key.

gok_button_leave_notify ()

gint                gok_button_leave_notify             (GtkWidget *widget,
                                                         GdkEventCrossing *event);

This handler is called whenever a widget on the keyboard has been left.

widget :

Pointer to the widget that has just been left.

event :

Not sure?

Returns :

TRUE if the given widget is associated with a GOK key, FALSE if the given button is not associated with a GOK key.

gok_button_state_changed ()

void                gok_button_state_changed            (GtkWidget *widget,
                                                         GtkStateType state,
                                                         gpointer user_data);

This is called each time the button state is changed. We handle this call and make sure the button is set to the state we want.

widget :

The button that has just changed state.

state :

State requested (not necessarily the state we set it).

user_data :

Any user data associated with the widget (ignored by us).