/* Slideshow.c generated by valac 0.56.19, 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 <stdlib.h>
#include <string.h>
#include <glib-object.h>
#include "shotwell-plugin-dev-1.0.h"
#include <glib/gi18n-lib.h>

#define RESOURCES_ICON_SLIDESHOW_EXTENSION_POINT "slideshow-extension-point"
#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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

VALA_EXTERN void slideshow_init (GError** error);
static void _vala_array_add34 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add35 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add36 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add37 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add38 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add39 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add40 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add41 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add42 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add43 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
VALA_EXTERN void plugins_register_extension_point (GType type,
                                       const gchar* name,
                                       const gchar* icon_name,
                                       gchar** core_ids,
                                       gint core_ids_length1);
VALA_EXTERN void transition_effects_manager_init (void);
VALA_EXTERN void slideshow_terminate (void);
VALA_EXTERN void transition_effects_manager_terminate (void);
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 void
_vala_array_add34 (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_add35 (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_add36 (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_add37 (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_add38 (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_add39 (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_add40 (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_add41 (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_add42 (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_add43 (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 ("org.gnome.shotwell.transitions.crumble");
	_vala_array_add34 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp1_);
	_tmp2_ = g_strdup ("org.gnome.shotwell.transitions.fade");
	_vala_array_add35 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp2_);
	_tmp3_ = g_strdup ("org.gnome.shotwell.transitions.slide");
	_vala_array_add36 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp3_);
	_tmp4_ = g_strdup ("org.gnome.shotwell.transitions.blinds");
	_vala_array_add37 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp4_);
	_tmp5_ = g_strdup ("org.gnome.shotwell.transitions.circle");
	_vala_array_add38 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp5_);
	_tmp6_ = g_strdup ("org.gnome.shotwell.transitions.circles");
	_vala_array_add39 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp6_);
	_tmp7_ = g_strdup ("org.gnome.shotwell.transitions.clock");
	_vala_array_add40 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp7_);
	_tmp8_ = g_strdup ("org.gnome.shotwell.transitions.stripes");
	_vala_array_add41 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp8_);
	_tmp9_ = g_strdup ("org.gnome.shotwell.transitions.squares");
	_vala_array_add42 (&core_ids, &core_ids_length1, &_core_ids_size_, _tmp9_);
	_tmp10_ = g_strdup ("org.gnome.shotwell.transitions.chess");
	_vala_array_add43 (&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);
}

