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

#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib.h>
#include <string.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
#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

#define PDFPC_TYPE_CONTROLLABLE (pdfpc_controllable_get_type ())
#define PDFPC_CONTROLLABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_TYPE_CONTROLLABLE, pdfpcControllable))
#define PDFPC_IS_CONTROLLABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_TYPE_CONTROLLABLE))
#define PDFPC_CONTROLLABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), PDFPC_TYPE_CONTROLLABLE, pdfpcControllableIface))

typedef struct _pdfpcControllable pdfpcControllable;
typedef struct _pdfpcControllableIface pdfpcControllableIface;

#define PDFPC_TYPE_PRESENTATION_CONTROLLER (pdfpc_presentation_controller_get_type ())
#define PDFPC_PRESENTATION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_TYPE_PRESENTATION_CONTROLLER, pdfpcPresentationController))
#define PDFPC_PRESENTATION_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_TYPE_PRESENTATION_CONTROLLER, pdfpcPresentationControllerClass))
#define PDFPC_IS_PRESENTATION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_TYPE_PRESENTATION_CONTROLLER))
#define PDFPC_IS_PRESENTATION_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_TYPE_PRESENTATION_CONTROLLER))
#define PDFPC_PRESENTATION_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_TYPE_PRESENTATION_CONTROLLER, pdfpcPresentationControllerClass))

typedef struct _pdfpcPresentationController pdfpcPresentationController;
typedef struct _pdfpcPresentationControllerClass pdfpcPresentationControllerClass;

#define PDFPC_VIEW_TYPE_PDF (pdfpc_view_pdf_get_type ())
#define PDFPC_VIEW_PDF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_VIEW_TYPE_PDF, pdfpcViewPdf))
#define PDFPC_VIEW_PDF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_VIEW_TYPE_PDF, pdfpcViewPdfClass))
#define PDFPC_VIEW_IS_PDF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_VIEW_TYPE_PDF))
#define PDFPC_VIEW_IS_PDF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_VIEW_TYPE_PDF))
#define PDFPC_VIEW_PDF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_VIEW_TYPE_PDF, pdfpcViewPdfClass))

typedef struct _pdfpcViewPdf pdfpcViewPdf;
typedef struct _pdfpcViewPdfClass pdfpcViewPdfClass;

struct _pdfpcControllableIface {
	GTypeInterface parent_iface;
	pdfpcPresentationController* (*get_controller) (pdfpcControllable* self);
	void (*set_controller) (pdfpcControllable* self, pdfpcPresentationController* value);
	pdfpcViewPdf* (*get_main_view) (pdfpcControllable* self);
	void (*set_main_view) (pdfpcControllable* self, pdfpcViewPdf* value);
};

VALA_EXTERN GType pdfpc_presentation_controller_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcPresentationController, g_object_unref)
VALA_EXTERN GType pdfpc_view_pdf_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcViewPdf, g_object_unref)
VALA_EXTERN GType pdfpc_controllable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcControllable, g_object_unref)
VALA_EXTERN pdfpcPresentationController* pdfpc_controllable_get_controller (pdfpcControllable* self);
VALA_EXTERN void pdfpc_controllable_set_controller (pdfpcControllable* self,
                                        pdfpcPresentationController* value);
VALA_EXTERN pdfpcViewPdf* pdfpc_controllable_get_main_view (pdfpcControllable* self);
VALA_EXTERN void pdfpc_controllable_set_main_view (pdfpcControllable* self,
                                       pdfpcViewPdf* value);
static GType pdfpc_controllable_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

pdfpcPresentationController*
pdfpc_controllable_get_controller (pdfpcControllable* self)
{
	pdfpcControllableIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = PDFPC_CONTROLLABLE_GET_INTERFACE (self);
	if (_iface_->get_controller) {
		return _iface_->get_controller (self);
	}
	return NULL;
}

void
pdfpc_controllable_set_controller (pdfpcControllable* self,
                                   pdfpcPresentationController* value)
{
	pdfpcControllableIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = PDFPC_CONTROLLABLE_GET_INTERFACE (self);
	if (_iface_->set_controller) {
		_iface_->set_controller (self, value);
	}
}

pdfpcViewPdf*
pdfpc_controllable_get_main_view (pdfpcControllable* self)
{
	pdfpcControllableIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = PDFPC_CONTROLLABLE_GET_INTERFACE (self);
	if (_iface_->get_main_view) {
		return _iface_->get_main_view (self);
	}
	return NULL;
}

void
pdfpc_controllable_set_main_view (pdfpcControllable* self,
                                  pdfpcViewPdf* value)
{
	pdfpcControllableIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = PDFPC_CONTROLLABLE_GET_INTERFACE (self);
	if (_iface_->set_main_view) {
		_iface_->set_main_view (self, value);
	}
}

static void
pdfpc_controllable_default_init (pdfpcControllableIface * iface,
                                 gpointer iface_data)
{
	/**
	         * The registered PresentationController
	         */
	g_object_interface_install_property (iface, g_param_spec_object ("controller", "controller", "controller", PDFPC_TYPE_PRESENTATION_CONTROLLER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	         * The view on which links and annotations should be handled.
	         */
	g_object_interface_install_property (iface, g_param_spec_object ("main-view", "main-view", "main-view", PDFPC_VIEW_TYPE_PDF, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

/**
     * Every window or object which wants to be controlled by the
     * PresentationController needs to implement this interface.
     */
static GType
pdfpc_controllable_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (pdfpcControllableIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pdfpc_controllable_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType pdfpc_controllable_type_id;
	pdfpc_controllable_type_id = g_type_register_static (G_TYPE_INTERFACE, "pdfpcControllable", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (pdfpc_controllable_type_id, G_TYPE_OBJECT);
	return pdfpc_controllable_type_id;
}

GType
pdfpc_controllable_get_type (void)
{
	static volatile gsize pdfpc_controllable_type_id__once = 0;
	if (g_once_init_enter (&pdfpc_controllable_type_id__once)) {
		GType pdfpc_controllable_type_id;
		pdfpc_controllable_type_id = pdfpc_controllable_get_type_once ();
		g_once_init_leave (&pdfpc_controllable_type_id__once, pdfpc_controllable_type_id);
	}
	return pdfpc_controllable_type_id__once;
}

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

