| 1 |
/* |
| 2 |
* Clutter. |
| 3 |
* |
| 4 |
* An OpenGL based 'interactive canvas' library. |
| 5 |
* |
| 6 |
* Authored By Neil Roberts <[email protected]> |
| 7 |
* |
| 8 |
* Copyright (C) 2009 Intel Corporation. |
| 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 |
|
| 24 |
#ifndef __CLUTTER_TIMEOUT_INTERVAL_H__ |
| 25 |
#define __CLUTTER_TIMEOUT_INTERVAL_H__ |
| 26 |
|
| 27 |
#include <glib.h> |
| 28 |
|
| 29 |
G_BEGIN_DECLS |
| 30 |
|
| 31 |
typedef struct _ClutterTimeoutInterval ClutterTimeoutInterval; |
| 32 |
|
| 33 |
struct _ClutterTimeoutInterval |
| 34 |
{ |
| 35 |
/* milliseconds */ |
| 36 |
gint64 start_time; |
| 37 |
|
| 38 |
guint frame_count; |
| 39 |
guint fps; |
| 40 |
}; |
| 41 |
|
| 42 |
void _clutter_timeout_interval_init (ClutterTimeoutInterval *interval, |
| 43 |
guint fps); |
| 44 |
|
| 45 |
gboolean _clutter_timeout_interval_prepare (gint64 current_time, |
| 46 |
ClutterTimeoutInterval *interval, |
| 47 |
gint *delay); |
| 48 |
|
| 49 |
gboolean _clutter_timeout_interval_dispatch (ClutterTimeoutInterval *interval, |
| 50 |
GSourceFunc callback, |
| 51 |
gpointer user_data); |
| 52 |
|
| 53 |
gint _clutter_timeout_interval_compare_expiration (const ClutterTimeoutInterval *a, |
| 54 |
const ClutterTimeoutInterval *b); |
| 55 |
|
| 56 |
G_END_DECLS |
| 57 |
|
| 58 |
#endif /* __CLUTTER_TIMEOUT_INTERVAL_H__ */ |