aboutsummaryrefslogtreecommitdiffstats
path: root/lib/egg/egg-toggle-action.h
blob: 4a5293bfe6b712eae4b6f3a158454d52a4891fa1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef EGG_TOGGLE_ACTION_H
#define EGG_TOGGLE_ACTION_H

#include <gtk/gtk.h>
#include <egg-action.h>

#define EGG_TYPE_TOGGLE_ACTION            (egg_toggle_action_get_type ())
#define EGG_TOGGLE_ACTION(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TOGGLE_ACTION, EggToggleAction))
#define EGG_TOGGLE_ACTION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TOGGLE_ACTION, EggToggleActionClass))
#define EGG_IS_TOGGLE_ACTION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TOGGLE_ACTION))
#define EGG_IS_TOGGLE_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), EGG_TYPE_TOGGLE_ACTION))
#define EGG_TOGGLE_ACTION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), EGG_TYPE_TOGGLE_ACTION, EggToggleActionClass))

typedef struct _EggToggleAction      EggToggleAction;
typedef struct _EggToggleActionClass EggToggleActionClass;

struct _EggToggleAction
{
  EggAction parent;

  guint active : 1;
};

struct _EggToggleActionClass
{
  EggActionClass parent_class;

  void (* toggled) (EggToggleAction *action);
};

GType    egg_toggle_action_get_type   (void);

void     egg_toggle_action_toggled    (EggToggleAction *action);
void     egg_toggle_action_set_active (EggToggleAction *action,
                       gboolean is_active);
gboolean egg_toggle_action_get_active (EggToggleAction *action);

#endif