diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-08-20 15:11:08 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-08-20 15:11:08 +0200 |
commit | cb612a12b952e349b96d427645aaeb55d15f509a (patch) | |
tree | f29298f41d2a7ea2a976616243aca64c2c2547ce /plugins/shotwell-transitions | |
parent | e7be93745e4a2ff3aa255227bef7b9d3b733aafa (diff) | |
parent | 143bfc9f801c84428074312d661f8e08803df83b (diff) |
Merge tag 'upstream/0.23.5'
Upstream version 0.23.5
Diffstat (limited to 'plugins/shotwell-transitions')
-rw-r--r-- | plugins/shotwell-transitions/BlindsEffect.c | 828 | ||||
-rw-r--r-- | plugins/shotwell-transitions/ChessEffect.c | 769 | ||||
-rw-r--r-- | plugins/shotwell-transitions/CircleEffect.c | 524 | ||||
-rw-r--r-- | plugins/shotwell-transitions/CirclesEffect.c | 658 | ||||
-rw-r--r-- | plugins/shotwell-transitions/ClockEffect.c | 638 | ||||
-rw-r--r-- | plugins/shotwell-transitions/CrumbleEffect.c | 857 | ||||
-rw-r--r-- | plugins/shotwell-transitions/FadeEffect.c | 493 | ||||
-rw-r--r-- | plugins/shotwell-transitions/Makefile | 25 | ||||
-rw-r--r-- | plugins/shotwell-transitions/SlideEffect.c | 614 | ||||
-rw-r--r-- | plugins/shotwell-transitions/SquaresEffect.c | 704 | ||||
-rw-r--r-- | plugins/shotwell-transitions/StripesEffect.c | 713 | ||||
-rw-r--r-- | plugins/shotwell-transitions/org.gnome.Shotwell.Transitions.gresource.xml | 6 | ||||
-rw-r--r-- | plugins/shotwell-transitions/shotwell-transitions.c | 1086 | ||||
-rw-r--r-- | plugins/shotwell-transitions/shotwell-transitions.vala | 3 |
14 files changed, 7892 insertions, 26 deletions
diff --git a/plugins/shotwell-transitions/BlindsEffect.c b/plugins/shotwell-transitions/BlindsEffect.c new file mode 100644 index 0000000..a8fa711 --- /dev/null +++ b/plugins/shotwell-transitions/BlindsEffect.c @@ -0,0 +1,828 @@ +/* BlindsEffect.c generated by valac 0.32.1, the Vala compiler + * generated from BlindsEffect.vala, do not modify */ + +/* Copyright 2013 Jens Bav + * Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (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> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include <glib/gi18n-lib.h> +#include <cairo.h> +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <math.h> +#include <float.h> +#include <gdk/gdk.h> + + +#define TYPE_SHOTWELL_TRANSITION_DESCRIPTOR (shotwell_transition_descriptor_get_type ()) +#define SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptor)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) + +typedef struct _ShotwellTransitionDescriptor ShotwellTransitionDescriptor; +typedef struct _ShotwellTransitionDescriptorClass ShotwellTransitionDescriptorClass; +typedef struct _ShotwellTransitionDescriptorPrivate ShotwellTransitionDescriptorPrivate; + +#define TYPE_BLINDS_EFFECT_DESCRIPTOR (blinds_effect_descriptor_get_type ()) +#define BLINDS_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BLINDS_EFFECT_DESCRIPTOR, BlindsEffectDescriptor)) +#define BLINDS_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BLINDS_EFFECT_DESCRIPTOR, BlindsEffectDescriptorClass)) +#define IS_BLINDS_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BLINDS_EFFECT_DESCRIPTOR)) +#define IS_BLINDS_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BLINDS_EFFECT_DESCRIPTOR)) +#define BLINDS_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BLINDS_EFFECT_DESCRIPTOR, BlindsEffectDescriptorClass)) + +typedef struct _BlindsEffectDescriptor BlindsEffectDescriptor; +typedef struct _BlindsEffectDescriptorClass BlindsEffectDescriptorClass; +typedef struct _BlindsEffectDescriptorPrivate BlindsEffectDescriptorPrivate; + +#define TYPE_BLINDS_EFFECT (blinds_effect_get_type ()) +#define BLINDS_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BLINDS_EFFECT, BlindsEffect)) +#define BLINDS_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BLINDS_EFFECT, BlindsEffectClass)) +#define IS_BLINDS_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BLINDS_EFFECT)) +#define IS_BLINDS_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BLINDS_EFFECT)) +#define BLINDS_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BLINDS_EFFECT, BlindsEffectClass)) + +typedef struct _BlindsEffect BlindsEffect; +typedef struct _BlindsEffectClass BlindsEffectClass; +typedef struct _BlindsEffectPrivate BlindsEffectPrivate; +#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL))) +#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL))) + +struct _ShotwellTransitionDescriptor { + GObject parent_instance; + ShotwellTransitionDescriptorPrivate * priv; +}; + +struct _ShotwellTransitionDescriptorClass { + GObjectClass parent_class; + const gchar* (*get_id) (ShotwellTransitionDescriptor* self); + const gchar* (*get_pluggable_name) (ShotwellTransitionDescriptor* self); + SpitTransitionsEffect* (*create) (ShotwellTransitionDescriptor* self, SpitHostInterface* host); +}; + +struct _BlindsEffectDescriptor { + ShotwellTransitionDescriptor parent_instance; + BlindsEffectDescriptorPrivate * priv; +}; + +struct _BlindsEffectDescriptorClass { + ShotwellTransitionDescriptorClass parent_class; +}; + +struct _BlindsEffect { + GObject parent_instance; + BlindsEffectPrivate * priv; +}; + +struct _BlindsEffectClass { + GObjectClass parent_class; +}; + +struct _BlindsEffectPrivate { + gint current_blind_width; + cairo_surface_t** to_blinds; + gint to_blinds_length1; + gint _to_blinds_size_; + gint blind_count; +}; + + +static gpointer blinds_effect_descriptor_parent_class = NULL; +static gpointer blinds_effect_parent_class = NULL; +static SpitTransitionsEffectIface* blinds_effect_spit_transitions_effect_parent_iface = NULL; + +GType shotwell_transition_descriptor_get_type (void) G_GNUC_CONST; +GType blinds_effect_descriptor_get_type (void) G_GNUC_CONST; +enum { + BLINDS_EFFECT_DESCRIPTOR_DUMMY_PROPERTY +}; +BlindsEffectDescriptor* blinds_effect_descriptor_new (GFile* resource_directory); +BlindsEffectDescriptor* blinds_effect_descriptor_construct (GType object_type, GFile* resource_directory); +ShotwellTransitionDescriptor* shotwell_transition_descriptor_construct (GType object_type, GFile* resource_directory); +static const gchar* blinds_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base); +static const gchar* blinds_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base); +static SpitTransitionsEffect* blinds_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host); +BlindsEffect* blinds_effect_new (void); +BlindsEffect* blinds_effect_construct (GType object_type); +GType blinds_effect_get_type (void) G_GNUC_CONST; +#define BLINDS_EFFECT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_BLINDS_EFFECT, BlindsEffectPrivate)) +enum { + BLINDS_EFFECT_DUMMY_PROPERTY +}; +#define BLINDS_EFFECT_DESIRED_FPS 30 +#define BLINDS_EFFECT_MIN_FPS 15 +#define BLINDS_EFFECT_BLIND_WIDTH 50 +static void blinds_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps); +static gboolean blinds_effect_real_needs_clear_background (SpitTransitionsEffect* base); +static void blinds_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion); +static void blinds_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number); +static void blinds_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number); +static void blinds_effect_real_cancel (SpitTransitionsEffect* base); +static void blinds_effect_finalize (GObject* obj); +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); + + +BlindsEffectDescriptor* blinds_effect_descriptor_construct (GType object_type, GFile* resource_directory) { + BlindsEffectDescriptor * self = NULL; + GFile* _tmp0_ = NULL; +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp0_ = resource_directory; +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self = (BlindsEffectDescriptor*) shotwell_transition_descriptor_construct (object_type, _tmp0_); +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + return self; +#line 147 "BlindsEffect.c" +} + + +BlindsEffectDescriptor* blinds_effect_descriptor_new (GFile* resource_directory) { +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + return blinds_effect_descriptor_construct (TYPE_BLINDS_EFFECT_DESCRIPTOR, resource_directory); +#line 154 "BlindsEffect.c" +} + + +static const gchar* blinds_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base) { + BlindsEffectDescriptor * self; + const gchar* result = NULL; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_BLINDS_EFFECT_DESCRIPTOR, BlindsEffectDescriptor); +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + result = "org.yorba.shotwell.transitions.blinds"; +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + return result; +#line 167 "BlindsEffect.c" +} + + +static const gchar* blinds_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base) { + BlindsEffectDescriptor * self; + const gchar* result = NULL; + const gchar* _tmp0_ = NULL; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_BLINDS_EFFECT_DESCRIPTOR, BlindsEffectDescriptor); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp0_ = _ ("Blinds"); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + result = _tmp0_; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + return result; +#line 183 "BlindsEffect.c" +} + + +static SpitTransitionsEffect* blinds_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host) { + BlindsEffectDescriptor * self; + SpitTransitionsEffect* result = NULL; + BlindsEffect* _tmp0_ = NULL; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_BLINDS_EFFECT_DESCRIPTOR, BlindsEffectDescriptor); +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + g_return_val_if_fail (SPIT_IS_HOST_INTERFACE (host), NULL); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp0_ = blinds_effect_new (); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TRANSITIONS_TYPE_EFFECT, SpitTransitionsEffect); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + return result; +#line 201 "BlindsEffect.c" +} + + +static void blinds_effect_descriptor_class_init (BlindsEffectDescriptorClass * klass) { +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + blinds_effect_descriptor_parent_class = g_type_class_peek_parent (klass); +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_id = blinds_effect_descriptor_real_get_id; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_pluggable_name = blinds_effect_descriptor_real_get_pluggable_name; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->create = blinds_effect_descriptor_real_create; +#line 214 "BlindsEffect.c" +} + + +static void blinds_effect_descriptor_instance_init (BlindsEffectDescriptor * self) { +} + + +GType blinds_effect_descriptor_get_type (void) { + static volatile gsize blinds_effect_descriptor_type_id__volatile = 0; + if (g_once_init_enter (&blinds_effect_descriptor_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (BlindsEffectDescriptorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) blinds_effect_descriptor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BlindsEffectDescriptor), 0, (GInstanceInitFunc) blinds_effect_descriptor_instance_init, NULL }; + GType blinds_effect_descriptor_type_id; + blinds_effect_descriptor_type_id = g_type_register_static (TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, "BlindsEffectDescriptor", &g_define_type_info, 0); + g_once_init_leave (&blinds_effect_descriptor_type_id__volatile, blinds_effect_descriptor_type_id); + } + return blinds_effect_descriptor_type_id__volatile; +} + + +BlindsEffect* blinds_effect_construct (GType object_type) { + BlindsEffect * self = NULL; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self = (BlindsEffect*) g_object_new (object_type, NULL); +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + return self; +#line 240 "BlindsEffect.c" +} + + +BlindsEffect* blinds_effect_new (void) { +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + return blinds_effect_construct (TYPE_BLINDS_EFFECT); +#line 247 "BlindsEffect.c" +} + + +static void blinds_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps) { + BlindsEffect * self; + gint _vala_desired_fps = 0; + gint _vala_min_fps = 0; +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_BLINDS_EFFECT, BlindsEffect); +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _vala_desired_fps = BLINDS_EFFECT_DESIRED_FPS; +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _vala_min_fps = BLINDS_EFFECT_MIN_FPS; +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + if (desired_fps) { +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + *desired_fps = _vala_desired_fps; +#line 265 "BlindsEffect.c" + } +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + if (min_fps) { +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + *min_fps = _vala_min_fps; +#line 271 "BlindsEffect.c" + } +} + + +static gboolean blinds_effect_real_needs_clear_background (SpitTransitionsEffect* base) { + BlindsEffect * self; + gboolean result = FALSE; +#line 46 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_BLINDS_EFFECT, BlindsEffect); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + result = TRUE; +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + return result; +#line 285 "BlindsEffect.c" +} + + +static void blinds_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion) { + BlindsEffect * self; + SpitTransitionsVisuals* _tmp0_ = NULL; + GdkPixbuf* _tmp1_ = NULL; + GdkPixbuf* _tmp2_ = NULL; +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_BLINDS_EFFECT, BlindsEffect); +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp0_ = visuals; +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp1_ = spit_transitions_visuals_get_from_pixbuf (_tmp0_); +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp2_ = _tmp1_; +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + if (_tmp2_ != NULL) { +#line 308 "BlindsEffect.c" + SpitTransitionsVisuals* _tmp3_ = NULL; + GdkPixbuf* _tmp4_ = NULL; + GdkPixbuf* _tmp5_ = NULL; + gint _tmp6_ = 0; + gint _tmp7_ = 0; + SpitTransitionsVisuals* _tmp8_ = NULL; + GdkPixbuf* _tmp9_ = NULL; + GdkPixbuf* _tmp10_ = NULL; + gint _tmp11_ = 0; + gint _tmp12_ = 0; + gint _tmp13_ = 0; + gdouble _tmp14_ = 0.0; + gint _tmp15_ = 0; + cairo_surface_t** _tmp16_ = NULL; +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp3_ = visuals; +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp4_ = spit_transitions_visuals_get_to_pixbuf (_tmp3_); +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp5_ = _tmp4_; +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp6_ = gdk_pixbuf_get_width (_tmp5_); +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp7_ = _tmp6_; +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self->priv->blind_count = _tmp7_ / BLINDS_EFFECT_BLIND_WIDTH; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp8_ = visuals; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp9_ = spit_transitions_visuals_get_to_pixbuf (_tmp8_); +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp10_ = _tmp9_; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp11_ = gdk_pixbuf_get_width (_tmp10_); +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp12_ = _tmp11_; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp13_ = self->priv->blind_count; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp14_ = ceil (((gdouble) _tmp12_) / ((gdouble) _tmp13_)); +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self->priv->current_blind_width = (gint) _tmp14_; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp15_ = self->priv->blind_count; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp16_ = g_new0 (cairo_surface_t*, _tmp15_ + 1); +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self->priv->to_blinds = (_vala_array_free (self->priv->to_blinds, self->priv->to_blinds_length1, (GDestroyNotify) cairo_surface_destroy), NULL); +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self->priv->to_blinds = _tmp16_; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self->priv->to_blinds_length1 = _tmp15_; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self->priv->_to_blinds_size_ = self->priv->to_blinds_length1; +#line 363 "BlindsEffect.c" + { + gint i = 0; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + i = 0; +#line 368 "BlindsEffect.c" + { + gboolean _tmp17_ = FALSE; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp17_ = TRUE; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + while (TRUE) { +#line 375 "BlindsEffect.c" + gint _tmp19_ = 0; + gint _tmp20_ = 0; + cairo_surface_t** _tmp21_ = NULL; + gint _tmp21__length1 = 0; + gint _tmp22_ = 0; + gint _tmp23_ = 0; + SpitTransitionsVisuals* _tmp24_ = NULL; + GdkPixbuf* _tmp25_ = NULL; + GdkPixbuf* _tmp26_ = NULL; + gint _tmp27_ = 0; + gint _tmp28_ = 0; + cairo_surface_t* _tmp29_ = NULL; + cairo_surface_t* _tmp30_ = NULL; + cairo_t* ctx = NULL; + cairo_surface_t** _tmp31_ = NULL; + gint _tmp31__length1 = 0; + gint _tmp32_ = 0; + cairo_surface_t* _tmp33_ = NULL; + cairo_t* _tmp34_ = NULL; + cairo_t* _tmp35_ = NULL; + SpitTransitionsVisuals* _tmp36_ = NULL; + GdkPixbuf* _tmp37_ = NULL; + GdkPixbuf* _tmp38_ = NULL; + gint _tmp39_ = 0; + gint _tmp40_ = 0; + cairo_t* _tmp41_ = NULL; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + if (!_tmp17_) { +#line 404 "BlindsEffect.c" + gint _tmp18_ = 0; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp18_ = i; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + i = _tmp18_ + 1; +#line 410 "BlindsEffect.c" + } +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp17_ = FALSE; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp19_ = i; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp20_ = self->priv->blind_count; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + if (!(_tmp19_ < _tmp20_)) { +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + break; +#line 422 "BlindsEffect.c" + } +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp21_ = self->priv->to_blinds; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp21__length1 = self->priv->to_blinds_length1; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp22_ = i; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp23_ = self->priv->current_blind_width; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp24_ = visuals; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp25_ = spit_transitions_visuals_get_to_pixbuf (_tmp24_); +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp26_ = _tmp25_; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp27_ = gdk_pixbuf_get_height (_tmp26_); +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp28_ = _tmp27_; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp29_ = cairo_image_surface_create (CAIRO_FORMAT_RGB24, _tmp23_, _tmp28_); +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _cairo_surface_destroy0 (_tmp21_[_tmp22_]); +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp21_[_tmp22_] = _tmp29_; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp30_ = _tmp21_[_tmp22_]; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp31_ = self->priv->to_blinds; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp31__length1 = self->priv->to_blinds_length1; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp32_ = i; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp33_ = _tmp31_[_tmp32_]; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp34_ = cairo_create (_tmp33_); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + ctx = _tmp34_; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp35_ = ctx; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp36_ = visuals; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp37_ = spit_transitions_visuals_get_to_pixbuf (_tmp36_); +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp38_ = _tmp37_; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp39_ = i; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp40_ = self->priv->current_blind_width; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp35_, _tmp38_, (gdouble) ((-_tmp39_) * _tmp40_), (gdouble) 0); +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp41_ = ctx; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + cairo_paint (_tmp41_); +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _cairo_destroy0 (ctx); +#line 482 "BlindsEffect.c" + } + } + } + } +} + + +static void blinds_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number) { + BlindsEffect * self; + gdouble alpha = 0.0; + SpitTransitionsMotion* _tmp0_ = NULL; + gint _tmp1_ = 0; + gdouble _tmp2_ = 0.0; + gint y = 0; + SpitTransitionsVisuals* _tmp3_ = NULL; + GdkRectangle _tmp4_ = {0}; + GdkRectangle _tmp5_ = {0}; + gint _tmp6_ = 0; + gint x = 0; + SpitTransitionsVisuals* _tmp7_ = NULL; + GdkRectangle _tmp8_ = {0}; + GdkRectangle _tmp9_ = {0}; + gint _tmp10_ = 0; + SpitTransitionsVisuals* _tmp11_ = NULL; + GdkPixbuf* _tmp12_ = NULL; + GdkPixbuf* _tmp13_ = NULL; + cairo_t* _tmp53_ = NULL; + cairo_t* _tmp54_ = NULL; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_BLINDS_EFFECT, BlindsEffect); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + g_return_if_fail (ctx != NULL); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp0_ = motion; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp1_ = frame_number; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp2_ = spit_transitions_motion_get_alpha (_tmp0_, _tmp1_); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + alpha = _tmp2_; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp3_ = visuals; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp3_, &_tmp4_); +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp5_ = _tmp4_; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp6_ = _tmp5_.y; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + y = _tmp6_; +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp7_ = visuals; +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp7_, &_tmp8_); +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp9_ = _tmp8_; +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp10_ = _tmp9_.x; +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + x = _tmp10_; +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp11_ = visuals; +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp12_ = spit_transitions_visuals_get_from_pixbuf (_tmp11_); +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp13_ = _tmp12_; +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + if (_tmp13_ != NULL) { +#line 555 "BlindsEffect.c" + cairo_t* _tmp14_ = NULL; + SpitTransitionsVisuals* _tmp15_ = NULL; + GdkPixbuf* _tmp16_ = NULL; + GdkPixbuf* _tmp17_ = NULL; + SpitTransitionsVisuals* _tmp18_ = NULL; + GdkRectangle _tmp19_ = {0}; + GdkRectangle _tmp20_ = {0}; + gint _tmp21_ = 0; + SpitTransitionsVisuals* _tmp22_ = NULL; + GdkRectangle _tmp23_ = {0}; + GdkRectangle _tmp24_ = {0}; + gint _tmp25_ = 0; + cairo_t* _tmp26_ = NULL; + gdouble _tmp27_ = 0.0; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp14_ = ctx; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp15_ = visuals; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp16_ = spit_transitions_visuals_get_from_pixbuf (_tmp15_); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp17_ = _tmp16_; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp18_ = visuals; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp18_, &_tmp19_); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp20_ = _tmp19_; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp21_ = _tmp20_.x; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp22_ = visuals; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp22_, &_tmp23_); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp24_ = _tmp23_; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp25_ = _tmp24_.y; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp14_, _tmp17_, (gdouble) _tmp21_, (gdouble) _tmp25_); +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp26_ = ctx; +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp27_ = alpha; +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + cairo_paint_with_alpha (_tmp26_, 1 - (_tmp27_ * 2)); +#line 602 "BlindsEffect.c" + } + { + gint i = 0; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + i = 0; +#line 608 "BlindsEffect.c" + { + gboolean _tmp28_ = FALSE; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp28_ = TRUE; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + while (TRUE) { +#line 615 "BlindsEffect.c" + gint _tmp30_ = 0; + gint _tmp31_ = 0; + cairo_t* _tmp32_ = NULL; + cairo_surface_t** _tmp33_ = NULL; + gint _tmp33__length1 = 0; + gint _tmp34_ = 0; + cairo_surface_t* _tmp35_ = NULL; + gint _tmp36_ = 0; + gint _tmp37_ = 0; + gint _tmp38_ = 0; + gint _tmp39_ = 0; + cairo_t* _tmp40_ = NULL; + gint _tmp41_ = 0; + gint _tmp42_ = 0; + gint _tmp43_ = 0; + gint _tmp44_ = 0; + gint _tmp45_ = 0; + gdouble _tmp46_ = 0.0; + SpitTransitionsVisuals* _tmp47_ = NULL; + GdkPixbuf* _tmp48_ = NULL; + GdkPixbuf* _tmp49_ = NULL; + gint _tmp50_ = 0; + gint _tmp51_ = 0; + cairo_t* _tmp52_ = NULL; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + if (!_tmp28_) { +#line 642 "BlindsEffect.c" + gint _tmp29_ = 0; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp29_ = i; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + i = _tmp29_ + 1; +#line 648 "BlindsEffect.c" + } +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp28_ = FALSE; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp30_ = i; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp31_ = self->priv->blind_count; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + if (!(_tmp30_ < _tmp31_)) { +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + break; +#line 660 "BlindsEffect.c" + } +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp32_ = ctx; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp33_ = self->priv->to_blinds; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp33__length1 = self->priv->to_blinds_length1; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp34_ = i; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp35_ = _tmp33_[_tmp34_]; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp36_ = x; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp37_ = i; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp38_ = self->priv->current_blind_width; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp39_ = y; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + cairo_set_source_surface (_tmp32_, _tmp35_, (gdouble) (_tmp36_ + (_tmp37_ * _tmp38_)), (gdouble) _tmp39_); +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp40_ = ctx; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp41_ = x; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp42_ = i; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp43_ = self->priv->current_blind_width; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp44_ = y; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp45_ = self->priv->current_blind_width; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp46_ = alpha; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp47_ = visuals; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp48_ = spit_transitions_visuals_get_to_pixbuf (_tmp47_); +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp49_ = _tmp48_; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp50_ = gdk_pixbuf_get_height (_tmp49_); +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp51_ = _tmp50_; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + cairo_rectangle (_tmp40_, (gdouble) (_tmp41_ + (_tmp42_ * _tmp43_)), (gdouble) _tmp44_, _tmp45_ * (_tmp46_ + 0.5), (gdouble) _tmp51_); +#line 84 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp52_ = ctx; +#line 84 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + cairo_fill (_tmp52_); +#line 712 "BlindsEffect.c" + } + } + } +#line 87 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp53_ = ctx; +#line 87 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + cairo_clip (_tmp53_); +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + _tmp54_ = ctx; +#line 88 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + cairo_paint (_tmp54_); +#line 724 "BlindsEffect.c" +} + + +static void blinds_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number) { + BlindsEffect * self; +#line 91 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_BLINDS_EFFECT, BlindsEffect); +#line 91 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 91 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 736 "BlindsEffect.c" +} + + +static void blinds_effect_real_cancel (SpitTransitionsEffect* base) { + BlindsEffect * self; +#line 94 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_BLINDS_EFFECT, BlindsEffect); +#line 744 "BlindsEffect.c" +} + + +static void blinds_effect_class_init (BlindsEffectClass * klass) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + blinds_effect_parent_class = g_type_class_peek_parent (klass); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + g_type_class_add_private (klass, sizeof (BlindsEffectPrivate)); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + G_OBJECT_CLASS (klass)->finalize = blinds_effect_finalize; +#line 755 "BlindsEffect.c" +} + + +static void blinds_effect_spit_transitions_effect_interface_init (SpitTransitionsEffectIface * iface) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + blinds_effect_spit_transitions_effect_parent_iface = g_type_interface_peek_parent (iface); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + iface->get_fps = (void (*)(SpitTransitionsEffect*, gint*, gint*)) blinds_effect_real_get_fps; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + iface->needs_clear_background = (gboolean (*)(SpitTransitionsEffect*)) blinds_effect_real_needs_clear_background; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + iface->start = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*)) blinds_effect_real_start; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + iface->paint = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, cairo_t*, gint, gint, gint)) blinds_effect_real_paint; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + iface->advance = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, gint)) blinds_effect_real_advance; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + iface->cancel = (void (*)(SpitTransitionsEffect*)) blinds_effect_real_cancel; +#line 774 "BlindsEffect.c" +} + + +static void blinds_effect_instance_init (BlindsEffect * self) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self->priv = BLINDS_EFFECT_GET_PRIVATE (self); +#line 781 "BlindsEffect.c" +} + + +static void blinds_effect_finalize (GObject* obj) { + BlindsEffect * self; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_BLINDS_EFFECT, BlindsEffect); +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + self->priv->to_blinds = (_vala_array_free (self->priv->to_blinds, self->priv->to_blinds_length1, (GDestroyNotify) cairo_surface_destroy), NULL); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/BlindsEffect.vala" + G_OBJECT_CLASS (blinds_effect_parent_class)->finalize (obj); +#line 793 "BlindsEffect.c" +} + + +GType blinds_effect_get_type (void) { + static volatile gsize blinds_effect_type_id__volatile = 0; + if (g_once_init_enter (&blinds_effect_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (BlindsEffectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) blinds_effect_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BlindsEffect), 0, (GInstanceInitFunc) blinds_effect_instance_init, NULL }; + static const GInterfaceInfo spit_transitions_effect_info = { (GInterfaceInitFunc) blinds_effect_spit_transitions_effect_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType blinds_effect_type_id; + blinds_effect_type_id = g_type_register_static (G_TYPE_OBJECT, "BlindsEffect", &g_define_type_info, 0); + g_type_add_interface_static (blinds_effect_type_id, SPIT_TRANSITIONS_TYPE_EFFECT, &spit_transitions_effect_info); + g_once_init_leave (&blinds_effect_type_id__volatile, blinds_effect_type_id); + } + return blinds_effect_type_id__volatile; +} + + +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { + if ((array != NULL) && (destroy_func != NULL)) { + int i; + for (i = 0; i < array_length; i = i + 1) { + if (((gpointer*) array)[i] != NULL) { + destroy_func (((gpointer*) array)[i]); + } + } + } +} + + +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { + _vala_array_destroy (array, array_length, destroy_func); + g_free (array); +} + + + diff --git a/plugins/shotwell-transitions/ChessEffect.c b/plugins/shotwell-transitions/ChessEffect.c new file mode 100644 index 0000000..a59a2e6 --- /dev/null +++ b/plugins/shotwell-transitions/ChessEffect.c @@ -0,0 +1,769 @@ +/* ChessEffect.c generated by valac 0.32.1, the Vala compiler + * generated from ChessEffect.vala, do not modify */ + +/* Copyright 2013 Jens Bav + * Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (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> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include <glib/gi18n-lib.h> +#include <float.h> +#include <math.h> +#include <cairo.h> +#include <gdk/gdk.h> + + +#define TYPE_SHOTWELL_TRANSITION_DESCRIPTOR (shotwell_transition_descriptor_get_type ()) +#define SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptor)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) + +typedef struct _ShotwellTransitionDescriptor ShotwellTransitionDescriptor; +typedef struct _ShotwellTransitionDescriptorClass ShotwellTransitionDescriptorClass; +typedef struct _ShotwellTransitionDescriptorPrivate ShotwellTransitionDescriptorPrivate; + +#define TYPE_CHESS_EFFECT_DESCRIPTOR (chess_effect_descriptor_get_type ()) +#define CHESS_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHESS_EFFECT_DESCRIPTOR, ChessEffectDescriptor)) +#define CHESS_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHESS_EFFECT_DESCRIPTOR, ChessEffectDescriptorClass)) +#define IS_CHESS_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHESS_EFFECT_DESCRIPTOR)) +#define IS_CHESS_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHESS_EFFECT_DESCRIPTOR)) +#define CHESS_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHESS_EFFECT_DESCRIPTOR, ChessEffectDescriptorClass)) + +typedef struct _ChessEffectDescriptor ChessEffectDescriptor; +typedef struct _ChessEffectDescriptorClass ChessEffectDescriptorClass; +typedef struct _ChessEffectDescriptorPrivate ChessEffectDescriptorPrivate; + +#define TYPE_CHESS_EFFECT (chess_effect_get_type ()) +#define CHESS_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHESS_EFFECT, ChessEffect)) +#define CHESS_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHESS_EFFECT, ChessEffectClass)) +#define IS_CHESS_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHESS_EFFECT)) +#define IS_CHESS_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHESS_EFFECT)) +#define CHESS_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHESS_EFFECT, ChessEffectClass)) + +typedef struct _ChessEffect ChessEffect; +typedef struct _ChessEffectClass ChessEffectClass; +typedef struct _ChessEffectPrivate ChessEffectPrivate; + +struct _ShotwellTransitionDescriptor { + GObject parent_instance; + ShotwellTransitionDescriptorPrivate * priv; +}; + +struct _ShotwellTransitionDescriptorClass { + GObjectClass parent_class; + const gchar* (*get_id) (ShotwellTransitionDescriptor* self); + const gchar* (*get_pluggable_name) (ShotwellTransitionDescriptor* self); + SpitTransitionsEffect* (*create) (ShotwellTransitionDescriptor* self, SpitHostInterface* host); +}; + +struct _ChessEffectDescriptor { + ShotwellTransitionDescriptor parent_instance; + ChessEffectDescriptorPrivate * priv; +}; + +struct _ChessEffectDescriptorClass { + ShotwellTransitionDescriptorClass parent_class; +}; + +struct _ChessEffect { + GObject parent_instance; + ChessEffectPrivate * priv; +}; + +struct _ChessEffectClass { + GObjectClass parent_class; +}; + +struct _ChessEffectPrivate { + gdouble square_count_x; + gdouble square_count_y; +}; + + +static gpointer chess_effect_descriptor_parent_class = NULL; +static gpointer chess_effect_parent_class = NULL; +static SpitTransitionsEffectIface* chess_effect_spit_transitions_effect_parent_iface = NULL; + +GType shotwell_transition_descriptor_get_type (void) G_GNUC_CONST; +GType chess_effect_descriptor_get_type (void) G_GNUC_CONST; +enum { + CHESS_EFFECT_DESCRIPTOR_DUMMY_PROPERTY +}; +ChessEffectDescriptor* chess_effect_descriptor_new (GFile* resource_directory); +ChessEffectDescriptor* chess_effect_descriptor_construct (GType object_type, GFile* resource_directory); +ShotwellTransitionDescriptor* shotwell_transition_descriptor_construct (GType object_type, GFile* resource_directory); +static const gchar* chess_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base); +static const gchar* chess_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base); +static SpitTransitionsEffect* chess_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host); +ChessEffect* chess_effect_new (void); +ChessEffect* chess_effect_construct (GType object_type); +GType chess_effect_get_type (void) G_GNUC_CONST; +#define CHESS_EFFECT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_CHESS_EFFECT, ChessEffectPrivate)) +enum { + CHESS_EFFECT_DUMMY_PROPERTY +}; +#define CHESS_EFFECT_DESIRED_FPS 25 +#define CHESS_EFFECT_MIN_FPS 10 +#define CHESS_EFFECT_SQUARE_SIZE 100 +static void chess_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps); +static void chess_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion); +static gboolean chess_effect_real_needs_clear_background (SpitTransitionsEffect* base); +static void chess_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number); +static void chess_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number); +static void chess_effect_real_cancel (SpitTransitionsEffect* base); +static void chess_effect_finalize (GObject* obj); + + +ChessEffectDescriptor* chess_effect_descriptor_construct (GType object_type, GFile* resource_directory) { + ChessEffectDescriptor * self = NULL; + GFile* _tmp0_ = NULL; +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp0_ = resource_directory; +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + self = (ChessEffectDescriptor*) shotwell_transition_descriptor_construct (object_type, _tmp0_); +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + return self; +#line 139 "ChessEffect.c" +} + + +ChessEffectDescriptor* chess_effect_descriptor_new (GFile* resource_directory) { +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + return chess_effect_descriptor_construct (TYPE_CHESS_EFFECT_DESCRIPTOR, resource_directory); +#line 146 "ChessEffect.c" +} + + +static const gchar* chess_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base) { + ChessEffectDescriptor * self; + const gchar* result = NULL; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CHESS_EFFECT_DESCRIPTOR, ChessEffectDescriptor); +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + result = "org.yorba.shotwell.transitions.chess"; +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + return result; +#line 159 "ChessEffect.c" +} + + +static const gchar* chess_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base) { + ChessEffectDescriptor * self; + const gchar* result = NULL; + const gchar* _tmp0_ = NULL; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CHESS_EFFECT_DESCRIPTOR, ChessEffectDescriptor); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp0_ = _ ("Chess"); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + result = _tmp0_; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + return result; +#line 175 "ChessEffect.c" +} + + +static SpitTransitionsEffect* chess_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host) { + ChessEffectDescriptor * self; + SpitTransitionsEffect* result = NULL; + ChessEffect* _tmp0_ = NULL; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CHESS_EFFECT_DESCRIPTOR, ChessEffectDescriptor); +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + g_return_val_if_fail (SPIT_IS_HOST_INTERFACE (host), NULL); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp0_ = chess_effect_new (); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TRANSITIONS_TYPE_EFFECT, SpitTransitionsEffect); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + return result; +#line 193 "ChessEffect.c" +} + + +static void chess_effect_descriptor_class_init (ChessEffectDescriptorClass * klass) { +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + chess_effect_descriptor_parent_class = g_type_class_peek_parent (klass); +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_id = chess_effect_descriptor_real_get_id; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_pluggable_name = chess_effect_descriptor_real_get_pluggable_name; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->create = chess_effect_descriptor_real_create; +#line 206 "ChessEffect.c" +} + + +static void chess_effect_descriptor_instance_init (ChessEffectDescriptor * self) { +} + + +GType chess_effect_descriptor_get_type (void) { + static volatile gsize chess_effect_descriptor_type_id__volatile = 0; + if (g_once_init_enter (&chess_effect_descriptor_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (ChessEffectDescriptorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) chess_effect_descriptor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ChessEffectDescriptor), 0, (GInstanceInitFunc) chess_effect_descriptor_instance_init, NULL }; + GType chess_effect_descriptor_type_id; + chess_effect_descriptor_type_id = g_type_register_static (TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, "ChessEffectDescriptor", &g_define_type_info, 0); + g_once_init_leave (&chess_effect_descriptor_type_id__volatile, chess_effect_descriptor_type_id); + } + return chess_effect_descriptor_type_id__volatile; +} + + +ChessEffect* chess_effect_construct (GType object_type) { + ChessEffect * self = NULL; +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + self = (ChessEffect*) g_object_new (object_type, NULL); +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + return self; +#line 232 "ChessEffect.c" +} + + +ChessEffect* chess_effect_new (void) { +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + return chess_effect_construct (TYPE_CHESS_EFFECT); +#line 239 "ChessEffect.c" +} + + +static void chess_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps) { + ChessEffect * self; + gint _vala_desired_fps = 0; + gint _vala_min_fps = 0; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CHESS_EFFECT, ChessEffect); +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _vala_desired_fps = CHESS_EFFECT_DESIRED_FPS; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _vala_min_fps = CHESS_EFFECT_MIN_FPS; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + if (desired_fps) { +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + *desired_fps = _vala_desired_fps; +#line 257 "ChessEffect.c" + } +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + if (min_fps) { +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + *min_fps = _vala_min_fps; +#line 263 "ChessEffect.c" + } +} + + +static void chess_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion) { + ChessEffect * self; + SpitTransitionsVisuals* _tmp0_ = NULL; + GdkRectangle _tmp1_ = {0}; + GdkRectangle _tmp2_ = {0}; + gint _tmp3_ = 0; + SpitTransitionsVisuals* _tmp4_ = NULL; + GdkRectangle _tmp5_ = {0}; + GdkRectangle _tmp6_ = {0}; + gint _tmp7_ = 0; +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CHESS_EFFECT, ChessEffect); +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp0_ = visuals; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp0_, &_tmp1_); +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp2_ = _tmp1_; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp3_ = _tmp2_.height; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + self->priv->square_count_y = (gdouble) ((_tmp3_ / CHESS_EFFECT_SQUARE_SIZE) + 2); +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp4_ = visuals; +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp4_, &_tmp5_); +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp6_ = _tmp5_; +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp7_ = _tmp6_.width; +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + self->priv->square_count_x = (gdouble) ((_tmp7_ / CHESS_EFFECT_SQUARE_SIZE) + 2); +#line 304 "ChessEffect.c" +} + + +static gboolean chess_effect_real_needs_clear_background (SpitTransitionsEffect* base) { + ChessEffect * self; + gboolean result = FALSE; +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CHESS_EFFECT, ChessEffect); +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + result = TRUE; +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + return result; +#line 317 "ChessEffect.c" +} + + +static void chess_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number) { + ChessEffect * self; + gdouble alpha = 0.0; + SpitTransitionsMotion* _tmp0_ = NULL; + gint _tmp1_ = 0; + gdouble _tmp2_ = 0.0; + gdouble size = 0.0; + gdouble _tmp3_ = 0.0; + SpitTransitionsVisuals* _tmp4_ = NULL; + GdkPixbuf* _tmp5_ = NULL; + GdkPixbuf* _tmp6_ = NULL; + SpitTransitionsVisuals* _tmp21_ = NULL; + GdkPixbuf* _tmp22_ = NULL; + GdkPixbuf* _tmp23_ = NULL; +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CHESS_EFFECT, ChessEffect); +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + g_return_if_fail (ctx != NULL); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp0_ = motion; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp1_ = frame_number; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp2_ = spit_transitions_motion_get_alpha (_tmp0_, _tmp1_); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + alpha = _tmp2_; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp3_ = alpha; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + size = (2 * _tmp3_) * CHESS_EFFECT_SQUARE_SIZE; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp4_ = visuals; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp5_ = spit_transitions_visuals_get_from_pixbuf (_tmp4_); +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp6_ = _tmp5_; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + if (_tmp6_ != NULL) { +#line 363 "ChessEffect.c" + cairo_t* _tmp7_ = NULL; + SpitTransitionsVisuals* _tmp8_ = NULL; + GdkPixbuf* _tmp9_ = NULL; + GdkPixbuf* _tmp10_ = NULL; + SpitTransitionsVisuals* _tmp11_ = NULL; + GdkRectangle _tmp12_ = {0}; + GdkRectangle _tmp13_ = {0}; + gint _tmp14_ = 0; + SpitTransitionsVisuals* _tmp15_ = NULL; + GdkRectangle _tmp16_ = {0}; + GdkRectangle _tmp17_ = {0}; + gint _tmp18_ = 0; + cairo_t* _tmp19_ = NULL; + gdouble _tmp20_ = 0.0; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp7_ = ctx; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp8_ = visuals; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp9_ = spit_transitions_visuals_get_from_pixbuf (_tmp8_); +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp10_ = _tmp9_; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp11_ = visuals; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp11_, &_tmp12_); +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp13_ = _tmp12_; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp14_ = _tmp13_.x; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp15_ = visuals; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp15_, &_tmp16_); +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp17_ = _tmp16_; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp18_ = _tmp17_.y; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp7_, _tmp10_, (gdouble) _tmp14_, (gdouble) _tmp18_); +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp19_ = ctx; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp20_ = alpha; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + cairo_paint_with_alpha (_tmp19_, 1 - _tmp20_); +#line 410 "ChessEffect.c" + } +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp21_ = visuals; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp22_ = spit_transitions_visuals_get_to_pixbuf (_tmp21_); +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp23_ = _tmp22_; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + if (_tmp23_ != NULL) { +#line 420 "ChessEffect.c" + cairo_t* _tmp24_ = NULL; + SpitTransitionsVisuals* _tmp25_ = NULL; + GdkPixbuf* _tmp26_ = NULL; + GdkPixbuf* _tmp27_ = NULL; + SpitTransitionsVisuals* _tmp28_ = NULL; + GdkRectangle _tmp29_ = {0}; + GdkRectangle _tmp30_ = {0}; + gint _tmp31_ = 0; + SpitTransitionsVisuals* _tmp32_ = NULL; + GdkRectangle _tmp33_ = {0}; + GdkRectangle _tmp34_ = {0}; + gint _tmp35_ = 0; + cairo_t* _tmp81_ = NULL; + cairo_t* _tmp82_ = NULL; + gdouble _tmp83_ = 0.0; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp24_ = ctx; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp25_ = visuals; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp26_ = spit_transitions_visuals_get_to_pixbuf (_tmp25_); +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp27_ = _tmp26_; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp28_ = visuals; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp28_, &_tmp29_); +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp30_ = _tmp29_; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp31_ = _tmp30_.x; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp32_ = visuals; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp32_, &_tmp33_); +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp34_ = _tmp33_; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp35_ = _tmp34_.y; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp24_, _tmp27_, (gdouble) _tmp31_, (gdouble) _tmp35_); +#line 462 "ChessEffect.c" + { + gdouble y = 0.0; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + y = (gdouble) 0; +#line 467 "ChessEffect.c" + { + gboolean _tmp36_ = FALSE; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp36_ = TRUE; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + while (TRUE) { +#line 474 "ChessEffect.c" + gdouble _tmp38_ = 0.0; + gdouble _tmp39_ = 0.0; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + if (!_tmp36_) { +#line 479 "ChessEffect.c" + gdouble _tmp37_ = 0.0; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp37_ = y; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + y = _tmp37_ + 1; +#line 485 "ChessEffect.c" + } +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp36_ = FALSE; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp38_ = y; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp39_ = self->priv->square_count_y; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + if (!(_tmp38_ <= _tmp39_)) { +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + break; +#line 497 "ChessEffect.c" + } + { + gdouble x = 0.0; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + x = (gdouble) 0; +#line 503 "ChessEffect.c" + { + gboolean _tmp40_ = FALSE; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp40_ = TRUE; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + while (TRUE) { +#line 510 "ChessEffect.c" + gdouble _tmp42_ = 0.0; + gdouble _tmp43_ = 0.0; + gdouble _tmp44_ = 0.0; + gdouble _tmp45_ = 0.0; + gdouble _tmp46_ = 0.0; + gdouble translation = 0.0; + SpitTransitionsMotion* _tmp47_ = NULL; + SpitTransitionsDirection _tmp48_ = 0; + SpitTransitionsDirection _tmp49_ = 0; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + if (!_tmp40_) { +#line 522 "ChessEffect.c" + gdouble _tmp41_ = 0.0; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp41_ = x; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + x = _tmp41_ + 1; +#line 528 "ChessEffect.c" + } +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp40_ = FALSE; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp42_ = x; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp43_ = self->priv->square_count_x; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + if (!(_tmp42_ <= _tmp43_)) { +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + break; +#line 540 "ChessEffect.c" + } +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp45_ = x; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp46_ = y; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + if (fmod (_tmp45_ + _tmp46_, 2) == ((gdouble) 0)) { +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp44_ = (-1.5) * CHESS_EFFECT_SQUARE_SIZE; +#line 550 "ChessEffect.c" + } else { +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp44_ = 1.5 * CHESS_EFFECT_SQUARE_SIZE; +#line 554 "ChessEffect.c" + } +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + translation = _tmp44_; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp47_ = motion; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp48_ = spit_transitions_motion_get_direction (_tmp47_); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp49_ = _tmp48_; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + if (_tmp49_ == SPIT_TRANSITIONS_DIRECTION_FORWARD) { +#line 566 "ChessEffect.c" + cairo_t* _tmp50_ = NULL; + SpitTransitionsVisuals* _tmp51_ = NULL; + GdkRectangle _tmp52_ = {0}; + GdkRectangle _tmp53_ = {0}; + gint _tmp54_ = 0; + gdouble _tmp55_ = 0.0; + gdouble _tmp56_ = 0.0; + SpitTransitionsVisuals* _tmp57_ = NULL; + GdkRectangle _tmp58_ = {0}; + GdkRectangle _tmp59_ = {0}; + gint _tmp60_ = 0; + gdouble _tmp61_ = 0.0; + gdouble _tmp62_ = 0.0; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp50_ = ctx; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp51_ = visuals; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp51_, &_tmp52_); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp53_ = _tmp52_; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp54_ = _tmp53_.x; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp55_ = translation; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp56_ = x; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp57_ = visuals; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp57_, &_tmp58_); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp59_ = _tmp58_; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp60_ = _tmp59_.y; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp61_ = y; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp62_ = size; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + cairo_rectangle (_tmp50_, (_tmp54_ + _tmp55_) + (_tmp56_ * CHESS_EFFECT_SQUARE_SIZE), _tmp60_ + (_tmp61_ * CHESS_EFFECT_SQUARE_SIZE), _tmp62_, (gdouble) CHESS_EFFECT_SQUARE_SIZE); +#line 608 "ChessEffect.c" + } else { + cairo_t* _tmp63_ = NULL; + SpitTransitionsVisuals* _tmp64_ = NULL; + GdkRectangle _tmp65_ = {0}; + GdkRectangle _tmp66_ = {0}; + gint _tmp67_ = 0; + SpitTransitionsVisuals* _tmp68_ = NULL; + GdkRectangle _tmp69_ = {0}; + GdkRectangle _tmp70_ = {0}; + gint _tmp71_ = 0; + gdouble _tmp72_ = 0.0; + gdouble _tmp73_ = 0.0; + gdouble _tmp74_ = 0.0; + SpitTransitionsVisuals* _tmp75_ = NULL; + GdkRectangle _tmp76_ = {0}; + GdkRectangle _tmp77_ = {0}; + gint _tmp78_ = 0; + gdouble _tmp79_ = 0.0; + gdouble _tmp80_ = 0.0; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp63_ = ctx; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp64_ = visuals; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp64_, &_tmp65_); +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp66_ = _tmp65_; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp67_ = _tmp66_.x; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp68_ = visuals; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp68_, &_tmp69_); +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp70_ = _tmp69_; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp71_ = _tmp70_.width; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp72_ = translation; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp73_ = x; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp74_ = size; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp75_ = visuals; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp75_, &_tmp76_); +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp77_ = _tmp76_; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp78_ = _tmp77_.y; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp79_ = y; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp80_ = size; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + cairo_rectangle (_tmp63_, (((_tmp67_ + _tmp71_) + _tmp72_) - (_tmp73_ * CHESS_EFFECT_SQUARE_SIZE)) - _tmp74_, _tmp78_ + (_tmp79_ * CHESS_EFFECT_SQUARE_SIZE), _tmp80_, (gdouble) CHESS_EFFECT_SQUARE_SIZE); +#line 666 "ChessEffect.c" + } + } + } + } + } + } + } +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp81_ = ctx; +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + cairo_clip (_tmp81_); +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp82_ = ctx; +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + _tmp83_ = alpha; +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + cairo_paint_with_alpha (_tmp82_, _tmp83_); +#line 684 "ChessEffect.c" + } +} + + +static void chess_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number) { + ChessEffect * self; +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CHESS_EFFECT, ChessEffect); +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 697 "ChessEffect.c" +} + + +static void chess_effect_real_cancel (SpitTransitionsEffect* base) { + ChessEffect * self; +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CHESS_EFFECT, ChessEffect); +#line 705 "ChessEffect.c" +} + + +static void chess_effect_class_init (ChessEffectClass * klass) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + chess_effect_parent_class = g_type_class_peek_parent (klass); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + g_type_class_add_private (klass, sizeof (ChessEffectPrivate)); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + G_OBJECT_CLASS (klass)->finalize = chess_effect_finalize; +#line 716 "ChessEffect.c" +} + + +static void chess_effect_spit_transitions_effect_interface_init (SpitTransitionsEffectIface * iface) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + chess_effect_spit_transitions_effect_parent_iface = g_type_interface_peek_parent (iface); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + iface->get_fps = (void (*)(SpitTransitionsEffect*, gint*, gint*)) chess_effect_real_get_fps; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + iface->start = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*)) chess_effect_real_start; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + iface->needs_clear_background = (gboolean (*)(SpitTransitionsEffect*)) chess_effect_real_needs_clear_background; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + iface->paint = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, cairo_t*, gint, gint, gint)) chess_effect_real_paint; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + iface->advance = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, gint)) chess_effect_real_advance; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + iface->cancel = (void (*)(SpitTransitionsEffect*)) chess_effect_real_cancel; +#line 735 "ChessEffect.c" +} + + +static void chess_effect_instance_init (ChessEffect * self) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + self->priv = CHESS_EFFECT_GET_PRIVATE (self); +#line 742 "ChessEffect.c" +} + + +static void chess_effect_finalize (GObject* obj) { + ChessEffect * self; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CHESS_EFFECT, ChessEffect); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ChessEffect.vala" + G_OBJECT_CLASS (chess_effect_parent_class)->finalize (obj); +#line 752 "ChessEffect.c" +} + + +GType chess_effect_get_type (void) { + static volatile gsize chess_effect_type_id__volatile = 0; + if (g_once_init_enter (&chess_effect_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (ChessEffectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) chess_effect_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ChessEffect), 0, (GInstanceInitFunc) chess_effect_instance_init, NULL }; + static const GInterfaceInfo spit_transitions_effect_info = { (GInterfaceInitFunc) chess_effect_spit_transitions_effect_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType chess_effect_type_id; + chess_effect_type_id = g_type_register_static (G_TYPE_OBJECT, "ChessEffect", &g_define_type_info, 0); + g_type_add_interface_static (chess_effect_type_id, SPIT_TRANSITIONS_TYPE_EFFECT, &spit_transitions_effect_info); + g_once_init_leave (&chess_effect_type_id__volatile, chess_effect_type_id); + } + return chess_effect_type_id__volatile; +} + + + diff --git a/plugins/shotwell-transitions/CircleEffect.c b/plugins/shotwell-transitions/CircleEffect.c new file mode 100644 index 0000000..0bd66ef --- /dev/null +++ b/plugins/shotwell-transitions/CircleEffect.c @@ -0,0 +1,524 @@ +/* CircleEffect.c generated by valac 0.32.1, the Vala compiler + * generated from CircleEffect.vala, do not modify */ + +/* Copyright 2013 Jens Bav + * Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (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> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include <glib/gi18n-lib.h> +#include <cairo.h> +#include <float.h> +#include <math.h> +#include <gdk/gdk.h> + + +#define TYPE_SHOTWELL_TRANSITION_DESCRIPTOR (shotwell_transition_descriptor_get_type ()) +#define SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptor)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) + +typedef struct _ShotwellTransitionDescriptor ShotwellTransitionDescriptor; +typedef struct _ShotwellTransitionDescriptorClass ShotwellTransitionDescriptorClass; +typedef struct _ShotwellTransitionDescriptorPrivate ShotwellTransitionDescriptorPrivate; + +#define TYPE_CIRCLE_EFFECT_DESCRIPTOR (circle_effect_descriptor_get_type ()) +#define CIRCLE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CIRCLE_EFFECT_DESCRIPTOR, CircleEffectDescriptor)) +#define CIRCLE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CIRCLE_EFFECT_DESCRIPTOR, CircleEffectDescriptorClass)) +#define IS_CIRCLE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CIRCLE_EFFECT_DESCRIPTOR)) +#define IS_CIRCLE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CIRCLE_EFFECT_DESCRIPTOR)) +#define CIRCLE_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CIRCLE_EFFECT_DESCRIPTOR, CircleEffectDescriptorClass)) + +typedef struct _CircleEffectDescriptor CircleEffectDescriptor; +typedef struct _CircleEffectDescriptorClass CircleEffectDescriptorClass; +typedef struct _CircleEffectDescriptorPrivate CircleEffectDescriptorPrivate; + +#define TYPE_CIRCLE_EFFECT (circle_effect_get_type ()) +#define CIRCLE_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CIRCLE_EFFECT, CircleEffect)) +#define CIRCLE_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CIRCLE_EFFECT, CircleEffectClass)) +#define IS_CIRCLE_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CIRCLE_EFFECT)) +#define IS_CIRCLE_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CIRCLE_EFFECT)) +#define CIRCLE_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CIRCLE_EFFECT, CircleEffectClass)) + +typedef struct _CircleEffect CircleEffect; +typedef struct _CircleEffectClass CircleEffectClass; +typedef struct _CircleEffectPrivate CircleEffectPrivate; + +struct _ShotwellTransitionDescriptor { + GObject parent_instance; + ShotwellTransitionDescriptorPrivate * priv; +}; + +struct _ShotwellTransitionDescriptorClass { + GObjectClass parent_class; + const gchar* (*get_id) (ShotwellTransitionDescriptor* self); + const gchar* (*get_pluggable_name) (ShotwellTransitionDescriptor* self); + SpitTransitionsEffect* (*create) (ShotwellTransitionDescriptor* self, SpitHostInterface* host); +}; + +struct _CircleEffectDescriptor { + ShotwellTransitionDescriptor parent_instance; + CircleEffectDescriptorPrivate * priv; +}; + +struct _CircleEffectDescriptorClass { + ShotwellTransitionDescriptorClass parent_class; +}; + +struct _CircleEffect { + GObject parent_instance; + CircleEffectPrivate * priv; +}; + +struct _CircleEffectClass { + GObjectClass parent_class; +}; + + +static gpointer circle_effect_descriptor_parent_class = NULL; +static gpointer circle_effect_parent_class = NULL; +static SpitTransitionsEffectIface* circle_effect_spit_transitions_effect_parent_iface = NULL; + +GType shotwell_transition_descriptor_get_type (void) G_GNUC_CONST; +GType circle_effect_descriptor_get_type (void) G_GNUC_CONST; +enum { + CIRCLE_EFFECT_DESCRIPTOR_DUMMY_PROPERTY +}; +CircleEffectDescriptor* circle_effect_descriptor_new (GFile* resource_directory); +CircleEffectDescriptor* circle_effect_descriptor_construct (GType object_type, GFile* resource_directory); +ShotwellTransitionDescriptor* shotwell_transition_descriptor_construct (GType object_type, GFile* resource_directory); +static const gchar* circle_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base); +static const gchar* circle_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base); +static SpitTransitionsEffect* circle_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host); +CircleEffect* circle_effect_new (void); +CircleEffect* circle_effect_construct (GType object_type); +GType circle_effect_get_type (void) G_GNUC_CONST; +enum { + CIRCLE_EFFECT_DUMMY_PROPERTY +}; +#define CIRCLE_EFFECT_DESIRED_FPS 25 +#define CIRCLE_EFFECT_MIN_FPS 15 +static void circle_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps); +static void circle_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion); +static gboolean circle_effect_real_needs_clear_background (SpitTransitionsEffect* base); +static void circle_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number); +static void circle_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number); +static void circle_effect_real_cancel (SpitTransitionsEffect* base); + + +CircleEffectDescriptor* circle_effect_descriptor_construct (GType object_type, GFile* resource_directory) { + CircleEffectDescriptor * self = NULL; + GFile* _tmp0_ = NULL; +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp0_ = resource_directory; +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + self = (CircleEffectDescriptor*) shotwell_transition_descriptor_construct (object_type, _tmp0_); +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + return self; +#line 131 "CircleEffect.c" +} + + +CircleEffectDescriptor* circle_effect_descriptor_new (GFile* resource_directory) { +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + return circle_effect_descriptor_construct (TYPE_CIRCLE_EFFECT_DESCRIPTOR, resource_directory); +#line 138 "CircleEffect.c" +} + + +static const gchar* circle_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base) { + CircleEffectDescriptor * self; + const gchar* result = NULL; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLE_EFFECT_DESCRIPTOR, CircleEffectDescriptor); +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + result = "org.yorba.shotwell.transitions.circle"; +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + return result; +#line 151 "CircleEffect.c" +} + + +static const gchar* circle_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base) { + CircleEffectDescriptor * self; + const gchar* result = NULL; + const gchar* _tmp0_ = NULL; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLE_EFFECT_DESCRIPTOR, CircleEffectDescriptor); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp0_ = _ ("Circle"); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + result = _tmp0_; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + return result; +#line 167 "CircleEffect.c" +} + + +static SpitTransitionsEffect* circle_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host) { + CircleEffectDescriptor * self; + SpitTransitionsEffect* result = NULL; + CircleEffect* _tmp0_ = NULL; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLE_EFFECT_DESCRIPTOR, CircleEffectDescriptor); +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + g_return_val_if_fail (SPIT_IS_HOST_INTERFACE (host), NULL); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp0_ = circle_effect_new (); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TRANSITIONS_TYPE_EFFECT, SpitTransitionsEffect); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + return result; +#line 185 "CircleEffect.c" +} + + +static void circle_effect_descriptor_class_init (CircleEffectDescriptorClass * klass) { +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + circle_effect_descriptor_parent_class = g_type_class_peek_parent (klass); +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_id = circle_effect_descriptor_real_get_id; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_pluggable_name = circle_effect_descriptor_real_get_pluggable_name; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->create = circle_effect_descriptor_real_create; +#line 198 "CircleEffect.c" +} + + +static void circle_effect_descriptor_instance_init (CircleEffectDescriptor * self) { +} + + +GType circle_effect_descriptor_get_type (void) { + static volatile gsize circle_effect_descriptor_type_id__volatile = 0; + if (g_once_init_enter (&circle_effect_descriptor_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (CircleEffectDescriptorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) circle_effect_descriptor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CircleEffectDescriptor), 0, (GInstanceInitFunc) circle_effect_descriptor_instance_init, NULL }; + GType circle_effect_descriptor_type_id; + circle_effect_descriptor_type_id = g_type_register_static (TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, "CircleEffectDescriptor", &g_define_type_info, 0); + g_once_init_leave (&circle_effect_descriptor_type_id__volatile, circle_effect_descriptor_type_id); + } + return circle_effect_descriptor_type_id__volatile; +} + + +CircleEffect* circle_effect_construct (GType object_type) { + CircleEffect * self = NULL; +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + self = (CircleEffect*) g_object_new (object_type, NULL); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + return self; +#line 224 "CircleEffect.c" +} + + +CircleEffect* circle_effect_new (void) { +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + return circle_effect_construct (TYPE_CIRCLE_EFFECT); +#line 231 "CircleEffect.c" +} + + +static void circle_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps) { + CircleEffect * self; + gint _vala_desired_fps = 0; + gint _vala_min_fps = 0; +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLE_EFFECT, CircleEffect); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _vala_desired_fps = CIRCLE_EFFECT_DESIRED_FPS; +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _vala_min_fps = CIRCLE_EFFECT_MIN_FPS; +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + if (desired_fps) { +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + *desired_fps = _vala_desired_fps; +#line 249 "CircleEffect.c" + } +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + if (min_fps) { +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + *min_fps = _vala_min_fps; +#line 255 "CircleEffect.c" + } +} + + +static void circle_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion) { + CircleEffect * self; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLE_EFFECT, CircleEffect); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 268 "CircleEffect.c" +} + + +static gboolean circle_effect_real_needs_clear_background (SpitTransitionsEffect* base) { + CircleEffect * self; + gboolean result = FALSE; +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLE_EFFECT, CircleEffect); +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + result = TRUE; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + return result; +#line 281 "CircleEffect.c" +} + + +static void circle_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number) { + CircleEffect * self; + gdouble alpha = 0.0; + SpitTransitionsMotion* _tmp0_ = NULL; + gint _tmp1_ = 0; + gdouble _tmp2_ = 0.0; + gint radius = 0; + gdouble _tmp3_ = 0.0; + gint _tmp4_ = 0; + gint _tmp5_ = 0; + gdouble _tmp6_ = 0.0; + SpitTransitionsVisuals* _tmp7_ = NULL; + GdkPixbuf* _tmp8_ = NULL; + GdkPixbuf* _tmp9_ = NULL; + SpitTransitionsVisuals* _tmp24_ = NULL; + GdkPixbuf* _tmp25_ = NULL; + GdkPixbuf* _tmp26_ = NULL; +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLE_EFFECT, CircleEffect); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + g_return_if_fail (ctx != NULL); +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp0_ = motion; +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp1_ = frame_number; +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp2_ = spit_transitions_motion_get_alpha (_tmp0_, _tmp1_); +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + alpha = _tmp2_; +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp3_ = alpha; +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp4_ = width; +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp5_ = height; +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp6_ = fmax ((gdouble) _tmp4_, (gdouble) _tmp5_); +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + radius = (gint) (_tmp3_ * _tmp6_); +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp7_ = visuals; +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp8_ = spit_transitions_visuals_get_from_pixbuf (_tmp7_); +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp9_ = _tmp8_; +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + if (_tmp9_ != NULL) { +#line 336 "CircleEffect.c" + cairo_t* _tmp10_ = NULL; + SpitTransitionsVisuals* _tmp11_ = NULL; + GdkPixbuf* _tmp12_ = NULL; + GdkPixbuf* _tmp13_ = NULL; + SpitTransitionsVisuals* _tmp14_ = NULL; + GdkRectangle _tmp15_ = {0}; + GdkRectangle _tmp16_ = {0}; + gint _tmp17_ = 0; + SpitTransitionsVisuals* _tmp18_ = NULL; + GdkRectangle _tmp19_ = {0}; + GdkRectangle _tmp20_ = {0}; + gint _tmp21_ = 0; + cairo_t* _tmp22_ = NULL; + gdouble _tmp23_ = 0.0; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp10_ = ctx; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp11_ = visuals; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp12_ = spit_transitions_visuals_get_from_pixbuf (_tmp11_); +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp13_ = _tmp12_; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp14_ = visuals; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp14_, &_tmp15_); +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp16_ = _tmp15_; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp17_ = _tmp16_.x; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp18_ = visuals; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp18_, &_tmp19_); +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp20_ = _tmp19_; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp21_ = _tmp20_.y; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp10_, _tmp13_, (gdouble) _tmp17_, (gdouble) _tmp21_); +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp22_ = ctx; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp23_ = alpha; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + cairo_paint_with_alpha (_tmp22_, 1 - _tmp23_); +#line 383 "CircleEffect.c" + } +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp24_ = visuals; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp25_ = spit_transitions_visuals_get_to_pixbuf (_tmp24_); +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp26_ = _tmp25_; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + if (_tmp26_ != NULL) { +#line 393 "CircleEffect.c" + cairo_t* _tmp27_ = NULL; + SpitTransitionsVisuals* _tmp28_ = NULL; + GdkPixbuf* _tmp29_ = NULL; + GdkPixbuf* _tmp30_ = NULL; + SpitTransitionsVisuals* _tmp31_ = NULL; + GdkRectangle _tmp32_ = {0}; + GdkRectangle _tmp33_ = {0}; + gint _tmp34_ = 0; + SpitTransitionsVisuals* _tmp35_ = NULL; + GdkRectangle _tmp36_ = {0}; + GdkRectangle _tmp37_ = {0}; + gint _tmp38_ = 0; + cairo_t* _tmp39_ = NULL; + gint _tmp40_ = 0; + gint _tmp41_ = 0; + gint _tmp42_ = 0; + cairo_t* _tmp43_ = NULL; + cairo_t* _tmp44_ = NULL; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp27_ = ctx; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp28_ = visuals; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp29_ = spit_transitions_visuals_get_to_pixbuf (_tmp28_); +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp30_ = _tmp29_; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp31_ = visuals; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp31_, &_tmp32_); +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp33_ = _tmp32_; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp34_ = _tmp33_.x; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp35_ = visuals; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp35_, &_tmp36_); +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp37_ = _tmp36_; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp38_ = _tmp37_.y; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp27_, _tmp30_, (gdouble) _tmp34_, (gdouble) _tmp38_); +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp39_ = ctx; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp40_ = width; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp41_ = height; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp42_ = radius; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + cairo_arc (_tmp39_, (gdouble) (((gint) _tmp40_) / 2), (gdouble) (((gint) _tmp41_) / 2), (gdouble) _tmp42_, (gdouble) 0, 2 * G_PI); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp43_ = ctx; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + cairo_clip (_tmp43_); +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + _tmp44_ = ctx; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + cairo_paint (_tmp44_); +#line 456 "CircleEffect.c" + } +} + + +static void circle_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number) { + CircleEffect * self; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLE_EFFECT, CircleEffect); +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 469 "CircleEffect.c" +} + + +static void circle_effect_real_cancel (SpitTransitionsEffect* base) { + CircleEffect * self; +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLE_EFFECT, CircleEffect); +#line 477 "CircleEffect.c" +} + + +static void circle_effect_class_init (CircleEffectClass * klass) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + circle_effect_parent_class = g_type_class_peek_parent (klass); +#line 484 "CircleEffect.c" +} + + +static void circle_effect_spit_transitions_effect_interface_init (SpitTransitionsEffectIface * iface) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + circle_effect_spit_transitions_effect_parent_iface = g_type_interface_peek_parent (iface); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + iface->get_fps = (void (*)(SpitTransitionsEffect*, gint*, gint*)) circle_effect_real_get_fps; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + iface->start = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*)) circle_effect_real_start; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + iface->needs_clear_background = (gboolean (*)(SpitTransitionsEffect*)) circle_effect_real_needs_clear_background; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + iface->paint = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, cairo_t*, gint, gint, gint)) circle_effect_real_paint; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + iface->advance = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, gint)) circle_effect_real_advance; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CircleEffect.vala" + iface->cancel = (void (*)(SpitTransitionsEffect*)) circle_effect_real_cancel; +#line 503 "CircleEffect.c" +} + + +static void circle_effect_instance_init (CircleEffect * self) { +} + + +GType circle_effect_get_type (void) { + static volatile gsize circle_effect_type_id__volatile = 0; + if (g_once_init_enter (&circle_effect_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (CircleEffectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) circle_effect_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CircleEffect), 0, (GInstanceInitFunc) circle_effect_instance_init, NULL }; + static const GInterfaceInfo spit_transitions_effect_info = { (GInterfaceInitFunc) circle_effect_spit_transitions_effect_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType circle_effect_type_id; + circle_effect_type_id = g_type_register_static (G_TYPE_OBJECT, "CircleEffect", &g_define_type_info, 0); + g_type_add_interface_static (circle_effect_type_id, SPIT_TRANSITIONS_TYPE_EFFECT, &spit_transitions_effect_info); + g_once_init_leave (&circle_effect_type_id__volatile, circle_effect_type_id); + } + return circle_effect_type_id__volatile; +} + + + diff --git a/plugins/shotwell-transitions/CirclesEffect.c b/plugins/shotwell-transitions/CirclesEffect.c new file mode 100644 index 0000000..542de61 --- /dev/null +++ b/plugins/shotwell-transitions/CirclesEffect.c @@ -0,0 +1,658 @@ +/* CirclesEffect.c generated by valac 0.32.1, the Vala compiler + * generated from CirclesEffect.vala, do not modify */ + +/* Copyright 2013 Jens Bav + * Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (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> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include <glib/gi18n-lib.h> +#include <float.h> +#include <math.h> +#include <cairo.h> +#include <gdk/gdk.h> + + +#define TYPE_SHOTWELL_TRANSITION_DESCRIPTOR (shotwell_transition_descriptor_get_type ()) +#define SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptor)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) + +typedef struct _ShotwellTransitionDescriptor ShotwellTransitionDescriptor; +typedef struct _ShotwellTransitionDescriptorClass ShotwellTransitionDescriptorClass; +typedef struct _ShotwellTransitionDescriptorPrivate ShotwellTransitionDescriptorPrivate; + +#define TYPE_CIRCLES_EFFECT_DESCRIPTOR (circles_effect_descriptor_get_type ()) +#define CIRCLES_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CIRCLES_EFFECT_DESCRIPTOR, CirclesEffectDescriptor)) +#define CIRCLES_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CIRCLES_EFFECT_DESCRIPTOR, CirclesEffectDescriptorClass)) +#define IS_CIRCLES_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CIRCLES_EFFECT_DESCRIPTOR)) +#define IS_CIRCLES_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CIRCLES_EFFECT_DESCRIPTOR)) +#define CIRCLES_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CIRCLES_EFFECT_DESCRIPTOR, CirclesEffectDescriptorClass)) + +typedef struct _CirclesEffectDescriptor CirclesEffectDescriptor; +typedef struct _CirclesEffectDescriptorClass CirclesEffectDescriptorClass; +typedef struct _CirclesEffectDescriptorPrivate CirclesEffectDescriptorPrivate; + +#define TYPE_CIRCLES_EFFECT (circles_effect_get_type ()) +#define CIRCLES_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CIRCLES_EFFECT, CirclesEffect)) +#define CIRCLES_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CIRCLES_EFFECT, CirclesEffectClass)) +#define IS_CIRCLES_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CIRCLES_EFFECT)) +#define IS_CIRCLES_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CIRCLES_EFFECT)) +#define CIRCLES_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CIRCLES_EFFECT, CirclesEffectClass)) + +typedef struct _CirclesEffect CirclesEffect; +typedef struct _CirclesEffectClass CirclesEffectClass; +typedef struct _CirclesEffectPrivate CirclesEffectPrivate; + +struct _ShotwellTransitionDescriptor { + GObject parent_instance; + ShotwellTransitionDescriptorPrivate * priv; +}; + +struct _ShotwellTransitionDescriptorClass { + GObjectClass parent_class; + const gchar* (*get_id) (ShotwellTransitionDescriptor* self); + const gchar* (*get_pluggable_name) (ShotwellTransitionDescriptor* self); + SpitTransitionsEffect* (*create) (ShotwellTransitionDescriptor* self, SpitHostInterface* host); +}; + +struct _CirclesEffectDescriptor { + ShotwellTransitionDescriptor parent_instance; + CirclesEffectDescriptorPrivate * priv; +}; + +struct _CirclesEffectDescriptorClass { + ShotwellTransitionDescriptorClass parent_class; +}; + +struct _CirclesEffect { + GObject parent_instance; + CirclesEffectPrivate * priv; +}; + +struct _CirclesEffectClass { + GObjectClass parent_class; +}; + + +static gpointer circles_effect_descriptor_parent_class = NULL; +static gpointer circles_effect_parent_class = NULL; +static SpitTransitionsEffectIface* circles_effect_spit_transitions_effect_parent_iface = NULL; + +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); +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); +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 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_cancel (SpitTransitionsEffect* base); + + +CirclesEffectDescriptor* circles_effect_descriptor_construct (GType object_type, GFile* resource_directory) { + CirclesEffectDescriptor * self = NULL; + GFile* _tmp0_ = NULL; +#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_); +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + return self; +#line 132 "CirclesEffect.c" +} + + +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" +} + + +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" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLES_EFFECT_DESCRIPTOR, CirclesEffectDescriptor); +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + result = "org.yorba.shotwell.transitions.circles"; +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + return result; +#line 152 "CirclesEffect.c" +} + + +static const gchar* circles_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base) { + CirclesEffectDescriptor * self; + const gchar* result = NULL; + const gchar* _tmp0_ = NULL; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLES_EFFECT_DESCRIPTOR, CirclesEffectDescriptor); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp0_ = _ ("Circles"); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + result = _tmp0_; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + return result; +#line 168 "CirclesEffect.c" +} + + +static SpitTransitionsEffect* circles_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host) { + CirclesEffectDescriptor * self; + SpitTransitionsEffect* result = NULL; + CirclesEffect* _tmp0_ = NULL; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLES_EFFECT_DESCRIPTOR, CirclesEffectDescriptor); +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + g_return_val_if_fail (SPIT_IS_HOST_INTERFACE (host), NULL); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp0_ = circles_effect_new (); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + 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 186 "CirclesEffect.c" +} + + +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" + ((ShotwellTransitionDescriptorClass *) klass)->get_id = circles_effect_descriptor_real_get_id; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_pluggable_name = circles_effect_descriptor_real_get_pluggable_name; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->create = circles_effect_descriptor_real_create; +#line 199 "CirclesEffect.c" +} + + +static void circles_effect_descriptor_instance_init (CirclesEffectDescriptor * self) { +} + + +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 }; + GType circles_effect_descriptor_type_id; + circles_effect_descriptor_type_id = g_type_register_static (TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, "CirclesEffectDescriptor", &g_define_type_info, 0); + g_once_init_leave (&circles_effect_descriptor_type_id__volatile, circles_effect_descriptor_type_id); + } + return circles_effect_descriptor_type_id__volatile; +} + + +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 225 "CirclesEffect.c" +} + + +CirclesEffect* circles_effect_new (void) { +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + return circles_effect_construct (TYPE_CIRCLES_EFFECT); +#line 232 "CirclesEffect.c" +} + + +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; +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLES_EFFECT, CirclesEffect); +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _vala_desired_fps = CIRCLES_EFFECT_DESIRED_FPS; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _vala_min_fps = CIRCLES_EFFECT_MIN_FPS; +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + if (desired_fps) { +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + *desired_fps = _vala_desired_fps; +#line 250 "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 256 "CirclesEffect.c" + } +} + + +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); +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + 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 269 "CirclesEffect.c" +} + + +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" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CIRCLES_EFFECT, CirclesEffect); +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + result = TRUE; +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + return result; +#line 282 "CirclesEffect.c" +} + + +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_ = NULL; + gint _tmp1_ = 0; + gdouble _tmp2_ = 0.0; + gint distance = 0; + gint radius = 0; + gint circleCountX = 0; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + gint circleCountY = 0; + gint _tmp5_ = 0; + gint _tmp6_ = 0; + gdouble maxRadius = 0.0; + gint _tmp7_ = 0; + SpitTransitionsVisuals* _tmp8_ = NULL; + GdkPixbuf* _tmp9_ = NULL; + GdkPixbuf* _tmp10_ = NULL; + SpitTransitionsVisuals* _tmp25_ = NULL; + GdkPixbuf* _tmp26_ = NULL; + GdkPixbuf* _tmp27_ = NULL; +#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" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#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_; +#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; +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + circleCountX = _tmp3_ / (2 * _tmp4_); +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp5_ = height; +#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_; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp7_ = 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; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp9_ = spit_transitions_visuals_get_from_pixbuf (_tmp8_); +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp10_ = _tmp9_; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + if (_tmp10_ != NULL) { +#line 350 "CirclesEffect.c" + cairo_t* _tmp11_ = NULL; + SpitTransitionsVisuals* _tmp12_ = NULL; + GdkPixbuf* _tmp13_ = NULL; + GdkPixbuf* _tmp14_ = NULL; + SpitTransitionsVisuals* _tmp15_ = NULL; + GdkRectangle _tmp16_ = {0}; + GdkRectangle _tmp17_ = {0}; + gint _tmp18_ = 0; + SpitTransitionsVisuals* _tmp19_ = NULL; + GdkRectangle _tmp20_ = {0}; + GdkRectangle _tmp21_ = {0}; + gint _tmp22_ = 0; + cairo_t* _tmp23_ = NULL; + gdouble _tmp24_ = 0.0; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp11_ = ctx; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp12_ = visuals; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp13_ = spit_transitions_visuals_get_from_pixbuf (_tmp12_); +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp14_ = _tmp13_; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp15_ = visuals; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp15_, &_tmp16_); +#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_; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp22_ = _tmp21_.y; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp11_, _tmp14_, (gdouble) _tmp18_, (gdouble) _tmp22_); +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp23_ = ctx; +#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 397 "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_); +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp27_ = _tmp26_; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + if (_tmp27_ != NULL) { +#line 407 "CirclesEffect.c" + cairo_t* _tmp28_ = NULL; + SpitTransitionsVisuals* _tmp29_ = NULL; + GdkPixbuf* _tmp30_ = NULL; + GdkPixbuf* _tmp31_ = NULL; + SpitTransitionsVisuals* _tmp32_ = NULL; + GdkRectangle _tmp33_ = {0}; + GdkRectangle _tmp34_ = {0}; + gint _tmp35_ = 0; + SpitTransitionsVisuals* _tmp36_ = NULL; + GdkRectangle _tmp37_ = {0}; + GdkRectangle _tmp38_ = {0}; + gint _tmp39_ = 0; + cairo_t* _tmp63_ = NULL; + cairo_t* _tmp64_ = NULL; + gdouble _tmp65_ = 0.0; +#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; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp30_ = spit_transitions_visuals_get_to_pixbuf (_tmp29_); +#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_); +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp34_ = _tmp33_; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp35_ = _tmp34_.x; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp36_ = visuals; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp36_, &_tmp37_); +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp38_ = _tmp37_; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp39_ = _tmp38_.y; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp28_, _tmp31_, (gdouble) _tmp35_, (gdouble) _tmp39_); +#line 449 "CirclesEffect.c" + { + gint y = 0; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + y = 0; +#line 454 "CirclesEffect.c" + { + gboolean _tmp40_ = FALSE; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp40_ = TRUE; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + while (TRUE) { +#line 461 "CirclesEffect.c" + gint _tmp42_ = 0; + gint _tmp43_ = 0; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + if (!_tmp40_) { +#line 466 "CirclesEffect.c" + gint _tmp41_ = 0; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp41_ = y; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + y = _tmp41_ + 1; +#line 472 "CirclesEffect.c" + } +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp40_ = FALSE; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp42_ = y; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp43_ = circleCountY; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + if (!(_tmp42_ <= _tmp43_)) { +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + break; +#line 484 "CirclesEffect.c" + } + { + gint x = 0; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + x = 0; +#line 490 "CirclesEffect.c" + { + gboolean _tmp44_ = FALSE; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp44_ = TRUE; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + while (TRUE) { +#line 497 "CirclesEffect.c" + gint _tmp46_ = 0; + gint _tmp47_ = 0; + gdouble _tmp48_ = 0.0; + gint _tmp49_ = 0; + gint _tmp50_ = 0; + gint _tmp51_ = 0; + gint _tmp52_ = 0; + gdouble _tmp53_ = 0.0; + gdouble _tmp54_ = 0.0; + gdouble _tmp55_ = 0.0; + cairo_t* _tmp56_ = NULL; + gint _tmp57_ = 0; + gint _tmp58_ = 0; + gint _tmp59_ = 0; + gint _tmp60_ = 0; + gint _tmp61_ = 0; + cairo_t* _tmp62_ = NULL; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + if (!_tmp44_) { +#line 517 "CirclesEffect.c" + gint _tmp45_ = 0; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp45_ = x; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + x = _tmp45_ + 1; +#line 523 "CirclesEffect.c" + } +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp44_ = FALSE; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp46_ = x; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp47_ = circleCountX; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + if (!(_tmp46_ <= _tmp47_)) { +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + break; +#line 535 "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; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp51_ = circleCountY; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp52_ = circleCountX; +#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)))); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp54_ = fmax ((gdouble) 0, _tmp53_); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp55_ = maxRadius; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + radius = (gint) (_tmp54_ * _tmp55_); +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp56_ = ctx; +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp57_ = distance; +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp58_ = x; +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp59_ = distance; +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp60_ = y; +#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; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + cairo_fill (_tmp62_); +#line 573 "CirclesEffect.c" + } + } + } + } + } + } +#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; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + _tmp65_ = alpha; +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + cairo_paint_with_alpha (_tmp64_, _tmp65_); +#line 590 "CirclesEffect.c" + } +} + + +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); +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + 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 603 "CirclesEffect.c" +} + + +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 611 "CirclesEffect.c" +} + + +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 618 "CirclesEffect.c" +} + + +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" + iface->get_fps = (void (*)(SpitTransitionsEffect*, gint*, gint*)) circles_effect_real_get_fps; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + iface->start = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*)) circles_effect_real_start; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + iface->needs_clear_background = (gboolean (*)(SpitTransitionsEffect*)) circles_effect_real_needs_clear_background; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + iface->paint = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, cairo_t*, gint, gint, gint)) circles_effect_real_paint; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala" + 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 637 "CirclesEffect.c" +} + + +static void circles_effect_instance_init (CirclesEffect * self) { +} + + +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 }; + static const GInterfaceInfo spit_transitions_effect_info = { (GInterfaceInitFunc) circles_effect_spit_transitions_effect_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType circles_effect_type_id; + circles_effect_type_id = g_type_register_static (G_TYPE_OBJECT, "CirclesEffect", &g_define_type_info, 0); + g_type_add_interface_static (circles_effect_type_id, SPIT_TRANSITIONS_TYPE_EFFECT, &spit_transitions_effect_info); + g_once_init_leave (&circles_effect_type_id__volatile, circles_effect_type_id); + } + return circles_effect_type_id__volatile; +} + + + diff --git a/plugins/shotwell-transitions/ClockEffect.c b/plugins/shotwell-transitions/ClockEffect.c new file mode 100644 index 0000000..3074f40 --- /dev/null +++ b/plugins/shotwell-transitions/ClockEffect.c @@ -0,0 +1,638 @@ +/* ClockEffect.c generated by valac 0.32.1, the Vala compiler + * generated from ClockEffect.vala, do not modify */ + +/* Copyright 2013 Jens Bav + * Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (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> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include <glib/gi18n-lib.h> +#include <float.h> +#include <math.h> +#include <cairo.h> +#include <gdk/gdk.h> + + +#define TYPE_SHOTWELL_TRANSITION_DESCRIPTOR (shotwell_transition_descriptor_get_type ()) +#define SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptor)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) + +typedef struct _ShotwellTransitionDescriptor ShotwellTransitionDescriptor; +typedef struct _ShotwellTransitionDescriptorClass ShotwellTransitionDescriptorClass; +typedef struct _ShotwellTransitionDescriptorPrivate ShotwellTransitionDescriptorPrivate; + +#define TYPE_CLOCK_EFFECT_DESCRIPTOR (clock_effect_descriptor_get_type ()) +#define CLOCK_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CLOCK_EFFECT_DESCRIPTOR, ClockEffectDescriptor)) +#define CLOCK_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CLOCK_EFFECT_DESCRIPTOR, ClockEffectDescriptorClass)) +#define IS_CLOCK_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CLOCK_EFFECT_DESCRIPTOR)) +#define IS_CLOCK_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CLOCK_EFFECT_DESCRIPTOR)) +#define CLOCK_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CLOCK_EFFECT_DESCRIPTOR, ClockEffectDescriptorClass)) + +typedef struct _ClockEffectDescriptor ClockEffectDescriptor; +typedef struct _ClockEffectDescriptorClass ClockEffectDescriptorClass; +typedef struct _ClockEffectDescriptorPrivate ClockEffectDescriptorPrivate; + +#define TYPE_CLOCK_EFFECT (clock_effect_get_type ()) +#define CLOCK_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CLOCK_EFFECT, ClockEffect)) +#define CLOCK_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CLOCK_EFFECT, ClockEffectClass)) +#define IS_CLOCK_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CLOCK_EFFECT)) +#define IS_CLOCK_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CLOCK_EFFECT)) +#define CLOCK_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CLOCK_EFFECT, ClockEffectClass)) + +typedef struct _ClockEffect ClockEffect; +typedef struct _ClockEffectClass ClockEffectClass; +typedef struct _ClockEffectPrivate ClockEffectPrivate; + +struct _ShotwellTransitionDescriptor { + GObject parent_instance; + ShotwellTransitionDescriptorPrivate * priv; +}; + +struct _ShotwellTransitionDescriptorClass { + GObjectClass parent_class; + const gchar* (*get_id) (ShotwellTransitionDescriptor* self); + const gchar* (*get_pluggable_name) (ShotwellTransitionDescriptor* self); + SpitTransitionsEffect* (*create) (ShotwellTransitionDescriptor* self, SpitHostInterface* host); +}; + +struct _ClockEffectDescriptor { + ShotwellTransitionDescriptor parent_instance; + ClockEffectDescriptorPrivate * priv; +}; + +struct _ClockEffectDescriptorClass { + ShotwellTransitionDescriptorClass parent_class; +}; + +struct _ClockEffect { + GObject parent_instance; + ClockEffectPrivate * priv; +}; + +struct _ClockEffectClass { + GObjectClass parent_class; +}; + + +static gpointer clock_effect_descriptor_parent_class = NULL; +static gpointer clock_effect_parent_class = NULL; +static SpitTransitionsEffectIface* clock_effect_spit_transitions_effect_parent_iface = NULL; + +GType shotwell_transition_descriptor_get_type (void) G_GNUC_CONST; +GType clock_effect_descriptor_get_type (void) G_GNUC_CONST; +enum { + CLOCK_EFFECT_DESCRIPTOR_DUMMY_PROPERTY +}; +ClockEffectDescriptor* clock_effect_descriptor_new (GFile* resource_directory); +ClockEffectDescriptor* clock_effect_descriptor_construct (GType object_type, GFile* resource_directory); +ShotwellTransitionDescriptor* shotwell_transition_descriptor_construct (GType object_type, GFile* resource_directory); +static const gchar* clock_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base); +static const gchar* clock_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base); +static SpitTransitionsEffect* clock_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host); +ClockEffect* clock_effect_new (void); +ClockEffect* clock_effect_construct (GType object_type); +GType clock_effect_get_type (void) G_GNUC_CONST; +enum { + CLOCK_EFFECT_DUMMY_PROPERTY +}; +#define CLOCK_EFFECT_DESIRED_FPS 25 +#define CLOCK_EFFECT_MIN_FPS 15 +#define CLOCK_EFFECT_TOP_RADIANT (0.5 * G_PI) +static void clock_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps); +static void clock_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion); +static gboolean clock_effect_real_needs_clear_background (SpitTransitionsEffect* base); +static void clock_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number); +static void clock_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number); +static void clock_effect_real_cancel (SpitTransitionsEffect* base); + + +ClockEffectDescriptor* clock_effect_descriptor_construct (GType object_type, GFile* resource_directory) { + ClockEffectDescriptor * self = NULL; + GFile* _tmp0_ = NULL; +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp0_ = resource_directory; +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + self = (ClockEffectDescriptor*) shotwell_transition_descriptor_construct (object_type, _tmp0_); +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + return self; +#line 132 "ClockEffect.c" +} + + +ClockEffectDescriptor* clock_effect_descriptor_new (GFile* resource_directory) { +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + return clock_effect_descriptor_construct (TYPE_CLOCK_EFFECT_DESCRIPTOR, resource_directory); +#line 139 "ClockEffect.c" +} + + +static const gchar* clock_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base) { + ClockEffectDescriptor * self; + const gchar* result = NULL; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CLOCK_EFFECT_DESCRIPTOR, ClockEffectDescriptor); +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + result = "org.yorba.shotwell.transitions.clock"; +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + return result; +#line 152 "ClockEffect.c" +} + + +static const gchar* clock_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base) { + ClockEffectDescriptor * self; + const gchar* result = NULL; + const gchar* _tmp0_ = NULL; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CLOCK_EFFECT_DESCRIPTOR, ClockEffectDescriptor); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp0_ = _ ("Clock"); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + result = _tmp0_; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + return result; +#line 168 "ClockEffect.c" +} + + +static SpitTransitionsEffect* clock_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host) { + ClockEffectDescriptor * self; + SpitTransitionsEffect* result = NULL; + ClockEffect* _tmp0_ = NULL; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CLOCK_EFFECT_DESCRIPTOR, ClockEffectDescriptor); +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + g_return_val_if_fail (SPIT_IS_HOST_INTERFACE (host), NULL); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp0_ = clock_effect_new (); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TRANSITIONS_TYPE_EFFECT, SpitTransitionsEffect); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + return result; +#line 186 "ClockEffect.c" +} + + +static void clock_effect_descriptor_class_init (ClockEffectDescriptorClass * klass) { +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + clock_effect_descriptor_parent_class = g_type_class_peek_parent (klass); +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_id = clock_effect_descriptor_real_get_id; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_pluggable_name = clock_effect_descriptor_real_get_pluggable_name; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->create = clock_effect_descriptor_real_create; +#line 199 "ClockEffect.c" +} + + +static void clock_effect_descriptor_instance_init (ClockEffectDescriptor * self) { +} + + +GType clock_effect_descriptor_get_type (void) { + static volatile gsize clock_effect_descriptor_type_id__volatile = 0; + if (g_once_init_enter (&clock_effect_descriptor_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (ClockEffectDescriptorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) clock_effect_descriptor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ClockEffectDescriptor), 0, (GInstanceInitFunc) clock_effect_descriptor_instance_init, NULL }; + GType clock_effect_descriptor_type_id; + clock_effect_descriptor_type_id = g_type_register_static (TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, "ClockEffectDescriptor", &g_define_type_info, 0); + g_once_init_leave (&clock_effect_descriptor_type_id__volatile, clock_effect_descriptor_type_id); + } + return clock_effect_descriptor_type_id__volatile; +} + + +ClockEffect* clock_effect_construct (GType object_type) { + ClockEffect * self = NULL; +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + self = (ClockEffect*) g_object_new (object_type, NULL); +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + return self; +#line 225 "ClockEffect.c" +} + + +ClockEffect* clock_effect_new (void) { +#line 33 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + return clock_effect_construct (TYPE_CLOCK_EFFECT); +#line 232 "ClockEffect.c" +} + + +static void clock_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps) { + ClockEffect * self; + gint _vala_desired_fps = 0; + gint _vala_min_fps = 0; +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CLOCK_EFFECT, ClockEffect); +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _vala_desired_fps = CLOCK_EFFECT_DESIRED_FPS; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _vala_min_fps = CLOCK_EFFECT_MIN_FPS; +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + if (desired_fps) { +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + *desired_fps = _vala_desired_fps; +#line 250 "ClockEffect.c" + } +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + if (min_fps) { +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + *min_fps = _vala_min_fps; +#line 256 "ClockEffect.c" + } +} + + +static void clock_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion) { + ClockEffect * self; +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CLOCK_EFFECT, ClockEffect); +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 269 "ClockEffect.c" +} + + +static gboolean clock_effect_real_needs_clear_background (SpitTransitionsEffect* base) { + ClockEffect * self; + gboolean result = FALSE; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CLOCK_EFFECT, ClockEffect); +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + result = TRUE; +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + return result; +#line 282 "ClockEffect.c" +} + + +static void clock_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number) { + ClockEffect * self; + gdouble alpha = 0.0; + SpitTransitionsMotion* _tmp0_ = NULL; + gint _tmp1_ = 0; + gdouble _tmp2_ = 0.0; + gdouble start_angle = 0.0; + gdouble stop_angle = 0.0; + SpitTransitionsMotion* _tmp3_ = NULL; + SpitTransitionsDirection _tmp4_ = 0; + SpitTransitionsDirection _tmp5_ = 0; + gint radius = 0; + SpitTransitionsVisuals* _tmp8_ = NULL; + GdkRectangle _tmp9_ = {0}; + GdkRectangle _tmp10_ = {0}; + gint _tmp11_ = 0; + SpitTransitionsVisuals* _tmp12_ = NULL; + GdkRectangle _tmp13_ = {0}; + GdkRectangle _tmp14_ = {0}; + gint _tmp15_ = 0; + gdouble _tmp16_ = 0.0; + SpitTransitionsVisuals* _tmp17_ = NULL; + GdkPixbuf* _tmp18_ = NULL; + GdkPixbuf* _tmp19_ = NULL; + SpitTransitionsVisuals* _tmp34_ = NULL; + GdkPixbuf* _tmp35_ = NULL; + GdkPixbuf* _tmp36_ = NULL; +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CLOCK_EFFECT, ClockEffect); +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 48 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + g_return_if_fail (ctx != NULL); +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp0_ = motion; +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp1_ = frame_number; +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp2_ = spit_transitions_motion_get_alpha (_tmp0_, _tmp1_); +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + alpha = _tmp2_; +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + start_angle = -CLOCK_EFFECT_TOP_RADIANT; +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + stop_angle = -CLOCK_EFFECT_TOP_RADIANT; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp3_ = motion; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp4_ = spit_transitions_motion_get_direction (_tmp3_); +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp5_ = _tmp4_; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + if (_tmp5_ == SPIT_TRANSITIONS_DIRECTION_FORWARD) { +#line 341 "ClockEffect.c" + gdouble _tmp6_ = 0.0; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp6_ = alpha; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + stop_angle = ((_tmp6_ * G_PI) * 2) - CLOCK_EFFECT_TOP_RADIANT; +#line 347 "ClockEffect.c" + } else { + gdouble _tmp7_ = 0.0; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp7_ = alpha; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + start_angle = ((2 * (1 - _tmp7_)) * G_PI) - CLOCK_EFFECT_TOP_RADIANT; +#line 354 "ClockEffect.c" + } +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp8_ = visuals; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp8_, &_tmp9_); +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp10_ = _tmp9_; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp11_ = _tmp10_.width; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp12_ = visuals; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp12_, &_tmp13_); +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp14_ = _tmp13_; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp15_ = _tmp14_.height; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp16_ = fmax ((gdouble) _tmp11_, (gdouble) _tmp15_); +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + radius = (gint) _tmp16_; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp17_ = visuals; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp18_ = spit_transitions_visuals_get_from_pixbuf (_tmp17_); +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp19_ = _tmp18_; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + if (_tmp19_ != NULL) { +#line 384 "ClockEffect.c" + cairo_t* _tmp20_ = NULL; + SpitTransitionsVisuals* _tmp21_ = NULL; + GdkPixbuf* _tmp22_ = NULL; + GdkPixbuf* _tmp23_ = NULL; + SpitTransitionsVisuals* _tmp24_ = NULL; + GdkRectangle _tmp25_ = {0}; + GdkRectangle _tmp26_ = {0}; + gint _tmp27_ = 0; + SpitTransitionsVisuals* _tmp28_ = NULL; + GdkRectangle _tmp29_ = {0}; + GdkRectangle _tmp30_ = {0}; + gint _tmp31_ = 0; + cairo_t* _tmp32_ = NULL; + gdouble _tmp33_ = 0.0; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp20_ = ctx; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp21_ = visuals; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp22_ = spit_transitions_visuals_get_from_pixbuf (_tmp21_); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp23_ = _tmp22_; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp24_ = visuals; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp24_, &_tmp25_); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp26_ = _tmp25_; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp27_ = _tmp26_.x; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp28_ = visuals; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp28_, &_tmp29_); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp30_ = _tmp29_; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp31_ = _tmp30_.y; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp20_, _tmp23_, (gdouble) _tmp27_, (gdouble) _tmp31_); +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp32_ = ctx; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp33_ = alpha; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + cairo_paint_with_alpha (_tmp32_, 1 - _tmp33_); +#line 431 "ClockEffect.c" + } +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp34_ = visuals; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp35_ = spit_transitions_visuals_get_to_pixbuf (_tmp34_); +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp36_ = _tmp35_; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + if (_tmp36_ != NULL) { +#line 441 "ClockEffect.c" + cairo_t* _tmp37_ = NULL; + SpitTransitionsVisuals* _tmp38_ = NULL; + GdkPixbuf* _tmp39_ = NULL; + GdkPixbuf* _tmp40_ = NULL; + SpitTransitionsVisuals* _tmp41_ = NULL; + GdkRectangle _tmp42_ = {0}; + GdkRectangle _tmp43_ = {0}; + gint _tmp44_ = 0; + SpitTransitionsVisuals* _tmp45_ = NULL; + GdkRectangle _tmp46_ = {0}; + GdkRectangle _tmp47_ = {0}; + gint _tmp48_ = 0; + gint x = 0; + SpitTransitionsVisuals* _tmp49_ = NULL; + GdkRectangle _tmp50_ = {0}; + GdkRectangle _tmp51_ = {0}; + gint _tmp52_ = 0; + SpitTransitionsVisuals* _tmp53_ = NULL; + GdkRectangle _tmp54_ = {0}; + GdkRectangle _tmp55_ = {0}; + gint _tmp56_ = 0; + gint y = 0; + SpitTransitionsVisuals* _tmp57_ = NULL; + GdkRectangle _tmp58_ = {0}; + GdkRectangle _tmp59_ = {0}; + gint _tmp60_ = 0; + SpitTransitionsVisuals* _tmp61_ = NULL; + GdkRectangle _tmp62_ = {0}; + GdkRectangle _tmp63_ = {0}; + gint _tmp64_ = 0; + cairo_t* _tmp65_ = NULL; + gint _tmp66_ = 0; + gint _tmp67_ = 0; + cairo_t* _tmp68_ = NULL; + gint _tmp69_ = 0; + gint _tmp70_ = 0; + gint _tmp71_ = 0; + gdouble _tmp72_ = 0.0; + gdouble _tmp73_ = 0.0; + cairo_t* _tmp74_ = NULL; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp37_ = ctx; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp38_ = visuals; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp39_ = spit_transitions_visuals_get_to_pixbuf (_tmp38_); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp40_ = _tmp39_; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp41_ = visuals; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp41_, &_tmp42_); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp43_ = _tmp42_; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp44_ = _tmp43_.x; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp45_ = visuals; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp45_, &_tmp46_); +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp47_ = _tmp46_; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp48_ = _tmp47_.y; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp37_, _tmp40_, (gdouble) _tmp44_, (gdouble) _tmp48_); +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp49_ = visuals; +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp49_, &_tmp50_); +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp51_ = _tmp50_; +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp52_ = _tmp51_.x; +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp53_ = visuals; +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp53_, &_tmp54_); +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp55_ = _tmp54_; +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp56_ = _tmp55_.width; +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + x = _tmp52_ + (((gint) _tmp56_) / 2); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp57_ = visuals; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp57_, &_tmp58_); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp59_ = _tmp58_; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp60_ = _tmp59_.y; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp61_ = visuals; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp61_, &_tmp62_); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp63_ = _tmp62_; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp64_ = _tmp63_.height; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + y = _tmp60_ + (((gint) _tmp64_) / 2); +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp65_ = ctx; +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp66_ = x; +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp67_ = y; +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + cairo_move_to (_tmp65_, (gdouble) _tmp66_, (gdouble) _tmp67_); +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp68_ = ctx; +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp69_ = x; +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp70_ = y; +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp71_ = radius; +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp72_ = start_angle; +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp73_ = stop_angle; +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + cairo_arc (_tmp68_, (gdouble) _tmp69_, (gdouble) _tmp70_, (gdouble) _tmp71_, _tmp72_, _tmp73_); +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + _tmp74_ = ctx; +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + cairo_fill_preserve (_tmp74_); +#line 570 "ClockEffect.c" + } +} + + +static void clock_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number) { + ClockEffect * self; +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CLOCK_EFFECT, ClockEffect); +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 583 "ClockEffect.c" +} + + +static void clock_effect_real_cancel (SpitTransitionsEffect* base) { + ClockEffect * self; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CLOCK_EFFECT, ClockEffect); +#line 591 "ClockEffect.c" +} + + +static void clock_effect_class_init (ClockEffectClass * klass) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + clock_effect_parent_class = g_type_class_peek_parent (klass); +#line 598 "ClockEffect.c" +} + + +static void clock_effect_spit_transitions_effect_interface_init (SpitTransitionsEffectIface * iface) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + clock_effect_spit_transitions_effect_parent_iface = g_type_interface_peek_parent (iface); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + iface->get_fps = (void (*)(SpitTransitionsEffect*, gint*, gint*)) clock_effect_real_get_fps; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + iface->start = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*)) clock_effect_real_start; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + iface->needs_clear_background = (gboolean (*)(SpitTransitionsEffect*)) clock_effect_real_needs_clear_background; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + iface->paint = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, cairo_t*, gint, gint, gint)) clock_effect_real_paint; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + iface->advance = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, gint)) clock_effect_real_advance; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/ClockEffect.vala" + iface->cancel = (void (*)(SpitTransitionsEffect*)) clock_effect_real_cancel; +#line 617 "ClockEffect.c" +} + + +static void clock_effect_instance_init (ClockEffect * self) { +} + + +GType clock_effect_get_type (void) { + static volatile gsize clock_effect_type_id__volatile = 0; + if (g_once_init_enter (&clock_effect_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (ClockEffectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) clock_effect_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ClockEffect), 0, (GInstanceInitFunc) clock_effect_instance_init, NULL }; + static const GInterfaceInfo spit_transitions_effect_info = { (GInterfaceInitFunc) clock_effect_spit_transitions_effect_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType clock_effect_type_id; + clock_effect_type_id = g_type_register_static (G_TYPE_OBJECT, "ClockEffect", &g_define_type_info, 0); + g_type_add_interface_static (clock_effect_type_id, SPIT_TRANSITIONS_TYPE_EFFECT, &spit_transitions_effect_info); + g_once_init_leave (&clock_effect_type_id__volatile, clock_effect_type_id); + } + return clock_effect_type_id__volatile; +} + + + diff --git a/plugins/shotwell-transitions/CrumbleEffect.c b/plugins/shotwell-transitions/CrumbleEffect.c new file mode 100644 index 0000000..4fab4db --- /dev/null +++ b/plugins/shotwell-transitions/CrumbleEffect.c @@ -0,0 +1,857 @@ +/* CrumbleEffect.c generated by valac 0.32.1, the Vala compiler + * generated from CrumbleEffect.vala, do not modify */ + +/* Copyright 2010 Maxim Kartashev + * Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (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> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include <glib/gi18n-lib.h> +#include <cairo.h> +#include <float.h> +#include <math.h> +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <gdk/gdk.h> + + +#define TYPE_SHOTWELL_TRANSITION_DESCRIPTOR (shotwell_transition_descriptor_get_type ()) +#define SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptor)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) + +typedef struct _ShotwellTransitionDescriptor ShotwellTransitionDescriptor; +typedef struct _ShotwellTransitionDescriptorClass ShotwellTransitionDescriptorClass; +typedef struct _ShotwellTransitionDescriptorPrivate ShotwellTransitionDescriptorPrivate; + +#define TYPE_CRUMBLE_EFFECT_DESCRIPTOR (crumble_effect_descriptor_get_type ()) +#define CRUMBLE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CRUMBLE_EFFECT_DESCRIPTOR, CrumbleEffectDescriptor)) +#define CRUMBLE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CRUMBLE_EFFECT_DESCRIPTOR, CrumbleEffectDescriptorClass)) +#define IS_CRUMBLE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CRUMBLE_EFFECT_DESCRIPTOR)) +#define IS_CRUMBLE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CRUMBLE_EFFECT_DESCRIPTOR)) +#define CRUMBLE_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CRUMBLE_EFFECT_DESCRIPTOR, CrumbleEffectDescriptorClass)) + +typedef struct _CrumbleEffectDescriptor CrumbleEffectDescriptor; +typedef struct _CrumbleEffectDescriptorClass CrumbleEffectDescriptorClass; +typedef struct _CrumbleEffectDescriptorPrivate CrumbleEffectDescriptorPrivate; + +#define TYPE_CRUMBLE_EFFECT (crumble_effect_get_type ()) +#define CRUMBLE_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CRUMBLE_EFFECT, CrumbleEffect)) +#define CRUMBLE_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CRUMBLE_EFFECT, CrumbleEffectClass)) +#define IS_CRUMBLE_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CRUMBLE_EFFECT)) +#define IS_CRUMBLE_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CRUMBLE_EFFECT)) +#define CRUMBLE_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CRUMBLE_EFFECT, CrumbleEffectClass)) + +typedef struct _CrumbleEffect CrumbleEffect; +typedef struct _CrumbleEffectClass CrumbleEffectClass; +typedef struct _CrumbleEffectPrivate CrumbleEffectPrivate; +#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL))) +#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL))) +#define _g_rand_free0(var) ((var == NULL) ? NULL : (var = (g_rand_free (var), NULL))) + +struct _ShotwellTransitionDescriptor { + GObject parent_instance; + ShotwellTransitionDescriptorPrivate * priv; +}; + +struct _ShotwellTransitionDescriptorClass { + GObjectClass parent_class; + const gchar* (*get_id) (ShotwellTransitionDescriptor* self); + const gchar* (*get_pluggable_name) (ShotwellTransitionDescriptor* self); + SpitTransitionsEffect* (*create) (ShotwellTransitionDescriptor* self, SpitHostInterface* host); +}; + +struct _CrumbleEffectDescriptor { + ShotwellTransitionDescriptor parent_instance; + CrumbleEffectDescriptorPrivate * priv; +}; + +struct _CrumbleEffectDescriptorClass { + ShotwellTransitionDescriptorClass parent_class; +}; + +struct _CrumbleEffect { + GObject parent_instance; + CrumbleEffectPrivate * priv; +}; + +struct _CrumbleEffectClass { + GObjectClass parent_class; +}; + +struct _CrumbleEffectPrivate { + cairo_surface_t** from_stripes; + gint from_stripes_length1; + gint _from_stripes_size_; + gdouble* accelerations; + gint accelerations_length1; + gint _accelerations_size_; + gint stripes_count; +}; + + +static gpointer crumble_effect_descriptor_parent_class = NULL; +static gpointer crumble_effect_parent_class = NULL; +static SpitTransitionsEffectIface* crumble_effect_spit_transitions_effect_parent_iface = NULL; + +GType shotwell_transition_descriptor_get_type (void) G_GNUC_CONST; +GType crumble_effect_descriptor_get_type (void) G_GNUC_CONST; +enum { + CRUMBLE_EFFECT_DESCRIPTOR_DUMMY_PROPERTY +}; +CrumbleEffectDescriptor* crumble_effect_descriptor_new (GFile* resource_directory); +CrumbleEffectDescriptor* crumble_effect_descriptor_construct (GType object_type, GFile* resource_directory); +ShotwellTransitionDescriptor* shotwell_transition_descriptor_construct (GType object_type, GFile* resource_directory); +static const gchar* crumble_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base); +static const gchar* crumble_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base); +static SpitTransitionsEffect* crumble_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host); +CrumbleEffect* crumble_effect_new (void); +CrumbleEffect* crumble_effect_construct (GType object_type); +GType crumble_effect_get_type (void) G_GNUC_CONST; +#define CRUMBLE_EFFECT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_CRUMBLE_EFFECT, CrumbleEffectPrivate)) +enum { + CRUMBLE_EFFECT_DUMMY_PROPERTY +}; +#define CRUMBLE_EFFECT_DESIRED_FPS 25 +#define CRUMBLE_EFFECT_MIN_FPS 15 +#define CRUMBLE_EFFECT_STRIPE_WIDTH 10 +static void crumble_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps); +static gboolean crumble_effect_real_needs_clear_background (SpitTransitionsEffect* base); +static void crumble_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion); +static void crumble_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number); +static void crumble_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number); +static void crumble_effect_real_cancel (SpitTransitionsEffect* base); +static void crumble_effect_finalize (GObject* obj); +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); + + +CrumbleEffectDescriptor* crumble_effect_descriptor_construct (GType object_type, GFile* resource_directory) { + CrumbleEffectDescriptor * self = NULL; + GFile* _tmp0_ = NULL; +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp0_ = resource_directory; +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self = (CrumbleEffectDescriptor*) shotwell_transition_descriptor_construct (object_type, _tmp0_); +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + return self; +#line 150 "CrumbleEffect.c" +} + + +CrumbleEffectDescriptor* crumble_effect_descriptor_new (GFile* resource_directory) { +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + return crumble_effect_descriptor_construct (TYPE_CRUMBLE_EFFECT_DESCRIPTOR, resource_directory); +#line 157 "CrumbleEffect.c" +} + + +static const gchar* crumble_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base) { + CrumbleEffectDescriptor * self; + const gchar* result = NULL; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CRUMBLE_EFFECT_DESCRIPTOR, CrumbleEffectDescriptor); +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + result = "org.yorba.shotwell.transitions.crumble"; +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + return result; +#line 170 "CrumbleEffect.c" +} + + +static const gchar* crumble_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base) { + CrumbleEffectDescriptor * self; + const gchar* result = NULL; + const gchar* _tmp0_ = NULL; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CRUMBLE_EFFECT_DESCRIPTOR, CrumbleEffectDescriptor); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp0_ = _ ("Crumble"); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + result = _tmp0_; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + return result; +#line 186 "CrumbleEffect.c" +} + + +static SpitTransitionsEffect* crumble_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host) { + CrumbleEffectDescriptor * self; + SpitTransitionsEffect* result = NULL; + CrumbleEffect* _tmp0_ = NULL; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CRUMBLE_EFFECT_DESCRIPTOR, CrumbleEffectDescriptor); +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + g_return_val_if_fail (SPIT_IS_HOST_INTERFACE (host), NULL); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp0_ = crumble_effect_new (); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TRANSITIONS_TYPE_EFFECT, SpitTransitionsEffect); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + return result; +#line 204 "CrumbleEffect.c" +} + + +static void crumble_effect_descriptor_class_init (CrumbleEffectDescriptorClass * klass) { +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + crumble_effect_descriptor_parent_class = g_type_class_peek_parent (klass); +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_id = crumble_effect_descriptor_real_get_id; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_pluggable_name = crumble_effect_descriptor_real_get_pluggable_name; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->create = crumble_effect_descriptor_real_create; +#line 217 "CrumbleEffect.c" +} + + +static void crumble_effect_descriptor_instance_init (CrumbleEffectDescriptor * self) { +} + + +GType crumble_effect_descriptor_get_type (void) { + static volatile gsize crumble_effect_descriptor_type_id__volatile = 0; + if (g_once_init_enter (&crumble_effect_descriptor_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (CrumbleEffectDescriptorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) crumble_effect_descriptor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CrumbleEffectDescriptor), 0, (GInstanceInitFunc) crumble_effect_descriptor_instance_init, NULL }; + GType crumble_effect_descriptor_type_id; + crumble_effect_descriptor_type_id = g_type_register_static (TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, "CrumbleEffectDescriptor", &g_define_type_info, 0); + g_once_init_leave (&crumble_effect_descriptor_type_id__volatile, crumble_effect_descriptor_type_id); + } + return crumble_effect_descriptor_type_id__volatile; +} + + +CrumbleEffect* crumble_effect_construct (GType object_type) { + CrumbleEffect * self = NULL; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self = (CrumbleEffect*) g_object_new (object_type, NULL); +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + return self; +#line 243 "CrumbleEffect.c" +} + + +CrumbleEffect* crumble_effect_new (void) { +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + return crumble_effect_construct (TYPE_CRUMBLE_EFFECT); +#line 250 "CrumbleEffect.c" +} + + +static void crumble_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps) { + CrumbleEffect * self; + gint _vala_desired_fps = 0; + gint _vala_min_fps = 0; +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CRUMBLE_EFFECT, CrumbleEffect); +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _vala_desired_fps = CRUMBLE_EFFECT_DESIRED_FPS; +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _vala_min_fps = CRUMBLE_EFFECT_MIN_FPS; +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + if (desired_fps) { +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + *desired_fps = _vala_desired_fps; +#line 268 "CrumbleEffect.c" + } +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + if (min_fps) { +#line 41 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + *min_fps = _vala_min_fps; +#line 274 "CrumbleEffect.c" + } +} + + +static gboolean crumble_effect_real_needs_clear_background (SpitTransitionsEffect* base) { + CrumbleEffect * self; + gboolean result = FALSE; +#line 46 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CRUMBLE_EFFECT, CrumbleEffect); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + result = TRUE; +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + return result; +#line 288 "CrumbleEffect.c" +} + + +static void crumble_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion) { + CrumbleEffect * self; + GRand* rand = NULL; + GRand* _tmp0_ = NULL; + SpitTransitionsVisuals* _tmp1_ = NULL; + GdkPixbuf* _tmp2_ = NULL; + GdkPixbuf* _tmp3_ = NULL; +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CRUMBLE_EFFECT, CrumbleEffect); +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp0_ = g_rand_new (); +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + rand = _tmp0_; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp1_ = visuals; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp2_ = spit_transitions_visuals_get_from_pixbuf (_tmp1_); +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp3_ = _tmp2_; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + if (_tmp3_ != NULL) { +#line 317 "CrumbleEffect.c" + SpitTransitionsVisuals* _tmp4_ = NULL; + GdkPixbuf* _tmp5_ = NULL; + GdkPixbuf* _tmp6_ = NULL; + gint _tmp7_ = 0; + gint _tmp8_ = 0; + gint _tmp9_ = 0; + cairo_surface_t** _tmp10_ = NULL; + gint _tmp11_ = 0; + gdouble* _tmp12_ = NULL; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp4_ = visuals; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp5_ = spit_transitions_visuals_get_from_pixbuf (_tmp4_); +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp6_ = _tmp5_; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp7_ = gdk_pixbuf_get_width (_tmp6_); +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp8_ = _tmp7_; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self->priv->stripes_count = _tmp8_ / CRUMBLE_EFFECT_STRIPE_WIDTH; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp9_ = self->priv->stripes_count; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp10_ = g_new0 (cairo_surface_t*, _tmp9_ + 1); +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self->priv->from_stripes = (_vala_array_free (self->priv->from_stripes, self->priv->from_stripes_length1, (GDestroyNotify) cairo_surface_destroy), NULL); +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self->priv->from_stripes = _tmp10_; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self->priv->from_stripes_length1 = _tmp9_; +#line 57 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self->priv->_from_stripes_size_ = self->priv->from_stripes_length1; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp11_ = self->priv->stripes_count; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp12_ = g_new0 (gdouble, _tmp11_); +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self->priv->accelerations = (g_free (self->priv->accelerations), NULL); +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self->priv->accelerations = _tmp12_; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self->priv->accelerations_length1 = _tmp11_; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self->priv->_accelerations_size_ = self->priv->accelerations_length1; +#line 363 "CrumbleEffect.c" + { + gint i = 0; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + i = 0; +#line 368 "CrumbleEffect.c" + { + gboolean _tmp13_ = FALSE; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp13_ = TRUE; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + while (TRUE) { +#line 375 "CrumbleEffect.c" + gint _tmp15_ = 0; + gint _tmp16_ = 0; + cairo_surface_t** _tmp17_ = NULL; + gint _tmp17__length1 = 0; + gint _tmp18_ = 0; + SpitTransitionsVisuals* _tmp19_ = NULL; + GdkPixbuf* _tmp20_ = NULL; + GdkPixbuf* _tmp21_ = NULL; + gint _tmp22_ = 0; + gint _tmp23_ = 0; + cairo_surface_t* _tmp24_ = NULL; + cairo_surface_t* _tmp25_ = NULL; + cairo_t* ctx = NULL; + cairo_surface_t** _tmp26_ = NULL; + gint _tmp26__length1 = 0; + gint _tmp27_ = 0; + cairo_surface_t* _tmp28_ = NULL; + cairo_t* _tmp29_ = NULL; + cairo_t* _tmp30_ = NULL; + SpitTransitionsVisuals* _tmp31_ = NULL; + GdkPixbuf* _tmp32_ = NULL; + GdkPixbuf* _tmp33_ = NULL; + gint _tmp34_ = 0; + cairo_t* _tmp35_ = NULL; + gdouble* _tmp36_ = NULL; + gint _tmp36__length1 = 0; + gint _tmp37_ = 0; + GRand* _tmp38_ = NULL; + gdouble _tmp39_ = 0.0; + gdouble _tmp40_ = 0.0; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + if (!_tmp13_) { +#line 408 "CrumbleEffect.c" + gint _tmp14_ = 0; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp14_ = i; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + i = _tmp14_ + 1; +#line 414 "CrumbleEffect.c" + } +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp13_ = FALSE; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp15_ = i; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp16_ = self->priv->stripes_count; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + if (!(_tmp15_ < _tmp16_)) { +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + break; +#line 426 "CrumbleEffect.c" + } +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp17_ = self->priv->from_stripes; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp17__length1 = self->priv->from_stripes_length1; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp18_ = i; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp19_ = visuals; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp20_ = spit_transitions_visuals_get_from_pixbuf (_tmp19_); +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp21_ = _tmp20_; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp22_ = gdk_pixbuf_get_height (_tmp21_); +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp23_ = _tmp22_; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp24_ = cairo_image_surface_create (CAIRO_FORMAT_RGB24, CRUMBLE_EFFECT_STRIPE_WIDTH, _tmp23_); +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _cairo_surface_destroy0 (_tmp17_[_tmp18_]); +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp17_[_tmp18_] = _tmp24_; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp25_ = _tmp17_[_tmp18_]; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp26_ = self->priv->from_stripes; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp26__length1 = self->priv->from_stripes_length1; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp27_ = i; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp28_ = _tmp26_[_tmp27_]; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp29_ = cairo_create (_tmp28_); +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + ctx = _tmp29_; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp30_ = ctx; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp31_ = visuals; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp32_ = spit_transitions_visuals_get_from_pixbuf (_tmp31_); +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp33_ = _tmp32_; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp34_ = i; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp30_, _tmp33_, (gdouble) ((-_tmp34_) * CRUMBLE_EFFECT_STRIPE_WIDTH), (gdouble) 0); +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp35_ = ctx; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + cairo_paint (_tmp35_); +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp36_ = self->priv->accelerations; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp36__length1 = self->priv->accelerations_length1; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp37_ = i; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp38_ = rand; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp39_ = g_rand_double (_tmp38_); +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp36_[_tmp37_] = _tmp39_; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp40_ = _tmp36_[_tmp37_]; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _cairo_destroy0 (ctx); +#line 496 "CrumbleEffect.c" + } + } + } + } +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _g_rand_free0 (rand); +#line 503 "CrumbleEffect.c" +} + + +static void crumble_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number) { + CrumbleEffect * self; + gdouble alpha = 0.0; + SpitTransitionsMotion* _tmp0_ = NULL; + gint _tmp1_ = 0; + gdouble _tmp2_ = 0.0; + gdouble _tmp3_ = 0.0; +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CRUMBLE_EFFECT, CrumbleEffect); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + g_return_if_fail (ctx != NULL); +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp0_ = motion; +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp1_ = frame_number; +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp2_ = spit_transitions_motion_get_alpha (_tmp0_, _tmp1_); +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + alpha = _tmp2_; +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp3_ = alpha; +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + if (_tmp3_ < 0.5) { +#line 534 "CrumbleEffect.c" + gdouble _tmp4_ = 0.0; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp4_ = alpha; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + alpha = _tmp4_ * 2; +#line 540 "CrumbleEffect.c" + { + gint i = 0; +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + i = 0; +#line 545 "CrumbleEffect.c" + { + gboolean _tmp5_ = FALSE; +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp5_ = TRUE; +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + while (TRUE) { +#line 552 "CrumbleEffect.c" + gint _tmp7_ = 0; + gint _tmp8_ = 0; + gint x = 0; + SpitTransitionsVisuals* _tmp9_ = NULL; + GdkRectangle _tmp10_ = {0}; + GdkRectangle _tmp11_ = {0}; + gint _tmp12_ = 0; + gint _tmp13_ = 0; + gdouble a = 0.0; + gdouble _tmp14_ = 0.0; + gdouble _tmp15_ = 0.0; + gdouble* _tmp16_ = NULL; + gint _tmp16__length1 = 0; + gint _tmp17_ = 0; + gdouble _tmp18_ = 0.0; + gint y = 0; + SpitTransitionsVisuals* _tmp19_ = NULL; + GdkRectangle _tmp20_ = {0}; + GdkRectangle _tmp21_ = {0}; + gint _tmp22_ = 0; + SpitTransitionsVisuals* _tmp23_ = NULL; + GdkPixbuf* _tmp24_ = NULL; + GdkPixbuf* _tmp25_ = NULL; + gint _tmp26_ = 0; + gint _tmp27_ = 0; + gdouble _tmp28_ = 0.0; + gdouble _tmp29_ = 0.0; + cairo_t* _tmp30_ = NULL; + cairo_surface_t** _tmp31_ = NULL; + gint _tmp31__length1 = 0; + gint _tmp32_ = 0; + cairo_surface_t* _tmp33_ = NULL; + gint _tmp34_ = 0; + gint _tmp35_ = 0; + cairo_t* _tmp36_ = NULL; +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + if (!_tmp5_) { +#line 590 "CrumbleEffect.c" + gint _tmp6_ = 0; +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp6_ = i; +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + i = _tmp6_ + 1; +#line 596 "CrumbleEffect.c" + } +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp5_ = FALSE; +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp7_ = i; +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp8_ = self->priv->stripes_count; +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + if (!(_tmp7_ < _tmp8_)) { +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + break; +#line 608 "CrumbleEffect.c" + } +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp9_ = visuals; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp9_, &_tmp10_); +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp11_ = _tmp10_; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp12_ = _tmp11_.x; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp13_ = i; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + x = _tmp12_ + (_tmp13_ * CRUMBLE_EFFECT_STRIPE_WIDTH); +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp14_ = alpha; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp15_ = alpha; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp16_ = self->priv->accelerations; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp16__length1 = self->priv->accelerations_length1; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp17_ = i; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp18_ = _tmp16_[_tmp17_]; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + a = _tmp14_ + (_tmp15_ * _tmp18_); +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp19_ = visuals; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp19_, &_tmp20_); +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp21_ = _tmp20_; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp22_ = _tmp21_.y; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp23_ = visuals; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp24_ = spit_transitions_visuals_get_from_pixbuf (_tmp23_); +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp25_ = _tmp24_; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp26_ = gdk_pixbuf_get_height (_tmp25_); +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp27_ = _tmp26_; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp28_ = a; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp29_ = a; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + y = _tmp22_ + ((gint) ((_tmp27_ * _tmp28_) * _tmp29_)); +#line 84 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp30_ = ctx; +#line 84 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp31_ = self->priv->from_stripes; +#line 84 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp31__length1 = self->priv->from_stripes_length1; +#line 84 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp32_ = i; +#line 84 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp33_ = _tmp31_[_tmp32_]; +#line 84 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp34_ = x; +#line 84 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp35_ = y; +#line 84 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + cairo_set_source_surface (_tmp30_, _tmp33_, (gdouble) _tmp34_, (gdouble) _tmp35_); +#line 85 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp36_ = ctx; +#line 85 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + cairo_paint (_tmp36_); +#line 680 "CrumbleEffect.c" + } + } + } + } else { + SpitTransitionsVisuals* _tmp37_ = NULL; + GdkPixbuf* _tmp38_ = NULL; + GdkPixbuf* _tmp39_ = NULL; +#line 87 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp37_ = visuals; +#line 87 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp38_ = spit_transitions_visuals_get_to_pixbuf (_tmp37_); +#line 87 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp39_ = _tmp38_; +#line 87 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + if (_tmp39_ != NULL) { +#line 696 "CrumbleEffect.c" + gdouble _tmp40_ = 0.0; + cairo_t* _tmp41_ = NULL; + SpitTransitionsVisuals* _tmp42_ = NULL; + GdkPixbuf* _tmp43_ = NULL; + GdkPixbuf* _tmp44_ = NULL; + SpitTransitionsVisuals* _tmp45_ = NULL; + GdkRectangle _tmp46_ = {0}; + GdkRectangle _tmp47_ = {0}; + gint _tmp48_ = 0; + SpitTransitionsVisuals* _tmp49_ = NULL; + GdkRectangle _tmp50_ = {0}; + GdkRectangle _tmp51_ = {0}; + gint _tmp52_ = 0; + cairo_t* _tmp53_ = NULL; + gdouble _tmp54_ = 0.0; +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp40_ = alpha; +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + alpha = (_tmp40_ - 0.5) * 2; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp41_ = ctx; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp42_ = visuals; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp43_ = spit_transitions_visuals_get_to_pixbuf (_tmp42_); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp44_ = _tmp43_; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp45_ = visuals; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp45_, &_tmp46_); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp47_ = _tmp46_; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp48_ = _tmp47_.x; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp49_ = visuals; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp49_, &_tmp50_); +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp51_ = _tmp50_; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp52_ = _tmp51_.y; +#line 90 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp41_, _tmp44_, (gdouble) _tmp48_, (gdouble) _tmp52_); +#line 91 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp53_ = ctx; +#line 91 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + _tmp54_ = alpha; +#line 91 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + cairo_paint_with_alpha (_tmp53_, _tmp54_); +#line 748 "CrumbleEffect.c" + } else { + } + } +} + + +static void crumble_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number) { + CrumbleEffect * self; +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CRUMBLE_EFFECT, CrumbleEffect); +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 97 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 763 "CrumbleEffect.c" +} + + +static void crumble_effect_real_cancel (SpitTransitionsEffect* base) { + CrumbleEffect * self; +#line 100 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CRUMBLE_EFFECT, CrumbleEffect); +#line 771 "CrumbleEffect.c" +} + + +static void crumble_effect_class_init (CrumbleEffectClass * klass) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + crumble_effect_parent_class = g_type_class_peek_parent (klass); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + g_type_class_add_private (klass, sizeof (CrumbleEffectPrivate)); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + G_OBJECT_CLASS (klass)->finalize = crumble_effect_finalize; +#line 782 "CrumbleEffect.c" +} + + +static void crumble_effect_spit_transitions_effect_interface_init (SpitTransitionsEffectIface * iface) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + crumble_effect_spit_transitions_effect_parent_iface = g_type_interface_peek_parent (iface); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + iface->get_fps = (void (*)(SpitTransitionsEffect*, gint*, gint*)) crumble_effect_real_get_fps; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + iface->needs_clear_background = (gboolean (*)(SpitTransitionsEffect*)) crumble_effect_real_needs_clear_background; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + iface->start = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*)) crumble_effect_real_start; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + iface->paint = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, cairo_t*, gint, gint, gint)) crumble_effect_real_paint; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + iface->advance = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, gint)) crumble_effect_real_advance; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + iface->cancel = (void (*)(SpitTransitionsEffect*)) crumble_effect_real_cancel; +#line 801 "CrumbleEffect.c" +} + + +static void crumble_effect_instance_init (CrumbleEffect * self) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self->priv = CRUMBLE_EFFECT_GET_PRIVATE (self); +#line 808 "CrumbleEffect.c" +} + + +static void crumble_effect_finalize (GObject* obj) { + CrumbleEffect * self; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CRUMBLE_EFFECT, CrumbleEffect); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self->priv->from_stripes = (_vala_array_free (self->priv->from_stripes, self->priv->from_stripes_length1, (GDestroyNotify) cairo_surface_destroy), NULL); +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + self->priv->accelerations = (g_free (self->priv->accelerations), NULL); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CrumbleEffect.vala" + G_OBJECT_CLASS (crumble_effect_parent_class)->finalize (obj); +#line 822 "CrumbleEffect.c" +} + + +GType crumble_effect_get_type (void) { + static volatile gsize crumble_effect_type_id__volatile = 0; + if (g_once_init_enter (&crumble_effect_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (CrumbleEffectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) crumble_effect_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CrumbleEffect), 0, (GInstanceInitFunc) crumble_effect_instance_init, NULL }; + static const GInterfaceInfo spit_transitions_effect_info = { (GInterfaceInitFunc) crumble_effect_spit_transitions_effect_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType crumble_effect_type_id; + crumble_effect_type_id = g_type_register_static (G_TYPE_OBJECT, "CrumbleEffect", &g_define_type_info, 0); + g_type_add_interface_static (crumble_effect_type_id, SPIT_TRANSITIONS_TYPE_EFFECT, &spit_transitions_effect_info); + g_once_init_leave (&crumble_effect_type_id__volatile, crumble_effect_type_id); + } + return crumble_effect_type_id__volatile; +} + + +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { + if ((array != NULL) && (destroy_func != NULL)) { + int i; + for (i = 0; i < array_length; i = i + 1) { + if (((gpointer*) array)[i] != NULL) { + destroy_func (((gpointer*) array)[i]); + } + } + } +} + + +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { + _vala_array_destroy (array, array_length, destroy_func); + g_free (array); +} + + + diff --git a/plugins/shotwell-transitions/FadeEffect.c b/plugins/shotwell-transitions/FadeEffect.c new file mode 100644 index 0000000..132f3d6 --- /dev/null +++ b/plugins/shotwell-transitions/FadeEffect.c @@ -0,0 +1,493 @@ +/* FadeEffect.c generated by valac 0.32.1, the Vala compiler + * generated from FadeEffect.vala, do not modify */ + +/* Copyright 2010 Maxim Kartashev + * Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (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> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include <glib/gi18n-lib.h> +#include <cairo.h> +#include <float.h> +#include <math.h> +#include <gdk/gdk.h> + + +#define TYPE_SHOTWELL_TRANSITION_DESCRIPTOR (shotwell_transition_descriptor_get_type ()) +#define SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptor)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) + +typedef struct _ShotwellTransitionDescriptor ShotwellTransitionDescriptor; +typedef struct _ShotwellTransitionDescriptorClass ShotwellTransitionDescriptorClass; +typedef struct _ShotwellTransitionDescriptorPrivate ShotwellTransitionDescriptorPrivate; + +#define TYPE_FADE_EFFECT_DESCRIPTOR (fade_effect_descriptor_get_type ()) +#define FADE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FADE_EFFECT_DESCRIPTOR, FadeEffectDescriptor)) +#define FADE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FADE_EFFECT_DESCRIPTOR, FadeEffectDescriptorClass)) +#define IS_FADE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FADE_EFFECT_DESCRIPTOR)) +#define IS_FADE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FADE_EFFECT_DESCRIPTOR)) +#define FADE_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FADE_EFFECT_DESCRIPTOR, FadeEffectDescriptorClass)) + +typedef struct _FadeEffectDescriptor FadeEffectDescriptor; +typedef struct _FadeEffectDescriptorClass FadeEffectDescriptorClass; +typedef struct _FadeEffectDescriptorPrivate FadeEffectDescriptorPrivate; + +#define TYPE_FADE_EFFECT (fade_effect_get_type ()) +#define FADE_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FADE_EFFECT, FadeEffect)) +#define FADE_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FADE_EFFECT, FadeEffectClass)) +#define IS_FADE_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FADE_EFFECT)) +#define IS_FADE_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FADE_EFFECT)) +#define FADE_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FADE_EFFECT, FadeEffectClass)) + +typedef struct _FadeEffect FadeEffect; +typedef struct _FadeEffectClass FadeEffectClass; +typedef struct _FadeEffectPrivate FadeEffectPrivate; + +struct _ShotwellTransitionDescriptor { + GObject parent_instance; + ShotwellTransitionDescriptorPrivate * priv; +}; + +struct _ShotwellTransitionDescriptorClass { + GObjectClass parent_class; + const gchar* (*get_id) (ShotwellTransitionDescriptor* self); + const gchar* (*get_pluggable_name) (ShotwellTransitionDescriptor* self); + SpitTransitionsEffect* (*create) (ShotwellTransitionDescriptor* self, SpitHostInterface* host); +}; + +struct _FadeEffectDescriptor { + ShotwellTransitionDescriptor parent_instance; + FadeEffectDescriptorPrivate * priv; +}; + +struct _FadeEffectDescriptorClass { + ShotwellTransitionDescriptorClass parent_class; +}; + +struct _FadeEffect { + GObject parent_instance; + FadeEffectPrivate * priv; +}; + +struct _FadeEffectClass { + GObjectClass parent_class; +}; + + +static gpointer fade_effect_descriptor_parent_class = NULL; +static gpointer fade_effect_parent_class = NULL; +static SpitTransitionsEffectIface* fade_effect_spit_transitions_effect_parent_iface = NULL; + +GType shotwell_transition_descriptor_get_type (void) G_GNUC_CONST; +GType fade_effect_descriptor_get_type (void) G_GNUC_CONST; +enum { + FADE_EFFECT_DESCRIPTOR_DUMMY_PROPERTY +}; +FadeEffectDescriptor* fade_effect_descriptor_new (GFile* resource_directory); +FadeEffectDescriptor* fade_effect_descriptor_construct (GType object_type, GFile* resource_directory); +ShotwellTransitionDescriptor* shotwell_transition_descriptor_construct (GType object_type, GFile* resource_directory); +static const gchar* fade_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base); +static const gchar* fade_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base); +static SpitTransitionsEffect* fade_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host); +FadeEffect* fade_effect_new (void); +FadeEffect* fade_effect_construct (GType object_type); +GType fade_effect_get_type (void) G_GNUC_CONST; +enum { + FADE_EFFECT_DUMMY_PROPERTY +}; +#define FADE_EFFECT_DESIRED_FPS 30 +#define FADE_EFFECT_MIN_FPS 20 +static void fade_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps); +static void fade_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion); +static gboolean fade_effect_real_needs_clear_background (SpitTransitionsEffect* base); +static void fade_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number); +static void fade_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number); +static void fade_effect_real_cancel (SpitTransitionsEffect* base); + + +FadeEffectDescriptor* fade_effect_descriptor_construct (GType object_type, GFile* resource_directory) { + FadeEffectDescriptor * self = NULL; + GFile* _tmp0_ = NULL; +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp0_ = resource_directory; +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + self = (FadeEffectDescriptor*) shotwell_transition_descriptor_construct (object_type, _tmp0_); +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + return self; +#line 131 "FadeEffect.c" +} + + +FadeEffectDescriptor* fade_effect_descriptor_new (GFile* resource_directory) { +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + return fade_effect_descriptor_construct (TYPE_FADE_EFFECT_DESCRIPTOR, resource_directory); +#line 138 "FadeEffect.c" +} + + +static const gchar* fade_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base) { + FadeEffectDescriptor * self; + const gchar* result = NULL; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FADE_EFFECT_DESCRIPTOR, FadeEffectDescriptor); +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + result = "org.yorba.shotwell.transitions.fade"; +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + return result; +#line 151 "FadeEffect.c" +} + + +static const gchar* fade_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base) { + FadeEffectDescriptor * self; + const gchar* result = NULL; + const gchar* _tmp0_ = NULL; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FADE_EFFECT_DESCRIPTOR, FadeEffectDescriptor); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp0_ = _ ("Fade"); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + result = _tmp0_; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + return result; +#line 167 "FadeEffect.c" +} + + +static SpitTransitionsEffect* fade_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host) { + FadeEffectDescriptor * self; + SpitTransitionsEffect* result = NULL; + FadeEffect* _tmp0_ = NULL; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FADE_EFFECT_DESCRIPTOR, FadeEffectDescriptor); +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + g_return_val_if_fail (SPIT_IS_HOST_INTERFACE (host), NULL); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp0_ = fade_effect_new (); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TRANSITIONS_TYPE_EFFECT, SpitTransitionsEffect); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + return result; +#line 185 "FadeEffect.c" +} + + +static void fade_effect_descriptor_class_init (FadeEffectDescriptorClass * klass) { +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + fade_effect_descriptor_parent_class = g_type_class_peek_parent (klass); +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_id = fade_effect_descriptor_real_get_id; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_pluggable_name = fade_effect_descriptor_real_get_pluggable_name; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->create = fade_effect_descriptor_real_create; +#line 198 "FadeEffect.c" +} + + +static void fade_effect_descriptor_instance_init (FadeEffectDescriptor * self) { +} + + +GType fade_effect_descriptor_get_type (void) { + static volatile gsize fade_effect_descriptor_type_id__volatile = 0; + if (g_once_init_enter (&fade_effect_descriptor_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (FadeEffectDescriptorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fade_effect_descriptor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FadeEffectDescriptor), 0, (GInstanceInitFunc) fade_effect_descriptor_instance_init, NULL }; + GType fade_effect_descriptor_type_id; + fade_effect_descriptor_type_id = g_type_register_static (TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, "FadeEffectDescriptor", &g_define_type_info, 0); + g_once_init_leave (&fade_effect_descriptor_type_id__volatile, fade_effect_descriptor_type_id); + } + return fade_effect_descriptor_type_id__volatile; +} + + +FadeEffect* fade_effect_construct (GType object_type) { + FadeEffect * self = NULL; +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + self = (FadeEffect*) g_object_new (object_type, NULL); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + return self; +#line 224 "FadeEffect.c" +} + + +FadeEffect* fade_effect_new (void) { +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + return fade_effect_construct (TYPE_FADE_EFFECT); +#line 231 "FadeEffect.c" +} + + +static void fade_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps) { + FadeEffect * self; + gint _vala_desired_fps = 0; + gint _vala_min_fps = 0; +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FADE_EFFECT, FadeEffect); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _vala_desired_fps = FADE_EFFECT_DESIRED_FPS; +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _vala_min_fps = FADE_EFFECT_MIN_FPS; +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + if (desired_fps) { +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + *desired_fps = _vala_desired_fps; +#line 249 "FadeEffect.c" + } +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + if (min_fps) { +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + *min_fps = _vala_min_fps; +#line 255 "FadeEffect.c" + } +} + + +static void fade_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion) { + FadeEffect * self; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FADE_EFFECT, FadeEffect); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 268 "FadeEffect.c" +} + + +static gboolean fade_effect_real_needs_clear_background (SpitTransitionsEffect* base) { + FadeEffect * self; + gboolean result = FALSE; +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FADE_EFFECT, FadeEffect); +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + result = TRUE; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + return result; +#line 281 "FadeEffect.c" +} + + +static void fade_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number) { + FadeEffect * self; + gdouble alpha = 0.0; + SpitTransitionsMotion* _tmp0_ = NULL; + gint _tmp1_ = 0; + gdouble _tmp2_ = 0.0; + SpitTransitionsVisuals* _tmp3_ = NULL; + GdkPixbuf* _tmp4_ = NULL; + GdkPixbuf* _tmp5_ = NULL; + SpitTransitionsVisuals* _tmp20_ = NULL; + GdkPixbuf* _tmp21_ = NULL; + GdkPixbuf* _tmp22_ = NULL; +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FADE_EFFECT, FadeEffect); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + g_return_if_fail (ctx != NULL); +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp0_ = motion; +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp1_ = frame_number; +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp2_ = spit_transitions_motion_get_alpha (_tmp0_, _tmp1_); +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + alpha = _tmp2_; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp3_ = visuals; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp4_ = spit_transitions_visuals_get_from_pixbuf (_tmp3_); +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp5_ = _tmp4_; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + if (_tmp5_ != NULL) { +#line 321 "FadeEffect.c" + cairo_t* _tmp6_ = NULL; + SpitTransitionsVisuals* _tmp7_ = NULL; + GdkPixbuf* _tmp8_ = NULL; + GdkPixbuf* _tmp9_ = NULL; + SpitTransitionsVisuals* _tmp10_ = NULL; + GdkRectangle _tmp11_ = {0}; + GdkRectangle _tmp12_ = {0}; + gint _tmp13_ = 0; + SpitTransitionsVisuals* _tmp14_ = NULL; + GdkRectangle _tmp15_ = {0}; + GdkRectangle _tmp16_ = {0}; + gint _tmp17_ = 0; + cairo_t* _tmp18_ = NULL; + gdouble _tmp19_ = 0.0; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp6_ = ctx; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp7_ = visuals; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp8_ = spit_transitions_visuals_get_from_pixbuf (_tmp7_); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp9_ = _tmp8_; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp10_ = visuals; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp10_, &_tmp11_); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp12_ = _tmp11_; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp13_ = _tmp12_.x; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp14_ = visuals; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp14_, &_tmp15_); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp16_ = _tmp15_; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp17_ = _tmp16_.y; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp6_, _tmp9_, (gdouble) _tmp13_, (gdouble) _tmp17_); +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp18_ = ctx; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp19_ = alpha; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + cairo_paint_with_alpha (_tmp18_, 1.0 - _tmp19_); +#line 368 "FadeEffect.c" + } +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp20_ = visuals; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp21_ = spit_transitions_visuals_get_to_pixbuf (_tmp20_); +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp22_ = _tmp21_; +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + if (_tmp22_ != NULL) { +#line 378 "FadeEffect.c" + cairo_t* _tmp23_ = NULL; + SpitTransitionsVisuals* _tmp24_ = NULL; + GdkPixbuf* _tmp25_ = NULL; + GdkPixbuf* _tmp26_ = NULL; + SpitTransitionsVisuals* _tmp27_ = NULL; + GdkRectangle _tmp28_ = {0}; + GdkRectangle _tmp29_ = {0}; + gint _tmp30_ = 0; + SpitTransitionsVisuals* _tmp31_ = NULL; + GdkRectangle _tmp32_ = {0}; + GdkRectangle _tmp33_ = {0}; + gint _tmp34_ = 0; + cairo_t* _tmp35_ = NULL; + gdouble _tmp36_ = 0.0; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp23_ = ctx; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp24_ = visuals; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp25_ = spit_transitions_visuals_get_to_pixbuf (_tmp24_); +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp26_ = _tmp25_; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp27_ = visuals; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp27_, &_tmp28_); +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp29_ = _tmp28_; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp30_ = _tmp29_.x; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp31_ = visuals; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp31_, &_tmp32_); +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp33_ = _tmp32_; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp34_ = _tmp33_.y; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp23_, _tmp26_, (gdouble) _tmp30_, (gdouble) _tmp34_); +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp35_ = ctx; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + _tmp36_ = alpha; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + cairo_paint_with_alpha (_tmp35_, _tmp36_); +#line 425 "FadeEffect.c" + } +} + + +static void fade_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number) { + FadeEffect * self; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FADE_EFFECT, FadeEffect); +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 438 "FadeEffect.c" +} + + +static void fade_effect_real_cancel (SpitTransitionsEffect* base) { + FadeEffect * self; +#line 67 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FADE_EFFECT, FadeEffect); +#line 446 "FadeEffect.c" +} + + +static void fade_effect_class_init (FadeEffectClass * klass) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + fade_effect_parent_class = g_type_class_peek_parent (klass); +#line 453 "FadeEffect.c" +} + + +static void fade_effect_spit_transitions_effect_interface_init (SpitTransitionsEffectIface * iface) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + fade_effect_spit_transitions_effect_parent_iface = g_type_interface_peek_parent (iface); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + iface->get_fps = (void (*)(SpitTransitionsEffect*, gint*, gint*)) fade_effect_real_get_fps; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + iface->start = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*)) fade_effect_real_start; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + iface->needs_clear_background = (gboolean (*)(SpitTransitionsEffect*)) fade_effect_real_needs_clear_background; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + iface->paint = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, cairo_t*, gint, gint, gint)) fade_effect_real_paint; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + iface->advance = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, gint)) fade_effect_real_advance; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/FadeEffect.vala" + iface->cancel = (void (*)(SpitTransitionsEffect*)) fade_effect_real_cancel; +#line 472 "FadeEffect.c" +} + + +static void fade_effect_instance_init (FadeEffect * self) { +} + + +GType fade_effect_get_type (void) { + static volatile gsize fade_effect_type_id__volatile = 0; + if (g_once_init_enter (&fade_effect_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (FadeEffectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fade_effect_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FadeEffect), 0, (GInstanceInitFunc) fade_effect_instance_init, NULL }; + static const GInterfaceInfo spit_transitions_effect_info = { (GInterfaceInitFunc) fade_effect_spit_transitions_effect_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType fade_effect_type_id; + fade_effect_type_id = g_type_register_static (G_TYPE_OBJECT, "FadeEffect", &g_define_type_info, 0); + g_type_add_interface_static (fade_effect_type_id, SPIT_TRANSITIONS_TYPE_EFFECT, &spit_transitions_effect_info); + g_once_init_leave (&fade_effect_type_id__volatile, fade_effect_type_id); + } + return fade_effect_type_id__volatile; +} + + + diff --git a/plugins/shotwell-transitions/Makefile b/plugins/shotwell-transitions/Makefile deleted file mode 100644 index 9044011..0000000 --- a/plugins/shotwell-transitions/Makefile +++ /dev/null @@ -1,25 +0,0 @@ - -PLUGIN := shotwell-transitions - -PLUGIN_PKGS := \ - libxml-2.0 \ - libsoup-2.4 - -SRC_FILES := \ - shotwell-transitions.vala \ - FadeEffect.vala \ - SlideEffect.vala \ - CrumbleEffect.vala \ - BlindsEffect.vala \ - CircleEffect.vala \ - CirclesEffect.vala \ - SquaresEffect.vala \ - StripesEffect.vala \ - ChessEffect.vala \ - ClockEffect.vala - -RC_FILES := \ - slideshow-plugin.png - -include ../Makefile.plugin.mk - diff --git a/plugins/shotwell-transitions/SlideEffect.c b/plugins/shotwell-transitions/SlideEffect.c new file mode 100644 index 0000000..1fa1cd3 --- /dev/null +++ b/plugins/shotwell-transitions/SlideEffect.c @@ -0,0 +1,614 @@ +/* SlideEffect.c generated by valac 0.32.1, the Vala compiler + * generated from SlideEffect.vala, do not modify */ + +/* Copyright 2010 Maxim Kartashev + * Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (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> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include <glib/gi18n-lib.h> +#include <cairo.h> +#include <float.h> +#include <math.h> +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <gdk/gdk.h> + + +#define TYPE_SHOTWELL_TRANSITION_DESCRIPTOR (shotwell_transition_descriptor_get_type ()) +#define SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptor)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) + +typedef struct _ShotwellTransitionDescriptor ShotwellTransitionDescriptor; +typedef struct _ShotwellTransitionDescriptorClass ShotwellTransitionDescriptorClass; +typedef struct _ShotwellTransitionDescriptorPrivate ShotwellTransitionDescriptorPrivate; + +#define TYPE_SLIDE_EFFECT_DESCRIPTOR (slide_effect_descriptor_get_type ()) +#define SLIDE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SLIDE_EFFECT_DESCRIPTOR, SlideEffectDescriptor)) +#define SLIDE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SLIDE_EFFECT_DESCRIPTOR, SlideEffectDescriptorClass)) +#define IS_SLIDE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SLIDE_EFFECT_DESCRIPTOR)) +#define IS_SLIDE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SLIDE_EFFECT_DESCRIPTOR)) +#define SLIDE_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SLIDE_EFFECT_DESCRIPTOR, SlideEffectDescriptorClass)) + +typedef struct _SlideEffectDescriptor SlideEffectDescriptor; +typedef struct _SlideEffectDescriptorClass SlideEffectDescriptorClass; +typedef struct _SlideEffectDescriptorPrivate SlideEffectDescriptorPrivate; + +#define TYPE_SLIDE_EFFECT (slide_effect_get_type ()) +#define SLIDE_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SLIDE_EFFECT, SlideEffect)) +#define SLIDE_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SLIDE_EFFECT, SlideEffectClass)) +#define IS_SLIDE_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SLIDE_EFFECT)) +#define IS_SLIDE_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SLIDE_EFFECT)) +#define SLIDE_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SLIDE_EFFECT, SlideEffectClass)) + +typedef struct _SlideEffect SlideEffect; +typedef struct _SlideEffectClass SlideEffectClass; +typedef struct _SlideEffectPrivate SlideEffectPrivate; + +struct _ShotwellTransitionDescriptor { + GObject parent_instance; + ShotwellTransitionDescriptorPrivate * priv; +}; + +struct _ShotwellTransitionDescriptorClass { + GObjectClass parent_class; + const gchar* (*get_id) (ShotwellTransitionDescriptor* self); + const gchar* (*get_pluggable_name) (ShotwellTransitionDescriptor* self); + SpitTransitionsEffect* (*create) (ShotwellTransitionDescriptor* self, SpitHostInterface* host); +}; + +struct _SlideEffectDescriptor { + ShotwellTransitionDescriptor parent_instance; + SlideEffectDescriptorPrivate * priv; +}; + +struct _SlideEffectDescriptorClass { + ShotwellTransitionDescriptorClass parent_class; +}; + +struct _SlideEffect { + GObject parent_instance; + SlideEffectPrivate * priv; +}; + +struct _SlideEffectClass { + GObjectClass parent_class; +}; + + +static gpointer slide_effect_descriptor_parent_class = NULL; +static gpointer slide_effect_parent_class = NULL; +static SpitTransitionsEffectIface* slide_effect_spit_transitions_effect_parent_iface = NULL; + +GType shotwell_transition_descriptor_get_type (void) G_GNUC_CONST; +GType slide_effect_descriptor_get_type (void) G_GNUC_CONST; +enum { + SLIDE_EFFECT_DESCRIPTOR_DUMMY_PROPERTY +}; +SlideEffectDescriptor* slide_effect_descriptor_new (GFile* resource_directory); +SlideEffectDescriptor* slide_effect_descriptor_construct (GType object_type, GFile* resource_directory); +ShotwellTransitionDescriptor* shotwell_transition_descriptor_construct (GType object_type, GFile* resource_directory); +static const gchar* slide_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base); +static const gchar* slide_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base); +static SpitTransitionsEffect* slide_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host); +SlideEffect* slide_effect_new (void); +SlideEffect* slide_effect_construct (GType object_type); +GType slide_effect_get_type (void) G_GNUC_CONST; +enum { + SLIDE_EFFECT_DUMMY_PROPERTY +}; +#define SLIDE_EFFECT_DESIRED_FPS 25 +#define SLIDE_EFFECT_MIN_FPS 15 +static void slide_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps); +static void slide_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion); +static gboolean slide_effect_real_needs_clear_background (SpitTransitionsEffect* base); +static void slide_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number); +static void slide_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number); +static void slide_effect_real_cancel (SpitTransitionsEffect* base); + + +SlideEffectDescriptor* slide_effect_descriptor_construct (GType object_type, GFile* resource_directory) { + SlideEffectDescriptor * self = NULL; + GFile* _tmp0_ = NULL; +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp0_ = resource_directory; +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + self = (SlideEffectDescriptor*) shotwell_transition_descriptor_construct (object_type, _tmp0_); +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + return self; +#line 132 "SlideEffect.c" +} + + +SlideEffectDescriptor* slide_effect_descriptor_new (GFile* resource_directory) { +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + return slide_effect_descriptor_construct (TYPE_SLIDE_EFFECT_DESCRIPTOR, resource_directory); +#line 139 "SlideEffect.c" +} + + +static const gchar* slide_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base) { + SlideEffectDescriptor * self; + const gchar* result = NULL; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SLIDE_EFFECT_DESCRIPTOR, SlideEffectDescriptor); +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + result = "org.yorba.shotwell.transitions.slide"; +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + return result; +#line 152 "SlideEffect.c" +} + + +static const gchar* slide_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base) { + SlideEffectDescriptor * self; + const gchar* result = NULL; + const gchar* _tmp0_ = NULL; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SLIDE_EFFECT_DESCRIPTOR, SlideEffectDescriptor); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp0_ = _ ("Slide"); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + result = _tmp0_; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + return result; +#line 168 "SlideEffect.c" +} + + +static SpitTransitionsEffect* slide_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host) { + SlideEffectDescriptor * self; + SpitTransitionsEffect* result = NULL; + SlideEffect* _tmp0_ = NULL; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SLIDE_EFFECT_DESCRIPTOR, SlideEffectDescriptor); +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + g_return_val_if_fail (SPIT_IS_HOST_INTERFACE (host), NULL); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp0_ = slide_effect_new (); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TRANSITIONS_TYPE_EFFECT, SpitTransitionsEffect); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + return result; +#line 186 "SlideEffect.c" +} + + +static void slide_effect_descriptor_class_init (SlideEffectDescriptorClass * klass) { +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + slide_effect_descriptor_parent_class = g_type_class_peek_parent (klass); +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_id = slide_effect_descriptor_real_get_id; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_pluggable_name = slide_effect_descriptor_real_get_pluggable_name; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->create = slide_effect_descriptor_real_create; +#line 199 "SlideEffect.c" +} + + +static void slide_effect_descriptor_instance_init (SlideEffectDescriptor * self) { +} + + +GType slide_effect_descriptor_get_type (void) { + static volatile gsize slide_effect_descriptor_type_id__volatile = 0; + if (g_once_init_enter (&slide_effect_descriptor_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (SlideEffectDescriptorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) slide_effect_descriptor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SlideEffectDescriptor), 0, (GInstanceInitFunc) slide_effect_descriptor_instance_init, NULL }; + GType slide_effect_descriptor_type_id; + slide_effect_descriptor_type_id = g_type_register_static (TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, "SlideEffectDescriptor", &g_define_type_info, 0); + g_once_init_leave (&slide_effect_descriptor_type_id__volatile, slide_effect_descriptor_type_id); + } + return slide_effect_descriptor_type_id__volatile; +} + + +SlideEffect* slide_effect_construct (GType object_type) { + SlideEffect * self = NULL; +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + self = (SlideEffect*) g_object_new (object_type, NULL); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + return self; +#line 225 "SlideEffect.c" +} + + +SlideEffect* slide_effect_new (void) { +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + return slide_effect_construct (TYPE_SLIDE_EFFECT); +#line 232 "SlideEffect.c" +} + + +static void slide_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps) { + SlideEffect * self; + gint _vala_desired_fps = 0; + gint _vala_min_fps = 0; +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SLIDE_EFFECT, SlideEffect); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _vala_desired_fps = SLIDE_EFFECT_DESIRED_FPS; +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _vala_min_fps = SLIDE_EFFECT_MIN_FPS; +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + if (desired_fps) { +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + *desired_fps = _vala_desired_fps; +#line 250 "SlideEffect.c" + } +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + if (min_fps) { +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + *min_fps = _vala_min_fps; +#line 256 "SlideEffect.c" + } +} + + +static void slide_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion) { + SlideEffect * self; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SLIDE_EFFECT, SlideEffect); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 269 "SlideEffect.c" +} + + +static gboolean slide_effect_real_needs_clear_background (SpitTransitionsEffect* base) { + SlideEffect * self; + gboolean result = FALSE; +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SLIDE_EFFECT, SlideEffect); +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + result = TRUE; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + return result; +#line 282 "SlideEffect.c" +} + + +static void slide_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number) { + SlideEffect * self; + gdouble alpha = 0.0; + SpitTransitionsMotion* _tmp0_ = NULL; + gint _tmp1_ = 0; + gdouble _tmp2_ = 0.0; + SpitTransitionsVisuals* _tmp3_ = NULL; + GdkPixbuf* _tmp4_ = NULL; + GdkPixbuf* _tmp5_ = NULL; + SpitTransitionsVisuals* _tmp33_ = NULL; + GdkPixbuf* _tmp34_ = NULL; + GdkPixbuf* _tmp35_ = NULL; +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SLIDE_EFFECT, SlideEffect); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + g_return_if_fail (ctx != NULL); +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp0_ = motion; +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp1_ = frame_number; +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp2_ = spit_transitions_motion_get_alpha (_tmp0_, _tmp1_); +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + alpha = _tmp2_; +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp3_ = visuals; +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp4_ = spit_transitions_visuals_get_from_pixbuf (_tmp3_); +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp5_ = _tmp4_; +#line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + if (_tmp5_ != NULL) { +#line 322 "SlideEffect.c" + gint _tmp6_ = 0; + SpitTransitionsMotion* _tmp7_ = NULL; + SpitTransitionsDirection _tmp8_ = 0; + SpitTransitionsDirection _tmp9_ = 0; + gint from_target_x = 0; + gint from_current_x = 0; + SpitTransitionsVisuals* _tmp16_ = NULL; + GdkRectangle _tmp17_ = {0}; + GdkRectangle _tmp18_ = {0}; + gint _tmp19_ = 0; + gdouble _tmp20_ = 0.0; + gint _tmp21_ = 0; + gdouble _tmp22_ = 0.0; + cairo_t* _tmp23_ = NULL; + SpitTransitionsVisuals* _tmp24_ = NULL; + GdkPixbuf* _tmp25_ = NULL; + GdkPixbuf* _tmp26_ = NULL; + gint _tmp27_ = 0; + SpitTransitionsVisuals* _tmp28_ = NULL; + GdkRectangle _tmp29_ = {0}; + GdkRectangle _tmp30_ = {0}; + gint _tmp31_ = 0; + cairo_t* _tmp32_ = NULL; +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp7_ = motion; +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp8_ = spit_transitions_motion_get_direction (_tmp7_); +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp9_ = _tmp8_; +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + if (_tmp9_ == SPIT_TRANSITIONS_DIRECTION_FORWARD) { +#line 354 "SlideEffect.c" + SpitTransitionsVisuals* _tmp10_ = NULL; + GdkPixbuf* _tmp11_ = NULL; + GdkPixbuf* _tmp12_ = NULL; + gint _tmp13_ = 0; + gint _tmp14_ = 0; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp10_ = visuals; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp11_ = spit_transitions_visuals_get_from_pixbuf (_tmp10_); +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp12_ = _tmp11_; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp13_ = gdk_pixbuf_get_width (_tmp12_); +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp14_ = _tmp13_; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp6_ = -_tmp14_; +#line 372 "SlideEffect.c" + } else { + gint _tmp15_ = 0; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp15_ = width; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp6_ = _tmp15_; +#line 379 "SlideEffect.c" + } +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + from_target_x = _tmp6_; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp16_ = visuals; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp16_, &_tmp17_); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp18_ = _tmp17_; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp19_ = _tmp18_.x; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp20_ = alpha; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp21_ = from_target_x; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp22_ = alpha; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + from_current_x = (gint) ((_tmp19_ * (1 - _tmp20_)) + (_tmp21_ * _tmp22_)); +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp23_ = ctx; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp24_ = visuals; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp25_ = spit_transitions_visuals_get_from_pixbuf (_tmp24_); +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp26_ = _tmp25_; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp27_ = from_current_x; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp28_ = visuals; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp28_, &_tmp29_); +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp30_ = _tmp29_; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp31_ = _tmp30_.y; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp23_, _tmp26_, (gdouble) _tmp27_, (gdouble) _tmp31_); +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp32_ = ctx; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + cairo_paint (_tmp32_); +#line 423 "SlideEffect.c" + } +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp33_ = visuals; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp34_ = spit_transitions_visuals_get_to_pixbuf (_tmp33_); +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp35_ = _tmp34_; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + if (_tmp35_ != NULL) { +#line 433 "SlideEffect.c" + gint to_target_x = 0; + gint _tmp36_ = 0; + SpitTransitionsVisuals* _tmp37_ = NULL; + GdkPixbuf* _tmp38_ = NULL; + GdkPixbuf* _tmp39_ = NULL; + gint _tmp40_ = 0; + gint _tmp41_ = 0; + gint _tmp42_ = 0; + SpitTransitionsMotion* _tmp43_ = NULL; + SpitTransitionsDirection _tmp44_ = 0; + SpitTransitionsDirection _tmp45_ = 0; + gint from_x = 0; + gint to_current_x = 0; + gint _tmp52_ = 0; + gdouble _tmp53_ = 0.0; + gint _tmp54_ = 0; + gdouble _tmp55_ = 0.0; + cairo_t* _tmp56_ = NULL; + SpitTransitionsVisuals* _tmp57_ = NULL; + GdkPixbuf* _tmp58_ = NULL; + GdkPixbuf* _tmp59_ = NULL; + gint _tmp60_ = 0; + SpitTransitionsVisuals* _tmp61_ = NULL; + GdkRectangle _tmp62_ = {0}; + GdkRectangle _tmp63_ = {0}; + gint _tmp64_ = 0; + cairo_t* _tmp65_ = NULL; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp36_ = width; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp37_ = visuals; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp38_ = spit_transitions_visuals_get_to_pixbuf (_tmp37_); +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp39_ = _tmp38_; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp40_ = gdk_pixbuf_get_width (_tmp39_); +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp41_ = _tmp40_; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + to_target_x = (_tmp36_ - _tmp41_) / 2; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp43_ = motion; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp44_ = spit_transitions_motion_get_direction (_tmp43_); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp45_ = _tmp44_; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + if (_tmp45_ == SPIT_TRANSITIONS_DIRECTION_FORWARD) { +#line 483 "SlideEffect.c" + gint _tmp46_ = 0; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp46_ = width; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp42_ = _tmp46_; +#line 489 "SlideEffect.c" + } else { + SpitTransitionsVisuals* _tmp47_ = NULL; + GdkPixbuf* _tmp48_ = NULL; + GdkPixbuf* _tmp49_ = NULL; + gint _tmp50_ = 0; + gint _tmp51_ = 0; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp47_ = visuals; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp48_ = spit_transitions_visuals_get_to_pixbuf (_tmp47_); +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp49_ = _tmp48_; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp50_ = gdk_pixbuf_get_width (_tmp49_); +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp51_ = _tmp50_; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp42_ = -_tmp51_; +#line 508 "SlideEffect.c" + } +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + from_x = _tmp42_; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp52_ = from_x; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp53_ = alpha; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp54_ = to_target_x; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp55_ = alpha; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + to_current_x = (gint) ((_tmp52_ * (1 - _tmp53_)) + (_tmp54_ * _tmp55_)); +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp56_ = ctx; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp57_ = visuals; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp58_ = spit_transitions_visuals_get_to_pixbuf (_tmp57_); +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp59_ = _tmp58_; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp60_ = to_current_x; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp61_ = visuals; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp61_, &_tmp62_); +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp63_ = _tmp62_; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp64_ = _tmp63_.y; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp56_, _tmp59_, (gdouble) _tmp60_, (gdouble) _tmp64_); +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + _tmp65_ = ctx; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + cairo_paint (_tmp65_); +#line 546 "SlideEffect.c" + } +} + + +static void slide_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number) { + SlideEffect * self; +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SLIDE_EFFECT, SlideEffect); +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 69 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 559 "SlideEffect.c" +} + + +static void slide_effect_real_cancel (SpitTransitionsEffect* base) { + SlideEffect * self; +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SLIDE_EFFECT, SlideEffect); +#line 567 "SlideEffect.c" +} + + +static void slide_effect_class_init (SlideEffectClass * klass) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + slide_effect_parent_class = g_type_class_peek_parent (klass); +#line 574 "SlideEffect.c" +} + + +static void slide_effect_spit_transitions_effect_interface_init (SpitTransitionsEffectIface * iface) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + slide_effect_spit_transitions_effect_parent_iface = g_type_interface_peek_parent (iface); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + iface->get_fps = (void (*)(SpitTransitionsEffect*, gint*, gint*)) slide_effect_real_get_fps; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + iface->start = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*)) slide_effect_real_start; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + iface->needs_clear_background = (gboolean (*)(SpitTransitionsEffect*)) slide_effect_real_needs_clear_background; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + iface->paint = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, cairo_t*, gint, gint, gint)) slide_effect_real_paint; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + iface->advance = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, gint)) slide_effect_real_advance; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" + iface->cancel = (void (*)(SpitTransitionsEffect*)) slide_effect_real_cancel; +#line 593 "SlideEffect.c" +} + + +static void slide_effect_instance_init (SlideEffect * self) { +} + + +GType slide_effect_get_type (void) { + static volatile gsize slide_effect_type_id__volatile = 0; + if (g_once_init_enter (&slide_effect_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (SlideEffectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) slide_effect_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SlideEffect), 0, (GInstanceInitFunc) slide_effect_instance_init, NULL }; + static const GInterfaceInfo spit_transitions_effect_info = { (GInterfaceInitFunc) slide_effect_spit_transitions_effect_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType slide_effect_type_id; + slide_effect_type_id = g_type_register_static (G_TYPE_OBJECT, "SlideEffect", &g_define_type_info, 0); + g_type_add_interface_static (slide_effect_type_id, SPIT_TRANSITIONS_TYPE_EFFECT, &spit_transitions_effect_info); + g_once_init_leave (&slide_effect_type_id__volatile, slide_effect_type_id); + } + return slide_effect_type_id__volatile; +} + + + diff --git a/plugins/shotwell-transitions/SquaresEffect.c b/plugins/shotwell-transitions/SquaresEffect.c new file mode 100644 index 0000000..29fab0c --- /dev/null +++ b/plugins/shotwell-transitions/SquaresEffect.c @@ -0,0 +1,704 @@ +/* SquaresEffect.c generated by valac 0.32.1, the Vala compiler + * generated from SquaresEffect.vala, do not modify */ + +/* Copyright 2013 Jens Bav + * Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (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> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include <glib/gi18n-lib.h> +#include <float.h> +#include <math.h> +#include <cairo.h> +#include <gdk/gdk.h> + + +#define TYPE_SHOTWELL_TRANSITION_DESCRIPTOR (shotwell_transition_descriptor_get_type ()) +#define SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptor)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) + +typedef struct _ShotwellTransitionDescriptor ShotwellTransitionDescriptor; +typedef struct _ShotwellTransitionDescriptorClass ShotwellTransitionDescriptorClass; +typedef struct _ShotwellTransitionDescriptorPrivate ShotwellTransitionDescriptorPrivate; + +#define TYPE_SQUARES_EFFECT_DESCRIPTOR (squares_effect_descriptor_get_type ()) +#define SQUARES_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SQUARES_EFFECT_DESCRIPTOR, SquaresEffectDescriptor)) +#define SQUARES_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SQUARES_EFFECT_DESCRIPTOR, SquaresEffectDescriptorClass)) +#define IS_SQUARES_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SQUARES_EFFECT_DESCRIPTOR)) +#define IS_SQUARES_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SQUARES_EFFECT_DESCRIPTOR)) +#define SQUARES_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SQUARES_EFFECT_DESCRIPTOR, SquaresEffectDescriptorClass)) + +typedef struct _SquaresEffectDescriptor SquaresEffectDescriptor; +typedef struct _SquaresEffectDescriptorClass SquaresEffectDescriptorClass; +typedef struct _SquaresEffectDescriptorPrivate SquaresEffectDescriptorPrivate; + +#define TYPE_SQUARES_EFFECT (squares_effect_get_type ()) +#define SQUARES_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SQUARES_EFFECT, SquaresEffect)) +#define SQUARES_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SQUARES_EFFECT, SquaresEffectClass)) +#define IS_SQUARES_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SQUARES_EFFECT)) +#define IS_SQUARES_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SQUARES_EFFECT)) +#define SQUARES_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SQUARES_EFFECT, SquaresEffectClass)) + +typedef struct _SquaresEffect SquaresEffect; +typedef struct _SquaresEffectClass SquaresEffectClass; +typedef struct _SquaresEffectPrivate SquaresEffectPrivate; + +struct _ShotwellTransitionDescriptor { + GObject parent_instance; + ShotwellTransitionDescriptorPrivate * priv; +}; + +struct _ShotwellTransitionDescriptorClass { + GObjectClass parent_class; + const gchar* (*get_id) (ShotwellTransitionDescriptor* self); + const gchar* (*get_pluggable_name) (ShotwellTransitionDescriptor* self); + SpitTransitionsEffect* (*create) (ShotwellTransitionDescriptor* self, SpitHostInterface* host); +}; + +struct _SquaresEffectDescriptor { + ShotwellTransitionDescriptor parent_instance; + SquaresEffectDescriptorPrivate * priv; +}; + +struct _SquaresEffectDescriptorClass { + ShotwellTransitionDescriptorClass parent_class; +}; + +struct _SquaresEffect { + GObject parent_instance; + SquaresEffectPrivate * priv; +}; + +struct _SquaresEffectClass { + GObjectClass parent_class; +}; + +struct _SquaresEffectPrivate { + gdouble square_count_x; + gdouble square_count_y; +}; + + +static gpointer squares_effect_descriptor_parent_class = NULL; +static gpointer squares_effect_parent_class = NULL; +static SpitTransitionsEffectIface* squares_effect_spit_transitions_effect_parent_iface = NULL; + +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); +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); +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 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_cancel (SpitTransitionsEffect* base); +static void squares_effect_finalize (GObject* obj); + + +SquaresEffectDescriptor* squares_effect_descriptor_construct (GType object_type, GFile* resource_directory) { + SquaresEffectDescriptor * self = NULL; + GFile* _tmp0_ = NULL; +#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_); +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + return self; +#line 139 "SquaresEffect.c" +} + + +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" +} + + +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" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SQUARES_EFFECT_DESCRIPTOR, SquaresEffectDescriptor); +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + result = "org.yorba.shotwell.transitions.squares"; +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + return result; +#line 159 "SquaresEffect.c" +} + + +static const gchar* squares_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base) { + SquaresEffectDescriptor * self; + const gchar* result = NULL; + const gchar* _tmp0_ = NULL; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SQUARES_EFFECT_DESCRIPTOR, SquaresEffectDescriptor); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp0_ = _ ("Squares"); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + result = _tmp0_; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + return result; +#line 175 "SquaresEffect.c" +} + + +static SpitTransitionsEffect* squares_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host) { + SquaresEffectDescriptor * self; + SpitTransitionsEffect* result = NULL; + SquaresEffect* _tmp0_ = NULL; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SQUARES_EFFECT_DESCRIPTOR, SquaresEffectDescriptor); +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + g_return_val_if_fail (SPIT_IS_HOST_INTERFACE (host), NULL); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp0_ = squares_effect_new (); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + 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 193 "SquaresEffect.c" +} + + +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" + ((ShotwellTransitionDescriptorClass *) klass)->get_id = squares_effect_descriptor_real_get_id; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_pluggable_name = squares_effect_descriptor_real_get_pluggable_name; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->create = squares_effect_descriptor_real_create; +#line 206 "SquaresEffect.c" +} + + +static void squares_effect_descriptor_instance_init (SquaresEffectDescriptor * self) { +} + + +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 }; + GType squares_effect_descriptor_type_id; + squares_effect_descriptor_type_id = g_type_register_static (TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, "SquaresEffectDescriptor", &g_define_type_info, 0); + g_once_init_leave (&squares_effect_descriptor_type_id__volatile, squares_effect_descriptor_type_id); + } + return squares_effect_descriptor_type_id__volatile; +} + + +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 232 "SquaresEffect.c" +} + + +SquaresEffect* squares_effect_new (void) { +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + return squares_effect_construct (TYPE_SQUARES_EFFECT); +#line 239 "SquaresEffect.c" +} + + +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; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SQUARES_EFFECT, SquaresEffect); +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _vala_desired_fps = SQUARES_EFFECT_DESIRED_FPS; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _vala_min_fps = SQUARES_EFFECT_MIN_FPS; +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + if (desired_fps) { +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + *desired_fps = _vala_desired_fps; +#line 257 "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 263 "SquaresEffect.c" + } +} + + +static void squares_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion) { + SquaresEffect * self; + SpitTransitionsVisuals* _tmp0_ = NULL; + GdkRectangle _tmp1_ = {0}; + GdkRectangle _tmp2_ = {0}; + gint _tmp3_ = 0; + SpitTransitionsVisuals* _tmp4_ = NULL; + GdkRectangle _tmp5_ = {0}; + GdkRectangle _tmp6_ = {0}; + gint _tmp7_ = 0; +#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" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#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_); +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp2_ = _tmp1_; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp3_ = _tmp2_.width; +#line 44 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + self->priv->square_count_x = (gdouble) ((_tmp3_ / SQUARES_EFFECT_SQUARE_SIZE) + 1); +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp4_ = visuals; +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp4_, &_tmp5_); +#line 45 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp6_ = _tmp5_; +#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 304 "SquaresEffect.c" +} + + +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" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SQUARES_EFFECT, SquaresEffect); +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + result = TRUE; +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + return result; +#line 317 "SquaresEffect.c" +} + + +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_ = NULL; + gint _tmp1_ = 0; + gdouble _tmp2_ = 0.0; + SpitTransitionsVisuals* _tmp3_ = NULL; + GdkPixbuf* _tmp4_ = NULL; + GdkPixbuf* _tmp5_ = NULL; + SpitTransitionsVisuals* _tmp20_ = NULL; + GdkPixbuf* _tmp21_ = NULL; + GdkPixbuf* _tmp22_ = NULL; +#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" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#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; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp4_ = spit_transitions_visuals_get_from_pixbuf (_tmp3_); +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp5_ = _tmp4_; +#line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + if (_tmp5_ != NULL) { +#line 357 "SquaresEffect.c" + cairo_t* _tmp6_ = NULL; + SpitTransitionsVisuals* _tmp7_ = NULL; + GdkPixbuf* _tmp8_ = NULL; + GdkPixbuf* _tmp9_ = NULL; + SpitTransitionsVisuals* _tmp10_ = NULL; + GdkRectangle _tmp11_ = {0}; + GdkRectangle _tmp12_ = {0}; + gint _tmp13_ = 0; + SpitTransitionsVisuals* _tmp14_ = NULL; + GdkRectangle _tmp15_ = {0}; + GdkRectangle _tmp16_ = {0}; + gint _tmp17_ = 0; + cairo_t* _tmp18_ = NULL; + gdouble _tmp19_ = 0.0; +#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; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp8_ = spit_transitions_visuals_get_from_pixbuf (_tmp7_); +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp9_ = _tmp8_; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp10_ = visuals; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp10_, &_tmp11_); +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp12_ = _tmp11_; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp13_ = _tmp12_.x; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp14_ = visuals; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp14_, &_tmp15_); +#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_); +#line 58 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp18_ = ctx; +#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 404 "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_); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp22_ = _tmp21_; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + if (_tmp22_ != NULL) { +#line 414 "SquaresEffect.c" + cairo_t* _tmp23_ = NULL; + SpitTransitionsVisuals* _tmp24_ = NULL; + GdkPixbuf* _tmp25_ = NULL; + GdkPixbuf* _tmp26_ = NULL; + SpitTransitionsVisuals* _tmp27_ = NULL; + GdkRectangle _tmp28_ = {0}; + GdkRectangle _tmp29_ = {0}; + gint _tmp30_ = 0; + SpitTransitionsVisuals* _tmp31_ = NULL; + GdkRectangle _tmp32_ = {0}; + GdkRectangle _tmp33_ = {0}; + gint _tmp34_ = 0; + cairo_t* _tmp65_ = NULL; + cairo_t* _tmp66_ = NULL; + gdouble _tmp67_ = 0.0; +#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_; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp27_ = visuals; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp27_, &_tmp28_); +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp29_ = _tmp28_; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp30_ = _tmp29_.x; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp31_ = visuals; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp31_, &_tmp32_); +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp33_ = _tmp32_; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp34_ = _tmp33_.y; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp23_, _tmp26_, (gdouble) _tmp30_, (gdouble) _tmp34_); +#line 456 "SquaresEffect.c" + { + gdouble y = 0.0; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + y = (gdouble) 0; +#line 461 "SquaresEffect.c" + { + gboolean _tmp35_ = FALSE; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp35_ = TRUE; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + while (TRUE) { +#line 468 "SquaresEffect.c" + gdouble _tmp37_ = 0.0; + gdouble _tmp38_ = 0.0; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + if (!_tmp35_) { +#line 473 "SquaresEffect.c" + gdouble _tmp36_ = 0.0; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp36_ = y; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + y = _tmp36_ + 1; +#line 479 "SquaresEffect.c" + } +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp35_ = FALSE; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp37_ = y; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp38_ = self->priv->square_count_y; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + if (!(_tmp37_ <= _tmp38_)) { +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + break; +#line 491 "SquaresEffect.c" + } + { + gdouble x = 0.0; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + x = (gdouble) 0; +#line 497 "SquaresEffect.c" + { + gboolean _tmp39_ = FALSE; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp39_ = TRUE; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + while (TRUE) { +#line 504 "SquaresEffect.c" + gdouble _tmp41_ = 0.0; + gdouble _tmp42_ = 0.0; + gdouble size = 0.0; + gdouble _tmp43_ = 0.0; + gdouble _tmp44_ = 0.0; + gdouble _tmp45_ = 0.0; + gdouble _tmp46_ = 0.0; + gdouble _tmp47_ = 0.0; + gdouble _tmp48_ = 0.0; + gdouble _tmp49_ = 0.0; + gdouble _tmp50_ = 0.0; + cairo_t* _tmp51_ = NULL; + SpitTransitionsVisuals* _tmp52_ = NULL; + GdkRectangle _tmp53_ = {0}; + GdkRectangle _tmp54_ = {0}; + gint _tmp55_ = 0; + gdouble _tmp56_ = 0.0; + SpitTransitionsVisuals* _tmp57_ = NULL; + GdkRectangle _tmp58_ = {0}; + GdkRectangle _tmp59_ = {0}; + gint _tmp60_ = 0; + gdouble _tmp61_ = 0.0; + gdouble _tmp62_ = 0.0; + gdouble _tmp63_ = 0.0; + cairo_t* _tmp64_ = NULL; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + if (!_tmp39_) { +#line 532 "SquaresEffect.c" + gdouble _tmp40_ = 0.0; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp40_ = x; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + x = _tmp40_ + 1; +#line 538 "SquaresEffect.c" + } +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp39_ = FALSE; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp41_ = x; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp42_ = self->priv->square_count_x; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + if (!(_tmp41_ <= _tmp42_)) { +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + break; +#line 550 "SquaresEffect.c" + } +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp43_ = alpha; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp44_ = self->priv->square_count_x; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp45_ = x; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp46_ = self->priv->square_count_x; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp47_ = self->priv->square_count_y; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp48_ = y; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp49_ = 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; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp52_ = visuals; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp52_, &_tmp53_); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp54_ = _tmp53_; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp55_ = _tmp54_.x; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp56_ = x; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp57_ = visuals; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp57_, &_tmp58_); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp59_ = _tmp58_; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp60_ = _tmp59_.y; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp61_ = y; +#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; +#line 71 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + cairo_fill (_tmp64_); +#line 602 "SquaresEffect.c" + } + } + } + } + } + } +#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; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + _tmp67_ = alpha; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + cairo_paint_with_alpha (_tmp66_, _tmp67_); +#line 619 "SquaresEffect.c" + } +} + + +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); +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + 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 632 "SquaresEffect.c" +} + + +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 640 "SquaresEffect.c" +} + + +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 651 "SquaresEffect.c" +} + + +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" + iface->get_fps = (void (*)(SpitTransitionsEffect*, gint*, gint*)) squares_effect_real_get_fps; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + iface->start = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*)) squares_effect_real_start; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + iface->needs_clear_background = (gboolean (*)(SpitTransitionsEffect*)) squares_effect_real_needs_clear_background; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + iface->paint = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, cairo_t*, gint, gint, gint)) squares_effect_real_paint; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + iface->advance = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, gint)) squares_effect_real_advance; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SquaresEffect.vala" + iface->cancel = (void (*)(SpitTransitionsEffect*)) squares_effect_real_cancel; +#line 670 "SquaresEffect.c" +} + + +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 677 "SquaresEffect.c" +} + + +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 687 "SquaresEffect.c" +} + + +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 }; + static const GInterfaceInfo spit_transitions_effect_info = { (GInterfaceInitFunc) squares_effect_spit_transitions_effect_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType squares_effect_type_id; + squares_effect_type_id = g_type_register_static (G_TYPE_OBJECT, "SquaresEffect", &g_define_type_info, 0); + g_type_add_interface_static (squares_effect_type_id, SPIT_TRANSITIONS_TYPE_EFFECT, &spit_transitions_effect_info); + g_once_init_leave (&squares_effect_type_id__volatile, squares_effect_type_id); + } + return squares_effect_type_id__volatile; +} + + + diff --git a/plugins/shotwell-transitions/StripesEffect.c b/plugins/shotwell-transitions/StripesEffect.c new file mode 100644 index 0000000..c6e802d --- /dev/null +++ b/plugins/shotwell-transitions/StripesEffect.c @@ -0,0 +1,713 @@ +/* StripesEffect.c generated by valac 0.32.1, the Vala compiler + * generated from StripesEffect.vala, do not modify */ + +/* Copyright 2013 Jens Bav + * Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (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> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include <glib/gi18n-lib.h> +#include <cairo.h> +#include <float.h> +#include <math.h> +#include <gdk/gdk.h> + + +#define TYPE_SHOTWELL_TRANSITION_DESCRIPTOR (shotwell_transition_descriptor_get_type ()) +#define SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptor)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) + +typedef struct _ShotwellTransitionDescriptor ShotwellTransitionDescriptor; +typedef struct _ShotwellTransitionDescriptorClass ShotwellTransitionDescriptorClass; +typedef struct _ShotwellTransitionDescriptorPrivate ShotwellTransitionDescriptorPrivate; + +#define TYPE_STRIPES_EFFECT_DESCRIPTOR (stripes_effect_descriptor_get_type ()) +#define STRIPES_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_STRIPES_EFFECT_DESCRIPTOR, StripesEffectDescriptor)) +#define STRIPES_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_STRIPES_EFFECT_DESCRIPTOR, StripesEffectDescriptorClass)) +#define IS_STRIPES_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_STRIPES_EFFECT_DESCRIPTOR)) +#define IS_STRIPES_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_STRIPES_EFFECT_DESCRIPTOR)) +#define STRIPES_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_STRIPES_EFFECT_DESCRIPTOR, StripesEffectDescriptorClass)) + +typedef struct _StripesEffectDescriptor StripesEffectDescriptor; +typedef struct _StripesEffectDescriptorClass StripesEffectDescriptorClass; +typedef struct _StripesEffectDescriptorPrivate StripesEffectDescriptorPrivate; + +#define TYPE_STRIPES_EFFECT (stripes_effect_get_type ()) +#define STRIPES_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_STRIPES_EFFECT, StripesEffect)) +#define STRIPES_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_STRIPES_EFFECT, StripesEffectClass)) +#define IS_STRIPES_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_STRIPES_EFFECT)) +#define IS_STRIPES_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_STRIPES_EFFECT)) +#define STRIPES_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_STRIPES_EFFECT, StripesEffectClass)) + +typedef struct _StripesEffect StripesEffect; +typedef struct _StripesEffectClass StripesEffectClass; +typedef struct _StripesEffectPrivate StripesEffectPrivate; + +struct _ShotwellTransitionDescriptor { + GObject parent_instance; + ShotwellTransitionDescriptorPrivate * priv; +}; + +struct _ShotwellTransitionDescriptorClass { + GObjectClass parent_class; + const gchar* (*get_id) (ShotwellTransitionDescriptor* self); + const gchar* (*get_pluggable_name) (ShotwellTransitionDescriptor* self); + SpitTransitionsEffect* (*create) (ShotwellTransitionDescriptor* self, SpitHostInterface* host); +}; + +struct _StripesEffectDescriptor { + ShotwellTransitionDescriptor parent_instance; + StripesEffectDescriptorPrivate * priv; +}; + +struct _StripesEffectDescriptorClass { + ShotwellTransitionDescriptorClass parent_class; +}; + +struct _StripesEffect { + GObject parent_instance; + StripesEffectPrivate * priv; +}; + +struct _StripesEffectClass { + GObjectClass parent_class; +}; + +struct _StripesEffectPrivate { + gint stripe_count; +}; + + +static gpointer stripes_effect_descriptor_parent_class = NULL; +static gpointer stripes_effect_parent_class = NULL; +static SpitTransitionsEffectIface* stripes_effect_spit_transitions_effect_parent_iface = NULL; + +GType shotwell_transition_descriptor_get_type (void) G_GNUC_CONST; +GType stripes_effect_descriptor_get_type (void) G_GNUC_CONST; +enum { + STRIPES_EFFECT_DESCRIPTOR_DUMMY_PROPERTY +}; +StripesEffectDescriptor* stripes_effect_descriptor_new (GFile* resource_directory); +StripesEffectDescriptor* stripes_effect_descriptor_construct (GType object_type, GFile* resource_directory); +ShotwellTransitionDescriptor* shotwell_transition_descriptor_construct (GType object_type, GFile* resource_directory); +static const gchar* stripes_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base); +static const gchar* stripes_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base); +static SpitTransitionsEffect* stripes_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host); +StripesEffect* stripes_effect_new (void); +StripesEffect* stripes_effect_construct (GType object_type); +GType stripes_effect_get_type (void) G_GNUC_CONST; +#define STRIPES_EFFECT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_STRIPES_EFFECT, StripesEffectPrivate)) +enum { + STRIPES_EFFECT_DUMMY_PROPERTY +}; +#define STRIPES_EFFECT_DESIRED_FPS 25 +#define STRIPES_EFFECT_MIN_FPS 10 +#define STRIPES_EFFECT_STRIPE_HEIGHT 100 +static void stripes_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps); +static void stripes_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion); +static gboolean stripes_effect_real_needs_clear_background (SpitTransitionsEffect* base); +static void stripes_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number); +static void stripes_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number); +static void stripes_effect_real_cancel (SpitTransitionsEffect* base); +static void stripes_effect_finalize (GObject* obj); + + +StripesEffectDescriptor* stripes_effect_descriptor_construct (GType object_type, GFile* resource_directory) { + StripesEffectDescriptor * self = NULL; + GFile* _tmp0_ = NULL; +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp0_ = resource_directory; +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + self = (StripesEffectDescriptor*) shotwell_transition_descriptor_construct (object_type, _tmp0_); +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + return self; +#line 138 "StripesEffect.c" +} + + +StripesEffectDescriptor* stripes_effect_descriptor_new (GFile* resource_directory) { +#line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + return stripes_effect_descriptor_construct (TYPE_STRIPES_EFFECT_DESCRIPTOR, resource_directory); +#line 145 "StripesEffect.c" +} + + +static const gchar* stripes_effect_descriptor_real_get_id (ShotwellTransitionDescriptor* base) { + StripesEffectDescriptor * self; + const gchar* result = NULL; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_STRIPES_EFFECT_DESCRIPTOR, StripesEffectDescriptor); +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + result = "org.yorba.shotwell.transitions.stripes"; +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + return result; +#line 158 "StripesEffect.c" +} + + +static const gchar* stripes_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base) { + StripesEffectDescriptor * self; + const gchar* result = NULL; + const gchar* _tmp0_ = NULL; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_STRIPES_EFFECT_DESCRIPTOR, StripesEffectDescriptor); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp0_ = _ ("Stripes"); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + result = _tmp0_; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + return result; +#line 174 "StripesEffect.c" +} + + +static SpitTransitionsEffect* stripes_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host) { + StripesEffectDescriptor * self; + SpitTransitionsEffect* result = NULL; + StripesEffect* _tmp0_ = NULL; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_STRIPES_EFFECT_DESCRIPTOR, StripesEffectDescriptor); +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + g_return_val_if_fail (SPIT_IS_HOST_INTERFACE (host), NULL); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp0_ = stripes_effect_new (); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SPIT_TRANSITIONS_TYPE_EFFECT, SpitTransitionsEffect); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + return result; +#line 192 "StripesEffect.c" +} + + +static void stripes_effect_descriptor_class_init (StripesEffectDescriptorClass * klass) { +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + stripes_effect_descriptor_parent_class = g_type_class_peek_parent (klass); +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_id = stripes_effect_descriptor_real_get_id; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_pluggable_name = stripes_effect_descriptor_real_get_pluggable_name; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + ((ShotwellTransitionDescriptorClass *) klass)->create = stripes_effect_descriptor_real_create; +#line 205 "StripesEffect.c" +} + + +static void stripes_effect_descriptor_instance_init (StripesEffectDescriptor * self) { +} + + +GType stripes_effect_descriptor_get_type (void) { + static volatile gsize stripes_effect_descriptor_type_id__volatile = 0; + if (g_once_init_enter (&stripes_effect_descriptor_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (StripesEffectDescriptorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) stripes_effect_descriptor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (StripesEffectDescriptor), 0, (GInstanceInitFunc) stripes_effect_descriptor_instance_init, NULL }; + GType stripes_effect_descriptor_type_id; + stripes_effect_descriptor_type_id = g_type_register_static (TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, "StripesEffectDescriptor", &g_define_type_info, 0); + g_once_init_leave (&stripes_effect_descriptor_type_id__volatile, stripes_effect_descriptor_type_id); + } + return stripes_effect_descriptor_type_id__volatile; +} + + +StripesEffect* stripes_effect_construct (GType object_type) { + StripesEffect * self = NULL; +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + self = (StripesEffect*) g_object_new (object_type, NULL); +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + return self; +#line 231 "StripesEffect.c" +} + + +StripesEffect* stripes_effect_new (void) { +#line 34 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + return stripes_effect_construct (TYPE_STRIPES_EFFECT); +#line 238 "StripesEffect.c" +} + + +static void stripes_effect_real_get_fps (SpitTransitionsEffect* base, gint* desired_fps, gint* min_fps) { + StripesEffect * self; + gint _vala_desired_fps = 0; + gint _vala_min_fps = 0; +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_STRIPES_EFFECT, StripesEffect); +#line 38 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _vala_desired_fps = STRIPES_EFFECT_DESIRED_FPS; +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _vala_min_fps = STRIPES_EFFECT_MIN_FPS; +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + if (desired_fps) { +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + *desired_fps = _vala_desired_fps; +#line 256 "StripesEffect.c" + } +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + if (min_fps) { +#line 37 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + *min_fps = _vala_min_fps; +#line 262 "StripesEffect.c" + } +} + + +static void stripes_effect_real_start (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion) { + StripesEffect * self; + SpitTransitionsVisuals* _tmp0_ = NULL; + GdkRectangle _tmp1_ = {0}; + GdkRectangle _tmp2_ = {0}; + gint _tmp3_ = 0; +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_STRIPES_EFFECT, StripesEffect); +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 42 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp0_ = visuals; +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp0_, &_tmp1_); +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp2_ = _tmp1_; +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp3_ = _tmp2_.height; +#line 43 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + self->priv->stripe_count = (_tmp3_ / STRIPES_EFFECT_STRIPE_HEIGHT) + 1; +#line 289 "StripesEffect.c" +} + + +static gboolean stripes_effect_real_needs_clear_background (SpitTransitionsEffect* base) { + StripesEffect * self; + gboolean result = FALSE; +#line 46 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_STRIPES_EFFECT, StripesEffect); +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + result = TRUE; +#line 47 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + return result; +#line 302 "StripesEffect.c" +} + + +static void stripes_effect_real_paint (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, cairo_t* ctx, gint width, gint height, gint frame_number) { + StripesEffect * self; + gdouble alpha = 0.0; + SpitTransitionsMotion* _tmp0_ = NULL; + gint _tmp1_ = 0; + gdouble _tmp2_ = 0.0; + SpitTransitionsVisuals* _tmp3_ = NULL; + GdkPixbuf* _tmp4_ = NULL; + GdkPixbuf* _tmp5_ = NULL; + SpitTransitionsVisuals* _tmp21_ = NULL; + GdkPixbuf* _tmp22_ = NULL; + GdkPixbuf* _tmp23_ = NULL; +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_STRIPES_EFFECT, StripesEffect); +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + g_return_if_fail (ctx != NULL); +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp0_ = motion; +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp1_ = frame_number; +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp2_ = spit_transitions_motion_get_alpha (_tmp0_, _tmp1_); +#line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + alpha = _tmp2_; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp3_ = visuals; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp4_ = spit_transitions_visuals_get_from_pixbuf (_tmp3_); +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp5_ = _tmp4_; +#line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + if (_tmp5_ != NULL) { +#line 342 "StripesEffect.c" + cairo_t* _tmp6_ = NULL; + SpitTransitionsVisuals* _tmp7_ = NULL; + GdkPixbuf* _tmp8_ = NULL; + GdkPixbuf* _tmp9_ = NULL; + SpitTransitionsVisuals* _tmp10_ = NULL; + GdkRectangle _tmp11_ = {0}; + GdkRectangle _tmp12_ = {0}; + gint _tmp13_ = 0; + SpitTransitionsVisuals* _tmp14_ = NULL; + GdkRectangle _tmp15_ = {0}; + GdkRectangle _tmp16_ = {0}; + gint _tmp17_ = 0; + cairo_t* _tmp18_ = NULL; + gdouble _tmp19_ = 0.0; + gdouble _tmp20_ = 0.0; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp6_ = ctx; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp7_ = visuals; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp8_ = spit_transitions_visuals_get_from_pixbuf (_tmp7_); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp9_ = _tmp8_; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp10_ = visuals; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp10_, &_tmp11_); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp12_ = _tmp11_; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp13_ = _tmp12_.x; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp14_ = visuals; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + spit_transitions_visuals_get_from_pos (_tmp14_, &_tmp15_); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp16_ = _tmp15_; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp17_ = _tmp16_.y; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp6_, _tmp9_, (gdouble) _tmp13_, (gdouble) _tmp17_); +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp18_ = ctx; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp19_ = alpha; +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp20_ = fmin ((gdouble) 1, _tmp19_ * 2); +#line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + cairo_paint_with_alpha (_tmp18_, 1 - _tmp20_); +#line 392 "StripesEffect.c" + } +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp21_ = visuals; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp22_ = spit_transitions_visuals_get_to_pixbuf (_tmp21_); +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp23_ = _tmp22_; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + if (_tmp23_ != NULL) { +#line 402 "StripesEffect.c" + cairo_t* _tmp24_ = NULL; + SpitTransitionsVisuals* _tmp25_ = NULL; + GdkPixbuf* _tmp26_ = NULL; + GdkPixbuf* _tmp27_ = NULL; + SpitTransitionsVisuals* _tmp28_ = NULL; + GdkRectangle _tmp29_ = {0}; + GdkRectangle _tmp30_ = {0}; + gint _tmp31_ = 0; + SpitTransitionsVisuals* _tmp32_ = NULL; + GdkRectangle _tmp33_ = {0}; + GdkRectangle _tmp34_ = {0}; + gint _tmp35_ = 0; + gint x = 0; + SpitTransitionsVisuals* _tmp36_ = NULL; + GdkRectangle _tmp37_ = {0}; + GdkRectangle _tmp38_ = {0}; + gint _tmp39_ = 0; + gint y = 0; + SpitTransitionsVisuals* _tmp40_ = NULL; + GdkRectangle _tmp41_ = {0}; + GdkRectangle _tmp42_ = {0}; + gint _tmp43_ = 0; + cairo_t* _tmp79_ = NULL; + cairo_t* _tmp80_ = NULL; + gdouble _tmp81_ = 0.0; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp24_ = ctx; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp25_ = visuals; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp26_ = spit_transitions_visuals_get_to_pixbuf (_tmp25_); +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp27_ = _tmp26_; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp28_ = visuals; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp28_, &_tmp29_); +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp30_ = _tmp29_; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp31_ = _tmp30_.x; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp32_ = visuals; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp32_, &_tmp33_); +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp34_ = _tmp33_; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp35_ = _tmp34_.y; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + gdk_cairo_set_source_pixbuf (_tmp24_, _tmp27_, (gdouble) _tmp31_, (gdouble) _tmp35_); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp36_ = visuals; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp36_, &_tmp37_); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp38_ = _tmp37_; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp39_ = _tmp38_.x; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + x = _tmp39_; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp40_ = visuals; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp40_, &_tmp41_); +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp42_ = _tmp41_; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp43_ = _tmp42_.y; +#line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + y = _tmp43_; +#line 474 "StripesEffect.c" + { + gint i = 0; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + i = 0; +#line 479 "StripesEffect.c" + { + gboolean _tmp44_ = FALSE; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp44_ = TRUE; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + while (TRUE) { +#line 486 "StripesEffect.c" + gint _tmp46_ = 0; + gint _tmp47_ = 0; + gint _tmp48_ = 0; + SpitTransitionsMotion* _tmp49_ = NULL; + SpitTransitionsDirection _tmp50_ = 0; + SpitTransitionsDirection _tmp51_ = 0; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + if (!_tmp44_) { +#line 495 "StripesEffect.c" + gint _tmp45_ = 0; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp45_ = i; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + i = _tmp45_ + 1; +#line 501 "StripesEffect.c" + } +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp44_ = FALSE; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp46_ = i; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp47_ = self->priv->stripe_count; +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + if (!(_tmp46_ <= _tmp47_)) { +#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + break; +#line 513 "StripesEffect.c" + } +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp48_ = i; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp49_ = motion; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp50_ = spit_transitions_motion_get_direction (_tmp49_); +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp51_ = _tmp50_; +#line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + if ((_tmp48_ % 2) == ((gint) _tmp51_)) { +#line 525 "StripesEffect.c" + cairo_t* _tmp52_ = NULL; + gint _tmp53_ = 0; + SpitTransitionsVisuals* _tmp54_ = NULL; + GdkRectangle _tmp55_ = {0}; + GdkRectangle _tmp56_ = {0}; + gint _tmp57_ = 0; + gdouble _tmp58_ = 0.0; + SpitTransitionsVisuals* _tmp59_ = NULL; + GdkRectangle _tmp60_ = {0}; + GdkRectangle _tmp61_ = {0}; + gint _tmp62_ = 0; + gint _tmp63_ = 0; + gint _tmp64_ = 0; + gint _tmp65_ = 0; + SpitTransitionsVisuals* _tmp66_ = NULL; + GdkRectangle _tmp67_ = {0}; + GdkRectangle _tmp68_ = {0}; + gint _tmp69_ = 0; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp52_ = ctx; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp53_ = x; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp54_ = visuals; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp54_, &_tmp55_); +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp56_ = _tmp55_; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp57_ = _tmp56_.width; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp58_ = alpha; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp59_ = visuals; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp59_, &_tmp60_); +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp61_ = _tmp60_; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp62_ = _tmp61_.width; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp63_ = y; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp64_ = i; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp65_ = x; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp66_ = visuals; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp66_, &_tmp67_); +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp68_ = _tmp67_; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp69_ = _tmp68_.width; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + cairo_rectangle (_tmp52_, (_tmp53_ + _tmp57_) - (_tmp58_ * _tmp62_), (gdouble) (_tmp63_ + (_tmp64_ * STRIPES_EFFECT_STRIPE_HEIGHT)), (gdouble) (_tmp65_ + _tmp69_), (gdouble) STRIPES_EFFECT_STRIPE_HEIGHT); +#line 582 "StripesEffect.c" + } else { + cairo_t* _tmp70_ = NULL; + gint _tmp71_ = 0; + gint _tmp72_ = 0; + gint _tmp73_ = 0; + SpitTransitionsVisuals* _tmp74_ = NULL; + GdkRectangle _tmp75_ = {0}; + GdkRectangle _tmp76_ = {0}; + gint _tmp77_ = 0; + gdouble _tmp78_ = 0.0; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp70_ = ctx; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp71_ = x; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp72_ = y; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp73_ = i; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp74_ = visuals; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + spit_transitions_visuals_get_to_pos (_tmp74_, &_tmp75_); +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp76_ = _tmp75_; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp77_ = _tmp76_.width; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp78_ = alpha; +#line 68 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + cairo_rectangle (_tmp70_, (gdouble) _tmp71_, (gdouble) (_tmp72_ + (STRIPES_EFFECT_STRIPE_HEIGHT * _tmp73_)), _tmp77_ * _tmp78_, (gdouble) STRIPES_EFFECT_STRIPE_HEIGHT); +#line 613 "StripesEffect.c" + } + } + } + } +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp79_ = ctx; +#line 73 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + cairo_clip (_tmp79_); +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp80_ = ctx; +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + _tmp81_ = alpha; +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + cairo_paint_with_alpha (_tmp80_, _tmp81_); +#line 628 "StripesEffect.c" + } +} + + +static void stripes_effect_real_advance (SpitTransitionsEffect* base, SpitTransitionsVisuals* visuals, SpitTransitionsMotion* motion, gint frame_number) { + StripesEffect * self; +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_STRIPES_EFFECT, StripesEffect); +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_VISUALS (visuals)); +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + g_return_if_fail (SPIT_TRANSITIONS_IS_MOTION (motion)); +#line 641 "StripesEffect.c" +} + + +static void stripes_effect_real_cancel (SpitTransitionsEffect* base) { + StripesEffect * self; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_STRIPES_EFFECT, StripesEffect); +#line 649 "StripesEffect.c" +} + + +static void stripes_effect_class_init (StripesEffectClass * klass) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + stripes_effect_parent_class = g_type_class_peek_parent (klass); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + g_type_class_add_private (klass, sizeof (StripesEffectPrivate)); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + G_OBJECT_CLASS (klass)->finalize = stripes_effect_finalize; +#line 660 "StripesEffect.c" +} + + +static void stripes_effect_spit_transitions_effect_interface_init (SpitTransitionsEffectIface * iface) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + stripes_effect_spit_transitions_effect_parent_iface = g_type_interface_peek_parent (iface); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + iface->get_fps = (void (*)(SpitTransitionsEffect*, gint*, gint*)) stripes_effect_real_get_fps; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + iface->start = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*)) stripes_effect_real_start; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + iface->needs_clear_background = (gboolean (*)(SpitTransitionsEffect*)) stripes_effect_real_needs_clear_background; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + iface->paint = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, cairo_t*, gint, gint, gint)) stripes_effect_real_paint; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + iface->advance = (void (*)(SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, gint)) stripes_effect_real_advance; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + iface->cancel = (void (*)(SpitTransitionsEffect*)) stripes_effect_real_cancel; +#line 679 "StripesEffect.c" +} + + +static void stripes_effect_instance_init (StripesEffect * self) { +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + self->priv = STRIPES_EFFECT_GET_PRIVATE (self); +#line 686 "StripesEffect.c" +} + + +static void stripes_effect_finalize (GObject* obj) { + StripesEffect * self; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_STRIPES_EFFECT, StripesEffect); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/StripesEffect.vala" + G_OBJECT_CLASS (stripes_effect_parent_class)->finalize (obj); +#line 696 "StripesEffect.c" +} + + +GType stripes_effect_get_type (void) { + static volatile gsize stripes_effect_type_id__volatile = 0; + if (g_once_init_enter (&stripes_effect_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (StripesEffectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) stripes_effect_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (StripesEffect), 0, (GInstanceInitFunc) stripes_effect_instance_init, NULL }; + static const GInterfaceInfo spit_transitions_effect_info = { (GInterfaceInitFunc) stripes_effect_spit_transitions_effect_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType stripes_effect_type_id; + stripes_effect_type_id = g_type_register_static (G_TYPE_OBJECT, "StripesEffect", &g_define_type_info, 0); + g_type_add_interface_static (stripes_effect_type_id, SPIT_TRANSITIONS_TYPE_EFFECT, &spit_transitions_effect_info); + g_once_init_leave (&stripes_effect_type_id__volatile, stripes_effect_type_id); + } + return stripes_effect_type_id__volatile; +} + + + diff --git a/plugins/shotwell-transitions/org.gnome.Shotwell.Transitions.gresource.xml b/plugins/shotwell-transitions/org.gnome.Shotwell.Transitions.gresource.xml new file mode 100644 index 0000000..7545683 --- /dev/null +++ b/plugins/shotwell-transitions/org.gnome.Shotwell.Transitions.gresource.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gresources> + <gresource prefix="/org/gnome/Shotwell/Transitions"> + <file>slideshow-plugin.png</file> + </gresource> +</gresources> diff --git a/plugins/shotwell-transitions/shotwell-transitions.c b/plugins/shotwell-transitions/shotwell-transitions.c new file mode 100644 index 0000000..7e6d981 --- /dev/null +++ b/plugins/shotwell-transitions/shotwell-transitions.c @@ -0,0 +1,1086 @@ +/* shotwell-transitions.c generated by valac 0.32.1, the Vala compiler + * generated from shotwell-transitions.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (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> +#include <gio/gio.h> +#include <stdlib.h> +#include <string.h> +#include <glib/gi18n-lib.h> +#include <gdk-pixbuf/gdk-pixbuf.h> +#include "shotwell-plugin-common.h" + + +#define TYPE_SHOTWELL_TRANSITIONS (shotwell_transitions_get_type ()) +#define SHOTWELL_TRANSITIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHOTWELL_TRANSITIONS, ShotwellTransitions)) +#define SHOTWELL_TRANSITIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHOTWELL_TRANSITIONS, ShotwellTransitionsClass)) +#define IS_SHOTWELL_TRANSITIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHOTWELL_TRANSITIONS)) +#define IS_SHOTWELL_TRANSITIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHOTWELL_TRANSITIONS)) +#define SHOTWELL_TRANSITIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHOTWELL_TRANSITIONS, ShotwellTransitionsClass)) + +typedef struct _ShotwellTransitions ShotwellTransitions; +typedef struct _ShotwellTransitionsClass ShotwellTransitionsClass; +typedef struct _ShotwellTransitionsPrivate ShotwellTransitionsPrivate; + +#define TYPE_SHOTWELL_TRANSITION_DESCRIPTOR (shotwell_transition_descriptor_get_type ()) +#define SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptor)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define IS_SHOTWELL_TRANSITION_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR)) +#define SHOTWELL_TRANSITION_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptorClass)) + +typedef struct _ShotwellTransitionDescriptor ShotwellTransitionDescriptor; +typedef struct _ShotwellTransitionDescriptorClass ShotwellTransitionDescriptorClass; + +#define TYPE_FADE_EFFECT_DESCRIPTOR (fade_effect_descriptor_get_type ()) +#define FADE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FADE_EFFECT_DESCRIPTOR, FadeEffectDescriptor)) +#define FADE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FADE_EFFECT_DESCRIPTOR, FadeEffectDescriptorClass)) +#define IS_FADE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FADE_EFFECT_DESCRIPTOR)) +#define IS_FADE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FADE_EFFECT_DESCRIPTOR)) +#define FADE_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FADE_EFFECT_DESCRIPTOR, FadeEffectDescriptorClass)) + +typedef struct _FadeEffectDescriptor FadeEffectDescriptor; +typedef struct _FadeEffectDescriptorClass FadeEffectDescriptorClass; + +#define TYPE_SLIDE_EFFECT_DESCRIPTOR (slide_effect_descriptor_get_type ()) +#define SLIDE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SLIDE_EFFECT_DESCRIPTOR, SlideEffectDescriptor)) +#define SLIDE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SLIDE_EFFECT_DESCRIPTOR, SlideEffectDescriptorClass)) +#define IS_SLIDE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SLIDE_EFFECT_DESCRIPTOR)) +#define IS_SLIDE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SLIDE_EFFECT_DESCRIPTOR)) +#define SLIDE_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SLIDE_EFFECT_DESCRIPTOR, SlideEffectDescriptorClass)) + +typedef struct _SlideEffectDescriptor SlideEffectDescriptor; +typedef struct _SlideEffectDescriptorClass SlideEffectDescriptorClass; + +#define TYPE_CRUMBLE_EFFECT_DESCRIPTOR (crumble_effect_descriptor_get_type ()) +#define CRUMBLE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CRUMBLE_EFFECT_DESCRIPTOR, CrumbleEffectDescriptor)) +#define CRUMBLE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CRUMBLE_EFFECT_DESCRIPTOR, CrumbleEffectDescriptorClass)) +#define IS_CRUMBLE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CRUMBLE_EFFECT_DESCRIPTOR)) +#define IS_CRUMBLE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CRUMBLE_EFFECT_DESCRIPTOR)) +#define CRUMBLE_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CRUMBLE_EFFECT_DESCRIPTOR, CrumbleEffectDescriptorClass)) + +typedef struct _CrumbleEffectDescriptor CrumbleEffectDescriptor; +typedef struct _CrumbleEffectDescriptorClass CrumbleEffectDescriptorClass; + +#define TYPE_BLINDS_EFFECT_DESCRIPTOR (blinds_effect_descriptor_get_type ()) +#define BLINDS_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BLINDS_EFFECT_DESCRIPTOR, BlindsEffectDescriptor)) +#define BLINDS_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BLINDS_EFFECT_DESCRIPTOR, BlindsEffectDescriptorClass)) +#define IS_BLINDS_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BLINDS_EFFECT_DESCRIPTOR)) +#define IS_BLINDS_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BLINDS_EFFECT_DESCRIPTOR)) +#define BLINDS_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BLINDS_EFFECT_DESCRIPTOR, BlindsEffectDescriptorClass)) + +typedef struct _BlindsEffectDescriptor BlindsEffectDescriptor; +typedef struct _BlindsEffectDescriptorClass BlindsEffectDescriptorClass; + +#define TYPE_CIRCLE_EFFECT_DESCRIPTOR (circle_effect_descriptor_get_type ()) +#define CIRCLE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CIRCLE_EFFECT_DESCRIPTOR, CircleEffectDescriptor)) +#define CIRCLE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CIRCLE_EFFECT_DESCRIPTOR, CircleEffectDescriptorClass)) +#define IS_CIRCLE_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CIRCLE_EFFECT_DESCRIPTOR)) +#define IS_CIRCLE_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CIRCLE_EFFECT_DESCRIPTOR)) +#define CIRCLE_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CIRCLE_EFFECT_DESCRIPTOR, CircleEffectDescriptorClass)) + +typedef struct _CircleEffectDescriptor CircleEffectDescriptor; +typedef struct _CircleEffectDescriptorClass CircleEffectDescriptorClass; + +#define TYPE_CIRCLES_EFFECT_DESCRIPTOR (circles_effect_descriptor_get_type ()) +#define CIRCLES_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CIRCLES_EFFECT_DESCRIPTOR, CirclesEffectDescriptor)) +#define CIRCLES_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CIRCLES_EFFECT_DESCRIPTOR, CirclesEffectDescriptorClass)) +#define IS_CIRCLES_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CIRCLES_EFFECT_DESCRIPTOR)) +#define IS_CIRCLES_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CIRCLES_EFFECT_DESCRIPTOR)) +#define CIRCLES_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CIRCLES_EFFECT_DESCRIPTOR, CirclesEffectDescriptorClass)) + +typedef struct _CirclesEffectDescriptor CirclesEffectDescriptor; +typedef struct _CirclesEffectDescriptorClass CirclesEffectDescriptorClass; + +#define TYPE_CLOCK_EFFECT_DESCRIPTOR (clock_effect_descriptor_get_type ()) +#define CLOCK_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CLOCK_EFFECT_DESCRIPTOR, ClockEffectDescriptor)) +#define CLOCK_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CLOCK_EFFECT_DESCRIPTOR, ClockEffectDescriptorClass)) +#define IS_CLOCK_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CLOCK_EFFECT_DESCRIPTOR)) +#define IS_CLOCK_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CLOCK_EFFECT_DESCRIPTOR)) +#define CLOCK_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CLOCK_EFFECT_DESCRIPTOR, ClockEffectDescriptorClass)) + +typedef struct _ClockEffectDescriptor ClockEffectDescriptor; +typedef struct _ClockEffectDescriptorClass ClockEffectDescriptorClass; + +#define TYPE_SQUARES_EFFECT_DESCRIPTOR (squares_effect_descriptor_get_type ()) +#define SQUARES_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SQUARES_EFFECT_DESCRIPTOR, SquaresEffectDescriptor)) +#define SQUARES_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SQUARES_EFFECT_DESCRIPTOR, SquaresEffectDescriptorClass)) +#define IS_SQUARES_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SQUARES_EFFECT_DESCRIPTOR)) +#define IS_SQUARES_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SQUARES_EFFECT_DESCRIPTOR)) +#define SQUARES_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SQUARES_EFFECT_DESCRIPTOR, SquaresEffectDescriptorClass)) + +typedef struct _SquaresEffectDescriptor SquaresEffectDescriptor; +typedef struct _SquaresEffectDescriptorClass SquaresEffectDescriptorClass; + +#define TYPE_CHESS_EFFECT_DESCRIPTOR (chess_effect_descriptor_get_type ()) +#define CHESS_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHESS_EFFECT_DESCRIPTOR, ChessEffectDescriptor)) +#define CHESS_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHESS_EFFECT_DESCRIPTOR, ChessEffectDescriptorClass)) +#define IS_CHESS_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHESS_EFFECT_DESCRIPTOR)) +#define IS_CHESS_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHESS_EFFECT_DESCRIPTOR)) +#define CHESS_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHESS_EFFECT_DESCRIPTOR, ChessEffectDescriptorClass)) + +typedef struct _ChessEffectDescriptor ChessEffectDescriptor; +typedef struct _ChessEffectDescriptorClass ChessEffectDescriptorClass; + +#define TYPE_STRIPES_EFFECT_DESCRIPTOR (stripes_effect_descriptor_get_type ()) +#define STRIPES_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_STRIPES_EFFECT_DESCRIPTOR, StripesEffectDescriptor)) +#define STRIPES_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_STRIPES_EFFECT_DESCRIPTOR, StripesEffectDescriptorClass)) +#define IS_STRIPES_EFFECT_DESCRIPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_STRIPES_EFFECT_DESCRIPTOR)) +#define IS_STRIPES_EFFECT_DESCRIPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_STRIPES_EFFECT_DESCRIPTOR)) +#define STRIPES_EFFECT_DESCRIPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_STRIPES_EFFECT_DESCRIPTOR, StripesEffectDescriptorClass)) + +typedef struct _StripesEffectDescriptor StripesEffectDescriptor; +typedef struct _StripesEffectDescriptorClass StripesEffectDescriptorClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +typedef struct _ShotwellTransitionDescriptorPrivate ShotwellTransitionDescriptorPrivate; +#define _g_free0(var) (var = (g_free (var), NULL)) + +struct _ShotwellTransitions { + GObject parent_instance; + ShotwellTransitionsPrivate * priv; +}; + +struct _ShotwellTransitionsClass { + GObjectClass parent_class; +}; + +struct _ShotwellTransitionsPrivate { + SpitPluggable** pluggables; + gint pluggables_length1; + gint _pluggables_size_; +}; + +struct _ShotwellTransitionDescriptor { + GObject parent_instance; + ShotwellTransitionDescriptorPrivate * priv; +}; + +struct _ShotwellTransitionDescriptorClass { + GObjectClass parent_class; + const gchar* (*get_id) (ShotwellTransitionDescriptor* self); + const gchar* (*get_pluggable_name) (ShotwellTransitionDescriptor* self); + SpitTransitionsEffect* (*create) (ShotwellTransitionDescriptor* self, SpitHostInterface* host); +}; + + +static gpointer shotwell_transitions_parent_class = NULL; +static SpitModuleIface* shotwell_transitions_spit_module_parent_iface = NULL; +static gpointer shotwell_transition_descriptor_parent_class = NULL; +static GdkPixbuf** shotwell_transition_descriptor_icon_pixbuf_set; +static gint shotwell_transition_descriptor_icon_pixbuf_set_length1; +static GdkPixbuf** shotwell_transition_descriptor_icon_pixbuf_set = NULL; +static gint shotwell_transition_descriptor_icon_pixbuf_set_length1 = 0; +static gint _shotwell_transition_descriptor_icon_pixbuf_set_size_ = 0; +static SpitPluggableIface* shotwell_transition_descriptor_spit_pluggable_parent_iface = NULL; +static SpitTransitionsDescriptorIface* shotwell_transition_descriptor_spit_transitions_descriptor_parent_iface = NULL; + +GType shotwell_transitions_get_type (void) G_GNUC_CONST; +#define SHOTWELL_TRANSITIONS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SHOTWELL_TRANSITIONS, ShotwellTransitionsPrivate)) +enum { + SHOTWELL_TRANSITIONS_DUMMY_PROPERTY +}; +ShotwellTransitions* shotwell_transitions_new (GFile* module_file); +ShotwellTransitions* shotwell_transitions_construct (GType object_type, GFile* module_file); +FadeEffectDescriptor* fade_effect_descriptor_new (GFile* resource_directory); +FadeEffectDescriptor* fade_effect_descriptor_construct (GType object_type, GFile* resource_directory); +GType shotwell_transition_descriptor_get_type (void) G_GNUC_CONST; +GType fade_effect_descriptor_get_type (void) G_GNUC_CONST; +static void _vala_array_add1 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value); +SlideEffectDescriptor* slide_effect_descriptor_new (GFile* resource_directory); +SlideEffectDescriptor* slide_effect_descriptor_construct (GType object_type, GFile* resource_directory); +GType slide_effect_descriptor_get_type (void) G_GNUC_CONST; +static void _vala_array_add2 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value); +CrumbleEffectDescriptor* crumble_effect_descriptor_new (GFile* resource_directory); +CrumbleEffectDescriptor* crumble_effect_descriptor_construct (GType object_type, GFile* resource_directory); +GType crumble_effect_descriptor_get_type (void) G_GNUC_CONST; +static void _vala_array_add3 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value); +BlindsEffectDescriptor* blinds_effect_descriptor_new (GFile* resource_directory); +BlindsEffectDescriptor* blinds_effect_descriptor_construct (GType object_type, GFile* resource_directory); +GType blinds_effect_descriptor_get_type (void) G_GNUC_CONST; +static void _vala_array_add4 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value); +CircleEffectDescriptor* circle_effect_descriptor_new (GFile* resource_directory); +CircleEffectDescriptor* circle_effect_descriptor_construct (GType object_type, GFile* resource_directory); +GType circle_effect_descriptor_get_type (void) G_GNUC_CONST; +static void _vala_array_add5 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value); +CirclesEffectDescriptor* circles_effect_descriptor_new (GFile* resource_directory); +CirclesEffectDescriptor* circles_effect_descriptor_construct (GType object_type, GFile* resource_directory); +GType circles_effect_descriptor_get_type (void) G_GNUC_CONST; +static void _vala_array_add6 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value); +ClockEffectDescriptor* clock_effect_descriptor_new (GFile* resource_directory); +ClockEffectDescriptor* clock_effect_descriptor_construct (GType object_type, GFile* resource_directory); +GType clock_effect_descriptor_get_type (void) G_GNUC_CONST; +static void _vala_array_add7 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value); +SquaresEffectDescriptor* squares_effect_descriptor_new (GFile* resource_directory); +SquaresEffectDescriptor* squares_effect_descriptor_construct (GType object_type, GFile* resource_directory); +GType squares_effect_descriptor_get_type (void) G_GNUC_CONST; +static void _vala_array_add8 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value); +ChessEffectDescriptor* chess_effect_descriptor_new (GFile* resource_directory); +ChessEffectDescriptor* chess_effect_descriptor_construct (GType object_type, GFile* resource_directory); +GType chess_effect_descriptor_get_type (void) G_GNUC_CONST; +static void _vala_array_add9 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value); +StripesEffectDescriptor* stripes_effect_descriptor_new (GFile* resource_directory); +StripesEffectDescriptor* stripes_effect_descriptor_construct (GType object_type, GFile* resource_directory); +GType stripes_effect_descriptor_get_type (void) G_GNUC_CONST; +static void _vala_array_add10 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value); +static const gchar* shotwell_transitions_real_get_module_name (SpitModule* base); +static const gchar* shotwell_transitions_real_get_version (SpitModule* base); +static const gchar* shotwell_transitions_real_get_id (SpitModule* base); +static SpitPluggable** shotwell_transitions_real_get_pluggables (SpitModule* base, int* result_length1); +static void shotwell_transitions_finalize (GObject* obj); +SpitModule* spit_entry_point (SpitEntryPointParams* params); +enum { + SHOTWELL_TRANSITION_DESCRIPTOR_DUMMY_PROPERTY +}; +#define SHOTWELL_TRANSITION_DESCRIPTOR_ICON_FILENAME "slideshow-plugin.png" +ShotwellTransitionDescriptor* shotwell_transition_descriptor_construct (GType object_type, GFile* resource_directory); +static gint shotwell_transition_descriptor_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface); +const gchar* shotwell_transition_descriptor_get_id (ShotwellTransitionDescriptor* self); +static const gchar* shotwell_transition_descriptor_real_get_id (ShotwellTransitionDescriptor* self); +const gchar* shotwell_transition_descriptor_get_pluggable_name (ShotwellTransitionDescriptor* self); +static const gchar* shotwell_transition_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* self); +static void shotwell_transition_descriptor_real_get_info (SpitPluggable* base, SpitPluggableInfo* info); +static GdkPixbuf** _vala_array_dup1 (GdkPixbuf** self, int length); +static void shotwell_transition_descriptor_real_activation (SpitPluggable* base, gboolean enabled); +SpitTransitionsEffect* shotwell_transition_descriptor_create (ShotwellTransitionDescriptor* self, SpitHostInterface* host); +static SpitTransitionsEffect* shotwell_transition_descriptor_real_create (ShotwellTransitionDescriptor* self, SpitHostInterface* host); +static void shotwell_transition_descriptor_finalize (GObject* obj); +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); + + +static void _vala_array_add1 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value) { +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + if ((*length) == (*size)) { +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 266 "shotwell-transitions.c" + } +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[(*length)++] = value; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[*length] = NULL; +#line 272 "shotwell-transitions.c" +} + + +static void _vala_array_add2 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value) { +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + if ((*length) == (*size)) { +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 283 "shotwell-transitions.c" + } +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[(*length)++] = value; +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[*length] = NULL; +#line 289 "shotwell-transitions.c" +} + + +static void _vala_array_add3 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value) { +#line 17 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + if ((*length) == (*size)) { +#line 17 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 17 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 300 "shotwell-transitions.c" + } +#line 17 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[(*length)++] = value; +#line 17 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[*length] = NULL; +#line 306 "shotwell-transitions.c" +} + + +static void _vala_array_add4 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value) { +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + if ((*length) == (*size)) { +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 317 "shotwell-transitions.c" + } +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[(*length)++] = value; +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[*length] = NULL; +#line 323 "shotwell-transitions.c" +} + + +static void _vala_array_add5 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value) { +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + if ((*length) == (*size)) { +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 334 "shotwell-transitions.c" + } +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[(*length)++] = value; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[*length] = NULL; +#line 340 "shotwell-transitions.c" +} + + +static void _vala_array_add6 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value) { +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + if ((*length) == (*size)) { +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 351 "shotwell-transitions.c" + } +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[(*length)++] = value; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[*length] = NULL; +#line 357 "shotwell-transitions.c" +} + + +static void _vala_array_add7 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value) { +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + if ((*length) == (*size)) { +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 368 "shotwell-transitions.c" + } +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[(*length)++] = value; +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[*length] = NULL; +#line 374 "shotwell-transitions.c" +} + + +static void _vala_array_add8 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value) { +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + if ((*length) == (*size)) { +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 385 "shotwell-transitions.c" + } +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[(*length)++] = value; +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[*length] = NULL; +#line 391 "shotwell-transitions.c" +} + + +static void _vala_array_add9 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value) { +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + if ((*length) == (*size)) { +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 402 "shotwell-transitions.c" + } +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[(*length)++] = value; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[*length] = NULL; +#line 408 "shotwell-transitions.c" +} + + +static void _vala_array_add10 (SpitPluggable*** array, int* length, int* size, SpitPluggable* value) { +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + if ((*length) == (*size)) { +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *array = g_renew (SpitPluggable*, *array, (*size) + 1); +#line 419 "shotwell-transitions.c" + } +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[(*length)++] = value; +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*array)[*length] = NULL; +#line 425 "shotwell-transitions.c" +} + + +ShotwellTransitions* shotwell_transitions_construct (GType object_type, GFile* module_file) { + ShotwellTransitions * self = NULL; + GFile* resource_directory = NULL; + GFile* _tmp0_ = NULL; + GFile* _tmp1_ = NULL; + SpitPluggable** _tmp2_ = NULL; + gint _tmp2__length1 = 0; + FadeEffectDescriptor* _tmp3_ = NULL; + SpitPluggable** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + SlideEffectDescriptor* _tmp5_ = NULL; + SpitPluggable** _tmp6_ = NULL; + gint _tmp6__length1 = 0; + CrumbleEffectDescriptor* _tmp7_ = NULL; + SpitPluggable** _tmp8_ = NULL; + gint _tmp8__length1 = 0; + BlindsEffectDescriptor* _tmp9_ = NULL; + SpitPluggable** _tmp10_ = NULL; + gint _tmp10__length1 = 0; + CircleEffectDescriptor* _tmp11_ = NULL; + SpitPluggable** _tmp12_ = NULL; + gint _tmp12__length1 = 0; + CirclesEffectDescriptor* _tmp13_ = NULL; + SpitPluggable** _tmp14_ = NULL; + gint _tmp14__length1 = 0; + ClockEffectDescriptor* _tmp15_ = NULL; + SpitPluggable** _tmp16_ = NULL; + gint _tmp16__length1 = 0; + SquaresEffectDescriptor* _tmp17_ = NULL; + SpitPluggable** _tmp18_ = NULL; + gint _tmp18__length1 = 0; + ChessEffectDescriptor* _tmp19_ = NULL; + SpitPluggable** _tmp20_ = NULL; + gint _tmp20__length1 = 0; + StripesEffectDescriptor* _tmp21_ = NULL; +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + g_return_val_if_fail (G_IS_FILE (module_file), NULL); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self = (ShotwellTransitions*) g_object_new (object_type, NULL); +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp0_ = module_file; +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp1_ = g_file_get_parent (_tmp0_); +#line 13 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + resource_directory = _tmp1_; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp2_ = self->priv->pluggables; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp2__length1 = self->priv->pluggables_length1; +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp3_ = fade_effect_descriptor_new (resource_directory); +#line 15 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _vala_array_add1 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp4_ = self->priv->pluggables; +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp4__length1 = self->priv->pluggables_length1; +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp5_ = slide_effect_descriptor_new (resource_directory); +#line 16 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _vala_array_add2 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 17 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp6_ = self->priv->pluggables; +#line 17 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp6__length1 = self->priv->pluggables_length1; +#line 17 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp7_ = crumble_effect_descriptor_new (resource_directory); +#line 17 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _vala_array_add3 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp8_ = self->priv->pluggables; +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp8__length1 = self->priv->pluggables_length1; +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp9_ = blinds_effect_descriptor_new (resource_directory); +#line 18 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _vala_array_add4 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp10_ = self->priv->pluggables; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp10__length1 = self->priv->pluggables_length1; +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp11_ = circle_effect_descriptor_new (resource_directory); +#line 19 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _vala_array_add5 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp12_ = self->priv->pluggables; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp12__length1 = self->priv->pluggables_length1; +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp13_ = circles_effect_descriptor_new (resource_directory); +#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _vala_array_add6 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp14_ = self->priv->pluggables; +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp14__length1 = self->priv->pluggables_length1; +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp15_ = clock_effect_descriptor_new (resource_directory); +#line 21 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _vala_array_add7 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp16_ = self->priv->pluggables; +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp16__length1 = self->priv->pluggables_length1; +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp17_ = squares_effect_descriptor_new (resource_directory); +#line 22 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _vala_array_add8 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp18_ = self->priv->pluggables; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp18__length1 = self->priv->pluggables_length1; +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp19_ = chess_effect_descriptor_new (resource_directory); +#line 23 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _vala_array_add9 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp20_ = self->priv->pluggables; +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp20__length1 = self->priv->pluggables_length1; +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp21_ = stripes_effect_descriptor_new (resource_directory); +#line 24 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _vala_array_add10 (&self->priv->pluggables, &self->priv->pluggables_length1, &self->priv->_pluggables_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, SPIT_TYPE_PLUGGABLE, SpitPluggable)); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _g_object_unref0 (resource_directory); +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return self; +#line 558 "shotwell-transitions.c" +} + + +ShotwellTransitions* shotwell_transitions_new (GFile* module_file) { +#line 12 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return shotwell_transitions_construct (TYPE_SHOTWELL_TRANSITIONS, module_file); +#line 565 "shotwell-transitions.c" +} + + +static const gchar* shotwell_transitions_real_get_module_name (SpitModule* base) { + ShotwellTransitions * self; + const gchar* result = NULL; + const gchar* _tmp0_ = NULL; +#line 27 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_TRANSITIONS, ShotwellTransitions); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp0_ = _ ("Core Slideshow Transitions"); +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + result = _tmp0_; +#line 28 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return result; +#line 581 "shotwell-transitions.c" +} + + +static const gchar* shotwell_transitions_real_get_version (SpitModule* base) { + ShotwellTransitions * self; + const gchar* result = NULL; +#line 31 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_TRANSITIONS, ShotwellTransitions); +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + result = _VERSION; +#line 32 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return result; +#line 594 "shotwell-transitions.c" +} + + +static const gchar* shotwell_transitions_real_get_id (SpitModule* base) { + ShotwellTransitions * self; + const gchar* result = NULL; +#line 35 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_TRANSITIONS, ShotwellTransitions); +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + result = "org.yorba.shotwell.transitions"; +#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return result; +#line 607 "shotwell-transitions.c" +} + + +static SpitPluggable** shotwell_transitions_real_get_pluggables (SpitModule* base, int* result_length1) { + ShotwellTransitions * self; + SpitPluggable** result = NULL; + SpitPluggable** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + SpitPluggable** _tmp1_ = NULL; + gint _tmp1__length1 = 0; +#line 39 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_TRANSITIONS, ShotwellTransitions); +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp0_ = self->priv->pluggables; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp0__length1 = self->priv->pluggables_length1; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp1_ = _tmp0_; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp1__length1 = _tmp0__length1; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + if (result_length1) { +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + *result_length1 = _tmp1__length1; +#line 632 "shotwell-transitions.c" + } +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + result = _tmp1_; +#line 40 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return result; +#line 638 "shotwell-transitions.c" +} + + +static void shotwell_transitions_class_init (ShotwellTransitionsClass * klass) { +#line 9 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + shotwell_transitions_parent_class = g_type_class_peek_parent (klass); +#line 9 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + g_type_class_add_private (klass, sizeof (ShotwellTransitionsPrivate)); +#line 9 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + G_OBJECT_CLASS (klass)->finalize = shotwell_transitions_finalize; +#line 649 "shotwell-transitions.c" +} + + +static void shotwell_transitions_spit_module_interface_init (SpitModuleIface * iface) { +#line 9 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + shotwell_transitions_spit_module_parent_iface = g_type_interface_peek_parent (iface); +#line 9 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + iface->get_module_name = (const gchar* (*)(SpitModule*)) shotwell_transitions_real_get_module_name; +#line 9 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + iface->get_version = (const gchar* (*)(SpitModule*)) shotwell_transitions_real_get_version; +#line 9 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + iface->get_id = (const gchar* (*)(SpitModule*)) shotwell_transitions_real_get_id; +#line 9 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + iface->get_pluggables = (SpitPluggable** (*)(SpitModule*, int*)) shotwell_transitions_real_get_pluggables; +#line 664 "shotwell-transitions.c" +} + + +static void shotwell_transitions_instance_init (ShotwellTransitions * self) { + SpitPluggable** _tmp0_ = NULL; +#line 9 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self->priv = SHOTWELL_TRANSITIONS_GET_PRIVATE (self); +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp0_ = g_new0 (SpitPluggable*, 0 + 1); +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self->priv->pluggables = _tmp0_; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self->priv->pluggables_length1 = 0; +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self->priv->_pluggables_size_ = self->priv->pluggables_length1; +#line 680 "shotwell-transitions.c" +} + + +static void shotwell_transitions_finalize (GObject* obj) { + ShotwellTransitions * self; +#line 9 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SHOTWELL_TRANSITIONS, ShotwellTransitions); +#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self->priv->pluggables = (_vala_array_free (self->priv->pluggables, self->priv->pluggables_length1, (GDestroyNotify) g_object_unref), NULL); +#line 9 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + G_OBJECT_CLASS (shotwell_transitions_parent_class)->finalize (obj); +#line 692 "shotwell-transitions.c" +} + + +GType shotwell_transitions_get_type (void) { + static volatile gsize shotwell_transitions_type_id__volatile = 0; + if (g_once_init_enter (&shotwell_transitions_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (ShotwellTransitionsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) shotwell_transitions_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ShotwellTransitions), 0, (GInstanceInitFunc) shotwell_transitions_instance_init, NULL }; + static const GInterfaceInfo spit_module_info = { (GInterfaceInitFunc) shotwell_transitions_spit_module_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType shotwell_transitions_type_id; + shotwell_transitions_type_id = g_type_register_static (G_TYPE_OBJECT, "ShotwellTransitions", &g_define_type_info, 0); + g_type_add_interface_static (shotwell_transitions_type_id, SPIT_TYPE_MODULE, &spit_module_info); + g_once_init_leave (&shotwell_transitions_type_id__volatile, shotwell_transitions_type_id); + } + return shotwell_transitions_type_id__volatile; +} + + +SpitModule* spit_entry_point (SpitEntryPointParams* params) { + SpitModule* result = NULL; + SpitEntryPointParams* _tmp0_ = NULL; + gint _tmp1_ = 0; + SpitEntryPointParams* _tmp2_ = NULL; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + ShotwellTransitions* _tmp5_ = NULL; + SpitEntryPointParams* _tmp6_ = NULL; + gint _tmp7_ = 0; +#line 46 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp0_ = params; +#line 46 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp1_ = (*_tmp0_).host_min_spit_interface; +#line 46 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp2_ = params; +#line 46 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp3_ = (*_tmp2_).host_max_spit_interface; +#line 46 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp4_ = spit_negotiate_interfaces (_tmp1_, _tmp3_, SPIT_CURRENT_INTERFACE); +#line 46 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*params).module_spit_interface = _tmp4_; +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp6_ = params; +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp7_ = (*_tmp6_).module_spit_interface; +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + if (_tmp7_ != SPIT_UNSUPPORTED_INTERFACE) { +#line 738 "shotwell-transitions.c" + SpitEntryPointParams* _tmp8_ = NULL; + GFile* _tmp9_ = NULL; + ShotwellTransitions* _tmp10_ = NULL; +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp8_ = params; +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp9_ = (*_tmp8_).module_file; +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp10_ = shotwell_transitions_new (_tmp9_); +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _g_object_unref0 (_tmp5_); +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp5_ = _tmp10_; +#line 752 "shotwell-transitions.c" + } else { +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _g_object_unref0 (_tmp5_); +#line 50 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp5_ = NULL; +#line 758 "shotwell-transitions.c" + } +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SPIT_TYPE_MODULE, SpitModule); +#line 49 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return result; +#line 764 "shotwell-transitions.c" +} + + +ShotwellTransitionDescriptor* shotwell_transition_descriptor_construct (GType object_type, GFile* resource_directory) { + ShotwellTransitionDescriptor * self = NULL; + GdkPixbuf** _tmp0_ = NULL; + gint _tmp0__length1 = 0; +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + g_return_val_if_fail (G_IS_FILE (resource_directory), NULL); +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self = (ShotwellTransitionDescriptor*) g_object_new (object_type, NULL); +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp0_ = shotwell_transition_descriptor_icon_pixbuf_set; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp0__length1 = shotwell_transition_descriptor_icon_pixbuf_set_length1; +#line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + if (_tmp0_ == NULL) { +#line 782 "shotwell-transitions.c" + gint _tmp1_ = 0; + GdkPixbuf** _tmp2_ = NULL; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp2_ = resources_load_from_resource (PLUGIN_RESOURCE_PATH "/" SHOTWELL_TRANSITION_DESCRIPTOR_ICON_FILENAME, &_tmp1_); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + shotwell_transition_descriptor_icon_pixbuf_set = (_vala_array_free (shotwell_transition_descriptor_icon_pixbuf_set, shotwell_transition_descriptor_icon_pixbuf_set_length1, (GDestroyNotify) g_object_unref), NULL); +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + shotwell_transition_descriptor_icon_pixbuf_set = _tmp2_; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + shotwell_transition_descriptor_icon_pixbuf_set_length1 = _tmp1_; +#line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _shotwell_transition_descriptor_icon_pixbuf_set_size_ = shotwell_transition_descriptor_icon_pixbuf_set_length1; +#line 795 "shotwell-transitions.c" + } +#line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return self; +#line 799 "shotwell-transitions.c" +} + + +static gint shotwell_transition_descriptor_real_get_pluggable_interface (SpitPluggable* base, gint min_host_interface, gint max_host_interface) { + ShotwellTransitionDescriptor * self; + gint result = 0; + gint _tmp0_ = 0; + gint _tmp1_ = 0; + gint _tmp2_ = 0; +#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptor); +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp0_ = min_host_interface; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp1_ = max_host_interface; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp2_ = spit_negotiate_interfaces (_tmp0_, _tmp1_, SPIT_TRANSITIONS_CURRENT_INTERFACE); +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + result = _tmp2_; +#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return result; +#line 821 "shotwell-transitions.c" +} + + +static const gchar* shotwell_transition_descriptor_real_get_id (ShotwellTransitionDescriptor* self) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + g_critical ("Type `%s' does not implement abstract method `shotwell_transition_descriptor_get_id'", g_type_name (G_TYPE_FROM_INSTANCE (self))); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return NULL; +#line 830 "shotwell-transitions.c" +} + + +const gchar* shotwell_transition_descriptor_get_id (ShotwellTransitionDescriptor* self) { +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + g_return_val_if_fail (IS_SHOTWELL_TRANSITION_DESCRIPTOR (self), NULL); +#line 70 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return SHOTWELL_TRANSITION_DESCRIPTOR_GET_CLASS (self)->get_id (self); +#line 839 "shotwell-transitions.c" +} + + +static const gchar* shotwell_transition_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* self) { +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + g_critical ("Type `%s' does not implement abstract method `shotwell_transition_descriptor_get_pluggable_name'", g_type_name (G_TYPE_FROM_INSTANCE (self))); +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return NULL; +#line 848 "shotwell-transitions.c" +} + + +const gchar* shotwell_transition_descriptor_get_pluggable_name (ShotwellTransitionDescriptor* self) { +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + g_return_val_if_fail (IS_SHOTWELL_TRANSITION_DESCRIPTOR (self), NULL); +#line 72 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return SHOTWELL_TRANSITION_DESCRIPTOR_GET_CLASS (self)->get_pluggable_name (self); +#line 857 "shotwell-transitions.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return self ? g_object_ref (self) : NULL; +#line 864 "shotwell-transitions.c" +} + + +static GdkPixbuf** _vala_array_dup1 (GdkPixbuf** self, int length) { + GdkPixbuf** result; + int i; +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + result = g_new0 (GdkPixbuf*, length + 1); +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + for (i = 0; i < length; i++) { +#line 875 "shotwell-transitions.c" + GdkPixbuf* _tmp0_ = NULL; +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp0_ = _g_object_ref0 (self[i]); +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + result[i] = _tmp0_; +#line 881 "shotwell-transitions.c" + } +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return result; +#line 885 "shotwell-transitions.c" +} + + +static void shotwell_transition_descriptor_real_get_info (SpitPluggable* base, SpitPluggableInfo* info) { + ShotwellTransitionDescriptor * self; + gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + GdkPixbuf** _tmp8_ = NULL; + gint _tmp8__length1 = 0; + GdkPixbuf** _tmp9_ = NULL; + gint _tmp9__length1 = 0; +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptor); +#line 74 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + g_return_if_fail (info != NULL); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp0_ = g_strdup ("Maxim Kartashev"); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _g_free0 ((*info).authors); +#line 75 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*info).authors = _tmp0_; +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp1_ = _ ("Copyright 2010 Maxim Kartashev, Copyright 2016 Software Freedom Conser" \ +"vancy Inc."); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp2_ = g_strdup (_tmp1_); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _g_free0 ((*info).copyright); +#line 76 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*info).copyright = _tmp2_; +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp3_ = g_strdup (RESOURCES_TRANSLATORS); +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _g_free0 ((*info).translators); +#line 77 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*info).translators = _tmp3_; +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp4_ = g_strdup (_VERSION); +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _g_free0 ((*info).version); +#line 78 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*info).version = _tmp4_; +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp5_ = g_strdup (RESOURCES_WEBSITE_NAME); +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _g_free0 ((*info).website_name); +#line 79 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*info).website_name = _tmp5_; +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp6_ = g_strdup (RESOURCES_WEBSITE_URL); +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _g_free0 ((*info).website_url); +#line 80 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*info).website_url = _tmp6_; +#line 81 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*info).is_license_wordwrapped = FALSE; +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp7_ = g_strdup (RESOURCES_LICENSE); +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _g_free0 ((*info).license); +#line 82 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*info).license = _tmp7_; +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp8_ = shotwell_transition_descriptor_icon_pixbuf_set; +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp8__length1 = shotwell_transition_descriptor_icon_pixbuf_set_length1; +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp9_ = (_tmp8_ != NULL) ? _vala_array_dup1 (_tmp8_, _tmp8__length1) : ((gpointer) _tmp8_); +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + _tmp9__length1 = _tmp8__length1; +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*info).icons = (_vala_array_free ((*info).icons, (*info).icons_length1, (GDestroyNotify) g_object_unref), NULL); +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*info).icons = _tmp9_; +#line 83 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + (*info).icons_length1 = _tmp9__length1; +#line 967 "shotwell-transitions.c" +} + + +static void shotwell_transition_descriptor_real_activation (SpitPluggable* base, gboolean enabled) { + ShotwellTransitionDescriptor * self; +#line 86 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptor); +#line 975 "shotwell-transitions.c" +} + + +static SpitTransitionsEffect* shotwell_transition_descriptor_real_create (ShotwellTransitionDescriptor* self, SpitHostInterface* host) { +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + g_critical ("Type `%s' does not implement abstract method `shotwell_transition_descriptor_create'", g_type_name (G_TYPE_FROM_INSTANCE (self))); +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return NULL; +#line 984 "shotwell-transitions.c" +} + + +SpitTransitionsEffect* shotwell_transition_descriptor_create (ShotwellTransitionDescriptor* self, SpitHostInterface* host) { +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + g_return_val_if_fail (IS_SHOTWELL_TRANSITION_DESCRIPTOR (self), NULL); +#line 89 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + return SHOTWELL_TRANSITION_DESCRIPTOR_GET_CLASS (self)->create (self, host); +#line 993 "shotwell-transitions.c" +} + + +static void shotwell_transition_descriptor_class_init (ShotwellTransitionDescriptorClass * klass) { +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + shotwell_transition_descriptor_parent_class = g_type_class_peek_parent (klass); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_id = shotwell_transition_descriptor_real_get_id; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + ((ShotwellTransitionDescriptorClass *) klass)->get_pluggable_name = shotwell_transition_descriptor_real_get_pluggable_name; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + ((ShotwellTransitionDescriptorClass *) klass)->create = shotwell_transition_descriptor_real_create; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + G_OBJECT_CLASS (klass)->finalize = shotwell_transition_descriptor_finalize; +#line 1008 "shotwell-transitions.c" +} + + +static void shotwell_transition_descriptor_spit_pluggable_interface_init (SpitPluggableIface * iface) { +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + shotwell_transition_descriptor_spit_pluggable_parent_iface = g_type_interface_peek_parent (iface); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + iface->get_pluggable_interface = (gint (*)(SpitPluggable*, gint, gint)) shotwell_transition_descriptor_real_get_pluggable_interface; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + iface->get_id = (const gchar* (*)(SpitPluggable*)) shotwell_transition_descriptor_get_id; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + iface->get_pluggable_name = (const gchar* (*)(SpitPluggable*)) shotwell_transition_descriptor_get_pluggable_name; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + iface->get_info = (void (*)(SpitPluggable*, SpitPluggableInfo*)) shotwell_transition_descriptor_real_get_info; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + iface->activation = (void (*)(SpitPluggable*, gboolean)) shotwell_transition_descriptor_real_activation; +#line 1025 "shotwell-transitions.c" +} + + +static void shotwell_transition_descriptor_spit_transitions_descriptor_interface_init (SpitTransitionsDescriptorIface * iface) { +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + shotwell_transition_descriptor_spit_transitions_descriptor_parent_iface = g_type_interface_peek_parent (iface); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + iface->create = (SpitTransitionsEffect* (*)(SpitTransitionsDescriptor*, SpitHostInterface*)) shotwell_transition_descriptor_create; +#line 1034 "shotwell-transitions.c" +} + + +static void shotwell_transition_descriptor_instance_init (ShotwellTransitionDescriptor * self) { +} + + +static void shotwell_transition_descriptor_finalize (GObject* obj) { + ShotwellTransitionDescriptor * self; +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SHOTWELL_TRANSITION_DESCRIPTOR, ShotwellTransitionDescriptor); +#line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/shotwell-transitions.vala" + G_OBJECT_CLASS (shotwell_transition_descriptor_parent_class)->finalize (obj); +#line 1048 "shotwell-transitions.c" +} + + +GType shotwell_transition_descriptor_get_type (void) { + static volatile gsize shotwell_transition_descriptor_type_id__volatile = 0; + if (g_once_init_enter (&shotwell_transition_descriptor_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (ShotwellTransitionDescriptorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) shotwell_transition_descriptor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ShotwellTransitionDescriptor), 0, (GInstanceInitFunc) shotwell_transition_descriptor_instance_init, NULL }; + static const GInterfaceInfo spit_pluggable_info = { (GInterfaceInitFunc) shotwell_transition_descriptor_spit_pluggable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo spit_transitions_descriptor_info = { (GInterfaceInitFunc) shotwell_transition_descriptor_spit_transitions_descriptor_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType shotwell_transition_descriptor_type_id; + shotwell_transition_descriptor_type_id = g_type_register_static (G_TYPE_OBJECT, "ShotwellTransitionDescriptor", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); + g_type_add_interface_static (shotwell_transition_descriptor_type_id, SPIT_TYPE_PLUGGABLE, &spit_pluggable_info); + g_type_add_interface_static (shotwell_transition_descriptor_type_id, SPIT_TRANSITIONS_TYPE_DESCRIPTOR, &spit_transitions_descriptor_info); + g_once_init_leave (&shotwell_transition_descriptor_type_id__volatile, shotwell_transition_descriptor_type_id); + } + return shotwell_transition_descriptor_type_id__volatile; +} + + +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { + if ((array != NULL) && (destroy_func != NULL)) { + int i; + for (i = 0; i < array_length; i = i + 1) { + if (((gpointer*) array)[i] != NULL) { + destroy_func (((gpointer*) array)[i]); + } + } + } +} + + +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { + _vala_array_destroy (array, array_length, destroy_func); + g_free (array); +} + + + diff --git a/plugins/shotwell-transitions/shotwell-transitions.vala b/plugins/shotwell-transitions/shotwell-transitions.vala index 2b1fe40..7673414 100644 --- a/plugins/shotwell-transitions/shotwell-transitions.vala +++ b/plugins/shotwell-transitions/shotwell-transitions.vala @@ -58,7 +58,8 @@ public abstract class ShotwellTransitionDescriptor : Object, Spit.Pluggable, Spi public ShotwellTransitionDescriptor(GLib.File resource_directory) { if (icon_pixbuf_set == null) - icon_pixbuf_set = Resources.load_icon_set(resource_directory.get_child(ICON_FILENAME)); + icon_pixbuf_set = + Resources.load_from_resource(Resources.RESOURCE_PATH + "/" + ICON_FILENAME); } public int get_pluggable_interface(int min_host_interface, int max_host_interface) { |