HdyArrows

HdyArrows — Arrows indicating a swipe direction

Functions

Properties

guint count Read / Write
HdyArrowsDirection direction Read / Write
guint duration Read / Write

Types and Values

Object Hierarchy

    GEnum
    ╰── HdyArrowsDirection
    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkDrawingArea
                ╰── HdyArrows

Implemented Interfaces

HdyArrows implements AtkImplementorIface and GtkBuildable.

Description

The HdyArrows widget displays arrows indicating a swiping direction. An animation is run when the widget is mapped or then hdy_arrows_animate() is invoked.

Functions

hdy_arrows_new ()

GtkWidget *
hdy_arrows_new (void);

Create a new HdyArrows widget.

Returns

the newly created HdyArrows widget


hdy_arrows_get_count ()

guint
hdy_arrows_get_count (HdyArrows *self);

Get the number of arrows displayed in the widget.

Parameters

self

a HdyArrows

 

Returns

the current number of arrows


hdy_arrows_set_count ()

void
hdy_arrows_set_count (HdyArrows *self,
                      guint count);

Set the number of arrows to display.

Parameters

self

a HdyArrows

 

count

the number of arrows to display

 

hdy_arrows_set_direction ()

void
hdy_arrows_set_direction (HdyArrows *self,
                          HdyArrowsDirection direction);

Set the direction the arrows should point to.

Parameters

self

a HdyArrows

 

direction

the arrows direction

 

hdy_arrows_get_direction ()

HdyArrowsDirection
hdy_arrows_get_direction (HdyArrows *self);

Get the direction the arrows point to

Parameters

self

a HdyArrows

 

Returns

the arrows direction


hdy_arrows_set_duration ()

void
hdy_arrows_set_duration (HdyArrows *self,
                         guint duration);

Set the duration of the arrow animation.

Parameters

self

a HdyArrows

 

duration

the duration of the animation in ms

 

hdy_arrows_get_duration ()

guint
hdy_arrows_get_duration (HdyArrows *self);

Get the duration of the arrows animation.

Parameters

self

a HdyArrows

 

Returns

the duration of the animation in ms


hdy_arrows_animate ()

void
hdy_arrows_animate (HdyArrows *self);

Render the arrows animation.

Parameters

self

a HdyArrows

 

Types and Values

enum HdyArrowsDirection

Members

HDY_ARROWS_DIRECTION_UP

Arrows point upwards

 

HDY_ARROWS_DIRECTION_DOWN

Arrows point to the left

 

HDY_ARROWS_DIRECTION_LEFT

Arrows point to the right

 

HDY_ARROWS_DIRECTION_RIGHT

Arrows point downwards

 

HDY_TYPE_ARROWS

#define HDY_TYPE_ARROWS (hdy_arrows_get_type())

struct HdyArrowsClass

struct HdyArrowsClass {
  GtkDrawingAreaClass parent_class;
};

Members


HdyArrows

typedef struct _HdyArrows HdyArrows;

Property Details

The “count” property

  “count”                    guint

Number of arrows to display.

Flags: Read / Write

Allowed values: >= 1

Default value: 1


The “direction” property

  “direction”                HdyArrowsDirection

Direction the arrows should point to.

Flags: Read / Write

Default value: HDY_ARROWS_DIRECTION_UP


The “duration” property

  “duration”                 guint

The duration of the arrow animation in milliseconds.

Flags: Read / Write

Default value: 1000