summaryrefslogtreecommitdiff
path: root/src/slideshow/Slideshow.c
blob: 63e0bda13783e3c347f4ddbae0ef10c84db6bf47 (plain)
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
/* Slideshow.c generated by valac 0.40.4, the Vala compiler
 * generated from Slideshow.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 <stdlib.h>
#include <string.h>
#include "shotwell-plugin-dev-1.0.h"
#include <glib/gi18n-lib.h>




void slideshow_init (GError** error);
static void _vala_array_add36 (gchar** * array,
                        int* length,
                        int* size,
                        gchar* value);
static void _vala_array_add37 (gchar** * array,
                        int* length,
                        int* size,
                        gchar* value);
static void _vala_array_add38 (gchar** * array,
                        int* length,
                        int* size,
                        gchar* value);
static void _vala_array_add39 (gchar** * array,
                        int* length,
                        int* size,
                        gchar* value);
static void _vala_array_add40 (gchar** * array,
                        int* length,
                        int* size,
                        gchar* value);
static void _vala_array_add41 (gchar** * array,
                        int* length,
                        int* size,
                        gchar* value);
static void _vala_array_add42 (gchar** * array,
                        int* length,
                        int* size,
                        gchar* value);
static void _vala_array_add43 (gchar** * array,
                        int* length,
                        int* size,
                        gchar* value);
static void _vala_array_add44 (gchar** * array,
                        int* length,
                        int* size,
                        gchar* value);
static void _vala_array_add45 (gchar** * array,
                        int* length,
                        int* size,
                        gchar* value);
void plugins_register_extension_point (GType type,
                                       const gchar* name,
                                       const gchar* icon_name,
                                       gchar** core_ids,
                                       int core_ids_length1);
#define RESOURCES_ICON_SLIDESHOW_EXTENSION_POINT "slideshow-extension-point"
void transition_effects_manager_init (void);
void slideshow_terminate (void);
void transition_effects_manager_terminate (void);
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_add36 (gchar** * array,
                   int* length,
                   int* size,
                   gchar* value)
{
#line 11 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	if ((*length) == (*size)) {
#line 11 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 11 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 92 "Slideshow.c"
	}
#line 11 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[(*length)++] = value;
#line 11 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[*length] = NULL;
#line 98 "Slideshow.c"
}


static void
_vala_array_add37 (gchar** * array,
                   int* length,
                   int* size,
                   gchar* value)
{
#line 12 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	if ((*length) == (*size)) {
#line 12 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 12 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 114 "Slideshow.c"
	}
#line 12 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[(*length)++] = value;
#line 12 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[*length] = NULL;
#line 120 "Slideshow.c"
}


static void
_vala_array_add38 (gchar** * array,
                   int* length,
                   int* size,
                   gchar* value)
{
#line 13 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	if ((*length) == (*size)) {
#line 13 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 13 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 136 "Slideshow.c"
	}
#line 13 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[(*length)++] = value;
#line 13 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[*length] = NULL;
#line 142 "Slideshow.c"
}


static void
_vala_array_add39 (gchar** * array,
                   int* length,
                   int* size,
                   gchar* value)
{
#line 14 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	if ((*length) == (*size)) {
#line 14 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 14 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 158 "Slideshow.c"
	}
#line 14 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[(*length)++] = value;
#line 14 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[*length] = NULL;
#line 164 "Slideshow.c"
}


static void
_vala_array_add40 (gchar** * array,
                   int* length,
                   int* size,
                   gchar* value)
{
#line 15 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	if ((*length) == (*size)) {
#line 15 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 15 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 180 "Slideshow.c"
	}
#line 15 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[(*length)++] = value;
#line 15 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[*length] = NULL;
#line 186 "Slideshow.c"
}


static void
_vala_array_add41 (gchar** * array,
                   int* length,
                   int* size,
                   gchar* value)
{
#line 16 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	if ((*length) == (*size)) {
#line 16 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 16 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 202 "Slideshow.c"
	}
#line 16 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[(*length)++] = value;
#line 16 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[*length] = NULL;
#line 208 "Slideshow.c"
}


static void
_vala_array_add42 (gchar** * array,
                   int* length,
                   int* size,
                   gchar* value)
{
#line 17 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	if ((*length) == (*size)) {
#line 17 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 17 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 224 "Slideshow.c"
	}
#line 17 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[(*length)++] = value;
#line 17 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[*length] = NULL;
#line 230 "Slideshow.c"
}


static void
_vala_array_add43 (gchar** * array,
                   int* length,
                   int* size,
                   gchar* value)
{
#line 18 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	if ((*length) == (*size)) {
#line 18 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 18 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 246 "Slideshow.c"
	}
#line 18 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[(*length)++] = value;
#line 18 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[*length] = NULL;
#line 252 "Slideshow.c"
}


static void
_vala_array_add44 (gchar** * array,
                   int* length,
                   int* size,
                   gchar* value)
{
#line 19 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	if ((*length) == (*size)) {
#line 19 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 19 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 268 "Slideshow.c"
	}
#line 19 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[(*length)++] = value;
#line 19 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[*length] = NULL;
#line 274 "Slideshow.c"
}


static void
_vala_array_add45 (gchar** * array,
                   int* length,
                   int* size,
                   gchar* value)
{
#line 20 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	if ((*length) == (*size)) {
#line 20 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 20 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 290 "Slideshow.c"
	}
#line 20 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[(*length)++] = value;
#line 20 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	(*array)[*length] = NULL;
#line 296 "Slideshow.c"
}


void
slideshow_init (GError** error)
{
	gchar** core_ids = NULL;
	gchar** _tmp0_;
	gint core_ids_length1;
	gint _core_ids_size_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	gchar* _tmp4_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gchar* _tmp6_;
	gchar** _tmp7_;
	gint _tmp7__length1;
	gchar* _tmp8_;
	gchar** _tmp9_;
	gint _tmp9__length1;
	gchar* _tmp10_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	gchar* _tmp12_;
	gchar** _tmp13_;
	gint _tmp13__length1;
	gchar* _tmp14_;
	gchar** _tmp15_;
	gint _tmp15__length1;
	gchar* _tmp16_;
	gchar** _tmp17_;
	gint _tmp17__length1;
	gchar* _tmp18_;
	gchar** _tmp19_;
	gint _tmp19__length1;
	gchar* _tmp20_;
	gchar** _tmp21_;
	gint _tmp21__length1;
#line 10 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp0_ = g_new0 (gchar*, 0 + 1);
#line 10 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	core_ids = _tmp0_;
#line 10 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	core_ids_length1 = 0;
#line 10 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_core_ids_size_ = core_ids_length1;
#line 11 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp1_ = core_ids;
#line 11 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp1__length1 = core_ids_length1;
#line 11 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp2_ = g_strdup ("org.yorba.shotwell.transitions.crumble");
#line 11 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_vala_array_add36 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp2_);
#line 12 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp3_ = core_ids;
#line 12 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp3__length1 = core_ids_length1;
#line 12 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp4_ = g_strdup ("org.yorba.shotwell.transitions.fade");
#line 12 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_vala_array_add37 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp4_);
#line 13 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp5_ = core_ids;
#line 13 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp5__length1 = core_ids_length1;
#line 13 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp6_ = g_strdup ("org.yorba.shotwell.transitions.slide");
#line 13 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_vala_array_add38 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp6_);
#line 14 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp7_ = core_ids;
#line 14 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp7__length1 = core_ids_length1;
#line 14 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp8_ = g_strdup ("org.yorba.shotwell.transitions.blinds");
#line 14 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_vala_array_add39 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp8_);
#line 15 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp9_ = core_ids;
#line 15 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp9__length1 = core_ids_length1;
#line 15 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp10_ = g_strdup ("org.yorba.shotwell.transitions.circle");
#line 15 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_vala_array_add40 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp10_);
#line 16 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp11_ = core_ids;
#line 16 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp11__length1 = core_ids_length1;
#line 16 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp12_ = g_strdup ("org.yorba.shotwell.transitions.circles");
#line 16 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_vala_array_add41 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp12_);
#line 17 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp13_ = core_ids;
#line 17 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp13__length1 = core_ids_length1;
#line 17 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp14_ = g_strdup ("org.yorba.shotwell.transitions.clock");
#line 17 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_vala_array_add42 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp14_);
#line 18 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp15_ = core_ids;
#line 18 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp15__length1 = core_ids_length1;
#line 18 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp16_ = g_strdup ("org.yorba.shotwell.transitions.stripes");
#line 18 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_vala_array_add43 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp16_);
#line 19 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp17_ = core_ids;
#line 19 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp17__length1 = core_ids_length1;
#line 19 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp18_ = g_strdup ("org.yorba.shotwell.transitions.squares");
#line 19 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_vala_array_add44 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp18_);
#line 20 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp19_ = core_ids;
#line 20 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp19__length1 = core_ids_length1;
#line 20 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp20_ = g_strdup ("org.yorba.shotwell.transitions.chess");
#line 20 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_vala_array_add45 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp20_);
#line 22 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp21_ = core_ids;
#line 22 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	_tmp21__length1 = core_ids_length1;
#line 22 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	plugins_register_extension_point (SPIT_TRANSITIONS_TYPE_DESCRIPTOR, _ ("Slideshow Transitions"), RESOURCES_ICON_SLIDESHOW_EXTENSION_POINT, _tmp21_, _tmp21__length1);
#line 24 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	transition_effects_manager_init ();
#line 9 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	core_ids = (_vala_array_free (core_ids, core_ids_length1, (GDestroyNotify) g_free), NULL);
#line 437 "Slideshow.c"
}


void
slideshow_terminate (void)
{
#line 28 "/home/jens/Source/shotwell/src/slideshow/Slideshow.vala"
	transition_effects_manager_terminate ();
#line 446 "Slideshow.c"
}


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);
}