1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
3
* Copyright (C) 2007 Richard Hughes <richard@hughsie.com>
5
* Licensed under the GNU General Public License Version 2
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
#ifndef __EGG_IDLETIME_H
23
#define __EGG_IDLETIME_H
25
#include <glib-object.h>
29
#define EGG_IDLETIME_TYPE (egg_idletime_get_type ())
30
#define EGG_IDLETIME(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EGG_IDLETIME_TYPE, EggIdletime))
31
#define EGG_IDLETIME_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EGG_IDLETIME_TYPE, EggIdletimeClass))
32
#define EGG_IS_IDLETIME(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EGG_IDLETIME_TYPE))
33
#define EGG_IS_IDLETIME_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EGG_IDLETIME_TYPE))
34
#define EGG_IDLETIME_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EGG_IDLETIME_TYPE, EggIdletimeClass))
39
TIMEOUT_BRIGHTNESS_ON_AC,
40
TIMEOUT_BRIGHTNESS_ON_BATTERY,
41
TIMEOUT_INACTIVITY_ON_AC,
42
TIMEOUT_INACTIVITY_ON_BATTERY
45
typedef struct EggIdletimePrivate EggIdletimePrivate;
50
EggIdletimePrivate *priv;
55
GObjectClass parent_class;
56
void (* alarm_expired) (EggIdletime *idletime,
58
void (* reset) (EggIdletime *idletime);
61
GType egg_idletime_get_type (void);
62
EggIdletime *egg_idletime_new (void);
64
void egg_idletime_alarm_reset_all (EggIdletime *idletime);
65
gboolean egg_idletime_alarm_set (EggIdletime *idletime,
68
gboolean egg_idletime_alarm_remove (EggIdletime *idletime,
70
gint64 egg_idletime_get_time (EggIdletime *idletime);
72
void egg_idletime_test (gpointer data);
77
#endif /* __EGG_IDLETIME_H */