AgsLed

AgsLed — A led widget

Stability Level

Stable, unless otherwise indicated

Functions

Properties

guint segment-height Read / Write
guint segment-width Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── AgsLed

Includes

#include <ags/widget/ags_led.h>

Description

AgsLed is a widget visualizing a gboolean value.

Functions

ags_led_get_segment_width ()

guint
ags_led_get_segment_width (AgsLed *led);

Get segment width.

Parameters

led

the AgsLed

 

Returns

the segment width

Since: 4.0.0


ags_led_set_segment_width ()

void
ags_led_set_segment_width (AgsLed *led,
                           guint segment_width);

Set segment width.

Parameters

led

the AgsLed

 

segment_width

the segment width

 

Since: 4.0.0


ags_led_get_segment_height ()

guint
ags_led_get_segment_height (AgsLed *led);

Get segment height.

Parameters

led

the AgsLed

 

Returns

the segment height

Since: 4.0.0


ags_led_set_segment_height ()

void
ags_led_set_segment_height (AgsLed *led,
                            guint segment_height);

Set segment height.

Parameters

led

the AgsLed

 

segment_height

the segment height

 

Since: 4.0.0


ags_led_is_active ()

gboolean
ags_led_is_active (AgsLed *led);

Set led to active state.

Parameters

led

the AgsLed

 

Returns

TRUE if led active, otherwise FALSE

Since: 3.2.0


ags_led_set_active ()

void
ags_led_set_active (AgsLed *led,
                    gboolean active);

Set led active by active .

Parameters

led

the AgsLed

 

active

TRUE if active, otherwise FALSE

 

Since: 3.0.0


ags_led_new ()

AgsLed *
ags_led_new (guint segment_width,
             guint segment_height);

Create a new instance of AgsLed.

Parameters

segment_width

the width of the segment

 

segment_height

the height of the segment

 

Returns

the new AgsLed

Since: 3.0.0

Types and Values

AGS_LED_DEFAULT_SEGMENT_WIDTH

#define AGS_LED_DEFAULT_SEGMENT_WIDTH (12)

AGS_LED_DEFAULT_SEGMENT_HEIGHT

#define AGS_LED_DEFAULT_SEGMENT_HEIGHT (8)

Property Details

The “segment-height” property

  “segment-height”           guint

The led's segment height.

Owner: AgsLed

Flags: Read / Write

Allowed values: >= 1

Default value: 8

Since: 4.0.0


The “segment-width” property

  “segment-width”            guint

The led's segment width.

Owner: AgsLed

Flags: Read / Write

Allowed values: >= 1

Default value: 12

Since: 4.0.0