/* Slideshow.c generated by valac 0.56.19, the Vala compiler
 * generated from Slideshow.vala, do not modify */

/*
* Copyright (c) 2011-2013 Yorba Foundation
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/

#include "io.elementary.photos.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib-object.h>
#include <glib/gi18n-lib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

static void _vala_array_add101 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add102 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add103 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add104 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add105 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add106 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add107 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add108 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add109 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add110 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static void
_vala_array_add101 (gchar** * array,
                    gint* length,
                    gint* size,
                    gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add102 (gchar** * array,
                    gint* length,
                    gint* size,
                    gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add103 (gchar** * array,
                    gint* length,
                    gint* size,
                    gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add104 (gchar** * array,
                    gint* length,
                    gint* size,
                    gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add105 (gchar** * array,
                    gint* length,
                    gint* size,
                    gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add106 (gchar** * array,
                    gint* length,
                    gint* size,
                    gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add107 (gchar** * array,
                    gint* length,
                    gint* size,
                    gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add108 (gchar** * array,
                    gint* length,
                    gint* size,
                    gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add109 (gchar** * array,
                    gint* length,
                    gint* size,
                    gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add110 (gchar** * array,
                    gint* length,
                    gint* size,
                    gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

void
slideshow_init (GError** error)
{
	gchar** core_ids = NULL;
	gchar** _tmp0_;
	gint core_ids_length1;
	gint _core_ids_size_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	core_ids = _tmp0_;
	core_ids_length1 = 0;
	_core_ids_size_ = core_ids_length1;
	_tmp1_ = g_strdup ("io.elementary.photos.transitions.crumble");
	_vala_array_add101 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp1_);
	_tmp2_ = g_strdup ("io.elementary.photos.transitions.fade");
	_vala_array_add102 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp2_);
	_tmp3_ = g_strdup ("io.elementary.photos.transitions.slide");
	_vala_array_add103 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp3_);
	_tmp4_ = g_strdup ("io.elementary.photos.transitions.blinds");
	_vala_array_add104 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp4_);
	_tmp5_ = g_strdup ("io.elementary.photos.transitions.circle");
	_vala_array_add105 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp5_);
	_tmp6_ = g_strdup ("io.elementary.photos.transitions.circles");
	_vala_array_add106 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp6_);
	_tmp7_ = g_strdup ("io.elementary.photos.transitions.clock");
	_vala_array_add107 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp7_);
	_tmp8_ = g_strdup ("io.elementary.photos.transitions.stripes");
	_vala_array_add108 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp8_);
	_tmp9_ = g_strdup ("io.elementary.photos.transitions.squares");
	_vala_array_add109 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp9_);
	_tmp10_ = g_strdup ("io.elementary.photos.transitions.chess");
	_vala_array_add110 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp10_);
	_tmp11_ = core_ids;
	_tmp11__length1 = core_ids_length1;
	plugins_register_extension_point (SPIT_TRANSITIONS_TYPE_DESCRIPTOR, _ ("Slideshow Transitions"), RESOURCES_ICON_SLIDESHOW_EXTENSION_POINT, _tmp11_, (gint) _tmp11__length1);
	transition_effects_manager_init ();
	core_ids = (_vala_array_free (core_ids, core_ids_length1, (GDestroyNotify) g_free), NULL);
}

void
slideshow_terminate (void)
{
	transition_effects_manager_terminate ();
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize 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,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

