Release Clutter 1.11.4 (snapshot)
[profile/ivi/clutter.git] / clutter / clutter-drop-action.h
1 /*
2  * Clutter.
3  *
4  * An OpenGL based 'interactive canvas' library.
5  *
6  * Copyright © 2011  Intel Corporation.
7  *
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.
12  *
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.
17  *
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/>.
20  *
21  * Author:
22  *   Emmanuele Bassi <ebassi@linux.intel.com>
23  */
24
25 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
26 #error "Only <clutter/clutter.h> can be directly included."
27 #endif
28
29 #ifndef __CLUTTER_DROP_ACTION_H__
30 #define __CLUTTER_DROP_ACTION_H__
31
32 #include <clutter/clutter-action.h>
33
34 G_BEGIN_DECLS
35
36 #define CLUTTER_TYPE_DROP_ACTION                (clutter_drop_action_get_type ())
37 #define CLUTTER_DROP_ACTION(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_DROP_ACTION, ClutterDropAction))
38 #define CLUTTER_IS_DROP_ACTION(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_DROP_ACTION))
39 #define CLUTTER_DROP_ACTION_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_DROP_ACTION, ClutterDropActionClass))
40 #define CLUTTER_IS_DROP_ACTION_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_DROP_ACTION))
41 #define CLUTTER_DROP_ACTION_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_DROP_ACTION, ClutterDropActionClass))
42
43 typedef struct _ClutterDropAction               ClutterDropAction;
44 typedef struct _ClutterDropActionPrivate        ClutterDropActionPrivate;
45 typedef struct _ClutterDropActionClass          ClutterDropActionClass;
46
47 /**
48  * ClutterDropAction:
49  *
50  * The <structname>ClutterDropAction</structname> structure contains only
51  * private data and should be accessed using the provided API.
52  *
53  * Since: 1.8
54  */
55 struct _ClutterDropAction
56 {
57   /*< private >*/
58   ClutterAction parent_instance;
59
60   ClutterDropActionPrivate *priv;
61 };
62
63 /**
64  * ClutterDropActionClass:
65  * @can_drop: class handler for the #ClutterDropAction::can-drop signal
66  * @over_in: class handler for the #ClutterDropAction::over-in signal
67  * @over_out: class handler for the #ClutterDropAction::over-out signal
68  * @drop: class handler for the #ClutterDropAction::drop signal
69  *
70  * The <structname>ClutterDropActionClass</structname> structure contains
71  * only private data.
72  *
73  * Since: 1.8
74  */
75 struct _ClutterDropActionClass
76 {
77   /*< private >*/
78   ClutterActionClass parent_class;
79
80   /*< public >*/
81   gboolean (* can_drop) (ClutterDropAction *action,
82                          ClutterActor      *actor,
83                          gfloat             event_x,
84                          gfloat             event_y);
85
86   void     (* over_in)  (ClutterDropAction *action,
87                          ClutterActor      *actor);
88   void     (* over_out) (ClutterDropAction *action,
89                          ClutterActor      *actor);
90
91   void     (* drop)     (ClutterDropAction *action,
92                          ClutterActor      *actor,
93                          gfloat             event_x,
94                          gfloat             event_y);
95
96   /*< private >*/
97   void (*_clutter_drop_action1) (void);
98   void (*_clutter_drop_action2) (void);
99   void (*_clutter_drop_action3) (void);
100   void (*_clutter_drop_action4) (void);
101   void (*_clutter_drop_action5) (void);
102   void (*_clutter_drop_action6) (void);
103   void (*_clutter_drop_action7) (void);
104   void (*_clutter_drop_action8) (void);
105 };
106
107 GType clutter_drop_action_get_type (void) G_GNUC_CONST;
108
109 ClutterAction *         clutter_drop_action_new         (void);
110
111 G_END_DECLS
112
113 #endif /* __CLUTTER_DROP_ACTION_H__ */