From ab841afa5cb39058d9ab2cebb67cfe6369443f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 25 Jun 2018 20:55:59 +0200 Subject: New upstream version 0.28.3 --- plugins/shotwell-transitions/SquaresEffect.c | 536 ++++++++++++++------------- 1 file changed, 271 insertions(+), 265 deletions(-) (limited to 'plugins/shotwell-transitions/SquaresEffect.c') diff --git a/plugins/shotwell-transitions/SquaresEffect.c b/plugins/shotwell-transitions/SquaresEffect.c index 402d502..50bef64 100644 --- a/plugins/shotwell-transitions/SquaresEffect.c +++ b/plugins/shotwell-transitions/SquaresEffect.c @@ -1,4 +1,4 @@ -/* SquaresEffect.c generated by valac 0.36.6, the Vala compiler +/* SquaresEffect.c generated by valac 0.40.4, the Vala compiler * generated from SquaresEffect.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 #include #include @@ -42,6 +43,11 @@ typedef struct _ShotwellTransitionDescriptorPrivate ShotwellTransitionDescriptor typedef struct _SquaresEffectDescriptor SquaresEffectDescriptor; typedef struct _SquaresEffectDescriptorClass SquaresEffectDescriptorClass; typedef struct _SquaresEffectDescriptorPrivate SquaresEffectDescriptorPrivate; +enum { + SQUARES_EFFECT_DESCRIPTOR_0_PROPERTY, + SQUARES_EFFECT_DESCRIPTOR_NUM_PROPERTIES +}; +static GParamSpec* squares_effect_descriptor_properties[SQUARES_EFFECT_DESCRIPTOR_NUM_PROPERTIES]; #define TYPE_SQUARES_EFFECT (squares_effect_get_type ()) #define SQUARES_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SQUARES_EFFECT, SquaresEffect)) @@ -53,6 +59,11 @@ typedef struct _SquaresEffectDescriptorPrivate SquaresEffectDescriptorPrivate; typedef struct _SquaresEffect SquaresEffect; typedef struct _SquaresEffectClass SquaresEffectClass; typedef struct _SquaresEffectPrivate SquaresEffectPrivate; +enum { + SQUARES_EFFECT_0_PROPERTY, + SQUARES_EFFECT_NUM_PROPERTIES +}; +static GParamSpec* squares_effect_properties[SQUARES_EFFECT_NUM_PROPERTIES]; struct _ShotwellTransitionDescriptor { GObject parent_instance; @@ -96,57 +107,71 @@ static SpitTransitionsEffectIface * squares_effect_spit_transitions_effect_paren GType shotwell_transition_descriptor_get_type (void) G_GNUC_CONST; GType squares_effect_descriptor_get_type (void) G_GNUC_CONST; -enum { - SQUARES_EFFECT_DESCRIPTOR_DUMMY_PROPERTY -}; SquaresEffectDescriptor* squares_effect_descriptor_new (GFile* resource_directory); -SquaresEffectDescriptor* squares_effect_descriptor_construct (GType object_type, GFile* resource_directory); -ShotwellTransitionDescriptor* shotwell_transition_descriptor_construct (GType object_type, GFile* resource_directory); +SquaresEffectDescriptor* squares_effect_descriptor_construct (GType object_type, + GFile* resource_directory); +ShotwellTransitionDescriptor* shotwell_transition_descriptor_construct (GType object_type, + GFile* resource_directory); static const gchar* squares_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base); static const gchar* squares_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base); -static SpitTransitionsEffect* squares_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host); +static SpitTransitionsEffect* squares_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, + SpitHostInterface* host); SquaresEffect* squares_effect_new (void); SquaresEffect* squares_effect_construct (GType object_type); GType squares_effect_get_type (void) G_GNUC_CONST; #define SQUARES_EFFECT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SQUARES_EFFECT, SquaresEffectPrivate)) -enum { - SQUARES_EFFECT_DUMMY_PROPERTY -}; #define SQUARES_EFFECT_DESIRED_FPS 25 #define SQUARES_EFFECT_MIN_FPS 10 #define SQUARES_EFFECT_SQUARE_SIZE 100 -static void squares_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps); -static void squares_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion); +static void squares_effect_real_get_fps (SpitTransitionsEffect* base, + gint* desired_fps, + gint* min_fps); +static void squares_effect_real_start (SpitTransitionsEffect* base, + SpitTransitionsVisuals* visuals, + SpitTransitionsMotion* motion); static gboolean squares_effect_real_needs_clear_background (SpitTransitionsEffect* base); -static void squares_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number); -static void squares_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number); +static void squares_effect_real_paint (SpitTransitionsEffect* base, + SpitTransitionsVisuals* visuals, + SpitTransitionsMotion* motion, + cairo_t* ctx, + gint width, + gint height, + gint frame_number); +static void squares_effect_real_advance (SpitTransitionsEffect* base, + SpitTransitionsVisuals* visuals, + SpitTransitionsMotion* motion, + gint frame_number); static void squares_effect_real_cancel (SpitTransitionsEffect* base); static void squares_effect_finalize (GObject * obj); -SquaresEffectDescriptor* squares_effect_descriptor_construct (GType object_type, GFile* resource_directory) { +SquaresEffectDescriptor* +squares_effect_descriptor_construct (GType object_type, + GFile* resource_directory) +{ SquaresEffectDescriptor * self = NULL; - GFile* _tmp0_; #line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); #line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp0_ = resource_directory; -#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - self = (SquaresEffectDescriptor*) shotwell_transition_descriptor_construct (object_type, _tmp0_); + self = (SquaresEffectDescriptor*) shotwell_transition_descriptor_construct (object_type, resource_directory); #line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" return self; -#line 139 "SquaresEffect.c" +#line 160 "SquaresEffect.c" } -SquaresEffectDescriptor* squares_effect_descriptor_new (GFile* resource_directory) { +SquaresEffectDescriptor* +squares_effect_descriptor_new (GFile* resource_directory) +{ #line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" return squares_effect_descriptor_construct (TYPE_SQUARES_EFFECT_DESCRIPTOR, resource_directory); -#line 146 "SquaresEffect.c" +#line 169 "SquaresEffect.c" } -static const gchar* squares_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base) { +static const gchar* +squares_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base) +{ SquaresEffectDescriptor * self; const gchar* result = NULL; #line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" @@ -155,11 +180,13 @@ static const gchar* squares_effect_descriptor_real_get_id (ShotwellTransitionDes result = "org.yorba.shotwell.transitions.squares"; #line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" return result; -#line 159 "SquaresEffect.c" +#line 184 "SquaresEffect.c" } -static const gchar* squares_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base) { +static const gchar* +squares_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base) +{ SquaresEffectDescriptor * self; const gchar* result = NULL; #line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" @@ -168,11 +195,14 @@ static const gchar* squares_effect_descriptor_real_get_pluggable_name (ShotwellT result = _ ("Squares"); #line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" return result; -#line 172 "SquaresEffect.c" +#line 199 "SquaresEffect.c" } -static SpitTransitionsEffect* squares_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host) { +static SpitTransitionsEffect* +squares_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, + SpitHostInterface* host) +{ SquaresEffectDescriptor * self; SpitTransitionsEffect* result = NULL; SquaresEffect* _tmp0_; @@ -186,11 +216,13 @@ static SpitTransitionsEffect* squares_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/SquaresEffect.vala" return result; -#line 190 "SquaresEffect.c" +#line 220 "SquaresEffect.c" } -static void squares_effect_descriptor_class_init (SquaresEffectDescriptorClass * klass) { +static void +squares_effect_descriptor_class_init (SquaresEffectDescriptorClass * klass) +{ #line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" squares_effect_descriptor_parent_class = g_type_class_peek_parent (klass); #line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" @@ -199,15 +231,19 @@ static void squares_effect_descriptor_class_init (SquaresEffectDescriptorClass * ((ShotwellTransitionDescriptorClass *) klass)->get_pluggable_name = (const gchar* (*) (ShotwellTransitionDescriptor *)) squares_effect_descriptor_real_get_pluggable_name; #line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" ((ShotwellTransitionDescriptorClass *) klass)->create = (SpitTransitionsEffect* (*) (ShotwellTransitionDescriptor *, SpitHostInterface*)) squares_effect_descriptor_real_create; -#line 203 "SquaresEffect.c" +#line 235 "SquaresEffect.c" } -static void squares_effect_descriptor_instance_init (SquaresEffectDescriptor * self) { +static void +squares_effect_descriptor_instance_init (SquaresEffectDescriptor * self) +{ } -GType squares_effect_descriptor_get_type (void) { +GType +squares_effect_descriptor_get_type (void) +{ static volatile gsize squares_effect_descriptor_type_id__volatile = 0; if (g_once_init_enter (&squares_effect_descriptor_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (SquaresEffectDescriptorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) squares_effect_descriptor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SquaresEffectDescriptor), 0, (GInstanceInitFunc) squares_effect_descriptor_instance_init, NULL }; @@ -219,24 +255,32 @@ GType squares_effect_descriptor_get_type (void) { } -SquaresEffect* squares_effect_construct (GType object_type) { +SquaresEffect* +squares_effect_construct (GType object_type) +{ SquaresEffect * self = NULL; #line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" self = (SquaresEffect*) g_object_new (object_type, NULL); #line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" return self; -#line 229 "SquaresEffect.c" +#line 267 "SquaresEffect.c" } -SquaresEffect* squares_effect_new (void) { +SquaresEffect* +squares_effect_new (void) +{ #line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" return squares_effect_construct (TYPE_SQUARES_EFFECT); -#line 236 "SquaresEffect.c" +#line 276 "SquaresEffect.c" } -static void squares_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps) { +static void +squares_effect_real_get_fps (SpitTransitionsEffect* base, + gint* desired_fps, + gint* min_fps) +{ SquaresEffect * self; gint _vala_desired_fps = 0; gint _vala_min_fps = 0; @@ -250,27 +294,29 @@ static void squares_effect_real_get_fps (SpitTransitionsEffect* base, gint* desi if (desired_fps) { #line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" *desired_fps = _vala_desired_fps; -#line 254 "SquaresEffect.c" +#line 298 "SquaresEffect.c" } #line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" if (min_fps) { #line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" *min_fps = _vala_min_fps; -#line 260 "SquaresEffect.c" +#line 304 "SquaresEffect.c" } } -static void squares_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion) { +static void +squares_effect_real_start (SpitTransitionsEffect* base, + SpitTransitionsVisuals* visuals, + SpitTransitionsMotion* motion) +{ SquaresEffect * self; - SpitTransitionsVisuals* _tmp0_; - GdkRectangle _tmp1_ = {0}; - GdkRectangle _tmp2_; - gint _tmp3_; - SpitTransitionsVisuals* _tmp4_; - GdkRectangle _tmp5_ = {0}; - GdkRectangle _tmp6_; - gint _tmp7_; + GdkRectangle _tmp0_ = {0}; + GdkRectangle _tmp1_; + gint _tmp2_; + GdkRectangle _tmp3_ = {0}; + GdkRectangle _tmp4_; + gint _tmp5_; #line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SQUARES_EFFECT, SquaresEffect); #line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" @@ -278,30 +324,28 @@ static void squares_effect_real_start (SpitTransitionsEffect* base, SpitTransiti #line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); #line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp0_ = visuals; -#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - spit_transitions_visuals_get_to_pos (_tmp0_, &_tmp1_); + spit_transitions_visuals_get_to_pos (visuals, &_tmp0_); #line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp2_ = _tmp1_; + _tmp1_ = _tmp0_; #line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp3_ = _tmp2_.width; + _tmp2_ = _tmp1_.width; #line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - self->priv->square_count_x = (gdouble) ((_tmp3_ / SQUARES_EFFECT_SQUARE_SIZE) + 1); + self->priv->square_count_x = (gdouble) ((_tmp2_ / SQUARES_EFFECT_SQUARE_SIZE) + 1); #line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp4_ = visuals; + spit_transitions_visuals_get_to_pos (visuals, &_tmp3_); #line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - spit_transitions_visuals_get_to_pos (_tmp4_, &_tmp5_); + _tmp4_ = _tmp3_; #line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp6_ = _tmp5_; + _tmp5_ = _tmp4_.height; #line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp7_ = _tmp6_.height; -#line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - self->priv->square_count_y = (gdouble) ((_tmp7_ / SQUARES_EFFECT_SQUARE_SIZE) + 1); -#line 301 "SquaresEffect.c" + self->priv->square_count_y = (gdouble) ((_tmp5_ / SQUARES_EFFECT_SQUARE_SIZE) + 1); +#line 343 "SquaresEffect.c" } -static gboolean squares_effect_real_needs_clear_background (SpitTransitionsEffect* base) { +static gboolean +squares_effect_real_needs_clear_background (SpitTransitionsEffect* base) +{ SquaresEffect * self; gboolean result = FALSE; #line 48 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" @@ -310,22 +354,25 @@ static gboolean squares_effect_real_needs_clear_background (SpitTransitionsEffec result = TRUE; #line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" return result; -#line 314 "SquaresEffect.c" +#line 358 "SquaresEffect.c" } -static void squares_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number) { +static void +squares_effect_real_paint (SpitTransitionsEffect* base, + SpitTransitionsVisuals* visuals, + SpitTransitionsMotion* motion, + cairo_t* ctx, + gint width, + gint height, + gint frame_number) +{ SquaresEffect * self; gdouble alpha = 0.0; - SpitTransitionsMotion* _tmp0_; - gint _tmp1_; - gdouble _tmp2_; - SpitTransitionsVisuals* _tmp3_; - GdkPixbuf* _tmp4_; - GdkPixbuf* _tmp5_; - SpitTransitionsVisuals* _tmp20_; - GdkPixbuf* _tmp21_; - GdkPixbuf* _tmp22_; + GdkPixbuf* _tmp0_; + GdkPixbuf* _tmp1_; + GdkPixbuf* _tmp11_; + GdkPixbuf* _tmp12_; #line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SQUARES_EFFECT, SquaresEffect); #line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" @@ -335,267 +382,213 @@ static void squares_effect_real_paint (SpitTransitionsEffect* base, SpitTransiti #line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" g_return_if_fail (ctx != NULL); #line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp0_ = motion; -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp1_ = frame_number; -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp2_ = spit_transitions_motion_get_alpha (_tmp0_, _tmp1_); -#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - alpha = _tmp2_; -#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp3_ = visuals; + alpha = spit_transitions_motion_get_alpha (motion, frame_number); #line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp4_ = spit_transitions_visuals_get_from_pixbuf (_tmp3_); + _tmp0_ = spit_transitions_visuals_get_from_pixbuf (visuals); #line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp5_ = _tmp4_; + _tmp1_ = _tmp0_; #line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - if (_tmp5_ != NULL) { -#line 354 "SquaresEffect.c" - cairo_t* _tmp6_; - SpitTransitionsVisuals* _tmp7_; - GdkPixbuf* _tmp8_; - GdkPixbuf* _tmp9_; - SpitTransitionsVisuals* _tmp10_; - GdkRectangle _tmp11_ = {0}; - GdkRectangle _tmp12_; - gint _tmp13_; - SpitTransitionsVisuals* _tmp14_; - GdkRectangle _tmp15_ = {0}; - GdkRectangle _tmp16_; - gint _tmp17_; - cairo_t* _tmp18_; - gdouble _tmp19_; -#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp6_ = ctx; -#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp7_ = visuals; + if (_tmp1_ != NULL) { +#line 393 "SquaresEffect.c" + GdkPixbuf* _tmp2_; + GdkPixbuf* _tmp3_; + GdkRectangle _tmp4_ = {0}; + GdkRectangle _tmp5_; + gint _tmp6_; + GdkRectangle _tmp7_ = {0}; + GdkRectangle _tmp8_; + gint _tmp9_; + gdouble _tmp10_; #line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp8_ = spit_transitions_visuals_get_from_pixbuf (_tmp7_); + _tmp2_ = spit_transitions_visuals_get_from_pixbuf (visuals); #line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp9_ = _tmp8_; + _tmp3_ = _tmp2_; #line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp10_ = visuals; + spit_transitions_visuals_get_from_pos (visuals, &_tmp4_); #line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - spit_transitions_visuals_get_from_pos (_tmp10_, &_tmp11_); + _tmp5_ = _tmp4_; #line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp12_ = _tmp11_; + _tmp6_ = _tmp5_.x; #line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp13_ = _tmp12_.x; + spit_transitions_visuals_get_from_pos (visuals, &_tmp7_); #line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp14_ = visuals; + _tmp8_ = _tmp7_; #line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - spit_transitions_visuals_get_from_pos (_tmp14_, &_tmp15_); + _tmp9_ = _tmp8_.y; #line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp16_ = _tmp15_; -#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp17_ = _tmp16_.y; -#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - gdk_cairo_set_source_pixbuf (_tmp6_, _tmp9_, (gdouble) _tmp13_, (gdouble) _tmp17_); + gdk_cairo_set_source_pixbuf (ctx, _tmp3_, (gdouble) _tmp6_, (gdouble) _tmp9_); #line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp18_ = ctx; + _tmp10_ = alpha; #line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp19_ = alpha; -#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - cairo_paint_with_alpha (_tmp18_, 1 - _tmp19_); -#line 401 "SquaresEffect.c" + cairo_paint_with_alpha (ctx, 1 - _tmp10_); +#line 425 "SquaresEffect.c" } #line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp20_ = visuals; -#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp21_ = spit_transitions_visuals_get_to_pixbuf (_tmp20_); + _tmp11_ = spit_transitions_visuals_get_to_pixbuf (visuals); #line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp22_ = _tmp21_; + _tmp12_ = _tmp11_; #line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - if (_tmp22_ != NULL) { -#line 411 "SquaresEffect.c" - cairo_t* _tmp23_; - SpitTransitionsVisuals* _tmp24_; - GdkPixbuf* _tmp25_; - GdkPixbuf* _tmp26_; - SpitTransitionsVisuals* _tmp27_; - GdkRectangle _tmp28_ = {0}; - GdkRectangle _tmp29_; - gint _tmp30_; - SpitTransitionsVisuals* _tmp31_; - GdkRectangle _tmp32_ = {0}; - GdkRectangle _tmp33_; - gint _tmp34_; - cairo_t* _tmp65_; - cairo_t* _tmp66_; - gdouble _tmp67_; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp23_ = ctx; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp24_ = visuals; -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp25_ = spit_transitions_visuals_get_to_pixbuf (_tmp24_); -#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp26_ = _tmp25_; + if (_tmp12_ != NULL) { +#line 433 "SquaresEffect.c" + GdkPixbuf* _tmp13_; + GdkPixbuf* _tmp14_; + GdkRectangle _tmp15_ = {0}; + GdkRectangle _tmp16_; + gint _tmp17_; + GdkRectangle _tmp18_ = {0}; + GdkRectangle _tmp19_; + gint _tmp20_; + gdouble _tmp46_; #line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp27_ = visuals; + _tmp13_ = spit_transitions_visuals_get_to_pixbuf (visuals); #line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - spit_transitions_visuals_get_to_pos (_tmp27_, &_tmp28_); + _tmp14_ = _tmp13_; #line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp29_ = _tmp28_; + spit_transitions_visuals_get_to_pos (visuals, &_tmp15_); #line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp30_ = _tmp29_.x; + _tmp16_ = _tmp15_; #line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp31_ = visuals; + _tmp17_ = _tmp16_.x; #line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - spit_transitions_visuals_get_to_pos (_tmp31_, &_tmp32_); + spit_transitions_visuals_get_to_pos (visuals, &_tmp18_); #line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp33_ = _tmp32_; + _tmp19_ = _tmp18_; #line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp34_ = _tmp33_.y; + _tmp20_ = _tmp19_.y; #line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - gdk_cairo_set_source_pixbuf (_tmp23_, _tmp26_, (gdouble) _tmp30_, (gdouble) _tmp34_); -#line 453 "SquaresEffect.c" + gdk_cairo_set_source_pixbuf (ctx, _tmp14_, (gdouble) _tmp17_, (gdouble) _tmp20_); +#line 461 "SquaresEffect.c" { gdouble y = 0.0; #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" y = (gdouble) 0; -#line 458 "SquaresEffect.c" +#line 466 "SquaresEffect.c" { - gboolean _tmp35_ = FALSE; + gboolean _tmp21_ = FALSE; #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp35_ = TRUE; + _tmp21_ = TRUE; #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" while (TRUE) { -#line 465 "SquaresEffect.c" - gdouble _tmp37_; - gdouble _tmp38_; +#line 473 "SquaresEffect.c" + gdouble _tmp23_; + gdouble _tmp24_; #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - if (!_tmp35_) { -#line 470 "SquaresEffect.c" - gdouble _tmp36_; + if (!_tmp21_) { +#line 478 "SquaresEffect.c" + gdouble _tmp22_; #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp36_ = y; + _tmp22_ = y; #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - y = _tmp36_ + 1; -#line 476 "SquaresEffect.c" + y = _tmp22_ + 1; +#line 484 "SquaresEffect.c" } #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp35_ = FALSE; + _tmp21_ = FALSE; #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp37_ = y; + _tmp23_ = y; #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp38_ = self->priv->square_count_y; + _tmp24_ = self->priv->square_count_y; #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - if (!(_tmp37_ <= _tmp38_)) { + if (!(_tmp23_ <= _tmp24_)) { #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" break; -#line 488 "SquaresEffect.c" +#line 496 "SquaresEffect.c" } { gdouble x = 0.0; #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" x = (gdouble) 0; -#line 494 "SquaresEffect.c" +#line 502 "SquaresEffect.c" { - gboolean _tmp39_ = FALSE; + gboolean _tmp25_ = FALSE; #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp39_ = TRUE; + _tmp25_ = TRUE; #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" while (TRUE) { -#line 501 "SquaresEffect.c" - gdouble _tmp41_; - gdouble _tmp42_; +#line 509 "SquaresEffect.c" + gdouble _tmp27_; + gdouble _tmp28_; gdouble size = 0.0; + gdouble _tmp29_; + gdouble _tmp30_; + gdouble _tmp31_; + gdouble _tmp32_; + gdouble _tmp33_; + gdouble _tmp34_; + gdouble _tmp35_; + GdkRectangle _tmp36_ = {0}; + GdkRectangle _tmp37_; + gint _tmp38_; + gdouble _tmp39_; + GdkRectangle _tmp40_ = {0}; + GdkRectangle _tmp41_; + gint _tmp42_; gdouble _tmp43_; gdouble _tmp44_; gdouble _tmp45_; - gdouble _tmp46_; - gdouble _tmp47_; - gdouble _tmp48_; - gdouble _tmp49_; - gdouble _tmp50_; - cairo_t* _tmp51_; - SpitTransitionsVisuals* _tmp52_; - GdkRectangle _tmp53_ = {0}; - GdkRectangle _tmp54_; - gint _tmp55_; - gdouble _tmp56_; - SpitTransitionsVisuals* _tmp57_; - GdkRectangle _tmp58_ = {0}; - GdkRectangle _tmp59_; - gint _tmp60_; - gdouble _tmp61_; - gdouble _tmp62_; - gdouble _tmp63_; - cairo_t* _tmp64_; #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - if (!_tmp39_) { -#line 529 "SquaresEffect.c" - gdouble _tmp40_; + if (!_tmp25_) { +#line 532 "SquaresEffect.c" + gdouble _tmp26_; #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp40_ = x; + _tmp26_ = x; #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - x = _tmp40_ + 1; -#line 535 "SquaresEffect.c" + x = _tmp26_ + 1; +#line 538 "SquaresEffect.c" } #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp39_ = FALSE; + _tmp25_ = FALSE; #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp41_ = x; + _tmp27_ = x; #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp42_ = self->priv->square_count_x; + _tmp28_ = self->priv->square_count_x; #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - if (!(_tmp41_ <= _tmp42_)) { + if (!(_tmp27_ <= _tmp28_)) { #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" break; -#line 547 "SquaresEffect.c" +#line 550 "SquaresEffect.c" } #line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp43_ = alpha; + _tmp29_ = alpha; #line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp44_ = self->priv->square_count_x; + _tmp30_ = self->priv->square_count_x; #line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp45_ = x; + _tmp31_ = x; #line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp46_ = self->priv->square_count_x; + _tmp32_ = self->priv->square_count_x; #line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp47_ = self->priv->square_count_y; + _tmp33_ = self->priv->square_count_y; #line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp48_ = y; + _tmp34_ = y; #line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp49_ = self->priv->square_count_y; + _tmp35_ = self->priv->square_count_y; #line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp50_ = fmin ((gdouble) 1, _tmp43_ + ((((_tmp44_ - _tmp45_) / _tmp46_) + ((_tmp47_ - _tmp48_) / _tmp49_)) / 2.5)); -#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - size = SQUARES_EFFECT_SQUARE_SIZE * _tmp50_; -#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp51_ = ctx; + size = SQUARES_EFFECT_SQUARE_SIZE * fmin ((gdouble) 1, _tmp29_ + ((((_tmp30_ - _tmp31_) / _tmp32_) + ((_tmp33_ - _tmp34_) / _tmp35_)) / 2.5)); #line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp52_ = visuals; + spit_transitions_visuals_get_to_pos (visuals, &_tmp36_); #line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - spit_transitions_visuals_get_to_pos (_tmp52_, &_tmp53_); + _tmp37_ = _tmp36_; #line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp54_ = _tmp53_; + _tmp38_ = _tmp37_.x; #line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp55_ = _tmp54_.x; + _tmp39_ = x; #line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp56_ = x; + spit_transitions_visuals_get_to_pos (visuals, &_tmp40_); #line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp57_ = visuals; + _tmp41_ = _tmp40_; #line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - spit_transitions_visuals_get_to_pos (_tmp57_, &_tmp58_); + _tmp42_ = _tmp41_.y; #line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp59_ = _tmp58_; + _tmp43_ = y; #line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp60_ = _tmp59_.y; + _tmp44_ = size; #line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp61_ = y; + _tmp45_ = size; #line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp62_ = size; -#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp63_ = size; -#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - cairo_rectangle (_tmp51_, _tmp55_ + (_tmp56_ * SQUARES_EFFECT_SQUARE_SIZE), _tmp60_ + (_tmp61_ * SQUARES_EFFECT_SQUARE_SIZE), _tmp62_, _tmp63_); -#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp64_ = ctx; + cairo_rectangle (ctx, _tmp38_ + (_tmp39_ * SQUARES_EFFECT_SQUARE_SIZE), _tmp42_ + (_tmp43_ * SQUARES_EFFECT_SQUARE_SIZE), _tmp44_, _tmp45_); #line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - cairo_fill (_tmp64_); -#line 599 "SquaresEffect.c" + cairo_fill (ctx); +#line 592 "SquaresEffect.c" } } } @@ -603,21 +596,22 @@ static void squares_effect_real_paint (SpitTransitionsEffect* base, SpitTransiti } } #line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp65_ = ctx; -#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - cairo_clip (_tmp65_); -#line 76 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp66_ = ctx; + cairo_clip (ctx); #line 76 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - _tmp67_ = alpha; + _tmp46_ = alpha; #line 76 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" - cairo_paint_with_alpha (_tmp66_, _tmp67_); -#line 616 "SquaresEffect.c" + cairo_paint_with_alpha (ctx, _tmp46_); +#line 605 "SquaresEffect.c" } } -static void squares_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number) { +static void +squares_effect_real_advance (SpitTransitionsEffect* base, + SpitTransitionsVisuals* visuals, + SpitTransitionsMotion* motion, + gint frame_number) +{ SquaresEffect * self; #line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SQUARES_EFFECT, SquaresEffect); @@ -625,30 +619,36 @@ static void squares_effect_real_advance (SpitTransitionsEffect* base, SpitTransi g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); #line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); -#line 629 "SquaresEffect.c" +#line 623 "SquaresEffect.c" } -static void squares_effect_real_cancel (SpitTransitionsEffect* base) { +static void +squares_effect_real_cancel (SpitTransitionsEffect* base) +{ SquaresEffect * self; #line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SQUARES_EFFECT, SquaresEffect); -#line 637 "SquaresEffect.c" +#line 633 "SquaresEffect.c" } -static void squares_effect_class_init (SquaresEffectClass * klass) { +static void +squares_effect_class_init (SquaresEffectClass * klass) +{ #line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" squares_effect_parent_class = g_type_class_peek_parent (klass); #line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" g_type_class_add_private (klass, sizeof (SquaresEffectPrivate)); #line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" G_OBJECT_CLASS (klass)->finalize = squares_effect_finalize; -#line 648 "SquaresEffect.c" +#line 646 "SquaresEffect.c" } -static void squares_effect_spit_transitions_effect_interface_init (SpitTransitionsEffectIface * iface) { +static void +squares_effect_spit_transitions_effect_interface_init (SpitTransitionsEffectIface * iface) +{ #line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" squares_effect_spit_transitions_effect_parent_iface = g_type_interface_peek_parent (iface); #line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" @@ -667,24 +667,30 @@ static void squares_effect_spit_transitions_effect_interface_init (SpitTransitio } -static void squares_effect_instance_init (SquaresEffect * self) { +static void +squares_effect_instance_init (SquaresEffect * self) +{ #line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" self->priv = SQUARES_EFFECT_GET_PRIVATE (self); -#line 674 "SquaresEffect.c" +#line 676 "SquaresEffect.c" } -static void squares_effect_finalize (GObject * obj) { +static void +squares_effect_finalize (GObject * obj) +{ SquaresEffect * self; #line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SQUARES_EFFECT, SquaresEffect); #line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" G_OBJECT_CLASS (squares_effect_parent_class)->finalize (obj); -#line 684 "SquaresEffect.c" +#line 688 "SquaresEffect.c" } -GType squares_effect_get_type (void) { +GType +squares_effect_get_type (void) +{ static volatile gsize squares_effect_type_id__volatile = 0; if (g_once_init_enter (&squares_effect_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (SquaresEffectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) squares_effect_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SquaresEffect), 0, (GInstanceInitFunc) squares_effect_instance_init, NULL }; -- cgit v1.2.3