| 1 |
/* |
| 2 |
* Clutter. |
| 3 |
* |
| 4 |
* An OpenGL based 'interactive canvas' library. |
| 5 |
* |
| 6 |
* Authored By Matthew Allum <[email protected]> |
| 7 |
* Jorn Baayen <[email protected]> |
| 8 |
* Emmanuele Bassi <[email protected]> |
| 9 |
* Tomas Frydrych <[email protected]> |
| 10 |
* |
| 11 |
* Copyright (C) 2006, 2007, 2008 OpenedHand |
| 12 |
* Copyright (C) 2009 Intel Corp. |
| 13 |
* |
| 14 |
* This library is free software; you can redistribute it and/or |
| 15 |
* modify it under the terms of the GNU Lesser General Public |
| 16 |
* License as published by the Free Software Foundation; either |
| 17 |
* version 2 of the License, or (at your option) any later version. |
| 18 |
* |
| 19 |
* This library is distributed in the hope that it will be useful, |
| 20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 22 |
* Lesser General Public License for more details. |
| 23 |
* |
| 24 |
* You should have received a copy of the GNU Lesser General Public |
| 25 |
* License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 26 |
*/ |
| 27 |
|
| 28 |
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) |
| 29 |
#error "Only <clutter/clutter.h> can be included directly." |
| 30 |
#endif |
| 31 |
|
| 32 |
#ifndef __CLUTTER_ALPHA_H__ |
| 33 |
#define __CLUTTER_ALPHA_H__ |
| 34 |
|
| 35 |
#include <clutter/clutter-timeline.h> |
| 36 |
#include <clutter/clutter-types.h> |
| 37 |
|
| 38 |
G_BEGIN_DECLS |
| 39 |
|
| 40 |
#define CLUTTER_TYPE_ALPHA (clutter_alpha_get_type ()) |
| 41 |
#define CLUTTER_ALPHA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_ALPHA, ClutterAlpha)) |
| 42 |
#define CLUTTER_ALPHA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_ALPHA, ClutterAlphaClass)) |
| 43 |
#define CLUTTER_IS_ALPHA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_ALPHA)) |
| 44 |
#define CLUTTER_IS_ALPHA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_ALPHA)) |
| 45 |
#define CLUTTER_ALPHA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_ALPHA, ClutterAlphaClass)) |
| 46 |
|
| 47 |
typedef struct _ClutterAlphaClass ClutterAlphaClass; |
| 48 |
typedef struct _ClutterAlphaPrivate ClutterAlphaPrivate; |
| 49 |
|
| 50 |
/** |
| 51 |
* ClutterAlphaFunc: |
| 52 |
* @alpha: a #ClutterAlpha |
| 53 |
* @user_data: user data passed to the function |
| 54 |
* |
| 55 |
* A function returning a value depending on the position of |
| 56 |
* the #ClutterTimeline bound to @alpha. |
| 57 |
* |
| 58 |
* Return value: a floating point value |
| 59 |
* |
| 60 |
* Since: 0.2 |
| 61 |
* |
| 62 |
* Deprecated: 1.12: Use #ClutterTimelineProgressFunc instead. |
| 63 |
*/ |
| 64 |
typedef gdouble (*ClutterAlphaFunc) (ClutterAlpha *alpha, |
| 65 |
gpointer user_data); |
| 66 |
|
| 67 |
/** |
| 68 |
* ClutterAlpha: |
| 69 |
* |
| 70 |
* #ClutterAlpha combines a #ClutterTimeline and a function. |
| 71 |
* The contents of the #ClutterAlpha structure are private and should |
| 72 |
* only be accessed using the provided API. |
| 73 |
* |
| 74 |
* Since: 0.2 |
| 75 |
* |
| 76 |
* Deprecated: 1.12: Use #ClutterTimeline instead |
| 77 |
*/ |
| 78 |
struct _ClutterAlpha |
| 79 |
{ |
| 80 |
/*< private >*/ |
| 81 |
GInitiallyUnowned parent; |
| 82 |
|
| 83 |
ClutterAlphaPrivate *priv; |
| 84 |
}; |
| 85 |
|
| 86 |
/** |
| 87 |
* ClutterAlphaClass: |
| 88 |
* |
| 89 |
* Base class for #ClutterAlpha |
| 90 |
* |
| 91 |
* Since: 0.2 |
| 92 |
* |
| 93 |
* Deprecated: 1.12: Use #ClutterTimeline instead |
| 94 |
*/ |
| 95 |
struct _ClutterAlphaClass |
| 96 |
{ |
| 97 |
/*< private >*/ |
| 98 |
GInitiallyUnownedClass parent_class; |
| 99 |
|
| 100 |
void (*_clutter_alpha_1) (void); |
| 101 |
void (*_clutter_alpha_2) (void); |
| 102 |
void (*_clutter_alpha_3) (void); |
| 103 |
void (*_clutter_alpha_4) (void); |
| 104 |
void (*_clutter_alpha_5) (void); |
| 105 |
}; |
| 106 |
|
| 107 |
CLUTTER_DEPRECATED_IN_1_12 |
| 108 |
GType clutter_alpha_get_type (void) G_GNUC_CONST; |
| 109 |
|
| 110 |
CLUTTER_DEPRECATED_IN_1_12 |
| 111 |
ClutterAlpha * clutter_alpha_new (void); |
| 112 |
CLUTTER_DEPRECATED_IN_1_12 |
| 113 |
ClutterAlpha * clutter_alpha_new_full (ClutterTimeline *timeline, |
| 114 |
gulong mode); |
| 115 |
CLUTTER_DEPRECATED_IN_1_12 |
| 116 |
ClutterAlpha * clutter_alpha_new_with_func (ClutterTimeline *timeline, |
| 117 |
ClutterAlphaFunc func, |
| 118 |
gpointer data, |
| 119 |
GDestroyNotify destroy); |
| 120 |
|
| 121 |
CLUTTER_DEPRECATED_IN_1_12 |
| 122 |
gdouble clutter_alpha_get_alpha (ClutterAlpha *alpha); |
| 123 |
CLUTTER_DEPRECATED_IN_1_12 |
| 124 |
void clutter_alpha_set_func (ClutterAlpha *alpha, |
| 125 |
ClutterAlphaFunc func, |
| 126 |
gpointer data, |
| 127 |
GDestroyNotify destroy); |
| 128 |
CLUTTER_DEPRECATED_IN_1_12 |
| 129 |
void clutter_alpha_set_closure (ClutterAlpha *alpha, |
| 130 |
GClosure *closure); |
| 131 |
CLUTTER_DEPRECATED_IN_1_12 |
| 132 |
void clutter_alpha_set_timeline (ClutterAlpha *alpha, |
| 133 |
ClutterTimeline *timeline); |
| 134 |
CLUTTER_DEPRECATED_IN_1_12 |
| 135 |
ClutterTimeline *clutter_alpha_get_timeline (ClutterAlpha *alpha); |
| 136 |
CLUTTER_DEPRECATED_IN_1_12 |
| 137 |
void clutter_alpha_set_mode (ClutterAlpha *alpha, |
| 138 |
gulong mode); |
| 139 |
CLUTTER_DEPRECATED_IN_1_12 |
| 140 |
gulong clutter_alpha_get_mode (ClutterAlpha *alpha); |
| 141 |
|
| 142 |
CLUTTER_DEPRECATED_IN_1_12 |
| 143 |
gulong clutter_alpha_register_func (ClutterAlphaFunc func, |
| 144 |
gpointer data); |
| 145 |
CLUTTER_DEPRECATED_IN_1_12 |
| 146 |
gulong clutter_alpha_register_closure (GClosure *closure); |
| 147 |
|
| 148 |
G_END_DECLS |
| 149 |
|
| 150 |
#endif /* __CLUTTER_ALPHA_H__ */ |