4 * An OpenGL based 'interactive canvas' library.
6 * Copyright (C) 2008 Intel Corporation.
8 * Authored By: Emmanuele Bassi <ebassi@linux.intel.com>
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
24 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
25 #error "Only <clutter/clutter.h> can be included directly."
28 #ifndef __CLUTTER_BINDING_POOL_H__
29 #define __CLUTTER_BINDING_POOL_H__
31 #include <glib-object.h>
32 #include <clutter/clutter-event.h>
36 #define CLUTTER_TYPE_BINDING_POOL (clutter_binding_pool_get_type ())
37 #define CLUTTER_BINDING_POOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_BINDING_POOL, ClutterBindingPool))
38 #define CLUTTER_IS_BINDING_POOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_BINDING_POOL))
43 * Container of key bindings. The #ClutterBindingPool struct is
48 typedef struct _ClutterBindingPool ClutterBindingPool;
49 typedef struct _ClutterBindingPoolClass ClutterBindingPoolClass;
52 * ClutterBindingActionFunc:
53 * @gobject: a #GObject
54 * @action_name: the name of the action
55 * @key_val: the key symbol
56 * @modifiers: bitmask of the modifier flags
58 * The prototype for the callback function registered with
59 * clutter_binding_pool_install_action() and invoked by
60 * clutter_binding_pool_activate().
62 * Return value: the function should return %TRUE if the key
63 * binding has been handled, and return %FALSE otherwise
67 typedef gboolean (* ClutterBindingActionFunc) (GObject *gobject,
68 const gchar *action_name,
70 ClutterModifierType modifiers);
72 GType clutter_binding_pool_get_type (void) G_GNUC_CONST;
74 ClutterBindingPool * clutter_binding_pool_new (const gchar *name);
75 ClutterBindingPool * clutter_binding_pool_get_for_class (gpointer klass);
76 ClutterBindingPool * clutter_binding_pool_find (const gchar *name);
78 void clutter_binding_pool_install_action (ClutterBindingPool *pool,
79 const gchar *action_name,
81 ClutterModifierType modifiers,
84 GDestroyNotify notify);
85 void clutter_binding_pool_install_closure (ClutterBindingPool *pool,
86 const gchar *action_name,
88 ClutterModifierType modifiers,
90 void clutter_binding_pool_override_action (ClutterBindingPool *pool,
92 ClutterModifierType modifiers,
95 GDestroyNotify notify);
96 void clutter_binding_pool_override_closure (ClutterBindingPool *pool,
98 ClutterModifierType modifiers,
101 const gchar * clutter_binding_pool_find_action (ClutterBindingPool *pool,
103 ClutterModifierType modifiers);
104 void clutter_binding_pool_remove_action (ClutterBindingPool *pool,
106 ClutterModifierType modifiers);
108 gboolean clutter_binding_pool_activate (ClutterBindingPool *pool,
110 ClutterModifierType modifiers,
113 void clutter_binding_pool_block_action (ClutterBindingPool *pool,
114 const gchar *action_name);
115 void clutter_binding_pool_unblock_action (ClutterBindingPool *pool,
116 const gchar *action_name);
120 #endif /* __CLUTTER_BINDING_POOL_H__ */