## PhoshKeypad

PhoshKeypad — A keypad for pin input

## Functions

GtkWidget * | phosh_keypad_new ()
void | phosh_keypad_set_entry ()
GtkEntry * | phosh_keypad_get_entry ()
void | phosh_keypad_set_start_action ()
GtkWidget * | phosh_keypad_get_start_action ()
void | phosh_keypad_set_end_action ()
GtkWidget * | phosh_keypad_get_end_action ()
void | phosh_keypad_set_shuffle ()
gboolean | phosh_keypad_get_shuffle ()
void | phosh_keypad_distribute ()

## Properties

GtkWidget * | end-action | Read / Write
GtkEntry * | entry | Read / Write
gboolean | shuffle | Read / Write
GtkWidget * | start-action | Read / Write

## Types and Values

#define | PHOSH_TYPE_KEYPAD
| PhoshKeypad

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkGrid
                        ╰── PhoshKeypad

## Implemented Interfaces

PhoshKeypad implements AtkImplementorIface, GtkBuildable and GtkOrientable.

## Description

The PhoshKeypad widget is a keypad for entering or PIN codes on e.g. a PhoshLockscreen. It can randomly distribute (shuffle) the digits.

### CSS nodes

PhoshKeypad has a single CSS node with name phosh-keypad.

## Functions

### phosh_keypad_new ()

    GtkWidget *
    phosh_keypad_new (void);

Create a new PhoshKeypad widget.

#### Returns

the newly created PhoshKeypad widget

### phosh_keypad_set_entry ()

    void
    phosh_keypad_set_entry (PhoshKeypad *self,
                            GtkEntry *entry);

Binds `entry` to `self` and blocks any input which wouldn't be possible to type with with the keypad.

#### Parameters

self | a PhoshKeypad |
entry | a GtkEntry. | [nullable]

### phosh_keypad_get_entry ()

    GtkEntry *
    phosh_keypad_get_entry (PhoshKeypad *self);

Get the connected entry. See `phosh_keypad_set_entry()` for details.

#### Parameters

self | a PhoshKeypad |

#### Returns

the set GtkEntry or `NULL` if no widget was set.

[transfer none]

### phosh_keypad_set_start_action ()

    void
    phosh_keypad_set_start_action (PhoshKeypad *self,
                                   GtkWidget *start_action);

Sets the widget for the lower left corner (or right, in RTL locales) of `self` .

#### Parameters

self | a PhoshKeypad |
start_action | the start action widget. | [nullable]

### phosh_keypad_get_start_action ()

    GtkWidget *
    phosh_keypad_get_start_action (PhoshKeypad *self);

Returns the widget for the lower left corner (or right, in RTL locales) of `self` .

#### Parameters

self | a PhoshKeypad |

#### Returns

the start action widget.

[transfer none][nullable]

### phosh_keypad_set_end_action ()

    void
    phosh_keypad_set_end_action (PhoshKeypad *self,
                                 GtkWidget *end_action);

Sets the widget for the lower right corner (or left, in RTL locales) of `self` .

#### Parameters

self | a PhoshKeypad |
end_action | the end action widget. | [nullable]

### phosh_keypad_get_end_action ()

    GtkWidget *
    phosh_keypad_get_end_action (PhoshKeypad *self);

Returns the widget for the lower right corner (or left, in RTL locales) of `self` .

#### Parameters

self | a PhoshKeypad |

#### Returns

the end action widget.

[transfer none][nullable]

### phosh_keypad_set_shuffle ()

    void
    phosh_keypad_set_shuffle (PhoshKeypad *self,
                              gboolean shuffle);

### phosh_keypad_get_shuffle ()

    gboolean
    phosh_keypad_get_shuffle (PhoshKeypad *self);

### phosh_keypad_distribute ()

    void
    phosh_keypad_distribute (PhoshKeypad *self);

Redistribute buttons on keypad. If `PhoshKeypad`:shuffle is `TRUE` buttons will be reshuffled otherwise they will be ordered.

#### Parameters

self | a PhoshKeypad |

## Types and Values

### PHOSH_TYPE_KEYPAD

    #define PHOSH_TYPE_KEYPAD (phosh_keypad_get_type ())

### PhoshKeypad

    typedef struct _PhoshKeypad PhoshKeypad;

## Property Details

### The `“end-action”` property

      “end-action”               GtkWidget *

The widget for the lower end corner of `self` .

Owner: PhoshKeypad

Flags: Read / Write

### The `“entry”` property

      “entry”                    GtkEntry *

The entry widget connected to the keypad. See `phosh_keypad_set_entry()` for details.

Owner: PhoshKeypad

Flags: Read / Write

### The `“shuffle”` property

      “shuffle”                  gboolean

Whether to shuffle digits. Setting this to `TRUE` will make the digits appear at random locations on the keypad.

Owner: PhoshKeypad

Flags: Read / Write

Default value: FALSE

### The `“start-action”` property

      “start-action”             GtkWidget *

The widget for the lower start corner of `self` .

Owner: PhoshKeypad

Flags: Read / Write