/* SlideEffect.c generated by valac 0.40.4, 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 #include #include #include #include #include #include #include #include #include #include #include #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; enum { SLIDE_EFFECT_DESCRIPTOR_0_PROPERTY, SLIDE_EFFECT_DESCRIPTOR_NUM_PROPERTIES }; static GParamSpec* slide_effect_descriptor_properties[SLIDE_EFFECT_DESCRIPTOR_NUM_PROPERTIES]; #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; enum { SLIDE_EFFECT_0_PROPERTY, SLIDE_EFFECT_NUM_PROPERTIES }; static GParamSpec* slide_effect_properties[SLIDE_EFFECT_NUM_PROPERTIES]; 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; 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; #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; #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" self = (SlideEffectDescriptor*) shotwell_transition_descriptor_construct (object_type, resource_directory); #line 11 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" return self; #line 153 "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 162 "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 177 "SlideEffect.c" } static const gchar* slide_effect_descriptor_real_get_pluggable_name (ShotwellTransitionDescriptor* base) { SlideEffectDescriptor * self; const gchar* result = 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" result = _ ("Slide"); #line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" return result; #line 192 "SlideEffect.c" } static SpitTransitionsEffect* slide_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host) { SlideEffectDescriptor * self; SpitTransitionsEffect* result = NULL; SlideEffect* _tmp0_; #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 213 "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 = (const gchar* (*) (ShotwellTransitionDescriptor *)) slide_effect_descriptor_real_get_id; #line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" ((ShotwellTransitionDescriptorClass *) klass)->get_pluggable_name = (const gchar* (*) (ShotwellTransitionDescriptor *)) slide_effect_descriptor_real_get_pluggable_name; #line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" ((ShotwellTransitionDescriptorClass *) klass)->create = (SpitTransitionsEffect* (*) (ShotwellTransitionDescriptor *, SpitHostInterface*)) slide_effect_descriptor_real_create; #line 228 "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 260 "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 269 "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 291 "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 297 "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 314 "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 329 "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; GdkPixbuf* _tmp0_; GdkPixbuf* _tmp1_; GdkPixbuf* _tmp21_; GdkPixbuf* _tmp22_; #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" alpha = spit_transitions_motion_get_alpha (motion, frame_number); #line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp0_ = spit_transitions_visuals_get_from_pixbuf (visuals); #line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp1_ = _tmp0_; #line 51 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" if (_tmp1_ != NULL) { #line 364 "SlideEffect.c" gint _tmp2_ = 0; SpitTransitionsDirection _tmp3_; SpitTransitionsDirection _tmp4_; gint from_target_x = 0; gint from_current_x = 0; GdkRectangle _tmp9_ = {0}; GdkRectangle _tmp10_; gint _tmp11_; gdouble _tmp12_; gint _tmp13_; gdouble _tmp14_; GdkPixbuf* _tmp15_; GdkPixbuf* _tmp16_; gint _tmp17_; GdkRectangle _tmp18_ = {0}; GdkRectangle _tmp19_; gint _tmp20_; #line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp3_ = spit_transitions_motion_get_direction (motion); #line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp4_ = _tmp3_; #line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" if (_tmp4_ == SPIT_TRANSITIONS_DIRECTION_FORWARD) { #line 388 "SlideEffect.c" GdkPixbuf* _tmp5_; GdkPixbuf* _tmp6_; gint _tmp7_; gint _tmp8_; #line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp5_ = spit_transitions_visuals_get_from_pixbuf (visuals); #line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp6_ = _tmp5_; #line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp7_ = gdk_pixbuf_get_width (_tmp6_); #line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp8_ = _tmp7_; #line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp2_ = -_tmp8_; #line 403 "SlideEffect.c" } else { #line 53 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp2_ = width; #line 407 "SlideEffect.c" } #line 52 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" from_target_x = _tmp2_; #line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" spit_transitions_visuals_get_from_pos (visuals, &_tmp9_); #line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp10_ = _tmp9_; #line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp11_ = _tmp10_.x; #line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp12_ = alpha; #line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp13_ = from_target_x; #line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp14_ = alpha; #line 54 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" from_current_x = (gint) ((_tmp11_ * (1 - _tmp12_)) + (_tmp13_ * _tmp14_)); #line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp15_ = spit_transitions_visuals_get_from_pixbuf (visuals); #line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp16_ = _tmp15_; #line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp17_ = from_current_x; #line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" spit_transitions_visuals_get_from_pos (visuals, &_tmp18_); #line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp19_ = _tmp18_; #line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp20_ = _tmp19_.y; #line 55 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" gdk_cairo_set_source_pixbuf (ctx, _tmp16_, (gdouble) _tmp17_, (gdouble) _tmp20_); #line 56 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" cairo_paint (ctx); #line 441 "SlideEffect.c" } #line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp21_ = spit_transitions_visuals_get_to_pixbuf (visuals); #line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp22_ = _tmp21_; #line 59 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" if (_tmp22_ != NULL) { #line 449 "SlideEffect.c" gint to_target_x = 0; GdkPixbuf* _tmp23_; GdkPixbuf* _tmp24_; gint _tmp25_; gint _tmp26_; gint _tmp27_ = 0; SpitTransitionsDirection _tmp28_; SpitTransitionsDirection _tmp29_; gint from_x = 0; gint to_current_x = 0; gint _tmp34_; gdouble _tmp35_; gint _tmp36_; gdouble _tmp37_; GdkPixbuf* _tmp38_; GdkPixbuf* _tmp39_; gint _tmp40_; GdkRectangle _tmp41_ = {0}; GdkRectangle _tmp42_; gint _tmp43_; #line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp23_ = spit_transitions_visuals_get_to_pixbuf (visuals); #line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp24_ = _tmp23_; #line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp25_ = gdk_pixbuf_get_width (_tmp24_); #line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp26_ = _tmp25_; #line 60 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" to_target_x = (width - _tmp26_) / 2; #line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp28_ = spit_transitions_motion_get_direction (motion); #line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp29_ = _tmp28_; #line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" if (_tmp29_ == SPIT_TRANSITIONS_DIRECTION_FORWARD) { #line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp27_ = width; #line 488 "SlideEffect.c" } else { GdkPixbuf* _tmp30_; GdkPixbuf* _tmp31_; gint _tmp32_; gint _tmp33_; #line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp30_ = spit_transitions_visuals_get_to_pixbuf (visuals); #line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp31_ = _tmp30_; #line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp32_ = gdk_pixbuf_get_width (_tmp31_); #line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp33_ = _tmp32_; #line 62 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp27_ = -_tmp33_; #line 504 "SlideEffect.c" } #line 61 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" from_x = _tmp27_; #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp34_ = from_x; #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp35_ = alpha; #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp36_ = to_target_x; #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp37_ = alpha; #line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" to_current_x = (gint) ((_tmp34_ * (1 - _tmp35_)) + (_tmp36_ * _tmp37_)); #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp38_ = spit_transitions_visuals_get_to_pixbuf (visuals); #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp39_ = _tmp38_; #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp40_ = to_current_x; #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" spit_transitions_visuals_get_to_pos (visuals, &_tmp41_); #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp42_ = _tmp41_; #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" _tmp43_ = _tmp42_.y; #line 64 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" gdk_cairo_set_source_pixbuf (ctx, _tmp39_, (gdouble) _tmp40_, (gdouble) _tmp43_); #line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/SlideEffect.vala" cairo_paint (ctx); #line 534 "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 552 "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 562 "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 571 "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 592 "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; }