MxGtkLightSwitch

MxGtkLightSwitch — a toggle switch between two states

Functions

Properties

gboolean active Read / Write

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkObject
            ╰── GtkWidget
                ╰── GtkDrawingArea
                    ╰── MxGtkLightSwitch

Implemented Interfaces

MxGtkLightSwitch implements AtkImplementorIface and GtkBuildable.

Description

A visual representation of a toggle switch that can move between two states.

Functions

mx_gtk_light_switch_set_active ()

void
mx_gtk_light_switch_set_active (MxGtkLightSwitch *lightswitch,
                                gboolean active);

Set the value of the "active" property

Parameters

lightswitch

A MxGtkLightSwitch

 

active

TRUE to set the switch to its ON state

 

mx_gtk_light_switch_get_active ()

gboolean
mx_gtk_light_switch_get_active (MxGtkLightSwitch *lightswitch);

Get the value of the "active" property

Parameters

lightswitch

A MxGtkLightSwitch

 

Returns

TRUE if the switch is "on"


mx_gtk_light_switch_new ()

GtkWidget *
mx_gtk_light_switch_new (void);

Create a MxGtkLightSwitch

Returns

a newly allocated MxGtkLightSwitch

Types and Values

MxGtkLightSwitch

typedef struct _MxGtkLightSwitch MxGtkLightSwitch;

The contents of this structure are private and should only be accessed through the public API.


MxGtkLightSwitchClass

typedef struct {
  GtkDrawingAreaClass parent_class;

  void (*switch_flipped) (MxGtkLightSwitch *lightswitch, gboolean state);
} MxGtkLightSwitchClass;

Property Details

The “active” property

  “active”                   gboolean

Is the light switch on or not.

Flags: Read / Write

Default value: FALSE

Signal Details

The “switch-flipped” signal

void
user_function (MxGtkLightSwitch *mxgtklightswitch,
               gboolean          arg1,
               gpointer          user_data)

Flags: Run First