~ubuntu-branches/debian/jessie/mate-control-center/jessie

« back to all changes in this revision

Viewing changes to libslab/double-click-detector.h

  • Committer: Package Import Robot
  • Author(s): Mike Gabriel
  • Date: 2014-05-02 23:20:06 UTC
  • Revision ID: package-import@ubuntu.com-20140502232006-9626h14ggaz2hc9h
Tags: upstream-1.8.1+dfsg1
ImportĀ upstreamĀ versionĀ 1.8.1+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of libslab.
 
3
 *
 
4
 * Copyright (c) 2006 Novell, Inc.
 
5
 *
 
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)
 
9
 * any later version.
 
10
 *
 
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
 
14
 * more details.
 
15
 *
 
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
 
19
 */
 
20
 
 
21
#ifndef __DOUBLE_CLICK_DETECTOR_H__
 
22
#define __DOUBLE_CLICK_DETECTOR_H__
 
23
 
 
24
#include <glib-object.h>
 
25
 
 
26
#ifdef __cplusplus
 
27
extern "C" {
 
28
#endif
 
29
 
 
30
#define DOUBLE_CLICK_DETECTOR_TYPE         (double_click_detector_get_type ())
 
31
#define DOUBLE_CLICK_DETECTOR(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), DOUBLE_CLICK_DETECTOR_TYPE, DoubleClickDetector))
 
32
#define DOUBLE_CLICK_DETECTOR_CLASS(c)     (G_TYPE_CHECK_CLASS_CAST ((c), DOUBLE_CLICK_DETECTOR_TYPE, DoubleClickDetectorClass))
 
33
#define IS_DOUBLE_CLICK_DETECTOR(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), DOUBLE_CLICK_DETECTOR_TYPE))
 
34
#define IS_DOUBLE_CLICK_DETECTOR_CLASS(c)  (G_TYPE_CHECK_CLASS_TYPE ((c), DOUBLE_CLICK_DETECTOR_TYPE))
 
35
#define DOUBLE_CLICK_DETECTOR_GET_CLASS(o) (G_TYPE_CHECK_GET_CLASS ((o), DOUBLE_CLICK_DETECTOR_TYPE, DoubleClickDetectorClass))
 
36
 
 
37
typedef struct
 
38
{
 
39
        GObject parent_placeholder;
 
40
 
 
41
        guint32 double_click_time;
 
42
        guint32 last_click_time;
 
43
} DoubleClickDetector;
 
44
 
 
45
typedef struct
 
46
{
 
47
        GObjectClass parent_class;
 
48
} DoubleClickDetectorClass;
 
49
 
 
50
GType double_click_detector_get_type (void);
 
51
 
 
52
DoubleClickDetector *double_click_detector_new (void);
 
53
 
 
54
gboolean double_click_detector_is_double_click (DoubleClickDetector * detector, guint32 event_time,
 
55
        gboolean auto_update);
 
56
 
 
57
void double_click_detector_update_click_time (DoubleClickDetector * detector, guint32 event_time);
 
58
 
 
59
#ifdef __cplusplus
 
60
}
 
61
#endif
 
62
#endif /* __DOUBLE_CLICK_DETECTOR_H__ */