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

#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gee.h>
#include <float.h>
#include <math.h>
#include <gtk/gtk.h>
#include <libsoup/soup.h>
#include <gdk/gdk.h>
#include <poppler.h>
#include <gobject/gvaluecollector.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 TYPE_SCREEN_SAVER (screen_saver_get_type ())
#define SCREEN_SAVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCREEN_SAVER, ScreenSaver))
#define IS_SCREEN_SAVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCREEN_SAVER))
#define SCREEN_SAVER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_SCREEN_SAVER, ScreenSaverIface))

typedef struct _ScreenSaver ScreenSaver;
typedef struct _ScreenSaverIface ScreenSaverIface;

#define TYPE_SCREEN_SAVER_PROXY (screen_saver_proxy_get_type ())
typedef GDBusProxy ScreenSaverProxy;
typedef GDBusProxyClass ScreenSaverProxyClass;
typedef struct _ScreenSaverInhibitReadyData ScreenSaverInhibitReadyData;
#define _g_free0(var) (var = (g_free (var), NULL))

#define PDFPC_TYPE_KEY_DEF (pdfpc_key_def_get_type ())
#define PDFPC_KEY_DEF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_TYPE_KEY_DEF, pdfpcKeyDef))
#define PDFPC_KEY_DEF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_TYPE_KEY_DEF, pdfpcKeyDefClass))
#define PDFPC_IS_KEY_DEF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_TYPE_KEY_DEF))
#define PDFPC_IS_KEY_DEF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_TYPE_KEY_DEF))
#define PDFPC_KEY_DEF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_TYPE_KEY_DEF, pdfpcKeyDefClass))

typedef struct _pdfpcKeyDef pdfpcKeyDef;
typedef struct _pdfpcKeyDefClass pdfpcKeyDefClass;
typedef struct _pdfpcKeyDefPrivate pdfpcKeyDefPrivate;
enum  {
	PDFPC_KEY_DEF_0_PROPERTY,
	PDFPC_KEY_DEF_KEYCODE_PROPERTY,
	PDFPC_KEY_DEF_MOD_MASK_PROPERTY,
	PDFPC_KEY_DEF_NUM_PROPERTIES
};
static GParamSpec* pdfpc_key_def_properties[PDFPC_KEY_DEF_NUM_PROPERTIES];

#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;
typedef struct _pdfpcPresentationControllerPrivate pdfpcPresentationControllerPrivate;

#define PDFPC_PRESENTATION_CONTROLLER_TYPE_SCALED_RECTANGLE (pdfpc_presentation_controller_scaled_rectangle_get_type ())
typedef struct _pdfpcPresentationControllerScaledRectangle pdfpcPresentationControllerScaledRectangle;

#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_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;

#define PDFPC_TYPE_TIMER (pdfpc_timer_get_type ())
#define PDFPC_TIMER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_TYPE_TIMER, pdfpcTimer))
#define PDFPC_TIMER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_TYPE_TIMER, pdfpcTimerClass))
#define PDFPC_IS_TIMER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_TYPE_TIMER))
#define PDFPC_IS_TIMER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_TYPE_TIMER))
#define PDFPC_TIMER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_TYPE_TIMER, pdfpcTimerClass))

typedef struct _pdfpcTimer pdfpcTimer;
typedef struct _pdfpcTimerClass pdfpcTimerClass;

#define PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_DESCRIPTION (pdfpc_presentation_controller_action_description_get_type ())
#define PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_DESCRIPTION, pdfpcPresentationControllerActionDescription))
#define PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_DESCRIPTION, pdfpcPresentationControllerActionDescriptionClass))
#define PDFPC_PRESENTATION_CONTROLLER_IS_ACTION_DESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_DESCRIPTION))
#define PDFPC_PRESENTATION_CONTROLLER_IS_ACTION_DESCRIPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_DESCRIPTION))
#define PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_DESCRIPTION, pdfpcPresentationControllerActionDescriptionClass))

typedef struct _pdfpcPresentationControllerActionDescription pdfpcPresentationControllerActionDescription;
typedef struct _pdfpcPresentationControllerActionDescriptionClass pdfpcPresentationControllerActionDescriptionClass;

#define PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_AND_PARAMETER (pdfpc_presentation_controller_action_and_parameter_get_type ())
#define PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_AND_PARAMETER, pdfpcPresentationControllerActionAndParameter))
#define PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_AND_PARAMETER, pdfpcPresentationControllerActionAndParameterClass))
#define PDFPC_PRESENTATION_CONTROLLER_IS_ACTION_AND_PARAMETER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_AND_PARAMETER))
#define PDFPC_PRESENTATION_CONTROLLER_IS_ACTION_AND_PARAMETER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_AND_PARAMETER))
#define PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_AND_PARAMETER, pdfpcPresentationControllerActionAndParameterClass))

typedef struct _pdfpcPresentationControllerActionAndParameter pdfpcPresentationControllerActionAndParameter;
typedef struct _pdfpcPresentationControllerActionAndParameterClass pdfpcPresentationControllerActionAndParameterClass;

#define PDFPC_PRESENTATION_CONTROLLER_TYPE_POINTER_TOOL (pdfpc_presentation_controller_pointer_tool_get_type ())
#define PDFPC_PRESENTATION_CONTROLLER_POINTER_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_PRESENTATION_CONTROLLER_TYPE_POINTER_TOOL, pdfpcPresentationControllerPointerTool))
#define PDFPC_PRESENTATION_CONTROLLER_POINTER_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_PRESENTATION_CONTROLLER_TYPE_POINTER_TOOL, pdfpcPresentationControllerPointerToolClass))
#define PDFPC_PRESENTATION_CONTROLLER_IS_POINTER_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_PRESENTATION_CONTROLLER_TYPE_POINTER_TOOL))
#define PDFPC_PRESENTATION_CONTROLLER_IS_POINTER_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_PRESENTATION_CONTROLLER_TYPE_POINTER_TOOL))
#define PDFPC_PRESENTATION_CONTROLLER_POINTER_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_PRESENTATION_CONTROLLER_TYPE_POINTER_TOOL, pdfpcPresentationControllerPointerToolClass))

typedef struct _pdfpcPresentationControllerPointerTool pdfpcPresentationControllerPointerTool;
typedef struct _pdfpcPresentationControllerPointerToolClass pdfpcPresentationControllerPointerToolClass;

#define PDFPC_DRAWINGS_TYPE_DRAWING (pdfpc_drawings_drawing_get_type ())
#define PDFPC_DRAWINGS_DRAWING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_DRAWINGS_TYPE_DRAWING, pdfpcDrawingsDrawing))
#define PDFPC_DRAWINGS_DRAWING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_DRAWINGS_TYPE_DRAWING, pdfpcDrawingsDrawingClass))
#define PDFPC_DRAWINGS_IS_DRAWING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_DRAWINGS_TYPE_DRAWING))
#define PDFPC_DRAWINGS_IS_DRAWING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_DRAWINGS_TYPE_DRAWING))
#define PDFPC_DRAWINGS_DRAWING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_DRAWINGS_TYPE_DRAWING, pdfpcDrawingsDrawingClass))

typedef struct _pdfpcDrawingsDrawing pdfpcDrawingsDrawing;
typedef struct _pdfpcDrawingsDrawingClass pdfpcDrawingsDrawingClass;

#define PDFPC_DRAWINGS_TYPE_DRAWING_TOOL (pdfpc_drawings_drawing_tool_get_type ())
#define PDFPC_DRAWINGS_DRAWING_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_DRAWINGS_TYPE_DRAWING_TOOL, pdfpcDrawingsDrawingTool))
#define PDFPC_DRAWINGS_DRAWING_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_DRAWINGS_TYPE_DRAWING_TOOL, pdfpcDrawingsDrawingToolClass))
#define PDFPC_DRAWINGS_IS_DRAWING_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_DRAWINGS_TYPE_DRAWING_TOOL))
#define PDFPC_DRAWINGS_IS_DRAWING_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_DRAWINGS_TYPE_DRAWING_TOOL))
#define PDFPC_DRAWINGS_DRAWING_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_DRAWINGS_TYPE_DRAWING_TOOL, pdfpcDrawingsDrawingToolClass))

typedef struct _pdfpcDrawingsDrawingTool pdfpcDrawingsDrawingTool;
typedef struct _pdfpcDrawingsDrawingToolClass pdfpcDrawingsDrawingToolClass;
typedef enum  {
	PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_PreTalk,
	PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Normal,
	PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Slow,
	PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Fast,
	PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_LastMinutes,
	PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Overtime
} pdfpcPresentationControllerProgressStatus;

#define PDFPC_PRESENTATION_CONTROLLER_TYPE_PROGRESS_STATUS (pdfpc_presentation_controller_progress_status_get_type ())

#define PDFPC_WINDOW_TYPE_FULLSCREEN (pdfpc_window_fullscreen_get_type ())
#define PDFPC_WINDOW_FULLSCREEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_WINDOW_TYPE_FULLSCREEN, pdfpcWindowFullscreen))
#define PDFPC_WINDOW_FULLSCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_WINDOW_TYPE_FULLSCREEN, pdfpcWindowFullscreenClass))
#define PDFPC_WINDOW_IS_FULLSCREEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_WINDOW_TYPE_FULLSCREEN))
#define PDFPC_WINDOW_IS_FULLSCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_WINDOW_TYPE_FULLSCREEN))
#define PDFPC_WINDOW_FULLSCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_WINDOW_TYPE_FULLSCREEN, pdfpcWindowFullscreenClass))

typedef struct _pdfpcWindowFullscreen pdfpcWindowFullscreen;
typedef struct _pdfpcWindowFullscreenClass pdfpcWindowFullscreenClass;

#define PDFPC_WINDOW_TYPE_CONTROLLABLE_WINDOW (pdfpc_window_controllable_window_get_type ())
#define PDFPC_WINDOW_CONTROLLABLE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_WINDOW_TYPE_CONTROLLABLE_WINDOW, pdfpcWindowControllableWindow))
#define PDFPC_WINDOW_CONTROLLABLE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_WINDOW_TYPE_CONTROLLABLE_WINDOW, pdfpcWindowControllableWindowClass))
#define PDFPC_WINDOW_IS_CONTROLLABLE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_WINDOW_TYPE_CONTROLLABLE_WINDOW))
#define PDFPC_WINDOW_IS_CONTROLLABLE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_WINDOW_TYPE_CONTROLLABLE_WINDOW))
#define PDFPC_WINDOW_CONTROLLABLE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_WINDOW_TYPE_CONTROLLABLE_WINDOW, pdfpcWindowControllableWindowClass))

typedef struct _pdfpcWindowControllableWindow pdfpcWindowControllableWindow;
typedef struct _pdfpcWindowControllableWindowClass pdfpcWindowControllableWindowClass;

#define PDFPC_WINDOW_TYPE_PRESENTER (pdfpc_window_presenter_get_type ())
#define PDFPC_WINDOW_PRESENTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_WINDOW_TYPE_PRESENTER, pdfpcWindowPresenter))
#define PDFPC_WINDOW_PRESENTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_WINDOW_TYPE_PRESENTER, pdfpcWindowPresenterClass))
#define PDFPC_WINDOW_IS_PRESENTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_WINDOW_TYPE_PRESENTER))
#define PDFPC_WINDOW_IS_PRESENTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_WINDOW_TYPE_PRESENTER))
#define PDFPC_WINDOW_PRESENTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_WINDOW_TYPE_PRESENTER, pdfpcWindowPresenterClass))

typedef struct _pdfpcWindowPresenter pdfpcWindowPresenter;
typedef struct _pdfpcWindowPresenterClass pdfpcWindowPresenterClass;

#define PDFPC_WINDOW_TYPE_PRESENTATION (pdfpc_window_presentation_get_type ())
#define PDFPC_WINDOW_PRESENTATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_WINDOW_TYPE_PRESENTATION, pdfpcWindowPresentation))
#define PDFPC_WINDOW_PRESENTATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_WINDOW_TYPE_PRESENTATION, pdfpcWindowPresentationClass))
#define PDFPC_WINDOW_IS_PRESENTATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_WINDOW_TYPE_PRESENTATION))
#define PDFPC_WINDOW_IS_PRESENTATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_WINDOW_TYPE_PRESENTATION))
#define PDFPC_WINDOW_PRESENTATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_WINDOW_TYPE_PRESENTATION, pdfpcWindowPresentationClass))

typedef struct _pdfpcWindowPresentation pdfpcWindowPresentation;
typedef struct _pdfpcWindowPresentationClass pdfpcWindowPresentationClass;

#define PDFPC_TYPE_REST_SERVER (pdfpc_rest_server_get_type ())
#define PDFPC_REST_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_TYPE_REST_SERVER, pdfpcRestServer))
#define PDFPC_REST_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_TYPE_REST_SERVER, pdfpcRestServerClass))
#define PDFPC_IS_REST_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_TYPE_REST_SERVER))
#define PDFPC_IS_REST_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_TYPE_REST_SERVER))
#define PDFPC_REST_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_TYPE_REST_SERVER, pdfpcRestServerClass))

typedef struct _pdfpcRestServer pdfpcRestServer;
typedef struct _pdfpcRestServerClass pdfpcRestServerClass;

#define PDFPC_METADATA_TYPE_PDF (pdfpc_metadata_pdf_get_type ())
#define PDFPC_METADATA_PDF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_METADATA_TYPE_PDF, pdfpcMetadataPdf))
#define PDFPC_METADATA_PDF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_METADATA_TYPE_PDF, pdfpcMetadataPdfClass))
#define PDFPC_METADATA_IS_PDF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_METADATA_TYPE_PDF))
#define PDFPC_METADATA_IS_PDF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_METADATA_TYPE_PDF))
#define PDFPC_METADATA_PDF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_METADATA_TYPE_PDF, pdfpcMetadataPdfClass))

typedef struct _pdfpcMetadataPdf pdfpcMetadataPdf;
typedef struct _pdfpcMetadataPdfClass pdfpcMetadataPdfClass;

#define PDFPC_WINDOW_TYPE_OVERVIEW (pdfpc_window_overview_get_type ())
#define PDFPC_WINDOW_OVERVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_WINDOW_TYPE_OVERVIEW, pdfpcWindowOverview))
#define PDFPC_WINDOW_OVERVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_WINDOW_TYPE_OVERVIEW, pdfpcWindowOverviewClass))
#define PDFPC_WINDOW_IS_OVERVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_WINDOW_TYPE_OVERVIEW))
#define PDFPC_WINDOW_IS_OVERVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_WINDOW_TYPE_OVERVIEW))
#define PDFPC_WINDOW_OVERVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_WINDOW_TYPE_OVERVIEW, pdfpcWindowOverviewClass))

typedef struct _pdfpcWindowOverview pdfpcWindowOverview;
typedef struct _pdfpcWindowOverviewClass pdfpcWindowOverviewClass;
typedef enum  {
	PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_NORMAL,
	PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_POINTER,
	PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_SPOTLIGHT,
	PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_PEN,
	PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_ERASER
} pdfpcPresentationControllerAnnotationMode;

#define PDFPC_PRESENTATION_CONTROLLER_TYPE_ANNOTATION_MODE (pdfpc_presentation_controller_annotation_mode_get_type ())
enum  {
	PDFPC_PRESENTATION_CONTROLLER_0_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_CURRENT_SLIDE_NUMBER_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_CURRENT_USER_SLIDE_NUMBER_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_FADED_TO_BLACK_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_HIDDEN_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_FROZEN_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_IN_ZOOM_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_IN_CUSTOMIZATION_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_N_SLIDES_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_USER_N_SLIDES_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_PRESENTER_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_PRESENTATION_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_IGNORE_KEYBOARD_EVENTS_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_IGNORE_MOUSE_EVENTS_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_REST_SERVER_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_METADATA_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_OVERVIEW_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_OVERVIEW_SHOWN_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_CURRENT_POINTER_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_NUM_PROPERTIES
};
static GParamSpec* pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _pdfpc_presentation_controller_pointer_tool_unref0(var) ((var == NULL) ? NULL : (var = (pdfpc_presentation_controller_pointer_tool_unref (var), NULL)))
#define _pdfpc_drawings_drawing_tool_unref0(var) ((var == NULL) ? NULL : (var = (pdfpc_drawings_drawing_tool_unref (var), NULL)))
typedef struct _Block5Data Block5Data;
typedef enum  {
	PDFPC_TIMER_STATE_Stopped,
	PDFPC_TIMER_STATE_PreTalk,
	PDFPC_TIMER_STATE_Running,
	PDFPC_TIMER_STATE_Paused
} pdfpcTimerState;

#define PDFPC_TIMER_TYPE_STATE (pdfpc_timer_state_get_type ())
typedef enum  {
	PDFPC_TIMER_MODE_Clock,
	PDFPC_TIMER_MODE_CountUp,
	PDFPC_TIMER_MODE_CountDown
} pdfpcTimerMode;

#define PDFPC_TIMER_TYPE_MODE (pdfpc_timer_mode_get_type ())
typedef struct _pdfpcPresentationControllerPointerToolPrivate pdfpcPresentationControllerPointerToolPrivate;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef void (*pdfpcPresentationControllercallback) (gpointer user_data);
typedef void (*pdfpcPresentationControllercallback_with_parameter) (GVariant* parameter, gpointer user_data);
typedef struct _Block6Data Block6Data;
typedef struct _Block7Data Block7Data;
#define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))

#define PDFPC_OPTIONS_TYPE_BIND_TUPLE (pdfpc_options_bind_tuple_get_type ())
#define PDFPC_OPTIONS_BIND_TUPLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_OPTIONS_TYPE_BIND_TUPLE, pdfpcOptionsBindTuple))
#define PDFPC_OPTIONS_BIND_TUPLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_OPTIONS_TYPE_BIND_TUPLE, pdfpcOptionsBindTupleClass))
#define PDFPC_OPTIONS_IS_BIND_TUPLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_OPTIONS_TYPE_BIND_TUPLE))
#define PDFPC_OPTIONS_IS_BIND_TUPLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_OPTIONS_TYPE_BIND_TUPLE))
#define PDFPC_OPTIONS_BIND_TUPLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_OPTIONS_TYPE_BIND_TUPLE, pdfpcOptionsBindTupleClass))

typedef struct _pdfpcOptionsBindTuple pdfpcOptionsBindTuple;
typedef struct _pdfpcOptionsBindTupleClass pdfpcOptionsBindTupleClass;
typedef struct _pdfpcOptionsBindTuplePrivate pdfpcOptionsBindTuplePrivate;
#define _pdfpc_options_bind_tuple_unref0(var) ((var == NULL) ? NULL : (var = (pdfpc_options_bind_tuple_unref (var), NULL)))

#define PDFPC_RENDERER_TYPE_PDF (pdfpc_renderer_pdf_get_type ())
#define PDFPC_RENDERER_PDF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_RENDERER_TYPE_PDF, pdfpcRendererPdf))
#define PDFPC_RENDERER_PDF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_RENDERER_TYPE_PDF, pdfpcRendererPdfClass))
#define PDFPC_RENDERER_IS_PDF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_RENDERER_TYPE_PDF))
#define PDFPC_RENDERER_IS_PDF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_RENDERER_TYPE_PDF))
#define PDFPC_RENDERER_PDF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_RENDERER_TYPE_PDF, pdfpcRendererPdfClass))

typedef struct _pdfpcRendererPdf pdfpcRendererPdf;
typedef struct _pdfpcRendererPdfClass pdfpcRendererPdfClass;
typedef struct _pdfpcMetadataPdfPrivate pdfpcMetadataPdfPrivate;
typedef enum  {
	PDFPC_METADATA_NOTES_POSITION_NONE,
	PDFPC_METADATA_NOTES_POSITION_TOP,
	PDFPC_METADATA_NOTES_POSITION_BOTTOM,
	PDFPC_METADATA_NOTES_POSITION_RIGHT,
	PDFPC_METADATA_NOTES_POSITION_LEFT
} pdfpcMetadataNotesPosition;

#define PDFPC_METADATA_TYPE_NOTES_POSITION (pdfpc_metadata_notes_position_get_type ())
typedef struct _pdfpcPresentationControllerActionDescriptionPrivate pdfpcPresentationControllerActionDescriptionPrivate;
enum  {
	PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_0_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_NAME_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_DESCRIPTION_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_ARG_NAME_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_BINDINGS_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_NUM_PROPERTIES
};
static GParamSpec* pdfpc_presentation_controller_action_description_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_NUM_PROPERTIES];
typedef struct _pdfpcPresentationControllerActionAndParameterPrivate pdfpcPresentationControllerActionAndParameterPrivate;
enum  {
	PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_0_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_ACTION_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_PARAMETER_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_NAME_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_NUM_PROPERTIES
};
static GParamSpec* pdfpc_presentation_controller_action_and_parameter_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_NUM_PROPERTIES];
typedef struct _pdfpcPresentationControllerParamSpecPointerTool pdfpcPresentationControllerParamSpecPointerTool;
enum  {
	PDFPC_PRESENTATION_CONTROLLER_RELOAD_REQUEST_SIGNAL,
	PDFPC_PRESENTATION_CONTROLLER_UPDATE_REQUEST_SIGNAL,
	PDFPC_PRESENTATION_CONTROLLER_EDIT_NOTE_REQUEST_SIGNAL,
	PDFPC_PRESENTATION_CONTROLLER_ASK_GOTO_PAGE_REQUEST_SIGNAL,
	PDFPC_PRESENTATION_CONTROLLER_SHOW_OVERVIEW_REQUEST_SIGNAL,
	PDFPC_PRESENTATION_CONTROLLER_HIDE_OVERVIEW_REQUEST_SIGNAL,
	PDFPC_PRESENTATION_CONTROLLER_INCREASE_FONT_SIZE_REQUEST_SIGNAL,
	PDFPC_PRESENTATION_CONTROLLER_DECREASE_FONT_SIZE_REQUEST_SIGNAL,
	PDFPC_PRESENTATION_CONTROLLER_ZOOM_REQUEST_SIGNAL,
	PDFPC_PRESENTATION_CONTROLLER_TIMER_CHANGE_SIGNAL,
	PDFPC_PRESENTATION_CONTROLLER_NUM_SIGNALS
};
static guint pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_NUM_SIGNALS] = {0};
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _ScreenSaverIface {
	GTypeInterface parent_iface;
	void (*inhibit) (ScreenSaver* self, const gchar* application_name, const gchar* reason, GAsyncReadyCallback _callback_, gpointer _user_data_);
	guint32 (*inhibit_finish) (ScreenSaver* self, GAsyncResult* _res_, GError** error);
	void (*un_inhibit) (ScreenSaver* self, guint32 cookie, GError** error);
};

struct _ScreenSaverInhibitReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar* application_name;
	gchar* reason;
};

struct _pdfpcKeyDef {
	GObject parent_instance;
	pdfpcKeyDefPrivate * priv;
};

struct _pdfpcKeyDefClass {
	GObjectClass parent_class;
};

struct _pdfpcKeyDefPrivate {
	guint _keycode;
	guint _modMask;
};

struct _pdfpcPresentationControllerScaledRectangle {
	gdouble x;
	gdouble y;
	gdouble width;
	gdouble height;
};

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

struct _pdfpcPresentationController {
	GObject parent_instance;
	pdfpcPresentationControllerPrivate * priv;
	pdfpcPresentationControllerScaledRectangle highlight;
	gboolean zoom_stack_drawing;
	pdfpcPresentationControllerScaledRectangle zoom_stack_highlight;
	GeeList* controllables;
	pdfpcTimer* timer;
	GSimpleActionGroup* action_group;
	GeeArrayList* action_descriptions;
	GeeHashMap* keyBindings;
	GeeHashMap* mouseBindings;
	ScreenSaver* screensaver;
	guint32 screensaver_cookie;
	pdfpcPresentationControllerPointerTool* pointer;
	pdfpcPresentationControllerPointerTool* spotlight;
	pdfpcDrawingsDrawing* pen_drawing;
	pdfpcDrawingsDrawingTool* current_pen_drawing_tool;
	gdouble pen_last_x;
	gdouble pen_last_y;
	gboolean pen_is_pressed;
	guint pointer_step;
	gboolean pointer_hidden;
	guint pointer_timeout_id;
	guint autoadvance_timeout_id;
	gdouble drag_x;
	gdouble drag_y;
	gdouble pointer_x;
	gdouble pointer_y;
};

struct _pdfpcPresentationControllerClass {
	GObjectClass parent_class;
};

struct _pdfpcPresentationControllerPrivate {
	gint _current_slide_number;
	pdfpcPresentationControllerProgressStatus _progress_status;
	gboolean _faded_to_black;
	gboolean _hidden;
	gboolean _frozen;
	gboolean _in_zoom;
	gboolean _in_customization;
	pdfpcWindowPresenter* _presenter;
	pdfpcWindowPresentation* _presentation;
	gboolean _ignore_keyboard_events;
	gboolean _ignore_mouse_events;
	pdfpcRestServer* _rest_server;
	pdfpcMetadataPdf* _metadata;
	pdfpcWindowOverview* _overview;
	GeeArrayQueue* history_bck;
	GeeArrayQueue* history_fwd;
	pdfpcPresentationControllerAnnotationMode annotation_mode;
	pdfpcPresentationControllerPointerTool* _current_pointer;
	gboolean pen_drawing_present;
	guint pen_step;
};

struct _Block5Data {
	int _ref_count_;
	pdfpcPresentationController* self;
	gint next_slide;
};

struct _pdfpcPresentationControllerPointerTool {
	GTypeInstance parent_instance;
	volatile int ref_count;
	pdfpcPresentationControllerPointerToolPrivate * priv;
	gdouble red;
	gdouble green;
	gdouble blue;
	gdouble alpha;
	gdouble size;
};

struct _pdfpcPresentationControllerPointerToolClass {
	GTypeClass parent_class;
	void (*finalize) (pdfpcPresentationControllerPointerTool *self);
};

struct _Block6Data {
	int _ref_count_;
	pdfpcPresentationController* self;
	pdfpcPresentationControllercallback func;
	gpointer func_target;
};

struct _Block7Data {
	int _ref_count_;
	pdfpcPresentationController* self;
	pdfpcPresentationControllercallback_with_parameter func;
	gpointer func_target;
};

struct _pdfpcOptionsBindTuple {
	GTypeInstance parent_instance;
	volatile int ref_count;
	pdfpcOptionsBindTuplePrivate * priv;
	gchar* type;
	guint keyCode;
	guint modMask;
	gchar* actionName;
};

struct _pdfpcOptionsBindTupleClass {
	GTypeClass parent_class;
	void (*finalize) (pdfpcOptionsBindTuple *self);
};

struct _pdfpcMetadataPdf {
	GObject parent_instance;
	pdfpcMetadataPdfPrivate * priv;
	pdfpcPresentationController* controller;
	gchar* pdfpc_fname;
	guint page_count;
	gdouble original_page_width;
	gdouble original_page_height;
	gint format_version;
	pdfpcMetadataNotesPosition notes_position;
	gboolean disable_markdown;
	guint duration;
	gchar* start_time;
	gchar* end_time;
	guint last_minutes;
	gint font_size;
};

struct _pdfpcMetadataPdfClass {
	GObjectClass parent_class;
};

struct _pdfpcPresentationControllerActionDescription {
	GObject parent_instance;
	pdfpcPresentationControllerActionDescriptionPrivate * priv;
};

struct _pdfpcPresentationControllerActionDescriptionClass {
	GObjectClass parent_class;
};

struct _pdfpcPresentationControllerActionDescriptionPrivate {
	gchar* _name;
	gchar* _description;
	gchar* _arg_name;
	GeeArrayList* _bindings;
};

struct _pdfpcPresentationControllerActionAndParameter {
	GObject parent_instance;
	pdfpcPresentationControllerActionAndParameterPrivate * priv;
};

struct _pdfpcPresentationControllerActionAndParameterClass {
	GObjectClass parent_class;
};

struct _pdfpcPresentationControllerActionAndParameterPrivate {
	GAction* _action;
	GVariant* _parameter;
	gchar* _name;
};

struct _pdfpcPresentationControllerPointerToolPrivate {
	gboolean _is_spotlight;
};

struct _pdfpcPresentationControllerParamSpecPointerTool {
	GParamSpec parent_instance;
};

static gint pdfpcKeyDef_private_offset;
static gpointer pdfpc_key_def_parent_class = NULL;
static GeeHashableIface * pdfpc_key_def_gee_hashable_parent_iface = NULL;
static gint pdfpcPresentationController_private_offset;
static gpointer pdfpc_presentation_controller_parent_class = NULL;
VALA_EXTERN gboolean pdfpc_options_black_on_end;
VALA_EXTERN gboolean pdfpc_options_timer_pace_color;
VALA_EXTERN gboolean pdfpc_options_maximize_in_drawing;
VALA_EXTERN guint pdfpc_options_pointer_size;
VALA_EXTERN gchar* pdfpc_options_pointer_color;
VALA_EXTERN gint pdfpc_options_pointer_opacity;
VALA_EXTERN guint pdfpc_options_spotlight_size;
VALA_EXTERN gint pdfpc_options_spotlight_opacity;
VALA_EXTERN gboolean pdfpc_options_disable_scrolling;
VALA_EXTERN gint pdfpc_options_cursor_timeout;
VALA_EXTERN gchar* pdfpc_options_external_script;
VALA_EXTERN GeeList* pdfpc_options_key_bindings;
VALA_EXTERN GeeList* pdfpc_options_mouse_bindings;
VALA_EXTERN gboolean pdfpc_options_toolbox_shown;
VALA_EXTERN gboolean pdfpc_options_use_time_of_day;
VALA_EXTERN gboolean pdfpc_options_enable_rest;
VALA_EXTERN gint pdfpc_options_rest_port;
static gint pdfpcPresentationControllerActionDescription_private_offset;
static gpointer pdfpc_presentation_controller_action_description_parent_class = NULL;
static gint pdfpcPresentationControllerActionAndParameter_private_offset;
static gpointer pdfpc_presentation_controller_action_and_parameter_parent_class = NULL;
static gint pdfpcPresentationControllerPointerTool_private_offset;
static gpointer pdfpc_presentation_controller_pointer_tool_parent_class = NULL;

VALA_EXTERN GType screen_saver_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint screen_saver_register_object (void* object,
                                    GDBusConnection* connection,
                                    const gchar* path,
                                    GError** error);
VALA_EXTERN GType screen_saver_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ScreenSaver, g_object_unref)
VALA_EXTERN void screen_saver_inhibit (ScreenSaver* self,
                           const gchar* application_name,
                           const gchar* reason,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_);
VALA_EXTERN guint32 screen_saver_inhibit_finish (ScreenSaver* self,
                                     GAsyncResult* _res_,
                                     GError** error);
VALA_EXTERN void screen_saver_un_inhibit (ScreenSaver* self,
                              guint32 cookie,
                              GError** error);
static GType screen_saver_get_type_once (void);
static void screen_saver_proxy_g_signal (GDBusProxy* proxy,
                                  const gchar* sender_name,
                                  const gchar* signal_name,
                                  GVariant* parameters);
static void _vala_g_async_ready_callback (GObject *source_object,
                                   GAsyncResult *res,
                                   void *user_data);
static void screen_saver_proxy_inhibit_async (ScreenSaver* self,
                                       const gchar* application_name,
                                       const gchar* reason,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_);
static guint32 screen_saver_proxy_inhibit_finish (ScreenSaver* self,
                                           GAsyncResult* _res_,
                                           GError** error);
static void screen_saver_proxy_un_inhibit (ScreenSaver* self,
                                    guint32 cookie,
                                    GError** error);
static void screen_saver_proxy_screen_saver_interface_init (ScreenSaverIface* iface);
static void _dbus_screen_saver_inhibit (ScreenSaver* self,
                                 GVariant* _parameters_,
                                 GDBusMethodInvocation* invocation);
static void _dbus_screen_saver_inhibit_ready (GObject * source_object,
                                       GAsyncResult * _res_,
                                       gpointer _user_data_);
static void _dbus_screen_saver_un_inhibit (ScreenSaver* self,
                                    GVariant* _parameters_,
                                    GDBusMethodInvocation* invocation);
static void screen_saver_dbus_interface_method_call (GDBusConnection* connection,
                                              const gchar* sender,
                                              const gchar* object_path,
                                              const gchar* interface_name,
                                              const gchar* method_name,
                                              GVariant* parameters,
                                              GDBusMethodInvocation* invocation,
                                              gpointer user_data);
static GVariant* screen_saver_dbus_interface_get_property (GDBusConnection* connection,
                                                    const gchar* sender,
                                                    const gchar* object_path,
                                                    const gchar* interface_name,
                                                    const gchar* property_name,
                                                    GError** error,
                                                    gpointer user_data);
static gboolean screen_saver_dbus_interface_set_property (GDBusConnection* connection,
                                                   const gchar* sender,
                                                   const gchar* object_path,
                                                   const gchar* interface_name,
                                                   const gchar* property_name,
                                                   GVariant* value,
                                                   GError** error,
                                                   gpointer user_data);
static void _screen_saver_unregister_object (gpointer user_data);
VALA_EXTERN GType pdfpc_key_def_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcKeyDef, g_object_unref)
VALA_EXTERN pdfpcKeyDef* pdfpc_key_def_new (guint k,
                                guint m);
VALA_EXTERN pdfpcKeyDef* pdfpc_key_def_construct (GType object_type,
                                      guint k,
                                      guint m);
VALA_EXTERN void pdfpc_key_def_set_keycode (pdfpcKeyDef* self,
                                guint value);
VALA_EXTERN void pdfpc_key_def_set_modMask (pdfpcKeyDef* self,
                                guint value);
static guint pdfpc_key_def_real_hash (GeeHashable* base);
VALA_EXTERN guint pdfpc_key_def_get_modMask (pdfpcKeyDef* self);
VALA_EXTERN guint pdfpc_key_def_get_keycode (pdfpcKeyDef* self);
static gboolean pdfpc_key_def_real_equal_to (GeeHashable* base,
                                      pdfpcKeyDef* other);
static void pdfpc_key_def_finalize (GObject * obj);
static GType pdfpc_key_def_get_type_once (void);
static void _vala_pdfpc_key_def_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec);
static void _vala_pdfpc_key_def_set_property (GObject * object,
                                       guint property_id,
                                       const GValue * value,
                                       GParamSpec * pspec);
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_presentation_controller_scaled_rectangle_get_type (void) G_GNUC_CONST ;
VALA_EXTERN pdfpcPresentationControllerScaledRectangle* pdfpc_presentation_controller_scaled_rectangle_dup (const pdfpcPresentationControllerScaledRectangle* self);
VALA_EXTERN void pdfpc_presentation_controller_scaled_rectangle_free (pdfpcPresentationControllerScaledRectangle* self);
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 GType pdfpc_timer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcTimer, g_object_unref)
VALA_EXTERN GType pdfpc_presentation_controller_action_description_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcPresentationControllerActionDescription, g_object_unref)
VALA_EXTERN GType pdfpc_presentation_controller_action_and_parameter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcPresentationControllerActionAndParameter, g_object_unref)
VALA_EXTERN gpointer pdfpc_presentation_controller_pointer_tool_ref (gpointer instance);
VALA_EXTERN void pdfpc_presentation_controller_pointer_tool_unref (gpointer instance);
VALA_EXTERN GParamSpec* pdfpc_presentation_controller_param_spec_pointer_tool (const gchar* name,
                                                                   const gchar* nick,
                                                                   const gchar* blurb,
                                                                   GType object_type,
                                                                   GParamFlags flags);
VALA_EXTERN void pdfpc_presentation_controller_value_set_pointer_tool (GValue* value,
                                                           gpointer v_object);
VALA_EXTERN void pdfpc_presentation_controller_value_take_pointer_tool (GValue* value,
                                                            gpointer v_object);
VALA_EXTERN gpointer pdfpc_presentation_controller_value_get_pointer_tool (const GValue* value);
VALA_EXTERN GType pdfpc_presentation_controller_pointer_tool_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcPresentationControllerPointerTool, pdfpc_presentation_controller_pointer_tool_unref)
VALA_EXTERN GType pdfpc_drawings_drawing_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcDrawingsDrawing, g_object_unref)
VALA_EXTERN gpointer pdfpc_drawings_drawing_tool_ref (gpointer instance);
VALA_EXTERN void pdfpc_drawings_drawing_tool_unref (gpointer instance);
VALA_EXTERN GParamSpec* pdfpc_drawings_param_spec_drawing_tool (const gchar* name,
                                                    const gchar* nick,
                                                    const gchar* blurb,
                                                    GType object_type,
                                                    GParamFlags flags);
VALA_EXTERN void pdfpc_drawings_value_set_drawing_tool (GValue* value,
                                            gpointer v_object);
VALA_EXTERN void pdfpc_drawings_value_take_drawing_tool (GValue* value,
                                             gpointer v_object);
VALA_EXTERN gpointer pdfpc_drawings_value_get_drawing_tool (const GValue* value);
VALA_EXTERN GType pdfpc_drawings_drawing_tool_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcDrawingsDrawingTool, pdfpc_drawings_drawing_tool_unref)
VALA_EXTERN GType pdfpc_presentation_controller_progress_status_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType pdfpc_window_fullscreen_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcWindowFullscreen, g_object_unref)
VALA_EXTERN GType pdfpc_window_controllable_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcWindowControllableWindow, g_object_unref)
VALA_EXTERN GType pdfpc_window_presenter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcWindowPresenter, g_object_unref)
VALA_EXTERN GType pdfpc_window_presentation_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcWindowPresentation, g_object_unref)
VALA_EXTERN GType pdfpc_rest_server_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcRestServer, g_object_unref)
VALA_EXTERN GType pdfpc_metadata_pdf_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcMetadataPdf, g_object_unref)
VALA_EXTERN GType pdfpc_window_overview_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcWindowOverview, g_object_unref)
VALA_EXTERN GType pdfpc_presentation_controller_annotation_mode_get_type (void) G_GNUC_CONST ;
VALA_EXTERN pdfpcPresentationControllerAnnotationMode pdfpc_presentation_controller_annotation_mode_parse (const gchar* mode_str);
VALA_EXTERN void pdfpc_presentation_controller_switch_to_slide_number (pdfpcPresentationController* self,
                                                           gint slide_number,
                                                           gboolean skip_history);
VALA_EXTERN gint pdfpc_presentation_controller_get_current_slide_number (pdfpcPresentationController* self);
VALA_EXTERN gint pdfpc_presentation_controller_get_current_user_slide_number (pdfpcPresentationController* self);
VALA_EXTERN guint pdfpc_presentation_controller_get_n_slides (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_set_faded_to_black (pdfpcPresentationController* self,
                                                       gboolean value);
VALA_EXTERN gboolean pdfpc_presentation_controller_get_frozen (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_set_current_slide_number (pdfpcPresentationController* self,
                                                             gint value);
VALA_EXTERN void pdfpc_timer_run (pdfpcTimer* self);
VALA_EXTERN void pdfpc_presentation_controller_set_in_zoom (pdfpcPresentationController* self,
                                                gboolean value);
VALA_EXTERN void pdfpc_presentation_controller_controllables_update (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_start_autoadvance_timer (pdfpcPresentationController* self,
                                                            gint slide_number);
static Block5Data* block5_data_ref (Block5Data* _data5_);
static void block5_data_unref (void * _userdata_);
VALA_EXTERN pdfpcMetadataPdf* pdfpc_presentation_controller_get_metadata (pdfpcPresentationController* self);
VALA_EXTERN gdouble pdfpc_metadata_pdf_get_slide_duration (pdfpcMetadataPdf* self,
                                               gint slide_number);
VALA_EXTERN gboolean pdfpc_presentation_controller_is_running (pdfpcPresentationController* self);
VALA_EXTERN gint pdfpc_metadata_pdf_nearest_nonhidden (pdfpcMetadataPdf* self,
                                           gint slide_number,
                                           gboolean backwards);
static gboolean ___lambda19_ (Block5Data* _data5_);
static gboolean ____lambda19__gsource_func (gpointer self);
VALA_EXTERN gboolean pdfpc_timer_is_running (pdfpcTimer* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_is_paused (pdfpcPresentationController* self);
VALA_EXTERN gboolean pdfpc_timer_is_paused (pdfpcTimer* self);
VALA_EXTERN GType pdfpc_timer_state_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void pdfpc_presentation_controller_on_timer_change (pdfpcPresentationController* self,
                                                    gint talk_time,
                                                    pdfpcTimerState state,
                                                    const gchar* label);
VALA_EXTERN gint pdfpc_timer_get_duration (pdfpcTimer* self);
VALA_EXTERN void pdfpc_presentation_controller_set_progress_status (pdfpcPresentationController* self,
                                                        pdfpcPresentationControllerProgressStatus value);
VALA_EXTERN gint pdfpc_metadata_pdf_get_end_user_slide (pdfpcMetadataPdf* self);
VALA_EXTERN guint pdfpc_metadata_pdf_get_last_minutes (pdfpcMetadataPdf* self);
VALA_EXTERN GType pdfpc_timer_mode_get_type (void) G_GNUC_CONST ;
VALA_EXTERN pdfpcTimerMode pdfpc_timer_get_mode (pdfpcTimer* self);
VALA_EXTERN pdfpcPresentationController* pdfpc_presentation_controller_new (void);
VALA_EXTERN pdfpcPresentationController* pdfpc_presentation_controller_construct (GType object_type);
static void pdfpc_presentation_controller_init_pen_and_pointer (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_add_actions (pdfpcPresentationController* self);
static void pdfpc_presentation_controller_readKeyBindings (pdfpcPresentationController* self);
static void pdfpc_presentation_controller_readMouseBindings (pdfpcPresentationController* self);
static void __lambda43_ (pdfpcPresentationController* self,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda44_ (pdfpcPresentationController* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda44__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda43__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
VALA_EXTERN void pdfpc_dbus_server_start_server (pdfpcPresentationController* controller);
VALA_EXTERN gboolean pdfpc_presentation_controller_is_pointer_active (pdfpcPresentationController* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_is_spotlight_active (pdfpcPresentationController* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_is_eraser_active (pdfpcPresentationController* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_is_pen_active (pdfpcPresentationController* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_in_drawing_mode (pdfpcPresentationController* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_in_pointing_mode (pdfpcPresentationController* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_in_normal_mode (pdfpcPresentationController* self);
VALA_EXTERN gchar* pdfpc_presentation_controller_get_mode_string (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_move_pen (pdfpcPresentationController* self,
                                             gdouble x,
                                             gdouble y);
VALA_EXTERN void pdfpc_drawings_drawing_add_line (pdfpcDrawingsDrawing* self,
                                      pdfpcDrawingsDrawingTool* tool,
                                      gdouble x1,
                                      gdouble y1,
                                      gdouble x2,
                                      gdouble y2);
VALA_EXTERN void pdfpc_presentation_controller_queue_pen_surface_draws (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_increase_pen_size (pdfpcPresentationController* self);
VALA_EXTERN gdouble pdfpc_drawings_drawing_tool_get_width (pdfpcDrawingsDrawingTool* self);
VALA_EXTERN void pdfpc_drawings_drawing_tool_set_width (pdfpcDrawingsDrawingTool* self,
                                            gdouble value);
VALA_EXTERN void pdfpc_presentation_controller_decrease_pen_size (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_set_pen_size (pdfpcPresentationController* self,
                                                 gdouble width);
VALA_EXTERN gdouble pdfpc_presentation_controller_get_pen_size (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_set_pen_pressure (pdfpcPresentationController* self,
                                                     gdouble pressure);
VALA_EXTERN void pdfpc_drawings_drawing_tool_set_pressure (pdfpcDrawingsDrawingTool* self,
                                               gdouble value);
VALA_EXTERN pdfpcWindowPresenter* pdfpc_presentation_controller_get_presenter (pdfpcPresentationController* self);
VALA_EXTERN GtkDrawingArea* pdfpc_window_controllable_window_get_pen_drawing_surface (pdfpcWindowControllableWindow* self);
VALA_EXTERN pdfpcWindowPresentation* pdfpc_presentation_controller_get_presentation (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_update_pen_drawing (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_drawings_drawing_switch_to_slide (pdfpcDrawingsDrawing* self,
                                             gint slide_number);
static void pdfpc_presentation_controller_hide_or_show_pen_surfaces (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_window_controllable_window_enable_pen (pdfpcWindowControllableWindow* self,
                                                  gboolean onoff);
static void pdfpc_presentation_controller_hide_or_show_pointer_surfaces (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_window_controllable_window_enable_pointer (pdfpcWindowControllableWindow* self,
                                                      gboolean onoff);
VALA_EXTERN void pdfpc_presentation_controller_set_mode (pdfpcPresentationController* self,
                                             pdfpcPresentationControllerAnnotationMode mode);
VALA_EXTERN gboolean pdfpc_presentation_controller_get_in_zoom (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_set_current_pointer (pdfpcPresentationController* self,
                                                        pdfpcPresentationControllerPointerTool* value);
VALA_EXTERN pdfpcDrawingsDrawingTool* pdfpc_drawings_drawing_get_pen (pdfpcDrawingsDrawing* self);
VALA_EXTERN pdfpcDrawingsDrawingTool* pdfpc_drawings_drawing_get_eraser (pdfpcDrawingsDrawing* self);
VALA_EXTERN void pdfpc_window_presenter_maximize_current_view (pdfpcWindowPresenter* self,
                                                   gboolean onoff);
VALA_EXTERN pdfpcViewPdf* pdfpc_controllable_get_main_view (pdfpcControllable* self);
VALA_EXTERN void pdfpc_presentation_controller_set_normal_mode (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_set_pointer_mode (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_set_pen_mode (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_set_eraser_mode (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_set_spotlight_mode (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_toggle_drawings (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_clear_pen_drawing (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_drawings_drawing_clear (pdfpcDrawingsDrawing* self);
VALA_EXTERN pdfpcPresentationControllerPointerTool* pdfpc_presentation_controller_pointer_tool_new (gboolean is_spotlight);
VALA_EXTERN pdfpcPresentationControllerPointerTool* pdfpc_presentation_controller_pointer_tool_construct (GType object_type,
                                                                                              gboolean is_spotlight);
VALA_EXTERN void pdfpc_presentation_controller_pointer_tool_set_rgba (pdfpcPresentationControllerPointerTool* self,
                                                          GdkRGBA* color);
static void _pdfpc_presentation_controller_update_pen_drawing_pdfpc_presentation_controller_update_request (pdfpcPresentationController* _sender,
                                                                                                     gpointer self);
static void pdfpc_presentation_controller_queue_pointer_surface_draws (pdfpcPresentationController* self);
VALA_EXTERN GtkDrawingArea* pdfpc_window_controllable_window_get_pointer_drawing_surface (pdfpcWindowControllableWindow* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_on_move_pen (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_restart_pointer_timer (pdfpcPresentationController* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_on_enter_notify (pdfpcPresentationController* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_on_leave_notify (pdfpcPresentationController* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_on_key_press (pdfpcPresentationController* self,
                                                     pdfpcKeyDef* keydef);
VALA_EXTERN gboolean pdfpc_presentation_controller_get_ignore_keyboard_events (pdfpcPresentationController* self);
VALA_EXTERN GVariant* pdfpc_presentation_controller_action_and_parameter_get_parameter (pdfpcPresentationControllerActionAndParameter* self);
VALA_EXTERN GAction* pdfpc_presentation_controller_action_and_parameter_get_action (pdfpcPresentationControllerActionAndParameter* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_on_button_press (pdfpcPresentationController* self,
                                                        pdfpcKeyDef* keydef);
VALA_EXTERN gboolean pdfpc_presentation_controller_get_ignore_mouse_events (pdfpcPresentationController* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_on_scroll (pdfpcPresentationController* self,
                                                  gboolean up,
                                                  guint state);
VALA_EXTERN void pdfpc_presentation_controller_back10 (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_previous_page (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_jump10 (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_next_page (pdfpcPresentationController* self);
static gboolean __lambda18_ (pdfpcPresentationController* self);
static gboolean ___lambda18__gsource_func (gpointer self);
static void pdfpc_presentation_controller_move_pointer (pdfpcPresentationController* self,
                                                 GVariant* point);
VALA_EXTERN void pdfpc_presentation_controller_update_highlight (pdfpcPresentationController* self,
                                                     gdouble x,
                                                     gdouble y);
VALA_EXTERN gboolean pdfpc_presentation_controller_on_move_pointer (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_increase_pointer_size (pdfpcPresentationController* self);
VALA_EXTERN pdfpcPresentationControllerPointerTool* pdfpc_presentation_controller_get_current_pointer (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_decrease_pointer_size (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_execute_external_script (pdfpcPresentationController* self);
VALA_EXTERN gchar* pdfpc_presentation_controller_get_pdf_fname (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_quit (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_metadata_pdf_quit (pdfpcMetadataPdf* self);
VALA_EXTERN void pdfpc_presentation_controller_set_pen_color_to_string (pdfpcPresentationController* self,
                                                            GVariant* color_variant);
VALA_EXTERN void pdfpc_drawings_drawing_tool_set_rgba (pdfpcDrawingsDrawingTool* self,
                                           GdkRGBA* color);
VALA_EXTERN void pdfpc_presentation_controller_set_mode_to_string (pdfpcPresentationController* self,
                                                       GVariant* mode_variant);
VALA_EXTERN void pdfpc_presentation_controller_add_action (pdfpcPresentationController* self,
                                               const gchar* name,
                                               pdfpcPresentationControllercallback func,
                                               gpointer func_target,
                                               const gchar* description);
static void _pdfpc_presentation_controller_next_page_pdfpc_presentation_controllercallback (gpointer self);
static void _pdfpc_presentation_controller_jump10_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_jump_to_last_overlay (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_jump_to_last_overlay_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_next_user_page (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_next_user_page_pdfpc_presentation_controllercallback (gpointer self);
static void _pdfpc_presentation_controller_previous_page_pdfpc_presentation_controllercallback (gpointer self);
static void _pdfpc_presentation_controller_back10_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_jump_to_first_overlay (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_jump_to_first_overlay_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_previous_user_page (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_previous_user_page_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_next_page_forced (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_next_page_forced_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_previous_page_forced (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_previous_page_forced_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_controllables_ask_goto_page (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_controllables_ask_goto_page_pdfpc_presentation_controllercallback (gpointer self);
static void pdfpc_presentation_controller_goto_first (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_goto_first_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_goto_last (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_goto_last_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_next_unseen (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_next_unseen_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_previous_seen (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_previous_seen_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_toggle_overview (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_toggle_overview_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_history_goto_back (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_history_goto_back_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_history_goto_fwd (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_history_goto_fwd_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_add_action_with_parameter (pdfpcPresentationController* self,
                                                              const gchar* name,
                                                              const GVariantType* param_type,
                                                              pdfpcPresentationControllercallback_with_parameter func,
                                                              gpointer func_target,
                                                              const gchar* description,
                                                              const gchar* arg_name);
VALA_EXTERN void pdfpc_presentation_controller_goto_string (pdfpcPresentationController* self,
                                                GVariant* page);
static void _pdfpc_presentation_controller_goto_string_pdfpcpresentationcontrollercallback_with_parameter (GVariant* parameter,
                                                                                                    gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_start (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_start_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_toggle_pause (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_toggle_pause_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_reset_timer (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_reset_timer_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_cycle_timer (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_cycle_timer_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_toggle_windowed (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_toggle_windowed_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_fade_to_black (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_fade_to_black_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_hide_presentation (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_hide_presentation_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_toggle_freeze (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_toggle_freeze_pdfpc_presentation_controllercallback (gpointer self);
static void __lambda42_ (pdfpcPresentationController* self);
static void ___lambda42__pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_add_overlay (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_add_overlay_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_toggle_hidden (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_toggle_hidden_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_controllables_edit_note (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_controllables_edit_note_pdfpc_presentation_controllercallback (gpointer self);
static void pdfpc_presentation_controller_set_end_user_slide (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_set_end_user_slide_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_set_last_saved_slide (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_set_last_saved_slide_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_goto_last_saved_slide (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_goto_last_saved_slide_pdfpc_presentation_controllercallback (gpointer self);
static void _pdfpc_presentation_controller_execute_external_script_pdfpc_presentation_controllercallback (gpointer self);
static void _pdfpc_presentation_controller_set_mode_to_string_pdfpcpresentationcontrollercallback_with_parameter (GVariant* parameter,
                                                                                                           gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_increase_size (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_increase_size_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_decrease_size (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_decrease_size_pdfpc_presentation_controllercallback (gpointer self);
static void _pdfpc_presentation_controller_set_pen_color_to_string_pdfpcpresentationcontrollercallback_with_parameter (GVariant* parameter,
                                                                                                                gpointer self);
static void _pdfpc_presentation_controller_clear_pen_drawing_pdfpc_presentation_controllercallback (gpointer self);
static void _pdfpc_presentation_controller_toggle_drawings_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_toggle_toolbox (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_toggle_toolbox_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_zoom_highlighted (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_zoom_highlighted_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_toggle_max_current_view (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_toggle_max_current_view_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_customize_gui (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_customize_gui_pdfpc_presentation_controllercallback (gpointer self);
static void _pdfpc_presentation_controller_move_pointer_pdfpcpresentationcontrollercallback_with_parameter (GVariant* parameter,
                                                                                                     gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_show_qrcode (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_show_qrcode_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_show_help (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_show_help_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_exit_state (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_exit_state_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_reload (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_reload_pdfpc_presentation_controllercallback (gpointer self);
static void _pdfpc_presentation_controller_quit_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_undo (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_undo_pdfpc_presentation_controllercallback (gpointer self);
VALA_EXTERN void pdfpc_presentation_controller_redo (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_redo_pdfpc_presentation_controllercallback (gpointer self);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
static void __lambda40_ (Block6Data* _data6_);
static void ___lambda40__g_simple_action_activate (GSimpleAction* _sender,
                                            GVariant* parameter,
                                            gpointer self);
VALA_EXTERN pdfpcPresentationControllerActionDescription* pdfpc_presentation_controller_action_description_new (const gchar* name,
                                                                                                    const gchar* description,
                                                                                                    const gchar* arg_name);
VALA_EXTERN pdfpcPresentationControllerActionDescription* pdfpc_presentation_controller_action_description_construct (GType object_type,
                                                                                                          const gchar* name,
                                                                                                          const gchar* description,
                                                                                                          const gchar* arg_name);
static Block7Data* block7_data_ref (Block7Data* _data7_);
static void block7_data_unref (void * _userdata_);
static void __lambda41_ (Block7Data* _data7_,
                  GVariant* param);
static void ___lambda41__g_simple_action_activate (GSimpleAction* _sender,
                                            GVariant* parameter,
                                            gpointer self);
VALA_EXTERN gchar** pdfpc_presentation_controller_get_action_descriptions (pdfpcPresentationController* self,
                                                               gint* result_length1);
VALA_EXTERN const gchar* pdfpc_presentation_controller_action_description_get_arg_name (pdfpcPresentationControllerActionDescription* self);
VALA_EXTERN const gchar* pdfpc_presentation_controller_action_description_get_name (pdfpcPresentationControllerActionDescription* self);
static void _vala_array_add1 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static void _vala_array_add2 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
VALA_EXTERN const gchar* pdfpc_presentation_controller_action_description_get_description (pdfpcPresentationControllerActionDescription* self);
static void _vala_array_add3 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static gchar* pdfpc_presentation_controller_get_bindstr (pdfpcPresentationController* self,
                                                  pdfpcKeyDef* keydef,
                                                  gboolean is_mouse);
VALA_EXTERN gchar** pdfpc_presentation_controller_get_action_bindings (pdfpcPresentationController* self,
                                                           gint* result_length1);
VALA_EXTERN const gchar* pdfpc_presentation_controller_action_and_parameter_get_name (pdfpcPresentationControllerActionAndParameter* self);
static void _vala_array_add4 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static void _vala_array_add5 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
VALA_EXTERN void pdfpc_presentation_controller_trigger_action (pdfpcPresentationController* self,
                                                   const gchar* name,
                                                   GVariant* parameter);
static void pdfpc_presentation_controller_bindKeyOrMouse (pdfpcPresentationController* self,
                                                   gboolean is_mouse,
                                                   guint keycode,
                                                   guint modMask,
                                                   const gchar* action_name,
                                                   GVariant* parameter);
VALA_EXTERN pdfpcPresentationControllerActionAndParameter* pdfpc_presentation_controller_action_and_parameter_new (GAction* action,
                                                                                                       GVariant* parameter,
                                                                                                       const gchar* name);
VALA_EXTERN pdfpcPresentationControllerActionAndParameter* pdfpc_presentation_controller_action_and_parameter_construct (GType object_type,
                                                                                                             GAction* action,
                                                                                                             GVariant* parameter,
                                                                                                             const gchar* name);
static void pdfpc_presentation_controller_bind (pdfpcPresentationController* self,
                                         guint keycode,
                                         guint modMask,
                                         const gchar* action_name,
                                         GVariant* parameter);
static void pdfpc_presentation_controller_bindMouse (pdfpcPresentationController* self,
                                              guint keycode,
                                              guint modMask,
                                              const gchar* action_name,
                                              GVariant* parameter);
VALA_EXTERN void pdfpc_presentation_controller_unbind (pdfpcPresentationController* self,
                                           guint keycode,
                                           guint modMask);
VALA_EXTERN void pdfpc_presentation_controller_unbindAll (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_unbindMouse (pdfpcPresentationController* self,
                                                guint keycode,
                                                guint modMask);
VALA_EXTERN void pdfpc_presentation_controller_unbindAllMouse (pdfpcPresentationController* self);
VALA_EXTERN const gchar* pdfpc_metadata_pdf_get_pdf_fname (pdfpcMetadataPdf* self);
VALA_EXTERN void pdfpc_metadata_pdf_set_end_user_slide (pdfpcMetadataPdf* self,
                                            gint slide);
VALA_EXTERN void pdfpc_metadata_pdf_set_last_saved_slide (pdfpcMetadataPdf* self,
                                              gint slide);
VALA_EXTERN void pdfpc_window_presenter_session_saved (pdfpcWindowPresenter* self);
VALA_EXTERN void pdfpc_presentation_controller_set_ignore_input_events (pdfpcPresentationController* self,
                                                            gboolean v);
VALA_EXTERN void pdfpc_presentation_controller_set_ignore_keyboard_events (pdfpcPresentationController* self,
                                                               gboolean value);
VALA_EXTERN void pdfpc_presentation_controller_set_ignore_mouse_events (pdfpcPresentationController* self,
                                                            gboolean value);
VALA_EXTERN gpointer pdfpc_options_bind_tuple_ref (gpointer instance);
VALA_EXTERN void pdfpc_options_bind_tuple_unref (gpointer instance);
VALA_EXTERN GParamSpec* pdfpc_options_param_spec_bind_tuple (const gchar* name,
                                                 const gchar* nick,
                                                 const gchar* blurb,
                                                 GType object_type,
                                                 GParamFlags flags);
VALA_EXTERN void pdfpc_options_value_set_bind_tuple (GValue* value,
                                         gpointer v_object);
VALA_EXTERN void pdfpc_options_value_take_bind_tuple (GValue* value,
                                          gpointer v_object);
VALA_EXTERN gpointer pdfpc_options_value_get_bind_tuple (const GValue* value);
VALA_EXTERN GType pdfpc_options_bind_tuple_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcOptionsBindTuple, pdfpc_options_bind_tuple_unref)
VALA_EXTERN const gchar* pdfpc_options_bind_tuple_get_actionArg (pdfpcOptionsBindTuple* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_register_controllable (pdfpcPresentationController* self,
                                                              pdfpcControllable* controllable);
VALA_EXTERN gint pdfpc_presentation_controller_get_user_n_slides (pdfpcPresentationController* self);
VALA_EXTERN gint pdfpc_metadata_pdf_user_slide_to_real_slide (pdfpcMetadataPdf* self,
                                                  gint number,
                                                  gboolean lastSlide);
VALA_EXTERN gint pdfpc_metadata_pdf_get_last_saved_slide (pdfpcMetadataPdf* self);
VALA_EXTERN void pdfpc_window_presenter_session_loaded (pdfpcWindowPresenter* self);
VALA_EXTERN void pdfpc_presentation_controller_goto_user_page (pdfpcPresentationController* self,
                                                   gint page_number,
                                                   gboolean useLast);
VALA_EXTERN void pdfpc_presentation_controller_controllables_hide_overview (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_drawings_drawing_undo (pdfpcDrawingsDrawing* self);
VALA_EXTERN void pdfpc_drawings_drawing_redo (pdfpcDrawingsDrawing* self);
VALA_EXTERN gboolean pdfpc_metadata_pdf_get_is_ready (pdfpcMetadataPdf* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_get_overview_shown (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_controllables_show_overview (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_window_fullscreen_toggle_windowed (pdfpcWindowFullscreen* self);
static gboolean pdfpc_presentation_controller_get_single_screen_mode (pdfpcPresentationController* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_get_faded_to_black (pdfpcPresentationController* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_get_hidden (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_set_hidden (pdfpcPresentationController* self,
                                               gboolean value);
VALA_EXTERN void pdfpc_presentation_controller_set_frozen (pdfpcPresentationController* self,
                                               gboolean value);
VALA_EXTERN gint pdfpc_metadata_pdf_add_overlay (pdfpcMetadataPdf* self,
                                     gint slide_number);
VALA_EXTERN pdfpcWindowOverview* pdfpc_presentation_controller_get_overview (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_window_overview_remove_current (pdfpcWindowOverview* self,
                                           gint newn);
VALA_EXTERN void pdfpc_window_overview_set_n_slides (pdfpcWindowOverview* self,
                                         gint n);
VALA_EXTERN gboolean pdfpc_metadata_pdf_get_slide_hidden (pdfpcMetadataPdf* self,
                                              gint slide_number);
VALA_EXTERN gint pdfpc_metadata_pdf_set_slide_hidden (pdfpcMetadataPdf* self,
                                          gint slide_number,
                                          gboolean onoff);
VALA_EXTERN void pdfpc_timer_start (pdfpcTimer* self);
VALA_EXTERN gboolean pdfpc_timer_toggle_pause (pdfpcTimer* self);
VALA_EXTERN void pdfpc_timer_reset (pdfpcTimer* self);
VALA_EXTERN void pdfpc_timer_cycle_mode (pdfpcTimer* self);
VALA_EXTERN void pdfpc_metadata_pdf_load (pdfpcMetadataPdf* self,
                              const gchar* pdfFilename);
VALA_EXTERN void pdfpc_drawings_drawing_clear_storage (pdfpcDrawingsDrawing* self);
VALA_EXTERN GType pdfpc_renderer_pdf_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (pdfpcRendererPdf, g_object_unref)
VALA_EXTERN pdfpcRendererPdf* pdfpc_metadata_pdf_get_renderer (pdfpcMetadataPdf* self);
VALA_EXTERN void pdfpc_renderer_pdf_invalidate_cache (pdfpcRendererPdf* self);
VALA_EXTERN void pdfpc_presentation_controller_increase_font_size (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_decrease_font_size (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_toggle_zoom (pdfpcPresentationController* self);
VALA_EXTERN gboolean pdfpc_window_presenter_get_current_view_maximized (pdfpcWindowPresenter* self);
VALA_EXTERN void pdfpc_window_presenter_set_customizable (pdfpcWindowPresenter* self,
                                              gboolean onoff);
VALA_EXTERN void pdfpc_presentation_controller_set_in_customization (pdfpcPresentationController* self,
                                                         gboolean value);
VALA_EXTERN void pdfpc_window_presenter_show_help_window (pdfpcWindowPresenter* self,
                                              gboolean onoff);
VALA_EXTERN pdfpcRestServer* pdfpc_presentation_controller_get_rest_server (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_window_presenter_show_qrcode_window (pdfpcWindowPresenter* self,
                                                gboolean onoff);
VALA_EXTERN void pdfpc_presentation_controller_hide_qrcode (pdfpcPresentationController* self);
VALA_EXTERN gboolean pdfpc_presentation_controller_get_in_customization (pdfpcPresentationController* self);
VALA_EXTERN void pdfpc_presentation_controller_overlay_pos (pdfpcPresentationController* self,
                                                gint n,
                                                PopplerRectangle* area,
                                                GdkRectangle* rect,
                                                pdfpcWindowControllableWindow** window);
VALA_EXTERN void pdfpc_view_pdf_convert_poppler_rectangle_to_gdk_rectangle (pdfpcViewPdf* self,
                                                                PopplerRectangle* poppler_rectangle,
                                                                GdkRectangle* result);
VALA_EXTERN pdfpcPresentationControllerProgressStatus pdfpc_presentation_controller_get_progress_status (pdfpcPresentationController* self);
VALA_EXTERN gint pdfpc_metadata_pdf_real_slide_to_user_slide (pdfpcMetadataPdf* self,
                                                  gint number);
VALA_EXTERN guint pdfpc_metadata_pdf_get_slide_count (pdfpcMetadataPdf* self);
VALA_EXTERN gint pdfpc_metadata_pdf_get_user_slide_count (pdfpcMetadataPdf* self);
VALA_EXTERN void pdfpc_presentation_controller_set_presenter (pdfpcPresentationController* self,
                                                  pdfpcWindowPresenter* value);
VALA_EXTERN void pdfpc_presentation_controller_set_presentation (pdfpcPresentationController* self,
                                                     pdfpcWindowPresentation* value);
VALA_EXTERN gboolean pdfpc_window_fullscreen_is_monitor_connected (pdfpcWindowFullscreen* self);
VALA_EXTERN void pdfpc_presentation_controller_set_rest_server (pdfpcPresentationController* self,
                                                    pdfpcRestServer* value);
VALA_EXTERN void pdfpc_presentation_controller_set_metadata (pdfpcPresentationController* self,
                                                 pdfpcMetadataPdf* value);
VALA_EXTERN GType pdfpc_metadata_notes_position_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint pdfpc_metadata_pdf_get_duration (pdfpcMetadataPdf* self);
VALA_EXTERN gchar* pdfpc_metadata_pdf_get_start_time (pdfpcMetadataPdf* self);
VALA_EXTERN gchar* pdfpc_metadata_pdf_get_end_time (pdfpcMetadataPdf* self);
VALA_EXTERN pdfpcTimer* pdfpc_timer_new (gint duration,
                             const gchar* start_time_str,
                             const gchar* end_time_str);
VALA_EXTERN pdfpcTimer* pdfpc_timer_construct (GType object_type,
                                   gint duration,
                                   const gchar* start_time_str,
                                   const gchar* end_time_str);
VALA_EXTERN gboolean pdfpc_timer_set_mode (pdfpcTimer* self,
                               pdfpcTimerMode new_mode);
static void _pdfpc_presentation_controller_on_timer_change_pdfpc_timer_change (pdfpcTimer* _sender,
                                                                        gint time,
                                                                        pdfpcTimerState state,
                                                                        const gchar* label,
                                                                        gpointer self);
VALA_EXTERN pdfpcDrawingsDrawing* pdfpc_drawings_create (pdfpcMetadataPdf* metadata);
VALA_EXTERN pdfpcRestServer* pdfpc_rest_server_new (pdfpcMetadataPdf* metadata,
                                        gint port_num);
VALA_EXTERN pdfpcRestServer* pdfpc_rest_server_construct (GType object_type,
                                              pdfpcMetadataPdf* metadata,
                                              gint port_num);
VALA_EXTERN void pdfpc_rest_server_start (pdfpcRestServer* self);
VALA_EXTERN void pdfpc_presentation_controller_set_overview (pdfpcPresentationController* self,
                                                 pdfpcWindowOverview* value);
VALA_EXTERN gboolean pdfpc_window_presenter_is_overview_shown (pdfpcWindowPresenter* self);
VALA_EXTERN void pdfpc_presentation_controller_action_description_set_name (pdfpcPresentationControllerActionDescription* self,
                                                                const gchar* value);
VALA_EXTERN void pdfpc_presentation_controller_action_description_set_description (pdfpcPresentationControllerActionDescription* self,
                                                                       const gchar* value);
VALA_EXTERN void pdfpc_presentation_controller_action_description_set_arg_name (pdfpcPresentationControllerActionDescription* self,
                                                                    const gchar* value);
VALA_EXTERN GeeArrayList* pdfpc_presentation_controller_action_description_get_bindings (pdfpcPresentationControllerActionDescription* self);
VALA_EXTERN void pdfpc_presentation_controller_action_description_set_bindings (pdfpcPresentationControllerActionDescription* self,
                                                                    GeeArrayList* value);
static void pdfpc_presentation_controller_action_description_finalize (GObject * obj);
static GType pdfpc_presentation_controller_action_description_get_type_once (void);
static void _vala_pdfpc_presentation_controller_action_description_get_property (GObject * object,
                                                                          guint property_id,
                                                                          GValue * value,
                                                                          GParamSpec * pspec);
static void _vala_pdfpc_presentation_controller_action_description_set_property (GObject * object,
                                                                          guint property_id,
                                                                          const GValue * value,
                                                                          GParamSpec * pspec);
VALA_EXTERN void pdfpc_presentation_controller_action_and_parameter_set_action (pdfpcPresentationControllerActionAndParameter* self,
                                                                    GAction* value);
VALA_EXTERN void pdfpc_presentation_controller_action_and_parameter_set_parameter (pdfpcPresentationControllerActionAndParameter* self,
                                                                       GVariant* value);
VALA_EXTERN void pdfpc_presentation_controller_action_and_parameter_set_name (pdfpcPresentationControllerActionAndParameter* self,
                                                                  const gchar* value);
static void pdfpc_presentation_controller_action_and_parameter_finalize (GObject * obj);
static GType pdfpc_presentation_controller_action_and_parameter_get_type_once (void);
static void _vala_pdfpc_presentation_controller_action_and_parameter_get_property (GObject * object,
                                                                            guint property_id,
                                                                            GValue * value,
                                                                            GParamSpec * pspec);
static void _vala_pdfpc_presentation_controller_action_and_parameter_set_property (GObject * object,
                                                                            guint property_id,
                                                                            const GValue * value,
                                                                            GParamSpec * pspec);
VALA_EXTERN void pdfpc_presentation_controller_pointer_tool_set_is_spotlight (pdfpcPresentationControllerPointerTool* self,
                                                                  gboolean value);
VALA_EXTERN void pdfpc_presentation_controller_pointer_tool_get_rgba (pdfpcPresentationControllerPointerTool* self,
                                                          GdkRGBA* result);
VALA_EXTERN gboolean pdfpc_presentation_controller_pointer_tool_get_is_spotlight (pdfpcPresentationControllerPointerTool* self);
static void pdfpc_presentation_controller_pointer_tool_finalize (pdfpcPresentationControllerPointerTool * obj);
static GType pdfpc_presentation_controller_pointer_tool_get_type_once (void);
static void pdfpc_presentation_controller_finalize (GObject * obj);
static GType pdfpc_presentation_controller_get_type_once (void);
static void _vala_pdfpc_presentation_controller_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_pdfpc_presentation_controller_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);
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 gssize _vala_array_length (gpointer array);

static const GDBusArgInfo _screen_saver_dbus_arg_info_inhibit_application_name = {-1, "application_name", "s", NULL};
static const GDBusArgInfo _screen_saver_dbus_arg_info_inhibit_reason = {-1, "reason", "s", NULL};
static const GDBusArgInfo _screen_saver_dbus_arg_info_inhibit_result = {-1, "result", "u", NULL};
static const GDBusArgInfo * const _screen_saver_dbus_arg_info_inhibit_in[] = {&_screen_saver_dbus_arg_info_inhibit_application_name, &_screen_saver_dbus_arg_info_inhibit_reason, NULL};
static const GDBusArgInfo * const _screen_saver_dbus_arg_info_inhibit_out[] = {&_screen_saver_dbus_arg_info_inhibit_result, NULL};
static const GDBusMethodInfo _screen_saver_dbus_method_info_inhibit = {-1, "Inhibit", (GDBusArgInfo **) (&_screen_saver_dbus_arg_info_inhibit_in), (GDBusArgInfo **) (&_screen_saver_dbus_arg_info_inhibit_out), NULL};
static const GDBusArgInfo _screen_saver_dbus_arg_info_un_inhibit_cookie = {-1, "cookie", "u", NULL};
static const GDBusArgInfo * const _screen_saver_dbus_arg_info_un_inhibit_in[] = {&_screen_saver_dbus_arg_info_un_inhibit_cookie, NULL};
static const GDBusArgInfo * const _screen_saver_dbus_arg_info_un_inhibit_out[] = {NULL};
static const GDBusMethodInfo _screen_saver_dbus_method_info_un_inhibit = {-1, "UnInhibit", (GDBusArgInfo **) (&_screen_saver_dbus_arg_info_un_inhibit_in), (GDBusArgInfo **) (&_screen_saver_dbus_arg_info_un_inhibit_out), NULL};
static const GDBusMethodInfo * const _screen_saver_dbus_method_info[] = {&_screen_saver_dbus_method_info_inhibit, &_screen_saver_dbus_method_info_un_inhibit, NULL};
static const GDBusSignalInfo * const _screen_saver_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _screen_saver_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _screen_saver_dbus_interface_info = {-1, "org.freedesktop.ScreenSaver", (GDBusMethodInfo **) (&_screen_saver_dbus_method_info), (GDBusSignalInfo **) (&_screen_saver_dbus_signal_info), (GDBusPropertyInfo **) (&_screen_saver_dbus_property_info), NULL};
static const GDBusInterfaceVTable _screen_saver_dbus_interface_vtable = {screen_saver_dbus_interface_method_call, screen_saver_dbus_interface_get_property, screen_saver_dbus_interface_set_property};

void
screen_saver_inhibit (ScreenSaver* self,
                      const gchar* application_name,
                      const gchar* reason,
                      GAsyncReadyCallback _callback_,
                      gpointer _user_data_)
{
	ScreenSaverIface* _iface_;
	_iface_ = SCREEN_SAVER_GET_INTERFACE (self);
	if (_iface_->inhibit) {
		_iface_->inhibit (self, application_name, reason, _callback_, _user_data_);
	}
}

guint32
screen_saver_inhibit_finish (ScreenSaver* self,
                             GAsyncResult* _res_,
                             GError** error)
{
	ScreenSaverIface* _iface_;
	_iface_ = SCREEN_SAVER_GET_INTERFACE (self);
	if (_iface_->inhibit_finish) {
		return _iface_->inhibit_finish (self, _res_, error);
	}
	return 0U;
}

void
screen_saver_un_inhibit (ScreenSaver* self,
                         guint32 cookie,
                         GError** error)
{
	ScreenSaverIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SCREEN_SAVER_GET_INTERFACE (self);
	if (_iface_->un_inhibit) {
		_iface_->un_inhibit (self, cookie, error);
	}
}

static void
screen_saver_default_init (ScreenSaverIface * iface,
                           gpointer iface_data)
{
}

/**
 * Presentation Event controller
 *
 * This file is part of pdfpc.
 *
 * Copyright (C) 2010-2011 Jakob Westhoff <jakob@westhoffswelt.de>
 * Copyright 2010 Joachim Breitner
 * Copyright 2011, 2012 David Vilar
 * Copyright 2012 Matthias Larisch
 * Copyright 2012, 2015 Robert Schroll
 * Copyright 2012 Thomas Tschager
 * Copyright 2015,2017 Andreas Bilke
 * Copyright 2015 Andy Barry
 * Copyright 2017 Olivier Pantalé
 * Copyright 2017 Philipp Berndt
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 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.
 */
static GType
screen_saver_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ScreenSaverIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) screen_saver_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType screen_saver_type_id;
	screen_saver_type_id = g_type_register_static (G_TYPE_INTERFACE, "ScreenSaver", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (screen_saver_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (screen_saver_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) screen_saver_proxy_get_type);
	g_type_set_qdata (screen_saver_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.ScreenSaver");
	g_type_set_qdata (screen_saver_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_screen_saver_dbus_interface_info));
	g_type_set_qdata (screen_saver_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) screen_saver_register_object);
	return screen_saver_type_id;
}

GType
screen_saver_get_type (void)
{
	static volatile gsize screen_saver_type_id__once = 0;
	if (g_once_init_enter (&screen_saver_type_id__once)) {
		GType screen_saver_type_id;
		screen_saver_type_id = screen_saver_get_type_once ();
		g_once_init_leave (&screen_saver_type_id__once, screen_saver_type_id);
	}
	return screen_saver_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (ScreenSaverProxy, screen_saver_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_SCREEN_SAVER, screen_saver_proxy_screen_saver_interface_init) )
static void
screen_saver_proxy_class_init (ScreenSaverProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = screen_saver_proxy_g_signal;
}

static void
screen_saver_proxy_g_signal (GDBusProxy* proxy,
                             const gchar* sender_name,
                             const gchar* signal_name,
                             GVariant* parameters)
{
}

static void
screen_saver_proxy_init (ScreenSaverProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_screen_saver_dbus_interface_info));
}

static void
_vala_g_async_ready_callback (GObject *source_object,
                              GAsyncResult *res,
                              void *user_data)
{
	g_task_return_pointer (user_data, g_object_ref (res), g_object_unref);
	g_object_unref (user_data);
}

static void
screen_saver_proxy_inhibit_async (ScreenSaver* self,
                                  const gchar* application_name,
                                  const gchar* reason,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.ScreenSaver", "Inhibit");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (application_name));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (reason));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static guint32
screen_saver_proxy_inhibit_finish (ScreenSaver* self,
                                   GAsyncResult* _res_,
                                   GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	guint32 _result = 0U;
	GVariant* _tmp5_;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		guint32 _tmp3_ = 0U;
		return _tmp3_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		guint32 _tmp4_ = 0U;
		g_object_unref (_reply_message);
		return _tmp4_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp5_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_uint32 (_tmp5_);
	g_variant_unref (_tmp5_);
	g_object_unref (_reply_message);
	return _result;
}

static void
screen_saver_proxy_un_inhibit (ScreenSaver* self,
                               guint32 cookie,
                               GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.ScreenSaver", "UnInhibit");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (cookie));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
screen_saver_proxy_screen_saver_interface_init (ScreenSaverIface* iface)
{
	iface->inhibit = screen_saver_proxy_inhibit_async;
	iface->inhibit_finish = screen_saver_proxy_inhibit_finish;
	iface->un_inhibit = screen_saver_proxy_un_inhibit;
}

static void
_dbus_screen_saver_inhibit (ScreenSaver* self,
                            GVariant* _parameters_,
                            GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	ScreenSaverInhibitReadyData* _ready_data;
	GVariant* _tmp6_;
	GVariant* _tmp7_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (ScreenSaverInhibitReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp6_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->application_name = g_variant_dup_string (_tmp6_, NULL);
	g_variant_unref (_tmp6_);
	_tmp7_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->reason = g_variant_dup_string (_tmp7_, NULL);
	g_variant_unref (_tmp7_);
	screen_saver_inhibit (self, _ready_data->application_name, _ready_data->reason, (GAsyncReadyCallback) _dbus_screen_saver_inhibit_ready, _ready_data);
	_error:
	;
}

static void
_dbus_screen_saver_inhibit_ready (GObject * source_object,
                                  GAsyncResult * _res_,
                                  gpointer _user_data_)
{
	ScreenSaverInhibitReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	guint32 result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	result = screen_saver_inhibit_finish ((ScreenSaver*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_uint32 (result));
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (_ready_data->application_name);
	_g_free0 (_ready_data->reason);
	g_slice_free (ScreenSaverInhibitReadyData, _ready_data);
}

static void
_dbus_screen_saver_un_inhibit (ScreenSaver* self,
                               GVariant* _parameters_,
                               GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	guint32 cookie = 0U;
	GVariant* _tmp8_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp8_ = g_variant_iter_next_value (&_arguments_iter);
	cookie = g_variant_get_uint32 (_tmp8_);
	g_variant_unref (_tmp8_);
	screen_saver_un_inhibit (self, cookie, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
screen_saver_dbus_interface_method_call (GDBusConnection* connection,
                                         const gchar* sender,
                                         const gchar* object_path,
                                         const gchar* interface_name,
                                         const gchar* method_name,
                                         GVariant* parameters,
                                         GDBusMethodInvocation* invocation,
                                         gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "Inhibit") == 0) {
		_dbus_screen_saver_inhibit (object, parameters, invocation);
	} else if (strcmp (method_name, "UnInhibit") == 0) {
		_dbus_screen_saver_un_inhibit (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
screen_saver_dbus_interface_get_property (GDBusConnection* connection,
                                          const gchar* sender,
                                          const gchar* object_path,
                                          const gchar* interface_name,
                                          const gchar* property_name,
                                          GError** error,
                                          gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return NULL;
}

static gboolean
screen_saver_dbus_interface_set_property (GDBusConnection* connection,
                                          const gchar* sender,
                                          const gchar* object_path,
                                          const gchar* interface_name,
                                          const gchar* property_name,
                                          GVariant* value,
                                          GError** error,
                                          gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}

guint
screen_saver_register_object (gpointer object,
                              GDBusConnection* connection,
                              const gchar* path,
                              GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_screen_saver_dbus_interface_info), &_screen_saver_dbus_interface_vtable, data, _screen_saver_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_screen_saver_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

static inline gpointer
pdfpc_key_def_get_instance_private (pdfpcKeyDef* self)
{
	return G_STRUCT_MEMBER_P (self, pdfpcKeyDef_private_offset);
}

pdfpcKeyDef*
pdfpc_key_def_construct (GType object_type,
                         guint k,
                         guint m)
{
	pdfpcKeyDef * self = NULL;
	self = (pdfpcKeyDef*) g_object_new (object_type, NULL);
	pdfpc_key_def_set_keycode (self, k);
	pdfpc_key_def_set_modMask (self, m);
	return self;
}

pdfpcKeyDef*
pdfpc_key_def_new (guint k,
                   guint m)
{
	return pdfpc_key_def_construct (PDFPC_TYPE_KEY_DEF, k, m);
}

static guint
pdfpc_key_def_real_hash (GeeHashable* base)
{
	pdfpcKeyDef * self;
	guint _tmp0_;
	guint _tmp1_;
	guint result;
	self = (pdfpcKeyDef*) base;
	_tmp0_ = self->priv->_modMask;
	_tmp1_ = self->priv->_keycode;
	result = (_tmp0_ << 8) | _tmp1_;
	return result;
}

static gboolean
pdfpc_key_def_real_equal_to (GeeHashable* base,
                             pdfpcKeyDef* other)
{
	pdfpcKeyDef * self;
	gboolean _tmp0_ = FALSE;
	guint _tmp1_;
	guint _tmp2_;
	gboolean result;
	self = (pdfpcKeyDef*) base;
	g_return_val_if_fail (other != NULL, FALSE);
	_tmp1_ = self->priv->_keycode;
	_tmp2_ = other->priv->_keycode;
	if (_tmp1_ == _tmp2_) {
		guint _tmp3_;
		guint _tmp4_;
		_tmp3_ = self->priv->_modMask;
		_tmp4_ = other->priv->_modMask;
		_tmp0_ = _tmp3_ == _tmp4_;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

guint
pdfpc_key_def_get_keycode (pdfpcKeyDef* self)
{
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_keycode;
	return result;
}

void
pdfpc_key_def_set_keycode (pdfpcKeyDef* self,
                           guint value)
{
	guint old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_key_def_get_keycode (self);
	if (old_value != value) {
		self->priv->_keycode = value;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_key_def_properties[PDFPC_KEY_DEF_KEYCODE_PROPERTY]);
	}
}

guint
pdfpc_key_def_get_modMask (pdfpcKeyDef* self)
{
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_modMask;
	return result;
}

void
pdfpc_key_def_set_modMask (pdfpcKeyDef* self,
                           guint value)
{
	guint old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_key_def_get_modMask (self);
	if (old_value != value) {
		self->priv->_modMask = value;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_key_def_properties[PDFPC_KEY_DEF_MOD_MASK_PROPERTY]);
	}
}

static void
pdfpc_key_def_class_init (pdfpcKeyDefClass * klass,
                          gpointer klass_data)
{
	pdfpc_key_def_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &pdfpcKeyDef_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_pdfpc_key_def_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_pdfpc_key_def_set_property;
	G_OBJECT_CLASS (klass)->finalize = pdfpc_key_def_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_KEY_DEF_KEYCODE_PROPERTY, pdfpc_key_def_properties[PDFPC_KEY_DEF_KEYCODE_PROPERTY] = g_param_spec_uint ("keycode", "keycode", "keycode", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_KEY_DEF_MOD_MASK_PROPERTY, pdfpc_key_def_properties[PDFPC_KEY_DEF_MOD_MASK_PROPERTY] = g_param_spec_uint ("modMask", "modMask", "modMask", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
pdfpc_key_def_gee_hashable_interface_init (GeeHashableIface * iface,
                                           gpointer iface_data)
{
	pdfpc_key_def_gee_hashable_parent_iface = g_type_interface_peek_parent (iface);
	iface->hash = (guint (*) (GeeHashable*)) pdfpc_key_def_real_hash;
	iface->equal_to = (gboolean (*) (GeeHashable*, gconstpointer)) pdfpc_key_def_real_equal_to;
}

static void
pdfpc_key_def_instance_init (pdfpcKeyDef * self,
                             gpointer klass)
{
	self->priv = pdfpc_key_def_get_instance_private (self);
}

static void
pdfpc_key_def_finalize (GObject * obj)
{
	pdfpcKeyDef * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PDFPC_TYPE_KEY_DEF, pdfpcKeyDef);
	G_OBJECT_CLASS (pdfpc_key_def_parent_class)->finalize (obj);
}

static GType
pdfpc_key_def_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (pdfpcKeyDefClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pdfpc_key_def_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (pdfpcKeyDef), 0, (GInstanceInitFunc) pdfpc_key_def_instance_init, NULL };
	static const GInterfaceInfo gee_hashable_info = { (GInterfaceInitFunc) pdfpc_key_def_gee_hashable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType pdfpc_key_def_type_id;
	pdfpc_key_def_type_id = g_type_register_static (G_TYPE_OBJECT, "pdfpcKeyDef", &g_define_type_info, 0);
	g_type_add_interface_static (pdfpc_key_def_type_id, GEE_TYPE_HASHABLE, &gee_hashable_info);
	pdfpcKeyDef_private_offset = g_type_add_instance_private (pdfpc_key_def_type_id, sizeof (pdfpcKeyDefPrivate));
	return pdfpc_key_def_type_id;
}

GType
pdfpc_key_def_get_type (void)
{
	static volatile gsize pdfpc_key_def_type_id__once = 0;
	if (g_once_init_enter (&pdfpc_key_def_type_id__once)) {
		GType pdfpc_key_def_type_id;
		pdfpc_key_def_type_id = pdfpc_key_def_get_type_once ();
		g_once_init_leave (&pdfpc_key_def_type_id__once, pdfpc_key_def_type_id);
	}
	return pdfpc_key_def_type_id__once;
}

static void
_vala_pdfpc_key_def_get_property (GObject * object,
                                  guint property_id,
                                  GValue * value,
                                  GParamSpec * pspec)
{
	pdfpcKeyDef * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PDFPC_TYPE_KEY_DEF, pdfpcKeyDef);
	switch (property_id) {
		case PDFPC_KEY_DEF_KEYCODE_PROPERTY:
		g_value_set_uint (value, pdfpc_key_def_get_keycode (self));
		break;
		case PDFPC_KEY_DEF_MOD_MASK_PROPERTY:
		g_value_set_uint (value, pdfpc_key_def_get_modMask (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_pdfpc_key_def_set_property (GObject * object,
                                  guint property_id,
                                  const GValue * value,
                                  GParamSpec * pspec)
{
	pdfpcKeyDef * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PDFPC_TYPE_KEY_DEF, pdfpcKeyDef);
	switch (property_id) {
		case PDFPC_KEY_DEF_KEYCODE_PROPERTY:
		pdfpc_key_def_set_keycode (self, g_value_get_uint (value));
		break;
		case PDFPC_KEY_DEF_MOD_MASK_PROPERTY:
		pdfpc_key_def_set_modMask (self, g_value_get_uint (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
pdfpc_presentation_controller_get_instance_private (pdfpcPresentationController* self)
{
	return G_STRUCT_MEMBER_P (self, pdfpcPresentationController_private_offset);
}

/**
         * Progress status of the talk
         */
static GType
pdfpc_presentation_controller_progress_status_get_type_once (void)
{
	static const GEnumValue values[] = {{PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_PreTalk, "PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_PreTalk", "pretalk"}, {PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Normal, "PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Normal", "normal"}, {PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Slow, "PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Slow", "slow"}, {PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Fast, "PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Fast", "fast"}, {PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_LastMinutes, "PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_LastMinutes", "lastminutes"}, {PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Overtime, "PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Overtime", "overtime"}, {0, NULL, NULL}};
	GType pdfpc_presentation_controller_progress_status_type_id;
	pdfpc_presentation_controller_progress_status_type_id = g_enum_register_static ("pdfpcPresentationControllerProgressStatus", values);
	return pdfpc_presentation_controller_progress_status_type_id;
}

GType
pdfpc_presentation_controller_progress_status_get_type (void)
{
	static volatile gsize pdfpc_presentation_controller_progress_status_type_id__once = 0;
	if (g_once_init_enter (&pdfpc_presentation_controller_progress_status_type_id__once)) {
		GType pdfpc_presentation_controller_progress_status_type_id;
		pdfpc_presentation_controller_progress_status_type_id = pdfpc_presentation_controller_progress_status_get_type_once ();
		g_once_init_leave (&pdfpc_presentation_controller_progress_status_type_id__once, pdfpc_presentation_controller_progress_status_type_id);
	}
	return pdfpc_presentation_controller_progress_status_type_id__once;
}

/**
         * Operation mode
         */
pdfpcPresentationControllerAnnotationMode
pdfpc_presentation_controller_annotation_mode_parse (const gchar* mode_str)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	static GQuark _tmp2_label1 = 0;
	static GQuark _tmp2_label2 = 0;
	static GQuark _tmp2_label3 = 0;
	static GQuark _tmp2_label4 = 0;
	pdfpcPresentationControllerAnnotationMode result;
	if (mode_str == NULL) {
		result = PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_NORMAL;
		return result;
	}
	_tmp0_ = g_utf8_strdown (mode_str, (gssize) -1);
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	g_free (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("normal")))) {
		switch (0) {
			default:
			{
				result = PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_NORMAL;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("pointer")))) {
		switch (0) {
			default:
			{
				result = PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_POINTER;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("spotlight")))) {
		switch (0) {
			default:
			{
				result = PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_SPOTLIGHT;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("pen")))) {
		switch (0) {
			default:
			{
				result = PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_PEN;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("eraser")))) {
		switch (0) {
			default:
			{
				result = PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_ERASER;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_NORMAL;
				return result;
			}
		}
	}
}

static GType
pdfpc_presentation_controller_annotation_mode_get_type_once (void)
{
	static const GEnumValue values[] = {{PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_NORMAL, "PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_NORMAL", "normal"}, {PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_POINTER, "PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_POINTER", "pointer"}, {PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_SPOTLIGHT, "PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_SPOTLIGHT", "spotlight"}, {PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_PEN, "PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_PEN", "pen"}, {PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_ERASER, "PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_ERASER", "eraser"}, {0, NULL, NULL}};
	GType pdfpc_presentation_controller_annotation_mode_type_id;
	pdfpc_presentation_controller_annotation_mode_type_id = g_enum_register_static ("pdfpcPresentationControllerAnnotationMode", values);
	return pdfpc_presentation_controller_annotation_mode_type_id;
}

GType
pdfpc_presentation_controller_annotation_mode_get_type (void)
{
	static volatile gsize pdfpc_presentation_controller_annotation_mode_type_id__once = 0;
	if (g_once_init_enter (&pdfpc_presentation_controller_annotation_mode_type_id__once)) {
		GType pdfpc_presentation_controller_annotation_mode_type_id;
		pdfpc_presentation_controller_annotation_mode_type_id = pdfpc_presentation_controller_annotation_mode_get_type_once ();
		g_once_init_leave (&pdfpc_presentation_controller_annotation_mode_type_id__once, pdfpc_presentation_controller_annotation_mode_type_id);
	}
	return pdfpc_presentation_controller_annotation_mode_type_id__once;
}

void
pdfpc_presentation_controller_switch_to_slide_number (pdfpcPresentationController* self,
                                                      gint slide_number,
                                                      gboolean skip_history)
{
	gint _tmp0_;
	gint old_user_slide_number = 0;
	gint _tmp1_;
	gint _tmp2_;
	gboolean _tmp3_ = FALSE;
	GeeArrayQueue* _tmp20_;
	gboolean _tmp21_;
	gboolean _tmp22_;
	gint _tmp24_;
	gint _tmp25_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_current_slide_number;
	if (slide_number == _tmp0_) {
		return;
	}
	_tmp1_ = pdfpc_presentation_controller_get_current_user_slide_number (self);
	_tmp2_ = _tmp1_;
	old_user_slide_number = _tmp2_;
	if (slide_number < 0) {
		_tmp3_ = TRUE;
	} else {
		guint _tmp4_;
		guint _tmp5_;
		_tmp4_ = pdfpc_presentation_controller_get_n_slides (self);
		_tmp5_ = _tmp4_;
		_tmp3_ = ((guint) slide_number) > _tmp5_;
	}
	if (_tmp3_) {
		return;
	} else {
		guint _tmp6_;
		guint _tmp7_;
		_tmp6_ = pdfpc_presentation_controller_get_n_slides (self);
		_tmp7_ = _tmp6_;
		if (((guint) slide_number) == _tmp7_) {
			gint _tmp8_;
			if (pdfpc_options_black_on_end) {
				pdfpc_presentation_controller_set_faded_to_black (self, TRUE);
			}
			_tmp8_ = slide_number;
			slide_number = _tmp8_ - 1;
		} else {
			gboolean _tmp9_;
			_tmp9_ = self->priv->_frozen;
			if (!_tmp9_) {
				pdfpc_presentation_controller_set_faded_to_black (self, FALSE);
			}
		}
	}
	if (!skip_history) {
		gboolean _tmp10_ = FALSE;
		GeeArrayQueue* _tmp11_;
		gboolean _tmp12_;
		gboolean _tmp13_;
		GeeArrayQueue* _tmp19_;
		_tmp11_ = self->priv->history_bck;
		_tmp12_ = gee_array_queue_get_is_empty (_tmp11_);
		_tmp13_ = _tmp12_;
		if (_tmp13_) {
			_tmp10_ = TRUE;
		} else {
			GeeArrayQueue* _tmp14_;
			gpointer _tmp15_;
			gint _tmp16_;
			_tmp14_ = self->priv->history_bck;
			_tmp15_ = gee_deque_peek_head ((GeeDeque*) _tmp14_);
			_tmp16_ = self->priv->_current_slide_number;
			_tmp10_ = ((gint) ((gintptr) _tmp15_)) != _tmp16_;
		}
		if (_tmp10_) {
			GeeArrayQueue* _tmp17_;
			gint _tmp18_;
			_tmp17_ = self->priv->history_bck;
			_tmp18_ = self->priv->_current_slide_number;
			gee_deque_offer_head ((GeeDeque*) _tmp17_, (gpointer) ((gintptr) _tmp18_));
		}
		_tmp19_ = self->priv->history_fwd;
		gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp19_);
	}
	pdfpc_presentation_controller_set_current_slide_number (self, slide_number);
	_tmp20_ = self->priv->history_bck;
	_tmp21_ = gee_array_queue_get_is_empty (_tmp20_);
	_tmp22_ = _tmp21_;
	if (!_tmp22_) {
		pdfpcTimer* _tmp23_;
		_tmp23_ = self->timer;
		pdfpc_timer_run (_tmp23_);
	}
	_tmp24_ = pdfpc_presentation_controller_get_current_user_slide_number (self);
	_tmp25_ = _tmp24_;
	if (_tmp25_ != old_user_slide_number) {
		self->highlight.width = (gdouble) 0;
		self->highlight.height = (gdouble) 0;
		pdfpc_presentation_controller_set_in_zoom (self, FALSE);
	}
	pdfpc_presentation_controller_controllables_update (self);
}

static Block5Data*
block5_data_ref (Block5Data* _data5_)
{
	g_atomic_int_inc (&_data5_->_ref_count_);
	return _data5_;
}

static void
block5_data_unref (void * _userdata_)
{
	Block5Data* _data5_;
	_data5_ = (Block5Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
		pdfpcPresentationController* self;
		self = _data5_->self;
		_g_object_unref0 (self);
		g_slice_free (Block5Data, _data5_);
	}
}

static gboolean
___lambda19_ (Block5Data* _data5_)
{
	pdfpcPresentationController* self;
	gboolean result;
	self = _data5_->self;
	if (pdfpc_presentation_controller_is_running (self)) {
		pdfpc_presentation_controller_switch_to_slide_number (self, _data5_->next_slide, FALSE);
	}
	self->autoadvance_timeout_id = (guint) 0;
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
____lambda19__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda19_ (self);
	return result;
}

void
pdfpc_presentation_controller_start_autoadvance_timer (pdfpcPresentationController* self,
                                                       gint slide_number)
{
	Block5Data* _data5_;
	gdouble duration = 0.0;
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	gint _tmp2_;
	pdfpcMetadataPdf* _tmp3_;
	pdfpcMetadataPdf* _tmp4_;
	g_return_if_fail (self != NULL);
	_data5_ = g_slice_new0 (Block5Data);
	_data5_->_ref_count_ = 1;
	_data5_->self = g_object_ref (self);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	duration = pdfpc_metadata_pdf_get_slide_duration (_tmp1_, slide_number);
	if (duration < ((gdouble) 0)) {
		block5_data_unref (_data5_);
		_data5_ = NULL;
		return;
	}
	if (!pdfpc_presentation_controller_is_running (self)) {
		block5_data_unref (_data5_);
		_data5_ = NULL;
		return;
	}
	if (self->autoadvance_timeout_id != ((guint) 0)) {
		g_source_remove (self->autoadvance_timeout_id);
		self->autoadvance_timeout_id = (guint) 0;
	}
	_tmp2_ = self->priv->_current_slide_number;
	_data5_->next_slide = _tmp2_ + 1;
	_tmp3_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp4_ = _tmp3_;
	_data5_->next_slide = pdfpc_metadata_pdf_nearest_nonhidden (_tmp4_, _data5_->next_slide, FALSE);
	if (duration > ((gdouble) 0)) {
		self->autoadvance_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) ((gint) (1000 * duration)), ____lambda19__gsource_func, block5_data_ref (_data5_), block5_data_unref);
	} else {
		pdfpc_presentation_controller_switch_to_slide_number (self, _data5_->next_slide, FALSE);
	}
	block5_data_unref (_data5_);
	_data5_ = NULL;
}

/**
         * Started & not paused
         */
gboolean
pdfpc_presentation_controller_is_running (pdfpcPresentationController* self)
{
	pdfpcTimer* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->timer;
	result = pdfpc_timer_is_running (_tmp0_);
	return result;
}

/**
         * Paused
         */
gboolean
pdfpc_presentation_controller_is_paused (pdfpcPresentationController* self)
{
	pdfpcTimer* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->timer;
	result = pdfpc_timer_is_paused (_tmp0_);
	return result;
}

void
pdfpc_presentation_controller_on_timer_change (pdfpcPresentationController* self,
                                               gint talk_time,
                                               pdfpcTimerState state,
                                               const gchar* label)
{
	gint duration = 0;
	pdfpcTimer* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gchar* sym = NULL;
	pdfpcTimer* _tmp9_;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (label != NULL);
	_tmp0_ = self->timer;
	_tmp1_ = pdfpc_timer_get_duration (_tmp0_);
	_tmp2_ = _tmp1_;
	duration = _tmp2_;
	pdfpc_presentation_controller_set_progress_status (self, PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Normal);
	if (state == PDFPC_TIMER_STATE_PreTalk) {
		pdfpc_presentation_controller_set_progress_status (self, PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_PreTalk);
	} else {
		if (duration > 0) {
			if (talk_time >= duration) {
				pdfpc_presentation_controller_set_progress_status (self, PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Overtime);
			} else {
				if (pdfpc_options_timer_pace_color) {
					gdouble expected_progress = 0.0;
					gint _tmp3_;
					gint _tmp4_;
					pdfpcMetadataPdf* _tmp5_;
					pdfpcMetadataPdf* _tmp6_;
					gint expected_time = 0;
					_tmp3_ = pdfpc_presentation_controller_get_current_user_slide_number (self);
					_tmp4_ = _tmp3_;
					_tmp5_ = pdfpc_presentation_controller_get_metadata (self);
					_tmp6_ = _tmp5_;
					expected_progress = (_tmp4_ + 0.5) / (pdfpc_metadata_pdf_get_end_user_slide (_tmp6_) + 1);
					expected_time = (gint) (duration * expected_progress);
					if (talk_time > (expected_time + 60)) {
						pdfpc_presentation_controller_set_progress_status (self, PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Slow);
					} else {
						if (talk_time < (expected_time - 60)) {
							pdfpc_presentation_controller_set_progress_status (self, PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Fast);
						} else {
							pdfpc_presentation_controller_set_progress_status (self, PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_Normal);
						}
					}
				} else {
					gint time_left = 0;
					pdfpcMetadataPdf* _tmp7_;
					pdfpcMetadataPdf* _tmp8_;
					time_left = duration - talk_time;
					_tmp7_ = pdfpc_presentation_controller_get_metadata (self);
					_tmp8_ = _tmp7_;
					if (((guint) time_left) < (60 * pdfpc_metadata_pdf_get_last_minutes (_tmp8_))) {
						pdfpc_presentation_controller_set_progress_status (self, PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_LastMinutes);
					}
				}
			}
		}
	}
	_tmp9_ = self->timer;
	switch (pdfpc_timer_get_mode (_tmp9_)) {
		case PDFPC_TIMER_MODE_CountUp:
		{
			gchar* _tmp10_;
			_tmp10_ = g_strdup (" \u2b08");
			_g_free0 (sym);
			sym = _tmp10_;
			break;
		}
		case PDFPC_TIMER_MODE_CountDown:
		{
			gchar* _tmp11_;
			_tmp11_ = g_strdup (" \u2b0a");
			_g_free0 (sym);
			sym = _tmp11_;
			break;
		}
		default:
		{
			gchar* _tmp12_;
			_tmp12_ = g_strdup ("");
			_g_free0 (sym);
			sym = _tmp12_;
			break;
		}
	}
	_tmp13_ = sym;
	_tmp14_ = g_strconcat (label, _tmp13_, NULL);
	_tmp15_ = _tmp14_;
	g_signal_emit (self, pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_TIMER_CHANGE_SIGNAL], 0, _tmp15_);
	_g_free0 (_tmp15_);
	_g_free0 (sym);
}

/**
         * Instantiate a new controller
         */
static void
___lambda44_ (pdfpcPresentationController* self,
              GObject* obj,
              GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		guint32 _tmp0_ = 0U;
		ScreenSaver* _tmp1_;
		_tmp1_ = self->screensaver;
		_tmp0_ = screen_saver_inhibit_finish (_tmp1_, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		self->screensaver_cookie = _tmp0_;
		g_print ("Screensaver inhibited\n");
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
____lambda44__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda44_ ((pdfpcPresentationController*) self, source_object, res);
	g_object_unref (self);
}

static void
__lambda43_ (pdfpcPresentationController* self,
             GObject* obj,
             GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		ScreenSaver* _tmp0_ = NULL;
		ScreenSaver* _tmp1_;
		ScreenSaver* _tmp2_;
		ScreenSaver* _tmp3_;
		ScreenSaver* _tmp4_;
		_tmp1_ = g_async_result_get_source_object (res);
		_tmp2_ = (ScreenSaver*) g_async_initable_new_finish ((GAsyncInitable *) _tmp1_, res, &_inner_error0_);
		g_object_unref (_tmp1_);
		_tmp0_ = (ScreenSaver*) _tmp2_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp3_ = _tmp0_;
		_tmp0_ = NULL;
		_g_object_unref0 (self->screensaver);
		self->screensaver = _tmp3_;
		_tmp4_ = self->screensaver;
		screen_saver_inhibit (_tmp4_, "pdfpc", "Showing a presentation", ____lambda44__gasync_ready_callback, g_object_ref (self));
		_g_object_unref0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda43__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda43_ ((pdfpcPresentationController*) self, source_object, res);
	g_object_unref (self);
}

pdfpcPresentationController*
pdfpc_presentation_controller_construct (GType object_type)
{
	pdfpcPresentationController * self = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayQueue* _tmp1_;
	GeeArrayQueue* _tmp2_;
	GError* _inner_error0_ = NULL;
	self = (pdfpcPresentationController*) g_object_new (object_type, NULL);
	_tmp0_ = gee_array_list_new (PDFPC_TYPE_CONTROLLABLE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->controllables);
	self->controllables = (GeeList*) _tmp0_;
	pdfpc_presentation_controller_init_pen_and_pointer (self);
	_tmp1_ = gee_array_queue_new (G_TYPE_INT, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->history_bck);
	self->priv->history_bck = _tmp1_;
	_tmp2_ = gee_array_queue_new (G_TYPE_INT, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->history_fwd);
	self->priv->history_fwd = _tmp2_;
	pdfpc_presentation_controller_add_actions (self);
	pdfpc_presentation_controller_readKeyBindings (self);
	pdfpc_presentation_controller_readMouseBindings (self);
	g_async_initable_new_async (TYPE_SCREEN_SAVER_PROXY, 0, NULL, ___lambda43__gasync_ready_callback, g_object_ref (self), "g-flags", 0, "g-name", "org.freedesktop.ScreenSaver", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/freedesktop/ScreenSaver", "g-interface-name", "org.freedesktop.ScreenSaver", NULL);
	pdfpc_dbus_server_start_server (self);
	return self;
}

pdfpcPresentationController*
pdfpc_presentation_controller_new (void)
{
	return pdfpc_presentation_controller_construct (PDFPC_TYPE_PRESENTATION_CONTROLLER);
}

gboolean
pdfpc_presentation_controller_is_pointer_active (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->annotation_mode == PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_POINTER;
	return result;
}

gboolean
pdfpc_presentation_controller_is_spotlight_active (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->annotation_mode == PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_SPOTLIGHT;
	return result;
}

gboolean
pdfpc_presentation_controller_is_eraser_active (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->annotation_mode == PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_ERASER;
	return result;
}

gboolean
pdfpc_presentation_controller_is_pen_active (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->annotation_mode == PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_PEN;
	return result;
}

gboolean
pdfpc_presentation_controller_in_drawing_mode (pdfpcPresentationController* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (pdfpc_presentation_controller_is_eraser_active (self)) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = pdfpc_presentation_controller_is_pen_active (self);
	}
	result = _tmp0_;
	return result;
}

gboolean
pdfpc_presentation_controller_in_pointing_mode (pdfpcPresentationController* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (pdfpc_presentation_controller_is_pointer_active (self)) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = pdfpc_presentation_controller_is_spotlight_active (self);
	}
	result = _tmp0_;
	return result;
}

gboolean
pdfpc_presentation_controller_in_normal_mode (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->annotation_mode == PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_NORMAL;
	return result;
}

gchar*
pdfpc_presentation_controller_get_mode_string (pdfpcPresentationController* self)
{
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	switch (self->priv->annotation_mode) {
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_POINTER:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("pointer");
			result = _tmp0_;
			return result;
		}
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_SPOTLIGHT:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("spotlight");
			result = _tmp1_;
			return result;
		}
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_PEN:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("pen");
			result = _tmp2_;
			return result;
		}
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_ERASER:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("eraser");
			result = _tmp3_;
			return result;
		}
		default:
		{
			gchar* _tmp4_;
			_tmp4_ = g_strdup ("normal");
			result = _tmp4_;
			return result;
		}
	}
}

void
pdfpc_presentation_controller_move_pen (pdfpcPresentationController* self,
                                        gdouble x,
                                        gdouble y)
{
	g_return_if_fail (self != NULL);
	if (self->pen_is_pressed) {
		pdfpcDrawingsDrawing* _tmp0_;
		pdfpcDrawingsDrawingTool* _tmp1_;
		_tmp0_ = self->pen_drawing;
		_tmp1_ = self->current_pen_drawing_tool;
		pdfpc_drawings_drawing_add_line (_tmp0_, _tmp1_, self->pen_last_x, self->pen_last_y, x, y);
	}
	self->pen_last_x = x;
	self->pen_last_y = y;
	pdfpc_presentation_controller_queue_pen_surface_draws (self);
}

void
pdfpc_presentation_controller_increase_pen_size (pdfpcPresentationController* self)
{
	pdfpcDrawingsDrawingTool* _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->current_pen_drawing_tool;
	_tmp1_ = pdfpc_drawings_drawing_tool_get_width (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ < ((gdouble) 500)) {
		pdfpcDrawingsDrawingTool* _tmp3_;
		pdfpcDrawingsDrawingTool* _tmp4_;
		gdouble _tmp5_;
		gdouble _tmp6_;
		_tmp3_ = self->current_pen_drawing_tool;
		_tmp4_ = self->current_pen_drawing_tool;
		_tmp5_ = pdfpc_drawings_drawing_tool_get_width (_tmp4_);
		_tmp6_ = _tmp5_;
		pdfpc_drawings_drawing_tool_set_width (_tmp4_, _tmp6_ + self->priv->pen_step);
	}
	pdfpc_presentation_controller_queue_pen_surface_draws (self);
}

void
pdfpc_presentation_controller_decrease_pen_size (pdfpcPresentationController* self)
{
	pdfpcDrawingsDrawingTool* _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->current_pen_drawing_tool;
	_tmp1_ = pdfpc_drawings_drawing_tool_get_width (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ > ((gdouble) self->priv->pen_step)) {
		pdfpcDrawingsDrawingTool* _tmp3_;
		pdfpcDrawingsDrawingTool* _tmp4_;
		gdouble _tmp5_;
		gdouble _tmp6_;
		_tmp3_ = self->current_pen_drawing_tool;
		_tmp4_ = self->current_pen_drawing_tool;
		_tmp5_ = pdfpc_drawings_drawing_tool_get_width (_tmp4_);
		_tmp6_ = _tmp5_;
		pdfpc_drawings_drawing_tool_set_width (_tmp4_, _tmp6_ - self->priv->pen_step);
	}
	pdfpc_presentation_controller_queue_pen_surface_draws (self);
}

void
pdfpc_presentation_controller_set_pen_size (pdfpcPresentationController* self,
                                            gdouble width)
{
	pdfpcDrawingsDrawingTool* _tmp0_;
	g_return_if_fail (self != NULL);
	if (width > ((gdouble) 500)) {
		width = (gdouble) 500;
	} else {
		if (width < ((gdouble) self->priv->pen_step)) {
			width = (gdouble) self->priv->pen_step;
		}
	}
	_tmp0_ = self->current_pen_drawing_tool;
	pdfpc_drawings_drawing_tool_set_width (_tmp0_, width);
}

gdouble
pdfpc_presentation_controller_get_pen_size (pdfpcPresentationController* self)
{
	pdfpcDrawingsDrawingTool* _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	gdouble result;
	g_return_val_if_fail (self != NULL, 0.0);
	_tmp0_ = self->current_pen_drawing_tool;
	_tmp1_ = pdfpc_drawings_drawing_tool_get_width (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

void
pdfpc_presentation_controller_set_pen_pressure (pdfpcPresentationController* self,
                                                gdouble pressure)
{
	pdfpcDrawingsDrawingTool* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->current_pen_drawing_tool;
	pdfpc_drawings_drawing_tool_set_pressure (_tmp0_, pressure);
}

void
pdfpc_presentation_controller_queue_pen_surface_draws (pdfpcPresentationController* self)
{
	pdfpcWindowPresenter* _tmp0_;
	pdfpcWindowPresenter* _tmp1_;
	pdfpcWindowPresentation* _tmp6_;
	pdfpcWindowPresentation* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_presenter (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		pdfpcWindowPresenter* _tmp2_;
		pdfpcWindowPresenter* _tmp3_;
		GtkDrawingArea* _tmp4_;
		GtkDrawingArea* _tmp5_;
		_tmp2_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp3_ = _tmp2_;
		_tmp4_ = pdfpc_window_controllable_window_get_pen_drawing_surface ((pdfpcWindowControllableWindow*) _tmp3_);
		_tmp5_ = _tmp4_;
		gtk_widget_queue_draw ((GtkWidget*) _tmp5_);
	}
	_tmp6_ = pdfpc_presentation_controller_get_presentation (self);
	_tmp7_ = _tmp6_;
	if (_tmp7_ != NULL) {
		pdfpcWindowPresentation* _tmp8_;
		pdfpcWindowPresentation* _tmp9_;
		GtkDrawingArea* _tmp10_;
		GtkDrawingArea* _tmp11_;
		_tmp8_ = pdfpc_presentation_controller_get_presentation (self);
		_tmp9_ = _tmp8_;
		_tmp10_ = pdfpc_window_controllable_window_get_pen_drawing_surface ((pdfpcWindowControllableWindow*) _tmp9_);
		_tmp11_ = _tmp10_;
		gtk_widget_queue_draw ((GtkWidget*) _tmp11_);
	}
}

void
pdfpc_presentation_controller_update_pen_drawing (pdfpcPresentationController* self)
{
	pdfpcDrawingsDrawing* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->pen_drawing;
	_tmp1_ = pdfpc_presentation_controller_get_current_user_slide_number (self);
	_tmp2_ = _tmp1_;
	pdfpc_drawings_drawing_switch_to_slide (_tmp0_, _tmp2_);
}

static void
pdfpc_presentation_controller_hide_or_show_pen_surfaces (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	if (self->priv->pen_drawing_present) {
		pdfpcWindowPresenter* _tmp0_;
		pdfpcWindowPresenter* _tmp1_;
		pdfpcWindowPresentation* _tmp4_;
		pdfpcWindowPresentation* _tmp5_;
		_tmp0_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp1_ = _tmp0_;
		if (_tmp1_ != NULL) {
			pdfpcWindowPresenter* _tmp2_;
			pdfpcWindowPresenter* _tmp3_;
			_tmp2_ = pdfpc_presentation_controller_get_presenter (self);
			_tmp3_ = _tmp2_;
			pdfpc_window_controllable_window_enable_pen ((pdfpcWindowControllableWindow*) _tmp3_, TRUE);
		}
		_tmp4_ = pdfpc_presentation_controller_get_presentation (self);
		_tmp5_ = _tmp4_;
		if (_tmp5_ != NULL) {
			pdfpcWindowPresentation* _tmp6_;
			pdfpcWindowPresentation* _tmp7_;
			_tmp6_ = pdfpc_presentation_controller_get_presentation (self);
			_tmp7_ = _tmp6_;
			pdfpc_window_controllable_window_enable_pen ((pdfpcWindowControllableWindow*) _tmp7_, TRUE);
		}
		pdfpc_presentation_controller_queue_pen_surface_draws (self);
	} else {
		pdfpcWindowPresenter* _tmp8_;
		pdfpcWindowPresenter* _tmp9_;
		pdfpcWindowPresentation* _tmp12_;
		pdfpcWindowPresentation* _tmp13_;
		_tmp8_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp9_ = _tmp8_;
		if (_tmp9_ != NULL) {
			pdfpcWindowPresenter* _tmp10_;
			pdfpcWindowPresenter* _tmp11_;
			_tmp10_ = pdfpc_presentation_controller_get_presenter (self);
			_tmp11_ = _tmp10_;
			pdfpc_window_controllable_window_enable_pen ((pdfpcWindowControllableWindow*) _tmp11_, FALSE);
		}
		_tmp12_ = pdfpc_presentation_controller_get_presentation (self);
		_tmp13_ = _tmp12_;
		if (_tmp13_ != NULL) {
			pdfpcWindowPresentation* _tmp14_;
			pdfpcWindowPresentation* _tmp15_;
			_tmp14_ = pdfpc_presentation_controller_get_presentation (self);
			_tmp15_ = _tmp14_;
			pdfpc_window_controllable_window_enable_pen ((pdfpcWindowControllableWindow*) _tmp15_, FALSE);
		}
	}
}

static void
pdfpc_presentation_controller_hide_or_show_pointer_surfaces (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	if (pdfpc_presentation_controller_in_pointing_mode (self)) {
		pdfpcWindowPresenter* _tmp0_;
		pdfpcWindowPresenter* _tmp1_;
		pdfpcWindowPresentation* _tmp4_;
		pdfpcWindowPresentation* _tmp5_;
		_tmp0_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp1_ = _tmp0_;
		if (_tmp1_ != NULL) {
			pdfpcWindowPresenter* _tmp2_;
			pdfpcWindowPresenter* _tmp3_;
			_tmp2_ = pdfpc_presentation_controller_get_presenter (self);
			_tmp3_ = _tmp2_;
			pdfpc_window_controllable_window_enable_pointer ((pdfpcWindowControllableWindow*) _tmp3_, TRUE);
		}
		_tmp4_ = pdfpc_presentation_controller_get_presentation (self);
		_tmp5_ = _tmp4_;
		if (_tmp5_ != NULL) {
			pdfpcWindowPresentation* _tmp6_;
			pdfpcWindowPresentation* _tmp7_;
			_tmp6_ = pdfpc_presentation_controller_get_presentation (self);
			_tmp7_ = _tmp6_;
			pdfpc_window_controllable_window_enable_pointer ((pdfpcWindowControllableWindow*) _tmp7_, TRUE);
		}
	} else {
		pdfpcWindowPresenter* _tmp8_;
		pdfpcWindowPresenter* _tmp9_;
		pdfpcWindowPresentation* _tmp12_;
		pdfpcWindowPresentation* _tmp13_;
		_tmp8_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp9_ = _tmp8_;
		if (_tmp9_ != NULL) {
			pdfpcWindowPresenter* _tmp10_;
			pdfpcWindowPresenter* _tmp11_;
			_tmp10_ = pdfpc_presentation_controller_get_presenter (self);
			_tmp11_ = _tmp10_;
			pdfpc_window_controllable_window_enable_pointer ((pdfpcWindowControllableWindow*) _tmp11_, FALSE);
		}
		_tmp12_ = pdfpc_presentation_controller_get_presentation (self);
		_tmp13_ = _tmp12_;
		if (_tmp13_ != NULL) {
			pdfpcWindowPresentation* _tmp14_;
			pdfpcWindowPresentation* _tmp15_;
			_tmp14_ = pdfpc_presentation_controller_get_presentation (self);
			_tmp15_ = _tmp14_;
			pdfpc_window_controllable_window_enable_pointer ((pdfpcWindowControllableWindow*) _tmp15_, FALSE);
		}
	}
}

static gpointer
_pdfpc_drawings_drawing_tool_ref0 (gpointer self)
{
	return self ? pdfpc_drawings_drawing_tool_ref (self) : NULL;
}

void
pdfpc_presentation_controller_set_mode (pdfpcPresentationController* self,
                                        pdfpcPresentationControllerAnnotationMode mode)
{
	gboolean _tmp0_;
	pdfpcWindowPresenter* _tmp11_;
	pdfpcWindowPresenter* _tmp12_;
	g_return_if_fail (self != NULL);
	if (self->priv->annotation_mode == mode) {
		return;
	}
	_tmp0_ = self->priv->_in_zoom;
	if (_tmp0_) {
		return;
	}
	self->priv->annotation_mode = mode;
	switch (mode) {
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_NORMAL:
		{
			break;
		}
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_POINTER:
		{
			pdfpcPresentationControllerPointerTool* _tmp1_;
			_tmp1_ = self->pointer;
			pdfpc_presentation_controller_set_current_pointer (self, _tmp1_);
			break;
		}
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_SPOTLIGHT:
		{
			pdfpcPresentationControllerPointerTool* _tmp2_;
			_tmp2_ = self->spotlight;
			pdfpc_presentation_controller_set_current_pointer (self, _tmp2_);
			break;
		}
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_PEN:
		{
			pdfpcDrawingsDrawing* _tmp3_;
			pdfpcDrawingsDrawingTool* _tmp4_;
			pdfpcDrawingsDrawingTool* _tmp5_;
			pdfpcDrawingsDrawingTool* _tmp6_;
			self->priv->pen_drawing_present = TRUE;
			_tmp3_ = self->pen_drawing;
			_tmp4_ = pdfpc_drawings_drawing_get_pen (_tmp3_);
			_tmp5_ = _tmp4_;
			_tmp6_ = _pdfpc_drawings_drawing_tool_ref0 (_tmp5_);
			_pdfpc_drawings_drawing_tool_unref0 (self->current_pen_drawing_tool);
			self->current_pen_drawing_tool = _tmp6_;
			break;
		}
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_ERASER:
		{
			pdfpcDrawingsDrawing* _tmp7_;
			pdfpcDrawingsDrawingTool* _tmp8_;
			pdfpcDrawingsDrawingTool* _tmp9_;
			pdfpcDrawingsDrawingTool* _tmp10_;
			self->priv->pen_drawing_present = TRUE;
			_tmp7_ = self->pen_drawing;
			_tmp8_ = pdfpc_drawings_drawing_get_eraser (_tmp7_);
			_tmp9_ = _tmp8_;
			_tmp10_ = _pdfpc_drawings_drawing_tool_ref0 (_tmp9_);
			_pdfpc_drawings_drawing_tool_unref0 (self->current_pen_drawing_tool);
			self->current_pen_drawing_tool = _tmp10_;
			self->pen_is_pressed = FALSE;
			break;
		}
		default:
		break;
	}
	pdfpc_presentation_controller_hide_or_show_pointer_surfaces (self);
	pdfpc_presentation_controller_hide_or_show_pen_surfaces (self);
	_tmp11_ = pdfpc_presentation_controller_get_presenter (self);
	_tmp12_ = _tmp11_;
	if (_tmp12_ != NULL) {
		pdfpcWindowPresenter* _tmp15_;
		pdfpcWindowPresenter* _tmp16_;
		pdfpcViewPdf* _tmp17_;
		pdfpcViewPdf* _tmp18_;
		GdkWindow* _tmp19_;
		if (pdfpc_options_maximize_in_drawing) {
			pdfpcWindowPresenter* _tmp13_;
			pdfpcWindowPresenter* _tmp14_;
			_tmp13_ = pdfpc_presentation_controller_get_presenter (self);
			_tmp14_ = _tmp13_;
			pdfpc_window_presenter_maximize_current_view (_tmp14_, pdfpc_presentation_controller_in_drawing_mode (self));
		}
		_tmp15_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp16_ = _tmp15_;
		_tmp17_ = pdfpc_controllable_get_main_view ((pdfpcControllable*) _tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = gtk_widget_get_window ((GtkWidget*) _tmp18_);
		gdk_window_set_event_compression (_tmp19_, !pdfpc_presentation_controller_in_drawing_mode (self));
	}
	pdfpc_presentation_controller_controllables_update (self);
}

void
pdfpc_presentation_controller_set_normal_mode (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	pdfpc_presentation_controller_set_mode (self, PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_NORMAL);
}

void
pdfpc_presentation_controller_set_pointer_mode (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	pdfpc_presentation_controller_set_mode (self, PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_POINTER);
}

void
pdfpc_presentation_controller_set_pen_mode (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	pdfpc_presentation_controller_set_mode (self, PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_PEN);
}

void
pdfpc_presentation_controller_set_eraser_mode (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	pdfpc_presentation_controller_set_mode (self, PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_ERASER);
}

void
pdfpc_presentation_controller_set_spotlight_mode (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	pdfpc_presentation_controller_set_mode (self, PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_SPOTLIGHT);
}

void
pdfpc_presentation_controller_toggle_drawings (pdfpcPresentationController* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_in_zoom;
	if (_tmp0_) {
		return;
	}
	self->priv->pen_drawing_present = !self->priv->pen_drawing_present;
	if (!self->priv->pen_drawing_present) {
		_tmp1_ = pdfpc_presentation_controller_in_drawing_mode (self);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		pdfpc_presentation_controller_set_mode (self, PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_NORMAL);
	} else {
		pdfpc_presentation_controller_hide_or_show_pen_surfaces (self);
	}
}

void
pdfpc_presentation_controller_clear_pen_drawing (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	if (self->priv->pen_drawing_present) {
		pdfpcDrawingsDrawing* _tmp0_;
		_tmp0_ = self->pen_drawing;
		pdfpc_drawings_drawing_clear (_tmp0_);
		pdfpc_presentation_controller_queue_pen_surface_draws (self);
	}
}

static void
_pdfpc_presentation_controller_update_pen_drawing_pdfpc_presentation_controller_update_request (pdfpcPresentationController* _sender,
                                                                                                gpointer self)
{
	pdfpc_presentation_controller_update_pen_drawing ((pdfpcPresentationController*) self);
}

static void
pdfpc_presentation_controller_init_pen_and_pointer (pdfpcPresentationController* self)
{
	pdfpcPresentationControllerPointerTool* _tmp0_;
	pdfpcPresentationControllerPointerTool* _tmp1_;
	pdfpcPresentationControllerPointerTool* _tmp2_;
	pdfpcPresentationControllerPointerTool* _tmp3_;
	pdfpcPresentationControllerPointerTool* _tmp4_;
	GdkRGBA rgba = {0};
	const gchar* _tmp6_;
	gboolean _tmp8_ = FALSE;
	pdfpcPresentationControllerPointerTool* _tmp9_;
	GdkRGBA _tmp10_;
	pdfpcPresentationControllerPointerTool* _tmp11_;
	pdfpcPresentationControllerPointerTool* _tmp12_;
	gboolean _tmp14_ = FALSE;
	pdfpcPresentationControllerPointerTool* _tmp15_;
	GdkRGBA _tmp16_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_pointer_tool_new (FALSE);
	_pdfpc_presentation_controller_pointer_tool_unref0 (self->pointer);
	self->pointer = _tmp0_;
	_tmp1_ = pdfpc_presentation_controller_pointer_tool_new (TRUE);
	_pdfpc_presentation_controller_pointer_tool_unref0 (self->spotlight);
	self->spotlight = _tmp1_;
	_tmp2_ = self->pointer;
	pdfpc_presentation_controller_set_current_pointer (self, _tmp2_);
	_tmp3_ = self->pointer;
	_tmp3_->size = (gdouble) pdfpc_options_pointer_size;
	_tmp4_ = self->pointer;
	if (_tmp4_->size > ((gdouble) 500)) {
		pdfpcPresentationControllerPointerTool* _tmp5_;
		_tmp5_ = self->pointer;
		_tmp5_->size = (gdouble) 500;
	}
	memset (&rgba, 0, sizeof (GdkRGBA));
	_tmp6_ = pdfpc_options_pointer_color;
	if (gdk_rgba_parse (&rgba, _tmp6_) != TRUE) {
		const gchar* _tmp7_;
		_tmp7_ = pdfpc_options_pointer_color;
		g_printerr ("Cannot parse color specification '%s'\n", _tmp7_);
		gdk_rgba_parse (&rgba, "red");
	}
	if (pdfpc_options_pointer_opacity >= 0) {
		_tmp8_ = pdfpc_options_pointer_opacity <= 100;
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		rgba.alpha = ((gdouble) pdfpc_options_pointer_opacity) / 100.0;
	} else {
		rgba.alpha = 1.0;
	}
	_tmp9_ = self->pointer;
	_tmp10_ = rgba;
	pdfpc_presentation_controller_pointer_tool_set_rgba (_tmp9_, &_tmp10_);
	_tmp11_ = self->spotlight;
	_tmp11_->size = (gdouble) pdfpc_options_spotlight_size;
	_tmp12_ = self->spotlight;
	if (_tmp12_->size > ((gdouble) 500)) {
		pdfpcPresentationControllerPointerTool* _tmp13_;
		_tmp13_ = self->spotlight;
		_tmp13_->size = (gdouble) 500;
	}
	gdk_rgba_parse (&rgba, "black");
	if (pdfpc_options_spotlight_opacity >= 0) {
		_tmp14_ = pdfpc_options_spotlight_opacity <= 100;
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		rgba.alpha = ((gdouble) pdfpc_options_spotlight_opacity) / 100.0;
	} else {
		rgba.alpha = 0.5;
	}
	_tmp15_ = self->spotlight;
	_tmp16_ = rgba;
	pdfpc_presentation_controller_pointer_tool_set_rgba (_tmp15_, &_tmp16_);
	g_signal_connect_object (self, "update-request", (GCallback) _pdfpc_presentation_controller_update_pen_drawing_pdfpc_presentation_controller_update_request, self, 0);
}

static void
pdfpc_presentation_controller_queue_pointer_surface_draws (pdfpcPresentationController* self)
{
	pdfpcWindowPresenter* _tmp0_;
	pdfpcWindowPresenter* _tmp1_;
	pdfpcWindowPresentation* _tmp6_;
	pdfpcWindowPresentation* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_presenter (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		pdfpcWindowPresenter* _tmp2_;
		pdfpcWindowPresenter* _tmp3_;
		GtkDrawingArea* _tmp4_;
		GtkDrawingArea* _tmp5_;
		_tmp2_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp3_ = _tmp2_;
		_tmp4_ = pdfpc_window_controllable_window_get_pointer_drawing_surface ((pdfpcWindowControllableWindow*) _tmp3_);
		_tmp5_ = _tmp4_;
		gtk_widget_queue_draw ((GtkWidget*) _tmp5_);
	}
	_tmp6_ = pdfpc_presentation_controller_get_presentation (self);
	_tmp7_ = _tmp6_;
	if (_tmp7_ != NULL) {
		pdfpcWindowPresentation* _tmp8_;
		pdfpcWindowPresentation* _tmp9_;
		GtkDrawingArea* _tmp10_;
		GtkDrawingArea* _tmp11_;
		_tmp8_ = pdfpc_presentation_controller_get_presentation (self);
		_tmp9_ = _tmp8_;
		_tmp10_ = pdfpc_window_controllable_window_get_pointer_drawing_surface ((pdfpcWindowControllableWindow*) _tmp9_);
		_tmp11_ = _tmp10_;
		gtk_widget_queue_draw ((GtkWidget*) _tmp11_);
	}
}

/**
         * Handle mouse motion events from controllables' main views
         */
gboolean
pdfpc_presentation_controller_on_move_pen (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	pdfpc_presentation_controller_restart_pointer_timer (self);
	self->pointer_hidden = FALSE;
	pdfpc_presentation_controller_move_pen (self, self->pointer_x, self->pointer_y);
	result = TRUE;
	return result;
}

gboolean
pdfpc_presentation_controller_on_enter_notify (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	self->pointer_hidden = FALSE;
	result = TRUE;
	return result;
}

gboolean
pdfpc_presentation_controller_on_leave_notify (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	self->pointer_hidden = TRUE;
	if (pdfpc_presentation_controller_in_pointing_mode (self)) {
		pdfpc_presentation_controller_queue_pointer_surface_draws (self);
	} else {
		if (pdfpc_presentation_controller_in_drawing_mode (self)) {
			pdfpc_presentation_controller_queue_pen_surface_draws (self);
		}
	}
	result = TRUE;
	return result;
}

/**
         * Handle key presses from controllables
         */
static gpointer
_g_variant_ref0 (gpointer self)
{
	return self ? g_variant_ref (self) : NULL;
}

gboolean
pdfpc_presentation_controller_on_key_press (pdfpcPresentationController* self,
                                            pdfpcKeyDef* keydef)
{
	gboolean _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (keydef != NULL, FALSE);
	_tmp0_ = self->priv->_ignore_keyboard_events;
	if (!_tmp0_) {
		pdfpcPresentationControllerActionAndParameter* action_with_parameter = NULL;
		GeeHashMap* _tmp1_;
		gpointer _tmp2_;
		pdfpcPresentationControllerActionAndParameter* _tmp3_;
		_tmp1_ = self->keyBindings;
		_tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp1_, keydef);
		action_with_parameter = (pdfpcPresentationControllerActionAndParameter*) _tmp2_;
		_tmp3_ = action_with_parameter;
		if (_tmp3_ != NULL) {
			GVariant* param = NULL;
			pdfpcPresentationControllerActionAndParameter* _tmp4_;
			GVariant* _tmp5_;
			GVariant* _tmp6_;
			GVariant* _tmp7_;
			pdfpcPresentationControllerActionAndParameter* _tmp8_;
			GAction* _tmp9_;
			GAction* _tmp10_;
			GVariant* _tmp11_;
			_tmp4_ = action_with_parameter;
			_tmp5_ = pdfpc_presentation_controller_action_and_parameter_get_parameter (_tmp4_);
			_tmp6_ = _tmp5_;
			_tmp7_ = _g_variant_ref0 (_tmp6_);
			param = _tmp7_;
			_tmp8_ = action_with_parameter;
			_tmp9_ = pdfpc_presentation_controller_action_and_parameter_get_action (_tmp8_);
			_tmp10_ = _tmp9_;
			_tmp11_ = param;
			g_action_activate (_tmp10_, _tmp11_);
			result = TRUE;
			_g_variant_unref0 (param);
			_g_object_unref0 (action_with_parameter);
			return result;
		} else {
			result = FALSE;
			_g_object_unref0 (action_with_parameter);
			return result;
		}
		_g_object_unref0 (action_with_parameter);
	} else {
		result = FALSE;
		return result;
	}
}

/**
         * Handle mouse clicks from controllables
         */
gboolean
pdfpc_presentation_controller_on_button_press (pdfpcPresentationController* self,
                                               pdfpcKeyDef* keydef)
{
	gboolean _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (keydef != NULL, FALSE);
	_tmp0_ = self->priv->_ignore_mouse_events;
	if (!_tmp0_) {
		pdfpcPresentationControllerActionAndParameter* action_with_parameter = NULL;
		GeeHashMap* _tmp1_;
		gpointer _tmp2_;
		pdfpcPresentationControllerActionAndParameter* _tmp3_;
		_tmp1_ = self->mouseBindings;
		_tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp1_, keydef);
		action_with_parameter = (pdfpcPresentationControllerActionAndParameter*) _tmp2_;
		_tmp3_ = action_with_parameter;
		if (_tmp3_ != NULL) {
			GVariant* param = NULL;
			pdfpcPresentationControllerActionAndParameter* _tmp4_;
			GVariant* _tmp5_;
			GVariant* _tmp6_;
			GVariant* _tmp7_;
			pdfpcPresentationControllerActionAndParameter* _tmp8_;
			GAction* _tmp9_;
			GAction* _tmp10_;
			GVariant* _tmp11_;
			_tmp4_ = action_with_parameter;
			_tmp5_ = pdfpc_presentation_controller_action_and_parameter_get_parameter (_tmp4_);
			_tmp6_ = _tmp5_;
			_tmp7_ = _g_variant_ref0 (_tmp6_);
			param = _tmp7_;
			_tmp8_ = action_with_parameter;
			_tmp9_ = pdfpc_presentation_controller_action_and_parameter_get_action (_tmp8_);
			_tmp10_ = _tmp9_;
			_tmp11_ = param;
			g_action_activate (_tmp10_, _tmp11_);
			result = TRUE;
			_g_variant_unref0 (param);
			_g_object_unref0 (action_with_parameter);
			return result;
		} else {
			result = FALSE;
			_g_object_unref0 (action_with_parameter);
			return result;
		}
		_g_object_unref0 (action_with_parameter);
	} else {
		result = FALSE;
		return result;
	}
}

/**
         * Handle mouse scrolls from controllables
         */
gboolean
pdfpc_presentation_controller_on_scroll (pdfpcPresentationController* self,
                                         gboolean up,
                                         guint state)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->_ignore_mouse_events;
	if (!_tmp1_) {
		_tmp0_ = !pdfpc_options_disable_scrolling;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		if (up) {
			if ((state & GDK_SHIFT_MASK) != ((guint) 0)) {
				pdfpc_presentation_controller_back10 (self);
			} else {
				pdfpc_presentation_controller_previous_page (self);
			}
		} else {
			if ((state & GDK_SHIFT_MASK) != ((guint) 0)) {
				pdfpc_presentation_controller_jump10 (self);
			} else {
				pdfpc_presentation_controller_next_page (self);
			}
		}
		result = TRUE;
		return result;
	} else {
		result = FALSE;
		return result;
	}
}

static gboolean
__lambda18_ (pdfpcPresentationController* self)
{
	gboolean result;
	self->pointer_timeout_id = (guint) 0;
	self->pointer_hidden = TRUE;
	pdfpc_presentation_controller_queue_pointer_surface_draws (self);
	pdfpc_presentation_controller_queue_pen_surface_draws (self);
	result = FALSE;
	return result;
}

static gboolean
___lambda18__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda18_ ((pdfpcPresentationController*) self);
	return result;
}

void
pdfpc_presentation_controller_restart_pointer_timer (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	if (self->pointer_timeout_id != ((guint) 0)) {
		g_source_remove (self->pointer_timeout_id);
	}
	self->pointer_timeout_id = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) pdfpc_options_cursor_timeout, ___lambda18__gsource_func, g_object_ref (self), g_object_unref);
}

static gdouble
double_parse (const gchar* str)
{
	gdouble result;
	g_return_val_if_fail (str != NULL, 0.0);
	result = g_ascii_strtod (str, NULL);
	return result;
}

static void
pdfpc_presentation_controller_move_pointer (pdfpcPresentationController* self,
                                            GVariant* point)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	if (!pdfpc_presentation_controller_in_pointing_mode (self)) {
		return;
	}
	{
		GRegex* regex = NULL;
		GRegex* _tmp0_;
		gchar** parts = NULL;
		GRegex* _tmp1_;
		const gchar* _tmp2_;
		gchar** _tmp3_;
		gchar** _tmp4_;
		gint parts_length1;
		gint _parts_size_;
		gchar** _tmp5_;
		gint _tmp5__length1;
		gchar** _tmp6_;
		gint _tmp6__length1;
		const gchar* _tmp7_;
		gchar** _tmp8_;
		gint _tmp8__length1;
		const gchar* _tmp9_;
		_tmp0_ = g_regex_new ("([^,]+),([^,]+)", 0, 0, &_inner_error0_);
		regex = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp1_ = regex;
		_tmp2_ = g_variant_get_string (point, NULL);
		_tmp4_ = _tmp3_ = g_regex_split (_tmp1_, _tmp2_, 0);
		parts = _tmp4_;
		parts_length1 = _vala_array_length (_tmp3_);
		_parts_size_ = parts_length1;
		_tmp5_ = parts;
		_tmp5__length1 = parts_length1;
		if (_tmp5__length1 != 4) {
			parts = (_vala_array_free (parts, parts_length1, (GDestroyNotify) g_free), NULL);
			_g_regex_unref0 (regex);
			return;
		}
		_tmp6_ = parts;
		_tmp6__length1 = parts_length1;
		_tmp7_ = _tmp6_[1];
		self->pointer_x = self->pointer_x + double_parse (_tmp7_);
		if (self->pointer_x > 1.0) {
			self->pointer_x = 1.0;
		} else {
			if (self->pointer_x < 0.0) {
				self->pointer_x = 0.0;
			}
		}
		_tmp8_ = parts;
		_tmp8__length1 = parts_length1;
		_tmp9_ = _tmp8_[2];
		self->pointer_y = self->pointer_y + double_parse (_tmp9_);
		if (self->pointer_y > 1.0) {
			self->pointer_y = 1.0;
		} else {
			if (self->pointer_y < 0.0) {
				self->pointer_y = 0.0;
			}
		}
		parts = (_vala_array_free (parts, parts_length1, (GDestroyNotify) g_free), NULL);
		_g_regex_unref0 (regex);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		return;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	pdfpc_presentation_controller_restart_pointer_timer (self);
	self->pointer_hidden = FALSE;
	pdfpc_presentation_controller_queue_pointer_surface_draws (self);
	pdfpc_presentation_controller_update_highlight (self, self->pointer_x, self->pointer_y);
}

gboolean
pdfpc_presentation_controller_on_move_pointer (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	pdfpc_presentation_controller_restart_pointer_timer (self);
	self->pointer_hidden = FALSE;
	pdfpc_presentation_controller_queue_pointer_surface_draws (self);
	pdfpc_presentation_controller_update_highlight (self, self->pointer_x, self->pointer_y);
	result = TRUE;
	return result;
}

void
pdfpc_presentation_controller_update_highlight (pdfpcPresentationController* self,
                                                gdouble x,
                                                gdouble y)
{
	g_return_if_fail (self != NULL);
	if (self->drag_x != ((gdouble) -1)) {
		gdouble _tmp0_ = 0.0;
		gdouble _tmp1_ = 0.0;
		self->highlight.width = fabs (self->drag_x - x);
		self->highlight.height = fabs (self->drag_y - y);
		if (self->drag_x < x) {
			_tmp0_ = self->drag_x;
		} else {
			_tmp0_ = x;
		}
		self->highlight.x = _tmp0_;
		if (self->drag_y < y) {
			_tmp1_ = self->drag_y;
		} else {
			_tmp1_ = y;
		}
		self->highlight.y = _tmp1_;
		pdfpc_presentation_controller_queue_pointer_surface_draws (self);
	}
}

void
pdfpc_presentation_controller_increase_pointer_size (pdfpcPresentationController* self)
{
	pdfpcPresentationControllerPointerTool* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_current_pointer;
	if (_tmp0_->size < ((gdouble) 500)) {
		pdfpcPresentationControllerPointerTool* _tmp1_;
		pdfpcPresentationControllerPointerTool* _tmp2_;
		_tmp1_ = self->priv->_current_pointer;
		_tmp2_ = self->priv->_current_pointer;
		_tmp2_->size = _tmp2_->size + self->pointer_step;
		pdfpc_presentation_controller_queue_pointer_surface_draws (self);
	}
}

void
pdfpc_presentation_controller_decrease_pointer_size (pdfpcPresentationController* self)
{
	pdfpcPresentationControllerPointerTool* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_current_pointer;
	if (_tmp0_->size > ((gdouble) self->pointer_step)) {
		pdfpcPresentationControllerPointerTool* _tmp1_;
		pdfpcPresentationControllerPointerTool* _tmp2_;
		_tmp1_ = self->priv->_current_pointer;
		_tmp2_ = self->priv->_current_pointer;
		_tmp2_->size = _tmp2_->size - self->pointer_step;
		pdfpc_presentation_controller_queue_pointer_surface_draws (self);
	}
}

/**
         * Executes the script specified with --external-script.
         * The script is called with the following parameters:
         * - name of pdf file
         * - total slide count
         * - current slide number
         * - current user slide number
         *
         * If the script exits with a non-zero return value, whatever
         * the script wrote to stdout is printed in the console.
         */
static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

void
pdfpc_presentation_controller_execute_external_script (pdfpcPresentationController* self)
{
	const gchar* _tmp0_;
	gchar* scriptname = NULL;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* std_out = NULL;
	gint exit_status = 0;
	gchar* pdfname = NULL;
	gchar* _tmp3_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_options_external_script;
	if (g_strcmp0 (_tmp0_, "none") == 0) {
		return;
	}
	_tmp1_ = pdfpc_options_external_script;
	_tmp2_ = g_strdup (_tmp1_);
	scriptname = _tmp2_;
	g_print ("Executing external script\n");
	_tmp3_ = pdfpc_presentation_controller_get_pdf_fname (self);
	pdfname = _tmp3_;
	{
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		guint _tmp8_;
		guint _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		gint _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		gint _tmp15_;
		gint _tmp16_;
		gchar* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_ = NULL;
		gint _tmp22_ = 0;
		_tmp4_ = scriptname;
		_tmp5_ = string_to_string (_tmp4_);
		_tmp6_ = pdfname;
		_tmp7_ = string_to_string (_tmp6_);
		_tmp8_ = pdfpc_presentation_controller_get_n_slides (self);
		_tmp9_ = _tmp8_;
		_tmp10_ = g_strdup_printf ("%u", _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = self->priv->_current_slide_number;
		_tmp13_ = g_strdup_printf ("%i", _tmp12_ + 1);
		_tmp14_ = _tmp13_;
		_tmp15_ = pdfpc_presentation_controller_get_current_user_slide_number (self);
		_tmp16_ = _tmp15_;
		_tmp17_ = g_strdup_printf ("%i", _tmp16_ + 1);
		_tmp18_ = _tmp17_;
		_tmp19_ = g_strconcat (_tmp5_, " ", _tmp7_, " ", _tmp11_, " ", _tmp14_, " ", _tmp18_, NULL);
		_tmp20_ = _tmp19_;
		g_spawn_command_line_sync (_tmp20_, &_tmp21_, NULL, &_tmp22_, &_inner_error0_);
		_g_free0 (std_out);
		std_out = _tmp21_;
		exit_status = _tmp22_;
		_g_free0 (_tmp20_);
		_g_free0 (_tmp18_);
		_g_free0 (_tmp14_);
		_g_free0 (_tmp11_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_SPAWN_ERROR) {
				goto __catch0_g_spawn_error;
			}
			_g_free0 (pdfname);
			_g_free0 (std_out);
			_g_free0 (scriptname);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		if (exit_status != 0) {
			gchar* _tmp23_;
			gchar* _tmp24_;
			const gchar* _tmp25_;
			const gchar* _tmp26_;
			gchar* _tmp27_;
			gchar* _tmp28_;
			_tmp23_ = g_strdup_printf ("%i", exit_status);
			_tmp24_ = _tmp23_;
			_tmp25_ = std_out;
			_tmp26_ = string_to_string (_tmp25_);
			_tmp27_ = g_strconcat ("Script returned ", _tmp24_, ".\n", _tmp26_, "\n", NULL);
			_tmp28_ = _tmp27_;
			g_print ("%s", _tmp28_);
			_g_free0 (_tmp28_);
			_g_free0 (_tmp24_);
		}
	}
	goto __finally0;
	__catch0_g_spawn_error:
	{
		GError* e = NULL;
		GError* _tmp29_;
		const gchar* _tmp30_;
		const gchar* _tmp31_;
		gchar* _tmp32_;
		gchar* _tmp33_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp29_ = e;
		_tmp30_ = _tmp29_->message;
		_tmp31_ = string_to_string (_tmp30_);
		_tmp32_ = g_strconcat ("Error: ", _tmp31_, "\n", NULL);
		_tmp33_ = _tmp32_;
		g_print ("%s", _tmp33_);
		_g_free0 (_tmp33_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_free0 (pdfname);
		_g_free0 (std_out);
		_g_free0 (scriptname);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_g_free0 (pdfname);
	_g_free0 (std_out);
	_g_free0 (scriptname);
}

void
pdfpc_presentation_controller_quit (pdfpcPresentationController* self)
{
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	gboolean _tmp2_ = FALSE;
	ScreenSaver* _tmp3_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	pdfpc_metadata_pdf_quit (_tmp1_);
	_tmp3_ = self->screensaver;
	if (_tmp3_ != NULL) {
		_tmp2_ = self->screensaver_cookie != ((guint32) 0);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		{
			ScreenSaver* _tmp4_;
			_tmp4_ = self->screensaver;
			screen_saver_un_inhibit (_tmp4_, self->screensaver_cookie, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			g_print ("Screensaver reactivated\n");
		}
		goto __finally0;
		__catch0_g_error:
		{
			g_clear_error (&_inner_error0_);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
	gtk_main_quit ();
}

void
pdfpc_presentation_controller_set_pen_color_to_string (pdfpcPresentationController* self,
                                                       GVariant* color_variant)
{
	g_return_if_fail (self != NULL);
	if (pdfpc_presentation_controller_in_drawing_mode (self)) {
		GdkRGBA color = {0};
		const gchar* _tmp0_;
		pdfpcDrawingsDrawing* _tmp1_;
		pdfpcDrawingsDrawingTool* _tmp2_;
		pdfpcDrawingsDrawingTool* _tmp3_;
		GdkRGBA _tmp4_;
		memset (&color, 0, sizeof (GdkRGBA));
		_tmp0_ = g_variant_get_string (color_variant, NULL);
		gdk_rgba_parse (&color, _tmp0_);
		_tmp1_ = self->pen_drawing;
		_tmp2_ = pdfpc_drawings_drawing_get_pen (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = color;
		pdfpc_drawings_drawing_tool_set_rgba (_tmp3_, &_tmp4_);
		pdfpc_presentation_controller_queue_pen_surface_draws (self);
	}
}

void
pdfpc_presentation_controller_set_mode_to_string (pdfpcPresentationController* self,
                                                  GVariant* mode_variant)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_variant_get_string (mode_variant, NULL);
	pdfpc_presentation_controller_set_mode (self, pdfpc_presentation_controller_annotation_mode_parse (_tmp0_));
}

static void
_pdfpc_presentation_controller_next_page_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_next_page ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_jump10_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_jump10 ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_jump_to_last_overlay_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_jump_to_last_overlay ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_next_user_page_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_next_user_page ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_previous_page_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_previous_page ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_back10_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_back10 ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_jump_to_first_overlay_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_jump_to_first_overlay ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_previous_user_page_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_previous_user_page ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_next_page_forced_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_next_page_forced ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_previous_page_forced_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_previous_page_forced ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_controllables_ask_goto_page_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_controllables_ask_goto_page ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_goto_first_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_goto_first ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_goto_last_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_goto_last ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_next_unseen_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_next_unseen ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_previous_seen_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_previous_seen ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_toggle_overview_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_toggle_overview ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_history_goto_back_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_history_goto_back ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_history_goto_fwd_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_history_goto_fwd ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_goto_string_pdfpcpresentationcontrollercallback_with_parameter (GVariant* parameter,
                                                                                               gpointer self)
{
	pdfpc_presentation_controller_goto_string ((pdfpcPresentationController*) self, parameter);
}

static void
_pdfpc_presentation_controller_start_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_start ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_toggle_pause_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_toggle_pause ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_reset_timer_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_reset_timer ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_cycle_timer_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_cycle_timer ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_toggle_windowed_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_toggle_windowed ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_fade_to_black_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_fade_to_black ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_hide_presentation_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_hide_presentation ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_toggle_freeze_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_toggle_freeze ((pdfpcPresentationController*) self);
}

static void
__lambda42_ (pdfpcPresentationController* self)
{
	gboolean _tmp0_;
	_tmp0_ = self->priv->_frozen;
	if (!_tmp0_) {
		pdfpc_presentation_controller_toggle_freeze (self);
	}
}

static void
___lambda42__pdfpc_presentation_controllercallback (gpointer self)
{
	__lambda42_ ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_add_overlay_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_add_overlay ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_toggle_hidden_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_toggle_hidden ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_controllables_edit_note_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_controllables_edit_note ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_set_end_user_slide_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_set_end_user_slide ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_set_last_saved_slide_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_set_last_saved_slide ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_goto_last_saved_slide_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_goto_last_saved_slide ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_execute_external_script_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_execute_external_script ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_set_mode_to_string_pdfpcpresentationcontrollercallback_with_parameter (GVariant* parameter,
                                                                                                      gpointer self)
{
	pdfpc_presentation_controller_set_mode_to_string ((pdfpcPresentationController*) self, parameter);
}

static void
_pdfpc_presentation_controller_increase_size_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_increase_size ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_decrease_size_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_decrease_size ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_set_pen_color_to_string_pdfpcpresentationcontrollercallback_with_parameter (GVariant* parameter,
                                                                                                           gpointer self)
{
	pdfpc_presentation_controller_set_pen_color_to_string ((pdfpcPresentationController*) self, parameter);
}

static void
_pdfpc_presentation_controller_clear_pen_drawing_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_clear_pen_drawing ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_toggle_drawings_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_toggle_drawings ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_toggle_toolbox_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_toggle_toolbox ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_zoom_highlighted_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_zoom_highlighted ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_toggle_max_current_view_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_toggle_max_current_view ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_customize_gui_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_customize_gui ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_move_pointer_pdfpcpresentationcontrollercallback_with_parameter (GVariant* parameter,
                                                                                                gpointer self)
{
	pdfpc_presentation_controller_move_pointer ((pdfpcPresentationController*) self, parameter);
}

static void
_pdfpc_presentation_controller_show_qrcode_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_show_qrcode ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_show_help_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_show_help ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_exit_state_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_exit_state ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_reload_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_reload ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_quit_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_quit ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_undo_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_undo ((pdfpcPresentationController*) self);
}

static void
_pdfpc_presentation_controller_redo_pdfpc_presentation_controllercallback (gpointer self)
{
	pdfpc_presentation_controller_redo ((pdfpcPresentationController*) self);
}

void
pdfpc_presentation_controller_add_actions (pdfpcPresentationController* self)
{
	const GVariantType* _tmp0_;
	const GVariantType* _tmp1_;
	const GVariantType* _tmp2_;
	const GVariantType* _tmp3_;
	g_return_if_fail (self != NULL);
	pdfpc_presentation_controller_add_action (self, "next", _pdfpc_presentation_controller_next_page_pdfpc_presentation_controllercallback, self, "Go to the next slide");
	pdfpc_presentation_controller_add_action (self, "next10", _pdfpc_presentation_controller_jump10_pdfpc_presentation_controllercallback, self, "Jump 10 slides forward");
	pdfpc_presentation_controller_add_action (self, "lastOverlay", _pdfpc_presentation_controller_jump_to_last_overlay_pdfpc_presentation_controllercallback, self, "Jump to the last overlay of the current slide");
	pdfpc_presentation_controller_add_action (self, "nextOverlay", _pdfpc_presentation_controller_next_user_page_pdfpc_presentation_controllercallback, self, "Jump forward outside of the current overlay");
	pdfpc_presentation_controller_add_action (self, "prev", _pdfpc_presentation_controller_previous_page_pdfpc_presentation_controllercallback, self, "Go to the previous slide");
	pdfpc_presentation_controller_add_action (self, "prev10", _pdfpc_presentation_controller_back10_pdfpc_presentation_controllercallback, self, "Jump 10 slides back");
	pdfpc_presentation_controller_add_action (self, "firstOverlay", _pdfpc_presentation_controller_jump_to_first_overlay_pdfpc_presentation_controllercallback, self, "Jump to the first overlay of the current slide");
	pdfpc_presentation_controller_add_action (self, "prevOverlay", _pdfpc_presentation_controller_previous_user_page_pdfpc_presentation_controllercallback, self, "Jump back outside of the current overlay");
	pdfpc_presentation_controller_add_action (self, "nextForced", _pdfpc_presentation_controller_next_page_forced_pdfpc_presentation_controllercallback, self, "Go to the next slide, even if it is hidden");
	pdfpc_presentation_controller_add_action (self, "prevForced", _pdfpc_presentation_controller_previous_page_forced_pdfpc_presentation_controllercallback, self, "Go to the previous slide, even if it is hidden");
	pdfpc_presentation_controller_add_action (self, "goto", _pdfpc_presentation_controller_controllables_ask_goto_page_pdfpc_presentation_controllercallback, self, "Ask for a page to jump to");
	pdfpc_presentation_controller_add_action (self, "gotoFirst", _pdfpc_presentation_controller_goto_first_pdfpc_presentation_controllercallback, self, "Jump to the first slide");
	pdfpc_presentation_controller_add_action (self, "gotoLast", _pdfpc_presentation_controller_goto_last_pdfpc_presentation_controllercallback, self, "Jump to the last slide");
	pdfpc_presentation_controller_add_action (self, "nextUnseen", _pdfpc_presentation_controller_next_unseen_pdfpc_presentation_controllercallback, self, "Jump to the next unseen slide");
	pdfpc_presentation_controller_add_action (self, "prevSeen", _pdfpc_presentation_controller_previous_seen_pdfpc_presentation_controllercallback, self, "Jump to the last previously seen slide");
	pdfpc_presentation_controller_add_action (self, "overview", _pdfpc_presentation_controller_toggle_overview_pdfpc_presentation_controllercallback, self, "Show the overview mode");
	pdfpc_presentation_controller_add_action (self, "histBack", _pdfpc_presentation_controller_history_goto_back_pdfpc_presentation_controllercallback, self, "Go back in history");
	pdfpc_presentation_controller_add_action (self, "histFwd", _pdfpc_presentation_controller_history_goto_fwd_pdfpc_presentation_controllercallback, self, "Go forward in history");
	_tmp0_ = G_VARIANT_TYPE_STRING;
	pdfpc_presentation_controller_add_action_with_parameter (self, "gotoPage", _tmp0_, _pdfpc_presentation_controller_goto_string_pdfpcpresentationcontrollercallback_with_parameter, self, "Jump to the specified page", "number");
	pdfpc_presentation_controller_add_action (self, "start", _pdfpc_presentation_controller_start_pdfpc_presentation_controllercallback, self, "Start the timer");
	pdfpc_presentation_controller_add_action (self, "pause", _pdfpc_presentation_controller_toggle_pause_pdfpc_presentation_controllercallback, self, "Pause the timer");
	pdfpc_presentation_controller_add_action (self, "resetTimer", _pdfpc_presentation_controller_reset_timer_pdfpc_presentation_controllercallback, self, "Reset the timer");
	pdfpc_presentation_controller_add_action (self, "cycleTimerMode", _pdfpc_presentation_controller_cycle_timer_pdfpc_presentation_controllercallback, self, "Cycle the timer view");
	pdfpc_presentation_controller_add_action (self, "windowed", _pdfpc_presentation_controller_toggle_windowed_pdfpc_presentation_controllercallback, self, "Toggle the windowed state");
	pdfpc_presentation_controller_add_action (self, "blank", _pdfpc_presentation_controller_fade_to_black_pdfpc_presentation_controllercallback, self, "Blank the presentation screen");
	pdfpc_presentation_controller_add_action (self, "hide", _pdfpc_presentation_controller_hide_presentation_pdfpc_presentation_controllercallback, self, "Hide the presentation screen");
	pdfpc_presentation_controller_add_action (self, "freeze", _pdfpc_presentation_controller_toggle_freeze_pdfpc_presentation_controllercallback, self, "Toggle freeze the presentation screen");
	pdfpc_presentation_controller_add_action (self, "freezeOn", ___lambda42__pdfpc_presentation_controllercallback, self, "Freeze the presentation screen");
	pdfpc_presentation_controller_add_action (self, "overlay", _pdfpc_presentation_controller_add_overlay_pdfpc_presentation_controllercallback, self, "Mark the current slide as an overlay slide");
	pdfpc_presentation_controller_add_action (self, "toggleHidden", _pdfpc_presentation_controller_toggle_hidden_pdfpc_presentation_controllercallback, self, "Toggle the hidden flag of the current slide");
	pdfpc_presentation_controller_add_action (self, "note", _pdfpc_presentation_controller_controllables_edit_note_pdfpc_presentation_controllercallback, self, "Edit notes for the current slide");
	pdfpc_presentation_controller_add_action (self, "endSlide", _pdfpc_presentation_controller_set_end_user_slide_pdfpc_presentation_controllercallback, self, "Set the current slide as the end slide");
	pdfpc_presentation_controller_add_action (self, "saveBookmark", _pdfpc_presentation_controller_set_last_saved_slide_pdfpc_presentation_controllercallback, self, "Bookmark the currently displayed slide");
	pdfpc_presentation_controller_add_action (self, "loadBookmark", _pdfpc_presentation_controller_goto_last_saved_slide_pdfpc_presentation_controllercallback, self, "Load the bookmarked slide");
	pdfpc_presentation_controller_add_action (self, "executeScript", _pdfpc_presentation_controller_execute_external_script_pdfpc_presentation_controllercallback, self, "Execute external script");
	_tmp1_ = G_VARIANT_TYPE_STRING;
	pdfpc_presentation_controller_add_action_with_parameter (self, "switchMode", _tmp1_, _pdfpc_presentation_controller_set_mode_to_string_pdfpcpresentationcontrollercallback_with_parameter, self, "Switch annotation mode (normal|pointer|pen|eraser|spotlight)", "mode");
	pdfpc_presentation_controller_add_action (self, "increaseSize", _pdfpc_presentation_controller_increase_size_pdfpc_presentation_controllercallback, self, "Increase the size of notes|pointer|pen|eraser");
	pdfpc_presentation_controller_add_action (self, "decreaseSize", _pdfpc_presentation_controller_decrease_size_pdfpc_presentation_controllercallback, self, "Decrease the size of notes|pointer|pen|eraser");
	_tmp2_ = G_VARIANT_TYPE_STRING;
	pdfpc_presentation_controller_add_action_with_parameter (self, "setPenColor", _tmp2_, _pdfpc_presentation_controller_set_pen_color_to_string_pdfpcpresentationcontrollercallback_with_parameter, self, "Change the pen color", "color");
	pdfpc_presentation_controller_add_action (self, "clearDrawing", _pdfpc_presentation_controller_clear_pen_drawing_pdfpc_presentation_controllercallback, self, "Clear drawing on the current slide");
	pdfpc_presentation_controller_add_action (self, "toggleDrawings", _pdfpc_presentation_controller_toggle_drawings_pdfpc_presentation_controllercallback, self, "Toggle all drawings on all slides");
	pdfpc_presentation_controller_add_action (self, "toggleToolbox", _pdfpc_presentation_controller_toggle_toolbox_pdfpc_presentation_controllercallback, self, "Toggle the toolbox");
	pdfpc_presentation_controller_add_action (self, "zoom", _pdfpc_presentation_controller_zoom_highlighted_pdfpc_presentation_controllercallback, self, "Zoom in the highlighted area");
	pdfpc_presentation_controller_add_action (self, "toggleMaxCurrent", _pdfpc_presentation_controller_toggle_max_current_view_pdfpc_presentation_controllercallback, self, "(Un)maximize the current slide view");
	pdfpc_presentation_controller_add_action (self, "customize", _pdfpc_presentation_controller_customize_gui_pdfpc_presentation_controllercallback, self, "Customize the GUI");
	_tmp3_ = G_VARIANT_TYPE_STRING;
	pdfpc_presentation_controller_add_action_with_parameter (self, "movePointer", _tmp3_, _pdfpc_presentation_controller_move_pointer_pdfpcpresentationcontrollercallback_with_parameter, self, "Move pointer by vector", "(x,y)");
	pdfpc_presentation_controller_add_action (self, "showQRcode", _pdfpc_presentation_controller_show_qrcode_pdfpc_presentation_controllercallback, self, "Show QR code");
	pdfpc_presentation_controller_add_action (self, "showHelp", _pdfpc_presentation_controller_show_help_pdfpc_presentation_controllercallback, self, "Show a help screen");
	pdfpc_presentation_controller_add_action (self, "exitState", _pdfpc_presentation_controller_exit_state_pdfpc_presentation_controllercallback, self, "Exit \"special\" state (pause, freeze, blank)");
	pdfpc_presentation_controller_add_action (self, "reload", _pdfpc_presentation_controller_reload_pdfpc_presentation_controllercallback, self, "Reload the presentation");
	pdfpc_presentation_controller_add_action (self, "quit", _pdfpc_presentation_controller_quit_pdfpc_presentation_controllercallback, self, "Exit pdfpc");
	pdfpc_presentation_controller_add_action (self, "undo", _pdfpc_presentation_controller_undo_pdfpc_presentation_controllercallback, self, "Undo the last paint action");
	pdfpc_presentation_controller_add_action (self, "redo", _pdfpc_presentation_controller_redo_pdfpc_presentation_controllercallback, self, "Redo the last paint action");
}

static Block6Data*
block6_data_ref (Block6Data* _data6_)
{
	g_atomic_int_inc (&_data6_->_ref_count_);
	return _data6_;
}

static void
block6_data_unref (void * _userdata_)
{
	Block6Data* _data6_;
	_data6_ = (Block6Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
		pdfpcPresentationController* self;
		self = _data6_->self;
		_g_object_unref0 (self);
		g_slice_free (Block6Data, _data6_);
	}
}

static void
__lambda40_ (Block6Data* _data6_)
{
	pdfpcPresentationController* self;
	self = _data6_->self;
	_data6_->func (_data6_->func_target);
}

static void
___lambda40__g_simple_action_activate (GSimpleAction* _sender,
                                       GVariant* parameter,
                                       gpointer self)
{
	__lambda40_ (self);
}

void
pdfpc_presentation_controller_add_action (pdfpcPresentationController* self,
                                          const gchar* name,
                                          pdfpcPresentationControllercallback func,
                                          gpointer func_target,
                                          const gchar* description)
{
	Block6Data* _data6_;
	GSimpleAction* action = NULL;
	GSimpleAction* _tmp0_;
	GSimpleActionGroup* _tmp1_;
	GeeArrayList* _tmp2_;
	pdfpcPresentationControllerActionDescription* _tmp3_;
	pdfpcPresentationControllerActionDescription* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (description != NULL);
	_data6_ = g_slice_new0 (Block6Data);
	_data6_->_ref_count_ = 1;
	_data6_->self = g_object_ref (self);
	_data6_->func = func;
	_data6_->func_target = func_target;
	_tmp0_ = g_simple_action_new (name, NULL);
	action = _tmp0_;
	g_signal_connect_data (action, "activate", (GCallback) ___lambda40__g_simple_action_activate, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0);
	_tmp1_ = self->action_group;
	g_action_map_add_action ((GActionMap*) _tmp1_, (GAction*) action);
	_tmp2_ = self->action_descriptions;
	_tmp3_ = pdfpc_presentation_controller_action_description_new (name, description, NULL);
	_tmp4_ = _tmp3_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp2_, _tmp4_);
	_g_object_unref0 (_tmp4_);
	_g_object_unref0 (action);
	block6_data_unref (_data6_);
	_data6_ = NULL;
}

static Block7Data*
block7_data_ref (Block7Data* _data7_)
{
	g_atomic_int_inc (&_data7_->_ref_count_);
	return _data7_;
}

static void
block7_data_unref (void * _userdata_)
{
	Block7Data* _data7_;
	_data7_ = (Block7Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
		pdfpcPresentationController* self;
		self = _data7_->self;
		_g_object_unref0 (self);
		g_slice_free (Block7Data, _data7_);
	}
}

static void
__lambda41_ (Block7Data* _data7_,
             GVariant* param)
{
	pdfpcPresentationController* self;
	self = _data7_->self;
	_data7_->func (param, _data7_->func_target);
}

static void
___lambda41__g_simple_action_activate (GSimpleAction* _sender,
                                       GVariant* parameter,
                                       gpointer self)
{
	__lambda41_ (self, parameter);
}

void
pdfpc_presentation_controller_add_action_with_parameter (pdfpcPresentationController* self,
                                                         const gchar* name,
                                                         const GVariantType* param_type,
                                                         pdfpcPresentationControllercallback_with_parameter func,
                                                         gpointer func_target,
                                                         const gchar* description,
                                                         const gchar* arg_name)
{
	Block7Data* _data7_;
	GSimpleAction* action = NULL;
	GSimpleAction* _tmp0_;
	GSimpleActionGroup* _tmp1_;
	GeeArrayList* _tmp2_;
	pdfpcPresentationControllerActionDescription* _tmp3_;
	pdfpcPresentationControllerActionDescription* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (param_type != NULL);
	g_return_if_fail (description != NULL);
	g_return_if_fail (arg_name != NULL);
	_data7_ = g_slice_new0 (Block7Data);
	_data7_->_ref_count_ = 1;
	_data7_->self = g_object_ref (self);
	_data7_->func = func;
	_data7_->func_target = func_target;
	_tmp0_ = g_simple_action_new (name, param_type);
	action = _tmp0_;
	g_signal_connect_data (action, "activate", (GCallback) ___lambda41__g_simple_action_activate, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
	_tmp1_ = self->action_group;
	g_action_map_add_action ((GActionMap*) _tmp1_, (GAction*) action);
	_tmp2_ = self->action_descriptions;
	_tmp3_ = pdfpc_presentation_controller_action_description_new (name, description, arg_name);
	_tmp4_ = _tmp3_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp2_, _tmp4_);
	_g_object_unref0 (_tmp4_);
	_g_object_unref0 (action);
	block7_data_unref (_data7_);
	_data7_ = NULL;
}

/**
         * Get an array with all action names & descriptions
         */
static void
_vala_array_add1 (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_add2 (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_add3 (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;
}

gchar**
pdfpc_presentation_controller_get_action_descriptions (pdfpcPresentationController* self,
                                                       gint* result_length1)
{
	gchar** retval = NULL;
	gchar** _tmp0_;
	gint retval_length1;
	gint _retval_size_;
	gchar** _tmp31_;
	gint _tmp31__length1;
	gchar** result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	retval = _tmp0_;
	retval_length1 = 0;
	_retval_size_ = retval_length1;
	{
		GeeArrayList* _entry_list = NULL;
		GeeArrayList* _tmp1_;
		gint _entry_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _entry_index = 0;
		_tmp1_ = self->action_descriptions;
		_entry_list = _tmp1_;
		_tmp2_ = _entry_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_entry_size = _tmp4_;
		_entry_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			pdfpcPresentationControllerActionDescription* entry = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			pdfpcPresentationControllerActionDescription* _tmp9_;
			const gchar* _tmp10_;
			const gchar* _tmp11_;
			pdfpcPresentationControllerActionDescription* _tmp27_;
			const gchar* _tmp28_;
			const gchar* _tmp29_;
			gchar* _tmp30_;
			_entry_index = _entry_index + 1;
			_tmp5_ = _entry_index;
			_tmp6_ = _entry_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _entry_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _entry_index);
			entry = (pdfpcPresentationControllerActionDescription*) _tmp8_;
			_tmp9_ = entry;
			_tmp10_ = pdfpc_presentation_controller_action_description_get_arg_name (_tmp9_);
			_tmp11_ = _tmp10_;
			if (_tmp11_ != NULL) {
				pdfpcPresentationControllerActionDescription* _tmp12_;
				const gchar* _tmp13_;
				const gchar* _tmp14_;
				gchar* _tmp15_;
				gchar* _tmp16_;
				pdfpcPresentationControllerActionDescription* _tmp17_;
				const gchar* _tmp18_;
				const gchar* _tmp19_;
				gchar* _tmp20_;
				gchar* _tmp21_;
				gchar* _tmp22_;
				_tmp12_ = entry;
				_tmp13_ = pdfpc_presentation_controller_action_description_get_name (_tmp12_);
				_tmp14_ = _tmp13_;
				_tmp15_ = g_strconcat (_tmp14_, " <", NULL);
				_tmp16_ = _tmp15_;
				_tmp17_ = entry;
				_tmp18_ = pdfpc_presentation_controller_action_description_get_arg_name (_tmp17_);
				_tmp19_ = _tmp18_;
				_tmp20_ = g_strconcat (_tmp16_, _tmp19_, NULL);
				_tmp21_ = _tmp20_;
				_tmp22_ = g_strconcat (_tmp21_, ">", NULL);
				_vala_array_add1 (&retval, &retval_length1, &_retval_size_, _tmp22_);
				_g_free0 (_tmp21_);
				_g_free0 (_tmp16_);
			} else {
				pdfpcPresentationControllerActionDescription* _tmp23_;
				const gchar* _tmp24_;
				const gchar* _tmp25_;
				gchar* _tmp26_;
				_tmp23_ = entry;
				_tmp24_ = pdfpc_presentation_controller_action_description_get_name (_tmp23_);
				_tmp25_ = _tmp24_;
				_tmp26_ = g_strdup (_tmp25_);
				_vala_array_add2 (&retval, &retval_length1, &_retval_size_, _tmp26_);
			}
			_tmp27_ = entry;
			_tmp28_ = pdfpc_presentation_controller_action_description_get_description (_tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = g_strdup (_tmp29_);
			_vala_array_add3 (&retval, &retval_length1, &_retval_size_, _tmp30_);
			_g_object_unref0 (entry);
		}
	}
	_tmp31_ = retval;
	_tmp31__length1 = retval_length1;
	if (result_length1) {
		*result_length1 = _tmp31__length1;
	}
	result = _tmp31_;
	return result;
}

static gchar*
pdfpc_presentation_controller_get_bindstr (pdfpcPresentationController* self,
                                           pdfpcKeyDef* keydef,
                                           gboolean is_mouse)
{
	gchar* bindstr = NULL;
	gchar* _tmp0_;
	gchar* keystr = NULL;
	gchar* modstr = NULL;
	gchar* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	guint _tmp5_;
	guint _tmp6_;
	guint _tmp8_;
	guint _tmp9_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (keydef != NULL, NULL);
	_tmp0_ = g_strdup ("");
	bindstr = _tmp0_;
	_tmp1_ = g_strdup ("");
	modstr = _tmp1_;
	_tmp2_ = pdfpc_key_def_get_modMask (keydef);
	_tmp3_ = _tmp2_;
	if ((_tmp3_ & GDK_CONTROL_MASK) != ((guint) 0)) {
		gchar* _tmp4_;
		_tmp4_ = g_strdup ("Ctrl+");
		_g_free0 (modstr);
		modstr = _tmp4_;
	}
	_tmp5_ = pdfpc_key_def_get_modMask (keydef);
	_tmp6_ = _tmp5_;
	if ((_tmp6_ & GDK_META_MASK) != ((guint) 0)) {
		gchar* _tmp7_;
		_tmp7_ = g_strdup ("Meta+");
		_g_free0 (modstr);
		modstr = _tmp7_;
	}
	_tmp8_ = pdfpc_key_def_get_modMask (keydef);
	_tmp9_ = _tmp8_;
	if ((_tmp9_ & GDK_SHIFT_MASK) != ((guint) 0)) {
		gchar* _tmp10_;
		_tmp10_ = g_strdup ("Shift+");
		_g_free0 (modstr);
		modstr = _tmp10_;
	}
	if (is_mouse) {
		guint _tmp11_;
		guint _tmp12_;
		gchar* _tmp13_;
		_tmp11_ = pdfpc_key_def_get_keycode (keydef);
		_tmp12_ = _tmp11_;
		_tmp13_ = g_strdup_printf ("Mouse_%u", _tmp12_);
		_g_free0 (keystr);
		keystr = _tmp13_;
	} else {
		guint _tmp14_;
		guint _tmp15_;
		const gchar* _tmp16_;
		gchar* _tmp17_;
		const gchar* _tmp18_;
		gint _tmp19_;
		gint _tmp20_;
		_tmp14_ = pdfpc_key_def_get_keycode (keydef);
		_tmp15_ = _tmp14_;
		_tmp16_ = gdk_keyval_name (_tmp15_);
		_tmp17_ = g_strdup (_tmp16_);
		_g_free0 (keystr);
		keystr = _tmp17_;
		_tmp18_ = keystr;
		_tmp19_ = strlen (_tmp18_);
		_tmp20_ = _tmp19_;
		if (_tmp20_ == 1) {
			const gchar* _tmp21_;
			gchar* _tmp22_;
			_tmp21_ = keystr;
			_tmp22_ = g_utf8_strdown (_tmp21_, (gssize) -1);
			_g_free0 (keystr);
			keystr = _tmp22_;
		}
	}
	_tmp23_ = bindstr;
	_tmp24_ = modstr;
	_tmp25_ = keystr;
	_tmp26_ = g_strconcat (_tmp24_, _tmp25_, NULL);
	_tmp27_ = _tmp26_;
	_tmp28_ = g_strconcat (_tmp23_, _tmp27_, NULL);
	_g_free0 (bindstr);
	bindstr = _tmp28_;
	_g_free0 (_tmp27_);
	result = bindstr;
	_g_free0 (modstr);
	_g_free0 (keystr);
	return result;
}

/**
         * Get an array with all action names & their bindings
         */
static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
_vala_array_add4 (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_add5 (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;
}

gchar**
pdfpc_presentation_controller_get_action_bindings (pdfpcPresentationController* self,
                                                   gint* result_length1)
{
	gchar** retval = NULL;
	gchar** _tmp0_;
	gint retval_length1;
	gint _retval_size_;
	gchar** _tmp111_;
	gint _tmp111__length1;
	gchar** result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	retval = _tmp0_;
	retval_length1 = 0;
	_retval_size_ = retval_length1;
	{
		GeeArrayList* _entry_list = NULL;
		GeeArrayList* _tmp1_;
		gint _entry_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _entry_index = 0;
		_tmp1_ = self->action_descriptions;
		_entry_list = _tmp1_;
		_tmp2_ = _entry_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_entry_size = _tmp4_;
		_entry_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			pdfpcPresentationControllerActionDescription* entry = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			gchar* bindstr = NULL;
			gchar* _tmp9_;
			const gchar* _tmp104_;
			_entry_index = _entry_index + 1;
			_tmp5_ = _entry_index;
			_tmp6_ = _entry_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _entry_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _entry_index);
			entry = (pdfpcPresentationControllerActionDescription*) _tmp8_;
			_tmp9_ = g_strdup ("");
			bindstr = _tmp9_;
			{
				GeeIterator* _bentry_it = NULL;
				GeeHashMap* _tmp10_;
				GeeSet* _tmp11_;
				GeeSet* _tmp12_;
				GeeSet* _tmp13_;
				GeeIterator* _tmp14_;
				GeeIterator* _tmp15_;
				_tmp10_ = self->keyBindings;
				_tmp11_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp10_);
				_tmp12_ = _tmp11_;
				_tmp13_ = _tmp12_;
				_tmp14_ = gee_iterable_iterator ((GeeIterable*) _tmp13_);
				_tmp15_ = _tmp14_;
				_g_object_unref0 (_tmp13_);
				_bentry_it = _tmp15_;
				while (TRUE) {
					GeeIterator* _tmp16_;
					GeeMapEntry* bentry = NULL;
					GeeIterator* _tmp17_;
					gpointer _tmp18_;
					GeeMapEntry* _tmp19_;
					gconstpointer _tmp20_;
					gconstpointer _tmp21_;
					const gchar* _tmp22_;
					const gchar* _tmp23_;
					pdfpcPresentationControllerActionDescription* _tmp24_;
					const gchar* _tmp25_;
					const gchar* _tmp26_;
					pdfpcKeyDef* keydef = NULL;
					GeeMapEntry* _tmp27_;
					gconstpointer _tmp28_;
					gconstpointer _tmp29_;
					pdfpcKeyDef* _tmp30_;
					const gchar* _tmp31_;
					const gchar* _tmp34_;
					pdfpcKeyDef* _tmp35_;
					gchar* _tmp36_;
					gchar* _tmp37_;
					gchar* _tmp38_;
					pdfpcPresentationControllerActionAndParameter* action = NULL;
					GeeHashMap* _tmp39_;
					pdfpcKeyDef* _tmp40_;
					gpointer _tmp41_;
					gboolean _tmp42_ = FALSE;
					pdfpcPresentationControllerActionAndParameter* _tmp43_;
					_tmp16_ = _bentry_it;
					if (!gee_iterator_next (_tmp16_)) {
						break;
					}
					_tmp17_ = _bentry_it;
					_tmp18_ = gee_iterator_get (_tmp17_);
					bentry = (GeeMapEntry*) _tmp18_;
					_tmp19_ = bentry;
					_tmp20_ = gee_map_entry_get_value (_tmp19_);
					_tmp21_ = _tmp20_;
					_tmp22_ = pdfpc_presentation_controller_action_and_parameter_get_name ((pdfpcPresentationControllerActionAndParameter*) _tmp21_);
					_tmp23_ = _tmp22_;
					_tmp24_ = entry;
					_tmp25_ = pdfpc_presentation_controller_action_description_get_name (_tmp24_);
					_tmp26_ = _tmp25_;
					if (g_strcmp0 (_tmp23_, _tmp26_) != 0) {
						_g_object_unref0 (bentry);
						continue;
					}
					_tmp27_ = bentry;
					_tmp28_ = gee_map_entry_get_key (_tmp27_);
					_tmp29_ = _tmp28_;
					_tmp30_ = _g_object_ref0 ((pdfpcKeyDef*) _tmp29_);
					keydef = _tmp30_;
					_tmp31_ = bindstr;
					if (g_strcmp0 (_tmp31_, "") != 0) {
						const gchar* _tmp32_;
						gchar* _tmp33_;
						_tmp32_ = bindstr;
						_tmp33_ = g_strconcat (_tmp32_, ", ", NULL);
						_g_free0 (bindstr);
						bindstr = _tmp33_;
					}
					_tmp34_ = bindstr;
					_tmp35_ = keydef;
					_tmp36_ = pdfpc_presentation_controller_get_bindstr (self, _tmp35_, FALSE);
					_tmp37_ = _tmp36_;
					_tmp38_ = g_strconcat (_tmp34_, _tmp37_, NULL);
					_g_free0 (bindstr);
					bindstr = _tmp38_;
					_g_free0 (_tmp37_);
					_tmp39_ = self->keyBindings;
					_tmp40_ = keydef;
					_tmp41_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp39_, _tmp40_);
					action = (pdfpcPresentationControllerActionAndParameter*) _tmp41_;
					_tmp43_ = action;
					if (_tmp43_ != NULL) {
						pdfpcPresentationControllerActionAndParameter* _tmp44_;
						GVariant* _tmp45_;
						GVariant* _tmp46_;
						_tmp44_ = action;
						_tmp45_ = pdfpc_presentation_controller_action_and_parameter_get_parameter (_tmp44_);
						_tmp46_ = _tmp45_;
						_tmp42_ = _tmp46_ != NULL;
					} else {
						_tmp42_ = FALSE;
					}
					if (_tmp42_) {
						const gchar* _tmp47_;
						pdfpcPresentationControllerActionAndParameter* _tmp48_;
						GVariant* _tmp49_;
						GVariant* _tmp50_;
						const gchar* _tmp51_;
						gchar* _tmp52_;
						gchar* _tmp53_;
						gchar* _tmp54_;
						gchar* _tmp55_;
						gchar* _tmp56_;
						_tmp47_ = bindstr;
						_tmp48_ = action;
						_tmp49_ = pdfpc_presentation_controller_action_and_parameter_get_parameter (_tmp48_);
						_tmp50_ = _tmp49_;
						_tmp51_ = g_variant_get_string (_tmp50_, NULL);
						_tmp52_ = g_strconcat (" [", _tmp51_, NULL);
						_tmp53_ = _tmp52_;
						_tmp54_ = g_strconcat (_tmp53_, "]", NULL);
						_tmp55_ = _tmp54_;
						_tmp56_ = g_strconcat (_tmp47_, _tmp55_, NULL);
						_g_free0 (bindstr);
						bindstr = _tmp56_;
						_g_free0 (_tmp55_);
						_g_free0 (_tmp53_);
					}
					_g_object_unref0 (action);
					_g_object_unref0 (keydef);
					_g_object_unref0 (bentry);
				}
				_g_object_unref0 (_bentry_it);
			}
			{
				GeeIterator* _bentry_it = NULL;
				GeeHashMap* _tmp57_;
				GeeSet* _tmp58_;
				GeeSet* _tmp59_;
				GeeSet* _tmp60_;
				GeeIterator* _tmp61_;
				GeeIterator* _tmp62_;
				_tmp57_ = self->mouseBindings;
				_tmp58_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp57_);
				_tmp59_ = _tmp58_;
				_tmp60_ = _tmp59_;
				_tmp61_ = gee_iterable_iterator ((GeeIterable*) _tmp60_);
				_tmp62_ = _tmp61_;
				_g_object_unref0 (_tmp60_);
				_bentry_it = _tmp62_;
				while (TRUE) {
					GeeIterator* _tmp63_;
					GeeMapEntry* bentry = NULL;
					GeeIterator* _tmp64_;
					gpointer _tmp65_;
					GeeMapEntry* _tmp66_;
					gconstpointer _tmp67_;
					gconstpointer _tmp68_;
					const gchar* _tmp69_;
					const gchar* _tmp70_;
					pdfpcPresentationControllerActionDescription* _tmp71_;
					const gchar* _tmp72_;
					const gchar* _tmp73_;
					pdfpcKeyDef* keydef = NULL;
					GeeMapEntry* _tmp74_;
					gconstpointer _tmp75_;
					gconstpointer _tmp76_;
					pdfpcKeyDef* _tmp77_;
					const gchar* _tmp78_;
					const gchar* _tmp81_;
					pdfpcKeyDef* _tmp82_;
					gchar* _tmp83_;
					gchar* _tmp84_;
					gchar* _tmp85_;
					pdfpcPresentationControllerActionAndParameter* action = NULL;
					GeeHashMap* _tmp86_;
					pdfpcKeyDef* _tmp87_;
					gpointer _tmp88_;
					gboolean _tmp89_ = FALSE;
					pdfpcPresentationControllerActionAndParameter* _tmp90_;
					_tmp63_ = _bentry_it;
					if (!gee_iterator_next (_tmp63_)) {
						break;
					}
					_tmp64_ = _bentry_it;
					_tmp65_ = gee_iterator_get (_tmp64_);
					bentry = (GeeMapEntry*) _tmp65_;
					_tmp66_ = bentry;
					_tmp67_ = gee_map_entry_get_value (_tmp66_);
					_tmp68_ = _tmp67_;
					_tmp69_ = pdfpc_presentation_controller_action_and_parameter_get_name ((pdfpcPresentationControllerActionAndParameter*) _tmp68_);
					_tmp70_ = _tmp69_;
					_tmp71_ = entry;
					_tmp72_ = pdfpc_presentation_controller_action_description_get_name (_tmp71_);
					_tmp73_ = _tmp72_;
					if (g_strcmp0 (_tmp70_, _tmp73_) != 0) {
						_g_object_unref0 (bentry);
						continue;
					}
					_tmp74_ = bentry;
					_tmp75_ = gee_map_entry_get_key (_tmp74_);
					_tmp76_ = _tmp75_;
					_tmp77_ = _g_object_ref0 ((pdfpcKeyDef*) _tmp76_);
					keydef = _tmp77_;
					_tmp78_ = bindstr;
					if (g_strcmp0 (_tmp78_, "") != 0) {
						const gchar* _tmp79_;
						gchar* _tmp80_;
						_tmp79_ = bindstr;
						_tmp80_ = g_strconcat (_tmp79_, ", ", NULL);
						_g_free0 (bindstr);
						bindstr = _tmp80_;
					}
					_tmp81_ = bindstr;
					_tmp82_ = keydef;
					_tmp83_ = pdfpc_presentation_controller_get_bindstr (self, _tmp82_, TRUE);
					_tmp84_ = _tmp83_;
					_tmp85_ = g_strconcat (_tmp81_, _tmp84_, NULL);
					_g_free0 (bindstr);
					bindstr = _tmp85_;
					_g_free0 (_tmp84_);
					_tmp86_ = self->keyBindings;
					_tmp87_ = keydef;
					_tmp88_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp86_, _tmp87_);
					action = (pdfpcPresentationControllerActionAndParameter*) _tmp88_;
					_tmp90_ = action;
					if (_tmp90_ != NULL) {
						pdfpcPresentationControllerActionAndParameter* _tmp91_;
						GVariant* _tmp92_;
						GVariant* _tmp93_;
						_tmp91_ = action;
						_tmp92_ = pdfpc_presentation_controller_action_and_parameter_get_parameter (_tmp91_);
						_tmp93_ = _tmp92_;
						_tmp89_ = _tmp93_ != NULL;
					} else {
						_tmp89_ = FALSE;
					}
					if (_tmp89_) {
						const gchar* _tmp94_;
						pdfpcPresentationControllerActionAndParameter* _tmp95_;
						GVariant* _tmp96_;
						GVariant* _tmp97_;
						const gchar* _tmp98_;
						gchar* _tmp99_;
						gchar* _tmp100_;
						gchar* _tmp101_;
						gchar* _tmp102_;
						gchar* _tmp103_;
						_tmp94_ = bindstr;
						_tmp95_ = action;
						_tmp96_ = pdfpc_presentation_controller_action_and_parameter_get_parameter (_tmp95_);
						_tmp97_ = _tmp96_;
						_tmp98_ = g_variant_get_string (_tmp97_, NULL);
						_tmp99_ = g_strconcat (" [", _tmp98_, NULL);
						_tmp100_ = _tmp99_;
						_tmp101_ = g_strconcat (_tmp100_, "]", NULL);
						_tmp102_ = _tmp101_;
						_tmp103_ = g_strconcat (_tmp94_, _tmp102_, NULL);
						_g_free0 (bindstr);
						bindstr = _tmp103_;
						_g_free0 (_tmp102_);
						_g_free0 (_tmp100_);
					}
					_g_object_unref0 (action);
					_g_object_unref0 (keydef);
					_g_object_unref0 (bentry);
				}
				_g_object_unref0 (_bentry_it);
			}
			_tmp104_ = bindstr;
			if (g_strcmp0 (_tmp104_, "") != 0) {
				pdfpcPresentationControllerActionDescription* _tmp105_;
				const gchar* _tmp106_;
				const gchar* _tmp107_;
				gchar* _tmp108_;
				const gchar* _tmp109_;
				gchar* _tmp110_;
				_tmp105_ = entry;
				_tmp106_ = pdfpc_presentation_controller_action_description_get_name (_tmp105_);
				_tmp107_ = _tmp106_;
				_tmp108_ = g_strdup (_tmp107_);
				_vala_array_add4 (&retval, &retval_length1, &_retval_size_, _tmp108_);
				_tmp109_ = bindstr;
				_tmp110_ = g_strdup (_tmp109_);
				_vala_array_add5 (&retval, &retval_length1, &_retval_size_, _tmp110_);
			}
			_g_free0 (bindstr);
			_g_object_unref0 (entry);
		}
	}
	_tmp111_ = retval;
	_tmp111__length1 = retval_length1;
	if (result_length1) {
		*result_length1 = _tmp111__length1;
	}
	result = _tmp111_;
	return result;
}

/**
         * Trigger an action by name
         */
void
pdfpc_presentation_controller_trigger_action (pdfpcPresentationController* self,
                                              const gchar* name,
                                              GVariant* parameter)
{
	GSimpleActionGroup* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	_tmp0_ = self->action_group;
	g_action_group_activate_action ((GActionGroup*) _tmp0_, name, parameter);
}

/**
         * Bind the (user-defined) key or mouse button
         */
static gpointer
_g_variant_type_copy0 (gpointer self)
{
	return self ? g_variant_type_copy (self) : NULL;
}

static void
pdfpc_presentation_controller_bindKeyOrMouse (pdfpcPresentationController* self,
                                              gboolean is_mouse,
                                              guint keycode,
                                              guint modMask,
                                              const gchar* action_name,
                                              GVariant* parameter)
{
	GAction* action = NULL;
	GSimpleActionGroup* _tmp0_;
	GAction* _tmp1_;
	GAction* _tmp2_;
	GAction* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action_name != NULL);
	_tmp0_ = self->action_group;
	_tmp1_ = g_action_map_lookup_action ((GActionMap*) _tmp0_, action_name);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	action = _tmp2_;
	_tmp3_ = action;
	if (_tmp3_ != NULL) {
		GVariantType* expected_type = NULL;
		GAction* _tmp4_;
		const GVariantType* _tmp5_;
		GVariantType* _tmp6_;
		const GVariantType* _tmp7_;
		GeeHashMap* bindings = NULL;
		pdfpcKeyDef* keydef = NULL;
		pdfpcKeyDef* _tmp17_;
		GeeHashMap* _tmp18_;
		pdfpcKeyDef* _tmp19_;
		GAction* _tmp20_;
		pdfpcPresentationControllerActionAndParameter* _tmp21_;
		pdfpcPresentationControllerActionAndParameter* _tmp22_;
		_tmp4_ = action;
		_tmp5_ = g_action_get_parameter_type (_tmp4_);
		_tmp6_ = _g_variant_type_copy0 (_tmp5_);
		expected_type = _tmp6_;
		_tmp7_ = expected_type;
		if (_tmp7_ == NULL) {
			if (parameter != NULL) {
				g_printerr ("Action %s does not expect a parameter\n", action_name);
			}
		} else {
			if (parameter == NULL) {
				g_printerr ("Action %s expects a parameter\n", action_name);
			} else {
				gboolean _tmp8_ = FALSE;
				const GVariantType* _tmp9_;
				const GVariantType* _tmp10_;
				_tmp9_ = g_variant_get_type (parameter);
				_tmp10_ = G_VARIANT_TYPE_STRING;
				if (g_variant_type_equal (_tmp9_, _tmp10_)) {
					const GVariantType* _tmp11_;
					const GVariantType* _tmp12_;
					_tmp11_ = expected_type;
					_tmp12_ = G_VARIANT_TYPE_STRING;
					_tmp8_ = g_variant_type_equal (_tmp11_, _tmp12_);
				} else {
					_tmp8_ = FALSE;
				}
				_vala_assert (_tmp8_, "parameter.get_type().equal(GLib.VariantType.STRING) &&                         expected_type.equal(GLib.VariantType.STRING)");
			}
		}
		if (is_mouse) {
			GeeHashMap* _tmp13_;
			GeeHashMap* _tmp14_;
			_tmp13_ = self->mouseBindings;
			_tmp14_ = _g_object_ref0 (_tmp13_);
			_g_object_unref0 (bindings);
			bindings = _tmp14_;
		} else {
			GeeHashMap* _tmp15_;
			GeeHashMap* _tmp16_;
			_tmp15_ = self->keyBindings;
			_tmp16_ = _g_object_ref0 (_tmp15_);
			_g_object_unref0 (bindings);
			bindings = _tmp16_;
		}
		_tmp17_ = pdfpc_key_def_new (keycode, modMask);
		keydef = _tmp17_;
		_tmp18_ = bindings;
		_tmp19_ = keydef;
		_tmp20_ = action;
		_tmp21_ = pdfpc_presentation_controller_action_and_parameter_new (_tmp20_, parameter, action_name);
		_tmp22_ = _tmp21_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp18_, _tmp19_, _tmp22_);
		_g_object_unref0 (_tmp22_);
		_g_object_unref0 (keydef);
		_g_object_unref0 (bindings);
		_g_variant_type_free0 (expected_type);
	} else {
		g_printerr ("Unknown action %s\n", action_name);
	}
	_g_object_unref0 (action);
}

static void
pdfpc_presentation_controller_bind (pdfpcPresentationController* self,
                                    guint keycode,
                                    guint modMask,
                                    const gchar* action_name,
                                    GVariant* parameter)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (action_name != NULL);
	pdfpc_presentation_controller_bindKeyOrMouse (self, FALSE, keycode, modMask, action_name, parameter);
}

static void
pdfpc_presentation_controller_bindMouse (pdfpcPresentationController* self,
                                         guint keycode,
                                         guint modMask,
                                         const gchar* action_name,
                                         GVariant* parameter)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (action_name != NULL);
	pdfpc_presentation_controller_bindKeyOrMouse (self, TRUE, keycode, modMask, action_name, parameter);
}

/**
         * Unbind a key
         */
void
pdfpc_presentation_controller_unbind (pdfpcPresentationController* self,
                                      guint keycode,
                                      guint modMask)
{
	GeeHashMap* _tmp0_;
	pdfpcKeyDef* _tmp1_;
	pdfpcKeyDef* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->keyBindings;
	_tmp1_ = pdfpc_key_def_new (keycode, modMask);
	_tmp2_ = _tmp1_;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp0_, _tmp2_, NULL);
	_g_object_unref0 (_tmp2_);
}

/**
         * Unbind all keybindings
         */
void
pdfpc_presentation_controller_unbindAll (pdfpcPresentationController* self)
{
	GeeHashMap* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->keyBindings;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp0_);
}

/**
         * Unbind a mouse button
         */
void
pdfpc_presentation_controller_unbindMouse (pdfpcPresentationController* self,
                                           guint keycode,
                                           guint modMask)
{
	GeeHashMap* _tmp0_;
	pdfpcKeyDef* _tmp1_;
	pdfpcKeyDef* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->mouseBindings;
	_tmp1_ = pdfpc_key_def_new (keycode, modMask);
	_tmp2_ = _tmp1_;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp0_, _tmp2_, NULL);
	_g_object_unref0 (_tmp2_);
}

/**
         * Unbind all keybindings
         */
void
pdfpc_presentation_controller_unbindAllMouse (pdfpcPresentationController* self)
{
	GeeHashMap* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->mouseBindings;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp0_);
}

/**
         * Get the PDF file name
         */
gchar*
pdfpc_presentation_controller_get_pdf_fname (pdfpcPresentationController* self)
{
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = pdfpc_metadata_pdf_get_pdf_fname (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup (_tmp3_);
	result = _tmp4_;
	return result;
}

/**
         * Set the last slide as defined by the user
         */
static void
pdfpc_presentation_controller_set_end_user_slide (pdfpcPresentationController* self)
{
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = pdfpc_presentation_controller_get_current_user_slide_number (self);
	_tmp3_ = _tmp2_;
	pdfpc_metadata_pdf_set_end_user_slide (_tmp1_, _tmp3_);
	pdfpc_presentation_controller_controllables_update (self);
}

/**
         * Set the last slide as defined by the user
         */
void
pdfpc_presentation_controller_set_last_saved_slide (pdfpcPresentationController* self)
{
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	pdfpcWindowPresenter* _tmp4_;
	pdfpcWindowPresenter* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = pdfpc_presentation_controller_get_current_user_slide_number (self);
	_tmp3_ = _tmp2_;
	pdfpc_metadata_pdf_set_last_saved_slide (_tmp1_, _tmp3_);
	pdfpc_presentation_controller_controllables_update (self);
	_tmp4_ = pdfpc_presentation_controller_get_presenter (self);
	_tmp5_ = _tmp4_;
	pdfpc_window_presenter_session_saved (_tmp5_);
}

/**
         * Set the state of ignote_input_events
         */
void
pdfpc_presentation_controller_set_ignore_input_events (pdfpcPresentationController* self,
                                                       gboolean v)
{
	g_return_if_fail (self != NULL);
	pdfpc_presentation_controller_set_ignore_keyboard_events (self, v);
	pdfpc_presentation_controller_set_ignore_mouse_events (self, v);
}

static void
pdfpc_presentation_controller_readKeyBindings (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	{
		GeeList* _bt_list = NULL;
		GeeList* _tmp0_;
		gint _bt_size = 0;
		GeeList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _bt_index = 0;
		_tmp0_ = pdfpc_options_key_bindings;
		_bt_list = _tmp0_;
		_tmp1_ = _bt_list;
		_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_bt_size = _tmp3_;
		_bt_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			pdfpcOptionsBindTuple* bt = NULL;
			GeeList* _tmp6_;
			gpointer _tmp7_;
			pdfpcOptionsBindTuple* _tmp8_;
			const gchar* _tmp9_;
			_bt_index = _bt_index + 1;
			_tmp4_ = _bt_index;
			_tmp5_ = _bt_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _bt_list;
			_tmp7_ = gee_list_get (_tmp6_, _bt_index);
			bt = (pdfpcOptionsBindTuple*) _tmp7_;
			_tmp8_ = bt;
			_tmp9_ = _tmp8_->type;
			if (g_strcmp0 (_tmp9_, "bind") == 0) {
				pdfpcOptionsBindTuple* _tmp10_;
				const gchar* _tmp11_;
				const gchar* _tmp12_;
				_tmp10_ = bt;
				_tmp11_ = pdfpc_options_bind_tuple_get_actionArg (_tmp10_);
				_tmp12_ = _tmp11_;
				if (_tmp12_ != NULL) {
					pdfpcOptionsBindTuple* _tmp13_;
					pdfpcOptionsBindTuple* _tmp14_;
					pdfpcOptionsBindTuple* _tmp15_;
					const gchar* _tmp16_;
					pdfpcOptionsBindTuple* _tmp17_;
					const gchar* _tmp18_;
					const gchar* _tmp19_;
					GVariant* _tmp20_;
					GVariant* _tmp21_;
					_tmp13_ = bt;
					_tmp14_ = bt;
					_tmp15_ = bt;
					_tmp16_ = _tmp15_->actionName;
					_tmp17_ = bt;
					_tmp18_ = pdfpc_options_bind_tuple_get_actionArg (_tmp17_);
					_tmp19_ = _tmp18_;
					_tmp20_ = g_variant_new_string (_tmp19_);
					g_variant_ref_sink (_tmp20_);
					_tmp21_ = _tmp20_;
					pdfpc_presentation_controller_bind (self, _tmp13_->keyCode, _tmp14_->modMask, _tmp16_, _tmp21_);
					_g_variant_unref0 (_tmp21_);
				} else {
					pdfpcOptionsBindTuple* _tmp22_;
					pdfpcOptionsBindTuple* _tmp23_;
					pdfpcOptionsBindTuple* _tmp24_;
					const gchar* _tmp25_;
					_tmp22_ = bt;
					_tmp23_ = bt;
					_tmp24_ = bt;
					_tmp25_ = _tmp24_->actionName;
					pdfpc_presentation_controller_bind (self, _tmp22_->keyCode, _tmp23_->modMask, _tmp25_, NULL);
				}
			} else {
				pdfpcOptionsBindTuple* _tmp26_;
				const gchar* _tmp27_;
				_tmp26_ = bt;
				_tmp27_ = _tmp26_->type;
				if (g_strcmp0 (_tmp27_, "unbind") == 0) {
					pdfpcOptionsBindTuple* _tmp28_;
					pdfpcOptionsBindTuple* _tmp29_;
					_tmp28_ = bt;
					_tmp29_ = bt;
					pdfpc_presentation_controller_unbind (self, _tmp28_->keyCode, _tmp29_->modMask);
				} else {
					pdfpcOptionsBindTuple* _tmp30_;
					const gchar* _tmp31_;
					_tmp30_ = bt;
					_tmp31_ = _tmp30_->type;
					if (g_strcmp0 (_tmp31_, "unbindall") == 0) {
						pdfpc_presentation_controller_unbindAll (self);
					}
				}
			}
			_pdfpc_options_bind_tuple_unref0 (bt);
		}
	}
}

static void
pdfpc_presentation_controller_readMouseBindings (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	{
		GeeList* _bt_list = NULL;
		GeeList* _tmp0_;
		gint _bt_size = 0;
		GeeList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _bt_index = 0;
		_tmp0_ = pdfpc_options_mouse_bindings;
		_bt_list = _tmp0_;
		_tmp1_ = _bt_list;
		_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_bt_size = _tmp3_;
		_bt_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			pdfpcOptionsBindTuple* bt = NULL;
			GeeList* _tmp6_;
			gpointer _tmp7_;
			pdfpcOptionsBindTuple* _tmp8_;
			const gchar* _tmp9_;
			_bt_index = _bt_index + 1;
			_tmp4_ = _bt_index;
			_tmp5_ = _bt_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _bt_list;
			_tmp7_ = gee_list_get (_tmp6_, _bt_index);
			bt = (pdfpcOptionsBindTuple*) _tmp7_;
			_tmp8_ = bt;
			_tmp9_ = _tmp8_->type;
			if (g_strcmp0 (_tmp9_, "bind") == 0) {
				pdfpcOptionsBindTuple* _tmp10_;
				const gchar* _tmp11_;
				const gchar* _tmp12_;
				_tmp10_ = bt;
				_tmp11_ = pdfpc_options_bind_tuple_get_actionArg (_tmp10_);
				_tmp12_ = _tmp11_;
				if (_tmp12_ != NULL) {
					pdfpcOptionsBindTuple* _tmp13_;
					pdfpcOptionsBindTuple* _tmp14_;
					pdfpcOptionsBindTuple* _tmp15_;
					const gchar* _tmp16_;
					pdfpcOptionsBindTuple* _tmp17_;
					const gchar* _tmp18_;
					const gchar* _tmp19_;
					GVariant* _tmp20_;
					GVariant* _tmp21_;
					_tmp13_ = bt;
					_tmp14_ = bt;
					_tmp15_ = bt;
					_tmp16_ = _tmp15_->actionName;
					_tmp17_ = bt;
					_tmp18_ = pdfpc_options_bind_tuple_get_actionArg (_tmp17_);
					_tmp19_ = _tmp18_;
					_tmp20_ = g_variant_new_string (_tmp19_);
					g_variant_ref_sink (_tmp20_);
					_tmp21_ = _tmp20_;
					pdfpc_presentation_controller_bindMouse (self, _tmp13_->keyCode, _tmp14_->modMask, _tmp16_, _tmp21_);
					_g_variant_unref0 (_tmp21_);
				} else {
					pdfpcOptionsBindTuple* _tmp22_;
					pdfpcOptionsBindTuple* _tmp23_;
					pdfpcOptionsBindTuple* _tmp24_;
					const gchar* _tmp25_;
					_tmp22_ = bt;
					_tmp23_ = bt;
					_tmp24_ = bt;
					_tmp25_ = _tmp24_->actionName;
					pdfpc_presentation_controller_bindMouse (self, _tmp22_->keyCode, _tmp23_->modMask, _tmp25_, NULL);
				}
			} else {
				pdfpcOptionsBindTuple* _tmp26_;
				const gchar* _tmp27_;
				_tmp26_ = bt;
				_tmp27_ = _tmp26_->type;
				if (g_strcmp0 (_tmp27_, "unbind") == 0) {
					pdfpcOptionsBindTuple* _tmp28_;
					pdfpcOptionsBindTuple* _tmp29_;
					_tmp28_ = bt;
					_tmp29_ = bt;
					pdfpc_presentation_controller_unbindMouse (self, _tmp28_->keyCode, _tmp29_->modMask);
				} else {
					pdfpcOptionsBindTuple* _tmp30_;
					const gchar* _tmp31_;
					_tmp30_ = bt;
					_tmp31_ = _tmp30_->type;
					if (g_strcmp0 (_tmp31_, "unbindall") == 0) {
						pdfpc_presentation_controller_unbindAllMouse (self);
					}
				}
			}
			_pdfpc_options_bind_tuple_unref0 (bt);
		}
	}
}

/**
         * Register a new Controllable instance on this controller.
         *
         * On success true is returned, in case the controllable has already been
         * registered false is returned.
         */
gboolean
pdfpc_presentation_controller_register_controllable (pdfpcPresentationController* self,
                                                     pdfpcControllable* controllable)
{
	GeeList* _tmp0_;
	GeeList* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (controllable != NULL, FALSE);
	_tmp0_ = self->controllables;
	if (gee_collection_contains ((GeeCollection*) _tmp0_, controllable)) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->controllables;
	gee_collection_add ((GeeCollection*) _tmp1_, controllable);
	result = TRUE;
	return result;
}

/**
         * Go to the next slide
         */
void
pdfpc_presentation_controller_next_page (pdfpcPresentationController* self)
{
	gint new_slide_number = 0;
	gint _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	pdfpcMetadataPdf* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_current_slide_number;
	new_slide_number = _tmp0_ + 1;
	_tmp1_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp2_ = _tmp1_;
	new_slide_number = pdfpc_metadata_pdf_nearest_nonhidden (_tmp2_, new_slide_number, FALSE);
	pdfpc_presentation_controller_switch_to_slide_number (self, new_slide_number, FALSE);
}

/**
         * Go to the next slide, ignoring the "hidden" attribute
         */
void
pdfpc_presentation_controller_next_page_forced (pdfpcPresentationController* self)
{
	gint new_slide_number = 0;
	gint _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_current_slide_number;
	new_slide_number = _tmp0_ + 1;
	pdfpc_presentation_controller_switch_to_slide_number (self, new_slide_number, FALSE);
}

/**
         * Go to the next user slide
         */
void
pdfpc_presentation_controller_next_user_page (pdfpcPresentationController* self)
{
	gint new_slide_number = 0;
	gint _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	pdfpcMetadataPdf* _tmp10_;
	pdfpcMetadataPdf* _tmp11_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_current_user_slide_number (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = pdfpc_presentation_controller_get_user_n_slides (self);
	_tmp3_ = _tmp2_;
	if (_tmp1_ < (_tmp3_ - 1)) {
		pdfpcMetadataPdf* _tmp4_;
		pdfpcMetadataPdf* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		_tmp4_ = pdfpc_presentation_controller_get_metadata (self);
		_tmp5_ = _tmp4_;
		_tmp6_ = pdfpc_presentation_controller_get_current_user_slide_number (self);
		_tmp7_ = _tmp6_;
		new_slide_number = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp5_, _tmp7_ + 1, TRUE);
	} else {
		guint _tmp8_;
		guint _tmp9_;
		_tmp8_ = pdfpc_presentation_controller_get_n_slides (self);
		_tmp9_ = _tmp8_;
		new_slide_number = ((gint) _tmp9_) - 1;
	}
	_tmp10_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp11_ = _tmp10_;
	new_slide_number = pdfpc_metadata_pdf_nearest_nonhidden (_tmp11_, new_slide_number, FALSE);
	pdfpc_presentation_controller_switch_to_slide_number (self, new_slide_number, FALSE);
}

/**
         * Go to next real slide of the current user slide if there is one
         * otherwise go to largest already seen real slide on next user slide
         */
void
pdfpc_presentation_controller_next_unseen (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
}

/**
         * Jump to the last overlay for the current user slide
         */
void
pdfpc_presentation_controller_jump_to_last_overlay (pdfpcPresentationController* self)
{
	gint new_slide_number = 0;
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = pdfpc_presentation_controller_get_current_user_slide_number (self);
	_tmp3_ = _tmp2_;
	new_slide_number = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp1_, _tmp3_, TRUE);
	pdfpc_presentation_controller_switch_to_slide_number (self, new_slide_number, FALSE);
}

/**
         * Jump to the first overlay for the current user slide
         */
void
pdfpc_presentation_controller_jump_to_first_overlay (pdfpcPresentationController* self)
{
	gint new_slide_number = 0;
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = pdfpc_presentation_controller_get_current_user_slide_number (self);
	_tmp3_ = _tmp2_;
	new_slide_number = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp1_, _tmp3_, FALSE);
	pdfpc_presentation_controller_switch_to_slide_number (self, new_slide_number, FALSE);
}

/**
         * Go to the previous slide
         */
void
pdfpc_presentation_controller_previous_page (pdfpcPresentationController* self)
{
	gint new_slide_number = 0;
	gint _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	pdfpcMetadataPdf* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_current_slide_number;
	new_slide_number = _tmp0_ - 1;
	_tmp1_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp2_ = _tmp1_;
	new_slide_number = pdfpc_metadata_pdf_nearest_nonhidden (_tmp2_, new_slide_number, TRUE);
	pdfpc_presentation_controller_switch_to_slide_number (self, new_slide_number, FALSE);
}

/**
         * Go to the previous slide, ignoring the "hidden" attribute
         */
void
pdfpc_presentation_controller_previous_page_forced (pdfpcPresentationController* self)
{
	gint new_slide_number = 0;
	gint _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_current_slide_number;
	new_slide_number = _tmp0_ - 1;
	pdfpc_presentation_controller_switch_to_slide_number (self, new_slide_number, FALSE);
}

/**
         * Go to the previous user slide
         */
void
pdfpc_presentation_controller_previous_user_page (pdfpcPresentationController* self)
{
	gint new_slide_number = 0;
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	pdfpcMetadataPdf* _tmp4_;
	pdfpcMetadataPdf* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = pdfpc_presentation_controller_get_current_user_slide_number (self);
	_tmp3_ = _tmp2_;
	new_slide_number = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp1_, _tmp3_ - 1, TRUE);
	_tmp4_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp5_ = _tmp4_;
	new_slide_number = pdfpc_metadata_pdf_nearest_nonhidden (_tmp5_, new_slide_number, TRUE);
	pdfpc_presentation_controller_switch_to_slide_number (self, new_slide_number, FALSE);
}

/**
         * Go to the largest already seen real slide on previous user slide
         */
void
pdfpc_presentation_controller_previous_seen (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
}

/**
         * Go to the first slide
         */
static void
pdfpc_presentation_controller_goto_first (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	pdfpc_presentation_controller_switch_to_slide_number (self, 0, FALSE);
}

/**
         * Go to the last displayed slide
         */
void
pdfpc_presentation_controller_goto_last_saved_slide (pdfpcPresentationController* self)
{
	gint new_user_slide_number = 0;
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	gint new_slide_number = 0;
	pdfpcMetadataPdf* _tmp2_;
	pdfpcMetadataPdf* _tmp3_;
	pdfpcWindowPresenter* _tmp4_;
	pdfpcWindowPresenter* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	new_user_slide_number = pdfpc_metadata_pdf_get_last_saved_slide (_tmp1_);
	_tmp2_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp3_ = _tmp2_;
	new_slide_number = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp3_, new_user_slide_number, TRUE);
	pdfpc_presentation_controller_switch_to_slide_number (self, new_slide_number, FALSE);
	_tmp4_ = pdfpc_presentation_controller_get_presenter (self);
	_tmp5_ = _tmp4_;
	pdfpc_window_presenter_session_loaded (_tmp5_);
}

/**
         * Go to the last slide
         */
void
pdfpc_presentation_controller_goto_last (pdfpcPresentationController* self)
{
	gint new_user_slide_number = 0;
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	gint new_slide_number = 0;
	pdfpcMetadataPdf* _tmp2_;
	pdfpcMetadataPdf* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	new_user_slide_number = pdfpc_metadata_pdf_get_end_user_slide (_tmp1_);
	_tmp2_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp3_ = _tmp2_;
	new_slide_number = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp3_, new_user_slide_number, TRUE);
	pdfpc_presentation_controller_switch_to_slide_number (self, new_slide_number, FALSE);
}

/**
         * Go to the named slide
         */
void
pdfpc_presentation_controller_goto_string (pdfpcPresentationController* self,
                                           GVariant* page)
{
	pdfpcTimer* _tmp0_;
	gint destination = 0;
	const gchar* _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->timer;
	pdfpc_timer_run (_tmp0_);
	_tmp1_ = g_variant_get_string (page, NULL);
	destination = atoi (_tmp1_) - 1;
	pdfpc_presentation_controller_goto_user_page (self, destination, TRUE);
	_tmp2_ = self->priv->_frozen;
	if (!_tmp2_) {
		pdfpc_presentation_controller_set_faded_to_black (self, FALSE);
	}
	pdfpc_presentation_controller_controllables_update (self);
}

/**
         * Jump 10 (user) slides forward
         */
void
pdfpc_presentation_controller_jump10 (pdfpcPresentationController* self)
{
	gint new_user_slide_number = 0;
	gint _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint new_slide_number = 0;
	pdfpcMetadataPdf* _tmp4_;
	pdfpcMetadataPdf* _tmp5_;
	pdfpcMetadataPdf* _tmp6_;
	pdfpcMetadataPdf* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_current_user_slide_number (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = pdfpc_presentation_controller_get_user_n_slides (self);
	_tmp3_ = _tmp2_;
	new_user_slide_number = MIN (_tmp1_ + 10, _tmp3_ - 1);
	_tmp4_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp5_ = _tmp4_;
	new_slide_number = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp5_, new_user_slide_number, TRUE);
	_tmp6_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp7_ = _tmp6_;
	new_slide_number = pdfpc_metadata_pdf_nearest_nonhidden (_tmp7_, new_slide_number, FALSE);
	pdfpc_presentation_controller_switch_to_slide_number (self, new_slide_number, FALSE);
}

/**
         * Jump 10 (user) slides backward
         */
void
pdfpc_presentation_controller_back10 (pdfpcPresentationController* self)
{
	gint new_user_slide_number = 0;
	gint _tmp0_;
	gint _tmp1_;
	gint new_slide_number = 0;
	pdfpcMetadataPdf* _tmp2_;
	pdfpcMetadataPdf* _tmp3_;
	pdfpcMetadataPdf* _tmp4_;
	pdfpcMetadataPdf* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_current_user_slide_number (self);
	_tmp1_ = _tmp0_;
	new_user_slide_number = MAX (_tmp1_ - 10, 0);
	_tmp2_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp3_ = _tmp2_;
	new_slide_number = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp3_, new_user_slide_number, TRUE);
	_tmp4_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp5_ = _tmp4_;
	new_slide_number = pdfpc_metadata_pdf_nearest_nonhidden (_tmp5_, new_slide_number, TRUE);
	pdfpc_presentation_controller_switch_to_slide_number (self, new_slide_number, FALSE);
}

/**
         * Goto a slide in user page numbers
         */
void
pdfpc_presentation_controller_goto_user_page (pdfpcPresentationController* self,
                                              gint page_number,
                                              gboolean useLast)
{
	gint new_slide_number = 0;
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	g_return_if_fail (self != NULL);
	pdfpc_presentation_controller_controllables_hide_overview (self);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	new_slide_number = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp1_, page_number, useLast);
	pdfpc_presentation_controller_switch_to_slide_number (self, new_slide_number, FALSE);
	pdfpc_presentation_controller_set_ignore_input_events (self, FALSE);
}

/**
         * Go back in history
         */
void
pdfpc_presentation_controller_history_goto_back (pdfpcPresentationController* self)
{
	GeeArrayQueue* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gint new_slide_number = 0;
	GeeArrayQueue* _tmp3_;
	gpointer _tmp4_;
	GeeArrayQueue* _tmp5_;
	gint _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->history_bck;
	_tmp1_ = gee_array_queue_get_is_empty (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		return;
	}
	_tmp3_ = self->priv->history_bck;
	_tmp4_ = gee_deque_poll_head ((GeeDeque*) _tmp3_);
	new_slide_number = (gint) ((gintptr) _tmp4_);
	_tmp5_ = self->priv->history_fwd;
	_tmp6_ = self->priv->_current_slide_number;
	gee_deque_offer_head ((GeeDeque*) _tmp5_, (gpointer) ((gintptr) _tmp6_));
	pdfpc_presentation_controller_switch_to_slide_number (self, new_slide_number, TRUE);
}

/**
         * Go forward in history
         */
void
pdfpc_presentation_controller_history_goto_fwd (pdfpcPresentationController* self)
{
	GeeArrayQueue* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gint new_slide_number = 0;
	GeeArrayQueue* _tmp3_;
	gpointer _tmp4_;
	GeeArrayQueue* _tmp5_;
	gint _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->history_fwd;
	_tmp1_ = gee_array_queue_get_is_empty (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		return;
	}
	_tmp3_ = self->priv->history_fwd;
	_tmp4_ = gee_deque_poll_head ((GeeDeque*) _tmp3_);
	new_slide_number = (gint) ((gintptr) _tmp4_);
	_tmp5_ = self->priv->history_bck;
	_tmp6_ = self->priv->_current_slide_number;
	gee_deque_offer_head ((GeeDeque*) _tmp5_, (gpointer) ((gintptr) _tmp6_));
	pdfpc_presentation_controller_switch_to_slide_number (self, new_slide_number, TRUE);
}

/**
         * Undo the drawing
         */
void
pdfpc_presentation_controller_undo (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	if (pdfpc_presentation_controller_in_drawing_mode (self)) {
		pdfpcDrawingsDrawing* _tmp0_;
		_tmp0_ = self->pen_drawing;
		pdfpc_drawings_drawing_undo (_tmp0_);
		pdfpc_presentation_controller_queue_pen_surface_draws (self);
	}
}

/**
         * Undo the drawing
         */
void
pdfpc_presentation_controller_redo (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	if (pdfpc_presentation_controller_in_drawing_mode (self)) {
		pdfpcDrawingsDrawing* _tmp0_;
		_tmp0_ = self->pen_drawing;
		pdfpc_drawings_drawing_redo (_tmp0_);
		pdfpc_presentation_controller_queue_pen_surface_draws (self);
	}
}

/**
         * Notify the controllables that they have to update the view
         */
void
pdfpc_presentation_controller_controllables_update (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_UPDATE_REQUEST_SIGNAL], 0);
}

void
pdfpc_presentation_controller_toggle_overview (pdfpcPresentationController* self)
{
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = pdfpc_metadata_pdf_get_is_ready (_tmp1_);
	_tmp3_ = _tmp2_;
	if (!_tmp3_) {
		return;
	}
	_tmp4_ = pdfpc_presentation_controller_get_overview_shown (self);
	_tmp5_ = _tmp4_;
	if (_tmp5_) {
		pdfpc_presentation_controller_controllables_hide_overview (self);
	} else {
		pdfpc_presentation_controller_controllables_show_overview (self);
	}
}

void
pdfpc_presentation_controller_controllables_show_overview (pdfpcPresentationController* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	g_signal_emit (self, pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_SHOW_OVERVIEW_REQUEST_SIGNAL], 0);
	_tmp0_ = pdfpc_presentation_controller_get_overview_shown (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		pdfpc_presentation_controller_set_ignore_mouse_events (self, TRUE);
	}
}

void
pdfpc_presentation_controller_controllables_hide_overview (pdfpcPresentationController* self)
{
	gint _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	pdfpc_presentation_controller_set_ignore_mouse_events (self, FALSE);
	_tmp0_ = pdfpc_presentation_controller_get_current_user_slide_number (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = pdfpc_presentation_controller_get_user_n_slides (self);
	_tmp3_ = _tmp2_;
	if (_tmp1_ >= _tmp3_) {
		pdfpc_presentation_controller_goto_last (self);
	}
	g_signal_emit (self, pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_HIDE_OVERVIEW_REQUEST_SIGNAL], 0);
	pdfpc_presentation_controller_controllables_update (self);
}

void
pdfpc_presentation_controller_toggle_windowed (pdfpcPresentationController* self)
{
	pdfpcWindowPresenter* _tmp0_;
	pdfpcWindowPresenter* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_presenter (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		pdfpcWindowPresenter* _tmp2_;
		pdfpcWindowPresenter* _tmp3_;
		_tmp2_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp3_ = _tmp2_;
		pdfpc_window_fullscreen_toggle_windowed ((pdfpcWindowFullscreen*) _tmp3_);
	} else {
		pdfpcWindowPresentation* _tmp4_;
		pdfpcWindowPresentation* _tmp5_;
		_tmp4_ = pdfpc_presentation_controller_get_presentation (self);
		_tmp5_ = _tmp4_;
		if (_tmp5_ != NULL) {
			pdfpcWindowPresentation* _tmp6_;
			pdfpcWindowPresentation* _tmp7_;
			_tmp6_ = pdfpc_presentation_controller_get_presentation (self);
			_tmp7_ = _tmp6_;
			pdfpc_window_fullscreen_toggle_windowed ((pdfpcWindowFullscreen*) _tmp7_);
		}
	}
}

/**
         * Fill the presentation display with black
         */
void
pdfpc_presentation_controller_fade_to_black (pdfpcPresentationController* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_single_screen_mode (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		return;
	}
	_tmp2_ = self->priv->_faded_to_black;
	pdfpc_presentation_controller_set_faded_to_black (self, !_tmp2_);
	pdfpc_presentation_controller_controllables_update (self);
}

/**
         * Hide the presentation window
         */
void
pdfpc_presentation_controller_hide_presentation (pdfpcPresentationController* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_single_screen_mode (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		return;
	}
	_tmp2_ = self->priv->_hidden;
	pdfpc_presentation_controller_set_hidden (self, !_tmp2_);
	pdfpc_presentation_controller_controllables_update (self);
}

/**
         * Edit note for current slide.
         */
void
pdfpc_presentation_controller_controllables_edit_note (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_EDIT_NOTE_REQUEST_SIGNAL], 0);
}

/**
         * Ask for the page to jump to
         */
void
pdfpc_presentation_controller_controllables_ask_goto_page (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_ASK_GOTO_PAGE_REQUEST_SIGNAL], 0);
}

/**
         * Freeze the presentation window
         */
void
pdfpc_presentation_controller_toggle_freeze (pdfpcPresentationController* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	pdfpcWindowPresentation* _tmp4_;
	pdfpcWindowPresentation* _tmp5_;
	pdfpcViewPdf* _tmp6_;
	pdfpcViewPdf* _tmp7_;
	gboolean _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_single_screen_mode (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		return;
	}
	_tmp2_ = self->priv->_frozen;
	pdfpc_presentation_controller_set_frozen (self, !_tmp2_);
	_tmp3_ = self->priv->_frozen;
	if (!_tmp3_) {
		pdfpc_presentation_controller_set_faded_to_black (self, FALSE);
	}
	pdfpc_presentation_controller_controllables_update (self);
	_tmp4_ = pdfpc_presentation_controller_get_presentation (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = pdfpc_controllable_get_main_view ((pdfpcControllable*) _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = self->priv->_frozen;
	g_signal_emit_by_name (_tmp7_, "freeze-toggled", _tmp8_);
}

/**
         * Toggle skip for current slide
         */
void
pdfpc_presentation_controller_add_overlay (pdfpcPresentationController* self)
{
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_current_slide_number;
	if (pdfpc_metadata_pdf_add_overlay (_tmp1_, _tmp2_) != 0) {
		gboolean _tmp3_;
		gboolean _tmp4_;
		_tmp3_ = pdfpc_presentation_controller_get_overview_shown (self);
		_tmp4_ = _tmp3_;
		if (_tmp4_) {
			pdfpcWindowOverview* _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			_tmp5_ = self->priv->_overview;
			_tmp6_ = pdfpc_presentation_controller_get_user_n_slides (self);
			_tmp7_ = _tmp6_;
			pdfpc_window_overview_remove_current (_tmp5_, _tmp7_);
		} else {
			pdfpcWindowOverview* _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			_tmp8_ = self->priv->_overview;
			_tmp9_ = pdfpc_presentation_controller_get_user_n_slides (self);
			_tmp10_ = _tmp9_;
			pdfpc_window_overview_set_n_slides (_tmp8_, _tmp10_);
		}
		pdfpc_presentation_controller_controllables_update (self);
	}
}

/**
         * Toggle the hidden flag of the current slide
         */
void
pdfpc_presentation_controller_toggle_hidden (pdfpcPresentationController* self)
{
	gboolean hidden = FALSE;
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	gint _tmp2_;
	gint offset = 0;
	pdfpcMetadataPdf* _tmp3_;
	pdfpcMetadataPdf* _tmp4_;
	gint _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_current_slide_number;
	hidden = pdfpc_metadata_pdf_get_slide_hidden (_tmp1_, _tmp2_);
	_tmp3_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp4_ = _tmp3_;
	_tmp5_ = self->priv->_current_slide_number;
	offset = pdfpc_metadata_pdf_set_slide_hidden (_tmp4_, _tmp5_, !hidden);
	if (offset != 0) {
		gint _tmp6_;
		_tmp6_ = self->priv->_current_slide_number;
		pdfpc_presentation_controller_switch_to_slide_number (self, _tmp6_ + offset, FALSE);
		pdfpc_presentation_controller_controllables_update (self);
	}
}

/**
         * Start the presentation (-> timer)
         */
void
pdfpc_presentation_controller_start (pdfpcPresentationController* self)
{
	pdfpcTimer* _tmp0_;
	gint _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->timer;
	pdfpc_timer_start (_tmp0_);
	_tmp1_ = self->priv->_current_slide_number;
	pdfpc_presentation_controller_start_autoadvance_timer (self, _tmp1_);
	pdfpc_presentation_controller_controllables_update (self);
}

/**
         * Pause the timer
         */
void
pdfpc_presentation_controller_toggle_pause (pdfpcPresentationController* self)
{
	pdfpcTimer* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->timer;
	pdfpc_timer_toggle_pause (_tmp0_);
	if (pdfpc_presentation_controller_is_running (self)) {
		gint _tmp1_;
		_tmp1_ = self->priv->_current_slide_number;
		pdfpc_presentation_controller_start_autoadvance_timer (self, _tmp1_);
	}
	pdfpc_presentation_controller_controllables_update (self);
}

/**
         * Reset the timer
         */
void
pdfpc_presentation_controller_reset_timer (pdfpcPresentationController* self)
{
	pdfpcTimer* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->timer;
	pdfpc_timer_reset (_tmp0_);
}

/**
         * Cycle the timer view (count up/count down/current time)
         */
void
pdfpc_presentation_controller_cycle_timer (pdfpcPresentationController* self)
{
	pdfpcTimer* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->timer;
	pdfpc_timer_cycle_mode (_tmp0_);
}

/**
         * Reload the presentation
         */
void
pdfpc_presentation_controller_reload (pdfpcPresentationController* self)
{
	gchar* fname = NULL;
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = pdfpc_metadata_pdf_get_pdf_fname (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup (_tmp3_);
	fname = _tmp4_;
	_tmp5_ = fname;
	if (_tmp5_ != NULL) {
		gboolean _tmp6_;
		gboolean _tmp7_;
		gint position_saved = 0;
		gint _tmp8_;
		pdfpcMetadataPdf* _tmp9_;
		pdfpcMetadataPdf* _tmp10_;
		const gchar* _tmp11_;
		guint _tmp12_;
		guint _tmp13_;
		guint _tmp14_;
		guint _tmp15_;
		GeeArrayQueue* _tmp18_;
		GeeArrayQueue* _tmp19_;
		pdfpcDrawingsDrawing* _tmp20_;
		pdfpcMetadataPdf* _tmp21_;
		pdfpcMetadataPdf* _tmp22_;
		pdfpcRendererPdf* _tmp23_;
		pdfpcRendererPdf* _tmp24_;
		_tmp6_ = pdfpc_presentation_controller_get_overview_shown (self);
		_tmp7_ = _tmp6_;
		if (_tmp7_) {
			pdfpc_presentation_controller_controllables_hide_overview (self);
		}
		_tmp8_ = self->priv->_current_slide_number;
		position_saved = _tmp8_;
		_tmp9_ = pdfpc_presentation_controller_get_metadata (self);
		_tmp10_ = _tmp9_;
		_tmp11_ = fname;
		pdfpc_metadata_pdf_load (_tmp10_, _tmp11_);
		_tmp12_ = pdfpc_presentation_controller_get_n_slides (self);
		_tmp13_ = _tmp12_;
		if (_tmp13_ == ((guint) 0)) {
			_g_free0 (fname);
			return;
		}
		_tmp14_ = pdfpc_presentation_controller_get_n_slides (self);
		_tmp15_ = _tmp14_;
		if (((guint) position_saved) >= _tmp15_) {
			guint _tmp16_;
			guint _tmp17_;
			_tmp16_ = pdfpc_presentation_controller_get_n_slides (self);
			_tmp17_ = _tmp16_;
			pdfpc_presentation_controller_set_current_slide_number (self, ((gint) _tmp17_) - 1);
		}
		_tmp18_ = self->priv->history_bck;
		gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp18_);
		_tmp19_ = self->priv->history_fwd;
		gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp19_);
		_tmp20_ = self->pen_drawing;
		pdfpc_drawings_drawing_clear_storage (_tmp20_);
		pdfpc_presentation_controller_clear_pen_drawing (self);
		_tmp21_ = pdfpc_presentation_controller_get_metadata (self);
		_tmp22_ = _tmp21_;
		_tmp23_ = pdfpc_metadata_pdf_get_renderer (_tmp22_);
		_tmp24_ = _tmp23_;
		pdfpc_renderer_pdf_invalidate_cache (_tmp24_);
		g_signal_emit (self, pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_RELOAD_REQUEST_SIGNAL], 0);
		pdfpc_presentation_controller_controllables_update (self);
	}
	_g_free0 (fname);
}

void
pdfpc_presentation_controller_increase_font_size (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_INCREASE_FONT_SIZE_REQUEST_SIGNAL], 0);
}

void
pdfpc_presentation_controller_decrease_font_size (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_DECREASE_FONT_SIZE_REQUEST_SIGNAL], 0);
}

/**
         * Mode-sensitive size increment
         */
void
pdfpc_presentation_controller_increase_size (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	switch (self->priv->annotation_mode) {
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_NORMAL:
		{
			pdfpc_presentation_controller_increase_font_size (self);
			break;
		}
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_POINTER:
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_SPOTLIGHT:
		{
			pdfpc_presentation_controller_increase_pointer_size (self);
			break;
		}
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_PEN:
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_ERASER:
		{
			pdfpc_presentation_controller_increase_pen_size (self);
			break;
		}
		default:
		break;
	}
}

/**
         * Mode-sensitive size decrement
         */
void
pdfpc_presentation_controller_decrease_size (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	switch (self->priv->annotation_mode) {
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_NORMAL:
		{
			pdfpc_presentation_controller_decrease_font_size (self);
			break;
		}
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_POINTER:
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_SPOTLIGHT:
		{
			pdfpc_presentation_controller_decrease_pointer_size (self);
			break;
		}
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_PEN:
		case PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_ERASER:
		{
			pdfpc_presentation_controller_decrease_pen_size (self);
			break;
		}
		default:
		break;
	}
}

/**
         * Toggle toolbox visibility
         */
void
pdfpc_presentation_controller_toggle_toolbox (pdfpcPresentationController* self)
{
	g_return_if_fail (self != NULL);
	pdfpc_options_toolbox_shown = !pdfpc_options_toolbox_shown;
	pdfpc_presentation_controller_controllables_update (self);
}

void
pdfpc_presentation_controller_zoom_highlighted (pdfpcPresentationController* self)
{
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_in_zoom;
	if (!_tmp0_) {
		pdfpc_presentation_controller_toggle_zoom (self);
	}
}

void
pdfpc_presentation_controller_toggle_max_current_view (pdfpcPresentationController* self)
{
	pdfpcWindowPresenter* _tmp0_;
	pdfpcWindowPresenter* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_presenter (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		gboolean onoff = FALSE;
		pdfpcWindowPresenter* _tmp2_;
		pdfpcWindowPresenter* _tmp3_;
		gboolean _tmp4_;
		gboolean _tmp5_;
		pdfpcWindowPresenter* _tmp6_;
		pdfpcWindowPresenter* _tmp7_;
		_tmp2_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp3_ = _tmp2_;
		_tmp4_ = pdfpc_window_presenter_get_current_view_maximized (_tmp3_);
		_tmp5_ = _tmp4_;
		onoff = !_tmp5_;
		_tmp6_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp7_ = _tmp6_;
		pdfpc_window_presenter_maximize_current_view (_tmp7_, onoff);
	}
}

void
pdfpc_presentation_controller_customize_gui (pdfpcPresentationController* self)
{
	pdfpcWindowPresenter* _tmp0_;
	pdfpcWindowPresenter* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_presenter (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		pdfpcWindowPresenter* _tmp2_;
		pdfpcWindowPresenter* _tmp3_;
		_tmp2_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp3_ = _tmp2_;
		pdfpc_window_presenter_set_customizable (_tmp3_, TRUE);
		pdfpc_presentation_controller_set_in_customization (self, TRUE);
	}
}

/**
         * Zoom in the highlighted area
         */
void
pdfpc_presentation_controller_toggle_zoom (pdfpcPresentationController* self)
{
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_in_zoom;
	if (!_tmp0_) {
		gboolean _tmp1_ = FALSE;
		gboolean _tmp2_ = FALSE;
		pdfpcPresentationControllerScaledRectangle _tmp5_;
		pdfpcPresentationControllerScaledRectangle _tmp6_;
		pdfpcPresentationControllerScaledRectangle _tmp7_;
		pdfpcPresentationControllerScaledRectangle _tmp8_;
		if (self->priv->annotation_mode != PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_POINTER) {
			_tmp2_ = TRUE;
		} else {
			pdfpcPresentationControllerScaledRectangle _tmp3_;
			_tmp3_ = self->highlight;
			_tmp2_ = _tmp3_.width <= 0.01;
		}
		if (_tmp2_) {
			_tmp1_ = TRUE;
		} else {
			pdfpcPresentationControllerScaledRectangle _tmp4_;
			_tmp4_ = self->highlight;
			_tmp1_ = _tmp4_.height <= 0.01;
		}
		if (_tmp1_) {
			return;
		}
		_tmp5_ = self->highlight;
		g_signal_emit (self, pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_ZOOM_REQUEST_SIGNAL], 0, &_tmp5_);
		_tmp6_ = self->highlight;
		self->zoom_stack_highlight = _tmp6_;
		self->zoom_stack_drawing = self->priv->pen_drawing_present;
		_tmp7_ = self->highlight;
		_tmp8_ = self->highlight;
		if (_tmp7_.width > _tmp8_.height) {
			pdfpcPresentationControllerScaledRectangle _tmp9_;
			pdfpcPresentationControllerScaledRectangle _tmp10_;
			_tmp9_ = self->highlight;
			self->highlight.height = self->highlight.height / _tmp9_.width;
			self->highlight.width = (gdouble) 1;
			self->highlight.x = (gdouble) 0;
			_tmp10_ = self->highlight;
			self->highlight.y = (1 - _tmp10_.height) / 2;
		} else {
			pdfpcPresentationControllerScaledRectangle _tmp11_;
			pdfpcPresentationControllerScaledRectangle _tmp12_;
			_tmp11_ = self->highlight;
			self->highlight.width = self->highlight.width / _tmp11_.height;
			self->highlight.height = (gdouble) 1;
			_tmp12_ = self->highlight;
			self->highlight.x = (1 - _tmp12_.width) / 2;
			self->highlight.y = (gdouble) 0;
		}
		if (self->priv->pen_drawing_present) {
			pdfpc_presentation_controller_toggle_drawings (self);
		}
		pdfpc_presentation_controller_set_in_zoom (self, TRUE);
	} else {
		pdfpcPresentationControllerScaledRectangle _tmp13_;
		g_signal_emit (self, pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_ZOOM_REQUEST_SIGNAL], 0, NULL);
		pdfpc_presentation_controller_set_in_zoom (self, FALSE);
		if (self->zoom_stack_drawing) {
			pdfpc_presentation_controller_toggle_drawings (self);
		}
		_tmp13_ = self->zoom_stack_highlight;
		self->highlight = _tmp13_;
	}
	pdfpc_presentation_controller_queue_pointer_surface_draws (self);
}

/**
         * Show help
         */
void
pdfpc_presentation_controller_show_help (pdfpcPresentationController* self)
{
	pdfpcWindowPresenter* _tmp0_;
	pdfpcWindowPresenter* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = pdfpc_presentation_controller_get_presenter (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		pdfpcWindowPresenter* _tmp2_;
		pdfpcWindowPresenter* _tmp3_;
		_tmp2_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp3_ = _tmp2_;
		pdfpc_window_presenter_show_help_window (_tmp3_, TRUE);
	}
}

/**
         * Show/hide QR code
         */
void
pdfpc_presentation_controller_show_qrcode (pdfpcPresentationController* self)
{
	gboolean _tmp0_ = FALSE;
	pdfpcWindowPresenter* _tmp1_;
	pdfpcWindowPresenter* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp1_ = pdfpc_presentation_controller_get_presenter (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		pdfpcRestServer* _tmp3_;
		_tmp3_ = self->priv->_rest_server;
		_tmp0_ = _tmp3_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		pdfpcWindowPresenter* _tmp4_;
		pdfpcWindowPresenter* _tmp5_;
		_tmp4_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp5_ = _tmp4_;
		pdfpc_window_presenter_show_qrcode_window (_tmp5_, TRUE);
	}
}

void
pdfpc_presentation_controller_hide_qrcode (pdfpcPresentationController* self)
{
	gboolean _tmp0_ = FALSE;
	pdfpcWindowPresenter* _tmp1_;
	pdfpcWindowPresenter* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp1_ = pdfpc_presentation_controller_get_presenter (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		pdfpcRestServer* _tmp3_;
		_tmp3_ = self->priv->_rest_server;
		_tmp0_ = _tmp3_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		pdfpcWindowPresenter* _tmp4_;
		pdfpcWindowPresenter* _tmp5_;
		_tmp4_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp5_ = _tmp4_;
		pdfpc_window_presenter_show_qrcode_window (_tmp5_, FALSE);
	}
}

void
pdfpc_presentation_controller_exit_state (pdfpcPresentationController* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	pdfpcTimer* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_faded_to_black;
	if (_tmp0_) {
		pdfpc_presentation_controller_fade_to_black (self);
	}
	_tmp1_ = self->priv->_frozen;
	if (_tmp1_) {
		pdfpc_presentation_controller_toggle_freeze (self);
	}
	_tmp2_ = self->timer;
	if (pdfpc_timer_is_paused (_tmp2_)) {
		pdfpc_presentation_controller_toggle_pause (self);
	}
	_tmp3_ = self->priv->_in_zoom;
	if (_tmp3_) {
		pdfpc_presentation_controller_toggle_zoom (self);
	}
	_tmp5_ = self->priv->_in_customization;
	if (_tmp5_) {
		pdfpcWindowPresenter* _tmp6_;
		pdfpcWindowPresenter* _tmp7_;
		_tmp6_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp7_ = _tmp6_;
		_tmp4_ = _tmp7_ != NULL;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		pdfpcWindowPresenter* _tmp8_;
		pdfpcWindowPresenter* _tmp9_;
		_tmp8_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp9_ = _tmp8_;
		pdfpc_window_presenter_set_customizable (_tmp9_, FALSE);
		pdfpc_presentation_controller_set_in_customization (self, FALSE);
	}
}

/**
         * Give the Gdk.Rectangle corresponding to the Poppler.Rectangle for the nth
         * controllable's main view.
         */
void
pdfpc_presentation_controller_overlay_pos (pdfpcPresentationController* self,
                                           gint n,
                                           PopplerRectangle* area,
                                           GdkRectangle* rect,
                                           pdfpcWindowControllableWindow** window)
{
	GdkRectangle _vala_rect = {0};
	pdfpcWindowControllableWindow* _vala_window = NULL;
	pdfpcControllable* _tmp0_ = NULL;
	GeeList* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	pdfpcControllable* c = NULL;
	pdfpcControllable* _tmp6_;
	pdfpcControllable* _tmp7_;
	pdfpcControllable* _tmp8_;
	pdfpcWindowControllableWindow* _tmp9_;
	pdfpcControllable* _tmp10_;
	pdfpcViewPdf* _tmp11_;
	pdfpcViewPdf* _tmp12_;
	pdfpcControllable* _tmp13_;
	pdfpcViewPdf* _tmp14_;
	pdfpcViewPdf* _tmp15_;
	PopplerRectangle _tmp16_;
	GdkRectangle _tmp17_ = {0};
	g_return_if_fail (self != NULL);
	g_return_if_fail (area != NULL);
	_g_object_unref0 (_vala_window);
	_vala_window = NULL;
	_tmp1_ = self->controllables;
	_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (n < _tmp3_) {
		GeeList* _tmp4_;
		gpointer _tmp5_;
		_tmp4_ = self->controllables;
		_tmp5_ = gee_list_get (_tmp4_, n);
		_g_object_unref0 (_tmp0_);
		_tmp0_ = (pdfpcControllable*) _tmp5_;
	} else {
		_g_object_unref0 (_tmp0_);
		_tmp0_ = NULL;
	}
	_tmp6_ = _g_object_ref0 (_tmp0_);
	c = _tmp6_;
	_tmp7_ = c;
	if (_tmp7_ == NULL) {
		memset (&_vala_rect, 0, sizeof (GdkRectangle));
		_g_object_unref0 (c);
		_g_object_unref0 (_tmp0_);
		if (rect) {
			*rect = _vala_rect;
		}
		if (window) {
			*window = _vala_window;
		} else {
			_g_object_unref0 (_vala_window);
		}
		return;
	}
	_tmp8_ = c;
	_tmp9_ = _g_object_ref0 (PDFPC_WINDOW_IS_CONTROLLABLE_WINDOW (_tmp8_) ? ((pdfpcWindowControllableWindow*) _tmp8_) : NULL);
	_g_object_unref0 (_vala_window);
	_vala_window = _tmp9_;
	_tmp10_ = c;
	_tmp11_ = pdfpc_controllable_get_main_view (_tmp10_);
	_tmp12_ = _tmp11_;
	if (_tmp12_ == NULL) {
		memset (&_vala_rect, 0, sizeof (GdkRectangle));
		_g_object_unref0 (c);
		_g_object_unref0 (_tmp0_);
		if (rect) {
			*rect = _vala_rect;
		}
		if (window) {
			*window = _vala_window;
		} else {
			_g_object_unref0 (_vala_window);
		}
		return;
	}
	_tmp13_ = c;
	_tmp14_ = pdfpc_controllable_get_main_view (_tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = *area;
	pdfpc_view_pdf_convert_poppler_rectangle_to_gdk_rectangle (_tmp15_, &_tmp16_, &_tmp17_);
	_vala_rect = _tmp17_;
	_g_object_unref0 (c);
	_g_object_unref0 (_tmp0_);
	if (rect) {
		*rect = _vala_rect;
	}
	if (window) {
		*window = _vala_window;
	} else {
		_g_object_unref0 (_vala_window);
	}
}

gint
pdfpc_presentation_controller_get_current_slide_number (pdfpcPresentationController* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_current_slide_number;
	return result;
}

void
pdfpc_presentation_controller_set_current_slide_number (pdfpcPresentationController* self,
                                                        gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_get_current_slide_number (self);
	if (old_value != value) {
		self->priv->_current_slide_number = value;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_CURRENT_SLIDE_NUMBER_PROPERTY]);
	}
}

pdfpcPresentationControllerProgressStatus
pdfpc_presentation_controller_get_progress_status (pdfpcPresentationController* self)
{
	pdfpcPresentationControllerProgressStatus result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_progress_status;
	return result;
}

void
pdfpc_presentation_controller_set_progress_status (pdfpcPresentationController* self,
                                                   pdfpcPresentationControllerProgressStatus value)
{
	pdfpcPresentationControllerProgressStatus old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_get_progress_status (self);
	if (old_value != value) {
		self->priv->_progress_status = value;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_PROPERTY]);
	}
}

gint
pdfpc_presentation_controller_get_current_user_slide_number (pdfpcPresentationController* self)
{
	gint result;
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	gint _tmp2_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_current_slide_number;
	result = pdfpc_metadata_pdf_real_slide_to_user_slide (_tmp1_, _tmp2_);
	return result;
}

gboolean
pdfpc_presentation_controller_get_faded_to_black (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_faded_to_black;
	return result;
}

void
pdfpc_presentation_controller_set_faded_to_black (pdfpcPresentationController* self,
                                                  gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_get_faded_to_black (self);
	if (old_value != value) {
		self->priv->_faded_to_black = value;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_FADED_TO_BLACK_PROPERTY]);
	}
}

gboolean
pdfpc_presentation_controller_get_hidden (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_hidden;
	return result;
}

void
pdfpc_presentation_controller_set_hidden (pdfpcPresentationController* self,
                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_get_hidden (self);
	if (old_value != value) {
		self->priv->_hidden = value;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_HIDDEN_PROPERTY]);
	}
}

gboolean
pdfpc_presentation_controller_get_frozen (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_frozen;
	return result;
}

void
pdfpc_presentation_controller_set_frozen (pdfpcPresentationController* self,
                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_get_frozen (self);
	if (old_value != value) {
		self->priv->_frozen = value;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_FROZEN_PROPERTY]);
	}
}

gboolean
pdfpc_presentation_controller_get_in_zoom (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_in_zoom;
	return result;
}

void
pdfpc_presentation_controller_set_in_zoom (pdfpcPresentationController* self,
                                           gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_get_in_zoom (self);
	if (old_value != value) {
		self->priv->_in_zoom = value;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_IN_ZOOM_PROPERTY]);
	}
}

gboolean
pdfpc_presentation_controller_get_in_customization (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_in_customization;
	return result;
}

void
pdfpc_presentation_controller_set_in_customization (pdfpcPresentationController* self,
                                                    gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_get_in_customization (self);
	if (old_value != value) {
		self->priv->_in_customization = value;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_IN_CUSTOMIZATION_PROPERTY]);
	}
}

guint
pdfpc_presentation_controller_get_n_slides (pdfpcPresentationController* self)
{
	guint result;
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	result = pdfpc_metadata_pdf_get_slide_count (_tmp1_);
	return result;
}

gint
pdfpc_presentation_controller_get_user_n_slides (pdfpcPresentationController* self)
{
	gint result;
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = pdfpc_presentation_controller_get_metadata (self);
	_tmp1_ = _tmp0_;
	result = pdfpc_metadata_pdf_get_user_slide_count (_tmp1_);
	return result;
}

pdfpcWindowPresenter*
pdfpc_presentation_controller_get_presenter (pdfpcPresentationController* self)
{
	pdfpcWindowPresenter* result;
	pdfpcWindowPresenter* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_presenter;
	result = _tmp0_;
	return result;
}

void
pdfpc_presentation_controller_set_presenter (pdfpcPresentationController* self,
                                             pdfpcWindowPresenter* value)
{
	pdfpcWindowPresenter* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_presenter);
	self->priv->_presenter = _tmp0_;
	if (value != NULL) {
		pdfpc_presentation_controller_register_controllable (self, (pdfpcControllable*) value);
	}
	g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_PRESENTER_PROPERTY]);
}

pdfpcWindowPresentation*
pdfpc_presentation_controller_get_presentation (pdfpcPresentationController* self)
{
	pdfpcWindowPresentation* result;
	pdfpcWindowPresentation* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_presentation;
	result = _tmp0_;
	return result;
}

void
pdfpc_presentation_controller_set_presentation (pdfpcPresentationController* self,
                                                pdfpcWindowPresentation* value)
{
	pdfpcWindowPresentation* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_presentation);
	self->priv->_presentation = _tmp0_;
	if (value != NULL) {
		pdfpc_presentation_controller_register_controllable (self, (pdfpcControllable*) value);
	}
	g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_PRESENTATION_PROPERTY]);
}

static gboolean
pdfpc_presentation_controller_get_single_screen_mode (pdfpcPresentationController* self)
{
	gboolean result;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	pdfpcWindowPresentation* _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp2_ = self->priv->_presentation;
	if (_tmp2_ == NULL) {
		_tmp1_ = TRUE;
	} else {
		pdfpcWindowPresenter* _tmp3_;
		_tmp3_ = self->priv->_presenter;
		_tmp1_ = _tmp3_ == NULL;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		pdfpcWindowPresentation* _tmp4_;
		_tmp4_ = self->priv->_presentation;
		_tmp0_ = !pdfpc_window_fullscreen_is_monitor_connected ((pdfpcWindowFullscreen*) _tmp4_);
	}
	result = _tmp0_;
	return result;
}

gboolean
pdfpc_presentation_controller_get_ignore_keyboard_events (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_ignore_keyboard_events;
	return result;
}

void
pdfpc_presentation_controller_set_ignore_keyboard_events (pdfpcPresentationController* self,
                                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_get_ignore_keyboard_events (self);
	if (old_value != value) {
		self->priv->_ignore_keyboard_events = value;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_IGNORE_KEYBOARD_EVENTS_PROPERTY]);
	}
}

gboolean
pdfpc_presentation_controller_get_ignore_mouse_events (pdfpcPresentationController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_ignore_mouse_events;
	return result;
}

void
pdfpc_presentation_controller_set_ignore_mouse_events (pdfpcPresentationController* self,
                                                       gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_get_ignore_mouse_events (self);
	if (old_value != value) {
		self->priv->_ignore_mouse_events = value;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_IGNORE_MOUSE_EVENTS_PROPERTY]);
	}
}

pdfpcRestServer*
pdfpc_presentation_controller_get_rest_server (pdfpcPresentationController* self)
{
	pdfpcRestServer* result;
	pdfpcRestServer* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_rest_server;
	result = _tmp0_;
	return result;
}

void
pdfpc_presentation_controller_set_rest_server (pdfpcPresentationController* self,
                                               pdfpcRestServer* value)
{
	pdfpcRestServer* old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_get_rest_server (self);
	if (old_value != value) {
		pdfpcRestServer* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_rest_server);
		self->priv->_rest_server = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_REST_SERVER_PROPERTY]);
	}
}

pdfpcMetadataPdf*
pdfpc_presentation_controller_get_metadata (pdfpcPresentationController* self)
{
	pdfpcMetadataPdf* result;
	pdfpcMetadataPdf* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_metadata;
	result = _tmp0_;
	return result;
}

static void
_pdfpc_presentation_controller_on_timer_change_pdfpc_timer_change (pdfpcTimer* _sender,
                                                                   gint time,
                                                                   pdfpcTimerState state,
                                                                   const gchar* label,
                                                                   gpointer self)
{
	pdfpc_presentation_controller_on_timer_change ((pdfpcPresentationController*) self, time, state, label);
}

void
pdfpc_presentation_controller_set_metadata (pdfpcPresentationController* self,
                                            pdfpcMetadataPdf* value)
{
	pdfpcMetadataPdf* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_metadata);
	self->priv->_metadata = _tmp0_;
	if (value != NULL) {
		pdfpcMetadataPdf* _tmp1_;
		pdfpcMetadataPdf* _tmp2_;
		pdfpcMetadataPdf* _tmp3_;
		pdfpcMetadataPdf* _tmp4_;
		pdfpcMetadataPdf* _tmp5_;
		pdfpcMetadataPdf* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		pdfpcMetadataPdf* _tmp9_;
		pdfpcMetadataPdf* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		pdfpcTimer* _tmp13_;
		pdfpcTimer* _tmp15_;
		pdfpcMetadataPdf* _tmp16_;
		pdfpcMetadataPdf* _tmp17_;
		pdfpcDrawingsDrawing* _tmp18_;
		pdfpcDrawingsDrawing* _tmp19_;
		pdfpcDrawingsDrawingTool* _tmp20_;
		pdfpcDrawingsDrawingTool* _tmp21_;
		pdfpcDrawingsDrawingTool* _tmp22_;
		_tmp1_ = pdfpc_presentation_controller_get_metadata (self);
		_tmp2_ = _tmp1_;
		_tmp2_->controller = self;
		_tmp3_ = pdfpc_presentation_controller_get_metadata (self);
		_tmp4_ = _tmp3_;
		_tmp5_ = pdfpc_presentation_controller_get_metadata (self);
		_tmp6_ = _tmp5_;
		_tmp7_ = pdfpc_metadata_pdf_get_start_time (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = pdfpc_presentation_controller_get_metadata (self);
		_tmp10_ = _tmp9_;
		_tmp11_ = pdfpc_metadata_pdf_get_end_time (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = pdfpc_timer_new ((gint) (60 * pdfpc_metadata_pdf_get_duration (_tmp4_)), _tmp8_, _tmp12_);
		_g_object_unref0 (self->timer);
		self->timer = _tmp13_;
		_g_free0 (_tmp12_);
		_g_free0 (_tmp8_);
		if (pdfpc_options_use_time_of_day) {
			pdfpcTimer* _tmp14_;
			_tmp14_ = self->timer;
			pdfpc_timer_set_mode (_tmp14_, PDFPC_TIMER_MODE_Clock);
		}
		_tmp15_ = self->timer;
		g_signal_connect_object (_tmp15_, "change", (GCallback) _pdfpc_presentation_controller_on_timer_change_pdfpc_timer_change, self, 0);
		pdfpc_presentation_controller_set_current_slide_number (self, 0);
		_tmp16_ = pdfpc_presentation_controller_get_metadata (self);
		_tmp17_ = _tmp16_;
		_tmp18_ = pdfpc_drawings_create (_tmp17_);
		_g_object_unref0 (self->pen_drawing);
		self->pen_drawing = _tmp18_;
		_tmp19_ = self->pen_drawing;
		_tmp20_ = pdfpc_drawings_drawing_get_pen (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = _pdfpc_drawings_drawing_tool_ref0 (_tmp21_);
		_pdfpc_drawings_drawing_tool_unref0 (self->current_pen_drawing_tool);
		self->current_pen_drawing_tool = _tmp22_;
		if (pdfpc_options_enable_rest) {
			pdfpcMetadataPdf* _tmp23_;
			pdfpcMetadataPdf* _tmp24_;
			pdfpcRestServer* _tmp25_;
			pdfpcRestServer* _tmp26_;
			pdfpcRestServer* _tmp27_;
			_tmp23_ = pdfpc_presentation_controller_get_metadata (self);
			_tmp24_ = _tmp23_;
			_tmp25_ = pdfpc_rest_server_new (_tmp24_, pdfpc_options_rest_port);
			_tmp26_ = _tmp25_;
			pdfpc_presentation_controller_set_rest_server (self, _tmp26_);
			_g_object_unref0 (_tmp26_);
			_tmp27_ = self->priv->_rest_server;
			pdfpc_rest_server_start (_tmp27_);
		}
	}
	g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_METADATA_PROPERTY]);
}

pdfpcWindowOverview*
pdfpc_presentation_controller_get_overview (pdfpcPresentationController* self)
{
	pdfpcWindowOverview* result;
	pdfpcWindowOverview* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_overview;
	result = _tmp0_;
	return result;
}

void
pdfpc_presentation_controller_set_overview (pdfpcPresentationController* self,
                                            pdfpcWindowOverview* value)
{
	pdfpcWindowOverview* old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_get_overview (self);
	if (old_value != value) {
		pdfpcWindowOverview* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_overview);
		self->priv->_overview = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_OVERVIEW_PROPERTY]);
	}
}

gboolean
pdfpc_presentation_controller_get_overview_shown (pdfpcPresentationController* self)
{
	gboolean result;
	pdfpcWindowPresenter* _tmp0_;
	pdfpcWindowPresenter* _tmp1_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = pdfpc_presentation_controller_get_presenter (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == NULL) {
		result = FALSE;
		return result;
	} else {
		pdfpcWindowPresenter* _tmp2_;
		pdfpcWindowPresenter* _tmp3_;
		_tmp2_ = pdfpc_presentation_controller_get_presenter (self);
		_tmp3_ = _tmp2_;
		result = pdfpc_window_presenter_is_overview_shown (_tmp3_);
		return result;
	}
}

pdfpcPresentationControllerPointerTool*
pdfpc_presentation_controller_get_current_pointer (pdfpcPresentationController* self)
{
	pdfpcPresentationControllerPointerTool* result;
	pdfpcPresentationControllerPointerTool* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_current_pointer;
	result = _tmp0_;
	return result;
}

static gpointer
_pdfpc_presentation_controller_pointer_tool_ref0 (gpointer self)
{
	return self ? pdfpc_presentation_controller_pointer_tool_ref (self) : NULL;
}

void
pdfpc_presentation_controller_set_current_pointer (pdfpcPresentationController* self,
                                                   pdfpcPresentationControllerPointerTool* value)
{
	pdfpcPresentationControllerPointerTool* old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_get_current_pointer (self);
	if (old_value != value) {
		pdfpcPresentationControllerPointerTool* _tmp0_;
		_tmp0_ = _pdfpc_presentation_controller_pointer_tool_ref0 (value);
		_pdfpc_presentation_controller_pointer_tool_unref0 (self->priv->_current_pointer);
		self->priv->_current_pointer = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_CURRENT_POINTER_PROPERTY]);
	}
}

static inline gpointer
pdfpc_presentation_controller_action_description_get_instance_private (pdfpcPresentationControllerActionDescription* self)
{
	return G_STRUCT_MEMBER_P (self, pdfpcPresentationControllerActionDescription_private_offset);
}

pdfpcPresentationControllerActionDescription*
pdfpc_presentation_controller_action_description_construct (GType object_type,
                                                            const gchar* name,
                                                            const gchar* description,
                                                            const gchar* arg_name)
{
	pdfpcPresentationControllerActionDescription * self = NULL;
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (description != NULL, NULL);
	self = (pdfpcPresentationControllerActionDescription*) g_object_new (object_type, NULL);
	pdfpc_presentation_controller_action_description_set_name (self, name);
	pdfpc_presentation_controller_action_description_set_description (self, description);
	pdfpc_presentation_controller_action_description_set_arg_name (self, arg_name);
	return self;
}

pdfpcPresentationControllerActionDescription*
pdfpc_presentation_controller_action_description_new (const gchar* name,
                                                      const gchar* description,
                                                      const gchar* arg_name)
{
	return pdfpc_presentation_controller_action_description_construct (PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_DESCRIPTION, name, description, arg_name);
}

const gchar*
pdfpc_presentation_controller_action_description_get_name (pdfpcPresentationControllerActionDescription* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}

void
pdfpc_presentation_controller_action_description_set_name (pdfpcPresentationControllerActionDescription* self,
                                                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_action_description_get_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_name);
		self->priv->_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_action_description_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_NAME_PROPERTY]);
	}
}

const gchar*
pdfpc_presentation_controller_action_description_get_description (pdfpcPresentationControllerActionDescription* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_description;
	result = _tmp0_;
	return result;
}

void
pdfpc_presentation_controller_action_description_set_description (pdfpcPresentationControllerActionDescription* self,
                                                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_action_description_get_description (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_description);
		self->priv->_description = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_action_description_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_DESCRIPTION_PROPERTY]);
	}
}

const gchar*
pdfpc_presentation_controller_action_description_get_arg_name (pdfpcPresentationControllerActionDescription* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_arg_name;
	result = _tmp0_;
	return result;
}

void
pdfpc_presentation_controller_action_description_set_arg_name (pdfpcPresentationControllerActionDescription* self,
                                                               const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_action_description_get_arg_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_arg_name);
		self->priv->_arg_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_action_description_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_ARG_NAME_PROPERTY]);
	}
}

GeeArrayList*
pdfpc_presentation_controller_action_description_get_bindings (pdfpcPresentationControllerActionDescription* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_bindings;
	result = _tmp0_;
	return result;
}

void
pdfpc_presentation_controller_action_description_set_bindings (pdfpcPresentationControllerActionDescription* self,
                                                               GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_action_description_get_bindings (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_bindings);
		self->priv->_bindings = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_action_description_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_BINDINGS_PROPERTY]);
	}
}

static void
pdfpc_presentation_controller_action_description_class_init (pdfpcPresentationControllerActionDescriptionClass * klass,
                                                             gpointer klass_data)
{
	pdfpc_presentation_controller_action_description_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &pdfpcPresentationControllerActionDescription_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_pdfpc_presentation_controller_action_description_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_pdfpc_presentation_controller_action_description_set_property;
	G_OBJECT_CLASS (klass)->finalize = pdfpc_presentation_controller_action_description_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_NAME_PROPERTY, pdfpc_presentation_controller_action_description_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_DESCRIPTION_PROPERTY, pdfpc_presentation_controller_action_description_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_DESCRIPTION_PROPERTY] = g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_ARG_NAME_PROPERTY, pdfpc_presentation_controller_action_description_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_ARG_NAME_PROPERTY] = g_param_spec_string ("arg-name", "arg-name", "arg-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_BINDINGS_PROPERTY, pdfpc_presentation_controller_action_description_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_BINDINGS_PROPERTY] = g_param_spec_object ("bindings", "bindings", "bindings", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
pdfpc_presentation_controller_action_description_instance_init (pdfpcPresentationControllerActionDescription * self,
                                                                gpointer klass)
{
	self->priv = pdfpc_presentation_controller_action_description_get_instance_private (self);
}

static void
pdfpc_presentation_controller_action_description_finalize (GObject * obj)
{
	pdfpcPresentationControllerActionDescription * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_DESCRIPTION, pdfpcPresentationControllerActionDescription);
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_description);
	_g_free0 (self->priv->_arg_name);
	_g_object_unref0 (self->priv->_bindings);
	G_OBJECT_CLASS (pdfpc_presentation_controller_action_description_parent_class)->finalize (obj);
}

static GType
pdfpc_presentation_controller_action_description_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (pdfpcPresentationControllerActionDescriptionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pdfpc_presentation_controller_action_description_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (pdfpcPresentationControllerActionDescription), 0, (GInstanceInitFunc) pdfpc_presentation_controller_action_description_instance_init, NULL };
	GType pdfpc_presentation_controller_action_description_type_id;
	pdfpc_presentation_controller_action_description_type_id = g_type_register_static (G_TYPE_OBJECT, "pdfpcPresentationControllerActionDescription", &g_define_type_info, 0);
	pdfpcPresentationControllerActionDescription_private_offset = g_type_add_instance_private (pdfpc_presentation_controller_action_description_type_id, sizeof (pdfpcPresentationControllerActionDescriptionPrivate));
	return pdfpc_presentation_controller_action_description_type_id;
}

GType
pdfpc_presentation_controller_action_description_get_type (void)
{
	static volatile gsize pdfpc_presentation_controller_action_description_type_id__once = 0;
	if (g_once_init_enter (&pdfpc_presentation_controller_action_description_type_id__once)) {
		GType pdfpc_presentation_controller_action_description_type_id;
		pdfpc_presentation_controller_action_description_type_id = pdfpc_presentation_controller_action_description_get_type_once ();
		g_once_init_leave (&pdfpc_presentation_controller_action_description_type_id__once, pdfpc_presentation_controller_action_description_type_id);
	}
	return pdfpc_presentation_controller_action_description_type_id__once;
}

static void
_vala_pdfpc_presentation_controller_action_description_get_property (GObject * object,
                                                                     guint property_id,
                                                                     GValue * value,
                                                                     GParamSpec * pspec)
{
	pdfpcPresentationControllerActionDescription * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_DESCRIPTION, pdfpcPresentationControllerActionDescription);
	switch (property_id) {
		case PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_NAME_PROPERTY:
		g_value_set_string (value, pdfpc_presentation_controller_action_description_get_name (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_DESCRIPTION_PROPERTY:
		g_value_set_string (value, pdfpc_presentation_controller_action_description_get_description (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_ARG_NAME_PROPERTY:
		g_value_set_string (value, pdfpc_presentation_controller_action_description_get_arg_name (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_BINDINGS_PROPERTY:
		g_value_set_object (value, pdfpc_presentation_controller_action_description_get_bindings (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_pdfpc_presentation_controller_action_description_set_property (GObject * object,
                                                                     guint property_id,
                                                                     const GValue * value,
                                                                     GParamSpec * pspec)
{
	pdfpcPresentationControllerActionDescription * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_DESCRIPTION, pdfpcPresentationControllerActionDescription);
	switch (property_id) {
		case PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_NAME_PROPERTY:
		pdfpc_presentation_controller_action_description_set_name (self, g_value_get_string (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_DESCRIPTION_PROPERTY:
		pdfpc_presentation_controller_action_description_set_description (self, g_value_get_string (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_ARG_NAME_PROPERTY:
		pdfpc_presentation_controller_action_description_set_arg_name (self, g_value_get_string (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_ACTION_DESCRIPTION_BINDINGS_PROPERTY:
		pdfpc_presentation_controller_action_description_set_bindings (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
pdfpc_presentation_controller_action_and_parameter_get_instance_private (pdfpcPresentationControllerActionAndParameter* self)
{
	return G_STRUCT_MEMBER_P (self, pdfpcPresentationControllerActionAndParameter_private_offset);
}

pdfpcPresentationControllerActionAndParameter*
pdfpc_presentation_controller_action_and_parameter_construct (GType object_type,
                                                              GAction* action,
                                                              GVariant* parameter,
                                                              const gchar* name)
{
	pdfpcPresentationControllerActionAndParameter * self = NULL;
	g_return_val_if_fail (action != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	self = (pdfpcPresentationControllerActionAndParameter*) g_object_new (object_type, NULL);
	pdfpc_presentation_controller_action_and_parameter_set_action (self, action);
	pdfpc_presentation_controller_action_and_parameter_set_parameter (self, parameter);
	pdfpc_presentation_controller_action_and_parameter_set_name (self, name);
	return self;
}

pdfpcPresentationControllerActionAndParameter*
pdfpc_presentation_controller_action_and_parameter_new (GAction* action,
                                                        GVariant* parameter,
                                                        const gchar* name)
{
	return pdfpc_presentation_controller_action_and_parameter_construct (PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_AND_PARAMETER, action, parameter, name);
}

GAction*
pdfpc_presentation_controller_action_and_parameter_get_action (pdfpcPresentationControllerActionAndParameter* self)
{
	GAction* result;
	GAction* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_action;
	result = _tmp0_;
	return result;
}

void
pdfpc_presentation_controller_action_and_parameter_set_action (pdfpcPresentationControllerActionAndParameter* self,
                                                               GAction* value)
{
	GAction* old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_action_and_parameter_get_action (self);
	if (old_value != value) {
		GAction* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_action);
		self->priv->_action = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_action_and_parameter_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_ACTION_PROPERTY]);
	}
}

GVariant*
pdfpc_presentation_controller_action_and_parameter_get_parameter (pdfpcPresentationControllerActionAndParameter* self)
{
	GVariant* result;
	GVariant* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_parameter;
	result = _tmp0_;
	return result;
}

void
pdfpc_presentation_controller_action_and_parameter_set_parameter (pdfpcPresentationControllerActionAndParameter* self,
                                                                  GVariant* value)
{
	GVariant* old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_action_and_parameter_get_parameter (self);
	if (old_value != value) {
		GVariant* _tmp0_;
		_tmp0_ = _g_variant_ref0 (value);
		_g_variant_unref0 (self->priv->_parameter);
		self->priv->_parameter = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_action_and_parameter_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_PARAMETER_PROPERTY]);
	}
}

const gchar*
pdfpc_presentation_controller_action_and_parameter_get_name (pdfpcPresentationControllerActionAndParameter* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}

void
pdfpc_presentation_controller_action_and_parameter_set_name (pdfpcPresentationControllerActionAndParameter* self,
                                                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = pdfpc_presentation_controller_action_and_parameter_get_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_name);
		self->priv->_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, pdfpc_presentation_controller_action_and_parameter_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_NAME_PROPERTY]);
	}
}

static void
pdfpc_presentation_controller_action_and_parameter_class_init (pdfpcPresentationControllerActionAndParameterClass * klass,
                                                               gpointer klass_data)
{
	pdfpc_presentation_controller_action_and_parameter_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &pdfpcPresentationControllerActionAndParameter_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_pdfpc_presentation_controller_action_and_parameter_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_pdfpc_presentation_controller_action_and_parameter_set_property;
	G_OBJECT_CLASS (klass)->finalize = pdfpc_presentation_controller_action_and_parameter_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_ACTION_PROPERTY, pdfpc_presentation_controller_action_and_parameter_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_ACTION_PROPERTY] = g_param_spec_object ("action", "action", "action", g_action_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_PARAMETER_PROPERTY, pdfpc_presentation_controller_action_and_parameter_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_PARAMETER_PROPERTY] = g_param_spec_variant ("parameter", "parameter", "parameter", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_NAME_PROPERTY, pdfpc_presentation_controller_action_and_parameter_properties[PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
pdfpc_presentation_controller_action_and_parameter_instance_init (pdfpcPresentationControllerActionAndParameter * self,
                                                                  gpointer klass)
{
	self->priv = pdfpc_presentation_controller_action_and_parameter_get_instance_private (self);
}

static void
pdfpc_presentation_controller_action_and_parameter_finalize (GObject * obj)
{
	pdfpcPresentationControllerActionAndParameter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_AND_PARAMETER, pdfpcPresentationControllerActionAndParameter);
	_g_object_unref0 (self->priv->_action);
	_g_variant_unref0 (self->priv->_parameter);
	_g_free0 (self->priv->_name);
	G_OBJECT_CLASS (pdfpc_presentation_controller_action_and_parameter_parent_class)->finalize (obj);
}

static GType
pdfpc_presentation_controller_action_and_parameter_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (pdfpcPresentationControllerActionAndParameterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pdfpc_presentation_controller_action_and_parameter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (pdfpcPresentationControllerActionAndParameter), 0, (GInstanceInitFunc) pdfpc_presentation_controller_action_and_parameter_instance_init, NULL };
	GType pdfpc_presentation_controller_action_and_parameter_type_id;
	pdfpc_presentation_controller_action_and_parameter_type_id = g_type_register_static (G_TYPE_OBJECT, "pdfpcPresentationControllerActionAndParameter", &g_define_type_info, 0);
	pdfpcPresentationControllerActionAndParameter_private_offset = g_type_add_instance_private (pdfpc_presentation_controller_action_and_parameter_type_id, sizeof (pdfpcPresentationControllerActionAndParameterPrivate));
	return pdfpc_presentation_controller_action_and_parameter_type_id;
}

GType
pdfpc_presentation_controller_action_and_parameter_get_type (void)
{
	static volatile gsize pdfpc_presentation_controller_action_and_parameter_type_id__once = 0;
	if (g_once_init_enter (&pdfpc_presentation_controller_action_and_parameter_type_id__once)) {
		GType pdfpc_presentation_controller_action_and_parameter_type_id;
		pdfpc_presentation_controller_action_and_parameter_type_id = pdfpc_presentation_controller_action_and_parameter_get_type_once ();
		g_once_init_leave (&pdfpc_presentation_controller_action_and_parameter_type_id__once, pdfpc_presentation_controller_action_and_parameter_type_id);
	}
	return pdfpc_presentation_controller_action_and_parameter_type_id__once;
}

static void
_vala_pdfpc_presentation_controller_action_and_parameter_get_property (GObject * object,
                                                                       guint property_id,
                                                                       GValue * value,
                                                                       GParamSpec * pspec)
{
	pdfpcPresentationControllerActionAndParameter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_AND_PARAMETER, pdfpcPresentationControllerActionAndParameter);
	switch (property_id) {
		case PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_ACTION_PROPERTY:
		g_value_set_object (value, pdfpc_presentation_controller_action_and_parameter_get_action (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_PARAMETER_PROPERTY:
		g_value_set_variant (value, pdfpc_presentation_controller_action_and_parameter_get_parameter (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_NAME_PROPERTY:
		g_value_set_string (value, pdfpc_presentation_controller_action_and_parameter_get_name (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_pdfpc_presentation_controller_action_and_parameter_set_property (GObject * object,
                                                                       guint property_id,
                                                                       const GValue * value,
                                                                       GParamSpec * pspec)
{
	pdfpcPresentationControllerActionAndParameter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_AND_PARAMETER, pdfpcPresentationControllerActionAndParameter);
	switch (property_id) {
		case PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_ACTION_PROPERTY:
		pdfpc_presentation_controller_action_and_parameter_set_action (self, g_value_get_object (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_PARAMETER_PROPERTY:
		pdfpc_presentation_controller_action_and_parameter_set_parameter (self, g_value_get_variant (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_ACTION_AND_PARAMETER_NAME_PROPERTY:
		pdfpc_presentation_controller_action_and_parameter_set_name (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
pdfpc_presentation_controller_pointer_tool_get_instance_private (pdfpcPresentationControllerPointerTool* self)
{
	return G_STRUCT_MEMBER_P (self, pdfpcPresentationControllerPointerTool_private_offset);
}

pdfpcPresentationControllerPointerTool*
pdfpc_presentation_controller_pointer_tool_construct (GType object_type,
                                                      gboolean is_spotlight)
{
	pdfpcPresentationControllerPointerTool* self = NULL;
	self = (pdfpcPresentationControllerPointerTool*) g_type_create_instance (object_type);
	self->red = 0.0;
	self->green = 0.0;
	self->blue = 0.0;
	self->alpha = 0.5;
	self->size = 1.0;
	pdfpc_presentation_controller_pointer_tool_set_is_spotlight (self, is_spotlight);
	return self;
}

pdfpcPresentationControllerPointerTool*
pdfpc_presentation_controller_pointer_tool_new (gboolean is_spotlight)
{
	return pdfpc_presentation_controller_pointer_tool_construct (PDFPC_PRESENTATION_CONTROLLER_TYPE_POINTER_TOOL, is_spotlight);
}

void
pdfpc_presentation_controller_pointer_tool_get_rgba (pdfpcPresentationControllerPointerTool* self,
                                                     GdkRGBA* result)
{
	GdkRGBA color = {0};
	g_return_if_fail (self != NULL);
	memset (&color, 0, sizeof (GdkRGBA));
	color.red = self->red;
	color.green = self->green;
	color.blue = self->blue;
	color.alpha = self->alpha;
	*result = color;
	return;
}

void
pdfpc_presentation_controller_pointer_tool_set_rgba (pdfpcPresentationControllerPointerTool* self,
                                                     GdkRGBA* color)
{
	GdkRGBA _tmp0_;
	GdkRGBA _tmp1_;
	GdkRGBA _tmp2_;
	GdkRGBA _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (color != NULL);
	_tmp0_ = *color;
	self->red = _tmp0_.red;
	_tmp1_ = *color;
	self->green = _tmp1_.green;
	_tmp2_ = *color;
	self->blue = _tmp2_.blue;
	_tmp3_ = *color;
	self->alpha = _tmp3_.alpha;
}

gboolean
pdfpc_presentation_controller_pointer_tool_get_is_spotlight (pdfpcPresentationControllerPointerTool* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_spotlight;
	return result;
}

void
pdfpc_presentation_controller_pointer_tool_set_is_spotlight (pdfpcPresentationControllerPointerTool* self,
                                                             gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_is_spotlight = value;
}

static void
pdfpc_presentation_controller_value_pointer_tool_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
pdfpc_presentation_controller_value_pointer_tool_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		pdfpc_presentation_controller_pointer_tool_unref (value->data[0].v_pointer);
	}
}

static void
pdfpc_presentation_controller_value_pointer_tool_copy_value (const GValue* src_value,
                                                             GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = pdfpc_presentation_controller_pointer_tool_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
pdfpc_presentation_controller_value_pointer_tool_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
pdfpc_presentation_controller_value_pointer_tool_collect_value (GValue* value,
                                                                guint n_collect_values,
                                                                GTypeCValue* collect_values,
                                                                guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		pdfpcPresentationControllerPointerTool * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = pdfpc_presentation_controller_pointer_tool_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
pdfpc_presentation_controller_value_pointer_tool_lcopy_value (const GValue* value,
                                                              guint n_collect_values,
                                                              GTypeCValue* collect_values,
                                                              guint collect_flags)
{
	pdfpcPresentationControllerPointerTool ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = pdfpc_presentation_controller_pointer_tool_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
pdfpc_presentation_controller_param_spec_pointer_tool (const gchar* name,
                                                       const gchar* nick,
                                                       const gchar* blurb,
                                                       GType object_type,
                                                       GParamFlags flags)
{
	pdfpcPresentationControllerParamSpecPointerTool* spec;
	g_return_val_if_fail (g_type_is_a (object_type, PDFPC_PRESENTATION_CONTROLLER_TYPE_POINTER_TOOL), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

gpointer
pdfpc_presentation_controller_value_get_pointer_tool (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PDFPC_PRESENTATION_CONTROLLER_TYPE_POINTER_TOOL), NULL);
	return value->data[0].v_pointer;
}

void
pdfpc_presentation_controller_value_set_pointer_tool (GValue* value,
                                                      gpointer v_object)
{
	pdfpcPresentationControllerPointerTool * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PDFPC_PRESENTATION_CONTROLLER_TYPE_POINTER_TOOL));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PDFPC_PRESENTATION_CONTROLLER_TYPE_POINTER_TOOL));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		pdfpc_presentation_controller_pointer_tool_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		pdfpc_presentation_controller_pointer_tool_unref (old);
	}
}

void
pdfpc_presentation_controller_value_take_pointer_tool (GValue* value,
                                                       gpointer v_object)
{
	pdfpcPresentationControllerPointerTool * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PDFPC_PRESENTATION_CONTROLLER_TYPE_POINTER_TOOL));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PDFPC_PRESENTATION_CONTROLLER_TYPE_POINTER_TOOL));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		pdfpc_presentation_controller_pointer_tool_unref (old);
	}
}

static void
pdfpc_presentation_controller_pointer_tool_class_init (pdfpcPresentationControllerPointerToolClass * klass,
                                                       gpointer klass_data)
{
	pdfpc_presentation_controller_pointer_tool_parent_class = g_type_class_peek_parent (klass);
	((pdfpcPresentationControllerPointerToolClass *) klass)->finalize = pdfpc_presentation_controller_pointer_tool_finalize;
	g_type_class_adjust_private_offset (klass, &pdfpcPresentationControllerPointerTool_private_offset);
}

static void
pdfpc_presentation_controller_pointer_tool_instance_init (pdfpcPresentationControllerPointerTool * self,
                                                          gpointer klass)
{
	self->priv = pdfpc_presentation_controller_pointer_tool_get_instance_private (self);
	self->ref_count = 1;
}

static void
pdfpc_presentation_controller_pointer_tool_finalize (pdfpcPresentationControllerPointerTool * obj)
{
	pdfpcPresentationControllerPointerTool * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PDFPC_PRESENTATION_CONTROLLER_TYPE_POINTER_TOOL, pdfpcPresentationControllerPointerTool);
	g_signal_handlers_destroy (self);
}

/**
         * Generic pointer tool
         */
static GType
pdfpc_presentation_controller_pointer_tool_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { pdfpc_presentation_controller_value_pointer_tool_init, pdfpc_presentation_controller_value_pointer_tool_free_value, pdfpc_presentation_controller_value_pointer_tool_copy_value, pdfpc_presentation_controller_value_pointer_tool_peek_pointer, "p", pdfpc_presentation_controller_value_pointer_tool_collect_value, "p", pdfpc_presentation_controller_value_pointer_tool_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (pdfpcPresentationControllerPointerToolClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pdfpc_presentation_controller_pointer_tool_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (pdfpcPresentationControllerPointerTool), 0, (GInstanceInitFunc) pdfpc_presentation_controller_pointer_tool_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType pdfpc_presentation_controller_pointer_tool_type_id;
	pdfpc_presentation_controller_pointer_tool_type_id = g_type_register_fundamental (g_type_fundamental_next (), "pdfpcPresentationControllerPointerTool", &g_define_type_info, &g_define_type_fundamental_info, 0);
	pdfpcPresentationControllerPointerTool_private_offset = g_type_add_instance_private (pdfpc_presentation_controller_pointer_tool_type_id, sizeof (pdfpcPresentationControllerPointerToolPrivate));
	return pdfpc_presentation_controller_pointer_tool_type_id;
}

GType
pdfpc_presentation_controller_pointer_tool_get_type (void)
{
	static volatile gsize pdfpc_presentation_controller_pointer_tool_type_id__once = 0;
	if (g_once_init_enter (&pdfpc_presentation_controller_pointer_tool_type_id__once)) {
		GType pdfpc_presentation_controller_pointer_tool_type_id;
		pdfpc_presentation_controller_pointer_tool_type_id = pdfpc_presentation_controller_pointer_tool_get_type_once ();
		g_once_init_leave (&pdfpc_presentation_controller_pointer_tool_type_id__once, pdfpc_presentation_controller_pointer_tool_type_id);
	}
	return pdfpc_presentation_controller_pointer_tool_type_id__once;
}

gpointer
pdfpc_presentation_controller_pointer_tool_ref (gpointer instance)
{
	pdfpcPresentationControllerPointerTool * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

void
pdfpc_presentation_controller_pointer_tool_unref (gpointer instance)
{
	pdfpcPresentationControllerPointerTool * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		PDFPC_PRESENTATION_CONTROLLER_POINTER_TOOL_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

pdfpcPresentationControllerScaledRectangle*
pdfpc_presentation_controller_scaled_rectangle_dup (const pdfpcPresentationControllerScaledRectangle* self)
{
	pdfpcPresentationControllerScaledRectangle* dup;
	dup = g_new0 (pdfpcPresentationControllerScaledRectangle, 1);
	memcpy (dup, self, sizeof (pdfpcPresentationControllerScaledRectangle));
	return dup;
}

void
pdfpc_presentation_controller_scaled_rectangle_free (pdfpcPresentationControllerScaledRectangle* self)
{
	g_free (self);
}

static GType
pdfpc_presentation_controller_scaled_rectangle_get_type_once (void)
{
	GType pdfpc_presentation_controller_scaled_rectangle_type_id;
	pdfpc_presentation_controller_scaled_rectangle_type_id = g_boxed_type_register_static ("pdfpcPresentationControllerScaledRectangle", (GBoxedCopyFunc) pdfpc_presentation_controller_scaled_rectangle_dup, (GBoxedFreeFunc) pdfpc_presentation_controller_scaled_rectangle_free);
	return pdfpc_presentation_controller_scaled_rectangle_type_id;
}

GType
pdfpc_presentation_controller_scaled_rectangle_get_type (void)
{
	static volatile gsize pdfpc_presentation_controller_scaled_rectangle_type_id__once = 0;
	if (g_once_init_enter (&pdfpc_presentation_controller_scaled_rectangle_type_id__once)) {
		GType pdfpc_presentation_controller_scaled_rectangle_type_id;
		pdfpc_presentation_controller_scaled_rectangle_type_id = pdfpc_presentation_controller_scaled_rectangle_get_type_once ();
		g_once_init_leave (&pdfpc_presentation_controller_scaled_rectangle_type_id__once, pdfpc_presentation_controller_scaled_rectangle_type_id);
	}
	return pdfpc_presentation_controller_scaled_rectangle_type_id__once;
}

static void
pdfpc_presentation_controller_class_init (pdfpcPresentationControllerClass * klass,
                                          gpointer klass_data)
{
	pdfpc_presentation_controller_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &pdfpcPresentationController_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_pdfpc_presentation_controller_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_pdfpc_presentation_controller_set_property;
	G_OBJECT_CLASS (klass)->finalize = pdfpc_presentation_controller_finalize;
	/**
	         * The currently displayed slide
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_CURRENT_SLIDE_NUMBER_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_CURRENT_SLIDE_NUMBER_PROPERTY] = g_param_spec_int ("current-slide-number", "current-slide-number", "current-slide-number", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_PROPERTY] = g_param_spec_enum ("progress-status", "progress-status", "progress-status", PDFPC_PRESENTATION_CONTROLLER_TYPE_PROGRESS_STATUS, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	         * The current slide in "user indices"
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_CURRENT_USER_SLIDE_NUMBER_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_CURRENT_USER_SLIDE_NUMBER_PROPERTY] = g_param_spec_int ("current-user-slide-number", "current-user-slide-number", "current-user-slide-number", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	         * Stores if the view is faded to black
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_FADED_TO_BLACK_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_FADED_TO_BLACK_PROPERTY] = g_param_spec_boolean ("faded-to-black", "faded-to-black", "faded-to-black", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	         * Stores if the view is hidden
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_HIDDEN_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_HIDDEN_PROPERTY] = g_param_spec_boolean ("hidden", "hidden", "hidden", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	         * Stores if the view is frozen
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_FROZEN_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_FROZEN_PROPERTY] = g_param_spec_boolean ("frozen", "frozen", "frozen", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	         * Zoomed-in mode enabled?
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_IN_ZOOM_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_IN_ZOOM_PROPERTY] = g_param_spec_boolean ("in-zoom", "in-zoom", "in-zoom", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	         * Customization mode enabled?
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_IN_CUSTOMIZATION_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_IN_CUSTOMIZATION_PROPERTY] = g_param_spec_boolean ("in-customization", "in-customization", "in-customization", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	         * The number of slides in the presentation
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_N_SLIDES_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_N_SLIDES_PROPERTY] = g_param_spec_uint ("n-slides", "n-slides", "n-slides", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	         * The number of user slides
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_USER_N_SLIDES_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_USER_N_SLIDES_PROPERTY] = g_param_spec_int ("user-n-slides", "user-n-slides", "user-n-slides", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	         * Presenter window showing the current and the next slide as well as
	         * different other meta information useful for the person giving the
	         * presentation.
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_PRESENTER_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_PRESENTER_PROPERTY] = g_param_spec_object ("presenter", "presenter", "presenter", PDFPC_WINDOW_TYPE_PRESENTER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	         * Window which shows the current slide in fullscreen
	         *
	         * This window is supposed to be shown on the beamer
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_PRESENTATION_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_PRESENTATION_PROPERTY] = g_param_spec_object ("presentation", "presentation", "presentation", PDFPC_WINDOW_TYPE_PRESENTATION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	         * Ignore input events. Useful e.g. for editing notes.
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_IGNORE_KEYBOARD_EVENTS_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_IGNORE_KEYBOARD_EVENTS_PROPERTY] = g_param_spec_boolean ("ignore-keyboard-events", "ignore-keyboard-events", "ignore-keyboard-events", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_IGNORE_MOUSE_EVENTS_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_IGNORE_MOUSE_EVENTS_PROPERTY] = g_param_spec_boolean ("ignore-mouse-events", "ignore-mouse-events", "ignore-mouse-events", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	         * The REST server object
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_REST_SERVER_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_REST_SERVER_PROPERTY] = g_param_spec_object ("rest-server", "rest-server", "rest-server", PDFPC_TYPE_REST_SERVER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_METADATA_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_METADATA_PROPERTY] = g_param_spec_object ("metadata", "metadata", "metadata", PDFPC_METADATA_TYPE_PDF, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	         * The presenters overview. We need to communicate with it for toggling
	         * skips
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_OVERVIEW_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_OVERVIEW_PROPERTY] = g_param_spec_object ("overview", "overview", "overview", PDFPC_WINDOW_TYPE_OVERVIEW, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_OVERVIEW_SHOWN_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_OVERVIEW_SHOWN_PROPERTY] = g_param_spec_boolean ("overview-shown", "overview-shown", "overview-shown", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_CURRENT_POINTER_PROPERTY, pdfpc_presentation_controller_properties[PDFPC_PRESENTATION_CONTROLLER_CURRENT_POINTER_PROPERTY] = pdfpc_presentation_controller_param_spec_pointer_tool ("current-pointer", "current-pointer", "current-pointer", PDFPC_PRESENTATION_CONTROLLER_TYPE_POINTER_TOOL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	         * Signal: Fired on document reload
	         */
	pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_RELOAD_REQUEST_SIGNAL] = g_signal_new ("reload-request", PDFPC_TYPE_PRESENTATION_CONTROLLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	/**
	         * Signal: Update the display
	         */
	pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_UPDATE_REQUEST_SIGNAL] = g_signal_new ("update-request", PDFPC_TYPE_PRESENTATION_CONTROLLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	/**
	         * Signal: Start editing notes
	         */
	pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_EDIT_NOTE_REQUEST_SIGNAL] = g_signal_new ("edit-note-request", PDFPC_TYPE_PRESENTATION_CONTROLLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	/**
	         * Signal: Ask for the page to jump to
	         */
	pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_ASK_GOTO_PAGE_REQUEST_SIGNAL] = g_signal_new ("ask-goto-page-request", PDFPC_TYPE_PRESENTATION_CONTROLLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	/**
	         * Signal: Show an overview of all slides
	         */
	pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_SHOW_OVERVIEW_REQUEST_SIGNAL] = g_signal_new ("show-overview-request", PDFPC_TYPE_PRESENTATION_CONTROLLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	/**
	         * Signal: Hide the overview
	         */
	pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_HIDE_OVERVIEW_REQUEST_SIGNAL] = g_signal_new ("hide-overview-request", PDFPC_TYPE_PRESENTATION_CONTROLLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	/**
	         * Signal: Increase font sizes
	         */
	pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_INCREASE_FONT_SIZE_REQUEST_SIGNAL] = g_signal_new ("increase-font-size-request", PDFPC_TYPE_PRESENTATION_CONTROLLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	/**
	         * Signal: Decrease font sizes
	         */
	pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_DECREASE_FONT_SIZE_REQUEST_SIGNAL] = g_signal_new ("decrease-font-size-request", PDFPC_TYPE_PRESENTATION_CONTROLLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	/**
	         * Signal: Zoom in/out
	         */
	pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_ZOOM_REQUEST_SIGNAL] = g_signal_new ("zoom-request", PDFPC_TYPE_PRESENTATION_CONTROLLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
	/**
	         * Signal: Fired when the timer label changes
	         */
	pdfpc_presentation_controller_signals[PDFPC_PRESENTATION_CONTROLLER_TIMER_CHANGE_SIGNAL] = g_signal_new ("timer-change", PDFPC_TYPE_PRESENTATION_CONTROLLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
}

static void
pdfpc_presentation_controller_instance_init (pdfpcPresentationController * self,
                                             gpointer klass)
{
	GSimpleActionGroup* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeHashMap* _tmp2_;
	GeeHashMap* _tmp3_;
	self->priv = pdfpc_presentation_controller_get_instance_private (self);
	self->priv->_faded_to_black = FALSE;
	self->priv->_hidden = FALSE;
	self->priv->_frozen = FALSE;
	self->priv->_in_zoom = FALSE;
	self->priv->_in_customization = FALSE;
	self->zoom_stack_drawing = FALSE;
	self->priv->_presenter = NULL;
	self->priv->_presentation = NULL;
	self->priv->_ignore_keyboard_events = FALSE;
	self->priv->_ignore_mouse_events = FALSE;
	_tmp0_ = g_simple_action_group_new ();
	self->action_group = _tmp0_;
	_tmp1_ = gee_array_list_new (PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_DESCRIPTION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	self->action_descriptions = _tmp1_;
	_tmp2_ = gee_hash_map_new (PDFPC_TYPE_KEY_DEF, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_AND_PARAMETER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->keyBindings = _tmp2_;
	_tmp3_ = gee_hash_map_new (PDFPC_TYPE_KEY_DEF, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, PDFPC_PRESENTATION_CONTROLLER_TYPE_ACTION_AND_PARAMETER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->mouseBindings = _tmp3_;
	self->screensaver = NULL;
	self->screensaver_cookie = (guint32) 0;
	self->priv->annotation_mode = PDFPC_PRESENTATION_CONTROLLER_ANNOTATION_MODE_NORMAL;
	self->current_pen_drawing_tool = NULL;
	self->priv->pen_drawing_present = FALSE;
	self->priv->pen_step = (guint) 2;
	self->pen_is_pressed = FALSE;
	self->pointer_step = (guint) 5;
	self->pointer_hidden = TRUE;
	self->pointer_timeout_id = (guint) 0;
	self->autoadvance_timeout_id = (guint) 0;
	self->drag_x = (gdouble) -1;
	self->drag_y = (gdouble) -1;
}

static void
pdfpc_presentation_controller_finalize (GObject * obj)
{
	pdfpcPresentationController * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PDFPC_TYPE_PRESENTATION_CONTROLLER, pdfpcPresentationController);
	_g_object_unref0 (self->priv->_presenter);
	_g_object_unref0 (self->priv->_presentation);
	_g_object_unref0 (self->controllables);
	_g_object_unref0 (self->priv->_rest_server);
	_g_object_unref0 (self->priv->_metadata);
	_g_object_unref0 (self->priv->_overview);
	_g_object_unref0 (self->priv->history_bck);
	_g_object_unref0 (self->priv->history_fwd);
	_g_object_unref0 (self->timer);
	_g_object_unref0 (self->action_group);
	_g_object_unref0 (self->action_descriptions);
	_g_object_unref0 (self->keyBindings);
	_g_object_unref0 (self->mouseBindings);
	_g_object_unref0 (self->screensaver);
	_pdfpc_presentation_controller_pointer_tool_unref0 (self->pointer);
	_pdfpc_presentation_controller_pointer_tool_unref0 (self->spotlight);
	_pdfpc_presentation_controller_pointer_tool_unref0 (self->priv->_current_pointer);
	_g_object_unref0 (self->pen_drawing);
	_pdfpc_drawings_drawing_tool_unref0 (self->current_pen_drawing_tool);
	G_OBJECT_CLASS (pdfpc_presentation_controller_parent_class)->finalize (obj);
}

/**
     * Controller handling all the triggered events/signals
     */
static GType
pdfpc_presentation_controller_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (pdfpcPresentationControllerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pdfpc_presentation_controller_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (pdfpcPresentationController), 0, (GInstanceInitFunc) pdfpc_presentation_controller_instance_init, NULL };
	GType pdfpc_presentation_controller_type_id;
	pdfpc_presentation_controller_type_id = g_type_register_static (G_TYPE_OBJECT, "pdfpcPresentationController", &g_define_type_info, 0);
	pdfpcPresentationController_private_offset = g_type_add_instance_private (pdfpc_presentation_controller_type_id, sizeof (pdfpcPresentationControllerPrivate));
	return pdfpc_presentation_controller_type_id;
}

GType
pdfpc_presentation_controller_get_type (void)
{
	static volatile gsize pdfpc_presentation_controller_type_id__once = 0;
	if (g_once_init_enter (&pdfpc_presentation_controller_type_id__once)) {
		GType pdfpc_presentation_controller_type_id;
		pdfpc_presentation_controller_type_id = pdfpc_presentation_controller_get_type_once ();
		g_once_init_leave (&pdfpc_presentation_controller_type_id__once, pdfpc_presentation_controller_type_id);
	}
	return pdfpc_presentation_controller_type_id__once;
}

static void
_vala_pdfpc_presentation_controller_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	pdfpcPresentationController * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PDFPC_TYPE_PRESENTATION_CONTROLLER, pdfpcPresentationController);
	switch (property_id) {
		case PDFPC_PRESENTATION_CONTROLLER_CURRENT_SLIDE_NUMBER_PROPERTY:
		g_value_set_int (value, pdfpc_presentation_controller_get_current_slide_number (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_PROPERTY:
		g_value_set_enum (value, pdfpc_presentation_controller_get_progress_status (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_CURRENT_USER_SLIDE_NUMBER_PROPERTY:
		g_value_set_int (value, pdfpc_presentation_controller_get_current_user_slide_number (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_FADED_TO_BLACK_PROPERTY:
		g_value_set_boolean (value, pdfpc_presentation_controller_get_faded_to_black (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_HIDDEN_PROPERTY:
		g_value_set_boolean (value, pdfpc_presentation_controller_get_hidden (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_FROZEN_PROPERTY:
		g_value_set_boolean (value, pdfpc_presentation_controller_get_frozen (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_IN_ZOOM_PROPERTY:
		g_value_set_boolean (value, pdfpc_presentation_controller_get_in_zoom (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_IN_CUSTOMIZATION_PROPERTY:
		g_value_set_boolean (value, pdfpc_presentation_controller_get_in_customization (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_N_SLIDES_PROPERTY:
		g_value_set_uint (value, pdfpc_presentation_controller_get_n_slides (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_USER_N_SLIDES_PROPERTY:
		g_value_set_int (value, pdfpc_presentation_controller_get_user_n_slides (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_PRESENTER_PROPERTY:
		g_value_set_object (value, pdfpc_presentation_controller_get_presenter (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_PRESENTATION_PROPERTY:
		g_value_set_object (value, pdfpc_presentation_controller_get_presentation (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_IGNORE_KEYBOARD_EVENTS_PROPERTY:
		g_value_set_boolean (value, pdfpc_presentation_controller_get_ignore_keyboard_events (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_IGNORE_MOUSE_EVENTS_PROPERTY:
		g_value_set_boolean (value, pdfpc_presentation_controller_get_ignore_mouse_events (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_REST_SERVER_PROPERTY:
		g_value_set_object (value, pdfpc_presentation_controller_get_rest_server (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_METADATA_PROPERTY:
		g_value_set_object (value, pdfpc_presentation_controller_get_metadata (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_OVERVIEW_PROPERTY:
		g_value_set_object (value, pdfpc_presentation_controller_get_overview (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_OVERVIEW_SHOWN_PROPERTY:
		g_value_set_boolean (value, pdfpc_presentation_controller_get_overview_shown (self));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_CURRENT_POINTER_PROPERTY:
		pdfpc_presentation_controller_value_set_pointer_tool (value, pdfpc_presentation_controller_get_current_pointer (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_pdfpc_presentation_controller_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	pdfpcPresentationController * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PDFPC_TYPE_PRESENTATION_CONTROLLER, pdfpcPresentationController);
	switch (property_id) {
		case PDFPC_PRESENTATION_CONTROLLER_CURRENT_SLIDE_NUMBER_PROPERTY:
		pdfpc_presentation_controller_set_current_slide_number (self, g_value_get_int (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_PROGRESS_STATUS_PROPERTY:
		pdfpc_presentation_controller_set_progress_status (self, g_value_get_enum (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_FADED_TO_BLACK_PROPERTY:
		pdfpc_presentation_controller_set_faded_to_black (self, g_value_get_boolean (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_HIDDEN_PROPERTY:
		pdfpc_presentation_controller_set_hidden (self, g_value_get_boolean (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_FROZEN_PROPERTY:
		pdfpc_presentation_controller_set_frozen (self, g_value_get_boolean (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_IN_ZOOM_PROPERTY:
		pdfpc_presentation_controller_set_in_zoom (self, g_value_get_boolean (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_IN_CUSTOMIZATION_PROPERTY:
		pdfpc_presentation_controller_set_in_customization (self, g_value_get_boolean (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_PRESENTER_PROPERTY:
		pdfpc_presentation_controller_set_presenter (self, g_value_get_object (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_PRESENTATION_PROPERTY:
		pdfpc_presentation_controller_set_presentation (self, g_value_get_object (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_IGNORE_KEYBOARD_EVENTS_PROPERTY:
		pdfpc_presentation_controller_set_ignore_keyboard_events (self, g_value_get_boolean (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_IGNORE_MOUSE_EVENTS_PROPERTY:
		pdfpc_presentation_controller_set_ignore_mouse_events (self, g_value_get_boolean (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_REST_SERVER_PROPERTY:
		pdfpc_presentation_controller_set_rest_server (self, g_value_get_object (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_METADATA_PROPERTY:
		pdfpc_presentation_controller_set_metadata (self, g_value_get_object (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_OVERVIEW_PROPERTY:
		pdfpc_presentation_controller_set_overview (self, g_value_get_object (value));
		break;
		case PDFPC_PRESENTATION_CONTROLLER_CURRENT_POINTER_PROPERTY:
		pdfpc_presentation_controller_set_current_pointer (self, pdfpc_presentation_controller_value_get_pointer_tool (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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 gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

