2
* This file is part of libslab.
4
* Copyright (c) 2006 Novell, Inc.
6
* Libslab is free software; you can redistribute it and/or modify it under the
7
* terms of the GNU Lesser General Public License as published by the Free
8
* Software Foundation; either version 2 of the License, or (at your option)
11
* Libslab is distributed in the hope that it will be useful, but WITHOUT ANY
12
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with libslab; if not, write to the Free Software Foundation, Inc., 51
18
* Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
#ifndef __DOUBLE_CLICK_DETECTOR_H__
22
#define __DOUBLE_CLICK_DETECTOR_H__
24
#include <glib-object.h>
28
#define DOUBLE_CLICK_DETECTOR_TYPE (double_click_detector_get_type ())
29
#define DOUBLE_CLICK_DETECTOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DOUBLE_CLICK_DETECTOR_TYPE, DoubleClickDetector))
30
#define DOUBLE_CLICK_DETECTOR_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), DOUBLE_CLICK_DETECTOR_TYPE, DoubleClickDetectorClass))
31
#define IS_DOUBLE_CLICK_DETECTOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DOUBLE_CLICK_DETECTOR_TYPE))
32
#define IS_DOUBLE_CLICK_DETECTOR_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), DOUBLE_CLICK_DETECTOR_TYPE))
33
#define DOUBLE_CLICK_DETECTOR_GET_CLASS(o) (G_TYPE_CHECK_GET_CLASS ((o), DOUBLE_CLICK_DETECTOR_TYPE, DoubleClickDetectorClass))
37
GObject parent_placeholder;
39
guint32 double_click_time;
40
guint32 last_click_time;
41
} DoubleClickDetector;
45
GObjectClass parent_class;
46
} DoubleClickDetectorClass;
48
GType double_click_detector_get_type (void);
50
DoubleClickDetector *double_click_detector_new (void);
52
gboolean double_click_detector_is_double_click (DoubleClickDetector * detector, guint32 event_time,
53
gboolean auto_update);
55
void double_click_detector_update_click_time (DoubleClickDetector * detector, guint32 event_time);
58
#endif /* __DOUBLE_CLICK_DETECTOR_H__ */