Release Clutter 1.11.4 (snapshot)
[profile/ivi/clutter.git] / clutter / clutter-id-pool.h
1 /*
2  * Clutter.
3  *
4  * An OpenGL based 'interactive canvas' library.
5  *
6  * Authored By Matthew Allum  <mallum@openedhand.com>
7  *
8  * Copyright (C) 2008 OpenedHand
9  *
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.
14  *
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.
19  *
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/>.
22  *
23  * ClutterIDPool: pool of reusable integer ids associated with pointers.
24  *
25  * Author: Øyvind Kolås <pippin@o-hand.com>
26  */
27
28 #ifndef __CLUTTER_ID_POOL_H__
29 #define __CLUTTER_ID_POOL_H__
30
31 #include <glib.h>
32
33 G_BEGIN_DECLS
34
35 typedef struct _ClutterIDPool   ClutterIDPool;
36
37 ClutterIDPool * _clutter_id_pool_new    (guint          initial_size);
38 void            _clutter_id_pool_free   (ClutterIDPool *id_pool);
39
40 guint32         _clutter_id_pool_add    (ClutterIDPool *id_pool,
41                                          gpointer       ptr);
42 void            _clutter_id_pool_remove (ClutterIDPool *id_pool,
43                                          guint32        id_);
44 gpointer        _clutter_id_pool_lookup (ClutterIDPool *id_pool,
45                                          guint32        id_);
46
47
48 G_END_DECLS
49
50 #endif /* __CLUTTER_ID_POOL_H__ */