summaryrefslogtreecommitdiff
path: root/plugins/shotwell-transitions/CirclesEffect.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-06-25 21:12:13 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-06-25 21:12:13 +0200
commit059a62ee3c820a42fbce980c3256049adecc9100 (patch)
treee51eab94fd7d65459640ca227fb2257bb41d2acb /plugins/shotwell-transitions/CirclesEffect.c
parent55778740c211992cc86ea87588ab62c6750f36d1 (diff)
parente8f4d7a9cdd37c5a9fb3b6991a4e9173829808da (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'plugins/shotwell-transitions/CirclesEffect.c')
-rw-r--r--plugins/shotwell-transitions/CirclesEffect.c499
1 files changed, 253 insertions, 246 deletions
diff --git a/plugins/shotwell-transitions/CirclesEffect.c b/plugins/shotwell-transitions/CirclesEffect.c
index 2ae59b7..410dc93 100644
--- a/plugins/shotwell-transitions/CirclesEffect.c
+++ b/plugins/shotwell-transitions/CirclesEffect.c
@@ -1,4 +1,4 @@
-/* CirclesEffect.c generated by valac 0.36.6, the Vala compiler
+/* CirclesEffect.c generated by valac 0.40.4, the Vala compiler
* generated from CirclesEffect.vala, do not modify */
/* Copyright 2013 Jens Bav
@@ -8,6 +8,7 @@
* (version 2.1 or later). See the COPYING file in this distribution.
*/
+
#include <glib.h>
#include <glib-object.h>
#include <shotwell-plugin-dev-1.0.h>
@@ -42,6 +43,11 @@ typedef struct _ShotwellTransitionDescriptorPrivate ShotwellTransitionDescriptor
typedef struct _CirclesEffectDescriptor CirclesEffectDescriptor;
typedef struct _CirclesEffectDescriptorClass CirclesEffectDescriptorClass;
typedef struct _CirclesEffectDescriptorPrivate CirclesEffectDescriptorPrivate;
+enum {
+ CIRCLES_EFFECT_DESCRIPTOR_0_PROPERTY,
+ CIRCLES_EFFECT_DESCRIPTOR_NUM_PROPERTIES
+};
+static GParamSpec* circles_effect_descriptor_properties[CIRCLES_EFFECT_DESCRIPTOR_NUM_PROPERTIES];
#define TYPE_CIRCLES_EFFECT (circles_effect_get_type ())
#define CIRCLES_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CIRCLES_EFFECT, CirclesEffect))
@@ -53,6 +59,11 @@ typedef struct _CirclesEffectDescriptorPrivate CirclesEffectDescriptorPrivate;
typedef struct _CirclesEffect CirclesEffect;
typedef struct _CirclesEffectClass CirclesEffectClass;
typedef struct _CirclesEffectPrivate CirclesEffectPrivate;
+enum {
+ CIRCLES_EFFECT_0_PROPERTY,
+ CIRCLES_EFFECT_NUM_PROPERTIES
+};
+static GParamSpec* circles_effect_properties[CIRCLES_EFFECT_NUM_PROPERTIES];
struct _ShotwellTransitionDescriptor {
GObject parent_instance;
@@ -91,55 +102,69 @@ static SpitTransitionsEffectIface * circles_effect_spit_transitions_effect_paren
GType shotwell_transition_descriptor_get_type (void) G_GNUC_CONST;
GType circles_effect_descriptor_get_type (void) G_GNUC_CONST;
-enum {
- CIRCLES_EFFECT_DESCRIPTOR_DUMMY_PROPERTY
-};
CirclesEffectDescriptor* circles_effect_descriptor_new (GFile* resource_directory);
-CirclesEffectDescriptor* circles_effect_descriptor_construct (GType object_type, GFile* resource_directory);
-ShotwellTransitionDescriptor* shotwell_transition_descriptor_construct (GType object_type, GFile* resource_directory);
+CirclesEffectDescriptor* circles_effect_descriptor_construct (GType object_type,
+ GFile* resource_directory);
+ShotwellTransitionDescriptor* shotwell_transition_descriptor_construct (GType object_type,
+ GFile* resource_directory);
static const gchar* circles_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base);
static const gchar* circles_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base);
-static SpitTransitionsEffect* circles_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host);
+static SpitTransitionsEffect* circles_effect_descriptor_real_create (ShotwellTransitionDescriptor* base,
+ SpitHostInterface* host);
CirclesEffect* circles_effect_new (void);
CirclesEffect* circles_effect_construct (GType object_type);
GType circles_effect_get_type (void) G_GNUC_CONST;
-enum {
- CIRCLES_EFFECT_DUMMY_PROPERTY
-};
#define CIRCLES_EFFECT_DESIRED_FPS 25
#define CIRCLES_EFFECT_MIN_FPS 15
#define CIRCLES_EFFECT_SPEED 2.5
-static void circles_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps);
-static void circles_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion);
+static void circles_effect_real_get_fps (SpitTransitionsEffect* base,
+ gint* desired_fps,
+ gint* min_fps);
+static void circles_effect_real_start (SpitTransitionsEffect* base,
+ SpitTransitionsVisuals* visuals,
+ SpitTransitionsMotion* motion);
static gboolean circles_effect_real_needs_clear_background (SpitTransitionsEffect* base);
-static void circles_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number);
-static void circles_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number);
+static void circles_effect_real_paint (SpitTransitionsEffect* base,
+ SpitTransitionsVisuals* visuals,
+ SpitTransitionsMotion* motion,
+ cairo_t* ctx,
+ gint width,
+ gint height,
+ gint frame_number);
+static void circles_effect_real_advance (SpitTransitionsEffect* base,
+ SpitTransitionsVisuals* visuals,
+ SpitTransitionsMotion* motion,
+ gint frame_number);
static void circles_effect_real_cancel (SpitTransitionsEffect* base);
-CirclesEffectDescriptor* circles_effect_descriptor_construct (GType object_type, GFile* resource_directory) {
+CirclesEffectDescriptor*
+circles_effect_descriptor_construct (GType object_type,
+ GFile* resource_directory)
+{
CirclesEffectDescriptor * self = NULL;
- GFile* _tmp0_;
#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
g_return_val_if_fail (G_IS_FILE (resource_directory), NULL);
#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp0_ = resource_directory;
-#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- self = (CirclesEffectDescriptor*) shotwell_transition_descriptor_construct (object_type, _tmp0_);
+ self = (CirclesEffectDescriptor*) shotwell_transition_descriptor_construct (object_type, resource_directory);
#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
return self;
-#line 132 "CirclesEffect.c"
+#line 153 "CirclesEffect.c"
}
-CirclesEffectDescriptor* circles_effect_descriptor_new (GFile* resource_directory) {
+CirclesEffectDescriptor*
+circles_effect_descriptor_new (GFile* resource_directory)
+{
#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
return circles_effect_descriptor_construct (TYPE_CIRCLES_EFFECT_DESCRIPTOR, resource_directory);
-#line 139 "CirclesEffect.c"
+#line 162 "CirclesEffect.c"
}
-static const gchar* circles_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base) {
+static const gchar*
+circles_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base)
+{
CirclesEffectDescriptor * self;
const gchar* result = NULL;
#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
@@ -148,11 +173,13 @@ static const gchar* circles_effect_descriptor_real_get_id (ShotwellTransitionDes
result = "org.yorba.shotwell.transitions.circles";
#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
return result;
-#line 152 "CirclesEffect.c"
+#line 177 "CirclesEffect.c"
}
-static const gchar* circles_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base) {
+static const gchar*
+circles_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base)
+{
CirclesEffectDescriptor * self;
const gchar* result = NULL;
#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
@@ -161,11 +188,14 @@ static const gchar* circles_effect_descriptor_real_get_pluggable_name (ShotwellT
result = _ ("Circles");
#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
return result;
-#line 165 "CirclesEffect.c"
+#line 192 "CirclesEffect.c"
}
-static SpitTransitionsEffect* circles_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host) {
+static SpitTransitionsEffect*
+circles_effect_descriptor_real_create (ShotwellTransitionDescriptor* base,
+ SpitHostInterface* host)
+{
CirclesEffectDescriptor * self;
SpitTransitionsEffect* result = NULL;
CirclesEffect* _tmp0_;
@@ -179,11 +209,13 @@ static SpitTransitionsEffect* circles_effect_descriptor_real_create (ShotwellTra
result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TRANSITIONS_TYPE_EFFECT, SpitTransitionsEffect);
#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
return result;
-#line 183 "CirclesEffect.c"
+#line 213 "CirclesEffect.c"
}
-static void circles_effect_descriptor_class_init (CirclesEffectDescriptorClass * klass) {
+static void
+circles_effect_descriptor_class_init (CirclesEffectDescriptorClass * klass)
+{
#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
circles_effect_descriptor_parent_class = g_type_class_peek_parent (klass);
#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
@@ -192,15 +224,19 @@ static void circles_effect_descriptor_class_init (CirclesEffectDescriptorClass *
((ShotwellTransitionDescriptorClass *) klass)->get_pluggable_name = (const gchar* (*) (ShotwellTransitionDescriptor *)) circles_effect_descriptor_real_get_pluggable_name;
#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
((ShotwellTransitionDescriptorClass *) klass)->create = (SpitTransitionsEffect* (*) (ShotwellTransitionDescriptor *, SpitHostInterface*)) circles_effect_descriptor_real_create;
-#line 196 "CirclesEffect.c"
+#line 228 "CirclesEffect.c"
}
-static void circles_effect_descriptor_instance_init (CirclesEffectDescriptor * self) {
+static void
+circles_effect_descriptor_instance_init (CirclesEffectDescriptor * self)
+{
}
-GType circles_effect_descriptor_get_type (void) {
+GType
+circles_effect_descriptor_get_type (void)
+{
static volatile gsize circles_effect_descriptor_type_id__volatile = 0;
if (g_once_init_enter (&circles_effect_descriptor_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (CirclesEffectDescriptorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) circles_effect_descriptor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CirclesEffectDescriptor), 0, (GInstanceInitFunc) circles_effect_descriptor_instance_init, NULL };
@@ -212,24 +248,32 @@ GType circles_effect_descriptor_get_type (void) {
}
-CirclesEffect* circles_effect_construct (GType object_type) {
+CirclesEffect*
+circles_effect_construct (GType object_type)
+{
CirclesEffect * self = NULL;
#line 33 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
self = (CirclesEffect*) g_object_new (object_type, NULL);
#line 33 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
return self;
-#line 222 "CirclesEffect.c"
+#line 260 "CirclesEffect.c"
}
-CirclesEffect* circles_effect_new (void) {
+CirclesEffect*
+circles_effect_new (void)
+{
#line 33 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
return circles_effect_construct (TYPE_CIRCLES_EFFECT);
-#line 229 "CirclesEffect.c"
+#line 269 "CirclesEffect.c"
}
-static void circles_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps) {
+static void
+circles_effect_real_get_fps (SpitTransitionsEffect* base,
+ gint* desired_fps,
+ gint* min_fps)
+{
CirclesEffect * self;
gint _vala_desired_fps = 0;
gint _vala_min_fps = 0;
@@ -243,18 +287,22 @@ static void circles_effect_real_get_fps (SpitTransitionsEffect* base, gint* desi
if (desired_fps) {
#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
*desired_fps = _vala_desired_fps;
-#line 247 "CirclesEffect.c"
+#line 291 "CirclesEffect.c"
}
#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
if (min_fps) {
#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
*min_fps = _vala_min_fps;
-#line 253 "CirclesEffect.c"
+#line 297 "CirclesEffect.c"
}
}
-static void circles_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion) {
+static void
+circles_effect_real_start (SpitTransitionsEffect* base,
+ SpitTransitionsVisuals* visuals,
+ SpitTransitionsMotion* motion)
+{
CirclesEffect * self;
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLES_EFFECT, CirclesEffect);
@@ -262,11 +310,13 @@ static void circles_effect_real_start (SpitTransitionsEffect* base, SpitTransiti
g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals));
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion));
-#line 266 "CirclesEffect.c"
+#line 314 "CirclesEffect.c"
}
-static gboolean circles_effect_real_needs_clear_background (SpitTransitionsEffect* base) {
+static gboolean
+circles_effect_real_needs_clear_background (SpitTransitionsEffect* base)
+{
CirclesEffect * self;
gboolean result = FALSE;
#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
@@ -275,32 +325,33 @@ static gboolean circles_effect_real_needs_clear_background (SpitTransitionsEffec
result = TRUE;
#line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
return result;
-#line 279 "CirclesEffect.c"
+#line 329 "CirclesEffect.c"
}
-static void circles_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number) {
+static void
+circles_effect_real_paint (SpitTransitionsEffect* base,
+ SpitTransitionsVisuals* visuals,
+ SpitTransitionsMotion* motion,
+ cairo_t* ctx,
+ gint width,
+ gint height,
+ gint frame_number)
+{
CirclesEffect * self;
gdouble alpha = 0.0;
- SpitTransitionsMotion* _tmp0_;
- gint _tmp1_;
- gdouble _tmp2_;
gint distance = 0;
gint radius = 0;
gint circleCountX = 0;
- gint _tmp3_;
- gint _tmp4_;
+ gint _tmp0_;
gint circleCountY = 0;
- gint _tmp5_;
- gint _tmp6_;
+ gint _tmp1_;
gdouble maxRadius = 0.0;
- gint _tmp7_;
- SpitTransitionsVisuals* _tmp8_;
- GdkPixbuf* _tmp9_;
- GdkPixbuf* _tmp10_;
- SpitTransitionsVisuals* _tmp25_;
- GdkPixbuf* _tmp26_;
- GdkPixbuf* _tmp27_;
+ gint _tmp2_;
+ GdkPixbuf* _tmp3_;
+ GdkPixbuf* _tmp4_;
+ GdkPixbuf* _tmp14_;
+ GdkPixbuf* _tmp15_;
#line 48 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLES_EFFECT, CirclesEffect);
#line 48 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
@@ -310,263 +361,208 @@ static void circles_effect_real_paint (SpitTransitionsEffect* base, SpitTransiti
#line 48 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
g_return_if_fail (ctx != NULL);
#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp0_ = motion;
-#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp1_ = frame_number;
-#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp2_ = spit_transitions_motion_get_alpha (_tmp0_, _tmp1_);
-#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- alpha = _tmp2_;
+ alpha = spit_transitions_motion_get_alpha (motion, frame_number);
#line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
distance = 60;
#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp3_ = width;
-#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp4_ = distance;
+ _tmp0_ = distance;
#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- circleCountX = _tmp3_ / (2 * _tmp4_);
+ circleCountX = width / (2 * _tmp0_);
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp5_ = height;
+ _tmp1_ = distance;
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp6_ = distance;
-#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- circleCountY = _tmp5_ / _tmp6_;
+ circleCountY = height / _tmp1_;
#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp7_ = distance;
+ _tmp2_ = distance;
#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- maxRadius = CIRCLES_EFFECT_SPEED * _tmp7_;
-#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp8_ = visuals;
+ maxRadius = CIRCLES_EFFECT_SPEED * _tmp2_;
#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp9_ = spit_transitions_visuals_get_from_pixbuf (_tmp8_);
+ _tmp3_ = spit_transitions_visuals_get_from_pixbuf (visuals);
#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp10_ = _tmp9_;
+ _tmp4_ = _tmp3_;
#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- if (_tmp10_ != NULL) {
-#line 347 "CirclesEffect.c"
- cairo_t* _tmp11_;
- SpitTransitionsVisuals* _tmp12_;
- GdkPixbuf* _tmp13_;
- GdkPixbuf* _tmp14_;
- SpitTransitionsVisuals* _tmp15_;
- GdkRectangle _tmp16_ = {0};
- GdkRectangle _tmp17_;
- gint _tmp18_;
- SpitTransitionsVisuals* _tmp19_;
- GdkRectangle _tmp20_ = {0};
- GdkRectangle _tmp21_;
- gint _tmp22_;
- cairo_t* _tmp23_;
- gdouble _tmp24_;
+ if (_tmp4_ != NULL) {
+#line 386 "CirclesEffect.c"
+ GdkPixbuf* _tmp5_;
+ GdkPixbuf* _tmp6_;
+ GdkRectangle _tmp7_ = {0};
+ GdkRectangle _tmp8_;
+ gint _tmp9_;
+ GdkRectangle _tmp10_ = {0};
+ GdkRectangle _tmp11_;
+ gint _tmp12_;
+ gdouble _tmp13_;
#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp11_ = ctx;
+ _tmp5_ = spit_transitions_visuals_get_from_pixbuf (visuals);
#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp12_ = visuals;
+ _tmp6_ = _tmp5_;
#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp13_ = spit_transitions_visuals_get_from_pixbuf (_tmp12_);
+ spit_transitions_visuals_get_from_pos (visuals, &_tmp7_);
#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp14_ = _tmp13_;
+ _tmp8_ = _tmp7_;
#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp15_ = visuals;
+ _tmp9_ = _tmp8_.x;
#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- spit_transitions_visuals_get_from_pos (_tmp15_, &_tmp16_);
+ spit_transitions_visuals_get_from_pos (visuals, &_tmp10_);
#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp17_ = _tmp16_;
-#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp18_ = _tmp17_.x;
-#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp19_ = visuals;
-#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- spit_transitions_visuals_get_from_pos (_tmp19_, &_tmp20_);
-#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp21_ = _tmp20_;
+ _tmp11_ = _tmp10_;
#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp22_ = _tmp21_.y;
+ _tmp12_ = _tmp11_.y;
#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- gdk_cairo_set_source_pixbuf (_tmp11_, _tmp14_, (gdouble) _tmp18_, (gdouble) _tmp22_);
+ gdk_cairo_set_source_pixbuf (ctx, _tmp6_, (gdouble) _tmp9_, (gdouble) _tmp12_);
#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp23_ = ctx;
+ _tmp13_ = alpha;
#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp24_ = alpha;
-#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- cairo_paint_with_alpha (_tmp23_, 1 - _tmp24_);
-#line 394 "CirclesEffect.c"
+ cairo_paint_with_alpha (ctx, 1 - _tmp13_);
+#line 418 "CirclesEffect.c"
}
#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp25_ = visuals;
-#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp26_ = spit_transitions_visuals_get_to_pixbuf (_tmp25_);
+ _tmp14_ = spit_transitions_visuals_get_to_pixbuf (visuals);
#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp27_ = _tmp26_;
+ _tmp15_ = _tmp14_;
#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- if (_tmp27_ != NULL) {
-#line 404 "CirclesEffect.c"
- cairo_t* _tmp28_;
- SpitTransitionsVisuals* _tmp29_;
- GdkPixbuf* _tmp30_;
- GdkPixbuf* _tmp31_;
- SpitTransitionsVisuals* _tmp32_;
- GdkRectangle _tmp33_ = {0};
- GdkRectangle _tmp34_;
- gint _tmp35_;
- SpitTransitionsVisuals* _tmp36_;
- GdkRectangle _tmp37_ = {0};
- GdkRectangle _tmp38_;
- gint _tmp39_;
- cairo_t* _tmp63_;
- cairo_t* _tmp64_;
- gdouble _tmp65_;
-#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp28_ = ctx;
-#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp29_ = visuals;
+ if (_tmp15_ != NULL) {
+#line 426 "CirclesEffect.c"
+ GdkPixbuf* _tmp16_;
+ GdkPixbuf* _tmp17_;
+ GdkRectangle _tmp18_ = {0};
+ GdkRectangle _tmp19_;
+ gint _tmp20_;
+ GdkRectangle _tmp21_ = {0};
+ GdkRectangle _tmp22_;
+ gint _tmp23_;
+ gdouble _tmp43_;
#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp30_ = spit_transitions_visuals_get_to_pixbuf (_tmp29_);
+ _tmp16_ = spit_transitions_visuals_get_to_pixbuf (visuals);
#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp31_ = _tmp30_;
-#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp32_ = visuals;
-#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- spit_transitions_visuals_get_to_pos (_tmp32_, &_tmp33_);
+ _tmp17_ = _tmp16_;
#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp34_ = _tmp33_;
+ spit_transitions_visuals_get_to_pos (visuals, &_tmp18_);
#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp35_ = _tmp34_.x;
+ _tmp19_ = _tmp18_;
#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp36_ = visuals;
+ _tmp20_ = _tmp19_.x;
#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- spit_transitions_visuals_get_to_pos (_tmp36_, &_tmp37_);
+ spit_transitions_visuals_get_to_pos (visuals, &_tmp21_);
#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp38_ = _tmp37_;
+ _tmp22_ = _tmp21_;
#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp39_ = _tmp38_.y;
+ _tmp23_ = _tmp22_.y;
#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- gdk_cairo_set_source_pixbuf (_tmp28_, _tmp31_, (gdouble) _tmp35_, (gdouble) _tmp39_);
-#line 446 "CirclesEffect.c"
+ gdk_cairo_set_source_pixbuf (ctx, _tmp17_, (gdouble) _tmp20_, (gdouble) _tmp23_);
+#line 454 "CirclesEffect.c"
{
gint y = 0;
#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
y = 0;
-#line 451 "CirclesEffect.c"
+#line 459 "CirclesEffect.c"
{
- gboolean _tmp40_ = FALSE;
+ gboolean _tmp24_ = FALSE;
#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp40_ = TRUE;
+ _tmp24_ = TRUE;
#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
while (TRUE) {
-#line 458 "CirclesEffect.c"
- gint _tmp42_;
- gint _tmp43_;
+#line 466 "CirclesEffect.c"
+ gint _tmp26_;
+ gint _tmp27_;
#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- if (!_tmp40_) {
-#line 463 "CirclesEffect.c"
- gint _tmp41_;
+ if (!_tmp24_) {
+#line 471 "CirclesEffect.c"
+ gint _tmp25_;
#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp41_ = y;
+ _tmp25_ = y;
#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- y = _tmp41_ + 1;
-#line 469 "CirclesEffect.c"
+ y = _tmp25_ + 1;
+#line 477 "CirclesEffect.c"
}
#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp40_ = FALSE;
+ _tmp24_ = FALSE;
#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp42_ = y;
+ _tmp26_ = y;
#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp43_ = circleCountY;
+ _tmp27_ = circleCountY;
#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- if (!(_tmp42_ <= _tmp43_)) {
+ if (!(_tmp26_ <= _tmp27_)) {
#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
break;
-#line 481 "CirclesEffect.c"
+#line 489 "CirclesEffect.c"
}
{
gint x = 0;
#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
x = 0;
-#line 487 "CirclesEffect.c"
+#line 495 "CirclesEffect.c"
{
- gboolean _tmp44_ = FALSE;
+ gboolean _tmp28_ = FALSE;
#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp44_ = TRUE;
+ _tmp28_ = TRUE;
#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
while (TRUE) {
-#line 494 "CirclesEffect.c"
- gint _tmp46_;
- gint _tmp47_;
- gdouble _tmp48_;
- gint _tmp49_;
- gint _tmp50_;
- gint _tmp51_;
- gint _tmp52_;
- gdouble _tmp53_;
- gdouble _tmp54_;
- gdouble _tmp55_;
- cairo_t* _tmp56_;
- gint _tmp57_;
- gint _tmp58_;
- gint _tmp59_;
- gint _tmp60_;
- gint _tmp61_;
- cairo_t* _tmp62_;
+#line 502 "CirclesEffect.c"
+ gint _tmp30_;
+ gint _tmp31_;
+ gdouble _tmp32_;
+ gint _tmp33_;
+ gint _tmp34_;
+ gint _tmp35_;
+ gint _tmp36_;
+ gdouble _tmp37_;
+ gint _tmp38_;
+ gint _tmp39_;
+ gint _tmp40_;
+ gint _tmp41_;
+ gint _tmp42_;
#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- if (!_tmp44_) {
-#line 514 "CirclesEffect.c"
- gint _tmp45_;
+ if (!_tmp28_) {
+#line 518 "CirclesEffect.c"
+ gint _tmp29_;
#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp45_ = x;
+ _tmp29_ = x;
#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- x = _tmp45_ + 1;
-#line 520 "CirclesEffect.c"
+ x = _tmp29_ + 1;
+#line 524 "CirclesEffect.c"
}
#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp44_ = FALSE;
+ _tmp28_ = FALSE;
#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp46_ = x;
+ _tmp30_ = x;
#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp47_ = circleCountX;
+ _tmp31_ = circleCountX;
#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- if (!(_tmp46_ <= _tmp47_)) {
+ if (!(_tmp30_ <= _tmp31_)) {
#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
break;
-#line 532 "CirclesEffect.c"
+#line 536 "CirclesEffect.c"
}
#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp48_ = alpha;
-#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp49_ = x;
-#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp50_ = y;
+ _tmp32_ = alpha;
#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp51_ = circleCountY;
+ _tmp33_ = x;
#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp52_ = circleCountX;
+ _tmp34_ = y;
#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp53_ = fmin ((gdouble) 1, _tmp48_ - (((gdouble) (_tmp49_ + _tmp50_)) / ((gdouble) ((_tmp51_ + _tmp52_) * CIRCLES_EFFECT_SPEED))));
+ _tmp35_ = circleCountY;
#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp54_ = fmax ((gdouble) 0, _tmp53_);
+ _tmp36_ = circleCountX;
#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp55_ = maxRadius;
+ _tmp37_ = maxRadius;
#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- radius = (gint) (_tmp54_ * _tmp55_);
+ radius = (gint) (fmax ((gdouble) 0, fmin ((gdouble) 1, _tmp32_ - (((gdouble) (_tmp33_ + _tmp34_)) / ((gdouble) ((_tmp35_ + _tmp36_) * CIRCLES_EFFECT_SPEED))))) * _tmp37_);
#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp56_ = ctx;
+ _tmp38_ = distance;
#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp57_ = distance;
+ _tmp39_ = x;
#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp58_ = x;
+ _tmp40_ = distance;
#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp59_ = distance;
+ _tmp41_ = y;
#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp60_ = y;
+ _tmp42_ = radius;
#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp61_ = radius;
-#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- cairo_arc (_tmp56_, (gdouble) ((2 * _tmp57_) * _tmp58_), (gdouble) ((2 * _tmp59_) * _tmp60_), (gdouble) _tmp61_, (gdouble) 0, 2 * G_PI);
-#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp62_ = ctx;
+ cairo_arc (ctx, (gdouble) ((2 * _tmp38_) * _tmp39_), (gdouble) ((2 * _tmp40_) * _tmp41_), (gdouble) _tmp42_, (gdouble) 0, 2 * G_PI);
#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- cairo_fill (_tmp62_);
-#line 570 "CirclesEffect.c"
+ cairo_fill (ctx);
+#line 566 "CirclesEffect.c"
}
}
}
@@ -574,21 +570,22 @@ static void circles_effect_real_paint (SpitTransitionsEffect* base, SpitTransiti
}
}
#line 74 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp63_ = ctx;
-#line 74 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- cairo_clip (_tmp63_);
-#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp64_ = ctx;
+ cairo_clip (ctx);
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- _tmp65_ = alpha;
+ _tmp43_ = alpha;
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
- cairo_paint_with_alpha (_tmp64_, _tmp65_);
-#line 587 "CirclesEffect.c"
+ cairo_paint_with_alpha (ctx, _tmp43_);
+#line 579 "CirclesEffect.c"
}
}
-static void circles_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number) {
+static void
+circles_effect_real_advance (SpitTransitionsEffect* base,
+ SpitTransitionsVisuals* visuals,
+ SpitTransitionsMotion* motion,
+ gint frame_number)
+{
CirclesEffect * self;
#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLES_EFFECT, CirclesEffect);
@@ -596,26 +593,32 @@ static void circles_effect_real_advance (SpitTransitionsEffect* base, SpitTransi
g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals));
#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion));
-#line 600 "CirclesEffect.c"
+#line 597 "CirclesEffect.c"
}
-static void circles_effect_real_cancel (SpitTransitionsEffect* base) {
+static void
+circles_effect_real_cancel (SpitTransitionsEffect* base)
+{
CirclesEffect * self;
#line 84 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLES_EFFECT, CirclesEffect);
-#line 608 "CirclesEffect.c"
+#line 607 "CirclesEffect.c"
}
-static void circles_effect_class_init (CirclesEffectClass * klass) {
+static void
+circles_effect_class_init (CirclesEffectClass * klass)
+{
#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
circles_effect_parent_class = g_type_class_peek_parent (klass);
-#line 615 "CirclesEffect.c"
+#line 616 "CirclesEffect.c"
}
-static void circles_effect_spit_transitions_effect_interface_init (SpitTransitionsEffectIface * iface) {
+static void
+circles_effect_spit_transitions_effect_interface_init (SpitTransitionsEffectIface * iface)
+{
#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
circles_effect_spit_transitions_effect_parent_iface = g_type_interface_peek_parent (iface);
#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
@@ -630,15 +633,19 @@ static void circles_effect_spit_transitions_effect_interface_init (SpitTransitio
iface->advance = (void (*) (SpitTransitionsEffect *, SpitTransitionsVisuals*, SpitTransitionsMotion*, gint)) circles_effect_real_advance;
#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
iface->cancel = (void (*) (SpitTransitionsEffect *)) circles_effect_real_cancel;
-#line 634 "CirclesEffect.c"
+#line 637 "CirclesEffect.c"
}
-static void circles_effect_instance_init (CirclesEffect * self) {
+static void
+circles_effect_instance_init (CirclesEffect * self)
+{
}
-GType circles_effect_get_type (void) {
+GType
+circles_effect_get_type (void)
+{
static volatile gsize circles_effect_type_id__volatile = 0;
if (g_once_init_enter (&circles_effect_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (CirclesEffectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) circles_effect_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CirclesEffect), 0, (GInstanceInitFunc) circles_effect_instance_init, NULL };