#include <gtk/gtk.h>
#include <clutter/clutter.h>
-#include <clutter-gtk/gtk-clutter-embed.h>
+#include <clutter-gtk/clutter-gtk.h>
#include "gtk-champlain-embed.h"
#include "champlain-zoom-level.h"
#include <clutter/clutter.h>
-#include <clutter-cairo/clutter-cairo.h>
#include <glib.h>
#include <glib-object.h>
#include <cairo.h>
#include "champlain-zoom-level.h"
#include <clutter/clutter.h>
-#include <clutter-cairo/clutter-cairo.h>
#include <glib.h>
#include <glib-object.h>
#include <cairo.h>
else
x = -58 * slope;
- shadow = clutter_cairo_new (width + x, (height + point));
- cr = clutter_cairo_create (CLUTTER_CAIRO (shadow));
+ shadow = clutter_cairo_texture_new (width + x, (height + point));
+ cr = clutter_cairo_texture_create (CLUTTER_CAIRO_TEXTURE (shadow));
cairo_matrix_init (&matrix,
1, 0,
ClutterColor darker_color;
cairo_t *cr;
- bg = clutter_cairo_new (width, height + point);
- cr = clutter_cairo_create (CLUTTER_CAIRO (bg));
+ bg = clutter_cairo_texture_new (width, height + point);
+ cr = clutter_cairo_texture_create (CLUTTER_CAIRO_TEXTURE (bg));
/* If selected, add the selection color to the marker's color */
if (base_priv->highlighted)
if (priv->text != NULL && strlen (priv->text) > 0)
{
- ClutterLabel *label;
+ ClutterText *label;
if (priv->text_actor == NULL)
{
- priv->text_actor = clutter_label_new_with_text (priv->font_name, priv->text);
+ priv->text_actor = clutter_text_new_with_text (priv->font_name, priv->text);
g_object_ref (priv->text_actor);
}
- label = CLUTTER_LABEL (priv->text_actor);
- clutter_label_set_use_markup (label, priv->use_markup);
- clutter_label_set_font_name (label, priv->font_name);
- clutter_label_set_text (label, priv->text);
- clutter_label_set_alignment (label, priv->alignment);
- clutter_label_set_line_wrap (label, priv->wrap);
- clutter_label_set_line_wrap_mode (label, priv->wrap_mode);
- clutter_label_set_ellipsize (label, priv->ellipsize);
- clutter_label_set_attributes (label, priv->attributes);
+ label = CLUTTER_TEXT (priv->text_actor);
+ clutter_text_set_use_markup (label, priv->use_markup);
+ clutter_text_set_font_name (label, priv->font_name);
+ clutter_text_set_text (label, priv->text);
+ clutter_text_set_line_alignment (label, priv->alignment);
+ clutter_text_set_line_wrap (label, priv->wrap);
+ clutter_text_set_line_wrap_mode (label, priv->wrap_mode);
+ clutter_text_set_ellipsize (label, priv->ellipsize);
+ clutter_text_set_attributes (label, priv->attributes);
height = clutter_actor_get_height (priv->text_actor);
if (priv->image != NULL)
if (height > total_height)
total_height = height;
- clutter_label_set_color (CLUTTER_LABEL (priv->text_actor), priv->text_color);
+ clutter_text_set_color (CLUTTER_TEXT (priv->text_actor), priv->text_color);
if (clutter_actor_get_parent (priv->text_actor) == NULL)
clutter_container_add_actor (CLUTTER_CONTAINER (marker), priv->text_actor);
}
#include <math.h>
#include <sys/stat.h>
#include <string.h>
-#include <clutter-cairo.h>
enum
{
guint size;
size = champlain_tile_get_size (tile);
- actor = clutter_cairo_new (size, size);
- cr = clutter_cairo_create (CLUTTER_CAIRO(actor));
+ actor = clutter_cairo_texture_new (size, size);
+ cr = clutter_cairo_texture_create (CLUTTER_CAIRO_TEXTURE(actor));
/* draw a linear gray to white pattern */
pat = cairo_pattern_create_linear (size / 2.0, 0.0, size, size / 2.0);
typedef struct {
ChamplainTile *tile;
- ClutterEffectTemplate *etemplate;
+ //ClutterEffectTemplate *etemplate;
ClutterTimeline *timeline;
ClutterActor *old_actor;
} AnimationContext;
-
+/*
static void
fade_in_completed (ClutterTimeline *timeline,
gpointer data)
g_object_unref (ctx->tile);
g_object_unref (ctx->timeline);
- g_object_unref (ctx->etemplate);
+ //g_object_unref (ctx->etemplate);
g_free (ctx);
}
+*/
/**
* champlain_tile_set_content:
clutter_container_add (CLUTTER_CONTAINER (priv->actor), actor, NULL);
- /* fixme: etemplate are leaked here */
+ /* fixme: etemplate are leaked here
if (fade_in == TRUE)
{
AnimationContext *ctx = g_new0 (AnimationContext, 1);
clutter_actor_set_opacity (actor, 0);
clutter_effect_fade (ctx->etemplate, actor, 255, NULL, NULL);
}
+ */
priv->content_actor = g_object_ref (actor);
g_object_notify (G_OBJECT (self), "content");
if (priv->show_license)
{
- priv->license_actor = g_object_ref (clutter_label_new_with_text ("sans 8",
+ priv->license_actor = g_object_ref (clutter_text_new_with_text ("sans 8",
champlain_map_source_get_license (priv->map_source)));
clutter_actor_set_opacity (priv->license_actor, 128);
clutter_actor_show (priv->license_actor);
gdouble lat;
gdouble lon;
- alpha = (double) clutter_alpha_get_alpha (ctx->alpha) / CLUTTER_ALPHA_MAX_ALPHA;
+ alpha = clutter_alpha_get_alpha (ctx->alpha);
lat = ctx->to_latitude - ctx->from_latitude;
lon = ctx->to_longitude - ctx->from_longitude;
*/
duration = 500 * priv->zoom_level / 2.0;
ctx->timeline = clutter_timeline_new_for_duration (duration);
- ctx->alpha = clutter_alpha_new_full (ctx->timeline, CLUTTER_ALPHA_SINE_INC, NULL,
- NULL);
+ ctx->alpha = clutter_alpha_new_full (ctx->timeline, CLUTTER_EASE_OUT_SINE);
g_signal_connect (ctx->timeline, "new-frame", G_CALLBACK (timeline_new_frame),
ctx);
*/
#include <champlain/champlain.h>
-#include <clutter-cairo/clutter-cairo.h>
#include <math.h>
#define MARKER_SIZE 10
marker = champlain_base_marker_new ();
/* Static filled circle ----------------------------------------------- */
- bg = clutter_cairo_new (MARKER_SIZE, MARKER_SIZE);
- cr = clutter_cairo_create (CLUTTER_CAIRO (bg));
+ bg = clutter_cairo_texture_new (MARKER_SIZE, MARKER_SIZE);
+ cr = clutter_cairo_texture_create (CLUTTER_CAIRO_TEXTURE (bg));
/* Draw the circle */
cairo_set_source_rgb (cr, 0, 0, 0);
clutter_actor_set_position (bg, 0, 0);
/* Echo circle -------------------------------------------------------- */
- bg = clutter_cairo_new (2 * MARKER_SIZE, 2 * MARKER_SIZE);
- cr = clutter_cairo_create (CLUTTER_CAIRO (bg));
+ bg = clutter_cairo_texture_new (2 * MARKER_SIZE, 2 * MARKER_SIZE);
+ cr = clutter_cairo_texture_create (CLUTTER_CAIRO_TEXTURE (bg));
/* Draw the circle */
cairo_set_source_rgb (cr, 0, 0, 0);
/* Animate the echo circle */
timeline = clutter_timeline_new_for_duration (1000);
clutter_timeline_set_loop (timeline, TRUE);
- alpha = clutter_alpha_new_full (timeline, CLUTTER_ALPHA_SINE_INC, NULL, g_object_unref);
+ alpha = clutter_alpha_new_full (timeline, CLUTTER_EASE_OUT_SINE);
behaviour = clutter_behaviour_scale_new (alpha, 0.5, 0.5, 2.0, 2.0);
clutter_behaviour_apply (behaviour, bg);
#include <champlain/champlain.h>
#include <champlain-gtk/champlain-gtk.h>
-#include <clutter-gtk/gtk-clutter-embed.h>
+#include <clutter-gtk/clutter-gtk.h>
#include <markers.h>
clutter_container_add_actor (CLUTTER_CONTAINER (button), button_bg);
clutter_actor_set_opacity (button_bg, 0xcc);
- button_text = clutter_label_new_full ("Sans 10", text, &black);
+ button_text = clutter_text_new_full ("Sans 10", text, &black);
clutter_container_add_actor (CLUTTER_CONTAINER (button), button_text);
clutter_actor_get_size (button_text, &width, &height);