HdyDialer: Handy Reference Manual

## HdyDialer HdyDialer — A keypad for dialing numbers |

## Functions

GtkWidget * | hdy_dialer_new ()
const gchar * | hdy_dialer_get_number ()
void | hdy_dialer_set_number ()
void | hdy_dialer_clear_number ()
gboolean | hdy_dialer_get_show_action_buttons ()
void | hdy_dialer_set_show_action_buttons ()
GtkReliefStyle | hdy_dialer_get_relief ()
void | hdy_dialer_set_relief ()

## Properties

guint | column-spacing | Read / Write
gchar * | number | Read / Write
GtkReliefStyle | relief | Read / Write
guint | row-spacing | Read / Write
gboolean | show-action-buttons | Read / Write

## Signals

void | deleted | Run Last
void | submitted | Run Last
void | symbol-clicked | Run Last

## Types and Values

#define | HDY_TYPE_DIALER
struct | HdyDialerClass
| HdyDialer

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── HdyDialer

## Implemented Interfaces

HdyDialer implements AtkImplementorIface and GtkBuildable.

## Description

The HdyDialer widget is a keypad for entering numbers such as phone numbers or PIN codes.

## Functions

### hdy_dialer_new ()

    GtkWidget *
    hdy_dialer_new (void);

Create a new HdyDialer widget.

#### Returns

the newly created HdyDialer widget

### hdy_dialer_get_number ()

    const gchar *
    hdy_dialer_get_number (HdyDialer *self);

Get the currently displayed number.

#### Parameters

self | a HdyDialer |

#### Returns

the current number in the display.

[transfer none]

### hdy_dialer_set_number ()

    void
    hdy_dialer_set_number (HdyDialer *self,
                           const char *number);

Set the currently displayed number.

#### Parameters

self | a HdyDialer |
number | the number to set. | [transfer none]

### hdy_dialer_clear_number ()

    void
    hdy_dialer_clear_number (HdyDialer *self);

Set the current number to the empty string. When the number is already cleared no action is performed.

#### Parameters

self | a HdyDialer |

### hdy_dialer_get_show_action_buttons ()

    gboolean
    hdy_dialer_get_show_action_buttons (HdyDialer *self);

Get whether the submit and delete buttons are to be shown.

#### Parameters

self | a HdyDialer |

#### Returns

whether the buttons are to be shown

### hdy_dialer_set_show_action_buttons ()

    void
    hdy_dialer_set_show_action_buttons (HdyDialer *self,
                                        gboolean show);

Set whether to show the submit and delete buttons.

#### Parameters

self | a HdyDialer |
show | whether to show the buttons |

### hdy_dialer_get_relief ()

    GtkReliefStyle
    hdy_dialer_get_relief (HdyDialer *self);

Returns the current relief style of the main buttons for the given HdyDialer.

#### Parameters

self | The HdyDialer whose main buttons you want the GtkReliefStyle from |

#### Returns

The current GtkReliefStyle

### hdy_dialer_set_relief ()

    void
    hdy_dialer_set_relief (HdyDialer *self,
                           GtkReliefStyle relief);

Sets the relief style of the edges of the main buttons for the given HdyDialer widget. Two styles exist, `GTK_RELIEF_NORMAL` and `GTK_RELIEF_NONE`. The default style is, as one can guess, `GTK_RELIEF_NORMAL`.

#### Parameters

self | The HdyDialer whose main buttons you want to set relief styles of |
relief | The GtkReliefStyle as described above |

## Types and Values

### HDY_TYPE_DIALER

    #define HDY_TYPE_DIALER (hdy_dialer_get_type())

### struct HdyDialerClass

    struct HdyDialerClass {
      GtkBinClass parent_class;

      /* Signals
       */
      void (*submitted)   (HdyDialer    *self,
                           const gchar  *number);
    };

#### Members

`submitted` () | Class handler for the “submitted” signal |

### HdyDialer

    typedef struct _HdyDialer HdyDialer;

## Property Details

### The `“column-spacing”` property

      “column-spacing”           guint

The amount of space between two consecutive columns.

Flags: Read / Write

Default value: 0

### The `“number”` property

      “number”                   gchar *

The phone number to dial.

Flags: Read / Write

Default value: ""

### The `“relief”` property

      “relief”                   GtkReliefStyle

The relief style of the edges of the main buttons.

Flags: Read / Write

Default value: GTK_RELIEF_NORMAL

### The `“row-spacing”` property

      “row-spacing”              guint

The amount of space between two consecutive rows.

Flags: Read / Write

Default value: 0

### The `“show-action-buttons”` property

      “show-action-buttons”      gboolean

Whether to show the submit and delete buttons.

Flags: Read / Write

Default value: TRUE

## Signal Details

### The `“deleted”` signal

    void
    user_function (HdyDialer *self,
                   gpointer   user_data)

This signal is emitted when the dialer's 'deleted' button is clicked to delete the last symbol.

#### Parameters

self | The HdyDialer instance. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“submitted”` signal

    void
    user_function (HdyDialer *self,
                   gchar     *number,
                   gpointer   user_data)

This signal is emitted when the dialer's 'dial' button is activated. Connect to this signal to perform to get notified when the user wants to submit the dialed number.

#### Parameters

self | The HdyDialer instance. |
number | The number at the time of activation. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“symbol-clicked”` signal

    void
    user_function (HdyDialer *self,
                   gchar      button,
                   gpointer   user_data)

This signal is emitted when one of the symbol buttons (0-9, # or *) is clicked. Connect to this signal to find out which button was pressed. This doesn't take any cycling modes into account. So the button with "*" and "+" on it will always send "*". Delete and Submit buttons will not trigger this signal.

#### Parameters

self | The HdyDialer instance. |
button | The main symbol on the button that was clicked |
user_data | user data set when the signal handler was connected. |

Flags: Run Last