1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
|
/* CirclesEffect.c generated by valac 0.36.6, 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_;
#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;
#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"
result = _ ("Circles");
#line 20 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
return result;
#line 165 "CirclesEffect.c"
}
static SpitTransitionsEffect* circles_effect_descriptor_real_create (ShotwellTransitionDescriptor* base, SpitHostInterface* host) {
CirclesEffectDescriptor * self;
SpitTransitionsEffect* result = NULL;
CirclesEffect* _tmp0_;
#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 183 "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 = (const gchar* (*) (ShotwellTransitionDescriptor *)) circles_effect_descriptor_real_get_id;
#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
((ShotwellTransitionDescriptorClass *) klass)->get_pluggable_name = (const gchar* (*) (ShotwellTransitionDescriptor *)) circles_effect_descriptor_real_get_pluggable_name;
#line 10 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
((ShotwellTransitionDescriptorClass *) klass)->create = (SpitTransitionsEffect* (*) (ShotwellTransitionDescriptor *, SpitHostInterface*)) circles_effect_descriptor_real_create;
#line 196 "CirclesEffect.c"
}
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 222 "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 229 "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 247 "CirclesEffect.c"
}
#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
if (min_fps) {
#line 36 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
*min_fps = _vala_min_fps;
#line 253 "CirclesEffect.c"
}
}
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 266 "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 279 "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_;
gint _tmp1_;
gdouble _tmp2_;
gint distance = 0;
gint radius = 0;
gint circleCountX = 0;
gint _tmp3_;
gint _tmp4_;
gint circleCountY = 0;
gint _tmp5_;
gint _tmp6_;
gdouble maxRadius = 0.0;
gint _tmp7_;
SpitTransitionsVisuals* _tmp8_;
GdkPixbuf* _tmp9_;
GdkPixbuf* _tmp10_;
SpitTransitionsVisuals* _tmp25_;
GdkPixbuf* _tmp26_;
GdkPixbuf* _tmp27_;
#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 347 "CirclesEffect.c"
cairo_t* _tmp11_;
SpitTransitionsVisuals* _tmp12_;
GdkPixbuf* _tmp13_;
GdkPixbuf* _tmp14_;
SpitTransitionsVisuals* _tmp15_;
GdkRectangle _tmp16_ = {0};
GdkRectangle _tmp17_;
gint _tmp18_;
SpitTransitionsVisuals* _tmp19_;
GdkRectangle _tmp20_ = {0};
GdkRectangle _tmp21_;
gint _tmp22_;
cairo_t* _tmp23_;
gdouble _tmp24_;
#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 394 "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 404 "CirclesEffect.c"
cairo_t* _tmp28_;
SpitTransitionsVisuals* _tmp29_;
GdkPixbuf* _tmp30_;
GdkPixbuf* _tmp31_;
SpitTransitionsVisuals* _tmp32_;
GdkRectangle _tmp33_ = {0};
GdkRectangle _tmp34_;
gint _tmp35_;
SpitTransitionsVisuals* _tmp36_;
GdkRectangle _tmp37_ = {0};
GdkRectangle _tmp38_;
gint _tmp39_;
cairo_t* _tmp63_;
cairo_t* _tmp64_;
gdouble _tmp65_;
#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
_tmp28_ = ctx;
#line 63 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
_tmp29_ = visuals;
#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 446 "CirclesEffect.c"
{
gint y = 0;
#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
y = 0;
#line 451 "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 458 "CirclesEffect.c"
gint _tmp42_;
gint _tmp43_;
#line 65 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
if (!_tmp40_) {
#line 463 "CirclesEffect.c"
gint _tmp41_;
#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 469 "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 481 "CirclesEffect.c"
}
{
gint x = 0;
#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
x = 0;
#line 487 "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 494 "CirclesEffect.c"
gint _tmp46_;
gint _tmp47_;
gdouble _tmp48_;
gint _tmp49_;
gint _tmp50_;
gint _tmp51_;
gint _tmp52_;
gdouble _tmp53_;
gdouble _tmp54_;
gdouble _tmp55_;
cairo_t* _tmp56_;
gint _tmp57_;
gint _tmp58_;
gint _tmp59_;
gint _tmp60_;
gint _tmp61_;
cairo_t* _tmp62_;
#line 66 "/home/jens/Source/shotwell/plugins/shotwell-transitions/CirclesEffect.vala"
if (!_tmp44_) {
#line 514 "CirclesEffect.c"
gint _tmp45_;
#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 520 "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 532 "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 570 "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 587 "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 600 "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 608 "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 615 "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 634 "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;
}
|