4 * An OpenGL based 'interactive canvas' library.
6 * Copyright (C) 2010 Intel Corporation.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
22 * Emmanuele Bassi <ebassi@linux.intel.com>
24 * Inspired by the StClickable class in GNOME Shell, written by:
25 * Colin Walters <walters@verbum.org>
28 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
29 #error "Only <clutter/clutter.h> can be included directly."
32 #ifndef __CLUTTER_CLICK_ACTION_H__
33 #define __CLUTTER_CLICK_ACTION_H__
35 #include <clutter/clutter-action.h>
36 #include <clutter/clutter-event.h>
40 #define CLUTTER_TYPE_CLICK_ACTION (clutter_click_action_get_type ())
41 #define CLUTTER_CLICK_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_CLICK_ACTION, ClutterClickAction))
42 #define CLUTTER_IS_CLICK_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_CLICK_ACTION))
43 #define CLUTTER_CLICK_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_CLICK_ACTION, ClutterClickActionClass))
44 #define CLUTTER_IS_CLICK_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_CLICK_ACTION))
45 #define CLUTTER_CLICK_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CLUTTER_TYPE_CLICK_ACTION, ClutterClickActionClass))
47 typedef struct _ClutterClickAction ClutterClickAction;
48 typedef struct _ClutterClickActionPrivate ClutterClickActionPrivate;
49 typedef struct _ClutterClickActionClass ClutterClickActionClass;
54 * The <structname>ClutterClickAction</structname> structure contains
55 * only private data and should be accessed using the provided API
59 struct _ClutterClickAction
62 ClutterAction parent_instance;
64 ClutterClickActionPrivate *priv;
68 * ClutterClickActionClass:
69 * @clicked: class handler for the #ClutterClickAction::clicked signal
70 * @long_press: class handler for the #ClutterClickAction::long-press signal
72 * The <structname>ClutterClickActionClass</structname> structure
73 * contains only private data
77 struct _ClutterClickActionClass
80 ClutterActionClass parent_class;
83 void (* clicked) (ClutterClickAction *action,
86 gboolean (* long_press) (ClutterClickAction *action,
88 ClutterLongPressState state);
91 void (* _clutter_click_action1) (void);
92 void (* _clutter_click_action2) (void);
93 void (* _clutter_click_action3) (void);
94 void (* _clutter_click_action4) (void);
95 void (* _clutter_click_action5) (void);
96 void (* _clutter_click_action6) (void);
97 void (* _clutter_click_action7) (void);
100 GType clutter_click_action_get_type (void) G_GNUC_CONST;
102 ClutterAction * clutter_click_action_new (void);
104 guint clutter_click_action_get_button (ClutterClickAction *action);
105 ClutterModifierType clutter_click_action_get_state (ClutterClickAction *action);
106 void clutter_click_action_get_coords (ClutterClickAction *action,
110 void clutter_click_action_release (ClutterClickAction *action);
114 #endif /* __CLUTTER_CLICK_ACTION_H__ */