1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22
#ifndef __GPM_IDLETIME_H
23
#define __GPM_IDLETIME_H
25
#include <glib-object.h>
29
#define GPM_IDLETIME_TYPE (gpm_idletime_get_type ())
30
#define GPM_IDLETIME(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GPM_IDLETIME_TYPE, GpmIdletime))
31
#define GPM_IDLETIME_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GPM_IDLETIME_TYPE, GpmIdletimeClass))
32
#define GPM_IS_IDLETIME(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GPM_IDLETIME_TYPE))
33
#define GPM_IS_IDLETIME_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GPM_IDLETIME_TYPE))
34
#define GPM_IDLETIME_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GPM_IDLETIME_TYPE, GpmIdletimeClass))
36
typedef struct GpmIdletimePrivate GpmIdletimePrivate;
41
GpmIdletimePrivate *priv;
46
GObjectClass parent_class;
47
void (* alarm_expired) (GpmIdletime *idletime,
49
void (* reset) (GpmIdletime *idletime);
52
GType gpm_idletime_get_type (void);
53
GpmIdletime *gpm_idletime_new (void);
55
void gpm_idletime_alarm_reset_all (GpmIdletime *idletime);
56
gboolean gpm_idletime_alarm_set (GpmIdletime *idletime,
59
gboolean gpm_idletime_alarm_remove (GpmIdletime *idletime,
61
gint64 gpm_idletime_get_time (GpmIdletime *idletime);
65
#endif /* __GPM_IDLETIME_H */