diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2011-06-17 15:07:44 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2011-06-17 15:07:44 +0800 |
commit | 78d6fc8bad19ac08f3152ff1ae95870b77d65413 (patch) | |
tree | c83985a5dea1b8ea4c121227adac9ae740500660 | |
parent | a1a2d54c24de77239dacf68d6f007e5ff023cdc2 (diff) | |
parent | 0891c37ab31b49af38fab293415d87d3ca0ce3a0 (diff) | |
download | clutter-78d6fc8bad19ac08f3152ff1ae95870b77d65413.tar.gz |
Merge branch 'clutter-1.99' into msvc-support-2.0
59 files changed, 112 insertions, 11414 deletions
diff --git a/clutter/Makefile.am b/clutter/Makefile.am index 491c19624..29cf3e3e4 100644 --- a/clutter/Makefile.am +++ b/clutter/Makefile.am @@ -58,13 +58,6 @@ source_h = \ $(srcdir)/clutter-animation.h \ $(srcdir)/clutter-animator.h \ $(srcdir)/clutter-backend.h \ - $(srcdir)/clutter-behaviour.h \ - $(srcdir)/clutter-behaviour-depth.h \ - $(srcdir)/clutter-behaviour-ellipse.h \ - $(srcdir)/clutter-behaviour-opacity.h \ - $(srcdir)/clutter-behaviour-path.h \ - $(srcdir)/clutter-behaviour-rotate.h \ - $(srcdir)/clutter-behaviour-scale.h \ $(srcdir)/clutter-bind-constraint.h \ $(srcdir)/clutter-binding-pool.h \ $(srcdir)/clutter-bin-layout.h \ @@ -81,7 +74,6 @@ source_h = \ $(srcdir)/clutter-constraint.h \ $(srcdir)/clutter-container.h \ $(srcdir)/clutter-deform-effect.h \ - $(srcdir)/clutter-deprecated.h \ $(srcdir)/clutter-desaturate-effect.h \ $(srcdir)/clutter-device-manager.h \ $(srcdir)/clutter-drag-action.h \ @@ -91,13 +83,11 @@ source_h = \ $(srcdir)/clutter-fixed.h \ $(srcdir)/clutter-fixed-layout.h \ $(srcdir)/clutter-flow-layout.h \ - $(srcdir)/clutter-frame-source.h \ - $(srcdir)/clutter-gesture-action.h \ + $(srcdir)/clutter-gesture-action.h \ $(srcdir)/clutter-group.h \ $(srcdir)/clutter-input-device.h \ $(srcdir)/clutter-interval.h \ $(srcdir)/clutter-keysyms.h \ - $(srcdir)/clutter-keysyms-compat.h \ $(srcdir)/clutter-layout-manager.h \ $(srcdir)/clutter-layout-meta.h \ $(srcdir)/clutter-list-model.h \ @@ -113,7 +103,6 @@ source_h = \ $(srcdir)/clutter-script.h \ $(srcdir)/clutter-scriptable.h \ $(srcdir)/clutter-settings.h \ - $(srcdir)/clutter-shader.h \ $(srcdir)/clutter-shader-effect.h \ $(srcdir)/clutter-shader-types.h \ $(srcdir)/clutter-swipe-action.h \ @@ -126,10 +115,8 @@ source_h = \ $(srcdir)/clutter-texture.h \ $(srcdir)/clutter-text.h \ $(srcdir)/clutter-timeline.h \ - $(srcdir)/clutter-timeout-pool.h \ $(srcdir)/clutter-types.h \ $(srcdir)/clutter-units.h \ - $(srcdir)/clutter-util.h \ $(NULL) source_c = \ @@ -143,13 +130,6 @@ source_c = \ $(srcdir)/clutter-animation.c \ $(srcdir)/clutter-animator.c \ $(srcdir)/clutter-backend.c \ - $(srcdir)/clutter-behaviour.c \ - $(srcdir)/clutter-behaviour-depth.c \ - $(srcdir)/clutter-behaviour-ellipse.c \ - $(srcdir)/clutter-behaviour-opacity.c \ - $(srcdir)/clutter-behaviour-path.c \ - $(srcdir)/clutter-behaviour-rotate.c \ - $(srcdir)/clutter-behaviour-scale.c \ $(srcdir)/clutter-bezier.c \ $(srcdir)/clutter-bind-constraint.c \ $(srcdir)/clutter-binding-pool.c \ @@ -176,8 +156,7 @@ source_c = \ $(srcdir)/clutter-fixed-layout.c \ $(srcdir)/clutter-flatten-effect.c \ $(srcdir)/clutter-flow-layout.c \ - $(srcdir)/clutter-frame-source.c \ - $(srcdir)/clutter-gesture-action.c \ + $(srcdir)/clutter-gesture-action.c \ $(srcdir)/clutter-group.c \ $(srcdir)/clutter-input-device.c \ $(srcdir)/clutter-interval.c \ @@ -199,7 +178,6 @@ source_c = \ $(srcdir)/clutter-script-parser.c \ $(srcdir)/clutter-scriptable.c \ $(srcdir)/clutter-settings.c \ - $(srcdir)/clutter-shader.c \ $(srcdir)/clutter-shader-effect.c \ $(srcdir)/clutter-shader-types.c \ $(srcdir)/clutter-swipe-action.c \ @@ -212,7 +190,6 @@ source_c = \ $(srcdir)/clutter-texture.c \ $(srcdir)/clutter-text.c \ $(srcdir)/clutter-timeline.c \ - $(srcdir)/clutter-timeout-pool.c \ $(srcdir)/clutter-units.c \ $(srcdir)/clutter-util.c \ $(srcdir)/clutter-paint-volume.c \ @@ -240,7 +217,6 @@ source_h_priv = \ $(srcdir)/clutter-script-private.h \ $(srcdir)/clutter-stage-manager-private.h \ $(srcdir)/clutter-stage-private.h \ - $(srcdir)/clutter-timeout-interval.h \ $(NULL) # private source code; these should not be introspected @@ -248,7 +224,6 @@ source_c_priv = \ $(srcdir)/clutter-event-translator.c \ $(srcdir)/clutter-id-pool.c \ $(srcdir)/clutter-profile.c \ - $(srcdir)/clutter-timeout-interval.c \ $(NULL) # built sources diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 81ba12b57..ca73928dd 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -291,7 +291,6 @@ #include "clutter-action.h" #include "clutter-actor-meta-private.h" #include "clutter-animatable.h" -#include "clutter-behaviour.h" #include "clutter-constraint.h" #include "clutter-container.h" #include "clutter-debug.h" @@ -305,11 +304,9 @@ #include "clutter-profile.h" #include "clutter-scriptable.h" #include "clutter-script-private.h" -#include "clutter-shader.h" #include "clutter-stage-private.h" #include "clutter-units.h" -typedef struct _ShaderData ShaderData; typedef struct _AnchorCoord AnchorCoord; #define CLUTTER_ACTOR_GET_PRIVATE(obj) \ @@ -629,10 +626,6 @@ static void clutter_scriptable_iface_init (ClutterScriptableIface *iface); static void clutter_animatable_iface_init (ClutterAnimatableIface *iface); static void atk_implementor_iface_init (AtkImplementorIface *iface); -static void clutter_actor_shader_pre_paint (ClutterActor *actor, - gboolean repeat); -static void clutter_actor_shader_post_paint (ClutterActor *actor); - /* These setters are all static for now, maybe they should be in the * public API, but they are perhaps obscure enough to leave only as * properties @@ -691,8 +684,6 @@ static ClutterPaintVolume *_clutter_actor_get_paint_volume_mutable (ClutterActor { _transform; } \ cogl_matrix_translate ((m), -_tx, -_ty, -_tz); } G_STMT_END -static GQuark quark_shader_data = 0; - G_DEFINE_ABSTRACT_TYPE_WITH_CODE (ClutterActor, clutter_actor, G_TYPE_INITIALLY_UNOWNED, @@ -2649,12 +2640,6 @@ _clutter_actor_update_last_paint_volume (ClutterActor *self) priv->last_paint_volume_valid = TRUE; } -static inline gboolean -actor_has_shader_data (ClutterActor *self) -{ - return g_object_get_qdata (G_OBJECT (self), quark_shader_data) != NULL; -} - guint32 _clutter_actor_get_pick_id (ClutterActor *self) { @@ -2908,21 +2893,15 @@ clutter_actor_paint (ClutterActor *self) } if (priv->effects == NULL) + priv->next_effect_to_paint = NULL; + else { - if (actor_has_shader_data (self)) - clutter_actor_shader_pre_paint (self, FALSE); - priv->next_effect_to_paint = NULL; + priv->next_effect_to_paint = + _clutter_meta_group_peek_metas (priv->effects); } - else - priv->next_effect_to_paint = - _clutter_meta_group_peek_metas (priv->effects); clutter_actor_continue_paint (self); - if (priv->effects == NULL && - actor_has_shader_data (self)) - clutter_actor_shader_post_paint (self); - if (G_UNLIKELY (clutter_paint_debug_flags & CLUTTER_DEBUG_PAINT_VOLUMES)) _clutter_actor_draw_paint_volume (self); @@ -3789,8 +3768,6 @@ clutter_actor_class_init (ClutterActorClass *klass) GObjectClass *object_class = G_OBJECT_CLASS (klass); GParamSpec *pspec; - quark_shader_data = g_quark_from_static_string ("-clutter-actor-shader-data"); - object_class->set_property = clutter_actor_set_property; object_class->get_property = clutter_actor_get_property; object_class->dispose = clutter_actor_dispose; @@ -7694,26 +7671,6 @@ clutter_actor_get_name (ClutterActor *self) } /** - * clutter_actor_get_gid: - * @self: A #ClutterActor - * - * Retrieves the unique id for @self. - * - * Return value: Globally unique value for this object instance. - * - * Since: 0.6 - * - * Deprecated: 1.8: The id is not used any longer. - */ -guint32 -clutter_actor_get_gid (ClutterActor *self) -{ - g_return_val_if_fail (CLUTTER_IS_ACTOR (self), 0); - - return self->priv->id; -} - -/** * clutter_actor_set_depth: * @self: a #ClutterActor * @depth: Z co-ord @@ -9158,40 +9115,6 @@ parse_actor_metas (ClutterScript *script, return g_slist_reverse (retval); } -static GSList * -parse_behaviours (ClutterScript *script, - ClutterActor *actor, - JsonNode *node) -{ - GList *elements, *l; - GSList *retval = NULL; - - if (!JSON_NODE_HOLDS_ARRAY (node)) - return NULL; - - elements = json_array_get_elements (json_node_get_array (node)); - - for (l = elements; l != NULL; l = l->next) - { - JsonNode *element = l->data; - const gchar *id_ = _clutter_script_get_id_from_node (element); - GObject *behaviour; - - if (id_ == NULL || *id_ == '\0') - continue; - - behaviour = clutter_script_get_object (script, id_); - if (behaviour == NULL) - continue; - - retval = g_slist_prepend (retval, behaviour); - } - - g_list_free (elements); - - return g_slist_reverse (retval); -} - static gboolean clutter_actor_parse_custom_node (ClutterScriptable *scriptable, ClutterScript *script, @@ -9250,17 +9173,6 @@ clutter_actor_parse_custom_node (ClutterScriptable *scriptable, else g_slice_free (RotationInfo, info); } - else if (strcmp (name, "behaviours") == 0) - { - GSList *l; - - l = parse_behaviours (script, actor, node); - - g_value_init (value, G_TYPE_POINTER); - g_value_set_pointer (value, l); - - retval = TRUE; - } else if (strcmp (name, "actions") == 0 || strcmp (name, "constraints") == 0 || strcmp (name, "effects") == 0) @@ -9320,26 +9232,6 @@ clutter_actor_set_custom_property (ClutterScriptable *scriptable, return; } - if (strcmp (name, "behaviours") == 0) - { - GSList *behaviours, *l; - - if (!G_VALUE_HOLDS (value, G_TYPE_POINTER)) - return; - - behaviours = g_value_get_pointer (value); - for (l = behaviours; l != NULL; l = l->next) - { - ClutterBehaviour *behaviour = l->data; - - clutter_behaviour_apply (behaviour, actor); - } - - g_slist_free (behaviours); - - return; - } - if (strcmp (name, "actions") == 0 || strcmp (name, "constraints") == 0 || strcmp (name, "effects") == 0) @@ -9933,305 +9825,6 @@ G_DEFINE_BOXED_TYPE_WITH_CODE (ClutterVertex, clutter_vertex, clutter_vertex_free, CLUTTER_REGISTER_INTERVAL_PROGRESS (clutter_vertex_progress)); -struct _ShaderData -{ - ClutterShader *shader; - - /* back pointer to the actor */ - ClutterActor *actor; - - /* list of values that should be set on the shader - * before each paint cycle - */ - GHashTable *value_hash; -}; - -static void -shader_value_free (gpointer data) -{ - GValue *var = data; - g_value_unset (var); - g_slice_free (GValue, var); -} - -static void -destroy_shader_data (gpointer data) -{ - ShaderData *shader_data = data; - - if (shader_data == NULL) - return; - - if (shader_data->shader != NULL) - { - g_object_unref (shader_data->shader); - shader_data->shader = NULL; - } - - if (shader_data->value_hash != NULL) - { - g_hash_table_destroy (shader_data->value_hash); - shader_data->value_hash = NULL; - } - - g_slice_free (ShaderData, shader_data); -} - - -/** - * clutter_actor_get_shader: - * @self: a #ClutterActor - * - * Queries the currently set #ClutterShader on @self. - * - * Return value: (transfer none): The currently set #ClutterShader - * or %NULL if no shader is set. - * - * Since: 0.6 - * - * Deprecated: 1.8: Use clutter_actor_get_effect() instead. - */ -ClutterShader * -clutter_actor_get_shader (ClutterActor *self) -{ - ShaderData *shader_data; - - g_return_val_if_fail (CLUTTER_IS_ACTOR (self), NULL); - - shader_data = g_object_get_qdata (G_OBJECT (self), quark_shader_data); - if (shader_data != NULL) - return shader_data->shader; - - return NULL; -} - -/** - * clutter_actor_set_shader: - * @self: a #ClutterActor - * @shader: (allow-none): a #ClutterShader or %NULL to unset the shader. - * - * Sets the #ClutterShader to be used when rendering @self. - * - * If @shader is %NULL this function will unset any currently set shader - * for the actor. - * - * <note>Any #ClutterEffect applied to @self will take the precedence - * over the #ClutterShader set using this function.</note> - * - * Return value: %TRUE if the shader was successfully applied - * or removed - * - * Since: 0.6 - * - * Deprecated: 1.8: Use #ClutterShaderEffect and - * clutter_actor_add_effect() instead. - */ -gboolean -clutter_actor_set_shader (ClutterActor *self, - ClutterShader *shader) -{ - ShaderData *shader_data; - - g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE); - g_return_val_if_fail (shader == NULL || CLUTTER_IS_SHADER (shader), FALSE); - - if (shader != NULL) - g_object_ref (shader); - else - { - /* if shader passed in is NULL we destroy the shader */ - g_object_set_qdata (G_OBJECT (self), quark_shader_data, NULL); - return TRUE; - } - - shader_data = g_object_get_qdata (G_OBJECT (self), quark_shader_data); - if (shader_data == NULL) - { - shader_data = g_slice_new (ShaderData); - shader_data->actor = self; - shader_data->shader = NULL; - shader_data->value_hash = - g_hash_table_new_full (g_str_hash, g_str_equal, - g_free, - shader_value_free); - - g_object_set_qdata_full (G_OBJECT (self), quark_shader_data, - shader_data, - destroy_shader_data); - } - - if (shader_data->shader != NULL) - g_object_unref (shader_data->shader); - - shader_data->shader = shader; - - clutter_actor_queue_redraw (self); - - return TRUE; -} - - -static void -set_each_param (gpointer key, - gpointer value, - gpointer user_data) -{ - ClutterShader *shader = user_data; - const gchar *uniform = key; - GValue *var = value; - - clutter_shader_set_uniform (shader, uniform, var); -} - -static void -clutter_actor_shader_pre_paint (ClutterActor *actor, - gboolean repeat) -{ - ShaderData *shader_data; - ClutterShader *shader; - - shader_data = g_object_get_qdata (G_OBJECT (actor), quark_shader_data); - if (shader_data == NULL) - return; - - shader = shader_data->shader; - if (shader != NULL) - { - clutter_shader_set_is_enabled (shader, TRUE); - - g_hash_table_foreach (shader_data->value_hash, set_each_param, shader); - - if (!repeat) - _clutter_context_push_shader_stack (actor); - } -} - -static void -clutter_actor_shader_post_paint (ClutterActor *actor) -{ - ShaderData *shader_data; - ClutterShader *shader; - - shader_data = g_object_get_qdata (G_OBJECT (actor), quark_shader_data); - if (shader_data == NULL) - return; - - shader = shader_data->shader; - if (shader != NULL) - { - ClutterActor *head; - - clutter_shader_set_is_enabled (shader, FALSE); - - /* remove the actor from the shaders stack; if there is another - * actor inside it, then call pre-paint again to set its shader - * but this time with the second argument being TRUE, indicating - * that we are re-applying an existing shader and thus should it - * not be prepended to the stack - */ - head = _clutter_context_pop_shader_stack (actor); - if (head != NULL) - clutter_actor_shader_pre_paint (head, TRUE); - } -} - -/** - * clutter_actor_set_shader_param: - * @self: a #ClutterActor - * @param: the name of the parameter - * @value: the value of the parameter - * - * Sets the value for a named parameter of the shader applied - * to @actor. - * - * Since: 1.0 - * - * Deprecated: 1.8: Use clutter_shader_effect_set_uniform_value() instead - */ -void -clutter_actor_set_shader_param (ClutterActor *self, - const gchar *param, - const GValue *value) -{ - ShaderData *shader_data; - GValue *var; - - g_return_if_fail (CLUTTER_IS_ACTOR (self)); - g_return_if_fail (param != NULL); - g_return_if_fail (CLUTTER_VALUE_HOLDS_SHADER_FLOAT (value) || - CLUTTER_VALUE_HOLDS_SHADER_INT (value) || - CLUTTER_VALUE_HOLDS_SHADER_MATRIX (value) || - G_VALUE_HOLDS_FLOAT (value) || - G_VALUE_HOLDS_INT (value)); - - shader_data = g_object_get_qdata (G_OBJECT (self), quark_shader_data); - if (shader_data == NULL) - return; - - var = g_slice_new0 (GValue); - g_value_init (var, G_VALUE_TYPE (value)); - g_value_copy (value, var); - g_hash_table_insert (shader_data->value_hash, g_strdup (param), var); - - clutter_actor_queue_redraw (self); -} - -/** - * clutter_actor_set_shader_param_float: - * @self: a #ClutterActor - * @param: the name of the parameter - * @value: the value of the parameter - * - * Sets the value for a named float parameter of the shader applied - * to @actor. - * - * Since: 0.8 - * - * Deprecated: 1.8: Use clutter_shader_effect_set_uniform() instead - */ -void -clutter_actor_set_shader_param_float (ClutterActor *self, - const gchar *param, - gfloat value) -{ - GValue var = { 0, }; - - g_value_init (&var, G_TYPE_FLOAT); - g_value_set_float (&var, value); - - clutter_actor_set_shader_param (self, param, &var); - - g_value_unset (&var); -} - -/** - * clutter_actor_set_shader_param_int: - * @self: a #ClutterActor - * @param: the name of the parameter - * @value: the value of the parameter - * - * Sets the value for a named int parameter of the shader applied to - * @actor. - * - * Since: 0.8 - * - * Deprecated: 1.8: Use clutter_shader_effect_set_uniform() instead - */ -void -clutter_actor_set_shader_param_int (ClutterActor *self, - const gchar *param, - gint value) -{ - GValue var = { 0, }; - - g_value_init (&var, G_TYPE_INT); - g_value_set_int (&var, value); - - clutter_actor_set_shader_param (self, param, &var); - - g_value_unset (&var); -} - /** * clutter_actor_is_rotated: * @self: a #ClutterActor diff --git a/clutter/clutter-actor.h b/clutter/clutter-actor.h index 832d901af..06cf98b50 100644 --- a/clutter/clutter-actor.h +++ b/clutter/clutter-actor.h @@ -461,10 +461,6 @@ void clutter_actor_set_name (ClutterActor const gchar *name); const gchar * clutter_actor_get_name (ClutterActor *self); -#ifndef CLUTTER_DISABLE_DEPRECATED -guint32 clutter_actor_get_gid (ClutterActor *self); -#endif - void clutter_actor_set_clip (ClutterActor *self, gfloat xoff, gfloat yoff, @@ -533,25 +529,6 @@ gboolean clutter_actor_event (ClutterActor ClutterEvent *event, gboolean capture); -#ifndef CLUTTER_DISABLE_DEPRECATED -ClutterActor * clutter_get_actor_by_gid (guint32 id_); -#endif - -#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION) -gboolean clutter_actor_set_shader (ClutterActor *self, - ClutterShader *shader); -ClutterShader * clutter_actor_get_shader (ClutterActor *self); -void clutter_actor_set_shader_param (ClutterActor *self, - const gchar *param, - const GValue *value); -void clutter_actor_set_shader_param_int (ClutterActor *self, - const gchar *param, - gint value); -void clutter_actor_set_shader_param_float (ClutterActor *self, - const gchar *param, - gfloat value); -#endif /* CLUTTER_DISABLE_DEPRECATED */ - void clutter_actor_set_anchor_point (ClutterActor *self, gfloat anchor_x, gfloat anchor_y); diff --git a/clutter/clutter-backend.c b/clutter/clutter-backend.c index 73eddcb7d..fa9588a63 100644 --- a/clutter/clutter-backend.c +++ b/clutter/clutter-backend.c @@ -65,8 +65,6 @@ struct _ClutterBackendPrivate { cairo_font_options_t *font_options; - gchar *font_name; - gfloat units_per_em; gint32 units_serial; @@ -107,7 +105,6 @@ clutter_backend_finalize (GObject *gobject) { ClutterBackend *backend = CLUTTER_BACKEND (gobject); - g_free (backend->priv->font_name); clutter_backend_set_font_options (backend, NULL); G_OBJECT_CLASS (clutter_backend_parent_class)->finalize (gobject); @@ -635,129 +632,6 @@ clutter_get_default_backend (void) } /** - * clutter_backend_set_double_click_time: - * @backend: a #ClutterBackend - * @msec: milliseconds between two button press events - * - * Sets the maximum time between two button press events, used to - * verify whether it's a double click event or not. - * - * Since: 0.4 - * - * Deprecated: 1.4: Use #ClutterSettings:double-click-time instead - */ -void -clutter_backend_set_double_click_time (ClutterBackend *backend, - guint msec) -{ - ClutterSettings *settings = clutter_settings_get_default (); - - g_object_set (settings, "double-click-time", msec, NULL); -} - -/** - * clutter_backend_get_double_click_time: - * @backend: a #ClutterBackend - * - * Gets the maximum time between two button press events, as set - * by clutter_backend_set_double_click_time(). - * - * Return value: a time in milliseconds - * - * Since: 0.4 - * - * Deprecated: 1.4: Use #ClutterSettings:double-click-time instead - */ -guint -clutter_backend_get_double_click_time (ClutterBackend *backend) -{ - ClutterSettings *settings = clutter_settings_get_default (); - gint retval; - - g_object_get (settings, "double-click-time", &retval, NULL); - - return retval; -} - -/** - * clutter_backend_set_double_click_distance: - * @backend: a #ClutterBackend - * @distance: a distance, in pixels - * - * Sets the maximum distance used to verify a double click event. - * - * Since: 0.4 - * - * Deprecated: 1.4: Use #ClutterSettings:double-click-distance instead - */ -void -clutter_backend_set_double_click_distance (ClutterBackend *backend, - guint distance) -{ - ClutterSettings *settings = clutter_settings_get_default (); - - g_object_set (settings, "double-click-distance", distance, NULL); -} - -/** - * clutter_backend_get_double_click_distance: - * @backend: a #ClutterBackend - * - * Retrieves the distance used to verify a double click event - * - * Return value: a distance, in pixels. - * - * Since: 0.4 - * - * Deprecated: 1.4: Use #ClutterSettings:double-click-distance instead - */ -guint -clutter_backend_get_double_click_distance (ClutterBackend *backend) -{ - ClutterSettings *settings = clutter_settings_get_default (); - gint retval; - - g_object_get (settings, "double-click-distance", &retval, NULL); - - return retval; -} - -/** - * clutter_backend_set_resolution: - * @backend: a #ClutterBackend - * @dpi: the resolution in "dots per inch" (Physical inches aren't - * actually involved; the terminology is conventional). - * - * Sets the resolution for font handling on the screen. This is a - * scale factor between points specified in a #PangoFontDescription - * and cairo units. The default value is 96, meaning that a 10 point - * font will be 13 units high. (10 * 96. / 72. = 13.3). - * - * Applications should never need to call this function. - * - * Since: 0.4 - * - * Deprecated: Use #ClutterSettings:font-dpi instead - */ -void -clutter_backend_set_resolution (ClutterBackend *backend, - gdouble dpi) -{ - ClutterSettings *settings; - gint resolution; - - g_return_if_fail (CLUTTER_IS_BACKEND (backend)); - - if (dpi < 0) - resolution = -1; - else - resolution = dpi * 1024; - - settings = clutter_settings_get_default (); - g_object_set (settings, "font-dpi", resolution, NULL); -} - -/** * clutter_backend_get_resolution: * @backend: a #ClutterBackend * @@ -870,64 +744,6 @@ clutter_backend_get_font_options (ClutterBackend *backend) return priv->font_options; } -/** - * clutter_backend_set_font_name: - * @backend: a #ClutterBackend - * @font_name: the name of the font - * - * Sets the default font to be used by Clutter. The @font_name string - * must either be %NULL, which means that the font name from the - * default #ClutterBackend will be used; or be something that can - * be parsed by the pango_font_description_from_string() function. - * - * Since: 1.0 - * - * Deprecated: 1.4: Use #ClutterSettings:font-name instead - */ -void -clutter_backend_set_font_name (ClutterBackend *backend, - const gchar *font_name) -{ - ClutterSettings *settings = clutter_settings_get_default (); - - g_object_set (settings, "font-name", font_name, NULL); -} - -/** - * clutter_backend_get_font_name: - * @backend: a #ClutterBackend - * - * Retrieves the default font name as set by - * clutter_backend_set_font_name(). - * - * Return value: the font name for the backend. The returned string is - * owned by the #ClutterBackend and should never be modified or freed - * - * Since: 1.0 - * - * Deprecated: 1.4: Use #ClutterSettings:font-name instead - */ -const gchar * -clutter_backend_get_font_name (ClutterBackend *backend) -{ - ClutterBackendPrivate *priv; - ClutterSettings *settings; - - g_return_val_if_fail (CLUTTER_IS_BACKEND (backend), NULL); - - priv = backend->priv; - - settings = clutter_settings_get_default (); - - /* XXX yuck. but we return a const pointer, so we need to - * store it in the backend - */ - g_free (priv->font_name); - g_object_get (settings, "font-name", &priv->font_name, NULL); - - return priv->font_name; -} - gint32 _clutter_backend_get_units_serial (ClutterBackend *backend) { diff --git a/clutter/clutter-backend.h b/clutter/clutter-backend.h index df8f2cc2d..3c8241933 100644 --- a/clutter/clutter-backend.h +++ b/clutter/clutter-backend.h @@ -60,20 +60,6 @@ GType clutter_backend_get_type (void) G_GNUC_CONST; ClutterBackend *clutter_get_default_backend (void); -#ifndef CLUTTER_DISABLE_DEPRECATED -void clutter_backend_set_resolution (ClutterBackend *backend, - gdouble dpi); -void clutter_backend_set_double_click_time (ClutterBackend *backend, - guint msec); -guint clutter_backend_get_double_click_time (ClutterBackend *backend); -void clutter_backend_set_double_click_distance (ClutterBackend *backend, - guint distance); -guint clutter_backend_get_double_click_distance (ClutterBackend *backend); -void clutter_backend_set_font_name (ClutterBackend *backend, - const gchar *font_name); -const gchar * clutter_backend_get_font_name (ClutterBackend *backend); -#endif /* CLUTTER_DISABLE_DEPRECATED */ - gdouble clutter_backend_get_resolution (ClutterBackend *backend); void clutter_backend_set_font_options (ClutterBackend *backend, diff --git a/clutter/clutter-behaviour-depth.c b/clutter/clutter-behaviour-depth.c deleted file mode 100644 index eaf630be4..000000000 --- a/clutter/clutter-behaviour-depth.c +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * Jorn Baayen <jorn@openedhand.com> - * Emmanuele Bassi <ebassi@openedhand.com> - * - * Copyright (C) 2006 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "clutter-behaviour-depth.h" - -#include "clutter-enum-types.h" -#include "clutter-main.h" -#include "clutter-debug.h" -#include "clutter-private.h" - -/** - * SECTION:clutter-behaviour-depth - * @Title: ClutterBehaviourDepth - * @short_description: A behaviour controlling the Z position - * @Deprecated: 1.6: Use clutter_actor_animate() instead - * - * #ClutterBehaviourDepth is a simple #ClutterBehaviour controlling the - * depth of a set of actors between a start and end depth. - * - * #ClutterBehaviourDepth is available since Clutter 0.4. - */ - -G_DEFINE_TYPE (ClutterBehaviourDepth, - clutter_behaviour_depth, - CLUTTER_TYPE_BEHAVIOUR); - -struct _ClutterBehaviourDepthPrivate -{ - gint depth_start; - gint depth_end; -}; - -enum -{ - PROP_0, - - PROP_DEPTH_START, - PROP_DEPTH_END -}; - -static void -alpha_notify_foreach (ClutterBehaviour *behaviour, - ClutterActor *actor, - gpointer user_data) -{ - clutter_actor_set_depth (actor, GPOINTER_TO_INT (user_data)); -} - -static void -clutter_behaviour_depth_alpha_notify (ClutterBehaviour *behaviour, - gdouble alpha_value) -{ - ClutterBehaviourDepthPrivate *priv; - gint depth; - - priv = CLUTTER_BEHAVIOUR_DEPTH (behaviour)->priv; - - /* Need to create factor as to avoid borking signedness */ - depth = (alpha_value * (priv->depth_end - priv->depth_start)) - + priv->depth_start; - - CLUTTER_NOTE (BEHAVIOUR, "alpha: %.4f, depth: %d", alpha_value, depth); - - clutter_behaviour_actors_foreach (behaviour, - alpha_notify_foreach, - GINT_TO_POINTER (depth)); -} - -static void -clutter_behaviour_depth_applied (ClutterBehaviour *behaviour, - ClutterActor *actor) -{ - ClutterBehaviourDepth *depth = CLUTTER_BEHAVIOUR_DEPTH (behaviour); - - clutter_actor_set_depth (actor, depth->priv->depth_start); -} - -static void -clutter_behaviour_depth_set_property (GObject *gobject, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - ClutterBehaviourDepth *depth = CLUTTER_BEHAVIOUR_DEPTH (gobject); - - switch (prop_id) - { - case PROP_DEPTH_START: - depth->priv->depth_start = g_value_get_int (value); - break; - case PROP_DEPTH_END: - depth->priv->depth_end = g_value_get_int (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); - break; - } -} - -static void -clutter_behaviour_depth_get_property (GObject *gobject, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - ClutterBehaviourDepth *depth = CLUTTER_BEHAVIOUR_DEPTH (gobject); - - switch (prop_id) - { - case PROP_DEPTH_START: - g_value_set_int (value, depth->priv->depth_start); - break; - case PROP_DEPTH_END: - g_value_set_int (value, depth->priv->depth_end); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); - break; - } -} - -static void -clutter_behaviour_depth_class_init (ClutterBehaviourDepthClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - ClutterBehaviourClass *behaviour_class = CLUTTER_BEHAVIOUR_CLASS (klass); - - g_type_class_add_private (klass, sizeof (ClutterBehaviourDepthPrivate)); - - gobject_class->set_property = clutter_behaviour_depth_set_property; - gobject_class->get_property = clutter_behaviour_depth_get_property; - - behaviour_class->alpha_notify = clutter_behaviour_depth_alpha_notify; - behaviour_class->applied = clutter_behaviour_depth_applied; - - /** - * ClutterBehaviourDepth:depth-start: - * - * Start depth level to apply to the actors. - * - * Since: 0.4 - * - * Deprecated: 1.6 - */ - g_object_class_install_property (gobject_class, - PROP_DEPTH_START, - g_param_spec_int ("depth-start", - P_("Start Depth"), - P_("Initial depth to apply"), - G_MININT, G_MAXINT, 0, - CLUTTER_PARAM_READWRITE)); - /** - * ClutterBehaviourDepth:depth-end: - * - * End depth level to apply to the actors. - * - * Since: 0.4 - * - * Deprecated: 1.6 - */ - g_object_class_install_property (gobject_class, - PROP_DEPTH_END, - g_param_spec_int ("depth-end", - P_("End Depth"), - P_("Final depth to apply"), - G_MININT, G_MAXINT, 0, - CLUTTER_PARAM_READWRITE)); -} - -static void -clutter_behaviour_depth_init (ClutterBehaviourDepth *depth) -{ - depth->priv = G_TYPE_INSTANCE_GET_PRIVATE (depth, - CLUTTER_TYPE_BEHAVIOUR_DEPTH, - ClutterBehaviourDepthPrivate); -} - -/** - * clutter_behaviour_depth_new: - * @alpha: (allow-none): a #ClutterAlpha instance, or %NULL - * @depth_start: initial value of the depth - * @depth_end: final value of the depth - * - * Creates a new #ClutterBehaviourDepth which can be used to control - * the ClutterActor:depth property of a set of #ClutterActor<!-- -->s. - * - * If @alpha is not %NULL, the #ClutterBehaviour will take ownership - * of the #ClutterAlpha instance. In the case when @alpha is %NULL, - * it can be set later with clutter_behaviour_set_alpha(). - * - * Return value: (transfer full): the newly created behaviour - * - * Since: 0.4 - * - * Deprecated: 1.6 - */ -ClutterBehaviour * -clutter_behaviour_depth_new (ClutterAlpha *alpha, - gint depth_start, - gint depth_end) -{ - g_return_val_if_fail (alpha == NULL || CLUTTER_IS_ALPHA (alpha), NULL); - - return g_object_new (CLUTTER_TYPE_BEHAVIOUR_DEPTH, - "alpha", alpha, - "depth-start", depth_start, - "depth-end", depth_end, - NULL); -} - -/** - * clutter_behaviour_depth_set_bounds: - * @behaviour: a #ClutterBehaviourDepth - * @depth_start: initial value of the depth - * @depth_end: final value of the depth - * - * Sets the boundaries of the @behaviour. - * - * Since: 0.6 - * - * Deprecated: 1.6 - */ -void -clutter_behaviour_depth_set_bounds (ClutterBehaviourDepth *behaviour, - gint depth_start, - gint depth_end) -{ - ClutterBehaviourDepthPrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_DEPTH (behaviour)); - - priv = behaviour->priv; - - g_object_freeze_notify (G_OBJECT (behaviour)); - - if (priv->depth_start != depth_start) - { - priv->depth_start = depth_start; - g_object_notify (G_OBJECT (behaviour), "depth-start"); - } - - if (priv->depth_end != depth_end) - { - priv->depth_end = depth_end; - g_object_notify (G_OBJECT (behaviour), "depth-end"); - } - - g_object_thaw_notify (G_OBJECT (behaviour)); -} - -/** - * clutter_behaviour_depth_get_bounds: - * @behaviour: a #ClutterBehaviourDepth - * @depth_start: (out): return location for the initial depth value, or %NULL - * @depth_end: (out): return location for the final depth value, or %NULL - * - * Gets the boundaries of the @behaviour - * - * Since: 0.6 - * - * Deprecated: 1.6 - */ -void -clutter_behaviour_depth_get_bounds (ClutterBehaviourDepth *behaviour, - gint *depth_start, - gint *depth_end) -{ - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_DEPTH (behaviour)); - - if (depth_start) - *depth_start = behaviour->priv->depth_start; - - if (depth_end) - *depth_end = behaviour->priv->depth_end; -} diff --git a/clutter/clutter-behaviour-depth.h b/clutter/clutter-behaviour-depth.h deleted file mode 100644 index 81f0cd35c..000000000 --- a/clutter/clutter-behaviour-depth.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * Jorn Baayen <jorn@openedhand.com> - * Emmanuele Bassi <ebassi@openedhand.com> - * - * Copyright (C) 2006 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) -#error "Only <clutter/clutter.h> can be included directly." -#endif - -#ifndef __CLUTTER_BEHAVIOUR_DEPTH__ -#define __CLUTTER_BEHAVIOUR_DEPTH__ - -#include <clutter/clutter-actor.h> -#include <clutter/clutter-behaviour.h> - -G_BEGIN_DECLS - -#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION) - -#define CLUTTER_TYPE_BEHAVIOUR_DEPTH (clutter_behaviour_depth_get_type ()) -#define CLUTTER_BEHAVIOUR_DEPTH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_BEHAVIOUR_DEPTH, ClutterBehaviourDepth)) -#define CLUTTER_IS_BEHAVIOUR_DEPTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_BEHAVIOUR_DEPTH)) -#define CLUTTER_BEHAVIOUR_DEPTH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BEHAVIOUR_DEPTH, ClutterBehaviourDepthClass)) -#define CLUTTER_IS_BEHAVIOUR_DEPTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BEHAVIOUR_DEPTH)) -#define CLUTTER_BEHAVIOUR_DEPTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BEHAVIOUR_DEPTH, ClutterBehaviourDepthClass)) - -typedef struct _ClutterBehaviourDepth ClutterBehaviourDepth; -typedef struct _ClutterBehaviourDepthPrivate ClutterBehaviourDepthPrivate; -typedef struct _ClutterBehaviourDepthClass ClutterBehaviourDepthClass; - -/** - * ClutterBehaviourDepth: - * - * The #ClutterBehaviourDepth structure contains only private data - * and should be accessed using the provided API - * - * Since: 0.2 - * - * Deprecated: 1.6: Use clutter_actor_animate() with #ClutterActor:depth - * instead. - */ -struct _ClutterBehaviourDepth -{ - /*< private >*/ - ClutterBehaviour parent_instance; - - ClutterBehaviourDepthPrivate *priv; -}; - -/** - * ClutterBehaviourDepthClass: - * - * The #ClutterBehaviourDepthClass structure contains only private data - * - * Since: 0.2 - * - * Deprecated: 1.6 - */ -struct _ClutterBehaviourDepthClass -{ - /*< private >*/ - ClutterBehaviourClass parent_class; -}; - -GType clutter_behaviour_depth_get_type (void) G_GNUC_CONST; -ClutterBehaviour *clutter_behaviour_depth_new (ClutterAlpha *alpha, - gint depth_start, - gint depth_end); - -void clutter_behaviour_depth_set_bounds (ClutterBehaviourDepth *behaviour, - gint depth_start, - gint depth_end); -void clutter_behaviour_depth_get_bounds (ClutterBehaviourDepth *behaviour, - gint *depth_start, - gint *depth_end); - -#endif /* CLUTTER_DISABLE_DEPRECATED */ - -G_END_DECLS - -#endif /* __CLUTTER_BEHAVIOUR_DEPTH__ */ diff --git a/clutter/clutter-behaviour-ellipse.c b/clutter/clutter-behaviour-ellipse.c deleted file mode 100644 index 5f2c779c8..000000000 --- a/clutter/clutter-behaviour-ellipse.c +++ /dev/null @@ -1,1061 +0,0 @@ - -/* -*- mode:C; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Tomas Frydrych <tf@openedhand.com> - * - * Copyright (C) 2007 OpenedHand Ltd - * Copyright (C) 2009 Intel Corp. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -/** - * SECTION:clutter-behaviour-ellipse - * @Title: ClutterBehaviourEllipse - * @short_description: A behaviour interpolating position along an ellipse - * @Deprecated: 1.6: Use clutter_actor_animate() instead - * - * #ClutterBehaviourEllipse interpolates actors along a path defined by - * an ellipse. - * - * <note><para>When applying an ellipse behaviour to an actor, the - * behaviour will update the actor's position and depth and set them - * to what is dictated by the ellipses initial position.</para></note> - * - * Since: 0.4 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <math.h> -#include <stdlib.h> - -#include "clutter-behaviour-ellipse.h" - -#include "clutter-debug.h" -#include "clutter-enum-types.h" -#include "clutter-private.h" - -G_DEFINE_TYPE (ClutterBehaviourEllipse, - clutter_behaviour_ellipse, - CLUTTER_TYPE_BEHAVIOUR); - -#define CLUTTER_BEHAVIOUR_ELLIPSE_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ - CLUTTER_TYPE_BEHAVIOUR_ELLIPSE, \ - ClutterBehaviourEllipsePrivate)) - -enum -{ - PROP_0, - - PROP_CENTER, - PROP_WIDTH, - PROP_HEIGHT, - PROP_ANGLE_START, - PROP_ANGLE_END, - PROP_ANGLE_TILT_X, - PROP_ANGLE_TILT_Y, - PROP_ANGLE_TILT_Z, - PROP_DIRECTION, - - PROP_LAST -}; - -static GParamSpec *obj_props[PROP_LAST]; - -struct _ClutterBehaviourEllipsePrivate -{ - ClutterKnot center; - - /* a = width / 2 */ - gint a; - - /* b = height / 2 */ - gint b; - - gdouble angle_start; - gdouble angle_end; - - gdouble angle_tilt_x; - gdouble angle_tilt_y; - gdouble angle_tilt_z; - - ClutterRotateDirection direction; -}; - -typedef struct _knot3d -{ - gint x; - gint y; - gint z; -} knot3d; - -static void -clutter_behaviour_ellipse_advance (ClutterBehaviourEllipse *e, - float angle, - knot3d *knot) -{ - ClutterBehaviourEllipsePrivate *priv = e->priv; - gint x, y, z; - - x = priv->a * cosf (angle * (G_PI / 180.0)); - y = priv->b * sinf (angle * (G_PI / 180.0)); - z = 0; - - if (priv->angle_tilt_z) - { - /* - * x2 = r * cos (angle + tilt_z) - * y2 = r * sin (angle + tilt_z) - * - * These can be trasformed to the formulas below using properties of - * sin (a + b) and cos (a + b) - * - */ - gfloat x2, y2; - - x2 = x * cosf (priv->angle_tilt_z * (G_PI / 180.0)) - - y * sinf (priv->angle_tilt_z * (G_PI / 180.0)); - - y2 = y * cosf (priv->angle_tilt_z * (G_PI / 180.0)) - + x * sinf (priv->angle_tilt_z * (G_PI / 180.0)); - - x = (x2); - y = (y2); - } - - if (priv->angle_tilt_x) - { - gfloat z2, y2; - - z2 = - y * sinf (priv->angle_tilt_x * (G_PI / 180.0)); - y2 = y * cosf (priv->angle_tilt_x * (G_PI / 180.0)); - - z = z2; - y = y2; - } - - if (priv->angle_tilt_y) - { - gfloat x2, z2; - - x2 = x * cosf (priv->angle_tilt_y * (G_PI / 180.0)) - - z * sinf (priv->angle_tilt_y * (G_PI / 180.0)); - - z2 = z * cosf (priv->angle_tilt_y * (G_PI / 180.0)) - + x * sinf (priv->angle_tilt_y * (G_PI / 180.0)); - - x = x2; - z = z2; - } - - knot->x = x; - knot->y = y; - knot->z = z; - - CLUTTER_NOTE (BEHAVIOUR, "advancing to angle %.2f [%d, %d] (a: %d, b: %d)", - angle, - knot->x, knot->y, - priv->a, priv->b); -} - - -static void -actor_apply_knot_foreach (ClutterBehaviour *behave, - ClutterActor *actor, - gpointer data) -{ - ClutterBehaviourEllipsePrivate *priv; - knot3d *knot = data; - - priv = ((ClutterBehaviourEllipse *) behave)->priv; - - clutter_actor_set_position (actor, knot->x, knot->y); - - if (priv->angle_tilt_x != 0 || priv->angle_tilt_y != 0) - clutter_actor_set_depth (actor, knot->z); -} - -static inline float -clamp_angle (float a) -{ - gint rounds; - - rounds = a / 360; - if (a < 0) - rounds--; - - return a - 360 * rounds; -} - -static void -clutter_behaviour_ellipse_alpha_notify (ClutterBehaviour *behave, - gdouble alpha) -{ - ClutterBehaviourEllipse *self = CLUTTER_BEHAVIOUR_ELLIPSE (behave); - ClutterBehaviourEllipsePrivate *priv = self->priv; - gfloat start, end; - gfloat angle = 0; - knot3d knot; - - /* we do everything in single precision because it's easier, even - * though all the parameters are stored in double precision for - * consistency with the equivalent ClutterActor API - */ - start = priv->angle_start; - end = priv->angle_end; - - if (priv->direction == CLUTTER_ROTATE_CW && start >= end) - end += 360; - else if (priv->direction == CLUTTER_ROTATE_CCW && start <= end) - end -= 360; - - angle = (end - start) * alpha + start; - - clutter_behaviour_ellipse_advance (self, angle, &knot); - - knot.x += priv->center.x; - knot.y += priv->center.y; - - clutter_behaviour_actors_foreach (behave, actor_apply_knot_foreach, &knot); -} - -static void -clutter_behaviour_ellipse_set_property (GObject *gobject, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - ClutterBehaviourEllipse *el = CLUTTER_BEHAVIOUR_ELLIPSE (gobject); - ClutterBehaviourEllipsePrivate *priv = el->priv; - - switch (prop_id) - { - case PROP_ANGLE_START: - priv->angle_start = g_value_get_double (value); - break; - - case PROP_ANGLE_END: - priv->angle_end = g_value_get_double (value); - break; - - case PROP_ANGLE_TILT_X: - priv->angle_tilt_x = g_value_get_double (value); - break; - - case PROP_ANGLE_TILT_Y: - priv->angle_tilt_y = g_value_get_double (value); - break; - - case PROP_ANGLE_TILT_Z: - priv->angle_tilt_z = g_value_get_double (value); - break; - - case PROP_WIDTH: - clutter_behaviour_ellipse_set_width (el, g_value_get_int (value)); - break; - - case PROP_HEIGHT: - clutter_behaviour_ellipse_set_height (el, g_value_get_int (value)); - break; - - case PROP_CENTER: - { - ClutterKnot *knot = g_value_get_boxed (value); - if (knot) - clutter_behaviour_ellipse_set_center (el, knot->x, knot->y); - } - break; - - case PROP_DIRECTION: - priv->direction = g_value_get_enum (value); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); - break; - } -} - -static void -clutter_behaviour_ellipse_get_property (GObject *gobject, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - ClutterBehaviourEllipsePrivate *priv; - - priv = CLUTTER_BEHAVIOUR_ELLIPSE (gobject)->priv; - - switch (prop_id) - { - case PROP_ANGLE_START: - g_value_set_double (value, priv->angle_start); - break; - - case PROP_ANGLE_END: - g_value_set_double (value, priv->angle_end); - break; - - case PROP_ANGLE_TILT_X: - g_value_set_double (value, priv->angle_tilt_x); - break; - - case PROP_ANGLE_TILT_Y: - g_value_set_double (value, priv->angle_tilt_y); - break; - - case PROP_ANGLE_TILT_Z: - g_value_set_double (value, priv->angle_tilt_z); - break; - - case PROP_WIDTH: - g_value_set_int (value, (priv->a * 2)); - break; - - case PROP_HEIGHT: - g_value_set_int (value, (priv->b * 2)); - break; - - case PROP_CENTER: - g_value_set_boxed (value, &priv->center); - break; - - case PROP_DIRECTION: - g_value_set_enum (value, priv->direction); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); - break; - } -} - -static void -clutter_behaviour_ellipse_applied (ClutterBehaviour *behave, - ClutterActor *actor) -{ - ClutterBehaviourEllipse *e = CLUTTER_BEHAVIOUR_ELLIPSE (behave); - ClutterBehaviourEllipsePrivate *priv = e->priv; - knot3d knot = { 0, }; - - clutter_behaviour_ellipse_advance (e, priv->angle_start, &knot); - - clutter_actor_set_position (actor, knot.x, knot.y); - - /* the depth should be changed only if there is a tilt on - * any of the X or the Y axis - */ - if (priv->angle_tilt_x != 0 || priv->angle_tilt_y != 0) - clutter_actor_set_depth (actor, knot.z); -} - -static void -clutter_behaviour_ellipse_class_init (ClutterBehaviourEllipseClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - ClutterBehaviourClass *behave_class = CLUTTER_BEHAVIOUR_CLASS (klass); - GParamSpec *pspec = NULL; - - g_type_class_add_private (klass, sizeof (ClutterBehaviourEllipsePrivate)); - - object_class->set_property = clutter_behaviour_ellipse_set_property; - object_class->get_property = clutter_behaviour_ellipse_get_property; - - behave_class->alpha_notify = clutter_behaviour_ellipse_alpha_notify; - behave_class->applied = clutter_behaviour_ellipse_applied; - - /** - * ClutterBehaviourEllipse:angle-start: - * - * The initial angle from where the rotation should start. - * - * Since: 0.4 - */ - pspec = g_param_spec_double ("angle-start", - P_("Start Angle"), - P_("Initial angle"), - 0.0, 360.0, - 0.0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_ANGLE_START] = pspec; - g_object_class_install_property (object_class, PROP_ANGLE_START, pspec); - - /** - * ClutterBehaviourEllipse:angle-end: - * - * The final angle to where the rotation should end. - * - * Since: 0.4 - */ - pspec = g_param_spec_double ("angle-end", - P_("End Angle"), - P_("Final angle"), - 0.0, 360.0, - 0.0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_ANGLE_END] = pspec; - g_object_class_install_property (object_class, PROP_ANGLE_END, pspec); - - /** - * ClutterBehaviourEllipse:angle-tilt-x: - * - * The tilt angle for the rotation around center in X axis - * - * Since: 0.4 - */ - pspec = g_param_spec_double ("angle-tilt-x", - P_("Angle x tilt"), - P_("Tilt of the ellipse around x axis"), - 0.0, 360.0, - 360.0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_ANGLE_TILT_X] = pspec; - g_object_class_install_property (object_class, PROP_ANGLE_TILT_X, pspec); - - /** - * ClutterBehaviourEllipse:angle-tilt-y: - * - * The tilt angle for the rotation around center in Y axis - * - * Since: 0.4 - */ - pspec = g_param_spec_double ("angle-tilt-y", - P_("Angle y tilt"), - P_("Tilt of the ellipse around y axis"), - 0.0, 360.0, - 360.0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_ANGLE_TILT_Y] = pspec; - g_object_class_install_property (object_class, PROP_ANGLE_TILT_Y, pspec); - - /** - * ClutterBehaviourEllipse:angle-tilt-z: - * - * The tilt angle for the rotation on the Z axis - * - * Since: 0.4 - */ - pspec = g_param_spec_double ("angle-tilt-z", - P_("Angle z tilt"), - P_("Tilt of the ellipse around z axis"), - 0.0, 360.0, - 360.0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_ANGLE_TILT_Z] = pspec; - g_object_class_install_property (object_class, PROP_ANGLE_TILT_Z, pspec); - - /** - * ClutterBehaviourEllipse:width: - * - * Width of the ellipse, in pixels - * - * Since: 0.4 - */ - pspec = g_param_spec_int ("width", - P_("Width"), - P_("Width of the ellipse"), - 0, G_MAXINT, - 100, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_WIDTH] = pspec; - g_object_class_install_property (object_class, PROP_WIDTH, pspec); - - /** - * ClutterBehaviourEllipse:height: - * - * Height of the ellipse, in pixels - * - * Since: 0.4 - */ - pspec = g_param_spec_int ("height", - P_("Height"), - P_("Height of ellipse"), - 0, G_MAXINT, - 50, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_HEIGHT] = pspec; - g_object_class_install_property (object_class, PROP_HEIGHT, pspec); - - /** - * ClutterBehaviourEllipse:center: - * - * The center of the ellipse. - * - * Since: 0.4 - */ - pspec = g_param_spec_boxed ("center", - P_("Center"), - P_("Center of ellipse"), - CLUTTER_TYPE_KNOT, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_CENTER] = pspec; - g_object_class_install_property (object_class, PROP_CENTER, pspec); - - /** - * ClutterBehaviourEllipse:direction: - * - * The direction of the rotation. - * - * Since: 0.4 - */ - pspec = g_param_spec_enum ("direction", - P_("Direction"), - P_("Direction of rotation"), - CLUTTER_TYPE_ROTATE_DIRECTION, - CLUTTER_ROTATE_CW, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_DIRECTION] = pspec; - g_object_class_install_property (object_class, PROP_DIRECTION, pspec); -} - -static void -clutter_behaviour_ellipse_init (ClutterBehaviourEllipse * self) -{ - ClutterBehaviourEllipsePrivate *priv; - - self->priv = priv = CLUTTER_BEHAVIOUR_ELLIPSE_GET_PRIVATE (self); - - priv->direction = CLUTTER_ROTATE_CW; - - priv->angle_start = 0; - priv->angle_end = 0; - - priv->a = 50; - priv->b = 25; - - priv->angle_tilt_x = 360; - priv->angle_tilt_y = 360; - priv->angle_tilt_z = 360; -} - -/** - * clutter_behaviour_ellipse_new: - * @alpha: (allow-none): a #ClutterAlpha instance, or %NULL - * @x: x coordinace of the center - * @y: y coordiance of the center - * @width: width of the ellipse - * @height: height of the ellipse - * @direction: #ClutterRotateDirection of rotation - * @start: angle in degrees at which movement starts, between 0 and 360 - * @end: angle in degrees at which movement ends, between 0 and 360 - * - * Creates a behaviour that drives actors along an elliptical path with - * given center, width and height; the movement starts at @start - * degrees (with 0 corresponding to 12 o'clock) and ends at @end - * degrees. Angles greated than 360 degrees get clamped to the canonical - * interval <0, 360); if @start is equal to @end, the behaviour will - * rotate by exacly 360 degrees. - * - * If @alpha is not %NULL, the #ClutterBehaviour will take ownership - * of the #ClutterAlpha instance. In the case when @alpha is %NULL, - * it can be set later with clutter_behaviour_set_alpha(). - * - * Return value: the newly created #ClutterBehaviourEllipse - * - * Since: 0.4 - */ -ClutterBehaviour * -clutter_behaviour_ellipse_new (ClutterAlpha *alpha, - gint x, - gint y, - gint width, - gint height, - ClutterRotateDirection direction, - gdouble start, - gdouble end) -{ - ClutterKnot center; - - g_return_val_if_fail (alpha == NULL || CLUTTER_IS_ALPHA (alpha), NULL); - - center.x = x; - center.y = y; - - return g_object_new (CLUTTER_TYPE_BEHAVIOUR_ELLIPSE, - "alpha", alpha, - "center", ¢er, - "width", width, - "height", height, - "direction", direction, - "angle-start", start, - "angle-end", end, - NULL); -} - -/** - * clutter_behaviour_ellipse_set_center: - * @self: a #ClutterBehaviourEllipse - * @x: x coordinace of centre - * @y: y coordinace of centre - * - * Sets the center of the elliptical path to the point represented by knot. - * - * Since: 0.4 - */ -void -clutter_behaviour_ellipse_set_center (ClutterBehaviourEllipse *self, - gint x, - gint y) -{ - ClutterBehaviourEllipsePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); - - priv = self->priv; - - if (priv->center.x != x || priv->center.y != y) - { - priv->center.x = x; - priv->center.y = y; - - g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_CENTER]); - } -} - -/** - * clutter_behaviour_ellipse_get_center: - * @self: a #ClutterBehaviourEllipse - * @x: (out): return location for the X coordinate of the center, or %NULL - * @y: (out): return location for the Y coordinate of the center, or %NULL - * - * Gets the center of the elliptical path path. - * - * Since: 0.4 - */ -void -clutter_behaviour_ellipse_get_center (ClutterBehaviourEllipse *self, - gint *x, - gint *y) -{ - ClutterBehaviourEllipsePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); - - priv = self->priv; - - if (x) - *x = priv->center.x; - - if (y) - *y = priv->center.y; -} - - -/** - * clutter_behaviour_ellipse_set_width: - * @self: a #ClutterBehaviourEllipse - * @width: width of the ellipse - * - * Sets the width of the elliptical path. - * - * Since: 0.4 - */ -void -clutter_behaviour_ellipse_set_width (ClutterBehaviourEllipse *self, - gint width) -{ - ClutterBehaviourEllipsePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); - - priv = self->priv; - - if (priv->a != width / 2) - { - priv->a = width / 2; - - g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_WIDTH]); - } -} - -/** - * clutter_behaviour_ellipse_get_width: - * @self: a #ClutterBehaviourEllipse - * - * Gets the width of the elliptical path. - * - * Return value: the width of the path - * - * Since: 0.4 - */ -gint -clutter_behaviour_ellipse_get_width (ClutterBehaviourEllipse *self) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0); - - return self->priv->a * 2; -} - -/** - * clutter_behaviour_ellipse_set_height: - * @self: a #ClutterBehaviourEllipse - * @height: height of the ellipse - * - * Sets the height of the elliptical path. - * - * Since: 0.4 - */ -void -clutter_behaviour_ellipse_set_height (ClutterBehaviourEllipse *self, - gint height) -{ - ClutterBehaviourEllipsePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); - - priv = self->priv; - - if (priv->b != height / 2) - { - priv->b = height / 2; - - g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_HEIGHT]); - } -} - -/** - * clutter_behaviour_ellipse_get_height: - * @self: a #ClutterBehaviourEllipse - * - * Gets the height of the elliptical path. - * - * Return value: the height of the path - * - * Since: 0.4 - */ -gint -clutter_behaviour_ellipse_get_height (ClutterBehaviourEllipse *self) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0); - - return self->priv->b * 2; -} - -/** - * clutter_behaviour_ellipse_set_angle_start: - * @self: a #ClutterBehaviourEllipse - * @angle_start: angle at which movement starts in degrees, between 0 and 360. - * - * Sets the angle at which movement starts; angles >= 360 degress get clamped - * to the canonical interval <0, 360). - * - * Since: 0.6 - */ -void -clutter_behaviour_ellipse_set_angle_start (ClutterBehaviourEllipse *self, - gdouble angle_start) -{ - ClutterBehaviourEllipsePrivate *priv; - gdouble new_angle; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); - - new_angle = clamp_angle (angle_start); - - priv = self->priv; - - if (priv->angle_start != new_angle) - { - priv->angle_start = new_angle; - g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_START]); - } -} - -/** - * clutter_behaviour_ellipse_get_angle_start: - * @self: a #ClutterBehaviourEllipse - * - * Gets the angle at which movements starts. - * - * Return value: angle in degrees - * - * Since: 0.6 - */ -gdouble -clutter_behaviour_ellipse_get_angle_start (ClutterBehaviourEllipse *self) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0.0); - - return self->priv->angle_start; -} - -/** - * clutter_behaviour_ellipse_set_angle_end: - * @self: a #ClutterBehaviourEllipse - * @angle_end: angle at which movement ends in degrees, between 0 and 360. - * - * Sets the angle at which movement ends; angles >= 360 degress get clamped - * to the canonical interval <0, 360). - * - * Since: 0.4 - */ -void -clutter_behaviour_ellipse_set_angle_end (ClutterBehaviourEllipse *self, - gdouble angle_end) -{ - ClutterBehaviourEllipsePrivate *priv; - gdouble new_angle; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); - - new_angle = clamp_angle (angle_end); - - priv = self->priv; - - if (priv->angle_end != new_angle) - { - priv->angle_end = new_angle; - - g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_END]); - } -} - -/** - * clutter_behaviour_ellipse_get_angle_end: - * @self: a #ClutterBehaviourEllipse - * - * Gets the at which movements ends. - * - * Return value: angle in degrees - * - * Since: 0.4 - */ -gdouble -clutter_behaviour_ellipse_get_angle_end (ClutterBehaviourEllipse *self) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0.0); - - return self->priv->angle_end; -} - -/** - * clutter_behaviour_ellipse_set_angle_tilt: - * @self: a #ClutterBehaviourEllipse - * @axis: a #ClutterRotateAxis - * @angle_tilt: tilt of the elipse around the center in the given axis in - * degrees. - * - * Sets the angle at which the ellipse should be tilted around it's center. - * - * Since: 0.4 - */ -void -clutter_behaviour_ellipse_set_angle_tilt (ClutterBehaviourEllipse *self, - ClutterRotateAxis axis, - gdouble angle_tilt) -{ - ClutterBehaviourEllipsePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); - - priv = self->priv; - - switch (axis) - { - case CLUTTER_X_AXIS: - if (priv->angle_tilt_x != angle_tilt) - { - priv->angle_tilt_x = angle_tilt; - - g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_X]); - } - break; - - case CLUTTER_Y_AXIS: - if (priv->angle_tilt_y != angle_tilt) - { - priv->angle_tilt_y = angle_tilt; - - g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_Y]); - } - break; - - case CLUTTER_Z_AXIS: - if (priv->angle_tilt_z != angle_tilt) - { - priv->angle_tilt_z = angle_tilt; - - g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_Z]); - } - break; - } -} - -/** - * clutter_behaviour_ellipse_get_angle_tilt: - * @self: a #ClutterBehaviourEllipse - * @axis: a #ClutterRotateAxis - * - * Gets the tilt of the ellipse around the center in the given axis. - * - * Return value: angle in degrees. - * - * Since: 0.4 - */ -gdouble -clutter_behaviour_ellipse_get_angle_tilt (ClutterBehaviourEllipse *self, - ClutterRotateAxis axis) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0.0); - - switch (axis) - { - case CLUTTER_X_AXIS: - return self->priv->angle_tilt_x; - - case CLUTTER_Y_AXIS: - return self->priv->angle_tilt_y; - - case CLUTTER_Z_AXIS: - return self->priv->angle_tilt_z; - } - - return 0.0; -} - -/** - * clutter_behaviour_ellipse_set_tilt: - * @self: a #ClutterBehaviourEllipse - * @angle_tilt_x: tilt of the elipse around the center in X axis in degrees. - * @angle_tilt_y: tilt of the elipse around the center in Y axis in degrees. - * @angle_tilt_z: tilt of the elipse around the center in Z axis in degrees. - * - * Sets the angles at which the ellipse should be tilted around it's center. - * - * Since: 0.4 - */ -void -clutter_behaviour_ellipse_set_tilt (ClutterBehaviourEllipse *self, - gdouble angle_tilt_x, - gdouble angle_tilt_y, - gdouble angle_tilt_z) -{ - ClutterBehaviourEllipsePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); - - priv = self->priv; - - g_object_freeze_notify (G_OBJECT (self)); - - if (priv->angle_tilt_x != angle_tilt_x) - { - priv->angle_tilt_x = angle_tilt_x; - - g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_X]); - } - - if (priv->angle_tilt_y != angle_tilt_y) - { - priv->angle_tilt_y = angle_tilt_y; - - g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_Y]); - } - - if (priv->angle_tilt_z != angle_tilt_z) - { - priv->angle_tilt_z = angle_tilt_z; - - g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_Z]); - } - - g_object_thaw_notify (G_OBJECT (self)); -} - -/** - * clutter_behaviour_ellipse_get_tilt: - * @self: a #ClutterBehaviourEllipse - * @angle_tilt_x: (out): return location for tilt angle on the X axis, or %NULL. - * @angle_tilt_y: (out): return location for tilt angle on the Y axis, or %NULL. - * @angle_tilt_z: (out): return location for tilt angle on the Z axis, or %NULL. - * - * Gets the tilt of the ellipse around the center in Y axis. - * - * Since: 0.4 - */ -void -clutter_behaviour_ellipse_get_tilt (ClutterBehaviourEllipse *self, - gdouble *angle_tilt_x, - gdouble *angle_tilt_y, - gdouble *angle_tilt_z) -{ - ClutterBehaviourEllipsePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); - - priv = self->priv; - - if (angle_tilt_x) - *angle_tilt_x = priv->angle_tilt_x; - - if (angle_tilt_y) - *angle_tilt_y = priv->angle_tilt_y; - - if (angle_tilt_z) - *angle_tilt_z = priv->angle_tilt_z; -} - -/** - * clutter_behaviour_ellipse_get_direction: - * @self: a #ClutterBehaviourEllipse - * - * Retrieves the #ClutterRotateDirection used by the ellipse behaviour. - * - * Return value: the rotation direction - * - * Since: 0.4 - */ -ClutterRotateDirection -clutter_behaviour_ellipse_get_direction (ClutterBehaviourEllipse *self) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), - CLUTTER_ROTATE_CW); - - return self->priv->direction; -} - -/** - * clutter_behaviour_ellipse_set_direction: - * @self: a #ClutterBehaviourEllipse - * @direction: the rotation direction - * - * Sets the rotation direction used by the ellipse behaviour. - * - * Since: 0.4 - */ -void -clutter_behaviour_ellipse_set_direction (ClutterBehaviourEllipse *self, - ClutterRotateDirection direction) -{ - ClutterBehaviourEllipsePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); - - priv = self->priv; - - if (priv->direction != direction) - { - priv->direction = direction; - - g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_DIRECTION]); - } -} diff --git a/clutter/clutter-behaviour-ellipse.h b/clutter/clutter-behaviour-ellipse.h deleted file mode 100644 index 302d4f200..000000000 --- a/clutter/clutter-behaviour-ellipse.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Tomas Frydrych <tf@openedhand.com> - * - * Copyright (C) 2007 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) -#error "Only <clutter/clutter.h> can be included directly." -#endif - -#ifndef __CLUTTER_BEHAVIOUR_ELLIPSE_H__ -#define __CLUTTER_BEHAVIOUR_ELLIPSE_H__ - -#include <clutter/clutter-alpha.h> -#include <clutter/clutter-actor.h> -#include <clutter/clutter-behaviour.h> -#include <clutter/clutter-types.h> - -G_BEGIN_DECLS - -#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION) - -#define CLUTTER_TYPE_BEHAVIOUR_ELLIPSE (clutter_behaviour_ellipse_get_type ()) - -#define CLUTTER_BEHAVIOUR_ELLIPSE(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ - CLUTTER_TYPE_BEHAVIOUR_ELLIPSE, ClutterBehaviourEllipse)) - -#define CLUTTER_BEHAVIOUR_ELLIPSE_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), \ - CLUTTER_TYPE_BEHAVIOUR_ELLIPSE, ClutterBehaviourEllipseClass)) - -#define CLUTTER_IS_BEHAVIOUR_ELLIPSE(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ - CLUTTER_TYPE_BEHAVIOUR_ELLIPSE)) - -#define CLUTTER_IS_BEHAVIOUR_ELLIPSE_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), \ - CLUTTER_TYPE_BEHAVIOUR_ELLIPSE)) - -#define CLUTTER_BEHAVIOUR_ELLIPSE_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), \ - CLUTTER_TYPE_BEHAVIOUR_ELLIPSE, ClutterBehaviourEllipseClass)) - -typedef struct _ClutterBehaviourEllipse ClutterBehaviourEllipse; -typedef struct _ClutterBehaviourEllipsePrivate ClutterBehaviourEllipsePrivate; -typedef struct _ClutterBehaviourEllipseClass ClutterBehaviourEllipseClass; - -/** - * ClutterBehaviourEllipse: - * - * The #ClutterBehaviourEllipse struct contains only private data - * and should be accessed using the provided API - * - * Since: 0.4 - * - * Deprecated: 1.6 - */ -struct _ClutterBehaviourEllipse -{ - /*< private >*/ - ClutterBehaviour parent_instance; - ClutterBehaviourEllipsePrivate *priv; -}; - -/** - * ClutterBehaviourEllipseClass: - * - * The #ClutterBehaviourEllipseClass struct contains only private data - * - * Since: 0.4 - * - * Deprecated: 1.6 - */ -struct _ClutterBehaviourEllipseClass -{ - /*< private >*/ - ClutterBehaviourClass parent_class; -}; - -GType clutter_behaviour_ellipse_get_type (void) G_GNUC_CONST; - -ClutterBehaviour * clutter_behaviour_ellipse_new (ClutterAlpha *alpha, - gint x, - gint y, - gint width, - gint height, - ClutterRotateDirection direction, - gdouble start, - gdouble end); -void clutter_behaviour_ellipse_set_center (ClutterBehaviourEllipse *self, - gint x, - gint y); -void clutter_behaviour_ellipse_get_center (ClutterBehaviourEllipse *self, - gint *x, - gint *y); -void clutter_behaviour_ellipse_set_width (ClutterBehaviourEllipse *self, - gint width); -gint clutter_behaviour_ellipse_get_width (ClutterBehaviourEllipse *self); -void clutter_behaviour_ellipse_set_height (ClutterBehaviourEllipse *self, - gint height); -gint clutter_behaviour_ellipse_get_height (ClutterBehaviourEllipse *self); -void clutter_behaviour_ellipse_set_angle_start (ClutterBehaviourEllipse *self, - gdouble angle_start); -gdouble clutter_behaviour_ellipse_get_angle_start (ClutterBehaviourEllipse *self); -void clutter_behaviour_ellipse_set_angle_end (ClutterBehaviourEllipse *self, - gdouble angle_end); -gdouble clutter_behaviour_ellipse_get_angle_end (ClutterBehaviourEllipse *self); -void clutter_behaviour_ellipse_set_angle_tilt (ClutterBehaviourEllipse *self, - ClutterRotateAxis axis, - gdouble angle_tilt); -gdouble clutter_behaviour_ellipse_get_angle_tilt (ClutterBehaviourEllipse *self, - ClutterRotateAxis axis); -void clutter_behaviour_ellipse_set_tilt (ClutterBehaviourEllipse *self, - gdouble angle_tilt_x, - gdouble angle_tilt_y, - gdouble angle_tilt_z); -void clutter_behaviour_ellipse_get_tilt (ClutterBehaviourEllipse *self, - gdouble *angle_tilt_x, - gdouble *angle_tilt_y, - gdouble *angle_tilt_z); -ClutterRotateDirection clutter_behaviour_ellipse_get_direction (ClutterBehaviourEllipse *self); -void clutter_behaviour_ellipse_set_direction (ClutterBehaviourEllipse *self, - ClutterRotateDirection direction); - -#endif /* CLUTTER_DISABLE_DEPRECATED */ - -G_END_DECLS - -#endif /* __CLUTTER_BEHAVIOUR_ELLIPSE_H__ */ diff --git a/clutter/clutter-behaviour-opacity.c b/clutter/clutter-behaviour-opacity.c deleted file mode 100644 index e322c67d1..000000000 --- a/clutter/clutter-behaviour-opacity.c +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * - * Copyright (C) 2006 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -/** - * SECTION:clutter-behaviour-opacity - * @Title: ClutterBehaviourOpacity - * @short_description: A behaviour controlling opacity - * @Deprecated: 1.6: Use clutter_actor_animate() instead. - * - * #ClutterBehaviourOpacity controls the opacity of a set of actors. - * - * Since: 0.2 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <math.h> - -#include "clutter-behaviour-opacity.h" - -#include "clutter-private.h" -#include "clutter-debug.h" - -G_DEFINE_TYPE (ClutterBehaviourOpacity, - clutter_behaviour_opacity, - CLUTTER_TYPE_BEHAVIOUR); - -struct _ClutterBehaviourOpacityPrivate -{ - guint8 opacity_start; - guint8 opacity_end; -}; - -#define CLUTTER_BEHAVIOUR_OPACITY_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ - CLUTTER_TYPE_BEHAVIOUR_OPACITY, \ - ClutterBehaviourOpacityPrivate)) - -enum -{ - PROP_0, - - PROP_OPACITY_START, - PROP_OPACITY_END, - - PROP_LAST -}; - -static GParamSpec *obj_props[PROP_LAST]; - -static void -alpha_notify_foreach (ClutterBehaviour *behaviour, - ClutterActor *actor, - gpointer data) -{ - clutter_actor_set_opacity (actor, GPOINTER_TO_UINT(data)); -} - -static void -clutter_behaviour_alpha_notify (ClutterBehaviour *behave, - gdouble alpha_value) -{ - ClutterBehaviourOpacityPrivate *priv; - guint8 opacity; - - priv = CLUTTER_BEHAVIOUR_OPACITY (behave)->priv; - - opacity = alpha_value - * (priv->opacity_end - priv->opacity_start) - + priv->opacity_start; - - CLUTTER_NOTE (BEHAVIOUR, "alpha: %.4f, opacity: %u", - alpha_value, - opacity); - - clutter_behaviour_actors_foreach (behave, - alpha_notify_foreach, - GUINT_TO_POINTER ((guint) opacity)); -} - -static void -clutter_behaviour_opacity_set_property (GObject *gobject, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - ClutterBehaviourOpacity *self = CLUTTER_BEHAVIOUR_OPACITY (gobject); - - switch (prop_id) - { - case PROP_OPACITY_START: - clutter_behaviour_opacity_set_bounds (self, - g_value_get_uint (value), - self->priv->opacity_end); - break; - - case PROP_OPACITY_END: - clutter_behaviour_opacity_set_bounds (self, - self->priv->opacity_start, - g_value_get_uint (value)); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); - break; - } -} - -static void -clutter_behaviour_opacity_get_property (GObject *gobject, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - ClutterBehaviourOpacity *self = CLUTTER_BEHAVIOUR_OPACITY (gobject); - - switch (prop_id) - { - case PROP_OPACITY_START: - g_value_set_uint (value, self->priv->opacity_start); - break; - - case PROP_OPACITY_END: - g_value_set_uint (value, self->priv->opacity_end); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); - break; - } -} - -static void -clutter_behaviour_opacity_class_init (ClutterBehaviourOpacityClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - ClutterBehaviourClass *behave_class = CLUTTER_BEHAVIOUR_CLASS (klass); - GParamSpec *pspec; - - g_type_class_add_private (klass, sizeof (ClutterBehaviourOpacityPrivate)); - - gobject_class->set_property = clutter_behaviour_opacity_set_property; - gobject_class->get_property = clutter_behaviour_opacity_get_property; - - /** - * ClutterBehaviourOpacity:opacity-start: - * - * Initial opacity level of the behaviour. - * - * Since: 0.2 - * - * Deprecated: 1.6 - */ - pspec = g_param_spec_uint ("opacity-start", - P_("Opacity Start"), - P_("Initial opacity level"), - 0, 255, - 0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_OPACITY_START] = pspec; - g_object_class_install_property (gobject_class, PROP_OPACITY_START, pspec); - - /** - * ClutterBehaviourOpacity:opacity-end: - * - * Final opacity level of the behaviour. - * - * Since: 0.2 - * - * Deprecated: 1.6 - */ - pspec = g_param_spec_uint ("opacity-end", - P_("Opacity End"), - P_("Final opacity level"), - 0, 255, - 0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_OPACITY_END] = pspec; - g_object_class_install_property (gobject_class, PROP_OPACITY_END, pspec); - - behave_class->alpha_notify = clutter_behaviour_alpha_notify; -} - -static void -clutter_behaviour_opacity_init (ClutterBehaviourOpacity *self) -{ - self->priv = CLUTTER_BEHAVIOUR_OPACITY_GET_PRIVATE (self); - - self->priv->opacity_start = 0; - self->priv->opacity_end = 0; -} - -/** - * clutter_behaviour_opacity_new: - * @alpha: (allow-none): a #ClutterAlpha instance, or %NULL - * @opacity_start: minimum level of opacity - * @opacity_end: maximum level of opacity - * - * Creates a new #ClutterBehaviourOpacity object, driven by @alpha - * which controls the opacity property of every actor, making it - * change in the interval between @opacity_start and @opacity_end. - * - * If @alpha is not %NULL, the #ClutterBehaviour will take ownership - * of the #ClutterAlpha instance. In the case when @alpha is %NULL, - * it can be set later with clutter_behaviour_set_alpha(). - * - * Return value: the newly created #ClutterBehaviourOpacity - * - * Since: 0.2 - * - * Deprecated: 1.6 - */ -ClutterBehaviour * -clutter_behaviour_opacity_new (ClutterAlpha *alpha, - guint8 opacity_start, - guint8 opacity_end) -{ - return g_object_new (CLUTTER_TYPE_BEHAVIOUR_OPACITY, - "alpha", alpha, - "opacity-start", opacity_start, - "opacity-end", opacity_end, - NULL); -} - -/** - * clutter_behaviour_opacity_set_bounds: - * @behaviour: a #ClutterBehaviourOpacity - * @opacity_start: minimum level of opacity - * @opacity_end: maximum level of opacity - * - * Sets the initial and final levels of the opacity applied by @behaviour - * on each actor it controls. - * - * Since: 0.6 - * - * Deprecated: 1.6 - */ -void -clutter_behaviour_opacity_set_bounds (ClutterBehaviourOpacity *behaviour, - guint8 opacity_start, - guint8 opacity_end) -{ - ClutterBehaviourOpacityPrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_OPACITY (behaviour)); - - priv = behaviour->priv; - - g_object_freeze_notify (G_OBJECT (behaviour)); - - if (priv->opacity_start != opacity_start) - { - priv->opacity_start = opacity_start; - - g_object_notify_by_pspec (G_OBJECT (behaviour), obj_props[PROP_OPACITY_START]); - } - - if (priv->opacity_end != opacity_end) - { - priv->opacity_end = opacity_end; - - g_object_notify_by_pspec (G_OBJECT (behaviour), obj_props[PROP_OPACITY_END]); - } - - g_object_thaw_notify (G_OBJECT (behaviour)); -} - -/** - * clutter_behaviour_opacity_get_bounds: - * @behaviour: a #ClutterBehaviourOpacity - * @opacity_start: (out): return location for the minimum level of opacity, or %NULL - * @opacity_end: (out): return location for the maximum level of opacity, or %NULL - * - * Gets the initial and final levels of the opacity applied by @behaviour - * on each actor it controls. - * - * Since: 0.6 - * - * Deprecated: 1.6 - */ -void -clutter_behaviour_opacity_get_bounds (ClutterBehaviourOpacity *behaviour, - guint8 *opacity_start, - guint8 *opacity_end) -{ - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_OPACITY (behaviour)); - - if (opacity_start) - *opacity_start = behaviour->priv->opacity_start; - - if (opacity_end) - *opacity_end = behaviour->priv->opacity_end; -} diff --git a/clutter/clutter-behaviour-opacity.h b/clutter/clutter-behaviour-opacity.h deleted file mode 100644 index aa38ddb9b..000000000 --- a/clutter/clutter-behaviour-opacity.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * Jorn Baayen <jorn@openedhand.com> - * Emmanuele Bassi <ebassi@openedhand.com> - * - * Copyright (C) 2006 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) -#error "Only <clutter/clutter.h> can be included directly." -#endif - -#ifndef __CLUTTER_BEHAVIOUR_OPACITY_H__ -#define __CLUTTER_BEHAVIOUR_OPACITY_H__ - -#include <clutter/clutter-alpha.h> -#include <clutter/clutter-behaviour.h> - -G_BEGIN_DECLS - -#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION) - -#define CLUTTER_TYPE_BEHAVIOUR_OPACITY (clutter_behaviour_opacity_get_type ()) - -#define CLUTTER_BEHAVIOUR_OPACITY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ - CLUTTER_TYPE_BEHAVIOUR_OPACITY, ClutterBehaviourOpacity)) - -#define CLUTTER_BEHAVIOUR_OPACITY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), \ - CLUTTER_TYPE_BEHAVIOUR_OPACITY, ClutterBehaviourOpacityClass)) - -#define CLUTTER_IS_BEHAVIOUR_OPACITY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ - CLUTTER_TYPE_BEHAVIOUR_OPACITY)) - -#define CLUTTER_IS_BEHAVIOUR_OPACITY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), \ - CLUTTER_TYPE_BEHAVIOUR_OPACITY)) - -#define CLUTTER_BEHAVIOUR_OPACITY_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), \ - CLUTTER_TYPE_BEHAVIOUR_OPACITY, ClutterBehaviourOpacityClass)) - -typedef struct _ClutterBehaviourOpacity ClutterBehaviourOpacity; -typedef struct _ClutterBehaviourOpacityPrivate ClutterBehaviourOpacityPrivate; -typedef struct _ClutterBehaviourOpacityClass ClutterBehaviourOpacityClass; - -/** - * ClutterBehaviourOpacity: - * - * The #ClutterBehaviourOpacity structure contains only private data and - * should be accessed using the provided API - * - * Since: 0.2 - * - * Deprecated: 1.6: Use clutter_actor_animate() and #ClutterActor:opacity - * instead. - */ -struct _ClutterBehaviourOpacity -{ - /*< private >*/ - ClutterBehaviour parent; - ClutterBehaviourOpacityPrivate *priv; -}; - -/** - * ClutterBehaviourOpacityClass: - * - * The #ClutterBehaviourOpacityClass structure contains only private data - * - * Since: 0.2 - * - * Deprecated: 1.6 - */ -struct _ClutterBehaviourOpacityClass -{ - /*< private >*/ - ClutterBehaviourClass parent_class; -}; - -GType clutter_behaviour_opacity_get_type (void) G_GNUC_CONST; - -ClutterBehaviour *clutter_behaviour_opacity_new (ClutterAlpha *alpha, - guint8 opacity_start, - guint8 opacity_end); - -void clutter_behaviour_opacity_set_bounds (ClutterBehaviourOpacity *behaviour, - guint8 opacity_start, - guint8 opacity_end); -void clutter_behaviour_opacity_get_bounds (ClutterBehaviourOpacity *behaviour, - guint8 *opacity_start, - guint8 *opacity_end); - -#endif /* CLUTTER_DISABLE_DEPRECATED */ - -G_END_DECLS - -#endif /* __CLUTTER_BEHAVIOUR_OPACITY_H__ */ diff --git a/clutter/clutter-behaviour-path.c b/clutter/clutter-behaviour-path.c deleted file mode 100644 index 4c9214034..000000000 --- a/clutter/clutter-behaviour-path.c +++ /dev/null @@ -1,471 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By: - * Matthew Allum <mallum@openedhand.com> - * Neil Roberts <neil@linux.intel.com> - * - * Copyright (C) 2006, 2007, 2008 OpenedHand Ltd - * Copyright (C) 2009, 2010 Intel Corp - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -/** - * SECTION:clutter-behaviour-path - * @Title: ClutterBehaviourPath - * @short_description: A behaviour for moving actors along a #ClutterPath - * @Deprecated: 1.6: Use #ClutterPathConstraint and clutter_actor_animate() - * with the #ClutterPathConstraint:offset property instead. - * - * #ClutterBehaviourPath interpolates actors along a defined path. - * - * A path is described by a #ClutterPath object. The path can contain - * straight line parts and bezier curves. If the path contains - * %CLUTTER_PATH_MOVE_TO parts then the actors will jump to those - * coordinates. This can be used make disjoint paths. - * - * When creating a path behaviour in a #ClutterScript, you can specify - * the path property directly as a string. For example: - * - * |[ - * { - * "id" : "spline-path", - * "type" : "ClutterBehaviourPath", - * "path" : "M 50 50 L 100 100", - * "alpha" : { - * "timeline" : "main-timeline", - * "function" : "ramp - * } - * } - * ]| - * - * <note>If the alpha function is a periodic function, i.e. it returns to - * 0.0 after reaching 1.0, then the actors will walk the path back to the - * starting #ClutterKnot.</note> - * - * #ClutterBehaviourPath is available since Clutter 0.2 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "clutter-behaviour-path.h" - -#include "clutter-bezier.h" -#include "clutter-debug.h" -#include "clutter-enum-types.h" -#include "clutter-main.h" -#include "clutter-marshal.h" -#include "clutter-private.h" -#include "clutter-script-private.h" -#include "clutter-scriptable.h" - -#include <math.h> - -static void clutter_scriptable_iface_init (ClutterScriptableIface *iface); - -G_DEFINE_TYPE_WITH_CODE (ClutterBehaviourPath, - clutter_behaviour_path, - CLUTTER_TYPE_BEHAVIOUR, - G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_SCRIPTABLE, - clutter_scriptable_iface_init)); - -struct _ClutterBehaviourPathPrivate -{ - ClutterPath *path; - guint last_knot_passed; -}; - -#define CLUTTER_BEHAVIOUR_PATH_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ - CLUTTER_TYPE_BEHAVIOUR_PATH, \ - ClutterBehaviourPathPrivate)) - -enum -{ - KNOT_REACHED, - - LAST_SIGNAL -}; - -static guint path_signals[LAST_SIGNAL] = { 0, }; - -enum -{ - PROP_0, - - PROP_PATH, - - PROP_LAST -}; - -static GParamSpec *obj_props[PROP_LAST]; - -static void -actor_apply_knot_foreach (ClutterBehaviour *behaviour, - ClutterActor *actor, - gpointer data) -{ - ClutterKnot *knot = data; - - CLUTTER_NOTE (BEHAVIOUR, "Setting actor to %ix%i", knot->x, knot->y); - - clutter_actor_set_position (actor, knot->x, knot->y); -} - -static void -clutter_behaviour_path_alpha_notify (ClutterBehaviour *behave, - gdouble alpha_value) -{ - ClutterBehaviourPath *pathb = CLUTTER_BEHAVIOUR_PATH (behave); - ClutterBehaviourPathPrivate *priv = pathb->priv; - ClutterKnot position; - guint knot_num; - - if (priv->path) - knot_num = clutter_path_get_position (priv->path, alpha_value, &position); - else - { - memset (&position, 0, sizeof (position)); - knot_num = 0; - } - - clutter_behaviour_actors_foreach (behave, - actor_apply_knot_foreach, - &position); - - if (knot_num != priv->last_knot_passed) - { - g_signal_emit (behave, path_signals[KNOT_REACHED], 0, knot_num); - priv->last_knot_passed = knot_num; - } -} - -static void -clutter_behaviour_path_get_property (GObject *gobject, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - ClutterBehaviourPath *pathb = CLUTTER_BEHAVIOUR_PATH (gobject); - - switch (prop_id) - { - case PROP_PATH: - g_value_set_object (value, clutter_behaviour_path_get_path (pathb)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); - break; - } -} - -static void -clutter_behaviour_path_set_property (GObject *gobject, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - ClutterBehaviourPath *pathb = CLUTTER_BEHAVIOUR_PATH (gobject); - - switch (prop_id) - { - case PROP_PATH: - clutter_behaviour_path_set_path (pathb, g_value_get_object (value)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); - break; - } -} - -static void -clutter_behaviour_path_dispose (GObject *gobject) -{ - ClutterBehaviourPath *pathb = CLUTTER_BEHAVIOUR_PATH (gobject); - - clutter_behaviour_path_set_path (pathb, NULL); - - G_OBJECT_CLASS (clutter_behaviour_path_parent_class)->dispose (gobject); -} - -static void -clutter_behaviour_path_class_init (ClutterBehaviourPathClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - ClutterBehaviourClass *behave_class = CLUTTER_BEHAVIOUR_CLASS (klass); - GParamSpec *pspec; - - gobject_class->get_property = clutter_behaviour_path_get_property; - gobject_class->set_property = clutter_behaviour_path_set_property; - gobject_class->dispose = clutter_behaviour_path_dispose; - - pspec = g_param_spec_object ("path", - P_("Path"), - P_("The ClutterPath object representing the path " - "to animate along"), - CLUTTER_TYPE_PATH, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_PATH] = pspec; - g_object_class_install_property (gobject_class, PROP_PATH, pspec); - - /** - * ClutterBehaviourPath::knot-reached: - * @pathb: the object which received the signal - * @knot_num: the index of the #ClutterKnot reached - * - * This signal is emitted each time a node defined inside the path - * is reached. - * - * Since: 0.2 - * - * Deprecated: 1.6 - */ - path_signals[KNOT_REACHED] = - g_signal_new ("knot-reached", - G_TYPE_FROM_CLASS (gobject_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (ClutterBehaviourPathClass, knot_reached), - NULL, NULL, - _clutter_marshal_VOID__UINT, - G_TYPE_NONE, 1, - G_TYPE_UINT); - - behave_class->alpha_notify = clutter_behaviour_path_alpha_notify; - - g_type_class_add_private (klass, sizeof (ClutterBehaviourPathPrivate)); -} - -static ClutterScriptableIface *parent_scriptable_iface = NULL; - -static gboolean -clutter_behaviour_path_parse_custom_node (ClutterScriptable *scriptable, - ClutterScript *script, - GValue *value, - const gchar *name, - JsonNode *node) -{ - if (strcmp ("path", name) == 0) - { - ClutterPath *path; - GValue node_value = { 0 }; - - path = g_object_ref_sink (clutter_path_new ()); - - json_node_get_value (node, &node_value); - - if (!G_VALUE_HOLDS (&node_value, G_TYPE_STRING) - || !clutter_path_set_description (path, - g_value_get_string (&node_value))) - g_warning ("Invalid path description"); - - g_value_unset (&node_value); - - g_value_init (value, G_TYPE_OBJECT); - g_value_take_object (value, path); - - return TRUE; - } - /* chain up */ - else if (parent_scriptable_iface->parse_custom_node) - return parent_scriptable_iface->parse_custom_node (scriptable, script, - value, name, node); - else - return FALSE; -} - -static void -clutter_scriptable_iface_init (ClutterScriptableIface *iface) -{ - parent_scriptable_iface = g_type_interface_peek_parent (iface); - - if (!parent_scriptable_iface) - parent_scriptable_iface - = g_type_default_interface_peek (CLUTTER_TYPE_SCRIPTABLE); - - iface->parse_custom_node = clutter_behaviour_path_parse_custom_node; -} - -static void -clutter_behaviour_path_init (ClutterBehaviourPath *self) -{ - ClutterBehaviourPathPrivate *priv; - - self->priv = priv = CLUTTER_BEHAVIOUR_PATH_GET_PRIVATE (self); - - priv->path = NULL; - priv->last_knot_passed = G_MAXUINT; -} - -/** - * clutter_behaviour_path_new: - * @alpha: (allow-none): a #ClutterAlpha instance, or %NULL - * @path: a #ClutterPath or %NULL for an empty path - * - * Creates a new path behaviour. You can use this behaviour to drive - * actors along the nodes of a path, described by @path. - * - * This will claim the floating reference on the #ClutterPath so you - * do not need to unref if it. - * - * If @alpha is not %NULL, the #ClutterBehaviour will take ownership - * of the #ClutterAlpha instance. In the case when @alpha is %NULL, - * it can be set later with clutter_behaviour_set_alpha(). - * - * Return value: (transfer full): a #ClutterBehaviour - * - * Since: 0.2 - * - * Deprecated: 1.6 - */ -ClutterBehaviour * -clutter_behaviour_path_new (ClutterAlpha *alpha, - ClutterPath *path) -{ - return g_object_new (CLUTTER_TYPE_BEHAVIOUR_PATH, - "alpha", alpha, - "path", path, - NULL); -} - -/** - * clutter_behaviour_path_new_with_description: - * @alpha: (allow-none): a #ClutterAlpha instance, or %NULL - * @desc: a string description of the path - * - * Creates a new path behaviour using the path described by @desc. See - * clutter_path_add_string() for a description of the format. - * - * If @alpha is not %NULL, the #ClutterBehaviour will take ownership - * of the #ClutterAlpha instance. In the case when @alpha is %NULL, - * it can be set later with clutter_behaviour_set_alpha(). - * - * Return value: (transfer full): a #ClutterBehaviour - * - * Since: 1.0 - * - * Deprecated: 1.6 - */ -ClutterBehaviour * -clutter_behaviour_path_new_with_description (ClutterAlpha *alpha, - const gchar *desc) -{ - return g_object_new (CLUTTER_TYPE_BEHAVIOUR_PATH, - "alpha", alpha, - "path", clutter_path_new_with_description (desc), - NULL); -} - -/** - * clutter_behaviour_path_new_with_knots: - * @alpha: (allow-none): a #ClutterAlpha instance, or %NULL - * @knots: an array of #ClutterKnot<!-- -->s - * @n_knots: number of entries in @knots - * - * Creates a new path behaviour that will make the actors visit all of - * the given knots in order with straight lines in between. - * - * A path will be created where the first knot is used in a - * %CLUTTER_PATH_MOVE_TO and the subsequent knots are used in - * %CLUTTER_PATH_LINE_TO<!-- -->s. - * - * If @alpha is not %NULL, the #ClutterBehaviour will take ownership - * of the #ClutterAlpha instance. In the case when @alpha is %NULL, - * it can be set later with clutter_behaviour_set_alpha(). - * - * Return value: (transfer full): a #ClutterBehaviour - * - * Since: 1.0 - * - * Deprecated: 1.6 - */ -ClutterBehaviour * -clutter_behaviour_path_new_with_knots (ClutterAlpha *alpha, - const ClutterKnot *knots, - guint n_knots) -{ - ClutterPath *path = clutter_path_new (); - guint i; - - if (n_knots > 0) - { - clutter_path_add_move_to (path, knots[0].x, knots[0].y); - - for (i = 1; i < n_knots; i++) - clutter_path_add_line_to (path, knots[i].x, knots[i].y); - } - - return g_object_new (CLUTTER_TYPE_BEHAVIOUR_PATH, - "alpha", alpha, - "path", path, - NULL); -} - -/** - * clutter_behaviour_path_set_path: - * @pathb: the path behaviour - * @path: the new path to follow - * - * Change the path that the actors will follow. This will take the - * floating reference on the #ClutterPath so you do not need to unref - * it. - * - * Since: 1.0 - * - * Deprecated: 1.6 - */ -void -clutter_behaviour_path_set_path (ClutterBehaviourPath *pathb, - ClutterPath *path) -{ - ClutterBehaviourPathPrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_PATH (pathb)); - - priv = pathb->priv; - - if (path) - g_object_ref_sink (path); - - if (priv->path) - g_object_unref (priv->path); - - priv->path = path; - - g_object_notify_by_pspec (G_OBJECT (pathb), obj_props[PROP_PATH]); -} - -/** - * clutter_behaviour_path_get_path: - * @pathb: a #ClutterBehaviourPath instance - * - * Get the current path of the behaviour - * - * Return value: (transfer none): the path - * - * Since: 1.0 - * - * Deprecated: 1.6 - */ -ClutterPath * -clutter_behaviour_path_get_path (ClutterBehaviourPath *pathb) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_PATH (pathb), NULL); - - return pathb->priv->path; -} diff --git a/clutter/clutter-behaviour-path.h b/clutter/clutter-behaviour-path.h deleted file mode 100644 index 731aebddf..000000000 --- a/clutter/clutter-behaviour-path.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * Jorn Baayen <jorn@openedhand.com> - * Emmanuele Bassi <ebassi@openedhand.com> - * - * Copyright (C) 2006 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) -#error "Only <clutter/clutter.h> can be included directly." -#endif - -#ifndef __CLUTTER_BEHAVIOUR_PATH_H__ -#define __CLUTTER_BEHAVIOUR_PATH_H__ - -#include <clutter/clutter-alpha.h> -#include <clutter/clutter-behaviour.h> -#include <clutter/clutter-path.h> - -G_BEGIN_DECLS - -#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION) - -#define CLUTTER_TYPE_BEHAVIOUR_PATH (clutter_behaviour_path_get_type ()) - -#define CLUTTER_BEHAVIOUR_PATH(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ - CLUTTER_TYPE_BEHAVIOUR_PATH, ClutterBehaviourPath)) - -#define CLUTTER_BEHAVIOUR_PATH_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), \ - CLUTTER_TYPE_BEHAVIOUR_PATH, ClutterBehaviourPathClass)) - -#define CLUTTER_IS_BEHAVIOUR_PATH(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ - CLUTTER_TYPE_BEHAVIOUR_PATH)) - -#define CLUTTER_IS_BEHAVIOUR_PATH_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), \ - CLUTTER_TYPE_BEHAVIOUR_PATH)) - -#define CLUTTER_BEHAVIOUR_PATH_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), \ - CLUTTER_TYPE_BEHAVIOUR_PATH, ClutterBehaviourPathClass)) - -typedef struct _ClutterBehaviourPath ClutterBehaviourPath; -typedef struct _ClutterBehaviourPathPrivate ClutterBehaviourPathPrivate; -typedef struct _ClutterBehaviourPathClass ClutterBehaviourPathClass; - -/** - * ClutterBehaviourPath: - * - * The #ClutterBehaviourPath structure contains only private data - * and should be accessed using the provided API - * - * Since: 0.2 - * - * Deprecated: 1.6: Use #ClutterPathConstraint and clutter_actor_animate() - * instead. - */ -struct _ClutterBehaviourPath -{ - /*< private >*/ - ClutterBehaviour parent; - ClutterBehaviourPathPrivate *priv; -}; - -/** - * ClutterBehaviourPathClass - * @knot_reached: signal class handler for the - * ClutterBehaviourPath::knot_reached signal - * - * The #ClutterBehaviourPathClass struct contains only private data - * - * Since: 0.2 - * - * Deprecated: 1.6 - */ -struct _ClutterBehaviourPathClass -{ - /*< private >*/ - ClutterBehaviourClass parent_class; - - /*< public >*/ - void (*knot_reached) (ClutterBehaviourPath *pathb, - guint knot_num); - - /*< private >*/ - void (*_clutter_path_1) (void); - void (*_clutter_path_2) (void); - void (*_clutter_path_3) (void); - void (*_clutter_path_4) (void); -}; - -GType clutter_behaviour_path_get_type (void) G_GNUC_CONST; - -ClutterBehaviour *clutter_behaviour_path_new (ClutterAlpha *alpha, - ClutterPath *path); - -ClutterBehaviour *clutter_behaviour_path_new_with_description - (ClutterAlpha *alpha, - const gchar *desc); - -ClutterBehaviour *clutter_behaviour_path_new_with_knots - (ClutterAlpha *alpha, - const ClutterKnot *knots, - guint n_knots); - -void clutter_behaviour_path_set_path (ClutterBehaviourPath *pathb, - ClutterPath *path); - -ClutterPath * clutter_behaviour_path_get_path (ClutterBehaviourPath *pathb); - -#endif /* CLUTTER_DISABLE_DEPRECATED */ - -G_END_DECLS - -#endif /* __CLUTTER_BEHAVIOUR_PATH_H__ */ diff --git a/clutter/clutter-behaviour-rotate.c b/clutter/clutter-behaviour-rotate.c deleted file mode 100644 index c38dc1800..000000000 --- a/clutter/clutter-behaviour-rotate.c +++ /dev/null @@ -1,689 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * - * Copyright (C) 2007 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -/** - * SECTION:clutter-behaviour-rotate - * @short_description: A behaviour controlling rotation - * - * A #ClutterBehaviourRotate rotate actors between a starting and ending - * angle on a given axis. - * - * The #ClutterBehaviourRotate is available since version 0.4. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "clutter-behaviour-rotate.h" - -#include <math.h> - -#include "clutter-debug.h" -#include "clutter-enum-types.h" -#include "clutter-main.h" -#include "clutter-private.h" - -G_DEFINE_TYPE (ClutterBehaviourRotate, - clutter_behaviour_rotate, - CLUTTER_TYPE_BEHAVIOUR); - -struct _ClutterBehaviourRotatePrivate -{ - gdouble angle_start; - gdouble angle_end; - - ClutterRotateAxis axis; - ClutterRotateDirection direction; - - gint center_x; - gint center_y; - gint center_z; -}; - -#define CLUTTER_BEHAVIOUR_ROTATE_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ - CLUTTER_TYPE_BEHAVIOUR_ROTATE, \ - ClutterBehaviourRotatePrivate)) - -enum -{ - PROP_0, - - PROP_ANGLE_START, - PROP_ANGLE_END, - PROP_AXIS, - PROP_DIRECTION, - PROP_CENTER_X, - PROP_CENTER_Y, - PROP_CENTER_Z, - - PROP_LAST -}; - -static GParamSpec *obj_props[PROP_LAST]; - -typedef struct { - gdouble angle; -} RotateFrameClosure; - -static void -alpha_notify_foreach (ClutterBehaviour *behaviour, - ClutterActor *actor, - gpointer data) -{ - RotateFrameClosure *closure = data; - ClutterBehaviourRotate *rotate_behaviour; - ClutterBehaviourRotatePrivate *priv; - - rotate_behaviour = CLUTTER_BEHAVIOUR_ROTATE (behaviour); - priv = rotate_behaviour->priv; - - clutter_actor_set_rotation (actor, priv->axis, - closure->angle, - priv->center_x, - priv->center_y, - priv->center_z); -} - -static inline float -clamp_angle (float a) -{ - float a1, a2; - gint rounds; - - rounds = a / 360.0; - a1 = rounds * 360.0; - a2 = a - a1; - - return a2; -} - -static void -clutter_behaviour_rotate_alpha_notify (ClutterBehaviour *behaviour, - gdouble alpha_value) -{ - ClutterBehaviourRotate *rotate_behaviour; - ClutterBehaviourRotatePrivate *priv; - RotateFrameClosure closure; - gdouble start, end; - - rotate_behaviour = CLUTTER_BEHAVIOUR_ROTATE (behaviour); - priv = rotate_behaviour->priv; - - closure.angle = 0; - start = priv->angle_start; - end = priv->angle_end; - - if (priv->direction == CLUTTER_ROTATE_CW && start >= end) - end += 360.0; - else if (priv->direction == CLUTTER_ROTATE_CCW && start <= end) - end -= 360.0; - - closure.angle = (end - start) * alpha_value + start; - - clutter_behaviour_actors_foreach (behaviour, - alpha_notify_foreach, - &closure); -} - -static void -clutter_behaviour_rotate_set_property (GObject *gobject, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - ClutterBehaviourRotate *rotate; - ClutterBehaviourRotatePrivate *priv; - - rotate = CLUTTER_BEHAVIOUR_ROTATE (gobject); - priv = rotate->priv; - - switch (prop_id) - { - case PROP_ANGLE_START: - priv->angle_start = g_value_get_double (value); - break; - - case PROP_ANGLE_END: - priv->angle_end = g_value_get_double (value); - break; - - case PROP_AXIS: - priv->axis = g_value_get_enum (value); - break; - - case PROP_DIRECTION: - priv->direction = g_value_get_enum (value); - break; - - case PROP_CENTER_X: - clutter_behaviour_rotate_set_center (rotate, - g_value_get_int (value), - priv->center_y, - priv->center_z); - break; - - case PROP_CENTER_Y: - clutter_behaviour_rotate_set_center (rotate, - priv->center_x, - g_value_get_int (value), - priv->center_z); - break; - - case PROP_CENTER_Z: - clutter_behaviour_rotate_set_center (rotate, - priv->center_x, - priv->center_y, - g_value_get_int (value)); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); - break; - } -} - -static void -clutter_behaviour_rotate_get_property (GObject *gobject, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - ClutterBehaviourRotatePrivate *priv; - - priv = CLUTTER_BEHAVIOUR_ROTATE (gobject)->priv; - - switch (prop_id) - { - case PROP_ANGLE_START: - g_value_set_double (value, priv->angle_start); - break; - - case PROP_ANGLE_END: - g_value_set_double (value, priv->angle_end); - break; - - case PROP_AXIS: - g_value_set_enum (value, priv->axis); - break; - - case PROP_DIRECTION: - g_value_set_enum (value, priv->direction); - break; - - case PROP_CENTER_X: - g_value_set_int (value, priv->center_x); - break; - - case PROP_CENTER_Y: - g_value_set_int (value, priv->center_y); - break; - - case PROP_CENTER_Z: - g_value_set_int (value, priv->center_z); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); - break; - } -} - -static void -clutter_behaviour_rotate_class_init (ClutterBehaviourRotateClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - ClutterBehaviourClass *behaviour_class = CLUTTER_BEHAVIOUR_CLASS (klass); - GParamSpec *pspec = NULL; - - g_type_class_add_private (klass, sizeof (ClutterBehaviourRotatePrivate)); - - gobject_class->set_property = clutter_behaviour_rotate_set_property; - gobject_class->get_property = clutter_behaviour_rotate_get_property; - - behaviour_class->alpha_notify = clutter_behaviour_rotate_alpha_notify; - - /** - * ClutterBehaviourRotate:angle-start: - * - * The initial angle from whence the rotation should start. - * - * Since: 0.4 - */ - pspec = g_param_spec_double ("angle-start", - P_("Angle Begin"), - P_("Initial angle"), - 0.0, 360.0, - 0.0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_ANGLE_START] = pspec; - g_object_class_install_property (gobject_class, - PROP_ANGLE_START, - pspec); - - /** - * ClutterBehaviourRotate:angle-end: - * - * The final angle to where the rotation should end. - * - * Since: 0.4 - */ - pspec = g_param_spec_double ("angle-end", - P_("Angle End"), - P_("Final angle"), - 0.0, 360.0, - 0.0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_ANGLE_END] = pspec; - g_object_class_install_property (gobject_class, - PROP_ANGLE_END, - pspec); - - /** - * ClutterBehaviourRotate:axis: - * - * The axis of rotation. - * - * Since: 0.4 - */ - pspec = g_param_spec_enum ("axis", - P_("Axis"), - P_("Axis of rotation"), - CLUTTER_TYPE_ROTATE_AXIS, - CLUTTER_Z_AXIS, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_AXIS] = pspec; - g_object_class_install_property (gobject_class, - PROP_AXIS, - pspec); - - /** - * ClutterBehaviourRotate:direction: - * - * The direction of the rotation. - * - * Since: 0.4 - */ - pspec = g_param_spec_enum ("direction", - P_("Direction"), - P_("Direction of rotation"), - CLUTTER_TYPE_ROTATE_DIRECTION, - CLUTTER_ROTATE_CW, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_DIRECTION] = pspec; - g_object_class_install_property (gobject_class, - PROP_DIRECTION, - pspec); - - /** - * ClutterBehaviourRotate:center-x: - * - * The x center of rotation. - * - * Since: 0.4 - */ - pspec = g_param_spec_int ("center-x", - P_("Center X"), - P_("X coordinate of the center of rotation"), - -G_MAXINT, G_MAXINT, - 0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_CENTER_X] = pspec; - g_object_class_install_property (gobject_class, - PROP_CENTER_X, - pspec); - - /** - * ClutterBehaviourRotate:center-y: - * - * The y center of rotation. - * - * Since: 0.4 - */ - pspec = g_param_spec_int ("center-y", - P_("Center Y"), - P_("Y coordinate of the center of rotation"), - -G_MAXINT, G_MAXINT, - 0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_CENTER_Y] = pspec; - g_object_class_install_property (gobject_class, - PROP_CENTER_Y, - pspec); - - /** - * ClutterBehaviourRotate:center-z: - * - * The z center of rotation. - * - * Since: 0.4 - */ - pspec = g_param_spec_int ("center-z", - P_("Center Z"), - P_("Z coordinate of the center of rotation"), - -G_MAXINT, G_MAXINT, - 0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_CENTER_Z] = pspec; - g_object_class_install_property (gobject_class, - PROP_CENTER_Z, - pspec); -} - -static void -clutter_behaviour_rotate_init (ClutterBehaviourRotate *rotate) -{ - ClutterBehaviourRotatePrivate *priv; - - rotate->priv = priv = CLUTTER_BEHAVIOUR_ROTATE_GET_PRIVATE (rotate); - - priv->angle_start = priv->angle_end = 0; - - priv->axis = CLUTTER_Z_AXIS; - - priv->direction = CLUTTER_ROTATE_CW; - - priv->center_x = priv->center_y = priv->center_z = 0; -} - -/** - * clutter_behaviour_rotate_new: - * @alpha: (allow-none): a #ClutterAlpha instance, or %NULL - * @axis: the rotation axis - * @direction: the rotation direction - * @angle_start: the starting angle in degrees, between 0 and 360. - * @angle_end: the final angle in degrees, between 0 and 360. - * - * Creates a new #ClutterBehaviourRotate. This behaviour will rotate actors - * bound to it on @axis, following @direction, between @angle_start and - * @angle_end. Angles >= 360 degrees will be clamped to the canonical interval - * <0, 360), if angle_start == angle_end, the behaviour will carry out a - * single rotation of 360 degrees. - * - * If @alpha is not %NULL, the #ClutterBehaviour will take ownership - * of the #ClutterAlpha instance. In the case when @alpha is %NULL, - * it can be set later with clutter_behaviour_set_alpha(). - * - * Return value: the newly created #ClutterBehaviourRotate. - * - * Since: 0.4 - */ -ClutterBehaviour * -clutter_behaviour_rotate_new (ClutterAlpha *alpha, - ClutterRotateAxis axis, - ClutterRotateDirection direction, - gdouble angle_start, - gdouble angle_end) -{ - g_return_val_if_fail (alpha == NULL || CLUTTER_IS_ALPHA (alpha), NULL); - - return g_object_new (CLUTTER_TYPE_BEHAVIOUR_ROTATE, - "alpha", alpha, - "axis", axis, - "direction", direction, - "angle-start", angle_start, - "angle-end", angle_end, - NULL); -} - -/** - * clutter_behaviour_rotate_get_axis: - * @rotate: a #ClutterBehaviourRotate - * - * Retrieves the #ClutterRotateAxis used by the rotate behaviour. - * - * Return value: the rotation axis - * - * Since: 0.4 - */ -ClutterRotateAxis -clutter_behaviour_rotate_get_axis (ClutterBehaviourRotate *rotate) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ROTATE (rotate), CLUTTER_Z_AXIS); - - return rotate->priv->axis; -} - -/** - * clutter_behaviour_rotate_set_axis: - * @rotate: a #ClutterBehaviourRotate - * @axis: a #ClutterRotateAxis - * - * Sets the axis used by the rotate behaviour. - * - * Since: 0.4 - */ -void -clutter_behaviour_rotate_set_axis (ClutterBehaviourRotate *rotate, - ClutterRotateAxis axis) -{ - ClutterBehaviourRotatePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ROTATE (rotate)); - - priv = rotate->priv; - - if (priv->axis != axis) - { - priv->axis = axis; - - g_object_notify_by_pspec (G_OBJECT (rotate), obj_props[PROP_AXIS]); - } -} - -/** - * clutter_behaviour_rotate_get_direction: - * @rotate: a #ClutterBehaviourRotate - * - * Retrieves the #ClutterRotateDirection used by the rotate behaviour. - * - * Return value: the rotation direction - * - * Since: 0.4 - */ -ClutterRotateDirection -clutter_behaviour_rotate_get_direction (ClutterBehaviourRotate *rotate) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ROTATE (rotate), - CLUTTER_ROTATE_CW); - - return rotate->priv->direction; -} - -/** - * clutter_behaviour_rotate_set_direction: - * @rotate: a #ClutterBehaviourRotate - * @direction: the rotation direction - * - * Sets the rotation direction used by the rotate behaviour. - * - * Since: 0.4 - */ -void -clutter_behaviour_rotate_set_direction (ClutterBehaviourRotate *rotate, - ClutterRotateDirection direction) -{ - ClutterBehaviourRotatePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ROTATE (rotate)); - - priv = rotate->priv; - - if (priv->direction != direction) - { - priv->direction = direction; - - g_object_notify_by_pspec (G_OBJECT (rotate), obj_props[PROP_DIRECTION]); - } -} - -/** - * clutter_behaviour_rotate_get_bounds: - * @rotate: a #ClutterBehaviourRotate - * @angle_start: return value for the initial angle - * @angle_end: return value for the final angle - * - * Retrieves the rotation boundaries of the rotate behaviour. - * - * Since: 0.4 - */ -void -clutter_behaviour_rotate_get_bounds (ClutterBehaviourRotate *rotate, - gdouble *angle_start, - gdouble *angle_end) -{ - ClutterBehaviourRotatePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ROTATE (rotate)); - - priv = rotate->priv; - - if (angle_start) - *angle_start = priv->angle_start; - - if (angle_end) - *angle_end = priv->angle_end; -} - -/** - * clutter_behaviour_rotate_set_bounds: - * @rotate: a #ClutterBehaviourRotate - * @angle_start: initial angle in degrees, between 0 and 360. - * @angle_end: final angle in degrees, between 0 and 360. - * - * Sets the initial and final angles of a rotation behaviour; angles >= 360 - * degrees get clamped to the canonical interval <0, 360). - * - * Since: 0.4 - */ -void -clutter_behaviour_rotate_set_bounds (ClutterBehaviourRotate *rotate, - gdouble angle_start, - gdouble angle_end) -{ - ClutterBehaviourRotatePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ROTATE (rotate)); - - priv = rotate->priv; - - g_object_freeze_notify (G_OBJECT (rotate)); - - if (priv->angle_start != angle_start) - { - priv->angle_start = clamp_angle (angle_start); - - g_object_notify_by_pspec (G_OBJECT (rotate), obj_props[PROP_ANGLE_START]); - } - - if (priv->angle_end != angle_end) - { - priv->angle_end = clamp_angle (angle_end); - - g_object_notify_by_pspec (G_OBJECT (rotate), obj_props[PROP_ANGLE_END]); - } - - g_object_thaw_notify (G_OBJECT (rotate)); -} - -/** - * clutter_behaviour_rotate_set_center: - * @rotate: a #ClutterBehaviourRotate - * @x: X axis center of rotation - * @y: Y axis center of rotation - * @z: Z axis center of rotation - * - * Sets the center of rotation. The coordinates are relative to the plane - * normal to the rotation axis set with clutter_behaviour_rotate_set_axis(). - * - * Since: 0.4 - */ -void -clutter_behaviour_rotate_set_center (ClutterBehaviourRotate *rotate, - gint x, - gint y, - gint z) -{ - ClutterBehaviourRotatePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ROTATE (rotate)); - - priv = rotate->priv; - - g_object_freeze_notify (G_OBJECT (rotate)); - - if (priv->center_x != x) - { - priv->center_x = x; - g_object_notify_by_pspec (G_OBJECT (rotate), obj_props[PROP_CENTER_X]); - } - - if (priv->center_y != y) - { - priv->center_y = y; - g_object_notify_by_pspec (G_OBJECT (rotate), obj_props[PROP_CENTER_Y]); - } - - if (priv->center_z != z) - { - priv->center_z = z; - g_object_notify_by_pspec (G_OBJECT (rotate), obj_props[PROP_CENTER_Z]); - } - - g_object_thaw_notify (G_OBJECT (rotate)); -} - -/** - * clutter_behaviour_rotate_get_center: - * @rotate: a #ClutterBehaviourRotate - * @x: (out): return location for the X center of rotation - * @y: (out): return location for the Y center of rotation - * @z: (out): return location for the Z center of rotation - * - * Retrieves the center of rotation set using - * clutter_behaviour_rotate_set_center(). - * - * Since: 0.4 - */ -void -clutter_behaviour_rotate_get_center (ClutterBehaviourRotate *rotate, - gint *x, - gint *y, - gint *z) -{ - ClutterBehaviourRotatePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ROTATE (rotate)); - - priv = rotate->priv; - - if (x) - *x = priv->center_x; - - if (y) - *y = priv->center_y; - - if (z) - *z = priv->center_z; -} diff --git a/clutter/clutter-behaviour-rotate.h b/clutter/clutter-behaviour-rotate.h deleted file mode 100644 index c30aef9b5..000000000 --- a/clutter/clutter-behaviour-rotate.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * - * Copyright (C) 2007 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) -#error "Only <clutter/clutter.h> can be included directly." -#endif - -#ifndef __CLUTTER_BEHAVIOUR_ROTATE_H__ -#define __CLUTTER_BEHAVIOUR_ROTATE_H__ - -#include <clutter/clutter-alpha.h> -#include <clutter/clutter-behaviour.h> -#include <clutter/clutter-types.h> - -G_BEGIN_DECLS - -#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION) - -#define CLUTTER_TYPE_BEHAVIOUR_ROTATE (clutter_behaviour_rotate_get_type ()) -#define CLUTTER_BEHAVIOUR_ROTATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_BEHAVIOUR_ROTATE, ClutterBehaviourRotate)) -#define CLUTTER_IS_BEHAVIOUR_ROTATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_BEHAVIOUR_ROTATE)) -#define CLUTTER_BEHAVIOUR_ROTATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BEHAVIOUR_ROTATE, ClutterBehaviourRotateClass)) -#define CLUTTER_IS_BEHAVIOUR_ROTATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BEHAVIOUR_ROTATE)) -#define CLUTTER_BEHAVIOUR_ROTATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((klass), CLUTTER_TYPE_BEHAVIOUR_ROTATE, ClutterBehaviourRotateClass)) - -typedef struct _ClutterBehaviourRotate ClutterBehaviourRotate; -typedef struct _ClutterBehaviourRotatePrivate ClutterBehaviourRotatePrivate; -typedef struct _ClutterBehaviourRotateClass ClutterBehaviourRotateClass; - -/** - * ClutterBehaviourRotate: - * - * The #ClutterBehaviourRotate struct contains only private data and - * should be accessed using the provided API - * - * Since: 0.4 - * - * Deprecated: 1.6: Use clutter_actor_animate() instead. - */ -struct _ClutterBehaviourRotate -{ - /*< private >*/ - ClutterBehaviour parent_instance; - - ClutterBehaviourRotatePrivate *priv; -}; - -/** - * ClutterBehaviourRotateClass: - * - * The #ClutterBehaviourRotateClass struct contains only private data - * - * Since: 0.4 - * - * Deprecated: 1.6 - */ -struct _ClutterBehaviourRotateClass -{ - /*< private >*/ - ClutterBehaviourClass parent_class; -}; - -GType clutter_behaviour_rotate_get_type (void) G_GNUC_CONST; - -ClutterBehaviour * clutter_behaviour_rotate_new (ClutterAlpha *alpha, - ClutterRotateAxis axis, - ClutterRotateDirection direction, - gdouble angle_start, - gdouble angle_end); -void clutter_behaviour_rotate_get_center (ClutterBehaviourRotate *rotate, - gint *x, - gint *y, - gint *z); -void clutter_behaviour_rotate_set_center (ClutterBehaviourRotate *rotate, - gint x, - gint y, - gint z); -ClutterRotateAxis clutter_behaviour_rotate_get_axis (ClutterBehaviourRotate *rotate); -void clutter_behaviour_rotate_set_axis (ClutterBehaviourRotate *rotate, - ClutterRotateAxis axis); -ClutterRotateDirection clutter_behaviour_rotate_get_direction (ClutterBehaviourRotate *rotate); -void clutter_behaviour_rotate_set_direction (ClutterBehaviourRotate *rotate, - ClutterRotateDirection direction); -void clutter_behaviour_rotate_get_bounds (ClutterBehaviourRotate *rotate, - gdouble *angle_start, - gdouble *angle_end); -void clutter_behaviour_rotate_set_bounds (ClutterBehaviourRotate *rotate, - gdouble angle_start, - gdouble angle_end); - -#endif /* CLUTTER_DISABLE_DEPRECATED */ - -G_END_DECLS - -#endif /* __CLUTTER_BEHAVIOUR_ROTATE_H__ */ diff --git a/clutter/clutter-behaviour-scale.c b/clutter/clutter-behaviour-scale.c deleted file mode 100644 index 6d21a3e98..000000000 --- a/clutter/clutter-behaviour-scale.c +++ /dev/null @@ -1,435 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * - * Copyright (C) 2006 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -/** - * SECTION:clutter-behaviour-scale - * @Title: ClutterBehaviourScale - * @short_description: A behaviour controlling scale - * @Deprecated: 1.6: Use clutter_actor_animate() with #ClutterActor:scale-x - * and #ClutterActor:scale-y instead. - * - * A #ClutterBehaviourScale interpolates actors size between two values. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <math.h> - -#include "clutter-behaviour-scale.h" - -#include "clutter-debug.h" -#include "clutter-main.h" -#include "clutter-private.h" - -G_DEFINE_TYPE (ClutterBehaviourScale, - clutter_behaviour_scale, - CLUTTER_TYPE_BEHAVIOUR); - -struct _ClutterBehaviourScalePrivate -{ - gdouble x_scale_start; - gdouble y_scale_start; - - gdouble x_scale_end; - gdouble y_scale_end; -}; - -#define CLUTTER_BEHAVIOUR_SCALE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CLUTTER_TYPE_BEHAVIOUR_SCALE, ClutterBehaviourScalePrivate)) - -enum -{ - PROP_0, - - PROP_X_SCALE_START, - PROP_Y_SCALE_START, - PROP_X_SCALE_END, - PROP_Y_SCALE_END, - - PROP_LAST -}; - -static GParamSpec *obj_props[PROP_LAST]; - -typedef struct { - gdouble scale_x; - gdouble scale_y; -} ScaleFrameClosure; - -static void -scale_frame_foreach (ClutterBehaviour *behaviour, - ClutterActor *actor, - gpointer data) -{ - ScaleFrameClosure *closure = data; - - clutter_actor_set_scale (actor, closure->scale_x, closure->scale_y); -} - -static void -clutter_behaviour_scale_alpha_notify (ClutterBehaviour *behave, - gdouble alpha_value) -{ - ClutterBehaviourScalePrivate *priv; - ScaleFrameClosure closure = { 0, }; - - priv = CLUTTER_BEHAVIOUR_SCALE (behave)->priv; - - /* Fix the start/end values, avoids potential rounding errors on large - * values. - */ - if (alpha_value == 1.0) - { - closure.scale_x = priv->x_scale_end; - closure.scale_y = priv->y_scale_end; - } - else if (alpha_value == 0) - { - closure.scale_x = priv->x_scale_start; - closure.scale_y = priv->y_scale_start; - } - else - { - closure.scale_x = (priv->x_scale_end - priv->x_scale_start) - * alpha_value - + priv->x_scale_start; - - closure.scale_y = (priv->y_scale_end - priv->y_scale_start) - * alpha_value - + priv->y_scale_start; - } - - clutter_behaviour_actors_foreach (behave, - scale_frame_foreach, - &closure); -} - -static void -clutter_behaviour_scale_set_property (GObject *gobject, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - ClutterBehaviourScalePrivate *priv; - - priv = CLUTTER_BEHAVIOUR_SCALE (gobject)->priv; - - switch (prop_id) - { - case PROP_X_SCALE_START: - priv->x_scale_start = g_value_get_double (value); - break; - - case PROP_X_SCALE_END: - priv->x_scale_end = g_value_get_double (value); - break; - - case PROP_Y_SCALE_START: - priv->y_scale_start = g_value_get_double (value); - break; - - case PROP_Y_SCALE_END: - priv->y_scale_end = g_value_get_double (value); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); - break; - } -} - -static void -clutter_behaviour_scale_get_property (GObject *gobject, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - ClutterBehaviourScalePrivate *priv; - - priv = CLUTTER_BEHAVIOUR_SCALE (gobject)->priv; - - switch (prop_id) - { - case PROP_X_SCALE_START: - g_value_set_double (value, priv->x_scale_start); - break; - - case PROP_X_SCALE_END: - g_value_set_double (value, priv->x_scale_end); - break; - - case PROP_Y_SCALE_START: - g_value_set_double (value, priv->y_scale_start); - break; - - case PROP_Y_SCALE_END: - g_value_set_double (value, priv->y_scale_end); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); - break; - } -} - -static void -clutter_behaviour_scale_class_init (ClutterBehaviourScaleClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - ClutterBehaviourClass *behave_class = CLUTTER_BEHAVIOUR_CLASS (klass); - GParamSpec *pspec = NULL; - - g_type_class_add_private (klass, sizeof (ClutterBehaviourScalePrivate)); - - gobject_class->set_property = clutter_behaviour_scale_set_property; - gobject_class->get_property = clutter_behaviour_scale_get_property; - - /** - * ClutterBehaviourScale:x-scale-start: - * - * The initial scaling factor on the X axis for the actors. - * - * Since: 0.6 - * - * Deprecated: 1.6 - */ - pspec = g_param_spec_double ("x-scale-start", - P_("X Start Scale"), - P_("Initial scale on the X axis"), - 0.0, G_MAXDOUBLE, - 1.0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_X_SCALE_START] = pspec; - g_object_class_install_property (gobject_class, - PROP_X_SCALE_START, - pspec); - /** - * ClutterBehaviourScale:x-scale-end: - * - * The final scaling factor on the X axis for the actors. - * - * Since: 0.6 - * - * Deprecated: 1.6 - */ - pspec = g_param_spec_double ("x-scale-end", - P_("X End Scale"), - P_("Final scale on the X axis"), - 0.0, G_MAXDOUBLE, - 1.0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_X_SCALE_END] = pspec; - g_object_class_install_property (gobject_class, - PROP_X_SCALE_END, - pspec); - /** - * ClutterBehaviourScale:y-scale-start: - * - * The initial scaling factor on the Y axis for the actors. - * - * Since: 0.6 - * - * Deprecated: 1.6 - */ - pspec = g_param_spec_double ("y-scale-start", - P_("Y Start Scale"), - P_("Initial scale on the Y axis"), - 0.0, G_MAXDOUBLE, - 1.0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_Y_SCALE_START] = pspec; - g_object_class_install_property (gobject_class, - PROP_Y_SCALE_START, - pspec); - /** - * ClutterBehaviourScale:y-scale-end: - * - * The final scaling factor on the Y axis for the actors. - * - * Since: 0.6 - * - * Deprecated: 1.6 - */ - pspec = g_param_spec_double ("y-scale-end", - P_("Y End Scale"), - P_("Final scale on the Y axis"), - 0.0, G_MAXDOUBLE, - 1.0, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_Y_SCALE_END] = pspec; - g_object_class_install_property (gobject_class, - PROP_Y_SCALE_END, - pspec); - - behave_class->alpha_notify = clutter_behaviour_scale_alpha_notify; -} - -static void -clutter_behaviour_scale_init (ClutterBehaviourScale *self) -{ - ClutterBehaviourScalePrivate *priv; - - self->priv = priv = CLUTTER_BEHAVIOUR_SCALE_GET_PRIVATE (self); - - priv->x_scale_start = priv->x_scale_end = 1.0; - priv->y_scale_start = priv->y_scale_end = 1.0; -} - -/** - * clutter_behaviour_scale_new: - * @alpha: (allow-none): a #ClutterAlpha instance, or %NULL - * @x_scale_start: initial scale factor on the X axis - * @y_scale_start: initial scale factor on the Y axis - * @x_scale_end: final scale factor on the X axis - * @y_scale_end: final scale factor on the Y axis - * - * Creates a new #ClutterBehaviourScale instance. - * - * If @alpha is not %NULL, the #ClutterBehaviour will take ownership - * of the #ClutterAlpha instance. In the case when @alpha is %NULL, - * it can be set later with clutter_behaviour_set_alpha(). - * - * Return value: (transfer full): the newly created #ClutterBehaviourScale - * - * Since: 0.2 - * - * Deprecated: 1.6 - */ -ClutterBehaviour * -clutter_behaviour_scale_new (ClutterAlpha *alpha, - gdouble x_scale_start, - gdouble y_scale_start, - gdouble x_scale_end, - gdouble y_scale_end) -{ - g_return_val_if_fail (alpha == NULL || CLUTTER_IS_ALPHA (alpha), NULL); - - return g_object_new (CLUTTER_TYPE_BEHAVIOUR_SCALE, - "alpha", alpha, - "x-scale-start", x_scale_start, - "y-scale-start", y_scale_start, - "x-scale-end", x_scale_end, - "y-scale-end", y_scale_end, - NULL); -} - -/** - * clutter_behaviour_scale_set_bounds: - * @scale: a #ClutterBehaviourScale - * @x_scale_start: initial scale factor on the X axis - * @y_scale_start: initial scale factor on the Y axis - * @x_scale_end: final scale factor on the X axis - * @y_scale_end: final scale factor on the Y axis - * - * Sets the bounds used by scale behaviour. - * - * Since: 0.6 - * - * Deprecated: 1.6 - */ -void -clutter_behaviour_scale_set_bounds (ClutterBehaviourScale *scale, - gdouble x_scale_start, - gdouble y_scale_start, - gdouble x_scale_end, - gdouble y_scale_end) -{ - ClutterBehaviourScalePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_SCALE (scale)); - - priv = scale->priv; - - g_object_freeze_notify (G_OBJECT (scale)); - - if (priv->x_scale_start != x_scale_start) - { - priv->x_scale_start = x_scale_start; - g_object_notify_by_pspec (G_OBJECT (scale), obj_props[PROP_X_SCALE_START]); - } - - if (priv->y_scale_start != y_scale_start) - { - priv->y_scale_start = y_scale_start; - g_object_notify_by_pspec (G_OBJECT (scale), obj_props[PROP_Y_SCALE_START]); - } - - if (priv->x_scale_end != x_scale_end) - { - priv->x_scale_end = x_scale_end; - g_object_notify_by_pspec (G_OBJECT (scale), obj_props[PROP_X_SCALE_END]); - } - - if (priv->y_scale_end != y_scale_end) - { - priv->y_scale_end = y_scale_end; - g_object_notify_by_pspec (G_OBJECT (scale), obj_props[PROP_Y_SCALE_END]); - } - - g_object_thaw_notify (G_OBJECT (scale)); -} - -/** - * clutter_behaviour_scale_get_bounds: - * @scale: a #ClutterBehaviourScale - * @x_scale_start: (out): return location for the initial scale factor on the X - * axis, or %NULL - * @y_scale_start: (out): return location for the initial scale factor on the Y - * axis, or %NULL - * @x_scale_end: (out): return location for the final scale factor on the X axis, - * or %NULL - * @y_scale_end: (out): return location for the final scale factor on the Y axis, - * or %NULL - * - * Retrieves the bounds used by scale behaviour. - * - * Since: 0.4 - * - * Deprecated: 1.6 - */ -void -clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *scale, - gdouble *x_scale_start, - gdouble *y_scale_start, - gdouble *x_scale_end, - gdouble *y_scale_end) -{ - ClutterBehaviourScalePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_SCALE (scale)); - - priv = scale->priv; - - if (x_scale_start) - *x_scale_start = priv->x_scale_start; - - if (x_scale_end) - *x_scale_end = priv->x_scale_end; - - if (y_scale_start) - *y_scale_start = priv->y_scale_start; - - if (y_scale_end) - *y_scale_end = priv->y_scale_end; -} diff --git a/clutter/clutter-behaviour-scale.h b/clutter/clutter-behaviour-scale.h deleted file mode 100644 index 3671cabf0..000000000 --- a/clutter/clutter-behaviour-scale.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * Jorn Baayen <jorn@openedhand.com> - * Emmanuele Bassi <ebassi@openedhand.com> - * - * Copyright (C) 2006 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) -#error "Only <clutter/clutter.h> can be included directly." -#endif - -#ifndef __CLUTTER_BEHAVIOUR_SCALE_H__ -#define __CLUTTER_BEHAVIOUR_SCALE_H__ - -#include <clutter/clutter-behaviour.h> - -G_BEGIN_DECLS - -#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION) - -#define CLUTTER_TYPE_BEHAVIOUR_SCALE (clutter_behaviour_scale_get_type ()) -#define CLUTTER_BEHAVIOUR_SCALE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_BEHAVIOUR_SCALE, ClutterBehaviourScale)) -#define CLUTTER_BEHAVIOUR_SCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BEHAVIOUR_SCALE, ClutterBehaviourScaleClass)) -#define CLUTTER_IS_BEHAVIOUR_SCALE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_BEHAVIOUR_SCALE)) -#define CLUTTER_IS_BEHAVIOUR_SCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BEHAVIOUR_SCALE)) -#define CLUTTER_BEHAVIOUR_SCALE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BEHAVIOUR_SCALE, ClutterBehaviourScaleClass)) - -typedef struct _ClutterBehaviourScale ClutterBehaviourScale; -typedef struct _ClutterBehaviourScalePrivate ClutterBehaviourScalePrivate; -typedef struct _ClutterBehaviourScaleClass ClutterBehaviourScaleClass; - -/** - * ClutterBehaviourScale: - * - * The #ClutterBehaviourScale struct contains only private data and - * should be accessed using the provided API - * - * Since: 0.2 - * - * Deprecated: 1.6: Use clutter_actor_animate() with #ClutterActor:x-scale - * and #ClutterActor:y-scale instead. - */ -struct _ClutterBehaviourScale -{ - /*< private >*/ - ClutterBehaviour parent_instance; - - ClutterBehaviourScalePrivate *priv; -}; - -/** - * ClutterBehaviourScaleClass: - * - * The #ClutterBehaviourScaleClass struct contains only private data - * - * Since: 0.2 - * - * Deprecated: 1.6 - */ -struct _ClutterBehaviourScaleClass -{ - /*< private >*/ - ClutterBehaviourClass parent_class; -}; - -GType clutter_behaviour_scale_get_type (void) G_GNUC_CONST; - -ClutterBehaviour *clutter_behaviour_scale_new (ClutterAlpha *alpha, - gdouble x_scale_start, - gdouble y_scale_start, - gdouble x_scale_end, - gdouble y_scale_end); -void clutter_behaviour_scale_set_bounds (ClutterBehaviourScale *scale, - gdouble x_scale_start, - gdouble y_scale_start, - gdouble x_scale_end, - gdouble y_scale_end); -void clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *scale, - gdouble *x_scale_start, - gdouble *y_scale_start, - gdouble *x_scale_end, - gdouble *y_scale_end); - -#endif /* CLUTTER_DISABLE_DEPRECATED */ - -G_END_DECLS - -#endif /* __CLUTTER_BEHAVIOUR_SCALE_H__ */ diff --git a/clutter/clutter-behaviour.c b/clutter/clutter-behaviour.c deleted file mode 100644 index 300b3cb09..000000000 --- a/clutter/clutter-behaviour.c +++ /dev/null @@ -1,702 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * - * Copyright (C) 2006 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -/** - * SECTION:clutter-behaviour - * @Title: ClutterBehaviour - * @short_description: Class for providing behaviours to actors - * @Deprecated: 1.6: Use the implicit animation API instead. - * - * #ClutterBehaviour is the base class for implementing behaviours. A - * behaviour is a controller object for #ClutterActor<!-- -->s; you can - * use a behaviour to control one or more properties of an actor (such - * as its opacity, or its position). A #ClutterBehaviour is driven by - * an "alpha function" stored inside a #ClutterAlpha object; an alpha - * function is a function depending solely on time. The alpha function - * computes a value which is then applied to the properties of the - * actors driven by a behaviour. - * - * Clutter provides some pre-defined behaviours, like #ClutterBehaviourPath, - * which controls the position of a set of actors making them "walk" along - * a set of nodes; #ClutterBehaviourOpacity, which controls the opacity - * of a set of actors; #ClutterBehaviourScale, which controls the width - * and height of a set of actors. - * - * To visualize the effects of different alpha functions on a - * #ClutterBehaviour implementation it is possible to take the - * #ClutterBehaviourPath as an example: - * - * <figure id="behaviour-path-alpha"> - * <title>Effects of alpha functions on a path</title> - * <graphic fileref="path-alpha-func.png" format="PNG"/> - * </figure> - * - * The actors position between the path's end points directly correlates - * to the #ClutterAlpha's current alpha value driving the behaviour. With - * the #ClutterAlpha's function set to a linear ramp the actor - * will follow the path at a constant velocity, but when changing to - * a sine wave the actor initially accelerates before quickly - * decelerating. - * - * In order to implement a new behaviour you should subclass #ClutterBehaviour - * and override the "alpha_notify" virtual function; inside the overridden - * function you should obtain the alpha value from the #ClutterAlpha - * instance bound to the behaviour and apply it to the desiderd property - * (or properties) of every actor controlled by the behaviour. - * - * #ClutterBehaviour is available since Clutter 0.2. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "clutter-behaviour.h" - -#include "clutter-debug.h" -#include "clutter-main.h" -#include "clutter-marshal.h" -#include "clutter-private.h" -#include "clutter-scriptable.h" -#include "clutter-script-private.h" - -/** - * clutter_knot_copy: - * @knot: a #ClutterKnot - * - * Makes an allocated copy of a knot. - * - * Return value: the copied knot. - * - * Since: 0.2 - */ -ClutterKnot * -clutter_knot_copy (const ClutterKnot *knot) -{ - ClutterKnot *copy; - - copy = g_slice_new0 (ClutterKnot); - - *copy = *knot; - - return copy; -} - -/** - * clutter_knot_free: - * @knot: a #ClutterKnot - * - * Frees the memory of an allocated knot. - * - * Since: 0.2 - */ -void -clutter_knot_free (ClutterKnot *knot) -{ - if (G_LIKELY (knot)) - { - g_slice_free (ClutterKnot, knot); - } -} - -/** - * clutter_knot_equal: - * @knot_a: First knot - * @knot_b: Second knot - * - * Compares to knot and checks if the point to the same location. - * - * Return value: %TRUE if the knots point to the same location. - * - * Since: 0.2 - */ -gboolean -clutter_knot_equal (const ClutterKnot *knot_a, - const ClutterKnot *knot_b) -{ - g_return_val_if_fail (knot_a != NULL, FALSE); - g_return_val_if_fail (knot_b != NULL, FALSE); - - if (knot_a == knot_b) - return TRUE; - - return knot_a->x == knot_b->x && knot_a->y == knot_b->y; -} - -G_DEFINE_BOXED_TYPE (ClutterKnot, clutter_knot, - clutter_knot_copy, - clutter_knot_free); - -static void clutter_scriptable_iface_init (ClutterScriptableIface *iface); - -G_DEFINE_ABSTRACT_TYPE_WITH_CODE (ClutterBehaviour, - clutter_behaviour, - G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_SCRIPTABLE, - clutter_scriptable_iface_init)); - -struct _ClutterBehaviourPrivate -{ - ClutterAlpha *alpha; - - guint notify_id; - GSList *actors; -}; - -enum -{ - PROP_0, - PROP_ALPHA, - - PROP_LAST -}; - -static GParamSpec *obj_props[PROP_LAST]; - -enum { - APPLIED, - REMOVED, - LAST_SIGNAL -}; - -static guint behave_signals[LAST_SIGNAL] = { 0 }; - -#define CLUTTER_BEHAVIOUR_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ - CLUTTER_TYPE_BEHAVIOUR, \ - ClutterBehaviourPrivate)) - -static gboolean -clutter_behaviour_parse_custom_node (ClutterScriptable *scriptable, - ClutterScript *script, - GValue *value, - const gchar *name, - JsonNode *node) -{ - if (strncmp (name, "alpha", 5) == 0) - { - GObject *alpha; - - alpha = _clutter_script_parse_alpha (script, node); - if (alpha != NULL) - { - g_value_init (value, CLUTTER_TYPE_ALPHA); - g_value_set_object (value, alpha); - - return TRUE; - } - } - - return FALSE; -} - -static void -clutter_scriptable_iface_init (ClutterScriptableIface *iface) -{ - iface->parse_custom_node = clutter_behaviour_parse_custom_node; -} - -static void -clutter_behaviour_dispose (GObject *gobject) -{ - ClutterBehaviour *self = CLUTTER_BEHAVIOUR (gobject); - - clutter_behaviour_set_alpha (self, NULL); - clutter_behaviour_remove_all (self); - - G_OBJECT_CLASS (clutter_behaviour_parent_class)->dispose (gobject); -} - -static void -clutter_behaviour_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - ClutterBehaviour *behaviour = CLUTTER_BEHAVIOUR (object); - - switch (prop_id) - { - case PROP_ALPHA: - clutter_behaviour_set_alpha (behaviour, g_value_get_object (value)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -clutter_behaviour_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - ClutterBehaviour *behaviour = CLUTTER_BEHAVIOUR (object); - ClutterBehaviourPrivate *priv = behaviour->priv; - - switch (prop_id) - { - case PROP_ALPHA: - g_value_set_object (value, priv->alpha); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -clutter_behaviour_alpha_notify_unimplemented (ClutterBehaviour *behaviour, - gdouble alpha_value) -{ - g_warning ("ClutterBehaviourClass::alpha_notify not implemented for '%s'", - g_type_name (G_TYPE_FROM_INSTANCE (behaviour))); -} - -static void -clutter_behaviour_class_init (ClutterBehaviourClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - - object_class->dispose = clutter_behaviour_dispose; - object_class->set_property = clutter_behaviour_set_property; - object_class->get_property = clutter_behaviour_get_property; - - /** - * ClutterBehaviour:alpha: - * - * The #ClutterAlpha object used to drive this behaviour. A #ClutterAlpha - * object binds a #ClutterTimeline and a function which computes a value - * (the "alpha") depending on the time. Each time the alpha value changes - * the alpha-notify virtual function is called. - * - * Since: 0.2 - */ - obj_props[PROP_ALPHA] = - g_param_spec_object ("alpha", - P_("Alpha"), - P_("Alpha Object to drive the behaviour"), - CLUTTER_TYPE_ALPHA, - CLUTTER_PARAM_READWRITE); - - g_object_class_install_properties (object_class, - PROP_LAST, - obj_props); - - klass->alpha_notify = clutter_behaviour_alpha_notify_unimplemented; - - /** - * ClutterBehaviour::applied: - * @behaviour: the #ClutterBehaviour that received the signal - * @actor: the actor the behaviour was applied to. - * - * The ::apply signal is emitted each time the behaviour is applied - * to an actor. - * - * Since: 0.4 - */ - behave_signals[APPLIED] = - g_signal_new ("applied", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (ClutterBehaviourClass, applied), - NULL, NULL, - _clutter_marshal_VOID__OBJECT, - G_TYPE_NONE, 1, - CLUTTER_TYPE_ACTOR); - /** - * ClutterBehaviour::removed: - * @behaviour: the #ClutterBehaviour that received the signal - * @actor: the removed actor - * - * The ::removed signal is emitted each time a behaviour is not applied - * to an actor anymore. - * - * Since: 0.4 - */ - behave_signals[REMOVED] = - g_signal_new ("removed", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (ClutterBehaviourClass, removed), - NULL, NULL, - _clutter_marshal_VOID__OBJECT, - G_TYPE_NONE, 1, - CLUTTER_TYPE_ACTOR); - - g_type_class_add_private (klass, sizeof (ClutterBehaviourPrivate)); -} - -static void -clutter_behaviour_init (ClutterBehaviour *self) -{ - self->priv = CLUTTER_BEHAVIOUR_GET_PRIVATE (self); -} - -static void -remove_actor_on_destroy (ClutterActor *actor, - ClutterBehaviour *behaviour) -{ - clutter_behaviour_remove (behaviour, actor); -} - -/** - * clutter_behaviour_apply: - * @behave: a #ClutterBehaviour - * @actor: a #ClutterActor - * - * Applies @behave to @actor. This function adds a reference on - * the actor. - * - * Since: 0.2 - */ -void -clutter_behaviour_apply (ClutterBehaviour *behave, - ClutterActor *actor) -{ - ClutterBehaviourPrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR (behave)); - g_return_if_fail (CLUTTER_IS_ACTOR (actor)); - - priv = behave->priv; - - if (g_slist_find (priv->actors, actor)) - { - g_warning ("The behaviour of type %s already applies " - "to the actor of type %s", - g_type_name (G_OBJECT_TYPE (behave)), - g_type_name (G_OBJECT_TYPE (actor))); - return; - } - - priv->actors = g_slist_append (priv->actors, g_object_ref (actor)); - g_signal_connect (actor, "destroy", - G_CALLBACK (remove_actor_on_destroy), - behave); - - g_signal_emit (behave, behave_signals[APPLIED], 0, actor); -} - -/** - * clutter_behaviour_is_applied: - * @behave: a #ClutterBehaviour - * @actor: a #ClutterActor - * - * Check if @behave applied to @actor. - * - * Return value: TRUE if actor has behaviour. FALSE otherwise. - * - * Since: 0.4 - */ -gboolean -clutter_behaviour_is_applied (ClutterBehaviour *behave, - ClutterActor *actor) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR (behave), FALSE); - g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), FALSE); - - return (g_slist_find (behave->priv->actors, actor) != NULL); -} - -/** - * clutter_behaviour_remove: - * @behave: a #ClutterBehaviour - * @actor: a #ClutterActor - * - * Removes @actor from the list of #ClutterActor<!-- -->s to which - * @behave applies. This function removes a reference on the actor. - * - * Since: 0.2 - */ -void -clutter_behaviour_remove (ClutterBehaviour *behave, - ClutterActor *actor) -{ - ClutterBehaviourPrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR (behave)); - g_return_if_fail (CLUTTER_IS_ACTOR (actor)); - - priv = behave->priv; - - if (!g_slist_find (priv->actors, actor)) - { - g_warning ("The behaviour of type %s is not applied " - "to the actor of type %s", - g_type_name (G_OBJECT_TYPE (behave)), - g_type_name (G_OBJECT_TYPE (actor))); - return; - } - - g_signal_handlers_disconnect_by_func (actor, - G_CALLBACK (remove_actor_on_destroy), - behave); - - priv->actors = g_slist_remove (priv->actors, actor); - - g_signal_emit (behave, behave_signals[REMOVED], 0, actor); - - g_object_unref (actor); -} - -/** - * clutter_behaviour_get_n_actors: - * @behave: a #ClutterBehaviour - * - * Gets the number of actors this behaviour is applied too. - * - * Return value: The number of applied actors - * - * Since: 0.2 - */ -gint -clutter_behaviour_get_n_actors (ClutterBehaviour *behave) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR (behave), 0); - - return g_slist_length (behave->priv->actors); -} - -/** - * clutter_behaviour_get_nth_actor: - * @behave: a #ClutterBehaviour - * @index_: the index of an actor this behaviour is applied too. - * - * Gets an actor the behaviour was applied to referenced by index num. - * - * Return value: (transfer none): A Clutter actor or NULL if @index_ is invalid. - * - * Since: 0.2 - */ -ClutterActor* -clutter_behaviour_get_nth_actor (ClutterBehaviour *behave, - gint index_) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR (behave), NULL); - - return g_slist_nth_data (behave->priv->actors, index_); -} - - -/** - * clutter_behaviour_actors_foreach: - * @behave: a #ClutterBehaviour - * @func: (scope call): a function called for each actor - * @data: optional data to be passed to the function, or %NULL - * - * Calls @func for every actor driven by @behave. - * - * Since: 0.2 - */ -void -clutter_behaviour_actors_foreach (ClutterBehaviour *behave, - ClutterBehaviourForeachFunc func, - gpointer data) -{ - GSList *l; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR (behave)); - g_return_if_fail (func != NULL); - - for (l = behave->priv->actors; l != NULL; l = l->next) - { - ClutterActor *actor = l->data; - - g_assert (CLUTTER_IS_ACTOR (actor)); - - func (behave, actor, data); - } -} - -/** - * clutter_behaviour_get_alpha: - * @behave: a #ClutterBehaviour - * - * Retrieves the #ClutterAlpha object bound to @behave. - * - * Return value: (transfer none): a #ClutterAlpha object, or %NULL if no alpha - * object has been bound to this behaviour. - * - * Since: 0.2 - */ -ClutterAlpha * -clutter_behaviour_get_alpha (ClutterBehaviour *behave) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR (behave), NULL); - - return behave->priv->alpha; -} - -static void -notify_cb (GObject *object, - GParamSpec *param_spec, - ClutterBehaviour *behave) -{ - ClutterBehaviourClass *klass; - - klass = CLUTTER_BEHAVIOUR_GET_CLASS (behave); - - CLUTTER_NOTE (BEHAVIOUR, "notify::alpha"); - - /* no actors, we can stop right here */ - if (behave->priv->actors == NULL) - return; - - if (klass->alpha_notify) - { - gdouble alpha_value = clutter_alpha_get_alpha (behave->priv->alpha); - - CLUTTER_NOTE (BEHAVIOUR, "calling %s::alpha_notify (%p, %.4f)", - g_type_name (G_TYPE_FROM_CLASS (klass)), - behave, alpha_value); - - klass->alpha_notify (behave, alpha_value); - } -} - -/** - * clutter_behaviour_set_alpha: - * @behave: a #ClutterBehaviour - * @alpha: a #ClutterAlpha or %NULL to unset a previously set alpha - * - * Binds @alpha to a #ClutterBehaviour. The #ClutterAlpha object - * is what makes a behaviour work: for each tick of the timeline - * used by #ClutterAlpha a new value of the alpha parameter is - * computed by the alpha function; the value should be used by - * the #ClutterBehaviour to update one or more properties of the - * actors to which the behaviour applies. - * - * If @alpha is not %NULL, the #ClutterBehaviour will take ownership - * of the #ClutterAlpha instance. - * - * Since: 0.2 - */ -void -clutter_behaviour_set_alpha (ClutterBehaviour *behave, - ClutterAlpha *alpha) -{ - ClutterBehaviourPrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR (behave)); - g_return_if_fail (alpha == NULL || CLUTTER_IS_ALPHA (alpha)); - - priv = behave->priv; - - if (priv->alpha == alpha) - return; - - if (priv->notify_id) - { - CLUTTER_NOTE (BEHAVIOUR, "removing previous notify-id (%d)", - priv->notify_id); - - g_signal_handler_disconnect (priv->alpha, priv->notify_id); - priv->notify_id = 0; - } - - if (priv->alpha != NULL) - { - CLUTTER_NOTE (BEHAVIOUR, "removing previous alpha object"); - - g_object_unref (priv->alpha); - priv->alpha = NULL; - } - - if (alpha != NULL) - { - priv->alpha = g_object_ref_sink (alpha); - - priv->notify_id = g_signal_connect (priv->alpha, "notify::alpha", - G_CALLBACK(notify_cb), - behave); - - CLUTTER_NOTE (BEHAVIOUR, "setting new alpha object (%p, notify:%d)", - priv->alpha, priv->notify_id); - } - - g_object_notify_by_pspec (G_OBJECT (behave), obj_props[PROP_ALPHA]); -} - -/** - * clutter_behaviour_get_actors: - * @behave: a #ClutterBehaviour - * - * Retrieves all the actors to which @behave applies. It is not recommended - * for derived classes to use this in there alpha notify method but use - * #clutter_behaviour_actors_foreach as it avoids alot of needless allocations. - * - * Return value: (transfer container) (element-type Clutter.Actor): a list of - * actors. You should free the returned list with g_slist_free() when - * finished using it. - * - * Since: 0.2 - */ -GSList * -clutter_behaviour_get_actors (ClutterBehaviour *behave) -{ - ClutterBehaviourPrivate *priv; - GSList *retval, *l; - - g_return_val_if_fail (CLUTTER_BEHAVIOUR (behave), NULL); - - priv = behave->priv; - retval = NULL; - for (l = priv->actors; l != NULL; l = l->next) - retval = g_slist_prepend (retval, l->data); - - return g_slist_reverse (retval); -} - -/** - * clutter_behaviour_remove_all: - * @behave: a #ClutterBehaviour - * - * Removes every actor from the list that @behave holds. - * - * Since: 0.4 - */ -void -clutter_behaviour_remove_all (ClutterBehaviour *behave) -{ - ClutterBehaviourPrivate *priv; - GSList *l; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR (behave)); - - priv = behave->priv; - for (l = priv->actors; l != NULL; l = l->next) - { - ClutterActor *actor = l->data; - - g_signal_emit (behave, behave_signals[REMOVED], 0, actor); - g_signal_handlers_disconnect_by_func (actor, - G_CALLBACK (remove_actor_on_destroy), - behave); - g_object_unref (actor); - } - - g_slist_free (priv->actors); - priv->actors = NULL; -} diff --git a/clutter/clutter-behaviour.h b/clutter/clutter-behaviour.h deleted file mode 100644 index 7f7ddf0b3..000000000 --- a/clutter/clutter-behaviour.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * Jorn Baayen <jorn@openedhand.com> - * Emmanuele Bassi <ebassi@openedhand.com> - * - * Copyright (C) 2006 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) -#error "Only <clutter/clutter.h> can be included directly." -#endif - -#ifndef __CLUTTER_BEHAVIOUR_H__ -#define __CLUTTER_BEHAVIOUR_H__ - -#include <glib-object.h> -#include <clutter/clutter-alpha.h> -#include <clutter/clutter-types.h> - -G_BEGIN_DECLS - -#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION) - -#define CLUTTER_TYPE_BEHAVIOUR clutter_behaviour_get_type() - -#define CLUTTER_BEHAVIOUR(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ - CLUTTER_TYPE_BEHAVIOUR, ClutterBehaviour)) - -#define CLUTTER_BEHAVIOUR_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), \ - CLUTTER_TYPE_BEHAVIOUR, ClutterBehaviourClass)) - -#define CLUTTER_IS_BEHAVIOUR(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ - CLUTTER_TYPE_BEHAVIOUR)) - -#define CLUTTER_IS_BEHAVIOUR_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), \ - CLUTTER_TYPE_BEHAVIOUR)) - -#define CLUTTER_BEHAVIOUR_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), \ - CLUTTER_TYPE_BEHAVIOUR, ClutterBehaviourClass)) - -typedef struct _ClutterBehaviour ClutterBehaviour; -typedef struct _ClutterBehaviourPrivate ClutterBehaviourPrivate; -typedef struct _ClutterBehaviourClass ClutterBehaviourClass; - -/** - * ClutterBehaviourForeachFunc: - * @behaviour: the #ClutterBehaviour - * @actor: an actor driven by @behaviour - * @data: optional data passed to the function - * - * This function is passed to clutter_behaviour_actors_foreach() and - * will be called for each actor driven by @behaviour. - * - * Since: 0.2 - * - * Deprecated: 1.6 - */ -typedef void (*ClutterBehaviourForeachFunc) (ClutterBehaviour *behaviour, - ClutterActor *actor, - gpointer data); - -/** - * ClutterBehaviour: - * - * #ClutterBehaviour-struct contains only private data and should - * be accessed with the functions below. - * - * Since: 0.2 - * - * Deprecated: 1.6 - */ -struct _ClutterBehaviour -{ - /*< private >*/ - GObject parent; - ClutterBehaviourPrivate *priv; -}; - -/** - * ClutterBehaviourClass - * @alpha_notify: virtual function, called each time the #ClutterAlpha - * computes a new alpha value; the actors to which the behaviour applies - * should be changed in this function. Every subclass of #ClutterBehaviour - * must implement this virtual function - * @applied: signal class handler for the ClutterBehaviour::applied signal - * @removed: signal class handler for the ClutterBehaviour::removed signal - * - * Base class for behaviours. - * - * Since: 0.2 - * - * Deprecated: 1.6 - */ -struct _ClutterBehaviourClass -{ - /*< private >*/ - GObjectClass parent_class; - - /*< public >*/ - /* vfunc, not signal */ - void (*alpha_notify) (ClutterBehaviour *behave, - gdouble alpha_value); - - /* signals */ - void (*applied) (ClutterBehaviour *behave, - ClutterActor *actor); - void (*removed) (ClutterBehaviour *behave, - ClutterActor *actor); - - /*< private >*/ - /* padding, for future expansion */ - void (*_clutter_behaviour1) (void); - void (*_clutter_behaviour2) (void); - void (*_clutter_behaviour3) (void); - void (*_clutter_behaviour4) (void); - void (*_clutter_behaviour5) (void); - void (*_clutter_behaviour6) (void); -}; - -GType clutter_behaviour_get_type (void) G_GNUC_CONST; - -void clutter_behaviour_apply (ClutterBehaviour *behave, - ClutterActor *actor); -void clutter_behaviour_remove (ClutterBehaviour *behave, - ClutterActor *actor); -void clutter_behaviour_remove_all (ClutterBehaviour *behave); -void clutter_behaviour_actors_foreach (ClutterBehaviour *behave, - ClutterBehaviourForeachFunc func, - gpointer data); -gint clutter_behaviour_get_n_actors (ClutterBehaviour *behave); -ClutterActor *clutter_behaviour_get_nth_actor (ClutterBehaviour *behave, - gint index_); -GSList * clutter_behaviour_get_actors (ClutterBehaviour *behave); -ClutterAlpha *clutter_behaviour_get_alpha (ClutterBehaviour *behave); -void clutter_behaviour_set_alpha (ClutterBehaviour *behave, - ClutterAlpha *alpha); -gboolean clutter_behaviour_is_applied (ClutterBehaviour *behave, - ClutterActor *actor); - -#endif /* !CLUTTER_DISABLE_DEPRECATED || CLUTTER_COMPILATION */ - -G_END_DECLS - -#endif /* __CLUTTER_BEHAVIOUR_H__ */ diff --git a/clutter/clutter-deprecated.h b/clutter/clutter-deprecated.h deleted file mode 100644 index 890ff385e..000000000 --- a/clutter/clutter-deprecated.h +++ /dev/null @@ -1,205 +0,0 @@ -#ifndef _CLUTTER_DEPRECATED_H -#define _CLUTTER_DEPRECATED_H - -/* This header contains defines that makes the compiler provide useful - * direction for resolving compile problems when code is using old APIs - * When using a function name that no longer applies the compiler will - * tell the developer the name of the new function call. - * - * Functions that are simply renamed should give errors containing - * _REPLACED_BY_ whilst functions that are deprecated by new functions with - * new functionality should giver errors containing _DEPRECATED_BY_. - */ - -#define clutter_group_find_child_by_id clutter_group_find_child_by_id_REPLACED_BY_clutter_container_find_child_by_name - -#define clutter_behaviour_ellipse_set_angle_begin clutter_behaviour_ellipse_set_angle_begin_REPLACED_BY_clutter_behaviour_set_angle_start -#define clutter_behaviour_ellipse_set_angle_beginx clutter_behaviour_ellipse_set_angle_beginx_REPLACED_BY_clutter_behaviour_set_angle_startx -#define clutter_behaviour_ellipse_get_angle_begin clutter_behaviour_ellipse_get_angle_begin_REPLACED_BY_clutter_behaviour_get_angle_start -#define clutter_behaviour_ellipse_get_angle_beginx clutter_behaviour_ellipse_get_angle_beginx_REPLACED_BY_clutter_behaviour_get_angle_startx -#define clutter_behaviour_bspline_append clutter_behaviour_bspline_append_REPLACED_BY_clutter_behaviour_bspline_append_knots - -#define clutter_actor_get_id clutter_actor_get_id_REPLACED_BY_clutter_actor_get_gid - -#define clutter_actor_rotate_x clutter_actor_rotate_x_DEPRECATED_BY_clutter_actor_set_rotation -#define clutter_actor_rotate_y clutter_actor_rotate_y_DEPRECATED_BY_clutter_actor_set_rotation -#define clutter_actor_rotate_z clutter_actor_rotate_z_DEPRECATED_BY_clutter_actor_set_rotation -#define clutter_actor_rotate_xx clutter_actor_rotate_xx_DEPRECATED_BY_clutter_actor_set_rotationx -#define clutter_actor_rotate_yx clutter_actor_rotate_yx_DEPRECATED_BY_clutter_actor_set_rotationx -#define clutter_actor_rotate_zx clutter_actor_rotate_zx_DEPRECATED_BY_clutter_actor_set_rotationx -#define clutter_actor_get_rxang clutter_actor_get_rxang_DEPRECATED_BY_clutter_actor_get_rotation -#define clutter_actor_get_ryang clutter_actor_get_ryang_DEPRECATED_BY_clutter_actor_get_rotation -#define clutter_actor_get_rzang clutter_actor_get_rzang_DEPRECATED_BY_clutter_actor_get_rotation -#define clutter_actor_get_rxangx clutter_actor_get_rxangx_DEPRECATED_BY_clutter_actor_get_rotationx -#define clutter_actor_get_ryangx clutter_actor_get_ryangx_DEPRECATED_BY_clutter_actor_get_rotationx -#define clutter_actor_get_rzangx clutter_actor_get_rzangx_DEPRECATED_BY_clutter_actor_get_rotationx -#define clutter_actor_set_scale_with_gravityx clutter_actor_set_scale_with_gravityx_DEPRECATED_BY_clutter_actor_set_scale_with_gravity - -#define clutter_entry_set_position clutter_entry_set_position_REPLACED_BY_clutter_entry_set_cursor_position -#define clutter_entry_get_position clutter_entry_get_position_REPLACED_BY_clutter_entry_get_cursor_position - -#define clutter_shader_bind clutter_shader_bind_REPLACED_BY_clutter_shader_compile -#define clutter_shader_is_bound clutter_shader_is_bound_REPLACED_BY_clutter_shader_is_compiled - -#define clutter_texture_new_from_pixbuf clutter_texture_new_from_pixbuf_DEPRECATED_BY_clutter_texture_new_from_file_OR_clutter_texture_new_AND_clutter_texture_set_from_rgb_data -#define clutter_texture_set_pixbuf clutter_texture_set_pixbuf_DEPRECATED_BY_clutter_texture_set_from_rgb_data - -#define clutter_actor_query_coords clutter_actor_query_coords_REPLACED_BY_clutter_actor_get_preferred_size_OR_clutter_actor_get_allocation_box -#define clutter_actor_request_coords clutter_actor_request_coords_REPLACED_BY_clutter_actor_allocate - -#define clutter_actor_get_abs_position clutter_actor_get_abs_position_REPLACED_BY_clutter_actor_get_transformed_position -#define clutter_actor_get_abs_size clutter_actor_get_abs_size_REPLACED_BY_clutter_actor_get_transformed_size -#define clutter_actor_get_abs_opacity clutter_actor_get_abs_opacity_REPLACED_BY_clutter_actor_get_paint_opacity - -#define clutter_stage_get_resolution clutter_backend_get_resolution -#define clutter_stage_get_resolutionx clutter_backend_get_resolution - -#define clutter_set_use_mipmapped_text clutter_actor_set_use_mipmapped_text_REPLACED_BY_clutter_set_font_flags -#define clutter_get_use_mipmapped_text clutter_actor_get_use_mipmapped_text_REPLACED_BY_clutter_get_font_flags - -#define clutter_color_parse clutter_color_parse_REPLACED_BY_clutter_color_from_string -#define clutter_color_from_hlsx clutter_color_from_hlsx_DEPRECATED_BY_clutter_color_from_hls -#define clutter_color_to_hlsx clutter_color_to_hlsx_DEPRECATED_BY_clutter_color_to_hls -#define clutter_color_shadex clutter_color_shadex_DEPRECATED_BY_clutter_color_shade - -#define clutter_stage_set_perspectivex clutter_stage_set_perspectivex_DEPRECATED_BY_clutter_stage_set_perspective -#define clutter_stage_set_fogx clutter_stage_set_fogx_DEPRECATED_BY_clutter_stage_set_fog - -#define clutter_actor_set_rotationx clutter_actor_set_rotationx_DEPRECATED_BY_clutter_actor_set_rotation -#define clutter_actor_get_rotationx clutter_actor_get_rotationx_DEPRECATED_BY_clutter_actor_get_rotation -#define clutter_actor_set_scalex clutter_actor_set_scalex_DEPRECATED_BY_clutter_actor_set_scale -#define clutter_actor_get_scalex clutter_actor_get_scalex_DEPRECATED_BY_clutter_actor_get_scale - -#define CLUTTER_ALPHA_RAMP_INC clutter_ramp_inc_func -#define CLUTTER_ALPHA_RAMP_DEC clutter_ramp_dec_func -#define CLUTTER_ALPHA_RAMP clutter_ramp_func -#define CLUTTER_ALPHA_SINE clutter_sine_func -#define CLUTTER_ALPHA_SINE_INC clutter_sine_inc_func -#define CLUTTER_ALPHA_SINE_DEC clutter_sine_dec_func -#define CLUTTER_ALPHA_SINE_HALF clutter_sine_half_func -#define CLUTTER_ALPHA_SQUARE clutter_square_func -#define CLUTTER_ALPHA_SMOOTHSTEP_INC clutter_smoothstep_inc_func -#define CLUTTER_ALPHA_SMOOTHSTEP_DEC clutter_smoothstep_dec_func -#define CLUTTER_ALPHA_EXP_INC clutter_exp_inc_func -#define CLUTTER_ALPHA_EXP_DEC clutter_exp_dec_func - -#define clutter_ramp_inc_func clutter_ramp_inc_func_DEPRECATED_BY_CLUTTER_LINEAR -#define clutter_ramp_dec_func clutter_ramp_dec_func_DEPRECATED_BY_CLUTTER_LINEAR -#define clutter_ramp_func clutter_ramp_func_DEPRECATED_BY_CLUTTER_LINEAR -#define clutter_sine_inc_func clutter_sine_inc_func_DEPRECATED_BY_CLUTTER_EASE_OUT_SINE -#define clutter_sine_dec_func clutter_sine_dec_func_DEPRECATED_BY_CLUTTER_EASE_IN_SINE -#define clutter_sine_half_func clutter_sine_half_func_DEPRECATED_BY_CLUTTER_EASE_IN_OUT_SINE -#define clutter_sine_func clutter_sine_func_DEPRECATED_BY_CLUTTER_EASE_IN_OUT_SINE -#define clutter_square_func clutter_square_func_REMOVED -#define clutter_smoothstep_inc_func clutter_smoothstep_inc_func_DEPRECATED_BY_CLUTTER_EASE_IN_CUBIC -#define clutter_smoothstep_dec_func clutter_smoothstep_dec_func_DEPRECATED_BY_CLUTTER_EASE_OUT_CUBIC -#define clutter_exp_inc_func clutter_exp_inc_func_DEPRECATED_BY_CLUTTER_EASE_IN_EXPO -#define clutter_exp_dec_func clutter_exp_dec_func_DEPRECATED_BY_CLUTTER_EASE_OUT_EXPO - -#define clutter_behaviour_path_get_knots clutter_behaviour_path_get_knots_REPLACED_BY_clutter_path_get_nodes -#define clutter_behaviour_path_append_knots clutter_behaviour_path_append_knots_REPLACED_BY_clutter_path_add_string -#define clutter_behaviour_path_append_knot clutter_behaviour_path_append_knot_REPLACED_BY_clutter_path_add_string -#define clutter_behaviour_path_insert_knot clutter_behaviour_path_insert_knot_REPLACED_BY_clutter_path_insert_node -#define clutter_behaviour_path_remove_knot clutter_behaviour_path_remove_knot_REPLACED_BY_clutter_path_remove_node -#define clutter_behaviour_path_clear clutter_behaviour_path_clear_REPLACED_BY_clutter_path_clear - -#define ClutterFixed ClutterFixed_REPLACED_BY_CoglFixed -#define ClutterAngle ClutterAngle_REPLACED_BY_CoglAngle - -#define CFX_ONE CFX_ONE_REPLACED_BY_COGL_FIXED_1 -#define CFX_HALF CFX_HALF_REPLACED_BY_COGL_FIXED_0_5 -#define CFX_PI CFX_PI_REPLACED_BY_COGL_FIXED_PI -#define CFX_2PI CFX_2PI_REPLACED_BY_COGL_FIXED_2_PI - -#define CLUTTER_INT_TO_FIXED CLUTTER_INT_TO_FIXED_REPLACED_BY_COGL_FIXED_FROM_INT -#define CLUTTER_FIXED_TO_INT CLUTTER_FIXED_TO_INT_REPLACED_BY_COGL_FIXED_TO_INT -#define CLUTTER_FLOAT_TO_FIXED CLUTTER_FLOAT_TO_FIXED_REPLACED_BY_COGL_FIXED_FROM_FLOAT -#define CLUTTER_FIXED_TO_FLOAT CLUTTER_FIXED_TO_FLOAT_REPLACED_BY_COGL_FIXED_TO_FLOAT - -#define CLUTTER_FIXED_MUL CLUTTER_FIXED_MUL_REPLACED_BY_COGL_FIXED_FAST_MUL -#define CLUTTER_FIXED_DIV CLUTTER_FIXED_DIV_REPLACED_BY_COGL_FIXED_FAST_DIV - -#define clutter_qmulx clutter_qmulx_REPLACED_BY_COGL_FIXED_MUL -#define clutter_qdivx clutter_qdivx_REPLACED_BY_COGL_FIXED_DIV -#define clutter_sinx clutter_sinx_REPLACED_BY_cogl_fixed_sin -#define clutter_cosx clutter_cosx_REPLACED_BY_cogl_fixed_cos - -#define clutter_media_set_position clutter_media_set_position_DEPRECATED_BY_clutter_media_set_progress -#define clutter_media_get_position clutter_media_get_position_DEPRECATED_BY_clutter_media_get_progress -#define clutter_media_set_volume clutter_media_set_volume_DEPRECATED_BY_clutter_media_set_audio_volume -#define clutter_media_get_volume clutter_media_get_volume_DEPRECATED_BY_clutter_media_get_audio_volume -#define clutter_media_get_buffer_percent clutter_media_get_buffer_percent_DEPRECATED_BY_clutter_media_get_buffer_fill - -#define CLUTTER_TYPE_LABEL CLUTTER_TYPE_LABEL_DEPRECATED_BY_CLUTTER_TYPE_TEXT -#define CLUTTER_TYPE_ENTRY CLUTTER_TYPE_ENTRY_DEPRECATED_BY_CLUTTER_TYPE_TEXT -#define clutter_label_new clutter_label_new_DEPRECATED_BY_clutter_text_new -#define clutter_entry_new clutter_entry_new_DEPRECATED_BY_clutter_text_new - -#define CLUTTER_TYPE_TEXTURE_HANDLE CLUTTER_TYPE_TEXTURE_HANDLE_REPLACED_BY_COGL_TYPE_HANDLE - -#define ClutterEffectTemplate ClutterEffectTemplate_DEPRECATED_BY_ClutterAnimation -#define clutter_effect_template_new clutter_effect_template_new_DEPRECATED_BY_clutter_animation_new -#define clutter_effect_template_new_for_duration clutter_effect_template_new_for_duration_DEPRECATED_BY_clutter_animation_new -#define clutter_effect_move clutter_effect_move_DEPRECATED_BY_clutter_actor_animate -#define clutter_effect_path clutter_effect_path_DEPRECATED_BY_clutter_actor_animate -#define clutter_effect_depth clutter_effect_depth_DEPRECATED_BY_clutter_actor_animate -#define clutter_effect_scale clutter_effect_scale_DEPRECATED_BY_clutter_actor_animate -#define clutter_effect_rotate clutter_effect_rotate_DEPRECATED_BY_clutter_actor_animate - -#define clutter_shader_set_uniform_1f clutter_shader_set_uniform_1f_REPLACED_BY_clutter_shader_set_uniform - -#define clutter_actor_set_xu clutter_actor_set_xu_DEPRECATED_BY_clutter_actor_set_x -#define clutter_actor_set_yu clutter_actor_set_yu_DEPRECATED_BY_clutter_actor_set_y -#define clutter_actor_set_widthu clutter_actor_set_widthu_DEPRECATED_BY_clutter_actor_set_width -#define clutter_actor_set_heightu clutter_actor_set_heightu_DEPRECATED_BY_clutter_actor_set_height -#define clutter_actor_set_depthu clutter_actor_set_depthu_DEPRECATED_BY_clutter_actor_set_depth -#define clutter_actor_set_positionu clutter_actor_set_positionu_DEPRECATED_BY_clutter_actor_set_position -#define clutter_actor_set_sizeu clutter_actor_set_sizeu_DEPRECATED_BY_clutter_actor_set_size - -#define clutter_actor_set_anchor_pointu clutter_actor_set_anchor_pointu_DEPRECATED_BY_clutter_actor_set_anchor_point -#define clutter_actor_get_anchor_pointu clutter_actor_get_anchor_pointu_DEPRECATED_BY_clutter_actor_get_anchor_point -#define clutter_actor_move_byu clutter_actor_move_byu_DEPRECATED_BY_clutter_actor_move_by - -#define clutter_actor_get_xu clutter_actor_get_xu_DEPRECATED_BY_clutter_actor_get_x -#define clutter_actor_get_yu clutter_actor_get_yu_DEPRECATED_BY_clutter_actor_get_y -#define clutter_actor_get_widthu clutter_actor_get_widthu_DEPRECATED_BY_clutter_actor_get_width -#define clutter_actor_get_heightu clutter_actor_get_heightu_DEPRECATED_BY_clutter_actor_get_height -#define clutter_actor_get_depthu clutter_actor_get_depthu_DEPRECATED_BY_clutter_actor_get_depth -#define clutter_actor_get_positionu clutter_actor_get_positionu_DEPRECATED_BY_clutter_actor_get_position -#define clutter_actor_get_sizeu clutter_actor_get_sizeu_DEPRECATED_BY_clutter_actor_get_size - -#define clutter_key_event_symbol clutter_key_event_symbol_REPLACED_BY_clutter_event_get_key_symbol -#define clutter_key_event_code clutter_key_event_code_REPLACED_BY_clutter_event_get_key_code -#define clutter_key_event_unicode clutter_key_event_unicode_REPLACED_BY_clutter_event_get_key_unicode -#define clutter_button_event_button clutter_button_event_button_REPLACED_BY_clutter_event_get_button - -#define clutter_stage_fullscreen clutter_stage_fullscreen_REPLACED_BY_clutter_stage_set_fullscreen -#define clutter_stage_unfullscreen clutter_stage_unfullscreen_REPLACED_BY_clutter_stage_set_fullscreen - -#define clutter_actor_get_box_from_vertices clutter_actor_get_box_from_vertices_REPLACED_BY_clutter_actor_box_from_vertices - -#define clutter_behaviour_ellipse_newx clutter_behaviour_ellipse_newx_DEPRECATED_BY_clutter_behaviour_ellipse_new -#define clutter_behaviour_ellipse_set_angle_startx clutter_behaviour_ellipse_set_angle_startx_DEPRECATED_BY_clutter_behaviour_ellipse_set_angle_start -#define clutter_behaviour_ellipse_get_angle_startx clutter_behaviour_ellipse_get_angle_startx_DEPRECATED_BY_clutter_behaviour_ellipse_get_angle_start -#define clutter_behaviour_ellipse_set_angle_endx clutter_behaviour_ellipse_set_angle_endx_DEPRECATED_BY_clutter_behaviour_ellipse_set_angle_end -#define clutter_behaviour_ellipse_get_angle_endx clutter_behaviour_ellipse_get_angle_endx_DEPRECATED_BY_clutter_behaviour_ellipse_get_angle_end -#define clutter_behaviour_ellipse_set_angle_tiltx clutter_behaviour_ellipse_set_angle_tiltx_DEPRECATED_BY_clutter_behaviour_ellipse_set_angle_tilt -#define clutter_behaviour_ellipse_get_angle_tiltx clutter_behaviour_ellipse_get_angle_tiltx_DEPRECATED_BY_clutter_behaviour_ellipse_get_angle_tilt -#define clutter_behaviour_ellipse_set_tiltx clutter_behaviour_ellipse_set_tiltx_DEPRECATED_BY_clutter_behaviour_ellipse_set_tilt -#define clutter_behaviour_ellipse_get_tiltx clutter_behaviour_ellipse_get_tiltx_DEPRECATED_BY_clutter_behaviour_ellipse_get_tilt - -#define clutter_behaviour_rotate_newx clutter_behaviour_rotate_newx_DEPRECATED_BY_clutter_behaviour_rotate_new -#define clutter_behaviour_rotate_get_boundsx clutter_behaviour_rotate_get_boundsx_DEPRECATED_BY_clutter_behaviour_rotate_get_bounds -#define clutter_behaviour_rotate_set_boundsx clutter_behaviour_rotate_set_boundsx_DEPRECATED_BY_clutter_behaviour_rotate_set_bounds - -#define clutter_behaviour_scale_newx clutter_behaviour_scale_newx_DEPRECATED_BY_clutter_behaviour_scale_new -#define clutter_behaviour_scale_set_boundsx clutter_behaviour_scale_set_boundsx_DEPRECATED_BY_clutter_behaviour_scale_set_bounds -#define clutter_behaviour_scale_get_boundsx clutter_behaviour_scale_get_boundsx_DEPRECATED_BY_clutter_behaviour_scale_get_bounds - -#define clutter_timeline_get_progressx clutter_timeline_get_progressx_DEPRECATED_BY_clutter_timeline_get_progress - -#define clutter_actor_pick clutter_actor_pick_DEPRECATED_BY_clutter_actor_paint - -#define clutter_actor_get_allocation_coords clutter_actor_get_allocation_coords_DEPRECATED_BY_clutter_actor_get_allocation_box - -#endif /* CLUTTER_DEPRECATED_H */ diff --git a/clutter/clutter-frame-source.c b/clutter/clutter-frame-source.c deleted file mode 100644 index 8f5f46b11..000000000 --- a/clutter/clutter-frame-source.c +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Neil Roberts <neil@linux.intel.com> - * - * Copyright (C) 2008 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "clutter-frame-source.h" -#include "clutter-timeout-interval.h" -#include "clutter-private.h" - -typedef struct _ClutterFrameSource ClutterFrameSource; - -struct _ClutterFrameSource -{ - GSource source; - - ClutterTimeoutInterval timeout; -}; - -static gboolean clutter_frame_source_prepare (GSource *source, - gint *timeout); -static gboolean clutter_frame_source_check (GSource *source); -static gboolean clutter_frame_source_dispatch (GSource *source, - GSourceFunc callback, - gpointer user_data); - -static GSourceFuncs clutter_frame_source_funcs = -{ - clutter_frame_source_prepare, - clutter_frame_source_check, - clutter_frame_source_dispatch, - NULL -}; - -/** - * clutter_frame_source_add_full: - * @priority: the priority of the frame source. Typically this will be in the - * range between %G_PRIORITY_DEFAULT and %G_PRIORITY_HIGH. - * @fps: the number of times per second to call the function - * @func: function to call - * @data: data to pass to the function - * @notify: function to call when the timeout source is removed - * - * Sets a function to be called at regular intervals with the given - * priority. The function is called repeatedly until it returns - * %FALSE, at which point the timeout is automatically destroyed and - * the function will not be called again. The @notify function is - * called when the timeout is destroyed. The first call to the - * function will be at the end of the first @interval. - * - * This function is similar to g_timeout_add_full() except that it - * will try to compensate for delays. For example, if @func takes half - * the interval time to execute then the function will be called again - * half the interval time after it finished. In contrast - * g_timeout_add_full() would not fire until a full interval after the - * function completes so the delay between calls would be 1.0 / @fps * - * 1.5. This function does not however try to invoke the function - * multiple times to catch up missing frames if @func takes more than - * @interval ms to execute. - * - * Rename to: clutter_frame_source_add - * - * Return value: the ID (greater than 0) of the event source. - * - * Since: 0.8 - * - * Deprecated: 1.6 - */ -guint -clutter_frame_source_add_full (gint priority, - guint fps, - GSourceFunc func, - gpointer data, - GDestroyNotify notify) -{ - guint ret; - GSource *source = g_source_new (&clutter_frame_source_funcs, - sizeof (ClutterFrameSource)); - ClutterFrameSource *frame_source = (ClutterFrameSource *) source; - - _clutter_timeout_interval_init (&frame_source->timeout, fps); - - if (priority != G_PRIORITY_DEFAULT) - g_source_set_priority (source, priority); - - g_source_set_name (source, "Clutter frame timeout"); - g_source_set_callback (source, func, data, notify); - - ret = g_source_attach (source, NULL); - - g_source_unref (source); - - return ret; -} - -/** - * clutter_frame_source_add: (skip) - * @fps: the number of times per second to call the function - * @func: function to call - * @data: data to pass to the function - * - * Simple wrapper around clutter_frame_source_add_full(). - * - * Return value: the ID (greater than 0) of the event source. - * - * Since: 0.8 - * - * Deprecated: 1.6 - */ -guint -clutter_frame_source_add (guint fps, - GSourceFunc func, - gpointer data) -{ - return clutter_frame_source_add_full (G_PRIORITY_DEFAULT, - fps, func, data, NULL); -} - -static gboolean -clutter_frame_source_prepare (GSource *source, - gint *delay) -{ - ClutterFrameSource *frame_source = (ClutterFrameSource *) source; - gint64 current_time; - -#if GLIB_CHECK_VERSION (2, 27, 3) - current_time = g_source_get_time (source) / 1000; -#else - { - GTimeVal source_time; - g_source_get_current_time (source, &source_time); - current_time = source_time.tv_sec * 1000 + source_time.tv_usec / 1000; - } -#endif - - return _clutter_timeout_interval_prepare (current_time, - &frame_source->timeout, - delay); -} - -static gboolean -clutter_frame_source_check (GSource *source) -{ - return clutter_frame_source_prepare (source, NULL); -} - -static gboolean -clutter_frame_source_dispatch (GSource *source, - GSourceFunc callback, - gpointer user_data) -{ - ClutterFrameSource *frame_source = (ClutterFrameSource *) source; - - return _clutter_timeout_interval_dispatch (&frame_source->timeout, - callback, user_data); -} - -/** - * clutter_threads_add_frame_source_full: - * @priority: the priority of the frame source. Typically this will be in the - * range between %G_PRIORITY_DEFAULT and %G_PRIORITY_HIGH. - * @fps: the number of times per second to call the function - * @func: function to call - * @data: data to pass to the function - * @notify: function to call when the timeout source is removed - * - * Sets a function to be called at regular intervals holding the Clutter - * threads lock, with the given priority. The function is called repeatedly - * until it returns %FALSE, at which point the timeout is automatically - * removed and the function will not be called again. The @notify function - * is called when the timeout is removed. - * - * This function is similar to clutter_threads_add_timeout_full() - * except that it will try to compensate for delays. For example, if - * @func takes half the interval time to execute then the function - * will be called again half the interval time after it finished. In - * contrast clutter_threads_add_timeout_full() would not fire until a - * full interval after the function completes so the delay between - * calls would be @interval * 1.5. This function does not however try - * to invoke the function multiple times to catch up missing frames if - * @func takes more than @interval ms to execute. - * - * See also clutter_threads_add_idle_full(). - * - * Rename to: clutter_threads_add_frame_source - * - * Return value: the ID (greater than 0) of the event source. - * - * Since: 0.8 - * - * Deprecated: 1.6 - */ -guint -clutter_threads_add_frame_source_full (gint priority, - guint fps, - GSourceFunc func, - gpointer data, - GDestroyNotify notify) -{ - ClutterThreadsDispatch *dispatch; - - g_return_val_if_fail (func != NULL, 0); - - dispatch = g_slice_new (ClutterThreadsDispatch); - dispatch->func = func; - dispatch->data = data; - dispatch->notify = notify; - - return clutter_frame_source_add_full (priority, - fps, - _clutter_threads_dispatch, dispatch, - _clutter_threads_dispatch_free); -} - -/** - * clutter_threads_add_frame_source: (skip) - * @fps: the number of times per second to call the function - * @func: function to call - * @data: data to pass to the function - * - * Simple wrapper around clutter_threads_add_frame_source_full(). - * - * Return value: the ID (greater than 0) of the event source. - * - * Since: 0.8 - * - * Deprecated: 1.6 - */ -guint -clutter_threads_add_frame_source (guint fps, - GSourceFunc func, - gpointer data) -{ - g_return_val_if_fail (func != NULL, 0); - - return clutter_threads_add_frame_source_full (G_PRIORITY_DEFAULT, - fps, - func, data, - NULL); -} diff --git a/clutter/clutter-frame-source.h b/clutter/clutter-frame-source.h deleted file mode 100644 index a8a40cc45..000000000 --- a/clutter/clutter-frame-source.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * - * Copyright (C) 2008 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) -#error "Only <clutter/clutter.h> can be included directly." -#endif - -#ifndef __CLUTTER_FRAME_SOURCE_H__ -#define __CLUTTER_FRAME_SOURCE_H__ - -#include <glib.h> - -G_BEGIN_DECLS - -#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION) - -guint clutter_frame_source_add (guint fps, - GSourceFunc func, - gpointer data); - -guint clutter_frame_source_add_full (gint priority, - guint fps, - GSourceFunc func, - gpointer data, - GDestroyNotify notify); - -#endif /* CLUTTER_DISABLE_DEPRECATED */ - -G_END_DECLS - -#endif /* __CLUTTER_FRAME_SOURCE_H__ */ diff --git a/clutter/clutter-group.h b/clutter/clutter-group.h index 99a374922..7c3b7c572 100644 --- a/clutter/clutter-group.h +++ b/clutter/clutter-group.h @@ -28,7 +28,6 @@ #ifndef __CLUTTER_GROUP_H__ #define __CLUTTER_GROUP_H__ -#include <glib-object.h> #include <clutter/clutter-types.h> #include <clutter/clutter-actor.h> @@ -104,15 +103,6 @@ ClutterActor *clutter_group_get_nth_child (ClutterGroup *self, gint clutter_group_get_n_children (ClutterGroup *self); void clutter_group_remove_all (ClutterGroup *group); -/* for Mr. Mallum */ -#define clutter_group_add(group,actor) G_STMT_START { \ - ClutterActor *_actor = (ClutterActor *) (actor); \ - if (CLUTTER_IS_GROUP ((group)) && CLUTTER_IS_ACTOR ((_actor))) \ - { \ - ClutterContainer *_container = (ClutterContainer *) (group); \ - clutter_container_add_actor (_container, _actor); \ - } } G_STMT_END - G_END_DECLS #endif /* __CLUTTER_GROUP_H__ */ diff --git a/clutter/clutter-keysyms-compat.h b/clutter/clutter-keysyms-compat.h deleted file mode 100644 index 50121ff26..000000000 --- a/clutter/clutter-keysyms-compat.h +++ /dev/null @@ -1,2210 +0,0 @@ -/* Clutter - * - * Copyright (C) 2006, 2007, 2008 OpenedHand Ltd - * Copyright (C) 2009, 2010 Intel Corp - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses>. - */ - -/* - * Compatibility version of clutter-keysyms.h. - * - * Since Clutter 1.4, the key symbol defines have been changed to have - * a KEY_ prefix. This is a compatibility header that is included when - * deprecated symbols are enabled. Consider porting to the new names - * instead. - */ - -#ifndef __CLUTTER_KEYSYMS_COMPAT_H__ -#define __CLUTTER_KEYSYMS_COMPAT_H__ - -#define CLUTTER_VoidSymbol 0xffffff -#define CLUTTER_BackSpace 0xff08 -#define CLUTTER_Tab 0xff09 -#define CLUTTER_Linefeed 0xff0a -#define CLUTTER_Clear 0xff0b -#define CLUTTER_Return 0xff0d -#define CLUTTER_Pause 0xff13 -#define CLUTTER_Scroll_Lock 0xff14 -#define CLUTTER_Sys_Req 0xff15 -#define CLUTTER_Escape 0xff1b -#define CLUTTER_Delete 0xffff -#define CLUTTER_Multi_key 0xff20 -#define CLUTTER_Codeinput 0xff37 -#define CLUTTER_SingleCandidate 0xff3c -#define CLUTTER_MultipleCandidate 0xff3d -#define CLUTTER_PreviousCandidate 0xff3e -#define CLUTTER_Kanji 0xff21 -#define CLUTTER_Muhenkan 0xff22 -#define CLUTTER_Henkan_Mode 0xff23 -#define CLUTTER_Henkan 0xff23 -#define CLUTTER_Romaji 0xff24 -#define CLUTTER_Hiragana 0xff25 -#define CLUTTER_Katakana 0xff26 -#define CLUTTER_Hiragana_Katakana 0xff27 -#define CLUTTER_Zenkaku 0xff28 -#define CLUTTER_Hankaku 0xff29 -#define CLUTTER_Zenkaku_Hankaku 0xff2a -#define CLUTTER_Touroku 0xff2b -#define CLUTTER_Massyo 0xff2c -#define CLUTTER_Kana_Lock 0xff2d -#define CLUTTER_Kana_Shift 0xff2e -#define CLUTTER_Eisu_Shift 0xff2f -#define CLUTTER_Eisu_toggle 0xff30 -#define CLUTTER_Kanji_Bangou 0xff37 -#define CLUTTER_Zen_Koho 0xff3d -#define CLUTTER_Mae_Koho 0xff3e -#define CLUTTER_Home 0xff50 -#define CLUTTER_Left 0xff51 -#define CLUTTER_Up 0xff52 -#define CLUTTER_Right 0xff53 -#define CLUTTER_Down 0xff54 -#define CLUTTER_Prior 0xff55 -#define CLUTTER_Page_Up 0xff55 -#define CLUTTER_Next 0xff56 -#define CLUTTER_Page_Down 0xff56 -#define CLUTTER_End 0xff57 -#define CLUTTER_Begin 0xff58 -#define CLUTTER_Select 0xff60 -#define CLUTTER_Print 0xff61 -#define CLUTTER_Execute 0xff62 -#define CLUTTER_Insert 0xff63 -#define CLUTTER_Undo 0xff65 -#define CLUTTER_Redo 0xff66 -#define CLUTTER_Menu 0xff67 -#define CLUTTER_Find 0xff68 -#define CLUTTER_Cancel 0xff69 -#define CLUTTER_Help 0xff6a -#define CLUTTER_Break 0xff6b -#define CLUTTER_Mode_switch 0xff7e -#define CLUTTER_script_switch 0xff7e -#define CLUTTER_Num_Lock 0xff7f -#define CLUTTER_KP_Space 0xff80 -#define CLUTTER_KP_Tab 0xff89 -#define CLUTTER_KP_Enter 0xff8d -#define CLUTTER_KP_F1 0xff91 -#define CLUTTER_KP_F2 0xff92 -#define CLUTTER_KP_F3 0xff93 -#define CLUTTER_KP_F4 0xff94 -#define CLUTTER_KP_Home 0xff95 -#define CLUTTER_KP_Left 0xff96 -#define CLUTTER_KP_Up 0xff97 -#define CLUTTER_KP_Right 0xff98 -#define CLUTTER_KP_Down 0xff99 -#define CLUTTER_KP_Prior 0xff9a -#define CLUTTER_KP_Page_Up 0xff9a -#define CLUTTER_KP_Next 0xff9b -#define CLUTTER_KP_Page_Down 0xff9b -#define CLUTTER_KP_End 0xff9c -#define CLUTTER_KP_Begin 0xff9d -#define CLUTTER_KP_Insert 0xff9e -#define CLUTTER_KP_Delete 0xff9f -#define CLUTTER_KP_Equal 0xffbd -#define CLUTTER_KP_Multiply 0xffaa -#define CLUTTER_KP_Add 0xffab -#define CLUTTER_KP_Separator 0xffac -#define CLUTTER_KP_Subtract 0xffad -#define CLUTTER_KP_Decimal 0xffae -#define CLUTTER_KP_Divide 0xffaf -#define CLUTTER_KP_0 0xffb0 -#define CLUTTER_KP_1 0xffb1 -#define CLUTTER_KP_2 0xffb2 -#define CLUTTER_KP_3 0xffb3 -#define CLUTTER_KP_4 0xffb4 -#define CLUTTER_KP_5 0xffb5 -#define CLUTTER_KP_6 0xffb6 -#define CLUTTER_KP_7 0xffb7 -#define CLUTTER_KP_8 0xffb8 -#define CLUTTER_KP_9 0xffb9 -#define CLUTTER_F1 0xffbe -#define CLUTTER_F2 0xffbf -#define CLUTTER_F3 0xffc0 -#define CLUTTER_F4 0xffc1 -#define CLUTTER_F5 0xffc2 -#define CLUTTER_F6 0xffc3 -#define CLUTTER_F7 0xffc4 -#define CLUTTER_F8 0xffc5 -#define CLUTTER_F9 0xffc6 -#define CLUTTER_F10 0xffc7 -#define CLUTTER_F11 0xffc8 -#define CLUTTER_L1 0xffc8 -#define CLUTTER_F12 0xffc9 -#define CLUTTER_L2 0xffc9 -#define CLUTTER_F13 0xffca -#define CLUTTER_L3 0xffca -#define CLUTTER_F14 0xffcb -#define CLUTTER_L4 0xffcb -#define CLUTTER_F15 0xffcc -#define CLUTTER_L5 0xffcc -#define CLUTTER_F16 0xffcd -#define CLUTTER_L6 0xffcd -#define CLUTTER_F17 0xffce -#define CLUTTER_L7 0xffce -#define CLUTTER_F18 0xffcf -#define CLUTTER_L8 0xffcf -#define CLUTTER_F19 0xffd0 -#define CLUTTER_L9 0xffd0 -#define CLUTTER_F20 0xffd1 -#define CLUTTER_L10 0xffd1 -#define CLUTTER_F21 0xffd2 -#define CLUTTER_R1 0xffd2 -#define CLUTTER_F22 0xffd3 -#define CLUTTER_R2 0xffd3 -#define CLUTTER_F23 0xffd4 -#define CLUTTER_R3 0xffd4 -#define CLUTTER_F24 0xffd5 -#define CLUTTER_R4 0xffd5 -#define CLUTTER_F25 0xffd6 -#define CLUTTER_R5 0xffd6 -#define CLUTTER_F26 0xffd7 -#define CLUTTER_R6 0xffd7 -#define CLUTTER_F27 0xffd8 -#define CLUTTER_R7 0xffd8 -#define CLUTTER_F28 0xffd9 -#define CLUTTER_R8 0xffd9 -#define CLUTTER_F29 0xffda -#define CLUTTER_R9 0xffda -#define CLUTTER_F30 0xffdb -#define CLUTTER_R10 0xffdb -#define CLUTTER_F31 0xffdc -#define CLUTTER_R11 0xffdc -#define CLUTTER_F32 0xffdd -#define CLUTTER_R12 0xffdd -#define CLUTTER_F33 0xffde -#define CLUTTER_R13 0xffde -#define CLUTTER_F34 0xffdf -#define CLUTTER_R14 0xffdf -#define CLUTTER_F35 0xffe0 -#define CLUTTER_R15 0xffe0 -#define CLUTTER_Shift_L 0xffe1 -#define CLUTTER_Shift_R 0xffe2 -#define CLUTTER_Control_L 0xffe3 -#define CLUTTER_Control_R 0xffe4 -#define CLUTTER_Caps_Lock 0xffe5 -#define CLUTTER_Shift_Lock 0xffe6 -#define CLUTTER_Meta_L 0xffe7 -#define CLUTTER_Meta_R 0xffe8 -#define CLUTTER_Alt_L 0xffe9 -#define CLUTTER_Alt_R 0xffea -#define CLUTTER_Super_L 0xffeb -#define CLUTTER_Super_R 0xffec -#define CLUTTER_Hyper_L 0xffed -#define CLUTTER_Hyper_R 0xffee -#define CLUTTER_ISO_Lock 0xfe01 -#define CLUTTER_ISO_Level2_Latch 0xfe02 -#define CLUTTER_ISO_Level3_Shift 0xfe03 -#define CLUTTER_ISO_Level3_Latch 0xfe04 -#define CLUTTER_ISO_Level3_Lock 0xfe05 -#define CLUTTER_ISO_Level5_Shift 0xfe11 -#define CLUTTER_ISO_Level5_Latch 0xfe12 -#define CLUTTER_ISO_Level5_Lock 0xfe13 -#define CLUTTER_ISO_Group_Shift 0xff7e -#define CLUTTER_ISO_Group_Latch 0xfe06 -#define CLUTTER_ISO_Group_Lock 0xfe07 -#define CLUTTER_ISO_Next_Group 0xfe08 -#define CLUTTER_ISO_Next_Group_Lock 0xfe09 -#define CLUTTER_ISO_Prev_Group 0xfe0a -#define CLUTTER_ISO_Prev_Group_Lock 0xfe0b -#define CLUTTER_ISO_First_Group 0xfe0c -#define CLUTTER_ISO_First_Group_Lock 0xfe0d -#define CLUTTER_ISO_Last_Group 0xfe0e -#define CLUTTER_ISO_Last_Group_Lock 0xfe0f -#define CLUTTER_ISO_Left_Tab 0xfe20 -#define CLUTTER_ISO_Move_Line_Up 0xfe21 -#define CLUTTER_ISO_Move_Line_Down 0xfe22 -#define CLUTTER_ISO_Partial_Line_Up 0xfe23 -#define CLUTTER_ISO_Partial_Line_Down 0xfe24 -#define CLUTTER_ISO_Partial_Space_Left 0xfe25 -#define CLUTTER_ISO_Partial_Space_Right 0xfe26 -#define CLUTTER_ISO_Set_Margin_Left 0xfe27 -#define CLUTTER_ISO_Set_Margin_Right 0xfe28 -#define CLUTTER_ISO_Release_Margin_Left 0xfe29 -#define CLUTTER_ISO_Release_Margin_Right 0xfe2a -#define CLUTTER_ISO_Release_Both_Margins 0xfe2b -#define CLUTTER_ISO_Fast_Cursor_Left 0xfe2c -#define CLUTTER_ISO_Fast_Cursor_Right 0xfe2d -#define CLUTTER_ISO_Fast_Cursor_Up 0xfe2e -#define CLUTTER_ISO_Fast_Cursor_Down 0xfe2f -#define CLUTTER_ISO_Continuous_Underline 0xfe30 -#define CLUTTER_ISO_Discontinuous_Underline 0xfe31 -#define CLUTTER_ISO_Emphasize 0xfe32 -#define CLUTTER_ISO_Center_Object 0xfe33 -#define CLUTTER_ISO_Enter 0xfe34 -#define CLUTTER_dead_grave 0xfe50 -#define CLUTTER_dead_acute 0xfe51 -#define CLUTTER_dead_circumflex 0xfe52 -#define CLUTTER_dead_tilde 0xfe53 -#define CLUTTER_dead_perispomeni 0xfe53 -#define CLUTTER_dead_macron 0xfe54 -#define CLUTTER_dead_breve 0xfe55 -#define CLUTTER_dead_abovedot 0xfe56 -#define CLUTTER_dead_diaeresis 0xfe57 -#define CLUTTER_dead_abovering 0xfe58 -#define CLUTTER_dead_doubleacute 0xfe59 -#define CLUTTER_dead_caron 0xfe5a -#define CLUTTER_dead_cedilla 0xfe5b -#define CLUTTER_dead_ogonek 0xfe5c -#define CLUTTER_dead_iota 0xfe5d -#define CLUTTER_dead_voiced_sound 0xfe5e -#define CLUTTER_dead_semivoiced_sound 0xfe5f -#define CLUTTER_dead_belowdot 0xfe60 -#define CLUTTER_dead_hook 0xfe61 -#define CLUTTER_dead_horn 0xfe62 -#define CLUTTER_dead_stroke 0xfe63 -#define CLUTTER_dead_abovecomma 0xfe64 -#define CLUTTER_dead_psili 0xfe64 -#define CLUTTER_dead_abovereversedcomma 0xfe65 -#define CLUTTER_dead_dasia 0xfe65 -#define CLUTTER_dead_doublegrave 0xfe66 -#define CLUTTER_dead_belowring 0xfe67 -#define CLUTTER_dead_belowmacron 0xfe68 -#define CLUTTER_dead_belowcircumflex 0xfe69 -#define CLUTTER_dead_belowtilde 0xfe6a -#define CLUTTER_dead_belowbreve 0xfe6b -#define CLUTTER_dead_belowdiaeresis 0xfe6c -#define CLUTTER_dead_invertedbreve 0xfe6d -#define CLUTTER_dead_belowcomma 0xfe6e -#define CLUTTER_dead_currency 0xfe6f -#define CLUTTER_dead_a 0xfe80 -#define CLUTTER_dead_A 0xfe81 -#define CLUTTER_dead_e 0xfe82 -#define CLUTTER_dead_E 0xfe83 -#define CLUTTER_dead_i 0xfe84 -#define CLUTTER_dead_I 0xfe85 -#define CLUTTER_dead_o 0xfe86 -#define CLUTTER_dead_O 0xfe87 -#define CLUTTER_dead_u 0xfe88 -#define CLUTTER_dead_U 0xfe89 -#define CLUTTER_dead_small_schwa 0xfe8a -#define CLUTTER_dead_capital_schwa 0xfe8b -#define CLUTTER_First_Virtual_Screen 0xfed0 -#define CLUTTER_Prev_Virtual_Screen 0xfed1 -#define CLUTTER_Next_Virtual_Screen 0xfed2 -#define CLUTTER_Last_Virtual_Screen 0xfed4 -#define CLUTTER_Terminate_Server 0xfed5 -#define CLUTTER_AccessX_Enable 0xfe70 -#define CLUTTER_AccessX_Feedback_Enable 0xfe71 -#define CLUTTER_RepeatKeys_Enable 0xfe72 -#define CLUTTER_SlowKeys_Enable 0xfe73 -#define CLUTTER_BounceKeys_Enable 0xfe74 -#define CLUTTER_StickyKeys_Enable 0xfe75 -#define CLUTTER_MouseKeys_Enable 0xfe76 -#define CLUTTER_MouseKeys_Accel_Enable 0xfe77 -#define CLUTTER_Overlay1_Enable 0xfe78 -#define CLUTTER_Overlay2_Enable 0xfe79 -#define CLUTTER_AudibleBell_Enable 0xfe7a -#define CLUTTER_Pointer_Left 0xfee0 -#define CLUTTER_Pointer_Right 0xfee1 -#define CLUTTER_Pointer_Up 0xfee2 -#define CLUTTER_Pointer_Down 0xfee3 -#define CLUTTER_Pointer_UpLeft 0xfee4 -#define CLUTTER_Pointer_UpRight 0xfee5 -#define CLUTTER_Pointer_DownLeft 0xfee6 -#define CLUTTER_Pointer_DownRight 0xfee7 -#define CLUTTER_Pointer_Button_Dflt 0xfee8 -#define CLUTTER_Pointer_Button1 0xfee9 -#define CLUTTER_Pointer_Button2 0xfeea -#define CLUTTER_Pointer_Button3 0xfeeb -#define CLUTTER_Pointer_Button4 0xfeec -#define CLUTTER_Pointer_Button5 0xfeed -#define CLUTTER_Pointer_DblClick_Dflt 0xfeee -#define CLUTTER_Pointer_DblClick1 0xfeef -#define CLUTTER_Pointer_DblClick2 0xfef0 -#define CLUTTER_Pointer_DblClick3 0xfef1 -#define CLUTTER_Pointer_DblClick4 0xfef2 -#define CLUTTER_Pointer_DblClick5 0xfef3 -#define CLUTTER_Pointer_Drag_Dflt 0xfef4 -#define CLUTTER_Pointer_Drag1 0xfef5 -#define CLUTTER_Pointer_Drag2 0xfef6 -#define CLUTTER_Pointer_Drag3 0xfef7 -#define CLUTTER_Pointer_Drag4 0xfef8 -#define CLUTTER_Pointer_Drag5 0xfefd -#define CLUTTER_Pointer_EnableKeys 0xfef9 -#define CLUTTER_Pointer_Accelerate 0xfefa -#define CLUTTER_Pointer_DfltBtnNext 0xfefb -#define CLUTTER_Pointer_DfltBtnPrev 0xfefc -#define CLUTTER_3270_Duplicate 0xfd01 -#define CLUTTER_3270_FieldMark 0xfd02 -#define CLUTTER_3270_Right2 0xfd03 -#define CLUTTER_3270_Left2 0xfd04 -#define CLUTTER_3270_BackTab 0xfd05 -#define CLUTTER_3270_EraseEOF 0xfd06 -#define CLUTTER_3270_EraseInput 0xfd07 -#define CLUTTER_3270_Reset 0xfd08 -#define CLUTTER_3270_Quit 0xfd09 -#define CLUTTER_3270_PA1 0xfd0a -#define CLUTTER_3270_PA2 0xfd0b -#define CLUTTER_3270_PA3 0xfd0c -#define CLUTTER_3270_Test 0xfd0d -#define CLUTTER_3270_Attn 0xfd0e -#define CLUTTER_3270_CursorBlink 0xfd0f -#define CLUTTER_3270_AltCursor 0xfd10 -#define CLUTTER_3270_KeyClick 0xfd11 -#define CLUTTER_3270_Jump 0xfd12 -#define CLUTTER_3270_Ident 0xfd13 -#define CLUTTER_3270_Rule 0xfd14 -#define CLUTTER_3270_Copy 0xfd15 -#define CLUTTER_3270_Play 0xfd16 -#define CLUTTER_3270_Setup 0xfd17 -#define CLUTTER_3270_Record 0xfd18 -#define CLUTTER_3270_ChangeScreen 0xfd19 -#define CLUTTER_3270_DeleteWord 0xfd1a -#define CLUTTER_3270_ExSelect 0xfd1b -#define CLUTTER_3270_CursorSelect 0xfd1c -#define CLUTTER_3270_PrintScreen 0xfd1d -#define CLUTTER_3270_Enter 0xfd1e -#define CLUTTER_space 0x020 -#define CLUTTER_exclam 0x021 -#define CLUTTER_quotedbl 0x022 -#define CLUTTER_numbersign 0x023 -#define CLUTTER_dollar 0x024 -#define CLUTTER_percent 0x025 -#define CLUTTER_ampersand 0x026 -#define CLUTTER_apostrophe 0x027 -#define CLUTTER_quoteright 0x027 -#define CLUTTER_parenleft 0x028 -#define CLUTTER_parenright 0x029 -#define CLUTTER_asterisk 0x02a -#define CLUTTER_plus 0x02b -#define CLUTTER_comma 0x02c -#define CLUTTER_minus 0x02d -#define CLUTTER_period 0x02e -#define CLUTTER_slash 0x02f -#define CLUTTER_0 0x030 -#define CLUTTER_1 0x031 -#define CLUTTER_2 0x032 -#define CLUTTER_3 0x033 -#define CLUTTER_4 0x034 -#define CLUTTER_5 0x035 -#define CLUTTER_6 0x036 -#define CLUTTER_7 0x037 -#define CLUTTER_8 0x038 -#define CLUTTER_9 0x039 -#define CLUTTER_colon 0x03a -#define CLUTTER_semicolon 0x03b -#define CLUTTER_less 0x03c -#define CLUTTER_equal 0x03d -#define CLUTTER_greater 0x03e -#define CLUTTER_question 0x03f -#define CLUTTER_at 0x040 -#define CLUTTER_A 0x041 -#define CLUTTER_B 0x042 -#define CLUTTER_C 0x043 -#define CLUTTER_D 0x044 -#define CLUTTER_E 0x045 -#define CLUTTER_F 0x046 -#define CLUTTER_G 0x047 -#define CLUTTER_H 0x048 -#define CLUTTER_I 0x049 -#define CLUTTER_J 0x04a -#define CLUTTER_K 0x04b -#define CLUTTER_L 0x04c -#define CLUTTER_M 0x04d -#define CLUTTER_N 0x04e -#define CLUTTER_O 0x04f -#define CLUTTER_P 0x050 -#define CLUTTER_Q 0x051 -#define CLUTTER_R 0x052 -#define CLUTTER_S 0x053 -#define CLUTTER_T 0x054 -#define CLUTTER_U 0x055 -#define CLUTTER_V 0x056 -#define CLUTTER_W 0x057 -#define CLUTTER_X 0x058 -#define CLUTTER_Y 0x059 -#define CLUTTER_Z 0x05a -#define CLUTTER_bracketleft 0x05b -#define CLUTTER_backslash 0x05c -#define CLUTTER_bracketright 0x05d -#define CLUTTER_asciicircum 0x05e -#define CLUTTER_underscore 0x05f -#define CLUTTER_grave 0x060 -#define CLUTTER_quoteleft 0x060 -#define CLUTTER_a 0x061 -#define CLUTTER_b 0x062 -#define CLUTTER_c 0x063 -#define CLUTTER_d 0x064 -#define CLUTTER_e 0x065 -#define CLUTTER_f 0x066 -#define CLUTTER_g 0x067 -#define CLUTTER_h 0x068 -#define CLUTTER_i 0x069 -#define CLUTTER_j 0x06a -#define CLUTTER_k 0x06b -#define CLUTTER_l 0x06c -#define CLUTTER_m 0x06d -#define CLUTTER_n 0x06e -#define CLUTTER_o 0x06f -#define CLUTTER_p 0x070 -#define CLUTTER_q 0x071 -#define CLUTTER_r 0x072 -#define CLUTTER_s 0x073 -#define CLUTTER_t 0x074 -#define CLUTTER_u 0x075 -#define CLUTTER_v 0x076 -#define CLUTTER_w 0x077 -#define CLUTTER_x 0x078 -#define CLUTTER_y 0x079 -#define CLUTTER_z 0x07a -#define CLUTTER_braceleft 0x07b -#define CLUTTER_bar 0x07c -#define CLUTTER_braceright 0x07d -#define CLUTTER_asciitilde 0x07e -#define CLUTTER_nobreakspace 0x0a0 -#define CLUTTER_exclamdown 0x0a1 -#define CLUTTER_cent 0x0a2 -#define CLUTTER_sterling 0x0a3 -#define CLUTTER_currency 0x0a4 -#define CLUTTER_yen 0x0a5 -#define CLUTTER_brokenbar 0x0a6 -#define CLUTTER_section 0x0a7 -#define CLUTTER_diaeresis 0x0a8 -#define CLUTTER_copyright 0x0a9 -#define CLUTTER_ordfeminine 0x0aa -#define CLUTTER_guillemotleft 0x0ab -#define CLUTTER_notsign 0x0ac -#define CLUTTER_hyphen 0x0ad -#define CLUTTER_registered 0x0ae -#define CLUTTER_macron 0x0af -#define CLUTTER_degree 0x0b0 -#define CLUTTER_plusminus 0x0b1 -#define CLUTTER_twosuperior 0x0b2 -#define CLUTTER_threesuperior 0x0b3 -#define CLUTTER_acute 0x0b4 -#define CLUTTER_mu 0x0b5 -#define CLUTTER_paragraph 0x0b6 -#define CLUTTER_periodcentered 0x0b7 -#define CLUTTER_cedilla 0x0b8 -#define CLUTTER_onesuperior 0x0b9 -#define CLUTTER_masculine 0x0ba -#define CLUTTER_guillemotright 0x0bb -#define CLUTTER_onequarter 0x0bc -#define CLUTTER_onehalf 0x0bd -#define CLUTTER_threequarters 0x0be -#define CLUTTER_questiondown 0x0bf -#define CLUTTER_Agrave 0x0c0 -#define CLUTTER_Aacute 0x0c1 -#define CLUTTER_Acircumflex 0x0c2 -#define CLUTTER_Atilde 0x0c3 -#define CLUTTER_Adiaeresis 0x0c4 -#define CLUTTER_Aring 0x0c5 -#define CLUTTER_AE 0x0c6 -#define CLUTTER_Ccedilla 0x0c7 -#define CLUTTER_Egrave 0x0c8 -#define CLUTTER_Eacute 0x0c9 -#define CLUTTER_Ecircumflex 0x0ca -#define CLUTTER_Ediaeresis 0x0cb -#define CLUTTER_Igrave 0x0cc -#define CLUTTER_Iacute 0x0cd -#define CLUTTER_Icircumflex 0x0ce -#define CLUTTER_Idiaeresis 0x0cf -#define CLUTTER_ETH 0x0d0 -#define CLUTTER_Eth 0x0d0 -#define CLUTTER_Ntilde 0x0d1 -#define CLUTTER_Ograve 0x0d2 -#define CLUTTER_Oacute 0x0d3 -#define CLUTTER_Ocircumflex 0x0d4 -#define CLUTTER_Otilde 0x0d5 -#define CLUTTER_Odiaeresis 0x0d6 -#define CLUTTER_multiply 0x0d7 -#define CLUTTER_Oslash 0x0d8 -#define CLUTTER_Ooblique 0x0d8 -#define CLUTTER_Ugrave 0x0d9 -#define CLUTTER_Uacute 0x0da -#define CLUTTER_Ucircumflex 0x0db -#define CLUTTER_Udiaeresis 0x0dc -#define CLUTTER_Yacute 0x0dd -#define CLUTTER_THORN 0x0de -#define CLUTTER_Thorn 0x0de -#define CLUTTER_ssharp 0x0df -#define CLUTTER_agrave 0x0e0 -#define CLUTTER_aacute 0x0e1 -#define CLUTTER_acircumflex 0x0e2 -#define CLUTTER_atilde 0x0e3 -#define CLUTTER_adiaeresis 0x0e4 -#define CLUTTER_aring 0x0e5 -#define CLUTTER_ae 0x0e6 -#define CLUTTER_ccedilla 0x0e7 -#define CLUTTER_egrave 0x0e8 -#define CLUTTER_eacute 0x0e9 -#define CLUTTER_ecircumflex 0x0ea -#define CLUTTER_ediaeresis 0x0eb -#define CLUTTER_igrave 0x0ec -#define CLUTTER_iacute 0x0ed -#define CLUTTER_icircumflex 0x0ee -#define CLUTTER_idiaeresis 0x0ef -#define CLUTTER_eth 0x0f0 -#define CLUTTER_ntilde 0x0f1 -#define CLUTTER_ograve 0x0f2 -#define CLUTTER_oacute 0x0f3 -#define CLUTTER_ocircumflex 0x0f4 -#define CLUTTER_otilde 0x0f5 -#define CLUTTER_odiaeresis 0x0f6 -#define CLUTTER_division 0x0f7 -#define CLUTTER_oslash 0x0f8 -#define CLUTTER_ooblique 0x0f8 -#define CLUTTER_ugrave 0x0f9 -#define CLUTTER_uacute 0x0fa -#define CLUTTER_ucircumflex 0x0fb -#define CLUTTER_udiaeresis 0x0fc -#define CLUTTER_yacute 0x0fd -#define CLUTTER_thorn 0x0fe -#define CLUTTER_ydiaeresis 0x0ff -#define CLUTTER_Aogonek 0x1a1 -#define CLUTTER_breve 0x1a2 -#define CLUTTER_Lstroke 0x1a3 -#define CLUTTER_Lcaron 0x1a5 -#define CLUTTER_Sacute 0x1a6 -#define CLUTTER_Scaron 0x1a9 -#define CLUTTER_Scedilla 0x1aa -#define CLUTTER_Tcaron 0x1ab -#define CLUTTER_Zacute 0x1ac -#define CLUTTER_Zcaron 0x1ae -#define CLUTTER_Zabovedot 0x1af -#define CLUTTER_aogonek 0x1b1 -#define CLUTTER_ogonek 0x1b2 -#define CLUTTER_lstroke 0x1b3 -#define CLUTTER_lcaron 0x1b5 -#define CLUTTER_sacute 0x1b6 -#define CLUTTER_caron 0x1b7 -#define CLUTTER_scaron 0x1b9 -#define CLUTTER_scedilla 0x1ba -#define CLUTTER_tcaron 0x1bb -#define CLUTTER_zacute 0x1bc -#define CLUTTER_doubleacute 0x1bd -#define CLUTTER_zcaron 0x1be -#define CLUTTER_zabovedot 0x1bf -#define CLUTTER_Racute 0x1c0 -#define CLUTTER_Abreve 0x1c3 -#define CLUTTER_Lacute 0x1c5 -#define CLUTTER_Cacute 0x1c6 -#define CLUTTER_Ccaron 0x1c8 -#define CLUTTER_Eogonek 0x1ca -#define CLUTTER_Ecaron 0x1cc -#define CLUTTER_Dcaron 0x1cf -#define CLUTTER_Dstroke 0x1d0 -#define CLUTTER_Nacute 0x1d1 -#define CLUTTER_Ncaron 0x1d2 -#define CLUTTER_Odoubleacute 0x1d5 -#define CLUTTER_Rcaron 0x1d8 -#define CLUTTER_Uring 0x1d9 -#define CLUTTER_Udoubleacute 0x1db -#define CLUTTER_Tcedilla 0x1de -#define CLUTTER_racute 0x1e0 -#define CLUTTER_abreve 0x1e3 -#define CLUTTER_lacute 0x1e5 -#define CLUTTER_cacute 0x1e6 -#define CLUTTER_ccaron 0x1e8 -#define CLUTTER_eogonek 0x1ea -#define CLUTTER_ecaron 0x1ec -#define CLUTTER_dcaron 0x1ef -#define CLUTTER_dstroke 0x1f0 -#define CLUTTER_nacute 0x1f1 -#define CLUTTER_ncaron 0x1f2 -#define CLUTTER_odoubleacute 0x1f5 -#define CLUTTER_udoubleacute 0x1fb -#define CLUTTER_rcaron 0x1f8 -#define CLUTTER_uring 0x1f9 -#define CLUTTER_tcedilla 0x1fe -#define CLUTTER_abovedot 0x1ff -#define CLUTTER_Hstroke 0x2a1 -#define CLUTTER_Hcircumflex 0x2a6 -#define CLUTTER_Iabovedot 0x2a9 -#define CLUTTER_Gbreve 0x2ab -#define CLUTTER_Jcircumflex 0x2ac -#define CLUTTER_hstroke 0x2b1 -#define CLUTTER_hcircumflex 0x2b6 -#define CLUTTER_idotless 0x2b9 -#define CLUTTER_gbreve 0x2bb -#define CLUTTER_jcircumflex 0x2bc -#define CLUTTER_Cabovedot 0x2c5 -#define CLUTTER_Ccircumflex 0x2c6 -#define CLUTTER_Gabovedot 0x2d5 -#define CLUTTER_Gcircumflex 0x2d8 -#define CLUTTER_Ubreve 0x2dd -#define CLUTTER_Scircumflex 0x2de -#define CLUTTER_cabovedot 0x2e5 -#define CLUTTER_ccircumflex 0x2e6 -#define CLUTTER_gabovedot 0x2f5 -#define CLUTTER_gcircumflex 0x2f8 -#define CLUTTER_ubreve 0x2fd -#define CLUTTER_scircumflex 0x2fe -#define CLUTTER_kra 0x3a2 -#define CLUTTER_kappa 0x3a2 -#define CLUTTER_Rcedilla 0x3a3 -#define CLUTTER_Itilde 0x3a5 -#define CLUTTER_Lcedilla 0x3a6 -#define CLUTTER_Emacron 0x3aa -#define CLUTTER_Gcedilla 0x3ab -#define CLUTTER_Tslash 0x3ac -#define CLUTTER_rcedilla 0x3b3 -#define CLUTTER_itilde 0x3b5 -#define CLUTTER_lcedilla 0x3b6 -#define CLUTTER_emacron 0x3ba -#define CLUTTER_gcedilla 0x3bb -#define CLUTTER_tslash 0x3bc -#define CLUTTER_ENG 0x3bd -#define CLUTTER_eng 0x3bf -#define CLUTTER_Amacron 0x3c0 -#define CLUTTER_Iogonek 0x3c7 -#define CLUTTER_Eabovedot 0x3cc -#define CLUTTER_Imacron 0x3cf -#define CLUTTER_Ncedilla 0x3d1 -#define CLUTTER_Omacron 0x3d2 -#define CLUTTER_Kcedilla 0x3d3 -#define CLUTTER_Uogonek 0x3d9 -#define CLUTTER_Utilde 0x3dd -#define CLUTTER_Umacron 0x3de -#define CLUTTER_amacron 0x3e0 -#define CLUTTER_iogonek 0x3e7 -#define CLUTTER_eabovedot 0x3ec -#define CLUTTER_imacron 0x3ef -#define CLUTTER_ncedilla 0x3f1 -#define CLUTTER_omacron 0x3f2 -#define CLUTTER_kcedilla 0x3f3 -#define CLUTTER_uogonek 0x3f9 -#define CLUTTER_utilde 0x3fd -#define CLUTTER_umacron 0x3fe -#define CLUTTER_Babovedot 0x1001e02 -#define CLUTTER_babovedot 0x1001e03 -#define CLUTTER_Dabovedot 0x1001e0a -#define CLUTTER_Wgrave 0x1001e80 -#define CLUTTER_Wacute 0x1001e82 -#define CLUTTER_dabovedot 0x1001e0b -#define CLUTTER_Ygrave 0x1001ef2 -#define CLUTTER_Fabovedot 0x1001e1e -#define CLUTTER_fabovedot 0x1001e1f -#define CLUTTER_Mabovedot 0x1001e40 -#define CLUTTER_mabovedot 0x1001e41 -#define CLUTTER_Pabovedot 0x1001e56 -#define CLUTTER_wgrave 0x1001e81 -#define CLUTTER_pabovedot 0x1001e57 -#define CLUTTER_wacute 0x1001e83 -#define CLUTTER_Sabovedot 0x1001e60 -#define CLUTTER_ygrave 0x1001ef3 -#define CLUTTER_Wdiaeresis 0x1001e84 -#define CLUTTER_wdiaeresis 0x1001e85 -#define CLUTTER_sabovedot 0x1001e61 -#define CLUTTER_Wcircumflex 0x1000174 -#define CLUTTER_Tabovedot 0x1001e6a -#define CLUTTER_Ycircumflex 0x1000176 -#define CLUTTER_wcircumflex 0x1000175 -#define CLUTTER_tabovedot 0x1001e6b -#define CLUTTER_ycircumflex 0x1000177 -#define CLUTTER_OE 0x13bc -#define CLUTTER_oe 0x13bd -#define CLUTTER_Ydiaeresis 0x13be -#define CLUTTER_overline 0x47e -#define CLUTTER_kana_fullstop 0x4a1 -#define CLUTTER_kana_openingbracket 0x4a2 -#define CLUTTER_kana_closingbracket 0x4a3 -#define CLUTTER_kana_comma 0x4a4 -#define CLUTTER_kana_conjunctive 0x4a5 -#define CLUTTER_kana_middledot 0x4a5 -#define CLUTTER_kana_WO 0x4a6 -#define CLUTTER_kana_a 0x4a7 -#define CLUTTER_kana_i 0x4a8 -#define CLUTTER_kana_u 0x4a9 -#define CLUTTER_kana_e 0x4aa -#define CLUTTER_kana_o 0x4ab -#define CLUTTER_kana_ya 0x4ac -#define CLUTTER_kana_yu 0x4ad -#define CLUTTER_kana_yo 0x4ae -#define CLUTTER_kana_tsu 0x4af -#define CLUTTER_kana_tu 0x4af -#define CLUTTER_prolongedsound 0x4b0 -#define CLUTTER_kana_A 0x4b1 -#define CLUTTER_kana_I 0x4b2 -#define CLUTTER_kana_U 0x4b3 -#define CLUTTER_kana_E 0x4b4 -#define CLUTTER_kana_O 0x4b5 -#define CLUTTER_kana_KA 0x4b6 -#define CLUTTER_kana_KI 0x4b7 -#define CLUTTER_kana_KU 0x4b8 -#define CLUTTER_kana_KE 0x4b9 -#define CLUTTER_kana_KO 0x4ba -#define CLUTTER_kana_SA 0x4bb -#define CLUTTER_kana_SHI 0x4bc -#define CLUTTER_kana_SU 0x4bd -#define CLUTTER_kana_SE 0x4be -#define CLUTTER_kana_SO 0x4bf -#define CLUTTER_kana_TA 0x4c0 -#define CLUTTER_kana_CHI 0x4c1 -#define CLUTTER_kana_TI 0x4c1 -#define CLUTTER_kana_TSU 0x4c2 -#define CLUTTER_kana_TU 0x4c2 -#define CLUTTER_kana_TE 0x4c3 -#define CLUTTER_kana_TO 0x4c4 -#define CLUTTER_kana_NA 0x4c5 -#define CLUTTER_kana_NI 0x4c6 -#define CLUTTER_kana_NU 0x4c7 -#define CLUTTER_kana_NE 0x4c8 -#define CLUTTER_kana_NO 0x4c9 -#define CLUTTER_kana_HA 0x4ca -#define CLUTTER_kana_HI 0x4cb -#define CLUTTER_kana_FU 0x4cc -#define CLUTTER_kana_HU 0x4cc -#define CLUTTER_kana_HE 0x4cd -#define CLUTTER_kana_HO 0x4ce -#define CLUTTER_kana_MA 0x4cf -#define CLUTTER_kana_MI 0x4d0 -#define CLUTTER_kana_MU 0x4d1 -#define CLUTTER_kana_ME 0x4d2 -#define CLUTTER_kana_MO 0x4d3 -#define CLUTTER_kana_YA 0x4d4 -#define CLUTTER_kana_YU 0x4d5 -#define CLUTTER_kana_YO 0x4d6 -#define CLUTTER_kana_RA 0x4d7 -#define CLUTTER_kana_RI 0x4d8 -#define CLUTTER_kana_RU 0x4d9 -#define CLUTTER_kana_RE 0x4da -#define CLUTTER_kana_RO 0x4db -#define CLUTTER_kana_WA 0x4dc -#define CLUTTER_kana_N 0x4dd -#define CLUTTER_voicedsound 0x4de -#define CLUTTER_semivoicedsound 0x4df -#define CLUTTER_kana_switch 0xff7e -#define CLUTTER_Farsi_0 0x10006f0 -#define CLUTTER_Farsi_1 0x10006f1 -#define CLUTTER_Farsi_2 0x10006f2 -#define CLUTTER_Farsi_3 0x10006f3 -#define CLUTTER_Farsi_4 0x10006f4 -#define CLUTTER_Farsi_5 0x10006f5 -#define CLUTTER_Farsi_6 0x10006f6 -#define CLUTTER_Farsi_7 0x10006f7 -#define CLUTTER_Farsi_8 0x10006f8 -#define CLUTTER_Farsi_9 0x10006f9 -#define CLUTTER_Arabic_percent 0x100066a -#define CLUTTER_Arabic_superscript_alef 0x1000670 -#define CLUTTER_Arabic_tteh 0x1000679 -#define CLUTTER_Arabic_peh 0x100067e -#define CLUTTER_Arabic_tcheh 0x1000686 -#define CLUTTER_Arabic_ddal 0x1000688 -#define CLUTTER_Arabic_rreh 0x1000691 -#define CLUTTER_Arabic_comma 0x5ac -#define CLUTTER_Arabic_fullstop 0x10006d4 -#define CLUTTER_Arabic_0 0x1000660 -#define CLUTTER_Arabic_1 0x1000661 -#define CLUTTER_Arabic_2 0x1000662 -#define CLUTTER_Arabic_3 0x1000663 -#define CLUTTER_Arabic_4 0x1000664 -#define CLUTTER_Arabic_5 0x1000665 -#define CLUTTER_Arabic_6 0x1000666 -#define CLUTTER_Arabic_7 0x1000667 -#define CLUTTER_Arabic_8 0x1000668 -#define CLUTTER_Arabic_9 0x1000669 -#define CLUTTER_Arabic_semicolon 0x5bb -#define CLUTTER_Arabic_question_mark 0x5bf -#define CLUTTER_Arabic_hamza 0x5c1 -#define CLUTTER_Arabic_maddaonalef 0x5c2 -#define CLUTTER_Arabic_hamzaonalef 0x5c3 -#define CLUTTER_Arabic_hamzaonwaw 0x5c4 -#define CLUTTER_Arabic_hamzaunderalef 0x5c5 -#define CLUTTER_Arabic_hamzaonyeh 0x5c6 -#define CLUTTER_Arabic_alef 0x5c7 -#define CLUTTER_Arabic_beh 0x5c8 -#define CLUTTER_Arabic_tehmarbuta 0x5c9 -#define CLUTTER_Arabic_teh 0x5ca -#define CLUTTER_Arabic_theh 0x5cb -#define CLUTTER_Arabic_jeem 0x5cc -#define CLUTTER_Arabic_hah 0x5cd -#define CLUTTER_Arabic_khah 0x5ce -#define CLUTTER_Arabic_dal 0x5cf -#define CLUTTER_Arabic_thal 0x5d0 -#define CLUTTER_Arabic_ra 0x5d1 -#define CLUTTER_Arabic_zain 0x5d2 -#define CLUTTER_Arabic_seen 0x5d3 -#define CLUTTER_Arabic_sheen 0x5d4 -#define CLUTTER_Arabic_sad 0x5d5 -#define CLUTTER_Arabic_dad 0x5d6 -#define CLUTTER_Arabic_tah 0x5d7 -#define CLUTTER_Arabic_zah 0x5d8 -#define CLUTTER_Arabic_ain 0x5d9 -#define CLUTTER_Arabic_ghain 0x5da -#define CLUTTER_Arabic_tatweel 0x5e0 -#define CLUTTER_Arabic_feh 0x5e1 -#define CLUTTER_Arabic_qaf 0x5e2 -#define CLUTTER_Arabic_kaf 0x5e3 -#define CLUTTER_Arabic_lam 0x5e4 -#define CLUTTER_Arabic_meem 0x5e5 -#define CLUTTER_Arabic_noon 0x5e6 -#define CLUTTER_Arabic_ha 0x5e7 -#define CLUTTER_Arabic_heh 0x5e7 -#define CLUTTER_Arabic_waw 0x5e8 -#define CLUTTER_Arabic_alefmaksura 0x5e9 -#define CLUTTER_Arabic_yeh 0x5ea -#define CLUTTER_Arabic_fathatan 0x5eb -#define CLUTTER_Arabic_dammatan 0x5ec -#define CLUTTER_Arabic_kasratan 0x5ed -#define CLUTTER_Arabic_fatha 0x5ee -#define CLUTTER_Arabic_damma 0x5ef -#define CLUTTER_Arabic_kasra 0x5f0 -#define CLUTTER_Arabic_shadda 0x5f1 -#define CLUTTER_Arabic_sukun 0x5f2 -#define CLUTTER_Arabic_madda_above 0x1000653 -#define CLUTTER_Arabic_hamza_above 0x1000654 -#define CLUTTER_Arabic_hamza_below 0x1000655 -#define CLUTTER_Arabic_jeh 0x1000698 -#define CLUTTER_Arabic_veh 0x10006a4 -#define CLUTTER_Arabic_keheh 0x10006a9 -#define CLUTTER_Arabic_gaf 0x10006af -#define CLUTTER_Arabic_noon_ghunna 0x10006ba -#define CLUTTER_Arabic_heh_doachashmee 0x10006be -#define CLUTTER_Farsi_yeh 0x10006cc -#define CLUTTER_Arabic_farsi_yeh 0x10006cc -#define CLUTTER_Arabic_yeh_baree 0x10006d2 -#define CLUTTER_Arabic_heh_goal 0x10006c1 -#define CLUTTER_Arabic_switch 0xff7e -#define CLUTTER_Cyrillic_GHE_bar 0x1000492 -#define CLUTTER_Cyrillic_ghe_bar 0x1000493 -#define CLUTTER_Cyrillic_ZHE_descender 0x1000496 -#define CLUTTER_Cyrillic_zhe_descender 0x1000497 -#define CLUTTER_Cyrillic_KA_descender 0x100049a -#define CLUTTER_Cyrillic_ka_descender 0x100049b -#define CLUTTER_Cyrillic_KA_vertstroke 0x100049c -#define CLUTTER_Cyrillic_ka_vertstroke 0x100049d -#define CLUTTER_Cyrillic_EN_descender 0x10004a2 -#define CLUTTER_Cyrillic_en_descender 0x10004a3 -#define CLUTTER_Cyrillic_U_straight 0x10004ae -#define CLUTTER_Cyrillic_u_straight 0x10004af -#define CLUTTER_Cyrillic_U_straight_bar 0x10004b0 -#define CLUTTER_Cyrillic_u_straight_bar 0x10004b1 -#define CLUTTER_Cyrillic_HA_descender 0x10004b2 -#define CLUTTER_Cyrillic_ha_descender 0x10004b3 -#define CLUTTER_Cyrillic_CHE_descender 0x10004b6 -#define CLUTTER_Cyrillic_che_descender 0x10004b7 -#define CLUTTER_Cyrillic_CHE_vertstroke 0x10004b8 -#define CLUTTER_Cyrillic_che_vertstroke 0x10004b9 -#define CLUTTER_Cyrillic_SHHA 0x10004ba -#define CLUTTER_Cyrillic_shha 0x10004bb -#define CLUTTER_Cyrillic_SCHWA 0x10004d8 -#define CLUTTER_Cyrillic_schwa 0x10004d9 -#define CLUTTER_Cyrillic_I_macron 0x10004e2 -#define CLUTTER_Cyrillic_i_macron 0x10004e3 -#define CLUTTER_Cyrillic_O_bar 0x10004e8 -#define CLUTTER_Cyrillic_o_bar 0x10004e9 -#define CLUTTER_Cyrillic_U_macron 0x10004ee -#define CLUTTER_Cyrillic_u_macron 0x10004ef -#define CLUTTER_Serbian_dje 0x6a1 -#define CLUTTER_Macedonia_gje 0x6a2 -#define CLUTTER_Cyrillic_io 0x6a3 -#define CLUTTER_Ukrainian_ie 0x6a4 -#define CLUTTER_Ukranian_je 0x6a4 -#define CLUTTER_Macedonia_dse 0x6a5 -#define CLUTTER_Ukrainian_i 0x6a6 -#define CLUTTER_Ukranian_i 0x6a6 -#define CLUTTER_Ukrainian_yi 0x6a7 -#define CLUTTER_Ukranian_yi 0x6a7 -#define CLUTTER_Cyrillic_je 0x6a8 -#define CLUTTER_Serbian_je 0x6a8 -#define CLUTTER_Cyrillic_lje 0x6a9 -#define CLUTTER_Serbian_lje 0x6a9 -#define CLUTTER_Cyrillic_nje 0x6aa -#define CLUTTER_Serbian_nje 0x6aa -#define CLUTTER_Serbian_tshe 0x6ab -#define CLUTTER_Macedonia_kje 0x6ac -#define CLUTTER_Ukrainian_ghe_with_upturn 0x6ad -#define CLUTTER_Byelorussian_shortu 0x6ae -#define CLUTTER_Cyrillic_dzhe 0x6af -#define CLUTTER_Serbian_dze 0x6af -#define CLUTTER_numerosign 0x6b0 -#define CLUTTER_Serbian_DJE 0x6b1 -#define CLUTTER_Macedonia_GJE 0x6b2 -#define CLUTTER_Cyrillic_IO 0x6b3 -#define CLUTTER_Ukrainian_IE 0x6b4 -#define CLUTTER_Ukranian_JE 0x6b4 -#define CLUTTER_Macedonia_DSE 0x6b5 -#define CLUTTER_Ukrainian_I 0x6b6 -#define CLUTTER_Ukranian_I 0x6b6 -#define CLUTTER_Ukrainian_YI 0x6b7 -#define CLUTTER_Ukranian_YI 0x6b7 -#define CLUTTER_Cyrillic_JE 0x6b8 -#define CLUTTER_Serbian_JE 0x6b8 -#define CLUTTER_Cyrillic_LJE 0x6b9 -#define CLUTTER_Serbian_LJE 0x6b9 -#define CLUTTER_Cyrillic_NJE 0x6ba -#define CLUTTER_Serbian_NJE 0x6ba -#define CLUTTER_Serbian_TSHE 0x6bb -#define CLUTTER_Macedonia_KJE 0x6bc -#define CLUTTER_Ukrainian_GHE_WITH_UPTURN 0x6bd -#define CLUTTER_Byelorussian_SHORTU 0x6be -#define CLUTTER_Cyrillic_DZHE 0x6bf -#define CLUTTER_Serbian_DZE 0x6bf -#define CLUTTER_Cyrillic_yu 0x6c0 -#define CLUTTER_Cyrillic_a 0x6c1 -#define CLUTTER_Cyrillic_be 0x6c2 -#define CLUTTER_Cyrillic_tse 0x6c3 -#define CLUTTER_Cyrillic_de 0x6c4 -#define CLUTTER_Cyrillic_ie 0x6c5 -#define CLUTTER_Cyrillic_ef 0x6c6 -#define CLUTTER_Cyrillic_ghe 0x6c7 -#define CLUTTER_Cyrillic_ha 0x6c8 -#define CLUTTER_Cyrillic_i 0x6c9 -#define CLUTTER_Cyrillic_shorti 0x6ca -#define CLUTTER_Cyrillic_ka 0x6cb -#define CLUTTER_Cyrillic_el 0x6cc -#define CLUTTER_Cyrillic_em 0x6cd -#define CLUTTER_Cyrillic_en 0x6ce -#define CLUTTER_Cyrillic_o 0x6cf -#define CLUTTER_Cyrillic_pe 0x6d0 -#define CLUTTER_Cyrillic_ya 0x6d1 -#define CLUTTER_Cyrillic_er 0x6d2 -#define CLUTTER_Cyrillic_es 0x6d3 -#define CLUTTER_Cyrillic_te 0x6d4 -#define CLUTTER_Cyrillic_u 0x6d5 -#define CLUTTER_Cyrillic_zhe 0x6d6 -#define CLUTTER_Cyrillic_ve 0x6d7 -#define CLUTTER_Cyrillic_softsign 0x6d8 -#define CLUTTER_Cyrillic_yeru 0x6d9 -#define CLUTTER_Cyrillic_ze 0x6da -#define CLUTTER_Cyrillic_sha 0x6db -#define CLUTTER_Cyrillic_e 0x6dc -#define CLUTTER_Cyrillic_shcha 0x6dd -#define CLUTTER_Cyrillic_che 0x6de -#define CLUTTER_Cyrillic_hardsign 0x6df -#define CLUTTER_Cyrillic_YU 0x6e0 -#define CLUTTER_Cyrillic_A 0x6e1 -#define CLUTTER_Cyrillic_BE 0x6e2 -#define CLUTTER_Cyrillic_TSE 0x6e3 -#define CLUTTER_Cyrillic_DE 0x6e4 -#define CLUTTER_Cyrillic_IE 0x6e5 -#define CLUTTER_Cyrillic_EF 0x6e6 -#define CLUTTER_Cyrillic_GHE 0x6e7 -#define CLUTTER_Cyrillic_HA 0x6e8 -#define CLUTTER_Cyrillic_I 0x6e9 -#define CLUTTER_Cyrillic_SHORTI 0x6ea -#define CLUTTER_Cyrillic_KA 0x6eb -#define CLUTTER_Cyrillic_EL 0x6ec -#define CLUTTER_Cyrillic_EM 0x6ed -#define CLUTTER_Cyrillic_EN 0x6ee -#define CLUTTER_Cyrillic_O 0x6ef -#define CLUTTER_Cyrillic_PE 0x6f0 -#define CLUTTER_Cyrillic_YA 0x6f1 -#define CLUTTER_Cyrillic_ER 0x6f2 -#define CLUTTER_Cyrillic_ES 0x6f3 -#define CLUTTER_Cyrillic_TE 0x6f4 -#define CLUTTER_Cyrillic_U 0x6f5 -#define CLUTTER_Cyrillic_ZHE 0x6f6 -#define CLUTTER_Cyrillic_VE 0x6f7 -#define CLUTTER_Cyrillic_SOFTSIGN 0x6f8 -#define CLUTTER_Cyrillic_YERU 0x6f9 -#define CLUTTER_Cyrillic_ZE 0x6fa -#define CLUTTER_Cyrillic_SHA 0x6fb -#define CLUTTER_Cyrillic_E 0x6fc -#define CLUTTER_Cyrillic_SHCHA 0x6fd -#define CLUTTER_Cyrillic_CHE 0x6fe -#define CLUTTER_Cyrillic_HARDSIGN 0x6ff -#define CLUTTER_Greek_ALPHAaccent 0x7a1 -#define CLUTTER_Greek_EPSILONaccent 0x7a2 -#define CLUTTER_Greek_ETAaccent 0x7a3 -#define CLUTTER_Greek_IOTAaccent 0x7a4 -#define CLUTTER_Greek_IOTAdieresis 0x7a5 -#define CLUTTER_Greek_IOTAdiaeresis 0x7a5 -#define CLUTTER_Greek_OMICRONaccent 0x7a7 -#define CLUTTER_Greek_UPSILONaccent 0x7a8 -#define CLUTTER_Greek_UPSILONdieresis 0x7a9 -#define CLUTTER_Greek_OMEGAaccent 0x7ab -#define CLUTTER_Greek_accentdieresis 0x7ae -#define CLUTTER_Greek_horizbar 0x7af -#define CLUTTER_Greek_alphaaccent 0x7b1 -#define CLUTTER_Greek_epsilonaccent 0x7b2 -#define CLUTTER_Greek_etaaccent 0x7b3 -#define CLUTTER_Greek_iotaaccent 0x7b4 -#define CLUTTER_Greek_iotadieresis 0x7b5 -#define CLUTTER_Greek_iotaaccentdieresis 0x7b6 -#define CLUTTER_Greek_omicronaccent 0x7b7 -#define CLUTTER_Greek_upsilonaccent 0x7b8 -#define CLUTTER_Greek_upsilondieresis 0x7b9 -#define CLUTTER_Greek_upsilonaccentdieresis 0x7ba -#define CLUTTER_Greek_omegaaccent 0x7bb -#define CLUTTER_Greek_ALPHA 0x7c1 -#define CLUTTER_Greek_BETA 0x7c2 -#define CLUTTER_Greek_GAMMA 0x7c3 -#define CLUTTER_Greek_DELTA 0x7c4 -#define CLUTTER_Greek_EPSILON 0x7c5 -#define CLUTTER_Greek_ZETA 0x7c6 -#define CLUTTER_Greek_ETA 0x7c7 -#define CLUTTER_Greek_THETA 0x7c8 -#define CLUTTER_Greek_IOTA 0x7c9 -#define CLUTTER_Greek_KAPPA 0x7ca -#define CLUTTER_Greek_LAMDA 0x7cb -#define CLUTTER_Greek_LAMBDA 0x7cb -#define CLUTTER_Greek_MU 0x7cc -#define CLUTTER_Greek_NU 0x7cd -#define CLUTTER_Greek_XI 0x7ce -#define CLUTTER_Greek_OMICRON 0x7cf -#define CLUTTER_Greek_PI 0x7d0 -#define CLUTTER_Greek_RHO 0x7d1 -#define CLUTTER_Greek_SIGMA 0x7d2 -#define CLUTTER_Greek_TAU 0x7d4 -#define CLUTTER_Greek_UPSILON 0x7d5 -#define CLUTTER_Greek_PHI 0x7d6 -#define CLUTTER_Greek_CHI 0x7d7 -#define CLUTTER_Greek_PSI 0x7d8 -#define CLUTTER_Greek_OMEGA 0x7d9 -#define CLUTTER_Greek_alpha 0x7e1 -#define CLUTTER_Greek_beta 0x7e2 -#define CLUTTER_Greek_gamma 0x7e3 -#define CLUTTER_Greek_delta 0x7e4 -#define CLUTTER_Greek_epsilon 0x7e5 -#define CLUTTER_Greek_zeta 0x7e6 -#define CLUTTER_Greek_eta 0x7e7 -#define CLUTTER_Greek_theta 0x7e8 -#define CLUTTER_Greek_iota 0x7e9 -#define CLUTTER_Greek_kappa 0x7ea -#define CLUTTER_Greek_lamda 0x7eb -#define CLUTTER_Greek_lambda 0x7eb -#define CLUTTER_Greek_mu 0x7ec -#define CLUTTER_Greek_nu 0x7ed -#define CLUTTER_Greek_xi 0x7ee -#define CLUTTER_Greek_omicron 0x7ef -#define CLUTTER_Greek_pi 0x7f0 -#define CLUTTER_Greek_rho 0x7f1 -#define CLUTTER_Greek_sigma 0x7f2 -#define CLUTTER_Greek_finalsmallsigma 0x7f3 -#define CLUTTER_Greek_tau 0x7f4 -#define CLUTTER_Greek_upsilon 0x7f5 -#define CLUTTER_Greek_phi 0x7f6 -#define CLUTTER_Greek_chi 0x7f7 -#define CLUTTER_Greek_psi 0x7f8 -#define CLUTTER_Greek_omega 0x7f9 -#define CLUTTER_Greek_switch 0xff7e -#define CLUTTER_leftradical 0x8a1 -#define CLUTTER_topleftradical 0x8a2 -#define CLUTTER_horizconnector 0x8a3 -#define CLUTTER_topintegral 0x8a4 -#define CLUTTER_botintegral 0x8a5 -#define CLUTTER_vertconnector 0x8a6 -#define CLUTTER_topleftsqbracket 0x8a7 -#define CLUTTER_botleftsqbracket 0x8a8 -#define CLUTTER_toprightsqbracket 0x8a9 -#define CLUTTER_botrightsqbracket 0x8aa -#define CLUTTER_topleftparens 0x8ab -#define CLUTTER_botleftparens 0x8ac -#define CLUTTER_toprightparens 0x8ad -#define CLUTTER_botrightparens 0x8ae -#define CLUTTER_leftmiddlecurlybrace 0x8af -#define CLUTTER_rightmiddlecurlybrace 0x8b0 -#define CLUTTER_topleftsummation 0x8b1 -#define CLUTTER_botleftsummation 0x8b2 -#define CLUTTER_topvertsummationconnector 0x8b3 -#define CLUTTER_botvertsummationconnector 0x8b4 -#define CLUTTER_toprightsummation 0x8b5 -#define CLUTTER_botrightsummation 0x8b6 -#define CLUTTER_rightmiddlesummation 0x8b7 -#define CLUTTER_lessthanequal 0x8bc -#define CLUTTER_notequal 0x8bd -#define CLUTTER_greaterthanequal 0x8be -#define CLUTTER_integral 0x8bf -#define CLUTTER_therefore 0x8c0 -#define CLUTTER_variation 0x8c1 -#define CLUTTER_infinity 0x8c2 -#define CLUTTER_nabla 0x8c5 -#define CLUTTER_approximate 0x8c8 -#define CLUTTER_similarequal 0x8c9 -#define CLUTTER_ifonlyif 0x8cd -#define CLUTTER_implies 0x8ce -#define CLUTTER_identical 0x8cf -#define CLUTTER_radical 0x8d6 -#define CLUTTER_includedin 0x8da -#define CLUTTER_includes 0x8db -#define CLUTTER_intersection 0x8dc -#define CLUTTER_union 0x8dd -#define CLUTTER_logicaland 0x8de -#define CLUTTER_logicalor 0x8df -#define CLUTTER_partialderivative 0x8ef -#define CLUTTER_function 0x8f6 -#define CLUTTER_leftarrow 0x8fb -#define CLUTTER_uparrow 0x8fc -#define CLUTTER_rightarrow 0x8fd -#define CLUTTER_downarrow 0x8fe -#define CLUTTER_blank 0x9df -#define CLUTTER_soliddiamond 0x9e0 -#define CLUTTER_checkerboard 0x9e1 -#define CLUTTER_ht 0x9e2 -#define CLUTTER_ff 0x9e3 -#define CLUTTER_cr 0x9e4 -#define CLUTTER_lf 0x9e5 -#define CLUTTER_nl 0x9e8 -#define CLUTTER_vt 0x9e9 -#define CLUTTER_lowrightcorner 0x9ea -#define CLUTTER_uprightcorner 0x9eb -#define CLUTTER_upleftcorner 0x9ec -#define CLUTTER_lowleftcorner 0x9ed -#define CLUTTER_crossinglines 0x9ee -#define CLUTTER_horizlinescan1 0x9ef -#define CLUTTER_horizlinescan3 0x9f0 -#define CLUTTER_horizlinescan5 0x9f1 -#define CLUTTER_horizlinescan7 0x9f2 -#define CLUTTER_horizlinescan9 0x9f3 -#define CLUTTER_leftt 0x9f4 -#define CLUTTER_rightt 0x9f5 -#define CLUTTER_bott 0x9f6 -#define CLUTTER_topt 0x9f7 -#define CLUTTER_vertbar 0x9f8 -#define CLUTTER_emspace 0xaa1 -#define CLUTTER_enspace 0xaa2 -#define CLUTTER_em3space 0xaa3 -#define CLUTTER_em4space 0xaa4 -#define CLUTTER_digitspace 0xaa5 -#define CLUTTER_punctspace 0xaa6 -#define CLUTTER_thinspace 0xaa7 -#define CLUTTER_hairspace 0xaa8 -#define CLUTTER_emdash 0xaa9 -#define CLUTTER_endash 0xaaa -#define CLUTTER_signifblank 0xaac -#define CLUTTER_ellipsis 0xaae -#define CLUTTER_doubbaselinedot 0xaaf -#define CLUTTER_onethird 0xab0 -#define CLUTTER_twothirds 0xab1 -#define CLUTTER_onefifth 0xab2 -#define CLUTTER_twofifths 0xab3 -#define CLUTTER_threefifths 0xab4 -#define CLUTTER_fourfifths 0xab5 -#define CLUTTER_onesixth 0xab6 -#define CLUTTER_fivesixths 0xab7 -#define CLUTTER_careof 0xab8 -#define CLUTTER_figdash 0xabb -#define CLUTTER_leftanglebracket 0xabc -#define CLUTTER_decimalpoint 0xabd -#define CLUTTER_rightanglebracket 0xabe -#define CLUTTER_marker 0xabf -#define CLUTTER_oneeighth 0xac3 -#define CLUTTER_threeeighths 0xac4 -#define CLUTTER_fiveeighths 0xac5 -#define CLUTTER_seveneighths 0xac6 -#define CLUTTER_trademark 0xac9 -#define CLUTTER_signaturemark 0xaca -#define CLUTTER_trademarkincircle 0xacb -#define CLUTTER_leftopentriangle 0xacc -#define CLUTTER_rightopentriangle 0xacd -#define CLUTTER_emopencircle 0xace -#define CLUTTER_emopenrectangle 0xacf -#define CLUTTER_leftsinglequotemark 0xad0 -#define CLUTTER_rightsinglequotemark 0xad1 -#define CLUTTER_leftdoublequotemark 0xad2 -#define CLUTTER_rightdoublequotemark 0xad3 -#define CLUTTER_prescription 0xad4 -#define CLUTTER_minutes 0xad6 -#define CLUTTER_seconds 0xad7 -#define CLUTTER_latincross 0xad9 -#define CLUTTER_hexagram 0xada -#define CLUTTER_filledrectbullet 0xadb -#define CLUTTER_filledlefttribullet 0xadc -#define CLUTTER_filledrighttribullet 0xadd -#define CLUTTER_emfilledcircle 0xade -#define CLUTTER_emfilledrect 0xadf -#define CLUTTER_enopencircbullet 0xae0 -#define CLUTTER_enopensquarebullet 0xae1 -#define CLUTTER_openrectbullet 0xae2 -#define CLUTTER_opentribulletup 0xae3 -#define CLUTTER_opentribulletdown 0xae4 -#define CLUTTER_openstar 0xae5 -#define CLUTTER_enfilledcircbullet 0xae6 -#define CLUTTER_enfilledsqbullet 0xae7 -#define CLUTTER_filledtribulletup 0xae8 -#define CLUTTER_filledtribulletdown 0xae9 -#define CLUTTER_leftpointer 0xaea -#define CLUTTER_rightpointer 0xaeb -#define CLUTTER_club 0xaec -#define CLUTTER_diamond 0xaed -#define CLUTTER_heart 0xaee -#define CLUTTER_maltesecross 0xaf0 -#define CLUTTER_dagger 0xaf1 -#define CLUTTER_doubledagger 0xaf2 -#define CLUTTER_checkmark 0xaf3 -#define CLUTTER_ballotcross 0xaf4 -#define CLUTTER_musicalsharp 0xaf5 -#define CLUTTER_musicalflat 0xaf6 -#define CLUTTER_malesymbol 0xaf7 -#define CLUTTER_femalesymbol 0xaf8 -#define CLUTTER_telephone 0xaf9 -#define CLUTTER_telephonerecorder 0xafa -#define CLUTTER_phonographcopyright 0xafb -#define CLUTTER_caret 0xafc -#define CLUTTER_singlelowquotemark 0xafd -#define CLUTTER_doublelowquotemark 0xafe -#define CLUTTER_cursor 0xaff -#define CLUTTER_leftcaret 0xba3 -#define CLUTTER_rightcaret 0xba6 -#define CLUTTER_downcaret 0xba8 -#define CLUTTER_upcaret 0xba9 -#define CLUTTER_overbar 0xbc0 -#define CLUTTER_downtack 0xbc2 -#define CLUTTER_upshoe 0xbc3 -#define CLUTTER_downstile 0xbc4 -#define CLUTTER_underbar 0xbc6 -#define CLUTTER_jot 0xbca -#define CLUTTER_quad 0xbcc -#define CLUTTER_uptack 0xbce -#define CLUTTER_circle 0xbcf -#define CLUTTER_upstile 0xbd3 -#define CLUTTER_downshoe 0xbd6 -#define CLUTTER_rightshoe 0xbd8 -#define CLUTTER_leftshoe 0xbda -#define CLUTTER_lefttack 0xbdc -#define CLUTTER_righttack 0xbfc -#define CLUTTER_hebrew_doublelowline 0xcdf -#define CLUTTER_hebrew_aleph 0xce0 -#define CLUTTER_hebrew_bet 0xce1 -#define CLUTTER_hebrew_beth 0xce1 -#define CLUTTER_hebrew_gimel 0xce2 -#define CLUTTER_hebrew_gimmel 0xce2 -#define CLUTTER_hebrew_dalet 0xce3 -#define CLUTTER_hebrew_daleth 0xce3 -#define CLUTTER_hebrew_he 0xce4 -#define CLUTTER_hebrew_waw 0xce5 -#define CLUTTER_hebrew_zain 0xce6 -#define CLUTTER_hebrew_zayin 0xce6 -#define CLUTTER_hebrew_chet 0xce7 -#define CLUTTER_hebrew_het 0xce7 -#define CLUTTER_hebrew_tet 0xce8 -#define CLUTTER_hebrew_teth 0xce8 -#define CLUTTER_hebrew_yod 0xce9 -#define CLUTTER_hebrew_finalkaph 0xcea -#define CLUTTER_hebrew_kaph 0xceb -#define CLUTTER_hebrew_lamed 0xcec -#define CLUTTER_hebrew_finalmem 0xced -#define CLUTTER_hebrew_mem 0xcee -#define CLUTTER_hebrew_finalnun 0xcef -#define CLUTTER_hebrew_nun 0xcf0 -#define CLUTTER_hebrew_samech 0xcf1 -#define CLUTTER_hebrew_samekh 0xcf1 -#define CLUTTER_hebrew_ayin 0xcf2 -#define CLUTTER_hebrew_finalpe 0xcf3 -#define CLUTTER_hebrew_pe 0xcf4 -#define CLUTTER_hebrew_finalzade 0xcf5 -#define CLUTTER_hebrew_finalzadi 0xcf5 -#define CLUTTER_hebrew_zade 0xcf6 -#define CLUTTER_hebrew_zadi 0xcf6 -#define CLUTTER_hebrew_qoph 0xcf7 -#define CLUTTER_hebrew_kuf 0xcf7 -#define CLUTTER_hebrew_resh 0xcf8 -#define CLUTTER_hebrew_shin 0xcf9 -#define CLUTTER_hebrew_taw 0xcfa -#define CLUTTER_hebrew_taf 0xcfa -#define CLUTTER_Hebrew_switch 0xff7e -#define CLUTTER_Thai_kokai 0xda1 -#define CLUTTER_Thai_khokhai 0xda2 -#define CLUTTER_Thai_khokhuat 0xda3 -#define CLUTTER_Thai_khokhwai 0xda4 -#define CLUTTER_Thai_khokhon 0xda5 -#define CLUTTER_Thai_khorakhang 0xda6 -#define CLUTTER_Thai_ngongu 0xda7 -#define CLUTTER_Thai_chochan 0xda8 -#define CLUTTER_Thai_choching 0xda9 -#define CLUTTER_Thai_chochang 0xdaa -#define CLUTTER_Thai_soso 0xdab -#define CLUTTER_Thai_chochoe 0xdac -#define CLUTTER_Thai_yoying 0xdad -#define CLUTTER_Thai_dochada 0xdae -#define CLUTTER_Thai_topatak 0xdaf -#define CLUTTER_Thai_thothan 0xdb0 -#define CLUTTER_Thai_thonangmontho 0xdb1 -#define CLUTTER_Thai_thophuthao 0xdb2 -#define CLUTTER_Thai_nonen 0xdb3 -#define CLUTTER_Thai_dodek 0xdb4 -#define CLUTTER_Thai_totao 0xdb5 -#define CLUTTER_Thai_thothung 0xdb6 -#define CLUTTER_Thai_thothahan 0xdb7 -#define CLUTTER_Thai_thothong 0xdb8 -#define CLUTTER_Thai_nonu 0xdb9 -#define CLUTTER_Thai_bobaimai 0xdba -#define CLUTTER_Thai_popla 0xdbb -#define CLUTTER_Thai_phophung 0xdbc -#define CLUTTER_Thai_fofa 0xdbd -#define CLUTTER_Thai_phophan 0xdbe -#define CLUTTER_Thai_fofan 0xdbf -#define CLUTTER_Thai_phosamphao 0xdc0 -#define CLUTTER_Thai_moma 0xdc1 -#define CLUTTER_Thai_yoyak 0xdc2 -#define CLUTTER_Thai_rorua 0xdc3 -#define CLUTTER_Thai_ru 0xdc4 -#define CLUTTER_Thai_loling 0xdc5 -#define CLUTTER_Thai_lu 0xdc6 -#define CLUTTER_Thai_wowaen 0xdc7 -#define CLUTTER_Thai_sosala 0xdc8 -#define CLUTTER_Thai_sorusi 0xdc9 -#define CLUTTER_Thai_sosua 0xdca -#define CLUTTER_Thai_hohip 0xdcb -#define CLUTTER_Thai_lochula 0xdcc -#define CLUTTER_Thai_oang 0xdcd -#define CLUTTER_Thai_honokhuk 0xdce -#define CLUTTER_Thai_paiyannoi 0xdcf -#define CLUTTER_Thai_saraa 0xdd0 -#define CLUTTER_Thai_maihanakat 0xdd1 -#define CLUTTER_Thai_saraaa 0xdd2 -#define CLUTTER_Thai_saraam 0xdd3 -#define CLUTTER_Thai_sarai 0xdd4 -#define CLUTTER_Thai_saraii 0xdd5 -#define CLUTTER_Thai_saraue 0xdd6 -#define CLUTTER_Thai_sarauee 0xdd7 -#define CLUTTER_Thai_sarau 0xdd8 -#define CLUTTER_Thai_sarauu 0xdd9 -#define CLUTTER_Thai_phinthu 0xdda -#define CLUTTER_Thai_maihanakat_maitho 0xdde -#define CLUTTER_Thai_baht 0xddf -#define CLUTTER_Thai_sarae 0xde0 -#define CLUTTER_Thai_saraae 0xde1 -#define CLUTTER_Thai_sarao 0xde2 -#define CLUTTER_Thai_saraaimaimuan 0xde3 -#define CLUTTER_Thai_saraaimaimalai 0xde4 -#define CLUTTER_Thai_lakkhangyao 0xde5 -#define CLUTTER_Thai_maiyamok 0xde6 -#define CLUTTER_Thai_maitaikhu 0xde7 -#define CLUTTER_Thai_maiek 0xde8 -#define CLUTTER_Thai_maitho 0xde9 -#define CLUTTER_Thai_maitri 0xdea -#define CLUTTER_Thai_maichattawa 0xdeb -#define CLUTTER_Thai_thanthakhat 0xdec -#define CLUTTER_Thai_nikhahit 0xded -#define CLUTTER_Thai_leksun 0xdf0 -#define CLUTTER_Thai_leknung 0xdf1 -#define CLUTTER_Thai_leksong 0xdf2 -#define CLUTTER_Thai_leksam 0xdf3 -#define CLUTTER_Thai_leksi 0xdf4 -#define CLUTTER_Thai_lekha 0xdf5 -#define CLUTTER_Thai_lekhok 0xdf6 -#define CLUTTER_Thai_lekchet 0xdf7 -#define CLUTTER_Thai_lekpaet 0xdf8 -#define CLUTTER_Thai_lekkao 0xdf9 -#define CLUTTER_Hangul 0xff31 -#define CLUTTER_Hangul_Start 0xff32 -#define CLUTTER_Hangul_End 0xff33 -#define CLUTTER_Hangul_Hanja 0xff34 -#define CLUTTER_Hangul_Jamo 0xff35 -#define CLUTTER_Hangul_Romaja 0xff36 -#define CLUTTER_Hangul_Codeinput 0xff37 -#define CLUTTER_Hangul_Jeonja 0xff38 -#define CLUTTER_Hangul_Banja 0xff39 -#define CLUTTER_Hangul_PreHanja 0xff3a -#define CLUTTER_Hangul_PostHanja 0xff3b -#define CLUTTER_Hangul_SingleCandidate 0xff3c -#define CLUTTER_Hangul_MultipleCandidate 0xff3d -#define CLUTTER_Hangul_PreviousCandidate 0xff3e -#define CLUTTER_Hangul_Special 0xff3f -#define CLUTTER_Hangul_switch 0xff7e -#define CLUTTER_Hangul_Kiyeog 0xea1 -#define CLUTTER_Hangul_SsangKiyeog 0xea2 -#define CLUTTER_Hangul_KiyeogSios 0xea3 -#define CLUTTER_Hangul_Nieun 0xea4 -#define CLUTTER_Hangul_NieunJieuj 0xea5 -#define CLUTTER_Hangul_NieunHieuh 0xea6 -#define CLUTTER_Hangul_Dikeud 0xea7 -#define CLUTTER_Hangul_SsangDikeud 0xea8 -#define CLUTTER_Hangul_Rieul 0xea9 -#define CLUTTER_Hangul_RieulKiyeog 0xeaa -#define CLUTTER_Hangul_RieulMieum 0xeab -#define CLUTTER_Hangul_RieulPieub 0xeac -#define CLUTTER_Hangul_RieulSios 0xead -#define CLUTTER_Hangul_RieulTieut 0xeae -#define CLUTTER_Hangul_RieulPhieuf 0xeaf -#define CLUTTER_Hangul_RieulHieuh 0xeb0 -#define CLUTTER_Hangul_Mieum 0xeb1 -#define CLUTTER_Hangul_Pieub 0xeb2 -#define CLUTTER_Hangul_SsangPieub 0xeb3 -#define CLUTTER_Hangul_PieubSios 0xeb4 -#define CLUTTER_Hangul_Sios 0xeb5 -#define CLUTTER_Hangul_SsangSios 0xeb6 -#define CLUTTER_Hangul_Ieung 0xeb7 -#define CLUTTER_Hangul_Jieuj 0xeb8 -#define CLUTTER_Hangul_SsangJieuj 0xeb9 -#define CLUTTER_Hangul_Cieuc 0xeba -#define CLUTTER_Hangul_Khieuq 0xebb -#define CLUTTER_Hangul_Tieut 0xebc -#define CLUTTER_Hangul_Phieuf 0xebd -#define CLUTTER_Hangul_Hieuh 0xebe -#define CLUTTER_Hangul_A 0xebf -#define CLUTTER_Hangul_AE 0xec0 -#define CLUTTER_Hangul_YA 0xec1 -#define CLUTTER_Hangul_YAE 0xec2 -#define CLUTTER_Hangul_EO 0xec3 -#define CLUTTER_Hangul_E 0xec4 -#define CLUTTER_Hangul_YEO 0xec5 -#define CLUTTER_Hangul_YE 0xec6 -#define CLUTTER_Hangul_O 0xec7 -#define CLUTTER_Hangul_WA 0xec8 -#define CLUTTER_Hangul_WAE 0xec9 -#define CLUTTER_Hangul_OE 0xeca -#define CLUTTER_Hangul_YO 0xecb -#define CLUTTER_Hangul_U 0xecc -#define CLUTTER_Hangul_WEO 0xecd -#define CLUTTER_Hangul_WE 0xece -#define CLUTTER_Hangul_WI 0xecf -#define CLUTTER_Hangul_YU 0xed0 -#define CLUTTER_Hangul_EU 0xed1 -#define CLUTTER_Hangul_YI 0xed2 -#define CLUTTER_Hangul_I 0xed3 -#define CLUTTER_Hangul_J_Kiyeog 0xed4 -#define CLUTTER_Hangul_J_SsangKiyeog 0xed5 -#define CLUTTER_Hangul_J_KiyeogSios 0xed6 -#define CLUTTER_Hangul_J_Nieun 0xed7 -#define CLUTTER_Hangul_J_NieunJieuj 0xed8 -#define CLUTTER_Hangul_J_NieunHieuh 0xed9 -#define CLUTTER_Hangul_J_Dikeud 0xeda -#define CLUTTER_Hangul_J_Rieul 0xedb -#define CLUTTER_Hangul_J_RieulKiyeog 0xedc -#define CLUTTER_Hangul_J_RieulMieum 0xedd -#define CLUTTER_Hangul_J_RieulPieub 0xede -#define CLUTTER_Hangul_J_RieulSios 0xedf -#define CLUTTER_Hangul_J_RieulTieut 0xee0 -#define CLUTTER_Hangul_J_RieulPhieuf 0xee1 -#define CLUTTER_Hangul_J_RieulHieuh 0xee2 -#define CLUTTER_Hangul_J_Mieum 0xee3 -#define CLUTTER_Hangul_J_Pieub 0xee4 -#define CLUTTER_Hangul_J_PieubSios 0xee5 -#define CLUTTER_Hangul_J_Sios 0xee6 -#define CLUTTER_Hangul_J_SsangSios 0xee7 -#define CLUTTER_Hangul_J_Ieung 0xee8 -#define CLUTTER_Hangul_J_Jieuj 0xee9 -#define CLUTTER_Hangul_J_Cieuc 0xeea -#define CLUTTER_Hangul_J_Khieuq 0xeeb -#define CLUTTER_Hangul_J_Tieut 0xeec -#define CLUTTER_Hangul_J_Phieuf 0xeed -#define CLUTTER_Hangul_J_Hieuh 0xeee -#define CLUTTER_Hangul_RieulYeorinHieuh 0xeef -#define CLUTTER_Hangul_SunkyeongeumMieum 0xef0 -#define CLUTTER_Hangul_SunkyeongeumPieub 0xef1 -#define CLUTTER_Hangul_PanSios 0xef2 -#define CLUTTER_Hangul_KkogjiDalrinIeung 0xef3 -#define CLUTTER_Hangul_SunkyeongeumPhieuf 0xef4 -#define CLUTTER_Hangul_YeorinHieuh 0xef5 -#define CLUTTER_Hangul_AraeA 0xef6 -#define CLUTTER_Hangul_AraeAE 0xef7 -#define CLUTTER_Hangul_J_PanSios 0xef8 -#define CLUTTER_Hangul_J_KkogjiDalrinIeung 0xef9 -#define CLUTTER_Hangul_J_YeorinHieuh 0xefa -#define CLUTTER_Korean_Won 0xeff -#define CLUTTER_Armenian_ligature_ew 0x1000587 -#define CLUTTER_Armenian_full_stop 0x1000589 -#define CLUTTER_Armenian_verjaket 0x1000589 -#define CLUTTER_Armenian_separation_mark 0x100055d -#define CLUTTER_Armenian_but 0x100055d -#define CLUTTER_Armenian_hyphen 0x100058a -#define CLUTTER_Armenian_yentamna 0x100058a -#define CLUTTER_Armenian_exclam 0x100055c -#define CLUTTER_Armenian_amanak 0x100055c -#define CLUTTER_Armenian_accent 0x100055b -#define CLUTTER_Armenian_shesht 0x100055b -#define CLUTTER_Armenian_question 0x100055e -#define CLUTTER_Armenian_paruyk 0x100055e -#define CLUTTER_Armenian_AYB 0x1000531 -#define CLUTTER_Armenian_ayb 0x1000561 -#define CLUTTER_Armenian_BEN 0x1000532 -#define CLUTTER_Armenian_ben 0x1000562 -#define CLUTTER_Armenian_GIM 0x1000533 -#define CLUTTER_Armenian_gim 0x1000563 -#define CLUTTER_Armenian_DA 0x1000534 -#define CLUTTER_Armenian_da 0x1000564 -#define CLUTTER_Armenian_YECH 0x1000535 -#define CLUTTER_Armenian_yech 0x1000565 -#define CLUTTER_Armenian_ZA 0x1000536 -#define CLUTTER_Armenian_za 0x1000566 -#define CLUTTER_Armenian_E 0x1000537 -#define CLUTTER_Armenian_e 0x1000567 -#define CLUTTER_Armenian_AT 0x1000538 -#define CLUTTER_Armenian_at 0x1000568 -#define CLUTTER_Armenian_TO 0x1000539 -#define CLUTTER_Armenian_to 0x1000569 -#define CLUTTER_Armenian_ZHE 0x100053a -#define CLUTTER_Armenian_zhe 0x100056a -#define CLUTTER_Armenian_INI 0x100053b -#define CLUTTER_Armenian_ini 0x100056b -#define CLUTTER_Armenian_LYUN 0x100053c -#define CLUTTER_Armenian_lyun 0x100056c -#define CLUTTER_Armenian_KHE 0x100053d -#define CLUTTER_Armenian_khe 0x100056d -#define CLUTTER_Armenian_TSA 0x100053e -#define CLUTTER_Armenian_tsa 0x100056e -#define CLUTTER_Armenian_KEN 0x100053f -#define CLUTTER_Armenian_ken 0x100056f -#define CLUTTER_Armenian_HO 0x1000540 -#define CLUTTER_Armenian_ho 0x1000570 -#define CLUTTER_Armenian_DZA 0x1000541 -#define CLUTTER_Armenian_dza 0x1000571 -#define CLUTTER_Armenian_GHAT 0x1000542 -#define CLUTTER_Armenian_ghat 0x1000572 -#define CLUTTER_Armenian_TCHE 0x1000543 -#define CLUTTER_Armenian_tche 0x1000573 -#define CLUTTER_Armenian_MEN 0x1000544 -#define CLUTTER_Armenian_men 0x1000574 -#define CLUTTER_Armenian_HI 0x1000545 -#define CLUTTER_Armenian_hi 0x1000575 -#define CLUTTER_Armenian_NU 0x1000546 -#define CLUTTER_Armenian_nu 0x1000576 -#define CLUTTER_Armenian_SHA 0x1000547 -#define CLUTTER_Armenian_sha 0x1000577 -#define CLUTTER_Armenian_VO 0x1000548 -#define CLUTTER_Armenian_vo 0x1000578 -#define CLUTTER_Armenian_CHA 0x1000549 -#define CLUTTER_Armenian_cha 0x1000579 -#define CLUTTER_Armenian_PE 0x100054a -#define CLUTTER_Armenian_pe 0x100057a -#define CLUTTER_Armenian_JE 0x100054b -#define CLUTTER_Armenian_je 0x100057b -#define CLUTTER_Armenian_RA 0x100054c -#define CLUTTER_Armenian_ra 0x100057c -#define CLUTTER_Armenian_SE 0x100054d -#define CLUTTER_Armenian_se 0x100057d -#define CLUTTER_Armenian_VEV 0x100054e -#define CLUTTER_Armenian_vev 0x100057e -#define CLUTTER_Armenian_TYUN 0x100054f -#define CLUTTER_Armenian_tyun 0x100057f -#define CLUTTER_Armenian_RE 0x1000550 -#define CLUTTER_Armenian_re 0x1000580 -#define CLUTTER_Armenian_TSO 0x1000551 -#define CLUTTER_Armenian_tso 0x1000581 -#define CLUTTER_Armenian_VYUN 0x1000552 -#define CLUTTER_Armenian_vyun 0x1000582 -#define CLUTTER_Armenian_PYUR 0x1000553 -#define CLUTTER_Armenian_pyur 0x1000583 -#define CLUTTER_Armenian_KE 0x1000554 -#define CLUTTER_Armenian_ke 0x1000584 -#define CLUTTER_Armenian_O 0x1000555 -#define CLUTTER_Armenian_o 0x1000585 -#define CLUTTER_Armenian_FE 0x1000556 -#define CLUTTER_Armenian_fe 0x1000586 -#define CLUTTER_Armenian_apostrophe 0x100055a -#define CLUTTER_Georgian_an 0x10010d0 -#define CLUTTER_Georgian_ban 0x10010d1 -#define CLUTTER_Georgian_gan 0x10010d2 -#define CLUTTER_Georgian_don 0x10010d3 -#define CLUTTER_Georgian_en 0x10010d4 -#define CLUTTER_Georgian_vin 0x10010d5 -#define CLUTTER_Georgian_zen 0x10010d6 -#define CLUTTER_Georgian_tan 0x10010d7 -#define CLUTTER_Georgian_in 0x10010d8 -#define CLUTTER_Georgian_kan 0x10010d9 -#define CLUTTER_Georgian_las 0x10010da -#define CLUTTER_Georgian_man 0x10010db -#define CLUTTER_Georgian_nar 0x10010dc -#define CLUTTER_Georgian_on 0x10010dd -#define CLUTTER_Georgian_par 0x10010de -#define CLUTTER_Georgian_zhar 0x10010df -#define CLUTTER_Georgian_rae 0x10010e0 -#define CLUTTER_Georgian_san 0x10010e1 -#define CLUTTER_Georgian_tar 0x10010e2 -#define CLUTTER_Georgian_un 0x10010e3 -#define CLUTTER_Georgian_phar 0x10010e4 -#define CLUTTER_Georgian_khar 0x10010e5 -#define CLUTTER_Georgian_ghan 0x10010e6 -#define CLUTTER_Georgian_qar 0x10010e7 -#define CLUTTER_Georgian_shin 0x10010e8 -#define CLUTTER_Georgian_chin 0x10010e9 -#define CLUTTER_Georgian_can 0x10010ea -#define CLUTTER_Georgian_jil 0x10010eb -#define CLUTTER_Georgian_cil 0x10010ec -#define CLUTTER_Georgian_char 0x10010ed -#define CLUTTER_Georgian_xan 0x10010ee -#define CLUTTER_Georgian_jhan 0x10010ef -#define CLUTTER_Georgian_hae 0x10010f0 -#define CLUTTER_Georgian_he 0x10010f1 -#define CLUTTER_Georgian_hie 0x10010f2 -#define CLUTTER_Georgian_we 0x10010f3 -#define CLUTTER_Georgian_har 0x10010f4 -#define CLUTTER_Georgian_hoe 0x10010f5 -#define CLUTTER_Georgian_fi 0x10010f6 -#define CLUTTER_Xabovedot 0x1001e8a -#define CLUTTER_Ibreve 0x100012c -#define CLUTTER_Zstroke 0x10001b5 -#define CLUTTER_Gcaron 0x10001e6 -#define CLUTTER_Ocaron 0x10001d1 -#define CLUTTER_Obarred 0x100019f -#define CLUTTER_xabovedot 0x1001e8b -#define CLUTTER_ibreve 0x100012d -#define CLUTTER_zstroke 0x10001b6 -#define CLUTTER_gcaron 0x10001e7 -#define CLUTTER_ocaron 0x10001d2 -#define CLUTTER_obarred 0x1000275 -#define CLUTTER_SCHWA 0x100018f -#define CLUTTER_schwa 0x1000259 -#define CLUTTER_Lbelowdot 0x1001e36 -#define CLUTTER_lbelowdot 0x1001e37 -#define CLUTTER_Abelowdot 0x1001ea0 -#define CLUTTER_abelowdot 0x1001ea1 -#define CLUTTER_Ahook 0x1001ea2 -#define CLUTTER_ahook 0x1001ea3 -#define CLUTTER_Acircumflexacute 0x1001ea4 -#define CLUTTER_acircumflexacute 0x1001ea5 -#define CLUTTER_Acircumflexgrave 0x1001ea6 -#define CLUTTER_acircumflexgrave 0x1001ea7 -#define CLUTTER_Acircumflexhook 0x1001ea8 -#define CLUTTER_acircumflexhook 0x1001ea9 -#define CLUTTER_Acircumflextilde 0x1001eaa -#define CLUTTER_acircumflextilde 0x1001eab -#define CLUTTER_Acircumflexbelowdot 0x1001eac -#define CLUTTER_acircumflexbelowdot 0x1001ead -#define CLUTTER_Abreveacute 0x1001eae -#define CLUTTER_abreveacute 0x1001eaf -#define CLUTTER_Abrevegrave 0x1001eb0 -#define CLUTTER_abrevegrave 0x1001eb1 -#define CLUTTER_Abrevehook 0x1001eb2 -#define CLUTTER_abrevehook 0x1001eb3 -#define CLUTTER_Abrevetilde 0x1001eb4 -#define CLUTTER_abrevetilde 0x1001eb5 -#define CLUTTER_Abrevebelowdot 0x1001eb6 -#define CLUTTER_abrevebelowdot 0x1001eb7 -#define CLUTTER_Ebelowdot 0x1001eb8 -#define CLUTTER_ebelowdot 0x1001eb9 -#define CLUTTER_Ehook 0x1001eba -#define CLUTTER_ehook 0x1001ebb -#define CLUTTER_Etilde 0x1001ebc -#define CLUTTER_etilde 0x1001ebd -#define CLUTTER_Ecircumflexacute 0x1001ebe -#define CLUTTER_ecircumflexacute 0x1001ebf -#define CLUTTER_Ecircumflexgrave 0x1001ec0 -#define CLUTTER_ecircumflexgrave 0x1001ec1 -#define CLUTTER_Ecircumflexhook 0x1001ec2 -#define CLUTTER_ecircumflexhook 0x1001ec3 -#define CLUTTER_Ecircumflextilde 0x1001ec4 -#define CLUTTER_ecircumflextilde 0x1001ec5 -#define CLUTTER_Ecircumflexbelowdot 0x1001ec6 -#define CLUTTER_ecircumflexbelowdot 0x1001ec7 -#define CLUTTER_Ihook 0x1001ec8 -#define CLUTTER_ihook 0x1001ec9 -#define CLUTTER_Ibelowdot 0x1001eca -#define CLUTTER_ibelowdot 0x1001ecb -#define CLUTTER_Obelowdot 0x1001ecc -#define CLUTTER_obelowdot 0x1001ecd -#define CLUTTER_Ohook 0x1001ece -#define CLUTTER_ohook 0x1001ecf -#define CLUTTER_Ocircumflexacute 0x1001ed0 -#define CLUTTER_ocircumflexacute 0x1001ed1 -#define CLUTTER_Ocircumflexgrave 0x1001ed2 -#define CLUTTER_ocircumflexgrave 0x1001ed3 -#define CLUTTER_Ocircumflexhook 0x1001ed4 -#define CLUTTER_ocircumflexhook 0x1001ed5 -#define CLUTTER_Ocircumflextilde 0x1001ed6 -#define CLUTTER_ocircumflextilde 0x1001ed7 -#define CLUTTER_Ocircumflexbelowdot 0x1001ed8 -#define CLUTTER_ocircumflexbelowdot 0x1001ed9 -#define CLUTTER_Ohornacute 0x1001eda -#define CLUTTER_ohornacute 0x1001edb -#define CLUTTER_Ohorngrave 0x1001edc -#define CLUTTER_ohorngrave 0x1001edd -#define CLUTTER_Ohornhook 0x1001ede -#define CLUTTER_ohornhook 0x1001edf -#define CLUTTER_Ohorntilde 0x1001ee0 -#define CLUTTER_ohorntilde 0x1001ee1 -#define CLUTTER_Ohornbelowdot 0x1001ee2 -#define CLUTTER_ohornbelowdot 0x1001ee3 -#define CLUTTER_Ubelowdot 0x1001ee4 -#define CLUTTER_ubelowdot 0x1001ee5 -#define CLUTTER_Uhook 0x1001ee6 -#define CLUTTER_uhook 0x1001ee7 -#define CLUTTER_Uhornacute 0x1001ee8 -#define CLUTTER_uhornacute 0x1001ee9 -#define CLUTTER_Uhorngrave 0x1001eea -#define CLUTTER_uhorngrave 0x1001eeb -#define CLUTTER_Uhornhook 0x1001eec -#define CLUTTER_uhornhook 0x1001eed -#define CLUTTER_Uhorntilde 0x1001eee -#define CLUTTER_uhorntilde 0x1001eef -#define CLUTTER_Uhornbelowdot 0x1001ef0 -#define CLUTTER_uhornbelowdot 0x1001ef1 -#define CLUTTER_Ybelowdot 0x1001ef4 -#define CLUTTER_ybelowdot 0x1001ef5 -#define CLUTTER_Yhook 0x1001ef6 -#define CLUTTER_yhook 0x1001ef7 -#define CLUTTER_Ytilde 0x1001ef8 -#define CLUTTER_ytilde 0x1001ef9 -#define CLUTTER_Ohorn 0x10001a0 -#define CLUTTER_ohorn 0x10001a1 -#define CLUTTER_Uhorn 0x10001af -#define CLUTTER_uhorn 0x10001b0 -#define CLUTTER_EcuSign 0x10020a0 -#define CLUTTER_ColonSign 0x10020a1 -#define CLUTTER_CruzeiroSign 0x10020a2 -#define CLUTTER_FFrancSign 0x10020a3 -#define CLUTTER_LiraSign 0x10020a4 -#define CLUTTER_MillSign 0x10020a5 -#define CLUTTER_NairaSign 0x10020a6 -#define CLUTTER_PesetaSign 0x10020a7 -#define CLUTTER_RupeeSign 0x10020a8 -#define CLUTTER_WonSign 0x10020a9 -#define CLUTTER_NewSheqelSign 0x10020aa -#define CLUTTER_DongSign 0x10020ab -#define CLUTTER_EuroSign 0x20ac -#define CLUTTER_zerosuperior 0x1002070 -#define CLUTTER_foursuperior 0x1002074 -#define CLUTTER_fivesuperior 0x1002075 -#define CLUTTER_sixsuperior 0x1002076 -#define CLUTTER_sevensuperior 0x1002077 -#define CLUTTER_eightsuperior 0x1002078 -#define CLUTTER_ninesuperior 0x1002079 -#define CLUTTER_zerosubscript 0x1002080 -#define CLUTTER_onesubscript 0x1002081 -#define CLUTTER_twosubscript 0x1002082 -#define CLUTTER_threesubscript 0x1002083 -#define CLUTTER_foursubscript 0x1002084 -#define CLUTTER_fivesubscript 0x1002085 -#define CLUTTER_sixsubscript 0x1002086 -#define CLUTTER_sevensubscript 0x1002087 -#define CLUTTER_eightsubscript 0x1002088 -#define CLUTTER_ninesubscript 0x1002089 -#define CLUTTER_partdifferential 0x1002202 -#define CLUTTER_emptyset 0x1002205 -#define CLUTTER_elementof 0x1002208 -#define CLUTTER_notelementof 0x1002209 -#define CLUTTER_containsas 0x100220b -#define CLUTTER_squareroot 0x100221a -#define CLUTTER_cuberoot 0x100221b -#define CLUTTER_fourthroot 0x100221c -#define CLUTTER_dintegral 0x100222c -#define CLUTTER_tintegral 0x100222d -#define CLUTTER_because 0x1002235 -#define CLUTTER_approxeq 0x1002248 -#define CLUTTER_notapproxeq 0x1002247 -#define CLUTTER_notidentical 0x1002262 -#define CLUTTER_stricteq 0x1002263 -#define CLUTTER_braille_dot_1 0xfff1 -#define CLUTTER_braille_dot_2 0xfff2 -#define CLUTTER_braille_dot_3 0xfff3 -#define CLUTTER_braille_dot_4 0xfff4 -#define CLUTTER_braille_dot_5 0xfff5 -#define CLUTTER_braille_dot_6 0xfff6 -#define CLUTTER_braille_dot_7 0xfff7 -#define CLUTTER_braille_dot_8 0xfff8 -#define CLUTTER_braille_dot_9 0xfff9 -#define CLUTTER_braille_dot_10 0xfffa -#define CLUTTER_braille_blank 0x1002800 -#define CLUTTER_braille_dots_1 0x1002801 -#define CLUTTER_braille_dots_2 0x1002802 -#define CLUTTER_braille_dots_12 0x1002803 -#define CLUTTER_braille_dots_3 0x1002804 -#define CLUTTER_braille_dots_13 0x1002805 -#define CLUTTER_braille_dots_23 0x1002806 -#define CLUTTER_braille_dots_123 0x1002807 -#define CLUTTER_braille_dots_4 0x1002808 -#define CLUTTER_braille_dots_14 0x1002809 -#define CLUTTER_braille_dots_24 0x100280a -#define CLUTTER_braille_dots_124 0x100280b -#define CLUTTER_braille_dots_34 0x100280c -#define CLUTTER_braille_dots_134 0x100280d -#define CLUTTER_braille_dots_234 0x100280e -#define CLUTTER_braille_dots_1234 0x100280f -#define CLUTTER_braille_dots_5 0x1002810 -#define CLUTTER_braille_dots_15 0x1002811 -#define CLUTTER_braille_dots_25 0x1002812 -#define CLUTTER_braille_dots_125 0x1002813 -#define CLUTTER_braille_dots_35 0x1002814 -#define CLUTTER_braille_dots_135 0x1002815 -#define CLUTTER_braille_dots_235 0x1002816 -#define CLUTTER_braille_dots_1235 0x1002817 -#define CLUTTER_braille_dots_45 0x1002818 -#define CLUTTER_braille_dots_145 0x1002819 -#define CLUTTER_braille_dots_245 0x100281a -#define CLUTTER_braille_dots_1245 0x100281b -#define CLUTTER_braille_dots_345 0x100281c -#define CLUTTER_braille_dots_1345 0x100281d -#define CLUTTER_braille_dots_2345 0x100281e -#define CLUTTER_braille_dots_12345 0x100281f -#define CLUTTER_braille_dots_6 0x1002820 -#define CLUTTER_braille_dots_16 0x1002821 -#define CLUTTER_braille_dots_26 0x1002822 -#define CLUTTER_braille_dots_126 0x1002823 -#define CLUTTER_braille_dots_36 0x1002824 -#define CLUTTER_braille_dots_136 0x1002825 -#define CLUTTER_braille_dots_236 0x1002826 -#define CLUTTER_braille_dots_1236 0x1002827 -#define CLUTTER_braille_dots_46 0x1002828 -#define CLUTTER_braille_dots_146 0x1002829 -#define CLUTTER_braille_dots_246 0x100282a -#define CLUTTER_braille_dots_1246 0x100282b -#define CLUTTER_braille_dots_346 0x100282c -#define CLUTTER_braille_dots_1346 0x100282d -#define CLUTTER_braille_dots_2346 0x100282e -#define CLUTTER_braille_dots_12346 0x100282f -#define CLUTTER_braille_dots_56 0x1002830 -#define CLUTTER_braille_dots_156 0x1002831 -#define CLUTTER_braille_dots_256 0x1002832 -#define CLUTTER_braille_dots_1256 0x1002833 -#define CLUTTER_braille_dots_356 0x1002834 -#define CLUTTER_braille_dots_1356 0x1002835 -#define CLUTTER_braille_dots_2356 0x1002836 -#define CLUTTER_braille_dots_12356 0x1002837 -#define CLUTTER_braille_dots_456 0x1002838 -#define CLUTTER_braille_dots_1456 0x1002839 -#define CLUTTER_braille_dots_2456 0x100283a -#define CLUTTER_braille_dots_12456 0x100283b -#define CLUTTER_braille_dots_3456 0x100283c -#define CLUTTER_braille_dots_13456 0x100283d -#define CLUTTER_braille_dots_23456 0x100283e -#define CLUTTER_braille_dots_123456 0x100283f -#define CLUTTER_braille_dots_7 0x1002840 -#define CLUTTER_braille_dots_17 0x1002841 -#define CLUTTER_braille_dots_27 0x1002842 -#define CLUTTER_braille_dots_127 0x1002843 -#define CLUTTER_braille_dots_37 0x1002844 -#define CLUTTER_braille_dots_137 0x1002845 -#define CLUTTER_braille_dots_237 0x1002846 -#define CLUTTER_braille_dots_1237 0x1002847 -#define CLUTTER_braille_dots_47 0x1002848 -#define CLUTTER_braille_dots_147 0x1002849 -#define CLUTTER_braille_dots_247 0x100284a -#define CLUTTER_braille_dots_1247 0x100284b -#define CLUTTER_braille_dots_347 0x100284c -#define CLUTTER_braille_dots_1347 0x100284d -#define CLUTTER_braille_dots_2347 0x100284e -#define CLUTTER_braille_dots_12347 0x100284f -#define CLUTTER_braille_dots_57 0x1002850 -#define CLUTTER_braille_dots_157 0x1002851 -#define CLUTTER_braille_dots_257 0x1002852 -#define CLUTTER_braille_dots_1257 0x1002853 -#define CLUTTER_braille_dots_357 0x1002854 -#define CLUTTER_braille_dots_1357 0x1002855 -#define CLUTTER_braille_dots_2357 0x1002856 -#define CLUTTER_braille_dots_12357 0x1002857 -#define CLUTTER_braille_dots_457 0x1002858 -#define CLUTTER_braille_dots_1457 0x1002859 -#define CLUTTER_braille_dots_2457 0x100285a -#define CLUTTER_braille_dots_12457 0x100285b -#define CLUTTER_braille_dots_3457 0x100285c -#define CLUTTER_braille_dots_13457 0x100285d -#define CLUTTER_braille_dots_23457 0x100285e -#define CLUTTER_braille_dots_123457 0x100285f -#define CLUTTER_braille_dots_67 0x1002860 -#define CLUTTER_braille_dots_167 0x1002861 -#define CLUTTER_braille_dots_267 0x1002862 -#define CLUTTER_braille_dots_1267 0x1002863 -#define CLUTTER_braille_dots_367 0x1002864 -#define CLUTTER_braille_dots_1367 0x1002865 -#define CLUTTER_braille_dots_2367 0x1002866 -#define CLUTTER_braille_dots_12367 0x1002867 -#define CLUTTER_braille_dots_467 0x1002868 -#define CLUTTER_braille_dots_1467 0x1002869 -#define CLUTTER_braille_dots_2467 0x100286a -#define CLUTTER_braille_dots_12467 0x100286b -#define CLUTTER_braille_dots_3467 0x100286c -#define CLUTTER_braille_dots_13467 0x100286d -#define CLUTTER_braille_dots_23467 0x100286e -#define CLUTTER_braille_dots_123467 0x100286f -#define CLUTTER_braille_dots_567 0x1002870 -#define CLUTTER_braille_dots_1567 0x1002871 -#define CLUTTER_braille_dots_2567 0x1002872 -#define CLUTTER_braille_dots_12567 0x1002873 -#define CLUTTER_braille_dots_3567 0x1002874 -#define CLUTTER_braille_dots_13567 0x1002875 -#define CLUTTER_braille_dots_23567 0x1002876 -#define CLUTTER_braille_dots_123567 0x1002877 -#define CLUTTER_braille_dots_4567 0x1002878 -#define CLUTTER_braille_dots_14567 0x1002879 -#define CLUTTER_braille_dots_24567 0x100287a -#define CLUTTER_braille_dots_124567 0x100287b -#define CLUTTER_braille_dots_34567 0x100287c -#define CLUTTER_braille_dots_134567 0x100287d -#define CLUTTER_braille_dots_234567 0x100287e -#define CLUTTER_braille_dots_1234567 0x100287f -#define CLUTTER_braille_dots_8 0x1002880 -#define CLUTTER_braille_dots_18 0x1002881 -#define CLUTTER_braille_dots_28 0x1002882 -#define CLUTTER_braille_dots_128 0x1002883 -#define CLUTTER_braille_dots_38 0x1002884 -#define CLUTTER_braille_dots_138 0x1002885 -#define CLUTTER_braille_dots_238 0x1002886 -#define CLUTTER_braille_dots_1238 0x1002887 -#define CLUTTER_braille_dots_48 0x1002888 -#define CLUTTER_braille_dots_148 0x1002889 -#define CLUTTER_braille_dots_248 0x100288a -#define CLUTTER_braille_dots_1248 0x100288b -#define CLUTTER_braille_dots_348 0x100288c -#define CLUTTER_braille_dots_1348 0x100288d -#define CLUTTER_braille_dots_2348 0x100288e -#define CLUTTER_braille_dots_12348 0x100288f -#define CLUTTER_braille_dots_58 0x1002890 -#define CLUTTER_braille_dots_158 0x1002891 -#define CLUTTER_braille_dots_258 0x1002892 -#define CLUTTER_braille_dots_1258 0x1002893 -#define CLUTTER_braille_dots_358 0x1002894 -#define CLUTTER_braille_dots_1358 0x1002895 -#define CLUTTER_braille_dots_2358 0x1002896 -#define CLUTTER_braille_dots_12358 0x1002897 -#define CLUTTER_braille_dots_458 0x1002898 -#define CLUTTER_braille_dots_1458 0x1002899 -#define CLUTTER_braille_dots_2458 0x100289a -#define CLUTTER_braille_dots_12458 0x100289b -#define CLUTTER_braille_dots_3458 0x100289c -#define CLUTTER_braille_dots_13458 0x100289d -#define CLUTTER_braille_dots_23458 0x100289e -#define CLUTTER_braille_dots_123458 0x100289f -#define CLUTTER_braille_dots_68 0x10028a0 -#define CLUTTER_braille_dots_168 0x10028a1 -#define CLUTTER_braille_dots_268 0x10028a2 -#define CLUTTER_braille_dots_1268 0x10028a3 -#define CLUTTER_braille_dots_368 0x10028a4 -#define CLUTTER_braille_dots_1368 0x10028a5 -#define CLUTTER_braille_dots_2368 0x10028a6 -#define CLUTTER_braille_dots_12368 0x10028a7 -#define CLUTTER_braille_dots_468 0x10028a8 -#define CLUTTER_braille_dots_1468 0x10028a9 -#define CLUTTER_braille_dots_2468 0x10028aa -#define CLUTTER_braille_dots_12468 0x10028ab -#define CLUTTER_braille_dots_3468 0x10028ac -#define CLUTTER_braille_dots_13468 0x10028ad -#define CLUTTER_braille_dots_23468 0x10028ae -#define CLUTTER_braille_dots_123468 0x10028af -#define CLUTTER_braille_dots_568 0x10028b0 -#define CLUTTER_braille_dots_1568 0x10028b1 -#define CLUTTER_braille_dots_2568 0x10028b2 -#define CLUTTER_braille_dots_12568 0x10028b3 -#define CLUTTER_braille_dots_3568 0x10028b4 -#define CLUTTER_braille_dots_13568 0x10028b5 -#define CLUTTER_braille_dots_23568 0x10028b6 -#define CLUTTER_braille_dots_123568 0x10028b7 -#define CLUTTER_braille_dots_4568 0x10028b8 -#define CLUTTER_braille_dots_14568 0x10028b9 -#define CLUTTER_braille_dots_24568 0x10028ba -#define CLUTTER_braille_dots_124568 0x10028bb -#define CLUTTER_braille_dots_34568 0x10028bc -#define CLUTTER_braille_dots_134568 0x10028bd -#define CLUTTER_braille_dots_234568 0x10028be -#define CLUTTER_braille_dots_1234568 0x10028bf -#define CLUTTER_braille_dots_78 0x10028c0 -#define CLUTTER_braille_dots_178 0x10028c1 -#define CLUTTER_braille_dots_278 0x10028c2 -#define CLUTTER_braille_dots_1278 0x10028c3 -#define CLUTTER_braille_dots_378 0x10028c4 -#define CLUTTER_braille_dots_1378 0x10028c5 -#define CLUTTER_braille_dots_2378 0x10028c6 -#define CLUTTER_braille_dots_12378 0x10028c7 -#define CLUTTER_braille_dots_478 0x10028c8 -#define CLUTTER_braille_dots_1478 0x10028c9 -#define CLUTTER_braille_dots_2478 0x10028ca -#define CLUTTER_braille_dots_12478 0x10028cb -#define CLUTTER_braille_dots_3478 0x10028cc -#define CLUTTER_braille_dots_13478 0x10028cd -#define CLUTTER_braille_dots_23478 0x10028ce -#define CLUTTER_braille_dots_123478 0x10028cf -#define CLUTTER_braille_dots_578 0x10028d0 -#define CLUTTER_braille_dots_1578 0x10028d1 -#define CLUTTER_braille_dots_2578 0x10028d2 -#define CLUTTER_braille_dots_12578 0x10028d3 -#define CLUTTER_braille_dots_3578 0x10028d4 -#define CLUTTER_braille_dots_13578 0x10028d5 -#define CLUTTER_braille_dots_23578 0x10028d6 -#define CLUTTER_braille_dots_123578 0x10028d7 -#define CLUTTER_braille_dots_4578 0x10028d8 -#define CLUTTER_braille_dots_14578 0x10028d9 -#define CLUTTER_braille_dots_24578 0x10028da -#define CLUTTER_braille_dots_124578 0x10028db -#define CLUTTER_braille_dots_34578 0x10028dc -#define CLUTTER_braille_dots_134578 0x10028dd -#define CLUTTER_braille_dots_234578 0x10028de -#define CLUTTER_braille_dots_1234578 0x10028df -#define CLUTTER_braille_dots_678 0x10028e0 -#define CLUTTER_braille_dots_1678 0x10028e1 -#define CLUTTER_braille_dots_2678 0x10028e2 -#define CLUTTER_braille_dots_12678 0x10028e3 -#define CLUTTER_braille_dots_3678 0x10028e4 -#define CLUTTER_braille_dots_13678 0x10028e5 -#define CLUTTER_braille_dots_23678 0x10028e6 -#define CLUTTER_braille_dots_123678 0x10028e7 -#define CLUTTER_braille_dots_4678 0x10028e8 -#define CLUTTER_braille_dots_14678 0x10028e9 -#define CLUTTER_braille_dots_24678 0x10028ea -#define CLUTTER_braille_dots_124678 0x10028eb -#define CLUTTER_braille_dots_34678 0x10028ec -#define CLUTTER_braille_dots_134678 0x10028ed -#define CLUTTER_braille_dots_234678 0x10028ee -#define CLUTTER_braille_dots_1234678 0x10028ef -#define CLUTTER_braille_dots_5678 0x10028f0 -#define CLUTTER_braille_dots_15678 0x10028f1 -#define CLUTTER_braille_dots_25678 0x10028f2 -#define CLUTTER_braille_dots_125678 0x10028f3 -#define CLUTTER_braille_dots_35678 0x10028f4 -#define CLUTTER_braille_dots_135678 0x10028f5 -#define CLUTTER_braille_dots_235678 0x10028f6 -#define CLUTTER_braille_dots_1235678 0x10028f7 -#define CLUTTER_braille_dots_45678 0x10028f8 -#define CLUTTER_braille_dots_145678 0x10028f9 -#define CLUTTER_braille_dots_245678 0x10028fa -#define CLUTTER_braille_dots_1245678 0x10028fb -#define CLUTTER_braille_dots_345678 0x10028fc -#define CLUTTER_braille_dots_1345678 0x10028fd -#define CLUTTER_braille_dots_2345678 0x10028fe -#define CLUTTER_braille_dots_12345678 0x10028ff -#define CLUTTER_ModeLock 0x1008ff01 -#define CLUTTER_MonBrightnessUp 0x1008ff02 -#define CLUTTER_MonBrightnessDown 0x1008ff03 -#define CLUTTER_KbdLightOnOff 0x1008ff04 -#define CLUTTER_KbdBrightnessUp 0x1008ff05 -#define CLUTTER_KbdBrightnessDown 0x1008ff06 -#define CLUTTER_Standby 0x1008ff10 -#define CLUTTER_AudioLowerVolume 0x1008ff11 -#define CLUTTER_AudioMute 0x1008ff12 -#define CLUTTER_AudioRaiseVolume 0x1008ff13 -#define CLUTTER_AudioPlay 0x1008ff14 -#define CLUTTER_AudioStop 0x1008ff15 -#define CLUTTER_AudioPrev 0x1008ff16 -#define CLUTTER_AudioNext 0x1008ff17 -#define CLUTTER_HomePage 0x1008ff18 -#define CLUTTER_Mail 0x1008ff19 -#define CLUTTER_Start 0x1008ff1a -#define CLUTTER_Search 0x1008ff1b -#define CLUTTER_AudioRecord 0x1008ff1c -#define CLUTTER_Calculator 0x1008ff1d -#define CLUTTER_Memo 0x1008ff1e -#define CLUTTER_ToDoList 0x1008ff1f -#define CLUTTER_Calendar 0x1008ff20 -#define CLUTTER_PowerDown 0x1008ff21 -#define CLUTTER_ContrastAdjust 0x1008ff22 -#define CLUTTER_RockerUp 0x1008ff23 -#define CLUTTER_RockerDown 0x1008ff24 -#define CLUTTER_RockerEnter 0x1008ff25 -#define CLUTTER_Back 0x1008ff26 -#define CLUTTER_Forward 0x1008ff27 -#define CLUTTER_Stop 0x1008ff28 -#define CLUTTER_Refresh 0x1008ff29 -#define CLUTTER_PowerOff 0x1008ff2a -#define CLUTTER_WakeUp 0x1008ff2b -#define CLUTTER_Eject 0x1008ff2c -#define CLUTTER_ScreenSaver 0x1008ff2d -#define CLUTTER_WWW 0x1008ff2e -#define CLUTTER_Sleep 0x1008ff2f -#define CLUTTER_Favorites 0x1008ff30 -#define CLUTTER_AudioPause 0x1008ff31 -#define CLUTTER_AudioMedia 0x1008ff32 -#define CLUTTER_MyComputer 0x1008ff33 -#define CLUTTER_VendorHome 0x1008ff34 -#define CLUTTER_LightBulb 0x1008ff35 -#define CLUTTER_Shop 0x1008ff36 -#define CLUTTER_History 0x1008ff37 -#define CLUTTER_OpenURL 0x1008ff38 -#define CLUTTER_AddFavorite 0x1008ff39 -#define CLUTTER_HotLinks 0x1008ff3a -#define CLUTTER_BrightnessAdjust 0x1008ff3b -#define CLUTTER_Finance 0x1008ff3c -#define CLUTTER_Community 0x1008ff3d -#define CLUTTER_AudioRewind 0x1008ff3e -#define CLUTTER_BackForward 0x1008ff3f -#define CLUTTER_Launch0 0x1008ff40 -#define CLUTTER_Launch1 0x1008ff41 -#define CLUTTER_Launch2 0x1008ff42 -#define CLUTTER_Launch3 0x1008ff43 -#define CLUTTER_Launch4 0x1008ff44 -#define CLUTTER_Launch5 0x1008ff45 -#define CLUTTER_Launch6 0x1008ff46 -#define CLUTTER_Launch7 0x1008ff47 -#define CLUTTER_Launch8 0x1008ff48 -#define CLUTTER_Launch9 0x1008ff49 -#define CLUTTER_LaunchA 0x1008ff4a -#define CLUTTER_LaunchB 0x1008ff4b -#define CLUTTER_LaunchC 0x1008ff4c -#define CLUTTER_LaunchD 0x1008ff4d -#define CLUTTER_LaunchE 0x1008ff4e -#define CLUTTER_LaunchF 0x1008ff4f -#define CLUTTER_ApplicationLeft 0x1008ff50 -#define CLUTTER_ApplicationRight 0x1008ff51 -#define CLUTTER_Book 0x1008ff52 -#define CLUTTER_CD 0x1008ff53 -#define CLUTTER_WindowClear 0x1008ff55 -#define CLUTTER_Close 0x1008ff56 -#define CLUTTER_Copy 0x1008ff57 -#define CLUTTER_Cut 0x1008ff58 -#define CLUTTER_Display 0x1008ff59 -#define CLUTTER_DOS 0x1008ff5a -#define CLUTTER_Documents 0x1008ff5b -#define CLUTTER_Excel 0x1008ff5c -#define CLUTTER_Explorer 0x1008ff5d -#define CLUTTER_Game 0x1008ff5e -#define CLUTTER_Go 0x1008ff5f -#define CLUTTER_iTouch 0x1008ff60 -#define CLUTTER_LogOff 0x1008ff61 -#define CLUTTER_Market 0x1008ff62 -#define CLUTTER_Meeting 0x1008ff63 -#define CLUTTER_MenuKB 0x1008ff65 -#define CLUTTER_MenuPB 0x1008ff66 -#define CLUTTER_MySites 0x1008ff67 -#define CLUTTER_New 0x1008ff68 -#define CLUTTER_News 0x1008ff69 -#define CLUTTER_OfficeHome 0x1008ff6a -#define CLUTTER_Open 0x1008ff6b -#define CLUTTER_Option 0x1008ff6c -#define CLUTTER_Paste 0x1008ff6d -#define CLUTTER_Phone 0x1008ff6e -#define CLUTTER_Reply 0x1008ff72 -#define CLUTTER_Reload 0x1008ff73 -#define CLUTTER_RotateWindows 0x1008ff74 -#define CLUTTER_RotationPB 0x1008ff75 -#define CLUTTER_RotationKB 0x1008ff76 -#define CLUTTER_Save 0x1008ff77 -#define CLUTTER_ScrollUp 0x1008ff78 -#define CLUTTER_ScrollDown 0x1008ff79 -#define CLUTTER_ScrollClick 0x1008ff7a -#define CLUTTER_Send 0x1008ff7b -#define CLUTTER_Spell 0x1008ff7c -#define CLUTTER_SplitScreen 0x1008ff7d -#define CLUTTER_Support 0x1008ff7e -#define CLUTTER_TaskPane 0x1008ff7f -#define CLUTTER_Terminal 0x1008ff80 -#define CLUTTER_Tools 0x1008ff81 -#define CLUTTER_Travel 0x1008ff82 -#define CLUTTER_UserPB 0x1008ff84 -#define CLUTTER_User1KB 0x1008ff85 -#define CLUTTER_User2KB 0x1008ff86 -#define CLUTTER_Video 0x1008ff87 -#define CLUTTER_WheelButton 0x1008ff88 -#define CLUTTER_Word 0x1008ff89 -#define CLUTTER_Xfer 0x1008ff8a -#define CLUTTER_ZoomIn 0x1008ff8b -#define CLUTTER_ZoomOut 0x1008ff8c -#define CLUTTER_Away 0x1008ff8d -#define CLUTTER_Messenger 0x1008ff8e -#define CLUTTER_WebCam 0x1008ff8f -#define CLUTTER_MailForward 0x1008ff90 -#define CLUTTER_Pictures 0x1008ff91 -#define CLUTTER_Music 0x1008ff92 -#define CLUTTER_Battery 0x1008ff93 -#define CLUTTER_Bluetooth 0x1008ff94 -#define CLUTTER_WLAN 0x1008ff95 -#define CLUTTER_UWB 0x1008ff96 -#define CLUTTER_AudioForward 0x1008ff97 -#define CLUTTER_AudioRepeat 0x1008ff98 -#define CLUTTER_AudioRandomPlay 0x1008ff99 -#define CLUTTER_Subtitle 0x1008ff9a -#define CLUTTER_AudioCycleTrack 0x1008ff9b -#define CLUTTER_CycleAngle 0x1008ff9c -#define CLUTTER_FrameBack 0x1008ff9d -#define CLUTTER_FrameForward 0x1008ff9e -#define CLUTTER_Time 0x1008ff9f -#define CLUTTER_SelectButton 0x1008ffa0 -#define CLUTTER_View 0x1008ffa1 -#define CLUTTER_TopMenu 0x1008ffa2 -#define CLUTTER_Red 0x1008ffa3 -#define CLUTTER_Green 0x1008ffa4 -#define CLUTTER_Yellow 0x1008ffa5 -#define CLUTTER_Blue 0x1008ffa6 -#define CLUTTER_Suspend 0x1008ffa7 -#define CLUTTER_Hibernate 0x1008ffa8 -#define CLUTTER_TouchpadToggle 0x1008ffa9 -#define CLUTTER_TouchpadOn 0x1008ffb0 -#define CLUTTER_TouchpadOff 0x1008ffb1 -#define CLUTTER_Switch_VT_1 0x1008fe01 -#define CLUTTER_Switch_VT_2 0x1008fe02 -#define CLUTTER_Switch_VT_3 0x1008fe03 -#define CLUTTER_Switch_VT_4 0x1008fe04 -#define CLUTTER_Switch_VT_5 0x1008fe05 -#define CLUTTER_Switch_VT_6 0x1008fe06 -#define CLUTTER_Switch_VT_7 0x1008fe07 -#define CLUTTER_Switch_VT_8 0x1008fe08 -#define CLUTTER_Switch_VT_9 0x1008fe09 -#define CLUTTER_Switch_VT_10 0x1008fe0a -#define CLUTTER_Switch_VT_11 0x1008fe0b -#define CLUTTER_Switch_VT_12 0x1008fe0c -#define CLUTTER_Ungrab 0x1008fe20 -#define CLUTTER_ClearGrab 0x1008fe21 -#define CLUTTER_Next_VMode 0x1008fe22 -#define CLUTTER_Prev_VMode 0x1008fe23 - -#endif /* __CLUTTER_KEYSYMS_COMPAT_H__ */ diff --git a/clutter/clutter-keysyms-update.pl b/clutter/clutter-keysyms-update.pl index c05322af0..d874e8e27 100755 --- a/clutter/clutter-keysyms-update.pl +++ b/clutter/clutter-keysyms-update.pl @@ -58,10 +58,6 @@ die "Could not open file keysymdef.h: $!\n" die "Could not open file clutter-keysyms.h: $!\n" unless open(OUT_KEYSYMS, ">:utf8", "clutter-keysyms.h"); -# Output: clutter/clutter/clutter-keysyms-compat.h -die "Could not open file clutter-keysyms-compat.h: $!\n" - unless open(OUT_KEYSYMS_COMPAT, ">:utf8", "clutter-keysyms-compat.h"); - my $LICENSE_HEADER= <<EOF; /* Clutter * @@ -85,7 +81,6 @@ my $LICENSE_HEADER= <<EOF; EOF print OUT_KEYSYMS $LICENSE_HEADER; -print OUT_KEYSYMS_COMPAT $LICENSE_HEADER; print OUT_KEYSYMS<<EOF; @@ -104,21 +99,6 @@ print OUT_KEYSYMS<<EOF; EOF -print OUT_KEYSYMS_COMPAT<<EOF; -/* - * Compatibility version of clutter-keysyms.h. - * - * Since Clutter 1.4, the key symbol defines have been changed to have - * a KEY_ prefix. This is a compatibility header that is included when - * deprecated symbols are enabled. Consider porting to the new names - * instead. - */ - -#ifndef __CLUTTER_KEYSYMS_COMPAT_H__ -#define __CLUTTER_KEYSYMS_COMPAT_H__ - -EOF - while (<IN_KEYSYMDEF>) { next if ( ! /^#define / ); @@ -135,11 +115,8 @@ while (<IN_KEYSYMDEF>) my $element = $keysymelements[1]; my $binding = $element; $binding =~ s/^XK_/CLUTTER_KEY_/g; - my $compat_binding = $element; - $compat_binding =~ s/^XK_/CLUTTER_/g; printf OUT_KEYSYMS "#define %s 0x%03x\n", $binding, hex($keysymelements[2]); - printf OUT_KEYSYMS_COMPAT "#define %s 0x%03x\n", $compat_binding, hex($keysymelements[2]); } close IN_KEYSYMDEF; @@ -183,34 +160,16 @@ while (<IN_XF86KEYSYM>) my $element = $keysymelements[1]; my $binding = $element; $binding =~ s/^XF86XK_/CLUTTER_KEY_/g; - my $compat_binding = $element; - $compat_binding =~ s/^XF86XK_/CLUTTER_/g; printf OUT_KEYSYMS "#define %s 0x%03x\n", $binding, hex($keysymelements[2]); - printf OUT_KEYSYMS_COMPAT "#define %s 0x%03x\n", $compat_binding, hex($keysymelements[2]); } close IN_XF86KEYSYM; -print OUT_KEYSYMS<<EOF; - -/* include the compatibility header */ -#ifndef CLUTTER_DISABLE_DEPRECATED -#include "clutter-keysyms-compat.h" -#endif - -#endif /* __CLUTTER_KEYSYMS_H__ */ -EOF - -print OUT_KEYSYMS_COMPAT<<EOF; - -#endif /* __CLUTTER_KEYSYMS_COMPAT_H__ */ -EOF - foreach my $f (qw/ keysymdef.h XF86keysym.h /) { unlink $f or die "Unable to delete $f: $!"; } -printf "We just finished converting keysymdef.h to clutter-keysyms.h " - . "and clutter-keysyms-compat.h\nThank you\n"; +printf "We just finished converting keysymdef.h to clutter-keysyms.h\n" + . "Thank you\n"; diff --git a/clutter/clutter-keysyms.h b/clutter/clutter-keysyms.h index 5388b0dff..fa6d2e6af 100644 --- a/clutter/clutter-keysyms.h +++ b/clutter/clutter-keysyms.h @@ -2209,9 +2209,4 @@ #define CLUTTER_KEY_Next_VMode 0x1008fe22 #define CLUTTER_KEY_Prev_VMode 0x1008fe23 -/* include the compatibility header */ -#ifndef CLUTTER_DISABLE_DEPRECATED -#include "clutter-keysyms-compat.h" -#endif - #endif /* __CLUTTER_KEYSYMS_H__ */ diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index b7a63f472..58c0b551b 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -100,7 +100,6 @@ #include "clutter-device-manager-private.h" #include "clutter-event.h" #include "clutter-feature.h" -#include "clutter-frame-source.h" #include "clutter-main.h" #include "clutter-master-clock.h" #include "clutter-private.h" @@ -960,9 +959,7 @@ clutter_threads_add_idle (GSourceFunc func, * * It is important to note that, due to how the Clutter main loop is * implemented, the timing will not be accurate and it will not try to - * "keep up" with the interval. A more reliable source is available - * using clutter_threads_add_frame_source_full(), which is also internally - * used by #ClutterTimeline. + * "keep up" with the interval. * * See also clutter_threads_add_idle_full(). * diff --git a/clutter/clutter-main.h b/clutter/clutter-main.h index 7e7f56c9d..d42c9f36b 100644 --- a/clutter/clutter-main.h +++ b/clutter/clutter-main.h @@ -127,17 +127,6 @@ guint clutter_threads_add_timeout_full (gint priority, gpointer data, GDestroyNotify notify); -#ifndef CLUTTER_DISABLE_DEPRECATED -guint clutter_threads_add_frame_source (guint fps, - GSourceFunc func, - gpointer data); -guint clutter_threads_add_frame_source_full (gint priority, - guint fps, - GSourceFunc func, - gpointer data, - GDestroyNotify notify); -#endif /* CLUTTER_DISABLE_DEPRECATED */ - guint clutter_threads_add_repaint_func (GSourceFunc func, gpointer data, GDestroyNotify notify); diff --git a/clutter/clutter-path.c b/clutter/clutter-path.c index 91b2be2ff..82d41fbe2 100644 --- a/clutter/clutter-path.c +++ b/clutter/clutter-path.c @@ -146,6 +146,10 @@ G_DEFINE_BOXED_TYPE (ClutterPathNode, clutter_path_node, clutter_path_node_copy, clutter_path_node_free); +G_DEFINE_BOXED_TYPE (ClutterKnot, clutter_knot, + clutter_knot_copy, + clutter_knot_free); + G_DEFINE_TYPE_WITH_CODE (ClutterPath, clutter_path, G_TYPE_INITIALLY_UNOWNED, @@ -1496,6 +1500,64 @@ clutter_path_get_length (ClutterPath *path) return path->priv->total_length; } +/** + * clutter_knot_copy: + * @knot: a #ClutterKnot + * + * Makes an allocated copy of a knot. + * + * Return value: the copied knot. + * + * Since: 0.2 + */ +ClutterKnot * +clutter_knot_copy (const ClutterKnot *knot) +{ + if (knot != NULL) + return g_slice_dup (ClutterKnot, knot); + + return NULL; +} + +/** + * clutter_knot_free: + * @knot: a #ClutterKnot + * + * Frees the memory of an allocated knot. + * + * Since: 0.2 + */ +void +clutter_knot_free (ClutterKnot *knot) +{ + if (knot != NULL) + g_slice_free (ClutterKnot, knot); +} + +/** + * clutter_knot_equal: + * @knot_a: First knot + * @knot_b: Second knot + * + * Compares to knot and checks if the point to the same location. + * + * Return value: %TRUE if the knots point to the same location. + * + * Since: 0.2 + */ +gboolean +clutter_knot_equal (const ClutterKnot *knot_a, + const ClutterKnot *knot_b) +{ + g_return_val_if_fail (knot_a != NULL, FALSE); + g_return_val_if_fail (knot_b != NULL, FALSE); + + if (knot_a == knot_b) + return TRUE; + + return knot_a->x == knot_b->x && knot_a->y == knot_b->y; +} + static ClutterPathNodeFull * clutter_path_node_full_new (void) { diff --git a/clutter/clutter-script.c b/clutter/clutter-script.c index b3625c037..0850bb9f2 100644 --- a/clutter/clutter-script.c +++ b/clutter/clutter-script.c @@ -236,7 +236,6 @@ #include "clutter-actor.h" #include "clutter-alpha.h" -#include "clutter-behaviour.h" #include "clutter-container.h" #include "clutter-stage.h" #include "clutter-state.h" diff --git a/clutter/clutter-shader.c b/clutter/clutter-shader.c deleted file mode 100644 index cf3b20c71..000000000 --- a/clutter/clutter-shader.c +++ /dev/null @@ -1,950 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By: Matthew Allum <mallum@openedhand.com> - * Øyvind KolÃ¥s <pippin@o-hand.com> - * Emmanuele Bassi <ebassi@linux.intel.com> - * - * Copyright (C) 2007, 2008 OpenedHand - * Copyright (C) 2009 Intel Corp - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - * - */ - -/** - * SECTION:clutter-shader - * @short_description: Programmable pipeline abstraction - * - * #ClutterShader is an object providing an abstraction over the - * OpenGL programmable pipeline. By using #ClutterShader<!-- -->s is - * possible to override the drawing pipeline by using small programs - * also known as "shaders". - * - * #ClutterShader is available since Clutter 0.6. - * - * #ClutterShader is deprecated since Clutter 1.8; use #ClutterShaderEffect - * in newly written code. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <string.h> -#include <stdlib.h> - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#include <glib.h> -#include <glib/gi18n-lib.h> - -#include <cogl/cogl.h> - -#include "clutter-shader.h" - -#include "clutter-debug.h" -#include "clutter-private.h" - -/* global list of shaders */ -static GList *clutter_shaders_list = NULL; - -#define CLUTTER_SHADER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CLUTTER_TYPE_SHADER, ClutterShaderPrivate)) - -struct _ClutterShaderPrivate -{ - guint compiled : 1; /* Shader is bound to the GL context */ - guint is_enabled : 1; - guint vertex_is_glsl : 1; - guint fragment_is_glsl : 1; - - gchar *vertex_source; /* GLSL source for vertex shader */ - gchar *fragment_source; /* GLSL source for fragment shader */ - - CoglHandle program; - - CoglHandle vertex_shader; - CoglHandle fragment_shader; -}; - -enum -{ - PROP_0, - - PROP_VERTEX_SOURCE, - PROP_FRAGMENT_SOURCE, - PROP_COMPILED, - PROP_ENABLED, - - PROP_LAST -}; - -static GParamSpec *obj_props[PROP_LAST]; - -G_DEFINE_TYPE (ClutterShader, clutter_shader, G_TYPE_OBJECT); - -static inline void -clutter_shader_release_internal (ClutterShader *shader) -{ - ClutterShaderPrivate *priv = shader->priv; - - if (!priv->compiled) - return; - - g_assert (priv->program != COGL_INVALID_HANDLE); - - if (priv->vertex_is_glsl && priv->vertex_shader != COGL_INVALID_HANDLE) - cogl_handle_unref (priv->vertex_shader); - - if (priv->fragment_is_glsl && priv->fragment_shader != COGL_INVALID_HANDLE) - cogl_handle_unref (priv->fragment_shader); - - if (priv->program != COGL_INVALID_HANDLE) - cogl_handle_unref (priv->program); - - priv->vertex_shader = COGL_INVALID_HANDLE; - priv->fragment_shader = COGL_INVALID_HANDLE; - priv->program = COGL_INVALID_HANDLE; - priv->compiled = FALSE; -} - -static void -clutter_shader_finalize (GObject *object) -{ - ClutterShader *shader; - ClutterShaderPrivate *priv; - - shader = CLUTTER_SHADER (object); - priv = shader->priv; - - clutter_shaders_list = g_list_remove (clutter_shaders_list, object); - - g_free (priv->fragment_source); - g_free (priv->vertex_source); - - G_OBJECT_CLASS (clutter_shader_parent_class)->finalize (object); -} - -static void -clutter_shader_dispose (GObject *object) -{ - ClutterShader *shader = CLUTTER_SHADER (object); - - clutter_shader_release_internal (shader); - - G_OBJECT_CLASS (clutter_shader_parent_class)->finalize (object); -} - -static void -clutter_shader_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - ClutterShader *shader = CLUTTER_SHADER(object); - - switch (prop_id) - { - case PROP_VERTEX_SOURCE: - clutter_shader_set_vertex_source (shader, - g_value_get_string (value), -1); - break; - case PROP_FRAGMENT_SOURCE: - clutter_shader_set_fragment_source (shader, - g_value_get_string (value), -1); - break; - case PROP_ENABLED: - clutter_shader_set_is_enabled (shader, g_value_get_boolean (value)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -clutter_shader_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - ClutterShader *shader; - ClutterShaderPrivate *priv; - - shader = CLUTTER_SHADER(object); - priv = shader->priv; - - switch (prop_id) - { - case PROP_VERTEX_SOURCE: - g_value_set_string (value, priv->vertex_source); - break; - case PROP_FRAGMENT_SOURCE: - g_value_set_string (value, priv->fragment_source); - break; - case PROP_COMPILED: - g_value_set_boolean (value, priv->compiled); - break; - case PROP_ENABLED: - g_value_set_boolean (value, priv->is_enabled); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static GObject * -clutter_shader_constructor (GType type, - guint n_params, - GObjectConstructParam *params) -{ - GObjectClass *parent_class; - GObject *object; - - parent_class = G_OBJECT_CLASS (clutter_shader_parent_class); - object = parent_class->constructor (type, n_params, params); - - /* add this instance to the global list of shaders */ - clutter_shaders_list = g_list_prepend (clutter_shaders_list, object); - - return object; -} - -static void -clutter_shader_class_init (ClutterShaderClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - GParamSpec *pspec = NULL; - - object_class->finalize = clutter_shader_finalize; - object_class->dispose = clutter_shader_dispose; - object_class->set_property = clutter_shader_set_property; - object_class->get_property = clutter_shader_get_property; - object_class->constructor = clutter_shader_constructor; - - g_type_class_add_private (klass, sizeof (ClutterShaderPrivate)); - - /** - * ClutterShader:vertex-source: - * - * GLSL source code for the vertex shader part of the shader - * program, if any - * - * Since: 0.6 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ - pspec = g_param_spec_string ("vertex-source", - P_("Vertex Source"), - P_("Source of vertex shader"), - NULL, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_VERTEX_SOURCE] = pspec; - g_object_class_install_property (object_class, PROP_VERTEX_SOURCE, pspec); - - /** - * ClutterShader:fragment-source: - * - * GLSL source code for the fragment shader part of the shader program. - * - * Since: 0.6 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ - pspec = g_param_spec_string ("fragment-source", - P_("Fragment Source"), - P_("Source of fragment shader"), - NULL, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_FRAGMENT_SOURCE] = pspec; - g_object_class_install_property (object_class, PROP_FRAGMENT_SOURCE, pspec); - - /** - * ClutterShader:compiled: - * - * Whether the shader is compiled and linked, ready for use - * in the GL context. - * - * Since: 0.8 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ - pspec = g_param_spec_boolean ("compiled", - P_("Compiled"), - P_("Whether the shader is compiled and linked"), - FALSE, - CLUTTER_PARAM_READABLE); - obj_props[PROP_COMPILED] = pspec; - g_object_class_install_property (object_class, PROP_COMPILED, pspec); - - /** - * ClutterShader:enabled: - * - * Whether the shader is currently used in the GL rendering pipeline. - * - * Since: 0.6 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ - pspec = g_param_spec_boolean ("enabled", - P_("Enabled"), - P_("Whether the shader is enabled"), - FALSE, - CLUTTER_PARAM_READWRITE); - obj_props[PROP_ENABLED] = pspec; - g_object_class_install_property (object_class, PROP_ENABLED, pspec); -} - -static void -clutter_shader_init (ClutterShader *self) -{ - ClutterShaderPrivate *priv; - - priv = self->priv = CLUTTER_SHADER_GET_PRIVATE (self); - - priv->compiled = FALSE; - - priv->vertex_source = NULL; - priv->fragment_source = NULL; - - priv->program = COGL_INVALID_HANDLE; - priv->vertex_shader = COGL_INVALID_HANDLE; - priv->fragment_shader = COGL_INVALID_HANDLE; -} - -/** - * clutter_shader_new: - * - * Create a new #ClutterShader instance. - * - * Return value: a new #ClutterShader. - * - * Since: 0.6 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ -ClutterShader * -clutter_shader_new (void) -{ - return g_object_new (CLUTTER_TYPE_SHADER, NULL); -} - -static inline void -clutter_shader_set_source (ClutterShader *shader, - ClutterShaderType shader_type, - const gchar *data, - gssize length) -{ - ClutterShaderPrivate *priv = shader->priv; - gboolean is_glsl = FALSE; - - if (length < 0) - length = strlen (data); - - g_object_freeze_notify (G_OBJECT (shader)); - - /* release shader if bound when changing the source, the shader will - * automatically be rebound on the next use. - */ - if (clutter_shader_is_compiled (shader)) - clutter_shader_release (shader); - - is_glsl = !g_str_has_prefix (data, "!!ARBfp"); - - CLUTTER_NOTE (SHADER, - "setting %s shader (GLSL:%s, len:%" G_GSSIZE_FORMAT ")", - shader_type == CLUTTER_VERTEX_SHADER ? "vertex" : "fragment", - is_glsl ? "yes" : "no", - length); - - switch (shader_type) - { - case CLUTTER_FRAGMENT_SHADER: - g_free (priv->fragment_source); - - priv->fragment_source = g_strndup (data, length); - priv->fragment_is_glsl = is_glsl; - g_object_notify_by_pspec (G_OBJECT (shader), obj_props[PROP_FRAGMENT_SOURCE]); - break; - - case CLUTTER_VERTEX_SHADER: - g_free (priv->vertex_source); - - priv->vertex_source = g_strndup (data, length); - priv->vertex_is_glsl = is_glsl; - g_object_notify_by_pspec (G_OBJECT (shader), obj_props[PROP_VERTEX_SOURCE]); - break; - } - - g_object_thaw_notify (G_OBJECT (shader)); -} - -/** - * clutter_shader_set_fragment_source: - * @shader: a #ClutterShader - * @data: GLSL source code. - * @length: length of source buffer (currently ignored) - * - * Sets the GLSL source code to be used by a #ClutterShader for the fragment - * program. - * - * Since: 0.6 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ -void -clutter_shader_set_fragment_source (ClutterShader *shader, - const gchar *data, - gssize length) -{ - g_return_if_fail (CLUTTER_IS_SHADER (shader)); - g_return_if_fail (data != NULL); - - clutter_shader_set_source (shader, CLUTTER_FRAGMENT_SHADER, data, length); -} - -/** - * clutter_shader_set_vertex_source: - * @shader: a #ClutterShader - * @data: GLSL source code. - * @length: length of source buffer (currently ignored) - * - * Sets the GLSL source code to be used by a #ClutterShader for the vertex - * program. - * - * Since: 0.6 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ -void -clutter_shader_set_vertex_source (ClutterShader *shader, - const gchar *data, - gssize length) -{ - g_return_if_fail (CLUTTER_IS_SHADER (shader)); - g_return_if_fail (data != NULL); - - clutter_shader_set_source (shader, CLUTTER_VERTEX_SHADER, data, length); -} - -static const gchar * -clutter_shader_get_source (ClutterShader *shader, - ClutterShaderType shader_type) -{ - switch (shader_type) - { - case CLUTTER_FRAGMENT_SHADER: - return shader->priv->fragment_source; - - case CLUTTER_VERTEX_SHADER: - return shader->priv->vertex_source; - } - - return NULL; -} - -static CoglHandle -clutter_shader_get_cogl_shader (ClutterShader *shader, - ClutterShaderType shader_type) -{ - switch (shader_type) - { - case CLUTTER_FRAGMENT_SHADER: - return shader->priv->fragment_shader; - - case CLUTTER_VERTEX_SHADER: - return shader->priv->vertex_shader; - } - - return COGL_INVALID_HANDLE; -} - -static gboolean -clutter_shader_glsl_bind (ClutterShader *self, - ClutterShaderType shader_type, - GError **error) -{ - ClutterShaderPrivate *priv = self->priv; - CoglHandle shader = COGL_INVALID_HANDLE; - - switch (shader_type) - { - case CLUTTER_VERTEX_SHADER: - shader = cogl_create_shader (COGL_SHADER_TYPE_VERTEX); - cogl_shader_source (shader, priv->vertex_source); - - priv->vertex_shader = shader; - break; - - case CLUTTER_FRAGMENT_SHADER: - shader = cogl_create_shader (COGL_SHADER_TYPE_FRAGMENT); - cogl_shader_source (shader, priv->fragment_source); - - priv->fragment_shader = shader; - break; - } - - g_assert (shader != COGL_INVALID_HANDLE); - - cogl_shader_compile (shader); - if (!cogl_shader_is_compiled (shader)) - { - gchar *log_buf; - - log_buf = cogl_shader_get_info_log (shader); - - /* translators: the first %s is the type of the shader, either - * Vertex shader or Fragment shader; the second %s is the actual - * error as reported by COGL - */ - g_set_error (error, CLUTTER_SHADER_ERROR, - CLUTTER_SHADER_ERROR_COMPILE, - _("%s compilation failed: %s"), - shader_type == CLUTTER_VERTEX_SHADER ? _("Vertex shader") - : _("Fragment shader"), - log_buf); - - g_free (log_buf); - - return FALSE; - } - - cogl_program_attach_shader (priv->program, shader); - - return TRUE; -} - -static gboolean -bind_glsl_shader (ClutterShader *self, - GError **error) -{ - ClutterShaderPrivate *priv = self->priv; - GError *bind_error = NULL; - gboolean res; - - priv->program = cogl_create_program (); - - if (priv->vertex_is_glsl && priv->vertex_source != COGL_INVALID_HANDLE) - { - res = clutter_shader_glsl_bind (self, - CLUTTER_VERTEX_SHADER, - &bind_error); - - if (!res) - { - g_propagate_error (error, bind_error); - return FALSE; - } - } - - if (priv->fragment_is_glsl && priv->fragment_source != COGL_INVALID_HANDLE) - { - res = clutter_shader_glsl_bind (self, - CLUTTER_FRAGMENT_SHADER, - &bind_error); - - if (!res) - { - g_propagate_error (error, bind_error); - return FALSE; - } - } - - cogl_program_link (priv->program); - - return TRUE; -} - -/** - * clutter_shader_compile: - * @shader: a #ClutterShader - * @error: return location for a #GError, or %NULL - * - * Compiles and links GLSL sources set for vertex and fragment shaders for - * a #ClutterShader. If the compilation fails and a #GError return location is - * provided the error will contain the errors from the compiler, if any. - * - * Return value: returns TRUE if the shader was succesfully compiled. - * - * Since: 0.8 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ -gboolean -clutter_shader_compile (ClutterShader *shader, - GError **error) -{ - ClutterShaderPrivate *priv; - - g_return_val_if_fail (CLUTTER_IS_SHADER (shader), FALSE); - - priv = shader->priv; - - if (priv->compiled) - return priv->compiled; - - if ((priv->vertex_source != COGL_INVALID_HANDLE && !priv->vertex_is_glsl) || - (priv->fragment_source != COGL_INVALID_HANDLE && !priv->fragment_is_glsl)) - { - /* XXX: Could remove this check, since we only advertise support for GLSL - * shaders anyways. */ - g_set_error (error, CLUTTER_SHADER_ERROR, - CLUTTER_SHADER_ERROR_NO_ASM, - "ASM shaders not supported"); - priv->compiled = FALSE; - return priv->compiled; - } - - if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL)) - { - g_set_error (error, CLUTTER_SHADER_ERROR, - CLUTTER_SHADER_ERROR_NO_GLSL, - "GLSL shaders not supported"); - priv->compiled = FALSE; - return priv->compiled; - } - - priv->compiled = bind_glsl_shader (shader, error); - g_object_notify_by_pspec (G_OBJECT (shader), obj_props[PROP_COMPILED]); - - return priv->compiled; -} - -/** - * clutter_shader_release: - * @shader: a #ClutterShader - * - * Frees up any GL context resources held by the shader. - * - * Since: 0.6 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ -void -clutter_shader_release (ClutterShader *shader) -{ - g_return_if_fail (CLUTTER_IS_SHADER (shader)); - - clutter_shader_release_internal (shader); - - g_object_notify_by_pspec (G_OBJECT (shader), obj_props[PROP_COMPILED]); -} - -/** - * clutter_shader_is_compiled: - * @shader: a #ClutterShader - * - * Checks whether @shader is is currently compiled, linked and bound - * to the GL context. - * - * Return value: %TRUE if the shader is compiled, linked and ready for use. - * - * Since: 0.8 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ -gboolean -clutter_shader_is_compiled (ClutterShader *shader) -{ - g_return_val_if_fail (CLUTTER_IS_SHADER (shader), FALSE); - - return shader->priv->compiled; -} - -/** - * clutter_shader_set_is_enabled: - * @shader: a #ClutterShader - * @enabled: The new state of the shader. - * - * Enables a shader. This function will attempt to compile and link - * the shader, if it isn't already. - * - * When @enabled is %FALSE the default state of the GL pipeline will be - * used instead. - * - * Since: 0.6 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ -void -clutter_shader_set_is_enabled (ClutterShader *shader, - gboolean enabled) -{ - ClutterShaderPrivate *priv; - - g_return_if_fail (CLUTTER_IS_SHADER (shader)); - - priv = shader->priv; - - if (priv->is_enabled != enabled) - { - GError *error = NULL; - gboolean res; - - res = clutter_shader_compile (shader, &error); - if (!res) - { - g_warning ("Unable to bind the shader: %s", - error ? error->message : "unknown error"); - if (error) - g_error_free (error); - - return; - } - - priv->is_enabled = enabled; - - if (priv->is_enabled) - cogl_program_use (priv->program); - else - cogl_program_use (COGL_INVALID_HANDLE); - - g_object_notify_by_pspec (G_OBJECT (shader), obj_props[PROP_ENABLED]); - } -} - -/** - * clutter_shader_get_is_enabled: - * @shader: a #ClutterShader - * - * Checks whether @shader is enabled. - * - * Return value: %TRUE if the shader is enabled. - * - * Since: 0.6 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ -gboolean -clutter_shader_get_is_enabled (ClutterShader *shader) -{ - g_return_val_if_fail (CLUTTER_IS_SHADER (shader), FALSE); - - return shader->priv->is_enabled; -} - -/** - * clutter_shader_set_uniform: - * @shader: a #ClutterShader. - * @name: name of uniform in GLSL shader program to set. - * @value: a #ClutterShaderFloat, #ClutterShaderInt or #ClutterShaderMatrix - * #GValue. - * - * Sets a user configurable variable in the GLSL shader programs attached to - * a #ClutterShader. - * - * Since: 1.0 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ -void -clutter_shader_set_uniform (ClutterShader *shader, - const gchar *name, - const GValue *value) -{ - ClutterShaderPrivate *priv; - GLint location = 0; - gsize size; - - g_return_if_fail (CLUTTER_IS_SHADER (shader)); - g_return_if_fail (name != NULL); - g_return_if_fail (value != NULL); - g_return_if_fail (CLUTTER_VALUE_HOLDS_SHADER_FLOAT (value) || - CLUTTER_VALUE_HOLDS_SHADER_INT (value) || - CLUTTER_VALUE_HOLDS_SHADER_MATRIX (value) || - G_VALUE_HOLDS_FLOAT (value) || - G_VALUE_HOLDS_INT (value)); - - priv = shader->priv; - g_return_if_fail (priv->program != COGL_INVALID_HANDLE); - - location = cogl_program_get_uniform_location (priv->program, name); - - if (CLUTTER_VALUE_HOLDS_SHADER_FLOAT (value)) - { - const GLfloat *floats; - - floats = clutter_value_get_shader_float (value, &size); - cogl_program_set_uniform_float (priv->program, - location, size, 1, floats); - } - else if (CLUTTER_VALUE_HOLDS_SHADER_INT (value)) - { - const int *ints; - - ints = clutter_value_get_shader_int (value, &size); - cogl_program_set_uniform_int (priv->program, - location, size, 1, ints); - } - else if (CLUTTER_VALUE_HOLDS_SHADER_MATRIX (value)) - { - const GLfloat *matrix; - - matrix = clutter_value_get_shader_matrix (value, &size); - cogl_program_set_uniform_matrix (priv->program, - location, size, 1, FALSE, matrix); - } - else if (G_VALUE_HOLDS_FLOAT (value)) - { - GLfloat float_val = g_value_get_float (value); - - cogl_program_set_uniform_float (priv->program, - location, 1, 1, &float_val); - } - else if (G_VALUE_HOLDS_INT (value)) - { - int int_val = g_value_get_int (value); - - cogl_program_set_uniform_int (priv->program, - location, 1, 1, &int_val); - } - else - g_assert_not_reached (); -} - -/* - * _clutter_shader_release_all: - * - * Iterate through all #ClutterShaders and tell them to release GL context - * related sources. - */ -void -_clutter_shader_release_all (void) -{ - g_list_foreach (clutter_shaders_list, - (GFunc) clutter_shader_release, - NULL); -} - -/** - * clutter_shader_get_fragment_source: - * @shader: a #ClutterShader - * - * Query the current GLSL fragment source set on @shader. - * - * Return value: the source of the fragment shader for this - * ClutterShader object or %NULL. The returned string is owned by the - * shader object and should never be modified or freed - * - * Since: 0.6 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ -const gchar * -clutter_shader_get_fragment_source (ClutterShader *shader) -{ - g_return_val_if_fail (CLUTTER_IS_SHADER (shader), NULL); - - return clutter_shader_get_source (shader, CLUTTER_FRAGMENT_SHADER); -} - -/** - * clutter_shader_get_vertex_source: - * @shader: a #ClutterShader - * - * Query the current GLSL vertex source set on @shader. - * - * Return value: the source of the vertex shader for this - * ClutterShader object or %NULL. The returned string is owned by the - * shader object and should never be modified or freed - * - * Since: 0.6 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ -const gchar * -clutter_shader_get_vertex_source (ClutterShader *shader) -{ - g_return_val_if_fail (CLUTTER_IS_SHADER (shader), NULL); - - return clutter_shader_get_source (shader, CLUTTER_VERTEX_SHADER); -} - -/** - * clutter_shader_get_cogl_program: - * @shader: a #ClutterShader - * - * Retrieves the underlying #CoglHandle for the shader program. - * - * Return value: (transfer none): A #CoglHandle for the shader program, - * or %NULL. The handle is owned by the #ClutterShader and it should - * not be unreferenced - * - * Since: 1.0 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ -CoglHandle -clutter_shader_get_cogl_program (ClutterShader *shader) -{ - g_return_val_if_fail (CLUTTER_IS_SHADER (shader), NULL); - - return shader->priv->program; -} - -/** - * clutter_shader_get_cogl_fragment_shader: - * @shader: a #ClutterShader - * - * Retrieves the underlying #CoglHandle for the fragment shader. - * - * Return value: (transfer none): A #CoglHandle for the fragment - * shader, or %NULL. The handle is owned by the #ClutterShader - * and it should not be unreferenced - * - * Since: 1.0 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ -CoglHandle -clutter_shader_get_cogl_fragment_shader (ClutterShader *shader) -{ - g_return_val_if_fail (CLUTTER_IS_SHADER (shader), NULL); - - return clutter_shader_get_cogl_shader (shader, CLUTTER_FRAGMENT_SHADER); -} - -/** - * clutter_shader_get_cogl_vertex_shader: - * @shader: a #ClutterShader - * - * Retrieves the underlying #CoglHandle for the vertex shader. - * - * Return value: (transfer none): A #CoglHandle for the vertex - * shader, or %NULL. The handle is owned by the #ClutterShader - * and it should not be unreferenced - * - * Since: 1.0 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead. - */ -CoglHandle -clutter_shader_get_cogl_vertex_shader (ClutterShader *shader) -{ - g_return_val_if_fail (CLUTTER_IS_SHADER (shader), NULL); - - return clutter_shader_get_cogl_shader (shader, CLUTTER_VERTEX_SHADER); -} - -GQuark -clutter_shader_error_quark (void) -{ - return g_quark_from_static_string ("clutter-shader-error"); -} diff --git a/clutter/clutter-shader.h b/clutter/clutter-shader.h deleted file mode 100644 index 2604fe55e..000000000 --- a/clutter/clutter-shader.h +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * Øyvind KolÃ¥s <pippin@o-hand.com> - * - * Copyright (C) 2007 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) -#error "Only <clutter/clutter.h> can be included directly." -#endif - -#ifndef __CLUTTER_SHADER_H__ -#define __CLUTTER_SHADER_H__ - -#include <clutter/clutter-types.h> -#include <clutter/clutter-shader-types.h> - -G_BEGIN_DECLS - -#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION) - -#define CLUTTER_TYPE_SHADER (clutter_shader_get_type ()) -#define CLUTTER_SHADER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CLUTTER_TYPE_SHADER, ClutterShader)) -#define CLUTTER_SHADER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), CLUTTER_TYPE_SHADER, ClutterShaderClass)) -#define CLUTTER_IS_SHADER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CLUTTER_TYPE_SHADER)) -#define CLUTTER_IS_SHADER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CLUTTER_TYPE_SHADER)) -#define CLUTTER_SHADER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CLUTTER_TYPE_SHADER, ClutterShaderClass)) - -/** - * CLUTTER_SHADER_ERROR: - * - * Error domain for #ClutterShader errors - * - * Since: 0.6 - * - * Deprecated: 1.8 - */ -#define CLUTTER_SHADER_ERROR (clutter_shader_error_quark ()) - -/** - * ClutterShaderError: - * @CLUTTER_SHADER_ERROR_NO_ASM: No ASM shaders support - * @CLUTTER_SHADER_ERROR_NO_GLSL: No GLSL shaders support - * @CLUTTER_SHADER_ERROR_COMPILE: Compilation error - * - * #ClutterShader error enumeration - * - * Since: 0.6 - * - * Deprecated: 1.8 - */ -typedef enum { - CLUTTER_SHADER_ERROR_NO_ASM, - CLUTTER_SHADER_ERROR_NO_GLSL, - CLUTTER_SHADER_ERROR_COMPILE -} ClutterShaderError; - -typedef struct _ClutterShaderPrivate ClutterShaderPrivate; -typedef struct _ClutterShaderClass ClutterShaderClass; - -/** - * ClutterShader: - * - * The #ClutterShader structure contains only private data - * and should be accessed using the provided API - * - * Since: 0.6 - * - * Deprecated: 1.8: Use #ClutterShaderEffect instead - */ -struct _ClutterShader -{ - /*< private >*/ - GObject parent; - ClutterShaderPrivate *priv; -}; - -/** - * ClutterShaderClass: - * - * The #ClutterShaderClass structure contains only private data - * - * Since: 0.6 - * - * Deprecated: 1.8: Use #ClutterShaderEffectClass instead - */ -struct _ClutterShaderClass -{ - /*< private >*/ - GObjectClass parent_class; -}; - -GQuark clutter_shader_error_quark (void); -GType clutter_shader_get_type (void) G_GNUC_CONST; - -ClutterShader * clutter_shader_new (void); - -void clutter_shader_set_is_enabled (ClutterShader *shader, - gboolean enabled); -gboolean clutter_shader_get_is_enabled (ClutterShader *shader); - -gboolean clutter_shader_compile (ClutterShader *shader, - GError **error); -void clutter_shader_release (ClutterShader *shader); -gboolean clutter_shader_is_compiled (ClutterShader *shader); - -void clutter_shader_set_vertex_source (ClutterShader *shader, - const gchar *data, - gssize length); -void clutter_shader_set_fragment_source (ClutterShader *shader, - const gchar *data, - gssize length); - -const gchar * clutter_shader_get_vertex_source (ClutterShader *shader); -const gchar * clutter_shader_get_fragment_source (ClutterShader *shader); - -void clutter_shader_set_uniform (ClutterShader *shader, - const gchar *name, - const GValue *value); - -CoglHandle clutter_shader_get_cogl_program (ClutterShader *shader); -CoglHandle clutter_shader_get_cogl_fragment_shader (ClutterShader *shader); -CoglHandle clutter_shader_get_cogl_vertex_shader (ClutterShader *shader); - -/* private */ -void _clutter_shader_release_all (void); - -#endif /* CLUTTER_DISABLE_DEPRECATED */ - -G_END_DECLS - -#endif /* __CLUTTER_SHADER_H__ */ diff --git a/clutter/clutter-stage-manager.c b/clutter/clutter-stage-manager.c index e5c3133f1..40eddda8a 100644 --- a/clutter/clutter-stage-manager.c +++ b/clutter/clutter-stage-manager.c @@ -186,23 +186,6 @@ clutter_stage_manager_get_default (void) return stage_manager; } -/** - * clutter_stage_manager_set_default_stage: - * @stage_manager: a #ClutterStageManager - * @stage: a #ClutterStage - * - * Sets @stage as the default stage. - * - * Since: 0.8 - * - * Deprecated: 1.2: Calling this function has no effect - */ -void -clutter_stage_manager_set_default_stage (ClutterStageManager *stage_manager, - ClutterStage *stage) -{ -} - /* * _clutter_stage_manager_set_default_stage: * @stage_manager: a #ClutterStageManager diff --git a/clutter/clutter-stage-manager.h b/clutter/clutter-stage-manager.h index 6cb9c5171..2f7f73168 100644 --- a/clutter/clutter-stage-manager.h +++ b/clutter/clutter-stage-manager.h @@ -77,11 +77,6 @@ ClutterStage * clutter_stage_manager_get_default_stage (ClutterStageManage GSList * clutter_stage_manager_list_stages (ClutterStageManager *stage_manager); const GSList * clutter_stage_manager_peek_stages (ClutterStageManager *stage_manager); -#ifndef CLUTTER_DISABLE_DEPRECATED -void clutter_stage_manager_set_default_stage (ClutterStageManager *stage_manager, - ClutterStage *stage); -#endif - G_END_DECLS #endif /* __CLUTTER_STAGE_MANAGER_H__ */ diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index ae04fc740..a032e5cc4 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -75,7 +75,6 @@ #include "clutter-profile.h" #include "clutter-stage-manager-private.h" #include "clutter-stage-private.h" -#include "clutter-util.h" #include "clutter-version.h" /* For flavour */ #include "clutter-private.h" diff --git a/clutter/clutter-stage.h b/clutter/clutter-stage.h index 3098c79f1..8605e83d7 100644 --- a/clutter/clutter-stage.h +++ b/clutter/clutter-stage.h @@ -45,32 +45,6 @@ G_BEGIN_DECLS #define CLUTTER_IS_STAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_STAGE)) #define CLUTTER_STAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_STAGE, ClutterStageClass)) -#ifndef CLUTTER_DISABLE_DEPRECATED - -/** - * CLUTTER_STAGE_WIDTH: - * - * Macro that evaluates to the width of the default stage - * - * Since: 0.2 - * - * Deprecated: 1.2: Use clutter_actor_get_width() instead - */ -#define CLUTTER_STAGE_WIDTH() (clutter_actor_get_width (clutter_stage_get_default ())) - -/** - * CLUTTER_STAGE_HEIGHT: - * - * Macro that evaluates to the height of the default stage - * - * Since: 0.2 - * - * Deprecated: 1.2: use clutter_actor_get_height() instead - */ -#define CLUTTER_STAGE_HEIGHT() (clutter_actor_get_height (clutter_stage_get_default ())) - -#endif /* !CLUTTER_DISABLE_DEPRECATED */ - /** * ClutterPickMode: * @CLUTTER_PICK_NONE: Do not paint any actor @@ -262,15 +236,6 @@ void clutter_stage_set_accept_focus (ClutterStage *stage, gboolean accept_focus); gboolean clutter_stage_get_accept_focus (ClutterStage *stage); -/* Commodity macro, for mallum only */ -#define clutter_stage_add(stage,actor) G_STMT_START { \ - if (CLUTTER_IS_STAGE ((stage)) && CLUTTER_IS_ACTOR ((actor))) \ - { \ - ClutterContainer *_container = (ClutterContainer *) (stage); \ - ClutterActor *_actor = (ClutterActor *) (actor); \ - clutter_container_add_actor (_container, _actor); \ - } } G_STMT_END - G_END_DECLS #endif /* __CLUTTER_STAGE_H__ */ diff --git a/clutter/clutter-texture.c b/clutter/clutter-texture.c index b21fa0626..167a463dd 100644 --- a/clutter/clutter-texture.c +++ b/clutter/clutter-texture.c @@ -54,9 +54,7 @@ #include "clutter-marshal.h" #include "clutter-private.h" #include "clutter-scriptable.h" -#include "clutter-shader.h" #include "clutter-stage-private.h" -#include "clutter-util.h" static void clutter_scriptable_iface_init (ClutterScriptableIface *iface); @@ -476,22 +474,10 @@ update_fbo (ClutterActor *self) { ClutterTexture *texture = CLUTTER_TEXTURE (self); ClutterTexturePrivate *priv = texture->priv; - ClutterActor *head; - ClutterShader *shader = NULL; ClutterActor *stage = NULL; CoglMatrix projection; CoglColor transparent_col; - head = _clutter_context_peek_shader_stack (); - if (head != NULL) - shader = clutter_actor_get_shader (head); - - /* Temporarily turn off the shader on the top of the context's - * shader stack, to restore the GL pipeline to it's natural state. - */ - if (shader != NULL) - clutter_shader_set_is_enabled (shader, FALSE); - /* Redirect drawing to the fbo */ cogl_push_framebuffer (priv->fbo_handle); @@ -559,10 +545,6 @@ update_fbo (ClutterActor *self) /* Restore drawing to the previous framebuffer */ cogl_pop_framebuffer (); - - /* If there is a shader on top of the shader stack, turn it back on. */ - if (shader != NULL) - clutter_shader_set_is_enabled (shader, TRUE); } static void diff --git a/clutter/clutter-timeout-interval.c b/clutter/clutter-timeout-interval.c deleted file mode 100644 index ac0ad44d1..000000000 --- a/clutter/clutter-timeout-interval.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Neil Roberts <neil@linux.intel.com> - * - * Copyright (C) 2009 Intel Corporation. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -/* This file contains the common code to check whether an interval has - expired used in clutter-frame-source and clutter-timeout-pool. */ - -#include "clutter-timeout-interval.h" - -void -_clutter_timeout_interval_init (ClutterTimeoutInterval *interval, - guint fps) -{ -#if GLIB_CHECK_VERSION (2, 27, 3) - interval->start_time = g_get_monotonic_time () / 1000; -#else - { - GTimeVal start_time; - g_get_current_time (&start_time); - interval->start_time = start_time.tv_sec * 1000 - + start_time.tv_usec / 1000; - } -#endif - - interval->fps = fps; - interval->frame_count = 0; -} - -static gint64 -_clutter_timeout_interval_get_ticks (gint64 current_time, - ClutterTimeoutInterval *interval) -{ - return MAX (current_time - interval->start_time, 0); -} - -gboolean -_clutter_timeout_interval_prepare (gint64 current_time, - ClutterTimeoutInterval *interval, - gint *delay) -{ - gint elapsed_time, new_frame_num; - - elapsed_time = _clutter_timeout_interval_get_ticks (current_time, interval); - new_frame_num = elapsed_time * interval->fps / 1000; - - /* If time has gone backwards or the time since the last frame is - greater than the two frames worth then reset the time and do a - frame now */ - if (new_frame_num < interval->frame_count || - new_frame_num - interval->frame_count > 2) - { - /* Get the frame time rounded up to the nearest ms */ - guint frame_time = (1000 + interval->fps - 1) / interval->fps; - - /* Reset the start time */ - interval->start_time = current_time; - - /* Move the start time as if one whole frame has elapsed */ - interval->start_time -= frame_time; - - interval->frame_count = 0; - - if (delay) - *delay = 0; - - return TRUE; - } - else if (new_frame_num > interval->frame_count) - { - if (delay) - *delay = 0; - - return TRUE; - } - else - { - if (delay) - *delay = ((interval->frame_count + 1) * 1000 / interval->fps - - elapsed_time); - - return FALSE; - } -} - -gboolean -_clutter_timeout_interval_dispatch (ClutterTimeoutInterval *interval, - GSourceFunc callback, - gpointer user_data) -{ - if ((* callback) (user_data)) - { - interval->frame_count++; - - return TRUE; - } - - return FALSE; -} - -gint -_clutter_timeout_interval_compare_expiration (const ClutterTimeoutInterval *a, - const ClutterTimeoutInterval *b) -{ - guint a_delay = 1000 / a->fps; - guint b_delay = 1000 / b->fps; - gint64 b_difference; - gint comparison; - - b_difference = a->start_time - b->start_time; - - comparison = ((gint) ((a->frame_count + 1) * a_delay) - - (gint) ((b->frame_count + 1) * b_delay + b_difference)); - - return (comparison < 0 ? -1 - : comparison > 0 ? 1 - : 0); -} diff --git a/clutter/clutter-timeout-interval.h b/clutter/clutter-timeout-interval.h deleted file mode 100644 index 57df959a8..000000000 --- a/clutter/clutter-timeout-interval.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Neil Roberts <neil@linux.intel.com> - * - * Copyright (C) 2009 Intel Corporation. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef __CLUTTER_TIMEOUT_INTERVAL_H__ -#define __CLUTTER_TIMEOUT_INTERVAL_H__ - -#include <glib.h> - -G_BEGIN_DECLS - -typedef struct _ClutterTimeoutInterval ClutterTimeoutInterval; - -struct _ClutterTimeoutInterval -{ - /* milliseconds */ - gint64 start_time; - - guint frame_count; - guint fps; -}; - -void _clutter_timeout_interval_init (ClutterTimeoutInterval *interval, - guint fps); - -gboolean _clutter_timeout_interval_prepare (gint64 current_time, - ClutterTimeoutInterval *interval, - gint *delay); - -gboolean _clutter_timeout_interval_dispatch (ClutterTimeoutInterval *interval, - GSourceFunc callback, - gpointer user_data); - -gint _clutter_timeout_interval_compare_expiration (const ClutterTimeoutInterval *a, - const ClutterTimeoutInterval *b); - -G_END_DECLS - -#endif /* __CLUTTER_TIMEOUT_INTERVAL_H__ */ diff --git a/clutter/clutter-timeout-pool.c b/clutter/clutter-timeout-pool.c deleted file mode 100644 index 6ef839b8e..000000000 --- a/clutter/clutter-timeout-pool.c +++ /dev/null @@ -1,497 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * - * Copyright (C) 2006 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - * - * - * ClutterTimeoutPool: pool of timeout functions using the same slice of - * the GLib main loop - * - * Author: Emmanuele Bassi <ebassi@openedhand.com> - * - * Based on similar code by Tristan van Berkom - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "clutter-timeout-pool.h" - -#include "clutter-debug.h" -#include "clutter-timeout-interval.h" - -typedef struct _ClutterTimeout ClutterTimeout; -typedef enum { - CLUTTER_TIMEOUT_NONE = 0, - CLUTTER_TIMEOUT_READY = 1 << 1 -} ClutterTimeoutFlags; - -struct _ClutterTimeout -{ - guint id; - ClutterTimeoutFlags flags; - gint refcount; - - ClutterTimeoutInterval interval; - - GSourceFunc func; - gpointer data; - GDestroyNotify notify; -}; - -struct _ClutterTimeoutPool -{ - GSource source; - - guint next_id; - - GList *timeouts; - GList *dispatched_timeouts; - - gint ready; - - guint id; -}; - -#define TIMEOUT_READY(timeout) (timeout->flags & CLUTTER_TIMEOUT_READY) - -static gboolean clutter_timeout_pool_prepare (GSource *source, - gint *next_timeout); -static gboolean clutter_timeout_pool_check (GSource *source); -static gboolean clutter_timeout_pool_dispatch (GSource *source, - GSourceFunc callback, - gpointer data); -static void clutter_timeout_pool_finalize (GSource *source); - -static GSourceFuncs clutter_timeout_pool_funcs = -{ - clutter_timeout_pool_prepare, - clutter_timeout_pool_check, - clutter_timeout_pool_dispatch, - clutter_timeout_pool_finalize -}; - -static gint -clutter_timeout_sort (gconstpointer a, - gconstpointer b) -{ - const ClutterTimeout *t_a = a; - const ClutterTimeout *t_b = b; - - /* Keep 'ready' timeouts at the front */ - if (TIMEOUT_READY (t_a)) - return -1; - - if (TIMEOUT_READY (t_b)) - return 1; - - return _clutter_timeout_interval_compare_expiration (&t_a->interval, - &t_b->interval); -} - -static gint -clutter_timeout_find_by_id (gconstpointer a, - gconstpointer b) -{ - const ClutterTimeout *t_a = a; - - return t_a->id == GPOINTER_TO_UINT (b) ? 0 : 1; -} - -static ClutterTimeout * -clutter_timeout_new (guint fps) -{ - ClutterTimeout *timeout; - - timeout = g_slice_new0 (ClutterTimeout); - _clutter_timeout_interval_init (&timeout->interval, fps); - timeout->flags = CLUTTER_TIMEOUT_NONE; - timeout->refcount = 1; - - return timeout; -} - -static gboolean -clutter_timeout_prepare (ClutterTimeoutPool *pool, - ClutterTimeout *timeout, - gint *next_timeout) -{ - GSource *source = (GSource *) pool; - gint64 now; - -#if GLIB_CHECK_VERSION (2, 27, 3) - now = g_source_get_time (source) / 1000; -#else - { - GTimeVal source_time; - g_source_get_current_time (source, &source_time); - now = source_time.tv_sec * 1000 + source_time.tv_usec / 1000; - } -#endif - - return _clutter_timeout_interval_prepare (now, - &timeout->interval, - next_timeout); -} - -/* ref and unref are always called under the main Clutter lock, so there - * is not need for us to use g_atomic_int_* API. - */ - -static ClutterTimeout * -clutter_timeout_ref (ClutterTimeout *timeout) -{ - g_return_val_if_fail (timeout != NULL, timeout); - g_return_val_if_fail (timeout->refcount > 0, timeout); - - timeout->refcount += 1; - - return timeout; -} - -static void -clutter_timeout_unref (ClutterTimeout *timeout) -{ - g_return_if_fail (timeout != NULL); - g_return_if_fail (timeout->refcount > 0); - - timeout->refcount -= 1; - - if (timeout->refcount == 0) - { - if (timeout->notify) - timeout->notify (timeout->data); - - g_slice_free (ClutterTimeout, timeout); - } -} - -static void -clutter_timeout_free (ClutterTimeout *timeout) -{ - if (G_LIKELY (timeout)) - { - if (timeout->notify) - timeout->notify (timeout->data); - - g_slice_free (ClutterTimeout, timeout); - } -} - -static gboolean -clutter_timeout_pool_prepare (GSource *source, - gint *next_timeout) -{ - ClutterTimeoutPool *pool = (ClutterTimeoutPool *) source; - GList *l = pool->timeouts; - - /* the pool is ready if the first timeout is ready */ - if (l && l->data) - { - ClutterTimeout *timeout = l->data; - return clutter_timeout_prepare (pool, timeout, next_timeout); - } - else - { - *next_timeout = -1; - return FALSE; - } -} - -static gboolean -clutter_timeout_pool_check (GSource *source) -{ - ClutterTimeoutPool *pool = (ClutterTimeoutPool *) source; - GList *l; - - clutter_threads_enter (); - - for (l = pool->timeouts; l; l = l->next) - { - ClutterTimeout *timeout = l->data; - - /* since the timeouts are sorted by expiration, as soon - * as we get a check returning FALSE we know that the - * following timeouts are not expiring, so we break as - * soon as possible - */ - if (clutter_timeout_prepare (pool, timeout, NULL)) - { - timeout->flags |= CLUTTER_TIMEOUT_READY; - pool->ready += 1; - } - else - break; - } - - clutter_threads_leave (); - - return (pool->ready > 0); -} - -static gboolean -clutter_timeout_pool_dispatch (GSource *source, - GSourceFunc func, - gpointer data) -{ - ClutterTimeoutPool *pool = (ClutterTimeoutPool *) source; - GList *dispatched_timeouts; - - /* the main loop might have predicted this, so we repeat the - * check for ready timeouts. - */ - if (!pool->ready) - clutter_timeout_pool_check (source); - - clutter_threads_enter (); - - /* Iterate by moving the actual start of the list along so that it - * can cope with adds and removes while a timeout is being dispatched - */ - while (pool->timeouts && pool->timeouts->data && pool->ready-- > 0) - { - ClutterTimeout *timeout = pool->timeouts->data; - GList *l; - - /* One of the ready timeouts may have been removed during dispatch, - * in which case pool->ready will be wrong, but the ready timeouts - * are always kept at the start of the list so we can stop once - * we've reached the first non-ready timeout - */ - if (!(TIMEOUT_READY (timeout))) - break; - - /* Add a reference to the timeout so it can't disappear - * while it's being dispatched - */ - clutter_timeout_ref (timeout); - - timeout->flags &= ~CLUTTER_TIMEOUT_READY; - - /* Move the list node to a list of dispatched timeouts */ - l = pool->timeouts; - if (l->next) - l->next->prev = NULL; - - pool->timeouts = l->next; - - if (pool->dispatched_timeouts) - pool->dispatched_timeouts->prev = l; - - l->prev = NULL; - l->next = pool->dispatched_timeouts; - pool->dispatched_timeouts = l; - - if (!_clutter_timeout_interval_dispatch (&timeout->interval, - timeout->func, timeout->data)) - { - /* The timeout may have already been removed, but nothing - * can be added to the dispatched_timeout list except in this - * function so it will always either be at the head of the - * dispatched list or have been removed - */ - if (pool->dispatched_timeouts && - pool->dispatched_timeouts->data == timeout) - { - pool->dispatched_timeouts = - g_list_delete_link (pool->dispatched_timeouts, - pool->dispatched_timeouts); - - /* Remove the reference that was held by it being in the list */ - clutter_timeout_unref (timeout); - } - } - - clutter_timeout_unref (timeout); - } - - /* Re-insert the dispatched timeouts in sorted order */ - dispatched_timeouts = pool->dispatched_timeouts; - while (dispatched_timeouts) - { - ClutterTimeout *timeout = dispatched_timeouts->data; - GList *next = dispatched_timeouts->next; - - if (timeout) - pool->timeouts = g_list_insert_sorted (pool->timeouts, timeout, - clutter_timeout_sort); - - dispatched_timeouts = next; - } - - g_list_free (pool->dispatched_timeouts); - pool->dispatched_timeouts = NULL; - - pool->ready = 0; - - clutter_threads_leave (); - - return TRUE; -} - -static void -clutter_timeout_pool_finalize (GSource *source) -{ - ClutterTimeoutPool *pool = (ClutterTimeoutPool *) source; - - /* force destruction */ - g_list_foreach (pool->timeouts, (GFunc) clutter_timeout_free, NULL); - g_list_free (pool->timeouts); -} - -/** - * clutter_timeout_pool_new: - * @priority: the priority of the timeout pool. Typically this will - * be #G_PRIORITY_DEFAULT - * - * Creates a new timeout pool source. A timeout pool should be used when - * multiple timeout functions, running at the same priority, are needed and - * the g_timeout_add() API might lead to starvation of the time slice of - * the main loop. A timeout pool allocates a single time slice of the main - * loop and runs every timeout function inside it. The timeout pool is - * always sorted, so that the extraction of the next timeout function is - * a constant time operation. - * - * Return value: the newly created #ClutterTimeoutPool. The created pool - * is owned by the GLib default context and will be automatically - * destroyed when the context is destroyed. It is possible to force - * the destruction of the timeout pool using g_source_destroy() - * - * Since: 0.4 - * - * Deprecated: 1.6 - */ -ClutterTimeoutPool * -clutter_timeout_pool_new (gint priority) -{ - ClutterTimeoutPool *pool; - GSource *source; - - source = g_source_new (&clutter_timeout_pool_funcs, - sizeof (ClutterTimeoutPool)); - if (!source) - return NULL; - - g_source_set_name (source, "Clutter timeout pool"); - - if (priority != G_PRIORITY_DEFAULT) - g_source_set_priority (source, priority); - - pool = (ClutterTimeoutPool *) source; - pool->next_id = 1; - pool->id = g_source_attach (source, NULL); - - /* let the default GLib context manage the pool */ - g_source_unref (source); - - return pool; -} - -/** - * clutter_timeout_pool_add: - * @pool: a #ClutterTimeoutPool - * @fps: the time between calls to the function, in frames per second - * @func: function to call - * @data: data to pass to the function, or %NULL - * @notify: function to call when the timeout is removed, or %NULL - * - * Sets a function to be called at regular intervals, and puts it inside - * the @pool. The function is repeatedly called until it returns %FALSE, - * at which point the timeout is automatically destroyed and the function - * won't be called again. If @notify is not %NULL, the @notify function - * will be called. The first call to @func will be at the end of @interval. - * - * Since Clutter 0.8 this will try to compensate for delays. For - * example, if @func takes half the interval time to execute then the - * function will be called again half the interval time after it - * finished. Before version 0.8 it would not fire until a full - * interval after the function completes so the delay between calls - * would be @interval * 1.5. This function does not however try to - * invoke the function multiple times to catch up missing frames if - * @func takes more than @interval ms to execute. - * - * Return value: the ID (greater than 0) of the timeout inside the pool. - * Use clutter_timeout_pool_remove() to stop the timeout. - * - * Since: 0.4 - * - * Deprecated: 1.6 - */ -guint -clutter_timeout_pool_add (ClutterTimeoutPool *pool, - guint fps, - GSourceFunc func, - gpointer data, - GDestroyNotify notify) -{ - ClutterTimeout *timeout; - guint retval = 0; - - timeout = clutter_timeout_new (fps); - - retval = timeout->id = pool->next_id++; - - timeout->func = func; - timeout->data = data; - timeout->notify = notify; - - pool->timeouts = g_list_insert_sorted (pool->timeouts, timeout, - clutter_timeout_sort); - - return retval; -} - -/** - * clutter_timeout_pool_remove: - * @pool: a #ClutterTimeoutPool - * @id_: the id of the timeout to remove - * - * Removes a timeout function with @id_ from the timeout pool. The id - * is the same returned when adding a function to the timeout pool with - * clutter_timeout_pool_add(). - * - * Since: 0.4 - * - * Deprecated: 1.6 - */ -void -clutter_timeout_pool_remove (ClutterTimeoutPool *pool, - guint id_) -{ - GList *l; - - if ((l = g_list_find_custom (pool->timeouts, GUINT_TO_POINTER (id_), - clutter_timeout_find_by_id))) - { - clutter_timeout_unref (l->data); - pool->timeouts = g_list_delete_link (pool->timeouts, l); - } - else if ((l = g_list_find_custom (pool->dispatched_timeouts, - GUINT_TO_POINTER (id_), - clutter_timeout_find_by_id))) - { - clutter_timeout_unref (l->data); - - pool->dispatched_timeouts = - g_list_delete_link (pool->dispatched_timeouts, l); - } -} diff --git a/clutter/clutter-timeout-pool.h b/clutter/clutter-timeout-pool.h deleted file mode 100644 index 0268ab833..000000000 --- a/clutter/clutter-timeout-pool.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * - * Copyright (C) 2006 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - * ClutterTimeoutPool: pool of timeout functions using the same slice of - * the GLib main loop - * - * Author: Emmanuele Bassi <ebassi@openedhand.com> - * - * Based on similar code by Tristan van Berkom - */ - -#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) -#error "Only <clutter/clutter.h> can be included directly." -#endif - -#ifndef __CLUTTER_TIMEOUT_POOL_H__ -#define __CLUTTER_TIMEOUT_POOL_H__ - -#include <glib.h> - -G_BEGIN_DECLS - -#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION) - -/** - * ClutterTimeoutPool: (skip) - * - * <structname>ClutterTimeoutPool</structname> is an opaque structure - * whose members cannot be directly accessed. - * - * Since: 0.6 - * - * Deprecated: 1.6 - */ -typedef struct _ClutterTimeoutPool ClutterTimeoutPool; - -ClutterTimeoutPool *clutter_timeout_pool_new (gint priority); -guint clutter_timeout_pool_add (ClutterTimeoutPool *pool, - guint fps, - GSourceFunc func, - gpointer data, - GDestroyNotify notify); -void clutter_timeout_pool_remove (ClutterTimeoutPool *pool, - guint id_); - -#endif /* CLUTTER_DISABLE_DEPRECATED */ - -G_END_DECLS - -#endif /* __CLUTTER_TIMEOUT_POOL_H__ */ diff --git a/clutter/clutter-types.h b/clutter/clutter-types.h index 59e689e55..a19a77b55 100644 --- a/clutter/clutter-types.h +++ b/clutter/clutter-types.h @@ -53,10 +53,6 @@ typedef struct _ClutterAction ClutterAction; typedef struct _ClutterConstraint ClutterConstraint; typedef struct _ClutterEffect ClutterEffect; -#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION) -typedef struct _ClutterShader ClutterShader; -#endif - typedef struct _ClutterColor ClutterColor; typedef union _ClutterEvent ClutterEvent; diff --git a/clutter/clutter-util.c b/clutter/clutter-util.c index 46e88d202..68354e2eb 100644 --- a/clutter/clutter-util.c +++ b/clutter/clutter-util.c @@ -23,43 +23,14 @@ * */ -/** - * SECTION:clutter-util - * @short_description: Utility functions - * - * Various miscellaneous utilility functions. - */ - #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <glib/gi18n-lib.h> -#include "clutter-util.h" #include "clutter-main.h" -/** - * clutter_util_next_p2: - * @a: Value to get the next power - * - * Calculates the nearest power of two, greater than or equal to @a. - * - * Return value: The nearest power of two, greater or equal to @a. - * - * Deprecated: 1.2 - */ -gint -clutter_util_next_p2 (gint a) -{ - int rval = 1; - - while (rval < a) - rval <<= 1; - - return rval; -} - /*< private > * _clutter_gettext: * @str: a string to localize diff --git a/clutter/clutter-util.h b/clutter/clutter-util.h deleted file mode 100644 index d1fe9f8f1..000000000 --- a/clutter/clutter-util.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Clutter. - * - * An OpenGL based 'interactive canvas' library. - * - * Authored By Matthew Allum <mallum@openedhand.com> - * - * Copyright (C) 2006 OpenedHand - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - */ - -#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) -#error "Only <clutter/clutter.h> can be included directly." -#endif - -#ifndef __CLUTTER_UTIL_H__ -#define __CLUTTER_UTIL_H__ - -#include <glib.h> - -G_BEGIN_DECLS - -#ifndef CLUTTER_DISABLE_DEPRECATED - -gint clutter_util_next_p2 (gint a) G_GNUC_DEPRECATED; - -#endif /* CLUTTER_DISABLE_DEPRECATED */ - -G_END_DECLS - -#endif /* __CLUTTER_UTIL_H__ */ diff --git a/clutter/clutter.h b/clutter/clutter.h index d64a9b722..071c59baa 100644 --- a/clutter/clutter.h +++ b/clutter/clutter.h @@ -28,8 +28,6 @@ #define __CLUTTER_H_INSIDE__ -#include "clutter-deprecated.h" - #include "clutter-config.h" #include "clutter-action.h" @@ -41,13 +39,6 @@ #include "clutter-animation.h" #include "clutter-animator.h" #include "clutter-backend.h" -#include "clutter-behaviour-depth.h" -#include "clutter-behaviour-ellipse.h" -#include "clutter-behaviour.h" -#include "clutter-behaviour-opacity.h" -#include "clutter-behaviour-path.h" -#include "clutter-behaviour-rotate.h" -#include "clutter-behaviour-scale.h" #include "clutter-bind-constraint.h" #include "clutter-binding-pool.h" #include "clutter-bin-layout.h" @@ -72,7 +63,6 @@ #include "clutter-feature.h" #include "clutter-fixed-layout.h" #include "clutter-flow-layout.h" -#include "clutter-frame-source.h" #include "clutter-gesture-action.h" #include "clutter-group.h" #include "clutter-input-device.h" @@ -93,7 +83,6 @@ #include "clutter-scriptable.h" #include "clutter-script.h" #include "clutter-settings.h" -#include "clutter-shader.h" #include "clutter-shader-effect.h" #include "clutter-shader-types.h" #include "clutter-swipe-action.h" @@ -106,10 +95,8 @@ #include "clutter-texture.h" #include "clutter-text.h" #include "clutter-timeline.h" -#include "clutter-timeout-pool.h" #include "clutter-types.h" #include "clutter-units.h" -#include "clutter-util.h" #include "clutter-version.h" #include "clutter-enum-types.h" diff --git a/clutter/cogl/clutter-stage-cogl.c b/clutter/cogl/clutter-stage-cogl.c index 1e3fe29ae..a4f021cec 100644 --- a/clutter/cogl/clutter-stage-cogl.c +++ b/clutter/cogl/clutter-stage-cogl.c @@ -41,7 +41,6 @@ #include "clutter-private.h" #include "clutter-actor-private.h" #include "clutter-stage-private.h" -#include "clutter-util.h" #ifdef COGL_HAS_X11_SUPPORT static ClutterStageWindowIface *clutter_stage_window_parent_iface = NULL; diff --git a/configure.ac b/configure.ac index 60295276e..aef84142d 100644 --- a/configure.ac +++ b/configure.ac @@ -9,8 +9,8 @@ # - increase clutter_micro_version to the next odd number # - increase clutter_interface_version to the next odd number m4_define([clutter_major_version], [1]) -m4_define([clutter_minor_version], [7]) -m4_define([clutter_micro_version], [3]) +m4_define([clutter_minor_version], [99]) +m4_define([clutter_micro_version], [1]) # • for stable releases: increase the interface age by 1 for each release; # if the API changes, set to 0. interface_age and binary_age are used to @@ -42,8 +42,9 @@ m4_define([clutter_release_status], m4_define([clutter_version], [clutter_major_version.clutter_minor_version.clutter_micro_version]) -# change this only when breaking the API -m4_define([clutter_api_version], [1.0]) +# change these only when breaking the API +m4_define([clutter_api_version], [2.0]) +m4_define([clutter_api_version_am], [2_0]) AC_PREREQ([2.63]) @@ -67,7 +68,7 @@ AC_SUBST([CLUTTER_MINOR_VERSION], [clutter_minor_version]) AC_SUBST([CLUTTER_MICRO_VERSION], [clutter_micro_version]) AC_SUBST([CLUTTER_VERSION], [clutter_version]) AC_SUBST([CLUTTER_API_VERSION], [clutter_api_version]) -AC_SUBST([CLUTTER_API_VERSION_AM], [$CLUTTER_MAJOR_VERSION\_0]) +AC_SUBST([CLUTTER_API_VERSION_AM], [clutter_api_version_am]) AC_SUBST([CLUTTER_RELEASE_STATUS], [clutter_release_status]) m4_define([lt_current], [m4_eval(100 * clutter_minor_version + clutter_micro_version - clutter_interface_age)]) @@ -914,7 +915,7 @@ dnl === I18N ================================================================== AM_GNU_GETTEXT_VERSION([0.17]) AM_GNU_GETTEXT([external]) -GETTEXT_PACKAGE="clutter-1.0" +GETTEXT_PACKAGE="clutter-2.0" AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], diff --git a/doc/reference/clutter/clutter-sections.txt b/doc/reference/clutter/clutter-sections.txt index 44fd85ddd..0167abae6 100644 --- a/doc/reference/clutter/clutter-sections.txt +++ b/doc/reference/clutter/clutter-sections.txt @@ -1570,64 +1570,6 @@ clutter_score_get_type </SECTION> <SECTION> -<FILE>clutter-shader</FILE> -<TITLE>Shaders</TITLE> -ClutterShaderError -ClutterShader -ClutterShaderClass -clutter_shader_new -clutter_shader_set_vertex_source -clutter_shader_get_vertex_source -clutter_shader_set_fragment_source -clutter_shader_get_fragment_source -clutter_shader_compile -clutter_shader_release -clutter_shader_is_compiled -clutter_shader_set_is_enabled -clutter_shader_get_is_enabled - -<SUBSECTION> -clutter_shader_set_uniform -clutter_shader_get_cogl_program -clutter_shader_get_cogl_fragment_shader -clutter_shader_get_cogl_vertex_shader - -<SUBSECTION> -CLUTTER_VALUE_HOLDS_SHADER_FLOAT -clutter_value_set_shader_float -clutter_value_get_shader_float -CLUTTER_VALUE_HOLDS_SHADER_INT -clutter_value_set_shader_int -clutter_value_get_shader_int -CLUTTER_VALUE_HOLDS_SHADER_MATRIX -clutter_value_set_shader_matrix -clutter_value_get_shader_matrix - -<SUBSECTION Standard> -CLUTTER_IS_SHADER -CLUTTER_IS_SHADER_CLASS -CLUTTER_SHADER -CLUTTER_SHADER_CLASS -CLUTTER_SHADER_ERROR -CLUTTER_SHADER_GET_CLASS -CLUTTER_TYPE_SHADER -CLUTTER_TYPE_SHADER_FLOAT -CLUTTER_TYPE_SHADER_INT -CLUTTER_TYPE_SHADER_MATRIX - -<SUBSECTION Private> -ClutterShaderPrivate -clutter_shader_get_type -ClutterShaderFloat -clutter_shader_float_get_type -ClutterShaderInt -clutter_shader_int_get_type -ClutterShaderMatrix -clutter_shader_matrix_get_type -clutter_shader_error_quark -</SECTION> - -<SECTION> <TITLE>Implicit Animations</TITLE> <FILE>clutter-animation</FILE> ClutterAnimation @@ -2525,10 +2467,23 @@ ClutterShaderEffectClass clutter_shader_effect_new clutter_shader_effect_set_uniform clutter_shader_effect_set_uniform_value + <SUBSECTION> clutter_shader_effect_set_shader_source clutter_shader_effect_get_program clutter_shader_effect_get_shader + +<SUBSECTION> +CLUTTER_VALUE_HOLDS_SHADER_FLOAT +clutter_value_set_shader_float +clutter_value_get_shader_float +CLUTTER_VALUE_HOLDS_SHADER_INT +clutter_value_set_shader_int +clutter_value_get_shader_int +CLUTTER_VALUE_HOLDS_SHADER_MATRIX +clutter_value_set_shader_matrix +clutter_value_get_shader_matrix + <SUBSECTION Standard> CLUTTER_TYPE_SHADER_EFFECT CLUTTER_SHADER_EFFECT @@ -2536,9 +2491,20 @@ CLUTTER_SHADER_EFFECT_CLASS CLUTTER_IS_SHADER_EFFECT CLUTTER_IS_SHADER_EFFECT_CLASS CLUTTER_SHADER_EFFECT_GET_CLASS +CLUTTER_TYPE_SHADER +CLUTTER_TYPE_SHADER_FLOAT +CLUTTER_TYPE_SHADER_INT +CLUTTER_TYPE_SHADER_MATRIX + <SUBSECTION Private> ClutterShaderEffectPrivate clutter_shader_effect_get_type +ClutterShaderFloat +clutter_shader_float_get_type +ClutterShaderInt +clutter_shader_int_get_type +ClutterShaderMatrix +clutter_shader_matrix_get_type </SECTION> <SECTION> diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am index 82f0b33d4..335d329a4 100644 --- a/tests/conform/Makefile.am +++ b/tests/conform/Makefile.am @@ -17,7 +17,6 @@ units_sources = # animation tests units_sources += \ test-animator.c \ - test-behaviours.c \ test-score.c \ test-state.c \ test-timeline.c \ diff --git a/tests/conform/test-behaviours.c b/tests/conform/test-behaviours.c deleted file mode 100644 index 7df5e131e..000000000 --- a/tests/conform/test-behaviours.c +++ /dev/null @@ -1,92 +0,0 @@ -#include <glib.h> - -#undef CLUTTER_DISABLE_DEPRECATED -#include <clutter/clutter.h> - -#include "test-conform-common.h" - -typedef struct _BehaviourFixture BehaviourFixture; - -typedef void (* BehaviourTestFunc) (BehaviourFixture *fixture); - -struct _BehaviourFixture -{ - ClutterTimeline *timeline; - ClutterAlpha *alpha; - ClutterActor *rect; -}; - -static void -opacity_behaviour (BehaviourFixture *fixture) -{ - ClutterBehaviour *behaviour; - guint8 start, end; - guint starti; - - behaviour = clutter_behaviour_opacity_new (fixture->alpha, 0, 255); - g_assert (CLUTTER_IS_BEHAVIOUR_OPACITY (behaviour)); - - clutter_behaviour_opacity_get_bounds (CLUTTER_BEHAVIOUR_OPACITY (behaviour), - &start, - &end); - - if (g_test_verbose ()) - g_print ("BehaviourOpacity:bounds = %d, %d (expected: 0, 255)\n", - start, - end); - - g_assert_cmpint (start, ==, 0); - g_assert_cmpint (end, ==, 255); - - clutter_behaviour_opacity_set_bounds (CLUTTER_BEHAVIOUR_OPACITY (behaviour), - 255, - 0); - /* XXX: The gobject property is actually a unsigned int not unsigned char - * property so we have to be careful not to corrupt the stack by passing - * a guint8 pointer here... */ - starti = 0; - g_object_get (G_OBJECT (behaviour), "opacity-start", &starti, NULL); - - if (g_test_verbose ()) - g_print ("BehaviourOpacity:start = %d (expected: 255)\n", start); - - g_assert_cmpint (starti, ==, 255); - - g_object_unref (behaviour); -} - -static const struct -{ - const gchar *desc; - BehaviourTestFunc func; -} behaviour_tests[] = { - { "BehaviourOpacity", opacity_behaviour } -}; - -static const gint n_behaviour_tests = G_N_ELEMENTS (behaviour_tests); - -void -test_behaviours (TestConformSimpleFixture *fixture, - gconstpointer dummy) -{ - BehaviourFixture b_fixture; - gint i; - - b_fixture.timeline = clutter_timeline_new (1000); - b_fixture.alpha = clutter_alpha_new_full (b_fixture.timeline, CLUTTER_LINEAR); - b_fixture.rect = clutter_rectangle_new (); - - g_object_ref_sink (b_fixture.alpha); - g_object_unref (b_fixture.timeline); - - for (i = 0; i < n_behaviour_tests; i++) - { - if (g_test_verbose ()) - g_print ("Testing: %s\n", behaviour_tests[i].desc); - - behaviour_tests[i].func (&b_fixture); - } - - g_object_unref (b_fixture.alpha); - clutter_actor_destroy (b_fixture.rect); -} diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c index 1cc7d5d36..f1eda71fa 100644 --- a/tests/conform/test-conform-main.c +++ b/tests/conform/test-conform-main.c @@ -192,7 +192,6 @@ main (int argc, char **argv) TEST_CONFORM_SIMPLE ("/script", test_script_single); TEST_CONFORM_SIMPLE ("/script", test_script_child); - TEST_CONFORM_SIMPLE ("/script", test_script_implicit_alpha); TEST_CONFORM_SIMPLE ("/script", test_script_object_property); TEST_CONFORM_SIMPLE ("/script", test_script_animation); TEST_CONFORM_SIMPLE ("/script", test_script_named_object); @@ -208,8 +207,6 @@ main (int argc, char **argv) TEST_CONFORM_SIMPLE ("/score", test_score); - TEST_CONFORM_SIMPLE ("/behaviours", test_behaviours); - TEST_CONFORM_SIMPLE ("/cogl", test_cogl_object); TEST_CONFORM_SIMPLE ("/cogl", test_cogl_fixed); TEST_CONFORM_SIMPLE ("/cogl", test_cogl_backface_culling); diff --git a/tests/conform/test-script-parser.c b/tests/conform/test-script-parser.c index 44abe09cd..cc6b9a38e 100644 --- a/tests/conform/test-script-parser.c +++ b/tests/conform/test-script-parser.c @@ -205,45 +205,6 @@ test_script_single (TestConformSimpleFixture *fixture, } void -test_script_implicit_alpha (TestConformSimpleFixture *fixture, - gconstpointer dummy) -{ - ClutterScript *script = clutter_script_new (); - ClutterTimeline *timeline; - GObject *behaviour = NULL; - GError *error = NULL; - ClutterAlpha *alpha; - gchar *test_file; - - test_file = clutter_test_get_data_file ("test-script-implicit-alpha.json"); - clutter_script_load_from_file (script, test_file, &error); - if (g_test_verbose () && error) - g_print ("Error: %s", error->message); - -#if GLIB_CHECK_VERSION (2, 20, 0) - g_assert_no_error (error); -#else - g_assert (error == NULL); -#endif - - behaviour = clutter_script_get_object (script, "test"); - g_assert (CLUTTER_IS_BEHAVIOUR (behaviour)); - - alpha = clutter_behaviour_get_alpha (CLUTTER_BEHAVIOUR (behaviour)); - g_assert (CLUTTER_IS_ALPHA (alpha)); - - g_assert_cmpint (clutter_alpha_get_mode (alpha), ==, CLUTTER_EASE_OUT_CIRC); - - timeline = clutter_alpha_get_timeline (alpha); - g_assert (CLUTTER_IS_TIMELINE (timeline)); - - g_assert_cmpint (clutter_timeline_get_duration (timeline), ==, 500); - - g_object_unref (script); - g_free (test_file); -} - -void test_script_object_property (TestConformSimpleFixture *fixture, gconstpointer dummy) { diff --git a/tests/data/test-script.json b/tests/data/test-script.json index 3482d734b..20c584662 100644 --- a/tests/data/test-script.json +++ b/tests/data/test-script.json @@ -17,8 +17,7 @@ "reactive" : true, "rotation" : [ { "z-axis" : [ 45.0, [ 75, 75 ] ] } - ], - "behaviours" : [ "fade-behaviour", "path-behaviour" ] + ] }, { "id" : "green-button", @@ -46,8 +45,7 @@ "keep-aspect-ratio" : true, "anchor-x" : "5 em", "anchor-y" : "5 pt", - "opacity" : 100, - "behaviours" : [ "rotate-behaviour", "fade-behaviour" ] + "opacity" : 100 }, { "id" : "red-hand-clone", diff --git a/tests/interactive/Makefile.am b/tests/interactive/Makefile.am index a4069b98c..6c118528b 100644 --- a/tests/interactive/Makefile.am +++ b/tests/interactive/Makefile.am @@ -5,18 +5,11 @@ UNIT_TESTS = \ test-texture-async.c \ test-texture-material.c \ test-events.c \ - test-scale.c \ - test-actors.c \ - test-actor-clone.c \ - test-behave.c \ test-shader-effects.c \ - test-depth.c \ - test-threads.c \ test-script.c \ test-model.c \ test-grab.c \ test-fullscreen.c \ - test-shader.c \ test-cogl-shader-arbfp.c \ test-cogl-shader-glsl.c \ test-animator.c \ @@ -24,7 +17,6 @@ UNIT_TESTS = \ test-state-animator.c \ test-unproject.c \ test-fbo.c \ - test-multistage.c \ test-cogl-primitives.c \ test-cogl-tex-tile.c \ test-cogl-tex-convert.c \ @@ -35,8 +27,6 @@ UNIT_TESTS = \ test-cogl-multitexture.c \ test-stage-read-pixels.c \ test-clip.c \ - test-paint-wrapper.c \ - test-texture-quality.c \ test-layout.c \ test-animation.c \ test-easing.c \ @@ -60,7 +50,7 @@ UNIT_TESTS = \ test-state-script.c if X11_TESTS -UNIT_TESTS += test-pixmap.c test-devices.c +UNIT_TESTS += test-devices.c endif if OS_WIN32 diff --git a/tests/interactive/test-behave.c b/tests/interactive/test-behave.c deleted file mode 100644 index 0ec4e1e07..000000000 --- a/tests/interactive/test-behave.c +++ /dev/null @@ -1,213 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include <glib.h> -#include <gmodule.h> - -#undef CLUTTER_DISABLE_DEPRECATED -#include <clutter/clutter.h> - -static gboolean -button_press_cb (ClutterStage *stage, - ClutterButtonEvent *event, - gpointer data) -{ - const gchar *click_type; - - switch (event->click_count) - { - case 2: - click_type = "double"; - break; - case 3: - click_type = "triple"; - break; - default: - click_type = "single"; - break; - } - - g_print ("%s button press event\n", click_type); - - return FALSE; -} - -static gboolean -scroll_event_cb (ClutterStage *stage, - ClutterScrollEvent *event, - gpointer data) -{ - g_print ("scroll direction: %s\n", - event->direction == CLUTTER_SCROLL_UP ? "up" - : "down"); - - return FALSE; -} - -typedef enum { - PATH_POLY, - PATH_ELLIPSE, - PATH_BSPLINE -} path_t; - -G_MODULE_EXPORT int -test_behave_main (int argc, char *argv[]) -{ - ClutterTimeline *timeline; - ClutterAlpha *alpha; - ClutterBehaviour *o_behave, *p_behave; - ClutterActor *stage; - ClutterActor *group, *rect, *hand; - gchar *file; - int i; - path_t path_type = PATH_POLY; - - const char *knots_poly = ("M 0, 0 L 0, 300 L 300, 300 " - "L 300, 0 L 0, 0"); - - /* A spiral created with inkscake */ - const char *knots_bspline = - "M 34.285713,35.219326 " - "C 44.026891,43.384723 28.084874,52.378758 20.714286,51.409804 " - "C 0.7404474,48.783999 -4.6171866,23.967448 1.904757,8.0764719 " - "C 13.570984,-20.348756 49.798303,-26.746504 74.999994,-13.352108 " - "C 111.98449,6.3047056 119.56591,55.259271 99.047626,89.505034 " - "C 71.699974,135.14925 9.6251774,143.91924 -33.571422,116.17172 " - "C -87.929934,81.254291 -97.88804,5.8941057 -62.857155,-46.209236 " - "C -20.430061,-109.31336 68.300385,-120.45954 129.2857,-78.114021 " - "C 201.15479,-28.21129 213.48932,73.938876 163.80954,143.79074 " - "C 106.45226,224.43749 -9.1490153,237.96076 -87.85713,180.93363 " - "C -177.29029,116.13577 -192.00272,-12.937817 -127.61907,-100.49494 " - "C -55.390344,-198.72081 87.170553,-214.62275 183.57141,-142.87593 " - "C 290.59464,-63.223369 307.68641,92.835839 228.57145,198.07645"; - - for (i = 0; i < argc; ++i) - { - if (!strncmp (argv[i], "--path", 6)) - { - if (!strncmp (argv[i] + 7, "poly", 4)) - path_type = PATH_POLY; - else if (!strncmp (argv[i] + 7, "bspline", 7)) - path_type = PATH_BSPLINE; - else if (!strncmp (argv[i] + 7, "ellipse", 7)) - path_type = PATH_ELLIPSE; - } - else if (!strncmp (argv[i], "--help", 6)) - { - printf ("behave [--path=poly|ellipse|bspline]\n"); - exit (0); - } - } - - if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) - return 1; - - stage = clutter_stage_new (); - clutter_stage_set_title (CLUTTER_STAGE (stage), "Behaviours"); - clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_Aluminium2); - clutter_stage_hide_cursor (CLUTTER_STAGE (stage)); - g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL); - g_signal_connect (stage, "button-press-event", - G_CALLBACK (button_press_cb), - NULL); - g_signal_connect (stage, "scroll-event", - G_CALLBACK (scroll_event_cb), - NULL); - g_signal_connect (stage, "key-press-event", - G_CALLBACK (clutter_main_quit), - NULL); - - /* Make a hand */ - group = clutter_group_new (); - clutter_container_add_actor (CLUTTER_CONTAINER (stage), group); - clutter_actor_show (group); - - file = g_build_filename (TESTS_DATADIR, "redhand.png", NULL); - hand = clutter_texture_new_from_file (file, NULL); - if (hand == NULL) - g_error("Unable to load '%s'", file); - - g_free (file); - - clutter_actor_set_position (hand, 0, 0); - clutter_actor_show (hand); - - rect = clutter_rectangle_new (); - clutter_actor_set_position (rect, 0, 0); - clutter_actor_set_size (rect, - clutter_actor_get_width (hand), - clutter_actor_get_height (hand)); - clutter_rectangle_set_color (CLUTTER_RECTANGLE (rect), CLUTTER_COLOR_Transparent); - clutter_rectangle_set_border_width (CLUTTER_RECTANGLE (rect), 10); - clutter_rectangle_set_border_color (CLUTTER_RECTANGLE (rect), - CLUTTER_COLOR_Chameleon); - clutter_actor_show (rect); - - clutter_container_add (CLUTTER_CONTAINER (group), rect, hand, NULL); - - /* Make a timeline */ - timeline = clutter_timeline_new (4000); - clutter_timeline_set_loop (timeline, TRUE); - clutter_timeline_set_auto_reverse (timeline, TRUE); - - /* Set an alpha func to power behaviour - ramp is constant rise */ - alpha = clutter_alpha_new_full (timeline, CLUTTER_LINEAR); - - /* Create a behaviour for that alpha */ - o_behave = clutter_behaviour_opacity_new (alpha, 0X33, 0xff); - - /* Apply it to our actor */ - clutter_behaviour_apply (o_behave, group); - - /* Make a path behaviour and apply that too */ - switch (path_type) - { - case PATH_POLY: - { - ClutterPath *path = clutter_path_new (); - clutter_path_set_description (path, knots_poly); - p_behave = clutter_behaviour_path_new (alpha, path); - } - break; - case PATH_ELLIPSE: - p_behave = - clutter_behaviour_ellipse_new (alpha, 200, 200, 400, 300, - CLUTTER_ROTATE_CW, - 0.0, 360.0); - - clutter_behaviour_ellipse_set_angle_tilt (CLUTTER_BEHAVIOUR_ELLIPSE (p_behave), - CLUTTER_X_AXIS, - 45.0); - clutter_behaviour_ellipse_set_angle_tilt (CLUTTER_BEHAVIOUR_ELLIPSE (p_behave), - CLUTTER_Z_AXIS, - 45.0); - break; - - case PATH_BSPLINE: - { - ClutterPath *path = clutter_path_new (); - clutter_path_set_description (path, knots_bspline); - p_behave = clutter_behaviour_path_new (alpha, path); - } - break; - - default: - g_assert_not_reached (); - break; - } - - clutter_behaviour_apply (p_behave, group); - - /* start the timeline and thus the animations */ - clutter_timeline_start (timeline); - - clutter_actor_show_all (stage); - - clutter_main(); - - g_object_unref (o_behave); - g_object_unref (p_behave); - - return 0; -} diff --git a/tests/interactive/test-scale.c b/tests/interactive/test-scale.c deleted file mode 100644 index 23a63542d..000000000 --- a/tests/interactive/test-scale.c +++ /dev/null @@ -1,117 +0,0 @@ -#include <stdlib.h> -#include <gmodule.h> - -#undef CLUTTER_DISABLE_DEPRECATED -#include <clutter/clutter.h> - -static const ClutterGravity gravities[] = { - CLUTTER_GRAVITY_NORTH_EAST, - CLUTTER_GRAVITY_NORTH, - CLUTTER_GRAVITY_NORTH_WEST, - CLUTTER_GRAVITY_WEST, - CLUTTER_GRAVITY_SOUTH_WEST, - CLUTTER_GRAVITY_SOUTH, - CLUTTER_GRAVITY_SOUTH_EAST, - CLUTTER_GRAVITY_EAST, - CLUTTER_GRAVITY_CENTER, - CLUTTER_GRAVITY_NONE -}; - -static gint gindex = 0; -static ClutterActor *label; - -static void -set_next_gravity (ClutterActor *actor) -{ - ClutterGravity gravity = gravities[gindex]; - GEnumClass *eclass; - GEnumValue *evalue; - - clutter_actor_move_anchor_point_from_gravity (actor, gravities[gindex]); - - eclass = g_type_class_ref (CLUTTER_TYPE_GRAVITY); - evalue = g_enum_get_value (eclass, gravity); - clutter_text_set_text (CLUTTER_TEXT (label), evalue->value_nick); - g_type_class_unref (eclass); - - if (++gindex >= G_N_ELEMENTS (gravities)) - gindex = 0; -} - -static gdouble -my_ramp_func (ClutterAlpha *alpha, - gpointer unused) -{ - ClutterTimeline *timeline = clutter_alpha_get_timeline (alpha); - - return clutter_timeline_get_progress (timeline); -} - -G_MODULE_EXPORT int -test_scale_main (int argc, char *argv[]) -{ - ClutterActor *stage, *rect; - ClutterColor stage_color = { 0x0, 0x0, 0x0, 0xff }; - ClutterColor rect_color = { 0xff, 0xff, 0xff, 0x99 }; - ClutterColor white_color = { 0xff, 0xff, 0xff, 0xFF }; - ClutterTimeline *timeline; - ClutterAlpha *alpha; - ClutterBehaviour *behave; - - if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) - return 1; - - stage = clutter_stage_get_default (); - - clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color); - clutter_actor_set_size (stage, 300, 300); - - rect = clutter_rectangle_new_with_color (&rect_color); - clutter_actor_set_size (rect, 100, 100); - clutter_actor_set_position (rect, 100, 100); - - clutter_container_add_actor (CLUTTER_CONTAINER (stage), rect); - - label = clutter_text_new_with_text ("Sans 20px", ""); - clutter_text_set_color (CLUTTER_TEXT (label), - &white_color); - clutter_actor_set_position (label, - clutter_actor_get_x (rect), - clutter_actor_get_y (rect) - + clutter_actor_get_height (rect)); - - clutter_container_add_actor (CLUTTER_CONTAINER (stage), label); - - rect_color.alpha = 0xff; - rect = clutter_rectangle_new_with_color (&rect_color); - clutter_actor_set_position (rect, 100, 100); - clutter_actor_set_size (rect, 100, 100); - set_next_gravity (rect); - - clutter_container_add_actor (CLUTTER_CONTAINER (stage), rect); - - timeline = clutter_timeline_new (750); - alpha = clutter_alpha_new_with_func (timeline, - my_ramp_func, - NULL, NULL); - - behave = clutter_behaviour_scale_new (alpha, - 0.0, 0.0, /* scale start */ - 1.0, 1.0); /* scale end */ - - clutter_behaviour_apply (behave, rect); - - clutter_timeline_set_loop (timeline, TRUE); - g_signal_connect_swapped (timeline, "completed", - G_CALLBACK (set_next_gravity), rect); - clutter_timeline_start (timeline); - - clutter_actor_show_all (stage); - - clutter_main(); - - g_object_unref (timeline); - g_object_unref (behave); - - return EXIT_SUCCESS; -} diff --git a/tests/interactive/test-script.c b/tests/interactive/test-script.c index e98019697..d9c54dad3 100644 --- a/tests/interactive/test-script.c +++ b/tests/interactive/test-script.c @@ -32,73 +32,6 @@ static const gchar *test_unmerge = " }" "]"; -static const gchar *test_behaviour = -"[" -" {" -" \"id\" : \"main-timeline\"," -" \"type\" : \"ClutterTimeline\"," -" \"duration\" : 5000," -" \"loop\" : true" -" }," -" {" -" \"id\" : \"sine-alpha\"," -" \"type\" : \"ClutterAlpha\"," -" \"function\" : \"sine_alpha\"," -" \"timeline\" : \"main-timeline\"" -" }," -" {" -" \"id\" : \"path-behaviour\"," -" \"type\" : \"ClutterBehaviourPath\"," -" \"path\" : \"M 50 50 L 100 100\"," -" \"alpha\" : {" -" \"timeline\" : \"main-timeline\"," -" \"function\" : \"double_ramp_alpha\"" -" }" -" }," -" {" -" \"id\" : \"rotate-behaviour\"," -" \"type\" : \"ClutterBehaviourRotate\"," -" \"angle-start\" : 0.0," -" \"angle-end\" : 360.0," -" \"axis\" : \"y-axis\"," -" \"alpha\" : \"sine-alpha\"" -" }," -" {" -" \"id\" : \"fade-behaviour\"," -" \"type\" : \"ClutterBehaviourOpacity\"," -" \"opacity-start\" : 255," -" \"opacity-end\" : 0," -" \"alpha\" : {" -" \"id\" : \"fade-alpha\"," -" \"type\" : \"ClutterAlpha\"," -" \"timeline\" : \"main-timeline\"," -" \"mode\" : \"linear\"" -" }" -" }" -"]"; - -gdouble -sine_alpha (ClutterAlpha *alpha, - gpointer dummy G_GNUC_UNUSED) -{ - ClutterTimeline *timeline = clutter_alpha_get_timeline (alpha); - - return sin (clutter_timeline_get_progress (timeline) * G_PI); -} - -gdouble -double_ramp_alpha (ClutterAlpha *alpha, - gpointer dummy G_GNUC_UNUSED) -{ - ClutterTimeline *timeline = clutter_alpha_get_timeline (alpha); - gdouble progress = clutter_timeline_get_progress (timeline); - - if (progress >= 0.5) - return 1.0 - progress; - - return progress; -} - static gboolean blue_button_press (ClutterActor *actor, ClutterButtonEvent *event, @@ -117,18 +50,8 @@ red_button_press (ClutterActor *actor, ClutterButtonEvent *event, gpointer data) { - GObject *timeline; - g_print ("[*] Pressed '%s'\n", clutter_get_script_id (G_OBJECT (actor))); - timeline = clutter_script_get_object (script, "main-timeline"); - g_assert (CLUTTER_IS_TIMELINE (timeline)); - - if (!clutter_timeline_is_playing (CLUTTER_TIMELINE (timeline))) - clutter_timeline_start (CLUTTER_TIMELINE (timeline)); - else - clutter_timeline_pause (CLUTTER_TIMELINE (timeline)); - return TRUE; } @@ -146,16 +69,6 @@ test_script_main (int argc, char *argv[]) script = clutter_script_new (); g_assert (CLUTTER_IS_SCRIPT (script)); - clutter_script_load_from_data (script, test_behaviour, -1, &error); - if (error) - { - g_print ("*** Error:\n" - "*** %s\n", error->message); - g_error_free (error); - g_object_unref (script); - return EXIT_FAILURE; - } - file = g_build_filename (TESTS_DATADIR, "test-script.json", NULL); clutter_script_load_from_file (script, file, &error); if (error) diff --git a/tests/interactive/test-shader.c b/tests/interactive/test-shader.c deleted file mode 100644 index 79a014b88..000000000 --- a/tests/interactive/test-shader.c +++ /dev/null @@ -1,416 +0,0 @@ -/*#define TEST_GROUP */ - -#undef CLUTTER_DISABLE_DEPRECATED - -#include <clutter/clutter.h> - -#include <errno.h> -#include <stdlib.h> -#include <glib.h> -#include <gmodule.h> - -/* Dynamic branching appeared in "Shader Model 3.0" that low-end IGPs - * don't support. - */ -#define GPU_SUPPORTS_DYNAMIC_BRANCHING 0 - -typedef struct -{ - gchar *name; - gchar *source; -} ShaderSource; - -/* a couple of boilerplate defines that are common amongst all the - * sample shaders - */ - -/* FRAGMENT_SHADER_BEGIN: generate boilerplate with a local vec4 color already - * initialized, from a sampler2D in a variable tex. - */ -#define FRAGMENT_SHADER_VARS \ - "uniform sampler2D tex;" \ - "uniform float x_step, y_step;" \ - -#define FRAGMENT_SHADER_BEGIN \ - "void main (){" \ - " vec4 color = texture2D (tex, vec2(cogl_tex_coord_in[0]));" - -/* FRAGMENT_SHADER_END: apply the changed color to the output buffer correctly - * blended with the gl specified color (makes the opacity of actors work - * correctly). - */ -#define FRAGMENT_SHADER_END \ - " gl_FragColor = color;" \ - " gl_FragColor = gl_FragColor * cogl_color_in;" \ - "}" - -static ShaderSource shaders[]= - { - {"brightness-contrast", - FRAGMENT_SHADER_VARS - "uniform float brightness, contrast;" - FRAGMENT_SHADER_BEGIN - " color.rgb /= color.a;" - " color.rgb = (color.rgb - vec3(0.5, 0.5, 0.5)) * contrast + " - "vec3 (brightness + 0.5, brightness + 0.5, brightness + 0.5);" - " color.rgb *= color.a;" - FRAGMENT_SHADER_END - }, - - {"box-blur", - FRAGMENT_SHADER_VARS - -#if GPU_SUPPORTS_DYNAMIC_BRANCHING - "uniform float radius;" - FRAGMENT_SHADER_BEGIN - "float u, v;" - "int count = 1;" - "for (u=-radius;u<radius;u++)" - " for (v=-radius;v<radius;v++)" - " {" - " color += texture2D(tex, " - " vec2(cogl_tex_coord_in[0].s + u * 2.0 * x_step, " - " cogl_tex_coord_in[0].t + v * 2.0 * y_step));" - " count ++;" - " }" - "color = color / float(count);" - FRAGMENT_SHADER_END -#else - "vec4 get_rgba_rel(sampler2D tex, float dx, float dy)" - "{" - " return texture2D (tex, cogl_tex_coord_in[0].st " - " + vec2(dx, dy) * 2.0);" - "}" - - FRAGMENT_SHADER_BEGIN - " float count = 1.0;" - " color += get_rgba_rel (tex, -x_step, -y_step); count++;" - " color += get_rgba_rel (tex, -x_step, 0.0); count++;" - " color += get_rgba_rel (tex, -x_step, y_step); count++;" - " color += get_rgba_rel (tex, 0.0, -y_step); count++;" - " color += get_rgba_rel (tex, 0.0, 0.0); count++;" - " color += get_rgba_rel (tex, 0.0, y_step); count++;" - " color += get_rgba_rel (tex, x_step, -y_step); count++;" - " color += get_rgba_rel (tex, x_step, 0.0); count++;" - " color += get_rgba_rel (tex, x_step, y_step); count++;" - " color = color / count;" - FRAGMENT_SHADER_END -#endif - }, - - {"invert", - FRAGMENT_SHADER_VARS - FRAGMENT_SHADER_BEGIN - " color.rgb /= color.a;" - " color.rgb = vec3(1.0, 1.0, 1.0) - color.rgb;\n" - " color.rgb *= color.a;" - FRAGMENT_SHADER_END - }, - - {"brightness-contrast", - FRAGMENT_SHADER_VARS - "uniform float brightness;" - "uniform float contrast;" - FRAGMENT_SHADER_BEGIN - " color.rgb /= color.a;" - " color.r = (color.r - 0.5) * contrast + brightness + 0.5;" - " color.g = (color.g - 0.5) * contrast + brightness + 0.5;" - " color.b = (color.b - 0.5) * contrast + brightness + 0.5;" - " color.rgb *= color.a;" - FRAGMENT_SHADER_END - }, - - {"gray", - FRAGMENT_SHADER_VARS - FRAGMENT_SHADER_BEGIN - " float avg = (color.r + color.g + color.b) / 3.0;" - " color.r = avg;" - " color.g = avg;" - " color.b = avg;" - FRAGMENT_SHADER_END - }, - - {"combined-mirror", - FRAGMENT_SHADER_VARS - FRAGMENT_SHADER_BEGIN - " vec4 colorB = texture2D (tex, vec2(cogl_tex_coord_in[0].ts));" - " float avg = (color.r + color.g + color.b) / 3.0;" - " color.r = avg;" - " color.g = avg;" - " color.b = avg;" - " color = (color + colorB)/2.0;" - FRAGMENT_SHADER_END - }, - - {"edge-detect", - FRAGMENT_SHADER_VARS - "float get_avg_rel(sampler2D texB, float dx, float dy)" - "{" - " vec4 colorB = texture2D (texB, cogl_tex_coord_in[0].st + vec2(dx, dy));" - " return (colorB.r + colorB.g + colorB.b) / 3.0;" - "}" - FRAGMENT_SHADER_BEGIN - " mat3 sobel_h = mat3( 1.0, 2.0, 1.0," - " 0.0, 0.0, 0.0," - " -1.0, -2.0, -1.0);" - " mat3 sobel_v = mat3( 1.0, 0.0, -1.0," - " 2.0, 0.0, -2.0," - " 1.0, 0.0, -1.0);" - " mat3 map = mat3( get_avg_rel(tex, -x_step, -y_step)," - " get_avg_rel(tex, -x_step, 0.0)," - " get_avg_rel(tex, -x_step, y_step)," - " get_avg_rel(tex, 0.0, -y_step)," - " get_avg_rel(tex, 0.0, 0.0)," - " get_avg_rel(tex, 0.0, y_step)," - " get_avg_rel(tex, x_step, -y_step)," - " get_avg_rel(tex, x_step, 0.0)," - " get_avg_rel(tex, x_step, y_step) );" - " mat3 gh = sobel_h * map;" - " mat3 gv = map * sobel_v;" - " float avgh = (gh[0][0] + gh[0][1] + gh[0][2] +" - " gh[1][0] + gh[1][1] + gh[1][2] +" - " gh[2][0] + gh[2][1] + gh[2][2]) / 18.0 + 0.5;" - " float avgv = (gv[0][0] + gv[0][1] + gv[0][2] +" - " gv[1][0] + gv[1][1] + gv[1][2] +" - " gv[2][0] + gv[2][1] + gv[2][2]) / 18.0 + 0.5;" - " float avg = (avgh + avgv) / 2.0;" - " color.r = avg * color.r;" - " color.g = avg * color.g;" - " color.b = avg * color.b;" - FRAGMENT_SHADER_END - }, - /* Terminating NULL sentinel */ - {NULL, NULL} -}; - -static gint shader_no = 0; - -static int -next_p2 (gint a) -{ - int rval = 1; - - while (rval < a) - rval <<= 1; - - return rval; -} - -static void -set_shader_num (ClutterActor *actor, gint new_no) -{ - int tex_width; - int tex_height; - - if (new_no >= 0 && shaders[new_no].name) - { - ClutterShader *shader; - GError *error; - shader_no = new_no; - - g_print ("setting shaders[%i] named '%s'\n", - shader_no, - shaders[shader_no].name); - - shader = clutter_shader_new (); - - error = NULL; - g_object_set (G_OBJECT (shader), - "fragment-source", shaders[shader_no].source, - NULL); - - /* try to bind the shader, provoking an error we catch if there is issues - * with the shader sources we've provided. At a later stage it should be - * possible to iterate through a set of alternate shader sources (glsl -> - * asm -> cg?) and the one that succesfully compiles is used. - */ - clutter_shader_compile (shader, &error); - if (error) - { - g_print ("unable to set shaders[%i] named '%s': %s", - shader_no, shaders[shader_no].name, - error->message); - g_error_free (error); - clutter_actor_set_shader (actor, NULL); - } - else - { - clutter_actor_set_shader (actor, NULL); - clutter_actor_set_shader (actor, shader); - clutter_actor_set_shader_param_int (actor, "tex", 0); - clutter_actor_set_shader_param_float (actor, "radius", 3.0); - clutter_actor_set_shader_param_float (actor, "brightness", 0.4); - clutter_actor_set_shader_param_float (actor, "contrast", -1.9); - - if (CLUTTER_IS_TEXTURE (actor)) - { - /* XXX - this assumes *a lot* about how things are done - * internally on *some* hardware and driver - */ - tex_width = clutter_actor_get_width (actor); - tex_width = next_p2 (tex_width); - - tex_height = clutter_actor_get_height (actor); - tex_height = next_p2 (tex_height); - - clutter_actor_set_shader_param_float (actor, "x_step", - 1.0f / tex_width); - clutter_actor_set_shader_param_float (actor, "y_step", - 1.0f / tex_height); - } - } - - g_object_unref (shader); - } -} - -static gboolean -button_release_cb (ClutterActor *actor, - ClutterEvent *event, - gpointer data) -{ - gint new_no; - - if (event->button.button == 1) - { - new_no = shader_no - 1; - } - else - { - new_no = shader_no + 1; - } - - set_shader_num (actor, new_no); - - return FALSE; -} - -#ifdef COGL_HAS_GLES2 -static gboolean -timeout_cb (gpointer data) -{ - int new_no = shader_no + 1; - - if (shaders[new_no].name == NULL) - new_no = 0; - - set_shader_num (CLUTTER_ACTOR (data), new_no); - - return TRUE; -} -#endif /* COGL_HAS_GLES2 */ - -G_MODULE_EXPORT gint -test_shader_main (gint argc, gchar *argv[]) -{ - ClutterActor *actor; - ClutterActor *stage; - ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff }; - ClutterShader *shader; - GError *error; - gchar *file; - - if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) - return 1; - - stage = clutter_stage_new (); - clutter_stage_set_title (CLUTTER_STAGE (stage), "Shaders"); - clutter_actor_set_size (stage, 512, 384); - g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL); - - g_print ("applying shaders[%i] named '%s'\n", - shader_no, - shaders[shader_no].name); - - shader = clutter_shader_new (); - - error = NULL; - clutter_shader_set_fragment_source (shader, shaders[shader_no].source, -1); - clutter_shader_compile (shader, &error); - if (error) - { - g_print ("unable to load shaders[%d] named '%s': %s\n", - shader_no, - shaders[shader_no].name, - error->message); - g_error_free (error); - - return EXIT_FAILURE; - } - - clutter_stage_set_title (CLUTTER_STAGE (stage), "Shader Test"); - clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color); - - file = g_build_filename (TESTS_DATADIR, "redhand.png", NULL); - -#ifndef TEST_GROUP - actor = clutter_texture_new_from_file (file, &error); - if (!actor) - g_error("pixbuf load failed: %s", error ? error->message : "Unknown"); -#else - actor = clutter_group_new (); - - { - ClutterActor *child1, *child2, *child3, *child4; - ClutterColor color = { 0xff, 0x22, 0x66, 0x99 }; - - child1 = clutter_texture_new_from_file (file, &error); - if (!child1) - g_error("pixbuf load failed: %s", error ? error->message : "Unknown"); - - child2 = clutter_texture_new_from_file (file, &error); - if (!child2) - g_error("pixbuf load failed: %s", error ? error->message : "Unknown"); - - child3 = clutter_rectangle_new (); - child4 = clutter_text_new_with_text ("Sans 20px", "Shady stuff"); - - clutter_rectangle_set_color (CLUTTER_RECTANGLE (child3), &color); - clutter_actor_set_size (child3, 50, 50); - - clutter_actor_set_position (child1, 0, 0); - clutter_actor_set_position (child2, 50, 100); - clutter_actor_set_position (child3, 30, -30); - clutter_actor_set_position (child4, -50, 20); - - clutter_container_add (CLUTTER_CONTAINER (actor), - child1, - child2, - child3, - child4, - NULL); - - clutter_actor_show_all (actor); - } -#endif /* !TEST_GROUP */ - - g_free (file); - - clutter_actor_set_shader (actor, shader); - clutter_actor_set_position (actor, 100, 100); - - g_object_unref (shader); - - clutter_container_add_actor (CLUTTER_CONTAINER (stage), actor); - - clutter_actor_set_shader_param_int (actor, "tex", 0); - clutter_actor_set_shader_param_float (actor, "brightness", 0.4); - clutter_actor_set_shader_param_float (actor, "contrast", -1.9); - - clutter_actor_set_reactive (actor, TRUE); - g_signal_connect (actor, "button-release-event", - G_CALLBACK (button_release_cb), NULL); - -#ifdef COGL_HAS_GLES2 - /* On an embedded platform it is difficult to right click so we will - cycle through the shaders automatically */ - g_timeout_add_seconds (3, timeout_cb, actor); -#endif - - /* Show everying ( and map window ) */ - clutter_actor_show_all (stage); - - clutter_main (); - - return EXIT_SUCCESS; -} diff --git a/tests/interactive/test-texture-async.c b/tests/interactive/test-texture-async.c index f88f382a5..5d172a6d7 100644 --- a/tests/interactive/test-texture-async.c +++ b/tests/interactive/test-texture-async.c @@ -52,9 +52,6 @@ size_change_cb (ClutterTexture *texture, static gboolean task (gpointer user_data) { - ClutterTimeline *timeline; - ClutterAlpha *alpha; - ClutterBehaviour *depth_behavior; ClutterActor *image[4]; ClutterActor *clone[4]; ClutterActor *stage; @@ -107,11 +104,10 @@ gboolean task (gpointer user_data) for (i = 0; i < 3; i++) { - timeline = clutter_timeline_new (5000); - alpha = clutter_alpha_new_full (timeline, CLUTTER_LINEAR); - depth_behavior = clutter_behaviour_depth_new (alpha, -2500, 0); - clutter_behaviour_apply (depth_behavior, image[i]); - clutter_timeline_start (timeline); + clutter_actor_animate (image[i], CLUTTER_LINEAR, + 5000, + "depth", -2500.0, + NULL); } return FALSE; @@ -122,15 +118,13 @@ G_MODULE_EXPORT gint test_texture_async_main (int argc, char *argv[]) { ClutterActor *stage; - ClutterColor stage_color = { 0x12, 0x34, 0x56, 0xff }; - gchar *path; + gchar *path; if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) return 1; - g_thread_init (NULL); - stage = clutter_stage_get_default (); - clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color); + stage = clutter_stage_new (); + clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_LightSkyBlue); clutter_actor_show (stage); g_signal_connect (stage, @@ -147,8 +141,5 @@ test_texture_async_main (int argc, char *argv[]) g_free (path); - /*g_object_unref (depth_behavior); - g_object_unref (timeline);*/ - return EXIT_SUCCESS; } |