Release Clutter 1.11.4 (snapshot)
[profile/ivi/clutter.git] / clutter / clutter-device-manager.h
1 /*
2  * Clutter.
3  *
4  * An OpenGL based 'interactive canvas' library.
5  *
6  * Copyright (C) 2009  Intel Corp.
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: Emmanuele Bassi <ebassi@linux.intel.com>
22  */
23
24 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
25 #error "Only <clutter/clutter.h> can be included directly."
26 #endif
27
28 #ifndef __CLUTTER_DEVICE_MANAGER_H__
29 #define __CLUTTER_DEVICE_MANAGER_H__
30
31 #include <clutter/clutter-input-device.h>
32 #include <clutter/clutter-stage.h>
33
34 G_BEGIN_DECLS
35
36 #define CLUTTER_TYPE_DEVICE_MANAGER             (clutter_device_manager_get_type ())
37 #define CLUTTER_DEVICE_MANAGER(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_DEVICE_MANAGER, ClutterDeviceManager))
38 #define CLUTTER_IS_DEVICE_MANAGER(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_DEVICE_MANAGER))
39 #define CLUTTER_DEVICE_MANAGER_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_DEVICE_MANAGER, ClutterDeviceManagerClass))
40 #define CLUTTER_IS_DEVICE_MANAGER_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_DEVICE_MANAGER))
41 #define CLUTTER_DEVICE_MANAGER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_DEVICE_MANAGER, ClutterDeviceManagerClass))
42
43 typedef struct _ClutterDeviceManager            ClutterDeviceManager;
44 typedef struct _ClutterDeviceManagerPrivate     ClutterDeviceManagerPrivate;
45 typedef struct _ClutterDeviceManagerClass       ClutterDeviceManagerClass;
46
47 /**
48  * ClutterDeviceManager:
49  *
50  * The #ClutterDeviceManager structure contains only private data
51  *
52  * Since: 1.2
53  */
54 struct _ClutterDeviceManager
55 {
56   /*< private >*/
57   GObject parent_instance;
58
59   ClutterDeviceManagerPrivate *priv;
60 };
61
62 /**
63  * ClutterDeviceManagerClass:
64  *
65  * The #ClutterDeviceManagerClass structure contains only private data
66  *
67  * Since: 1.2
68  */
69 struct _ClutterDeviceManagerClass
70 {
71   /*< private >*/
72   GObjectClass parent_class;
73
74   const GSList *      (* get_devices)     (ClutterDeviceManager   *device_manager);
75   ClutterInputDevice *(* get_core_device) (ClutterDeviceManager   *device_manager,
76                                            ClutterInputDeviceType  device_type);
77   ClutterInputDevice *(* get_device)      (ClutterDeviceManager   *device_manager,
78                                            gint                    device_id);
79
80   void                (* add_device)      (ClutterDeviceManager   *manager,
81                                            ClutterInputDevice     *device);
82   void                (* remove_device)   (ClutterDeviceManager   *manager,
83                                            ClutterInputDevice     *device);
84
85   /* padding */
86   gpointer _padding[8];
87 };
88
89
90
91 GType clutter_device_manager_get_type (void) G_GNUC_CONST;
92
93 ClutterDeviceManager *clutter_device_manager_get_default     (void);
94 GSList *              clutter_device_manager_list_devices    (ClutterDeviceManager   *device_manager);
95 const GSList *        clutter_device_manager_peek_devices    (ClutterDeviceManager   *device_manager);
96
97 ClutterInputDevice *  clutter_device_manager_get_device      (ClutterDeviceManager   *device_manager,
98                                                               gint                    device_id);
99 ClutterInputDevice *  clutter_device_manager_get_core_device (ClutterDeviceManager   *device_manager,
100                                                               ClutterInputDeviceType  device_type);
101
102 G_END_DECLS
103
104 #endif /* __CLUTTER_DEVICE_MANAGER_H__ */