HdyDialerCycleButton

HdyDialerCycleButton — A button on a HdyDialer keypad cycling through available symbols

Functions

Properties

int cycle-timeout Read / Write / Construct

Signals

void cycle-end Run Last
void cycle-start Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkButton
                        ╰── HdyDialerButton
                            ╰── HdyDialerCycleButton

Implemented Interfaces

HdyDialerCycleButton implements AtkImplementorIface, GtkBuildable, GtkActionable and GtkActivatable.

Description

The HdyDialerCycleButton widget is a single button on a HdyDialer representing symbols such as digits, letters, #, + or ☃. When the button is pressed multiple times in a row, the symbols are cycled through. That is a call to get_curent_symbol returns another symbol each time the button is pressed. If no further button presses are received cycling mode ends after a timeout. This is configurable via the “cycle-timeout” property.

Functions

hdy_dialer_cycle_button_new ()

GtkWidget *
hdy_dialer_cycle_button_new (const gchar *symbols);

Create a new HdyDialerCycleButton which displays symbols . The symbols can by cycled through by pressing the button multiple times.

Parameters

symbols

the symbols displayed on the HdyDialerCycleButton

 

Returns

the newly created HdyDialerCycleButton widget


hdy_dialer_cycle_button_get_current_symbol ()

gunichar
hdy_dialer_cycle_button_get_current_symbol
                               (HdyDialerCycleButton *self);

Get the symbol the dialer should display

Parameters

Returns

a pointer to the symbol


hdy_dialer_cycle_button_is_cycling ()

gboolean
hdy_dialer_cycle_button_is_cycling (HdyDialerCycleButton *self);

Check whether the button is in cycling mode.

Parameters

Returns

TRUE if the in cycling mode otherwise FALSE


hdy_dialer_cycle_button_stop_cycle ()

void
hdy_dialer_cycle_button_stop_cycle (HdyDialerCycleButton *self);

Stop the cycling mode.

Parameters


hdy_dialer_cycle_button_get_cycle_timeout ()

gint
hdy_dialer_cycle_button_get_cycle_timeout
                               (HdyDialerCycleButton *self);

Get the cycle timeout in milliseconds.

Parameters


hdy_dialer_cycle_button_set_cycle_timeout ()

void
hdy_dialer_cycle_button_set_cycle_timeout
                               (HdyDialerCycleButton *self,
                                gint timeout);

Set the cycle timeout in milliseconds.

Parameters

self

a HdyDialerCycleButton

 

timeout

the timeout in milliseconds

 

Types and Values

HDY_TYPE_DIALER_CYCLE_BUTTON

#define HDY_TYPE_DIALER_CYCLE_BUTTON (hdy_dialer_cycle_button_get_type())

struct HdyDialerCycleButtonClass

struct HdyDialerCycleButtonClass {
  HdyDialerButtonClass parent_class;

  /* Signals */
  void (*cycle_start)   (HdyDialerCycleButton    *self);
  void (*cycle_end)     (HdyDialerCycleButton    *self);
};

Members

cycle_start ()

Class handler for the “cycle-start” signal

 

cycle_end ()

Class handler for the “cycle-end” signal

 

HdyDialerCycleButton

typedef struct _HdyDialerCycleButton HdyDialerCycleButton;

Property Details

The “cycle-timeout” property

  “cycle-timeout”            int

The timeout (in seconds) between button presses afterwhich a cycle ends.

Owner: HdyDialerCycleButton

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 1000

Signal Details

The “cycle-end” signal

void
user_function (HdyDialerCycleButton *self,
               gpointer              user_data)

This signal is emitted when the cycle ends. This can either be because of timeout or because hdy_dialer_cycle_stop_cycle got called.

Parameters

self

The HdyDialer instance.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “cycle-start” signal

void
user_function (HdyDialerCycleButton *self,
               gpointer              user_data)

This signal is emitted when the button starts cycling (that is on the first button press).

Parameters

self

The HdyDialer instance.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last