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

/*
 * This file is part of budgie-desktop
 *
 * Copyright © 2015-2022 Budgie Desktop Developers
 *
 * 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 2 of the License, or
 * (at your option) any later version.
 */

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <meta/main.h>
#include <gio/gio.h>
#include <meta/display.h>
#include <meta/meta-plugin.h>
#include <clutter/clutter.h>

#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 BUDGIE_TYPE_GSD_ACCEL (budgie_gsd_accel_get_type ())
typedef struct _BudgieGsdAccel BudgieGsdAccel;
#define _g_free0(var) (var = (g_free (var), NULL))

#define BUDGIE_TYPE_SESSION_HANDLER (budgie_session_handler_get_type ())
#define BUDGIE_SESSION_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_SESSION_HANDLER, BudgieSessionHandler))
#define BUDGIE_SESSION_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_SESSION_HANDLER, BudgieSessionHandlerClass))
#define BUDGIE_IS_SESSION_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_SESSION_HANDLER))
#define BUDGIE_IS_SESSION_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_SESSION_HANDLER))
#define BUDGIE_SESSION_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_SESSION_HANDLER, BudgieSessionHandlerClass))

typedef struct _BudgieSessionHandler BudgieSessionHandler;
typedef struct _BudgieSessionHandlerClass BudgieSessionHandlerClass;
typedef struct _BudgieSessionHandlerPrivate BudgieSessionHandlerPrivate;

#define BUDGIE_TYPE_END_SESSION_DIALOG (budgie_end_session_dialog_get_type ())
#define BUDGIE_END_SESSION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_END_SESSION_DIALOG, BudgieEndSessionDialog))
#define BUDGIE_IS_END_SESSION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_END_SESSION_DIALOG))
#define BUDGIE_END_SESSION_DIALOG_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BUDGIE_TYPE_END_SESSION_DIALOG, BudgieEndSessionDialogIface))

typedef struct _BudgieEndSessionDialog BudgieEndSessionDialog;
typedef struct _BudgieEndSessionDialogIface BudgieEndSessionDialogIface;

#define BUDGIE_TYPE_END_SESSION_DIALOG_PROXY (budgie_end_session_dialog_proxy_get_type ())
enum  {
	BUDGIE_SESSION_HANDLER_0_PROPERTY,
	BUDGIE_SESSION_HANDLER_NUM_PROPERTIES
};
static GParamSpec* budgie_session_handler_properties[BUDGIE_SESSION_HANDLER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
enum  {
	BUDGIE_SESSION_HANDLER_CONFIRMED_LOGOUT_SIGNAL,
	BUDGIE_SESSION_HANDLER_CONFIRMED_REBOOT_SIGNAL,
	BUDGIE_SESSION_HANDLER_CONFIRMED_SHUTDOWN_SIGNAL,
	BUDGIE_SESSION_HANDLER_CANCELED_SIGNAL,
	BUDGIE_SESSION_HANDLER_CLOSED_SIGNAL,
	BUDGIE_SESSION_HANDLER_NUM_SIGNALS
};
static guint budgie_session_handler_signals[BUDGIE_SESSION_HANDLER_NUM_SIGNALS] = {0};
enum  {
	BUDGIE_END_SESSION_DIALOG_CONFIRMED_LOGOUT_SIGNAL,
	BUDGIE_END_SESSION_DIALOG_CONFIRMED_REBOOT_SIGNAL,
	BUDGIE_END_SESSION_DIALOG_CONFIRMED_SHUTDOWN_SIGNAL,
	BUDGIE_END_SESSION_DIALOG_CANCELED_SIGNAL,
	BUDGIE_END_SESSION_DIALOG_CLOSED_SIGNAL,
	BUDGIE_END_SESSION_DIALOG_NUM_SIGNALS
};
static guint budgie_end_session_dialog_signals[BUDGIE_END_SESSION_DIALOG_NUM_SIGNALS] = {0};
typedef GDBusProxy BudgieEndSessionDialogProxy;
typedef GDBusProxyClass BudgieEndSessionDialogProxyClass;

#define BUDGIE_TYPE_BUDGIE_OSD (budgie_budgie_osd_get_type ())
#define BUDGIE_BUDGIE_OSD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_BUDGIE_OSD, BudgieBudgieOSD))
#define BUDGIE_IS_BUDGIE_OSD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_BUDGIE_OSD))
#define BUDGIE_BUDGIE_OSD_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BUDGIE_TYPE_BUDGIE_OSD, BudgieBudgieOSDIface))

typedef struct _BudgieBudgieOSD BudgieBudgieOSD;
typedef struct _BudgieBudgieOSDIface BudgieBudgieOSDIface;

#define BUDGIE_TYPE_BUDGIE_OSD_PROXY (budgie_budgie_osd_proxy_get_type ())
typedef GDBusProxy BudgieBudgieOSDProxy;
typedef GDBusProxyClass BudgieBudgieOSDProxyClass;
typedef struct _budgie_budgie_osd_ShowOSDReadyData budgie_budgie_osd_ShowOSDReadyData;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))

#define BUDGIE_TYPE_SHELL_SHIM (budgie_shell_shim_get_type ())
#define BUDGIE_SHELL_SHIM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_SHELL_SHIM, BudgieShellShim))
#define BUDGIE_SHELL_SHIM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_SHELL_SHIM, BudgieShellShimClass))
#define BUDGIE_IS_SHELL_SHIM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_SHELL_SHIM))
#define BUDGIE_IS_SHELL_SHIM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_SHELL_SHIM))
#define BUDGIE_SHELL_SHIM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_SHELL_SHIM, BudgieShellShimClass))

typedef struct _BudgieShellShim BudgieShellShim;
typedef struct _BudgieShellShimClass BudgieShellShimClass;
typedef struct _BudgieShellShimPrivate BudgieShellShimPrivate;
enum  {
	BUDGIE_SHELL_SHIM_0_PROPERTY,
	BUDGIE_SHELL_SHIM_NUM_PROPERTIES
};
static GParamSpec* budgie_shell_shim_properties[BUDGIE_SHELL_SHIM_NUM_PROPERTIES];

#define BUDGIE_TYPE_BUDGIE_WM (budgie_budgie_wm_get_type ())
#define BUDGIE_BUDGIE_WM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_BUDGIE_WM, BudgieBudgieWM))
#define BUDGIE_BUDGIE_WM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_TYPE_BUDGIE_WM, BudgieBudgieWMClass))
#define BUDGIE_IS_BUDGIE_WM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_BUDGIE_WM))
#define BUDGIE_IS_BUDGIE_WM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_TYPE_BUDGIE_WM))
#define BUDGIE_BUDGIE_WM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_TYPE_BUDGIE_WM, BudgieBudgieWMClass))

typedef struct _BudgieBudgieWM BudgieBudgieWM;
typedef struct _BudgieBudgieWMClass BudgieBudgieWMClass;
enum  {
	BUDGIE_SHELL_SHIM_ACCELERATOR_ACTIVATED_SIGNAL,
	BUDGIE_SHELL_SHIM_NUM_SIGNALS
};
static guint budgie_shell_shim_signals[BUDGIE_SHELL_SHIM_NUM_SIGNALS] = {0};

struct _BudgieGsdAccel {
	gchar* accelerator;
	guint flags;
	MetaKeyBindingFlags grab_flags;
};

struct _BudgieSessionHandler {
	GObject parent_instance;
	BudgieSessionHandlerPrivate * priv;
};

struct _BudgieSessionHandlerClass {
	GObjectClass parent_class;
};

struct _BudgieEndSessionDialogIface {
	GTypeInterface parent_iface;
	void (*Open) (BudgieEndSessionDialog* self, guint type, guint timestamp, guint open_length, char** inhibiters, gint inhibiters_length1, GError** error);
	void (*Close) (BudgieEndSessionDialog* self, GError** error);
};

struct _BudgieSessionHandlerPrivate {
	BudgieEndSessionDialog* proxy;
};

struct _BudgieBudgieOSDIface {
	GTypeInterface parent_iface;
	void (*ShowOSD) (BudgieBudgieOSD* self, GHashTable* params, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*ShowOSD_finish) (BudgieBudgieOSD* self, GAsyncResult* _res_, GError** error);
};

struct _budgie_budgie_osd_ShowOSDReadyData {
	GDBusMethodInvocation* _invocation_;
	GHashTable* params;
};

struct _BudgieShellShim {
	GObject parent_instance;
	BudgieShellShimPrivate * priv;
};

struct _BudgieShellShimClass {
	GObjectClass parent_class;
};

struct _BudgieShellShimPrivate {
	GHashTable* grabs;
	MetaDisplay* display;
	BudgieSessionHandler* handler;
	BudgieBudgieOSD* osd_proxy;
};

static gint BudgieSessionHandler_private_offset;
static gpointer budgie_session_handler_parent_class = NULL;
static gint BudgieShellShim_private_offset;
static gpointer budgie_shell_shim_parent_class = NULL;

VALA_EXTERN GType budgie_gsd_accel_get_type (void) G_GNUC_CONST ;
VALA_EXTERN BudgieGsdAccel* budgie_gsd_accel_dup (const BudgieGsdAccel* self);
VALA_EXTERN void budgie_gsd_accel_free (BudgieGsdAccel* self);
VALA_EXTERN void budgie_gsd_accel_copy (const BudgieGsdAccel* self,
                            BudgieGsdAccel* dest);
VALA_EXTERN void budgie_gsd_accel_destroy (BudgieGsdAccel* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (BudgieGsdAccel, budgie_gsd_accel_destroy)
VALA_EXTERN GType budgie_session_handler_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BudgieSessionHandler, g_object_unref)
VALA_EXTERN guint budgie_session_handler_register_object (void* object,
                                              GDBusConnection* connection,
                                              const gchar* path,
                                              GError** error);
VALA_EXTERN GType budgie_end_session_dialog_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint budgie_end_session_dialog_register_object (void* object,
                                                 GDBusConnection* connection,
                                                 const gchar* path,
                                                 GError** error);
VALA_EXTERN GType budgie_end_session_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BudgieEndSessionDialog, g_object_unref)
VALA_EXTERN BudgieSessionHandler* budgie_session_handler_new (void);
VALA_EXTERN BudgieSessionHandler* budgie_session_handler_construct (GType object_type);
static void budgie_session_handler_has_dialog (BudgieSessionHandler* self);
static void _budgie_session_handler_has_dialog_gbus_name_appeared_callback (GDBusConnection* connection,
                                                                     const gchar* name,
                                                                     const gchar* name_owner,
                                                                     gpointer self);
static void budgie_session_handler_lost_dialog (BudgieSessionHandler* self);
static void _budgie_session_handler_lost_dialog_gbus_name_vanished_callback (GDBusConnection* connection,
                                                                      const gchar* name,
                                                                      gpointer self);
static void budgie_session_handler_on_dialog_get (BudgieSessionHandler* self,
                                           GObject* o,
                                           GAsyncResult* res);
static void ___lambda5_ (BudgieSessionHandler* self);
static void ____lambda5__budgie_end_session_dialog_confirmed_logout (BudgieEndSessionDialog* _sender,
                                                              gpointer self);
static void ___lambda6_ (BudgieSessionHandler* self);
static void ____lambda6__budgie_end_session_dialog_confirmed_reboot (BudgieEndSessionDialog* _sender,
                                                              gpointer self);
static void ___lambda7_ (BudgieSessionHandler* self);
static void ____lambda7__budgie_end_session_dialog_confirmed_shutdown (BudgieEndSessionDialog* _sender,
                                                                gpointer self);
static void ___lambda8_ (BudgieSessionHandler* self);
static void ____lambda8__budgie_end_session_dialog_canceled (BudgieEndSessionDialog* _sender,
                                                      gpointer self);
static void ___lambda9_ (BudgieSessionHandler* self);
static void ____lambda9__budgie_end_session_dialog_closed (BudgieEndSessionDialog* _sender,
                                                    gpointer self);
static void _budgie_session_handler_on_dialog_get_gasync_ready_callback (GObject* source_object,
                                                                  GAsyncResult* res,
                                                                  gpointer self);
VALA_EXTERN void budgie_session_handler_Open (BudgieSessionHandler* self,
                                  guint type,
                                  guint timestamp,
                                  guint open_length,
                                  char** inhibiters,
                                  gint inhibiters_length1,
                                  GError** error);
VALA_EXTERN void budgie_end_session_dialog_Open (BudgieEndSessionDialog* self,
                                     guint type,
                                     guint timestamp,
                                     guint open_length,
                                     char** inhibiters,
                                     gint inhibiters_length1,
                                     GError** error);
VALA_EXTERN void budgie_session_handler_Close (BudgieSessionHandler* self,
                                   GError** error);
VALA_EXTERN void budgie_end_session_dialog_Close (BudgieEndSessionDialog* self,
                                      GError** error);
static void budgie_session_handler_finalize (GObject * obj);
static GType budgie_session_handler_get_type_once (void);
static void _dbus_budgie_session_handler_Open (BudgieSessionHandler* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation);
static void _dbus_budgie_session_handler_Close (BudgieSessionHandler* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation);
static void budgie_session_handler_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* budgie_session_handler_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 budgie_session_handler_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 _dbus_budgie_session_handler_confirmed_logout (GObject* _sender,
                                                    gpointer* _data);
static void _dbus_budgie_session_handler_confirmed_reboot (GObject* _sender,
                                                    gpointer* _data);
static void _dbus_budgie_session_handler_confirmed_shutdown (GObject* _sender,
                                                      gpointer* _data);
static void _dbus_budgie_session_handler_canceled (GObject* _sender,
                                            gpointer* _data);
static void _dbus_budgie_session_handler_closed (GObject* _sender,
                                          gpointer* _data);
static void _budgie_session_handler_unregister_object (gpointer user_data);
static GType budgie_end_session_dialog_get_type_once (void);
static void budgie_end_session_dialog_proxy_g_signal (GDBusProxy* proxy,
                                               const gchar* sender_name,
                                               const gchar* signal_name,
                                               GVariant* parameters);
static void _dbus_handle_budgie_end_session_dialog_confirmed_logout (BudgieEndSessionDialog* self,
                                                              GVariant* parameters);
static void _dbus_handle_budgie_end_session_dialog_confirmed_reboot (BudgieEndSessionDialog* self,
                                                              GVariant* parameters);
static void _dbus_handle_budgie_end_session_dialog_confirmed_shutdown (BudgieEndSessionDialog* self,
                                                                GVariant* parameters);
static void _dbus_handle_budgie_end_session_dialog_canceled (BudgieEndSessionDialog* self,
                                                      GVariant* parameters);
static void _dbus_handle_budgie_end_session_dialog_closed (BudgieEndSessionDialog* self,
                                                    GVariant* parameters);
static void budgie_end_session_dialog_proxy_Open (BudgieEndSessionDialog* self,
                                           guint type,
                                           guint timestamp,
                                           guint open_length,
                                           char** inhibiters,
                                           gint inhibiters_length1,
                                           GError** error);
static void budgie_end_session_dialog_proxy_Close (BudgieEndSessionDialog* self,
                                            GError** error);
static void budgie_end_session_dialog_proxy_budgie_end_session_dialog_interface_init (BudgieEndSessionDialogIface* iface);
static void _dbus_budgie_end_session_dialog_Open (BudgieEndSessionDialog* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation);
static void _dbus_budgie_end_session_dialog_Close (BudgieEndSessionDialog* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation);
static void budgie_end_session_dialog_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* budgie_end_session_dialog_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 budgie_end_session_dialog_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 _dbus_budgie_end_session_dialog_confirmed_logout (GObject* _sender,
                                                       gpointer* _data);
static void _dbus_budgie_end_session_dialog_confirmed_reboot (GObject* _sender,
                                                       gpointer* _data);
static void _dbus_budgie_end_session_dialog_confirmed_shutdown (GObject* _sender,
                                                         gpointer* _data);
static void _dbus_budgie_end_session_dialog_canceled (GObject* _sender,
                                               gpointer* _data);
static void _dbus_budgie_end_session_dialog_closed (GObject* _sender,
                                             gpointer* _data);
static void _budgie_end_session_dialog_unregister_object (gpointer user_data);
VALA_EXTERN GType budgie_budgie_osd_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint budgie_budgie_osd_register_object (void* object,
                                         GDBusConnection* connection,
                                         const gchar* path,
                                         GError** error);
VALA_EXTERN GType budgie_budgie_osd_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BudgieBudgieOSD, g_object_unref)
VALA_EXTERN void budgie_budgie_osd_ShowOSD (BudgieBudgieOSD* self,
                                GHashTable* params,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_);
VALA_EXTERN void budgie_budgie_osd_ShowOSD_finish (BudgieBudgieOSD* self,
                                       GAsyncResult* _res_,
                                       GError** error);
static GType budgie_budgie_osd_get_type_once (void);
static void budgie_budgie_osd_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 budgie_budgie_osd_proxy_ShowOSD_async (BudgieBudgieOSD* self,
                                            GHashTable* params,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
static void budgie_budgie_osd_proxy_ShowOSD_finish (BudgieBudgieOSD* self,
                                             GAsyncResult* _res_,
                                             GError** error);
static void budgie_budgie_osd_proxy_budgie_budgie_osd_interface_init (BudgieBudgieOSDIface* iface);
static void _dbus_budgie_budgie_osd_ShowOSD (BudgieBudgieOSD* self,
                                      GVariant* _parameters_,
                                      GDBusMethodInvocation* invocation);
static void _dbus_budgie_budgie_osd_ShowOSD_ready (GObject * source_object,
                                            GAsyncResult * _res_,
                                            gpointer _user_data_);
static void budgie_budgie_osd_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* budgie_budgie_osd_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 budgie_budgie_osd_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 _budgie_budgie_osd_unregister_object (gpointer user_data);
VALA_EXTERN GType budgie_shell_shim_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BudgieShellShim, g_object_unref)
VALA_EXTERN guint budgie_shell_shim_register_object (void* object,
                                         GDBusConnection* connection,
                                         const gchar* path,
                                         GError** error);
VALA_EXTERN GType budgie_budgie_wm_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BudgieBudgieWM, g_object_unref)
VALA_EXTERN BudgieShellShim* budgie_shell_shim_new (BudgieBudgieWM* wm);
VALA_EXTERN BudgieShellShim* budgie_shell_shim_construct (GType object_type,
                                              BudgieBudgieWM* wm);
static void _g_free0_ (gpointer var);
static void budgie_shell_shim_on_accelerator_activated (BudgieShellShim* self,
                                                 guint action,
                                                 ClutterInputDevice* dev,
                                                 guint timestamp);
static void _budgie_shell_shim_on_accelerator_activated_meta_display_accelerator_activated (MetaDisplay* _sender,
                                                                                     guint object,
                                                                                     ClutterInputDevice* p0,
                                                                                     guint p1,
                                                                                     gpointer self);
static void budgie_shell_shim_has_osd_proxy (BudgieShellShim* self);
static void _budgie_shell_shim_has_osd_proxy_gbus_name_appeared_callback (GDBusConnection* connection,
                                                                   const gchar* name,
                                                                   const gchar* name_owner,
                                                                   gpointer self);
static void budgie_shell_shim_lost_osd_proxy (BudgieShellShim* self);
static void _budgie_shell_shim_lost_osd_proxy_gbus_name_vanished_callback (GDBusConnection* connection,
                                                                    const gchar* name,
                                                                    gpointer self);
static void budgie_shell_shim_on_osd_proxy_get (BudgieShellShim* self,
                                         GObject* o,
                                         GAsyncResult* res);
static void _budgie_shell_shim_on_osd_proxy_get_gasync_ready_callback (GObject* source_object,
                                                                GAsyncResult* res,
                                                                gpointer self);
static gboolean _uint_equal (const guint * s1,
                      const guint * s2);
static void _g_variant_unref0_ (gpointer var);
VALA_EXTERN guint budgie_shell_shim_grab_accelerator (BudgieShellShim* self,
                                          const gchar* accelerator,
                                          MetaKeyBindingFlags flags,
                                          GError** error);
static guint* _uint_dup (guint* self);
VALA_EXTERN guint* budgie_shell_shim_grab_accelerators (BudgieShellShim* self,
                                            BudgieGsdAccel* accelerators,
                                            gint accelerators_length1,
                                            gint* result_length1,
                                            GError** error);
static void _vala_array_add3 (guint* * array,
                       gint* length,
                       gint* size,
                       guint value);
VALA_EXTERN gboolean budgie_shell_shim_ungrab_accelerator (BudgieShellShim* self,
                                               guint action,
                                               GError** error);
static void budgie_shell_shim_on_bus_acquired (BudgieShellShim* self,
                                        GDBusConnection* conn);
VALA_EXTERN void budgie_shell_shim_serve (BudgieShellShim* self);
static void _budgie_shell_shim_on_bus_acquired_gbus_acquired_callback (GDBusConnection* connection,
                                                                const gchar* name,
                                                                gpointer self);
VALA_EXTERN guint budgie_shell_shim_GrabAccelerator (BudgieShellShim* self,
                                         const char* sender,
                                         const gchar* accelerator,
                                         guint flags,
                                         MetaKeyBindingFlags grab_flags,
                                         GError** error);
VALA_EXTERN guint* budgie_shell_shim_GrabAccelerators (BudgieShellShim* self,
                                           const char* sender,
                                           BudgieGsdAccel* accelerators,
                                           gint accelerators_length1,
                                           gint* result_length1,
                                           GError** error);
VALA_EXTERN gboolean budgie_shell_shim_UngrabAccelerator (BudgieShellShim* self,
                                              const char* sender,
                                              guint action,
                                              GError** error);
VALA_EXTERN gboolean budgie_shell_shim_UngrabAccelerators (BudgieShellShim* self,
                                               const char* sender,
                                               guint* actions,
                                               gint actions_length1,
                                               GError** error);
VALA_EXTERN void budgie_shell_shim_ShowOSD (BudgieShellShim* self,
                                GHashTable* params,
                                GError** error);
static void g_cclosure_user_marshal_VOID__UINT_BOXED (GClosure * closure,
                                               GValue * return_value,
                                               guint n_param_values,
                                               const GValue * param_values,
                                               gpointer invocation_hint,
                                               gpointer marshal_data);
static void budgie_shell_shim_finalize (GObject * obj);
static GType budgie_shell_shim_get_type_once (void);
static void _dbus_budgie_shell_shim_grab_accelerator (BudgieShellShim* self,
                                               GVariant* _parameters_,
                                               GDBusMethodInvocation* invocation);
static void _vala_BudgieGsdAccel_array_free (BudgieGsdAccel * array,
                                      gssize array_length);
static void _dbus_budgie_shell_shim_grab_accelerators (BudgieShellShim* self,
                                                GVariant* _parameters_,
                                                GDBusMethodInvocation* invocation);
static void _dbus_budgie_shell_shim_ungrab_accelerator (BudgieShellShim* self,
                                                 GVariant* _parameters_,
                                                 GDBusMethodInvocation* invocation);
static void _dbus_budgie_shell_shim_GrabAccelerator (BudgieShellShim* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation);
static void _dbus_budgie_shell_shim_GrabAccelerators (BudgieShellShim* self,
                                               GVariant* _parameters_,
                                               GDBusMethodInvocation* invocation);
static void _dbus_budgie_shell_shim_UngrabAccelerator (BudgieShellShim* self,
                                                GVariant* _parameters_,
                                                GDBusMethodInvocation* invocation);
static void _dbus_budgie_shell_shim_UngrabAccelerators (BudgieShellShim* self,
                                                 GVariant* _parameters_,
                                                 GDBusMethodInvocation* invocation);
static void _dbus_budgie_shell_shim_ShowOSD (BudgieShellShim* self,
                                      GVariant* _parameters_,
                                      GDBusMethodInvocation* invocation);
static void budgie_shell_shim_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* budgie_shell_shim_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 budgie_shell_shim_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 _dbus_budgie_shell_shim_accelerator_activated (GObject* _sender,
                                                    guint action,
                                                    GHashTable* parameters,
                                                    gpointer* _data);
static void _budgie_shell_shim_unregister_object (gpointer user_data);
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 const GDBusArgInfo _budgie_session_handler_dbus_arg_info_Open_type = {-1, "type", "u", NULL};
static const GDBusArgInfo _budgie_session_handler_dbus_arg_info_Open_timestamp = {-1, "timestamp", "u", NULL};
static const GDBusArgInfo _budgie_session_handler_dbus_arg_info_Open_open_length = {-1, "open_length", "u", NULL};
static const GDBusArgInfo _budgie_session_handler_dbus_arg_info_Open_inhibiters = {-1, "inhibiters", "ao", NULL};
static const GDBusArgInfo * const _budgie_session_handler_dbus_arg_info_Open_in[] = {&_budgie_session_handler_dbus_arg_info_Open_type, &_budgie_session_handler_dbus_arg_info_Open_timestamp, &_budgie_session_handler_dbus_arg_info_Open_open_length, &_budgie_session_handler_dbus_arg_info_Open_inhibiters, NULL};
static const GDBusArgInfo * const _budgie_session_handler_dbus_arg_info_Open_out[] = {NULL};
static const GDBusMethodInfo _budgie_session_handler_dbus_method_info_Open = {-1, "Open", (GDBusArgInfo **) (&_budgie_session_handler_dbus_arg_info_Open_in), (GDBusArgInfo **) (&_budgie_session_handler_dbus_arg_info_Open_out), NULL};
static const GDBusArgInfo * const _budgie_session_handler_dbus_arg_info_Close_in[] = {NULL};
static const GDBusArgInfo * const _budgie_session_handler_dbus_arg_info_Close_out[] = {NULL};
static const GDBusMethodInfo _budgie_session_handler_dbus_method_info_Close = {-1, "Close", (GDBusArgInfo **) (&_budgie_session_handler_dbus_arg_info_Close_in), (GDBusArgInfo **) (&_budgie_session_handler_dbus_arg_info_Close_out), NULL};
static const GDBusMethodInfo * const _budgie_session_handler_dbus_method_info[] = {&_budgie_session_handler_dbus_method_info_Open, &_budgie_session_handler_dbus_method_info_Close, NULL};
static const GDBusArgInfo * const _budgie_session_handler_dbus_arg_info_confirmed_logout[] = {NULL};
static const GDBusSignalInfo _budgie_session_handler_dbus_signal_info_confirmed_logout = {-1, "ConfirmedLogout", (GDBusArgInfo **) (&_budgie_session_handler_dbus_arg_info_confirmed_logout), NULL};
static const GDBusArgInfo * const _budgie_session_handler_dbus_arg_info_confirmed_reboot[] = {NULL};
static const GDBusSignalInfo _budgie_session_handler_dbus_signal_info_confirmed_reboot = {-1, "ConfirmedReboot", (GDBusArgInfo **) (&_budgie_session_handler_dbus_arg_info_confirmed_reboot), NULL};
static const GDBusArgInfo * const _budgie_session_handler_dbus_arg_info_confirmed_shutdown[] = {NULL};
static const GDBusSignalInfo _budgie_session_handler_dbus_signal_info_confirmed_shutdown = {-1, "ConfirmedShutdown", (GDBusArgInfo **) (&_budgie_session_handler_dbus_arg_info_confirmed_shutdown), NULL};
static const GDBusArgInfo * const _budgie_session_handler_dbus_arg_info_canceled[] = {NULL};
static const GDBusSignalInfo _budgie_session_handler_dbus_signal_info_canceled = {-1, "Canceled", (GDBusArgInfo **) (&_budgie_session_handler_dbus_arg_info_canceled), NULL};
static const GDBusArgInfo * const _budgie_session_handler_dbus_arg_info_closed[] = {NULL};
static const GDBusSignalInfo _budgie_session_handler_dbus_signal_info_closed = {-1, "Closed", (GDBusArgInfo **) (&_budgie_session_handler_dbus_arg_info_closed), NULL};
static const GDBusSignalInfo * const _budgie_session_handler_dbus_signal_info[] = {&_budgie_session_handler_dbus_signal_info_confirmed_logout, &_budgie_session_handler_dbus_signal_info_confirmed_reboot, &_budgie_session_handler_dbus_signal_info_confirmed_shutdown, &_budgie_session_handler_dbus_signal_info_canceled, &_budgie_session_handler_dbus_signal_info_closed, NULL};
static const GDBusPropertyInfo * const _budgie_session_handler_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _budgie_session_handler_dbus_interface_info = {-1, "org.gnome.SessionManager.EndSessionDialog", (GDBusMethodInfo **) (&_budgie_session_handler_dbus_method_info), (GDBusSignalInfo **) (&_budgie_session_handler_dbus_signal_info), (GDBusPropertyInfo **) (&_budgie_session_handler_dbus_property_info), NULL};
static const GDBusInterfaceVTable _budgie_session_handler_dbus_interface_vtable = {budgie_session_handler_dbus_interface_method_call, budgie_session_handler_dbus_interface_get_property, budgie_session_handler_dbus_interface_set_property};
static const GDBusArgInfo _budgie_end_session_dialog_dbus_arg_info_Open_type = {-1, "type", "u", NULL};
static const GDBusArgInfo _budgie_end_session_dialog_dbus_arg_info_Open_timestamp = {-1, "timestamp", "u", NULL};
static const GDBusArgInfo _budgie_end_session_dialog_dbus_arg_info_Open_open_length = {-1, "open_length", "u", NULL};
static const GDBusArgInfo _budgie_end_session_dialog_dbus_arg_info_Open_inhibiters = {-1, "inhibiters", "ao", NULL};
static const GDBusArgInfo * const _budgie_end_session_dialog_dbus_arg_info_Open_in[] = {&_budgie_end_session_dialog_dbus_arg_info_Open_type, &_budgie_end_session_dialog_dbus_arg_info_Open_timestamp, &_budgie_end_session_dialog_dbus_arg_info_Open_open_length, &_budgie_end_session_dialog_dbus_arg_info_Open_inhibiters, NULL};
static const GDBusArgInfo * const _budgie_end_session_dialog_dbus_arg_info_Open_out[] = {NULL};
static const GDBusMethodInfo _budgie_end_session_dialog_dbus_method_info_Open = {-1, "Open", (GDBusArgInfo **) (&_budgie_end_session_dialog_dbus_arg_info_Open_in), (GDBusArgInfo **) (&_budgie_end_session_dialog_dbus_arg_info_Open_out), NULL};
static const GDBusArgInfo * const _budgie_end_session_dialog_dbus_arg_info_Close_in[] = {NULL};
static const GDBusArgInfo * const _budgie_end_session_dialog_dbus_arg_info_Close_out[] = {NULL};
static const GDBusMethodInfo _budgie_end_session_dialog_dbus_method_info_Close = {-1, "Close", (GDBusArgInfo **) (&_budgie_end_session_dialog_dbus_arg_info_Close_in), (GDBusArgInfo **) (&_budgie_end_session_dialog_dbus_arg_info_Close_out), NULL};
static const GDBusMethodInfo * const _budgie_end_session_dialog_dbus_method_info[] = {&_budgie_end_session_dialog_dbus_method_info_Open, &_budgie_end_session_dialog_dbus_method_info_Close, NULL};
static const GDBusArgInfo * const _budgie_end_session_dialog_dbus_arg_info_confirmed_logout[] = {NULL};
static const GDBusSignalInfo _budgie_end_session_dialog_dbus_signal_info_confirmed_logout = {-1, "ConfirmedLogout", (GDBusArgInfo **) (&_budgie_end_session_dialog_dbus_arg_info_confirmed_logout), NULL};
static const GDBusArgInfo * const _budgie_end_session_dialog_dbus_arg_info_confirmed_reboot[] = {NULL};
static const GDBusSignalInfo _budgie_end_session_dialog_dbus_signal_info_confirmed_reboot = {-1, "ConfirmedReboot", (GDBusArgInfo **) (&_budgie_end_session_dialog_dbus_arg_info_confirmed_reboot), NULL};
static const GDBusArgInfo * const _budgie_end_session_dialog_dbus_arg_info_confirmed_shutdown[] = {NULL};
static const GDBusSignalInfo _budgie_end_session_dialog_dbus_signal_info_confirmed_shutdown = {-1, "ConfirmedShutdown", (GDBusArgInfo **) (&_budgie_end_session_dialog_dbus_arg_info_confirmed_shutdown), NULL};
static const GDBusArgInfo * const _budgie_end_session_dialog_dbus_arg_info_canceled[] = {NULL};
static const GDBusSignalInfo _budgie_end_session_dialog_dbus_signal_info_canceled = {-1, "Canceled", (GDBusArgInfo **) (&_budgie_end_session_dialog_dbus_arg_info_canceled), NULL};
static const GDBusArgInfo * const _budgie_end_session_dialog_dbus_arg_info_closed[] = {NULL};
static const GDBusSignalInfo _budgie_end_session_dialog_dbus_signal_info_closed = {-1, "Closed", (GDBusArgInfo **) (&_budgie_end_session_dialog_dbus_arg_info_closed), NULL};
static const GDBusSignalInfo * const _budgie_end_session_dialog_dbus_signal_info[] = {&_budgie_end_session_dialog_dbus_signal_info_confirmed_logout, &_budgie_end_session_dialog_dbus_signal_info_confirmed_reboot, &_budgie_end_session_dialog_dbus_signal_info_confirmed_shutdown, &_budgie_end_session_dialog_dbus_signal_info_canceled, &_budgie_end_session_dialog_dbus_signal_info_closed, NULL};
static const GDBusPropertyInfo * const _budgie_end_session_dialog_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _budgie_end_session_dialog_dbus_interface_info = {-1, "org.budgie_desktop.Session.EndSessionDialog", (GDBusMethodInfo **) (&_budgie_end_session_dialog_dbus_method_info), (GDBusSignalInfo **) (&_budgie_end_session_dialog_dbus_signal_info), (GDBusPropertyInfo **) (&_budgie_end_session_dialog_dbus_property_info), NULL};
static const GDBusInterfaceVTable _budgie_end_session_dialog_dbus_interface_vtable = {budgie_end_session_dialog_dbus_interface_method_call, budgie_end_session_dialog_dbus_interface_get_property, budgie_end_session_dialog_dbus_interface_set_property};
static const GDBusArgInfo _budgie_budgie_osd_dbus_arg_info_ShowOSD_params = {-1, "params", "a{sv}", NULL};
static const GDBusArgInfo * const _budgie_budgie_osd_dbus_arg_info_ShowOSD_in[] = {&_budgie_budgie_osd_dbus_arg_info_ShowOSD_params, NULL};
static const GDBusArgInfo * const _budgie_budgie_osd_dbus_arg_info_ShowOSD_out[] = {NULL};
static const GDBusMethodInfo _budgie_budgie_osd_dbus_method_info_ShowOSD = {-1, "ShowOSD", (GDBusArgInfo **) (&_budgie_budgie_osd_dbus_arg_info_ShowOSD_in), (GDBusArgInfo **) (&_budgie_budgie_osd_dbus_arg_info_ShowOSD_out), NULL};
static const GDBusMethodInfo * const _budgie_budgie_osd_dbus_method_info[] = {&_budgie_budgie_osd_dbus_method_info_ShowOSD, NULL};
static const GDBusSignalInfo * const _budgie_budgie_osd_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _budgie_budgie_osd_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _budgie_budgie_osd_dbus_interface_info = {-1, "org.budgie_desktop.BudgieOSD", (GDBusMethodInfo **) (&_budgie_budgie_osd_dbus_method_info), (GDBusSignalInfo **) (&_budgie_budgie_osd_dbus_signal_info), (GDBusPropertyInfo **) (&_budgie_budgie_osd_dbus_property_info), NULL};
static const GDBusInterfaceVTable _budgie_budgie_osd_dbus_interface_vtable = {budgie_budgie_osd_dbus_interface_method_call, budgie_budgie_osd_dbus_interface_get_property, budgie_budgie_osd_dbus_interface_set_property};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_grab_accelerator_accelerator = {-1, "accelerator", "s", NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_grab_accelerator_flags = {-1, "flags", "u", NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_grab_accelerator_result = {-1, "result", "u", NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_grab_accelerator_in[] = {&_budgie_shell_shim_dbus_arg_info_grab_accelerator_accelerator, &_budgie_shell_shim_dbus_arg_info_grab_accelerator_flags, NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_grab_accelerator_out[] = {&_budgie_shell_shim_dbus_arg_info_grab_accelerator_result, NULL};
static const GDBusMethodInfo _budgie_shell_shim_dbus_method_info_grab_accelerator = {-1, "GrabAccelerator", (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_grab_accelerator_in), (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_grab_accelerator_out), NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_grab_accelerators_accelerators = {-1, "accelerators", "a(suu)", NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_grab_accelerators_result = {-1, "result", "au", NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_grab_accelerators_in[] = {&_budgie_shell_shim_dbus_arg_info_grab_accelerators_accelerators, NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_grab_accelerators_out[] = {&_budgie_shell_shim_dbus_arg_info_grab_accelerators_result, NULL};
static const GDBusMethodInfo _budgie_shell_shim_dbus_method_info_grab_accelerators = {-1, "GrabAccelerators", (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_grab_accelerators_in), (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_grab_accelerators_out), NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_ungrab_accelerator_action = {-1, "action", "u", NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_ungrab_accelerator_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_ungrab_accelerator_in[] = {&_budgie_shell_shim_dbus_arg_info_ungrab_accelerator_action, NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_ungrab_accelerator_out[] = {&_budgie_shell_shim_dbus_arg_info_ungrab_accelerator_result, NULL};
static const GDBusMethodInfo _budgie_shell_shim_dbus_method_info_ungrab_accelerator = {-1, "UngrabAccelerator", (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_ungrab_accelerator_in), (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_ungrab_accelerator_out), NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_GrabAccelerator_accelerator = {-1, "accelerator", "s", NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_GrabAccelerator_flags = {-1, "flags", "u", NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_GrabAccelerator_grab_flags = {-1, "grab_flags", "u", NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_GrabAccelerator_result = {-1, "result", "u", NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_GrabAccelerator_in[] = {&_budgie_shell_shim_dbus_arg_info_GrabAccelerator_accelerator, &_budgie_shell_shim_dbus_arg_info_GrabAccelerator_flags, &_budgie_shell_shim_dbus_arg_info_GrabAccelerator_grab_flags, NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_GrabAccelerator_out[] = {&_budgie_shell_shim_dbus_arg_info_GrabAccelerator_result, NULL};
static const GDBusMethodInfo _budgie_shell_shim_dbus_method_info_GrabAccelerator = {-1, "GrabAccelerator", (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_GrabAccelerator_in), (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_GrabAccelerator_out), NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_GrabAccelerators_accelerators = {-1, "accelerators", "a(suu)", NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_GrabAccelerators_result = {-1, "result", "au", NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_GrabAccelerators_in[] = {&_budgie_shell_shim_dbus_arg_info_GrabAccelerators_accelerators, NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_GrabAccelerators_out[] = {&_budgie_shell_shim_dbus_arg_info_GrabAccelerators_result, NULL};
static const GDBusMethodInfo _budgie_shell_shim_dbus_method_info_GrabAccelerators = {-1, "GrabAccelerators", (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_GrabAccelerators_in), (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_GrabAccelerators_out), NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_UngrabAccelerator_action = {-1, "action", "u", NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_UngrabAccelerator_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_UngrabAccelerator_in[] = {&_budgie_shell_shim_dbus_arg_info_UngrabAccelerator_action, NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_UngrabAccelerator_out[] = {&_budgie_shell_shim_dbus_arg_info_UngrabAccelerator_result, NULL};
static const GDBusMethodInfo _budgie_shell_shim_dbus_method_info_UngrabAccelerator = {-1, "UngrabAccelerator", (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_UngrabAccelerator_in), (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_UngrabAccelerator_out), NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_UngrabAccelerators_actions = {-1, "actions", "au", NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_UngrabAccelerators_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_UngrabAccelerators_in[] = {&_budgie_shell_shim_dbus_arg_info_UngrabAccelerators_actions, NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_UngrabAccelerators_out[] = {&_budgie_shell_shim_dbus_arg_info_UngrabAccelerators_result, NULL};
static const GDBusMethodInfo _budgie_shell_shim_dbus_method_info_UngrabAccelerators = {-1, "UngrabAccelerators", (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_UngrabAccelerators_in), (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_UngrabAccelerators_out), NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_ShowOSD_params = {-1, "params", "a{sv}", NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_ShowOSD_in[] = {&_budgie_shell_shim_dbus_arg_info_ShowOSD_params, NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_ShowOSD_out[] = {NULL};
static const GDBusMethodInfo _budgie_shell_shim_dbus_method_info_ShowOSD = {-1, "ShowOSD", (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_ShowOSD_in), (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_ShowOSD_out), NULL};
static const GDBusMethodInfo * const _budgie_shell_shim_dbus_method_info[] = {&_budgie_shell_shim_dbus_method_info_grab_accelerator, &_budgie_shell_shim_dbus_method_info_grab_accelerators, &_budgie_shell_shim_dbus_method_info_ungrab_accelerator, &_budgie_shell_shim_dbus_method_info_GrabAccelerator, &_budgie_shell_shim_dbus_method_info_GrabAccelerators, &_budgie_shell_shim_dbus_method_info_UngrabAccelerator, &_budgie_shell_shim_dbus_method_info_UngrabAccelerators, &_budgie_shell_shim_dbus_method_info_ShowOSD, NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_accelerator_activated_action = {-1, "action", "u", NULL};
static const GDBusArgInfo _budgie_shell_shim_dbus_arg_info_accelerator_activated_parameters = {-1, "parameters", "a{sv}", NULL};
static const GDBusArgInfo * const _budgie_shell_shim_dbus_arg_info_accelerator_activated[] = {&_budgie_shell_shim_dbus_arg_info_accelerator_activated_action, &_budgie_shell_shim_dbus_arg_info_accelerator_activated_parameters, NULL};
static const GDBusSignalInfo _budgie_shell_shim_dbus_signal_info_accelerator_activated = {-1, "AcceleratorActivated", (GDBusArgInfo **) (&_budgie_shell_shim_dbus_arg_info_accelerator_activated), NULL};
static const GDBusSignalInfo * const _budgie_shell_shim_dbus_signal_info[] = {&_budgie_shell_shim_dbus_signal_info_accelerator_activated, NULL};
static const GDBusPropertyInfo * const _budgie_shell_shim_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _budgie_shell_shim_dbus_interface_info = {-1, "org.gnome.Shell", (GDBusMethodInfo **) (&_budgie_shell_shim_dbus_method_info), (GDBusSignalInfo **) (&_budgie_shell_shim_dbus_signal_info), (GDBusPropertyInfo **) (&_budgie_shell_shim_dbus_property_info), NULL};
static const GDBusInterfaceVTable _budgie_shell_shim_dbus_interface_vtable = {budgie_shell_shim_dbus_interface_method_call, budgie_shell_shim_dbus_interface_get_property, budgie_shell_shim_dbus_interface_set_property};

void
budgie_gsd_accel_copy (const BudgieGsdAccel* self,
                       BudgieGsdAccel* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	_tmp0_ = (*self).accelerator;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).accelerator);
	(*dest).accelerator = _tmp1_;
	(*dest).flags = (*self).flags;
	(*dest).grab_flags = (*self).grab_flags;
}

void
budgie_gsd_accel_destroy (BudgieGsdAccel* self)
{
	_g_free0 ((*self).accelerator);
}

BudgieGsdAccel*
budgie_gsd_accel_dup (const BudgieGsdAccel* self)
{
	BudgieGsdAccel* dup;
	dup = g_new0 (BudgieGsdAccel, 1);
	budgie_gsd_accel_copy (self, dup);
	return dup;
}

void
budgie_gsd_accel_free (BudgieGsdAccel* self)
{
	budgie_gsd_accel_destroy (self);
	g_free (self);
}

static GType
budgie_gsd_accel_get_type_once (void)
{
	GType budgie_gsd_accel_type_id;
	budgie_gsd_accel_type_id = g_boxed_type_register_static ("BudgieGsdAccel", (GBoxedCopyFunc) budgie_gsd_accel_dup, (GBoxedFreeFunc) budgie_gsd_accel_free);
	return budgie_gsd_accel_type_id;
}

GType
budgie_gsd_accel_get_type (void)
{
	static volatile gsize budgie_gsd_accel_type_id__once = 0;
	if (g_once_init_enter (&budgie_gsd_accel_type_id__once)) {
		GType budgie_gsd_accel_type_id;
		budgie_gsd_accel_type_id = budgie_gsd_accel_get_type_once ();
		g_once_init_leave (&budgie_gsd_accel_type_id__once, budgie_gsd_accel_type_id);
	}
	return budgie_gsd_accel_type_id__once;
}

static inline gpointer
budgie_session_handler_get_instance_private (BudgieSessionHandler* self)
{
	return G_STRUCT_MEMBER_P (self, BudgieSessionHandler_private_offset);
}

static void
_budgie_session_handler_has_dialog_gbus_name_appeared_callback (GDBusConnection* connection,
                                                                const gchar* name,
                                                                const gchar* name_owner,
                                                                gpointer self)
{
	budgie_session_handler_has_dialog ((BudgieSessionHandler*) self);
}

static void
_budgie_session_handler_lost_dialog_gbus_name_vanished_callback (GDBusConnection* connection,
                                                                 const gchar* name,
                                                                 gpointer self)
{
	budgie_session_handler_lost_dialog ((BudgieSessionHandler*) self);
}

BudgieSessionHandler*
budgie_session_handler_construct (GType object_type)
{
	BudgieSessionHandler * self = NULL;
	self = (BudgieSessionHandler*) g_object_new (object_type, NULL);
	g_bus_watch_name_with_closures (G_BUS_TYPE_SESSION, "org.budgie_desktop.Session.EndSessionDialog", G_BUS_NAME_WATCHER_FLAGS_NONE, (GClosure*) ((_budgie_session_handler_has_dialog_gbus_name_appeared_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _budgie_session_handler_has_dialog_gbus_name_appeared_callback, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((_budgie_session_handler_lost_dialog_gbus_name_vanished_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _budgie_session_handler_lost_dialog_gbus_name_vanished_callback, g_object_ref (self), (GClosureNotify) g_object_unref)));
	return self;
}

BudgieSessionHandler*
budgie_session_handler_new (void)
{
	return budgie_session_handler_construct (BUDGIE_TYPE_SESSION_HANDLER);
}

static void
___lambda5_ (BudgieSessionHandler* self)
{
	g_signal_emit (self, budgie_session_handler_signals[BUDGIE_SESSION_HANDLER_CONFIRMED_LOGOUT_SIGNAL], 0);
}

static void
____lambda5__budgie_end_session_dialog_confirmed_logout (BudgieEndSessionDialog* _sender,
                                                         gpointer self)
{
	___lambda5_ ((BudgieSessionHandler*) self);
}

static void
___lambda6_ (BudgieSessionHandler* self)
{
	g_signal_emit (self, budgie_session_handler_signals[BUDGIE_SESSION_HANDLER_CONFIRMED_REBOOT_SIGNAL], 0);
}

static void
____lambda6__budgie_end_session_dialog_confirmed_reboot (BudgieEndSessionDialog* _sender,
                                                         gpointer self)
{
	___lambda6_ ((BudgieSessionHandler*) self);
}

static void
___lambda7_ (BudgieSessionHandler* self)
{
	g_signal_emit (self, budgie_session_handler_signals[BUDGIE_SESSION_HANDLER_CONFIRMED_SHUTDOWN_SIGNAL], 0);
}

static void
____lambda7__budgie_end_session_dialog_confirmed_shutdown (BudgieEndSessionDialog* _sender,
                                                           gpointer self)
{
	___lambda7_ ((BudgieSessionHandler*) self);
}

static void
___lambda8_ (BudgieSessionHandler* self)
{
	g_signal_emit (self, budgie_session_handler_signals[BUDGIE_SESSION_HANDLER_CANCELED_SIGNAL], 0);
}

static void
____lambda8__budgie_end_session_dialog_canceled (BudgieEndSessionDialog* _sender,
                                                 gpointer self)
{
	___lambda8_ ((BudgieSessionHandler*) self);
}

static void
___lambda9_ (BudgieSessionHandler* self)
{
	g_signal_emit (self, budgie_session_handler_signals[BUDGIE_SESSION_HANDLER_CLOSED_SIGNAL], 0);
}

static void
____lambda9__budgie_end_session_dialog_closed (BudgieEndSessionDialog* _sender,
                                               gpointer self)
{
	___lambda9_ ((BudgieSessionHandler*) self);
}

static void
budgie_session_handler_on_dialog_get (BudgieSessionHandler* self,
                                      GObject* o,
                                      GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	{
		BudgieEndSessionDialog* _tmp0_ = NULL;
		BudgieEndSessionDialog* _tmp1_;
		BudgieEndSessionDialog* _tmp2_;
		BudgieEndSessionDialog* _tmp3_;
		BudgieEndSessionDialog* _tmp4_;
		BudgieEndSessionDialog* _tmp5_;
		BudgieEndSessionDialog* _tmp6_;
		BudgieEndSessionDialog* _tmp7_;
		BudgieEndSessionDialog* _tmp8_;
		_tmp1_ = g_async_result_get_source_object (res);
		_tmp2_ = (BudgieEndSessionDialog*) g_async_initable_new_finish ((GAsyncInitable *) _tmp1_, res, &_inner_error0_);
		g_object_unref (_tmp1_);
		_tmp0_ = (BudgieEndSessionDialog*) _tmp2_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp3_ = _tmp0_;
		_tmp0_ = NULL;
		_g_object_unref0 (self->priv->proxy);
		self->priv->proxy = _tmp3_;
		_tmp4_ = self->priv->proxy;
		g_signal_connect_object (_tmp4_, "confirmed-logout", (GCallback) ____lambda5__budgie_end_session_dialog_confirmed_logout, self, 0);
		_tmp5_ = self->priv->proxy;
		g_signal_connect_object (_tmp5_, "confirmed-reboot", (GCallback) ____lambda6__budgie_end_session_dialog_confirmed_reboot, self, 0);
		_tmp6_ = self->priv->proxy;
		g_signal_connect_object (_tmp6_, "confirmed-shutdown", (GCallback) ____lambda7__budgie_end_session_dialog_confirmed_shutdown, self, 0);
		_tmp7_ = self->priv->proxy;
		g_signal_connect_object (_tmp7_, "canceled", (GCallback) ____lambda8__budgie_end_session_dialog_canceled, self, 0);
		_tmp8_ = self->priv->proxy;
		g_signal_connect_object (_tmp8_, "closed", (GCallback) ____lambda9__budgie_end_session_dialog_closed, self, 0);
		_g_object_unref0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		_g_object_unref0 (self->priv->proxy);
		self->priv->proxy = NULL;
	}
	__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
_budgie_session_handler_on_dialog_get_gasync_ready_callback (GObject* source_object,
                                                             GAsyncResult* res,
                                                             gpointer self)
{
	budgie_session_handler_on_dialog_get ((BudgieSessionHandler*) self, source_object, res);
	g_object_unref (self);
}

static void
budgie_session_handler_has_dialog (BudgieSessionHandler* self)
{
	BudgieEndSessionDialog* _tmp0_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->proxy;
	if (_tmp0_ != NULL) {
		return;
	}
	g_async_initable_new_async (BUDGIE_TYPE_END_SESSION_DIALOG_PROXY, 0, NULL, _budgie_session_handler_on_dialog_get_gasync_ready_callback, g_object_ref (self), "g-flags", 0, "g-name", "org.budgie_desktop.Session.EndSessionDialog", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/budgie_desktop/Session/EndSessionDialog", "g-interface-name", "org.budgie_desktop.Session.EndSessionDialog", NULL);
}

static void
budgie_session_handler_lost_dialog (BudgieSessionHandler* self)
{
	g_return_if_fail (self != NULL);
	_g_object_unref0 (self->priv->proxy);
	self->priv->proxy = NULL;
}

void
budgie_session_handler_Open (BudgieSessionHandler* self,
                             guint type,
                             guint timestamp,
                             guint open_length,
                             char** inhibiters,
                             gint inhibiters_length1,
                             GError** error)
{
	BudgieEndSessionDialog* _tmp0_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->proxy;
	if (_tmp0_ == NULL) {
		return;
	}
	{
		BudgieEndSessionDialog* _tmp1_;
		_tmp1_ = self->priv->proxy;
		budgie_end_session_dialog_Open (_tmp1_, type, timestamp, open_length, inhibiters, (gint) inhibiters_length1, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp2_ = e;
		_tmp3_ = _tmp2_->message;
		g_message ("shim.vala:75: %s", _tmp3_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		if ((_inner_error0_->domain == G_DBUS_ERROR) || (_inner_error0_->domain == G_IO_ERROR)) {
			g_propagate_error (error, _inner_error0_);
			return;
		} else {
			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;
		}
	}
}

void
budgie_session_handler_Close (BudgieSessionHandler* self,
                              GError** error)
{
	BudgieEndSessionDialog* _tmp0_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->proxy;
	if (_tmp0_ == NULL) {
		{
			BudgieEndSessionDialog* _tmp1_;
			_tmp1_ = self->priv->proxy;
			budgie_end_session_dialog_Close (_tmp1_, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			GError* _tmp2_;
			const gchar* _tmp3_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp2_ = e;
			_tmp3_ = _tmp2_->message;
			g_message ("shim.vala:84: %s", _tmp3_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if ((_inner_error0_->domain == G_DBUS_ERROR) || (_inner_error0_->domain == G_IO_ERROR)) {
				g_propagate_error (error, _inner_error0_);
				return;
			} else {
				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
budgie_session_handler_class_init (BudgieSessionHandlerClass * klass,
                                   gpointer klass_data)
{
	budgie_session_handler_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BudgieSessionHandler_private_offset);
	G_OBJECT_CLASS (klass)->finalize = budgie_session_handler_finalize;
	budgie_session_handler_signals[BUDGIE_SESSION_HANDLER_CONFIRMED_LOGOUT_SIGNAL] = g_signal_new ("confirmed-logout", BUDGIE_TYPE_SESSION_HANDLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	budgie_session_handler_signals[BUDGIE_SESSION_HANDLER_CONFIRMED_REBOOT_SIGNAL] = g_signal_new ("confirmed-reboot", BUDGIE_TYPE_SESSION_HANDLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	budgie_session_handler_signals[BUDGIE_SESSION_HANDLER_CONFIRMED_SHUTDOWN_SIGNAL] = g_signal_new ("confirmed-shutdown", BUDGIE_TYPE_SESSION_HANDLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	budgie_session_handler_signals[BUDGIE_SESSION_HANDLER_CANCELED_SIGNAL] = g_signal_new ("canceled", BUDGIE_TYPE_SESSION_HANDLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	budgie_session_handler_signals[BUDGIE_SESSION_HANDLER_CLOSED_SIGNAL] = g_signal_new ("closed", BUDGIE_TYPE_SESSION_HANDLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
budgie_session_handler_instance_init (BudgieSessionHandler * self,
                                      gpointer klass)
{
	self->priv = budgie_session_handler_get_instance_private (self);
	self->priv->proxy = NULL;
}

static void
budgie_session_handler_finalize (GObject * obj)
{
	BudgieSessionHandler * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_SESSION_HANDLER, BudgieSessionHandler);
	_g_object_unref0 (self->priv->proxy);
	G_OBJECT_CLASS (budgie_session_handler_parent_class)->finalize (obj);
}

static GType
budgie_session_handler_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BudgieSessionHandlerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_session_handler_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieSessionHandler), 0, (GInstanceInitFunc) budgie_session_handler_instance_init, NULL };
	GType budgie_session_handler_type_id;
	budgie_session_handler_type_id = g_type_register_static (G_TYPE_OBJECT, "BudgieSessionHandler", &g_define_type_info, 0);
	g_type_set_qdata (budgie_session_handler_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) budgie_session_handler_register_object);
	BudgieSessionHandler_private_offset = g_type_add_instance_private (budgie_session_handler_type_id, sizeof (BudgieSessionHandlerPrivate));
	return budgie_session_handler_type_id;
}

GType
budgie_session_handler_get_type (void)
{
	static volatile gsize budgie_session_handler_type_id__once = 0;
	if (g_once_init_enter (&budgie_session_handler_type_id__once)) {
		GType budgie_session_handler_type_id;
		budgie_session_handler_type_id = budgie_session_handler_get_type_once ();
		g_once_init_leave (&budgie_session_handler_type_id__once, budgie_session_handler_type_id);
	}
	return budgie_session_handler_type_id__once;
}

static void
_dbus_budgie_session_handler_Open (BudgieSessionHandler* self,
                                   GVariant* _parameters_,
                                   GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	guint type = 0U;
	GVariant* _tmp0_;
	guint timestamp = 0U;
	GVariant* _tmp1_;
	guint open_length = 0U;
	GVariant* _tmp2_;
	char** inhibiters = NULL;
	gint inhibiters_length1 = 0;
	GVariant* _tmp3_;
	char** _tmp4_;
	gint _tmp4__length;
	gint _tmp4__size;
	gint _tmp4__length1;
	GVariantIter _tmp5_;
	GVariant* _tmp6_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp0_ = g_variant_iter_next_value (&_arguments_iter);
	type = g_variant_get_uint32 (_tmp0_);
	g_variant_unref (_tmp0_);
	_tmp1_ = g_variant_iter_next_value (&_arguments_iter);
	timestamp = g_variant_get_uint32 (_tmp1_);
	g_variant_unref (_tmp1_);
	_tmp2_ = g_variant_iter_next_value (&_arguments_iter);
	open_length = g_variant_get_uint32 (_tmp2_);
	g_variant_unref (_tmp2_);
	_tmp3_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp4_ = g_new (char*, 5);
	_tmp4__length = 0;
	_tmp4__size = 4;
	_tmp4__length1 = 0;
	g_variant_iter_init (&_tmp5_, _tmp3_);
	for (; (_tmp6_ = g_variant_iter_next_value (&_tmp5_)) != NULL; _tmp4__length1++) {
		if (_tmp4__size == _tmp4__length) {
			_tmp4__size = 2 * _tmp4__size;
			_tmp4_ = g_renew (char*, _tmp4_, _tmp4__size + 1);
		}
		_tmp4_[_tmp4__length++] = g_variant_dup_string (_tmp6_, NULL);
		g_variant_unref (_tmp6_);
	}
	inhibiters_length1 = _tmp4__length1;
	_tmp4_[_tmp4__length] = NULL;
	inhibiters = _tmp4_;
	g_variant_unref (_tmp3_);
	budgie_session_handler_Open (self, type, timestamp, open_length, inhibiters, inhibiters_length1, &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);
	_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:
	inhibiters = (_vala_array_free (inhibiters, inhibiters_length1, (GDestroyNotify) g_free), NULL);
	;
}

static void
_dbus_budgie_session_handler_Close (BudgieSessionHandler* self,
                                    GVariant* _parameters_,
                                    GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	budgie_session_handler_Close (self, &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
budgie_session_handler_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, "Open") == 0) {
		_dbus_budgie_session_handler_Open (object, parameters, invocation);
	} else if (strcmp (method_name, "Close") == 0) {
		_dbus_budgie_session_handler_Close (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
budgie_session_handler_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
budgie_session_handler_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;
}

static void
_dbus_budgie_session_handler_confirmed_logout (GObject* _sender,
                                               gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.SessionManager.EndSessionDialog", "ConfirmedLogout", _arguments, NULL);
}

static void
_dbus_budgie_session_handler_confirmed_reboot (GObject* _sender,
                                               gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.SessionManager.EndSessionDialog", "ConfirmedReboot", _arguments, NULL);
}

static void
_dbus_budgie_session_handler_confirmed_shutdown (GObject* _sender,
                                                 gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.SessionManager.EndSessionDialog", "ConfirmedShutdown", _arguments, NULL);
}

static void
_dbus_budgie_session_handler_canceled (GObject* _sender,
                                       gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.SessionManager.EndSessionDialog", "Canceled", _arguments, NULL);
}

static void
_dbus_budgie_session_handler_closed (GObject* _sender,
                                     gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.SessionManager.EndSessionDialog", "Closed", _arguments, NULL);
}

guint
budgie_session_handler_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 *) (&_budgie_session_handler_dbus_interface_info), &_budgie_session_handler_dbus_interface_vtable, data, _budgie_session_handler_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "confirmed-logout", (GCallback) _dbus_budgie_session_handler_confirmed_logout, data);
	g_signal_connect (object, "confirmed-reboot", (GCallback) _dbus_budgie_session_handler_confirmed_reboot, data);
	g_signal_connect (object, "confirmed-shutdown", (GCallback) _dbus_budgie_session_handler_confirmed_shutdown, data);
	g_signal_connect (object, "canceled", (GCallback) _dbus_budgie_session_handler_canceled, data);
	g_signal_connect (object, "closed", (GCallback) _dbus_budgie_session_handler_closed, data);
	return result;
}

static void
_budgie_session_handler_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_session_handler_confirmed_logout, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_session_handler_confirmed_reboot, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_session_handler_confirmed_shutdown, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_session_handler_canceled, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_session_handler_closed, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

void
budgie_end_session_dialog_Open (BudgieEndSessionDialog* self,
                                guint type,
                                guint timestamp,
                                guint open_length,
                                char** inhibiters,
                                gint inhibiters_length1,
                                GError** error)
{
	BudgieEndSessionDialogIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = BUDGIE_END_SESSION_DIALOG_GET_INTERFACE (self);
	if (_iface_->Open) {
		_iface_->Open (self, type, timestamp, open_length, inhibiters, inhibiters_length1, error);
	}
}

void
budgie_end_session_dialog_Close (BudgieEndSessionDialog* self,
                                 GError** error)
{
	BudgieEndSessionDialogIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = BUDGIE_END_SESSION_DIALOG_GET_INTERFACE (self);
	if (_iface_->Close) {
		_iface_->Close (self, error);
	}
}

static void
budgie_end_session_dialog_default_init (BudgieEndSessionDialogIface * iface,
                                        gpointer iface_data)
{
	budgie_end_session_dialog_signals[BUDGIE_END_SESSION_DIALOG_CONFIRMED_LOGOUT_SIGNAL] = g_signal_new ("confirmed-logout", BUDGIE_TYPE_END_SESSION_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	budgie_end_session_dialog_signals[BUDGIE_END_SESSION_DIALOG_CONFIRMED_REBOOT_SIGNAL] = g_signal_new ("confirmed-reboot", BUDGIE_TYPE_END_SESSION_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	budgie_end_session_dialog_signals[BUDGIE_END_SESSION_DIALOG_CONFIRMED_SHUTDOWN_SIGNAL] = g_signal_new ("confirmed-shutdown", BUDGIE_TYPE_END_SESSION_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	budgie_end_session_dialog_signals[BUDGIE_END_SESSION_DIALOG_CANCELED_SIGNAL] = g_signal_new ("canceled", BUDGIE_TYPE_END_SESSION_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	budgie_end_session_dialog_signals[BUDGIE_END_SESSION_DIALOG_CLOSED_SIGNAL] = g_signal_new ("closed", BUDGIE_TYPE_END_SESSION_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

/**
* Wrap the EndSessionDialog type inside Budgie itself
*/
static GType
budgie_end_session_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BudgieEndSessionDialogIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_end_session_dialog_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType budgie_end_session_dialog_type_id;
	budgie_end_session_dialog_type_id = g_type_register_static (G_TYPE_INTERFACE, "BudgieEndSessionDialog", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (budgie_end_session_dialog_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (budgie_end_session_dialog_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) budgie_end_session_dialog_proxy_get_type);
	g_type_set_qdata (budgie_end_session_dialog_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.budgie_desktop.Session.EndSessionDialog");
	g_type_set_qdata (budgie_end_session_dialog_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_budgie_end_session_dialog_dbus_interface_info));
	g_type_set_qdata (budgie_end_session_dialog_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) budgie_end_session_dialog_register_object);
	return budgie_end_session_dialog_type_id;
}

GType
budgie_end_session_dialog_get_type (void)
{
	static volatile gsize budgie_end_session_dialog_type_id__once = 0;
	if (g_once_init_enter (&budgie_end_session_dialog_type_id__once)) {
		GType budgie_end_session_dialog_type_id;
		budgie_end_session_dialog_type_id = budgie_end_session_dialog_get_type_once ();
		g_once_init_leave (&budgie_end_session_dialog_type_id__once, budgie_end_session_dialog_type_id);
	}
	return budgie_end_session_dialog_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (BudgieEndSessionDialogProxy, budgie_end_session_dialog_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (BUDGIE_TYPE_END_SESSION_DIALOG, budgie_end_session_dialog_proxy_budgie_end_session_dialog_interface_init) )
static void
budgie_end_session_dialog_proxy_class_init (BudgieEndSessionDialogProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = budgie_end_session_dialog_proxy_g_signal;
}

static void
_dbus_handle_budgie_end_session_dialog_confirmed_logout (BudgieEndSessionDialog* self,
                                                         GVariant* parameters)
{
	GVariantIter _arguments_iter;
	g_variant_iter_init (&_arguments_iter, parameters);
	g_signal_emit_by_name (self, "confirmed-logout");
}

static void
_dbus_handle_budgie_end_session_dialog_confirmed_reboot (BudgieEndSessionDialog* self,
                                                         GVariant* parameters)
{
	GVariantIter _arguments_iter;
	g_variant_iter_init (&_arguments_iter, parameters);
	g_signal_emit_by_name (self, "confirmed-reboot");
}

static void
_dbus_handle_budgie_end_session_dialog_confirmed_shutdown (BudgieEndSessionDialog* self,
                                                           GVariant* parameters)
{
	GVariantIter _arguments_iter;
	g_variant_iter_init (&_arguments_iter, parameters);
	g_signal_emit_by_name (self, "confirmed-shutdown");
}

static void
_dbus_handle_budgie_end_session_dialog_canceled (BudgieEndSessionDialog* self,
                                                 GVariant* parameters)
{
	GVariantIter _arguments_iter;
	g_variant_iter_init (&_arguments_iter, parameters);
	g_signal_emit_by_name (self, "canceled");
}

static void
_dbus_handle_budgie_end_session_dialog_closed (BudgieEndSessionDialog* self,
                                               GVariant* parameters)
{
	GVariantIter _arguments_iter;
	g_variant_iter_init (&_arguments_iter, parameters);
	g_signal_emit_by_name (self, "closed");
}

static void
budgie_end_session_dialog_proxy_g_signal (GDBusProxy* proxy,
                                          const gchar* sender_name,
                                          const gchar* signal_name,
                                          GVariant* parameters)
{
	if (strcmp (signal_name, "ConfirmedLogout") == 0) {
		_dbus_handle_budgie_end_session_dialog_confirmed_logout ((BudgieEndSessionDialog*) proxy, parameters);
	} else if (strcmp (signal_name, "ConfirmedReboot") == 0) {
		_dbus_handle_budgie_end_session_dialog_confirmed_reboot ((BudgieEndSessionDialog*) proxy, parameters);
	} else if (strcmp (signal_name, "ConfirmedShutdown") == 0) {
		_dbus_handle_budgie_end_session_dialog_confirmed_shutdown ((BudgieEndSessionDialog*) proxy, parameters);
	} else if (strcmp (signal_name, "Canceled") == 0) {
		_dbus_handle_budgie_end_session_dialog_canceled ((BudgieEndSessionDialog*) proxy, parameters);
	} else if (strcmp (signal_name, "Closed") == 0) {
		_dbus_handle_budgie_end_session_dialog_closed ((BudgieEndSessionDialog*) proxy, parameters);
	}
}

static void
budgie_end_session_dialog_proxy_init (BudgieEndSessionDialogProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_budgie_end_session_dialog_dbus_interface_info));
}

static void
budgie_end_session_dialog_proxy_Open (BudgieEndSessionDialog* self,
                                      guint type,
                                      guint timestamp,
                                      guint open_length,
                                      char** inhibiters,
                                      gint inhibiters_length1,
                                      GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	char** _tmp7_;
	GVariantBuilder _tmp8_;
	gint _tmp9_;
	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.budgie_desktop.Session.EndSessionDialog", "Open");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (type));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (timestamp));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (open_length));
	_tmp7_ = inhibiters;
	g_variant_builder_init (&_tmp8_, G_VARIANT_TYPE ("ao"));
	for (_tmp9_ = 0; _tmp9_ < inhibiters_length1; _tmp9_++) {
		g_variant_builder_add_value (&_tmp8_, g_variant_new_object_path (*_tmp7_));
		_tmp7_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp8_));
	_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
budgie_end_session_dialog_proxy_Close (BudgieEndSessionDialog* self,
                                       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.budgie_desktop.Session.EndSessionDialog", "Close");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_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
budgie_end_session_dialog_proxy_budgie_end_session_dialog_interface_init (BudgieEndSessionDialogIface* iface)
{
	iface->Open = budgie_end_session_dialog_proxy_Open;
	iface->Close = budgie_end_session_dialog_proxy_Close;
}

static void
_dbus_budgie_end_session_dialog_Open (BudgieEndSessionDialog* self,
                                      GVariant* _parameters_,
                                      GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	guint type = 0U;
	GVariant* _tmp10_;
	guint timestamp = 0U;
	GVariant* _tmp11_;
	guint open_length = 0U;
	GVariant* _tmp12_;
	char** inhibiters = NULL;
	gint inhibiters_length1 = 0;
	GVariant* _tmp13_;
	char** _tmp14_;
	gint _tmp14__length;
	gint _tmp14__size;
	gint _tmp14__length1;
	GVariantIter _tmp15_;
	GVariant* _tmp16_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp10_ = g_variant_iter_next_value (&_arguments_iter);
	type = g_variant_get_uint32 (_tmp10_);
	g_variant_unref (_tmp10_);
	_tmp11_ = g_variant_iter_next_value (&_arguments_iter);
	timestamp = g_variant_get_uint32 (_tmp11_);
	g_variant_unref (_tmp11_);
	_tmp12_ = g_variant_iter_next_value (&_arguments_iter);
	open_length = g_variant_get_uint32 (_tmp12_);
	g_variant_unref (_tmp12_);
	_tmp13_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp14_ = g_new (char*, 5);
	_tmp14__length = 0;
	_tmp14__size = 4;
	_tmp14__length1 = 0;
	g_variant_iter_init (&_tmp15_, _tmp13_);
	for (; (_tmp16_ = g_variant_iter_next_value (&_tmp15_)) != NULL; _tmp14__length1++) {
		if (_tmp14__size == _tmp14__length) {
			_tmp14__size = 2 * _tmp14__size;
			_tmp14_ = g_renew (char*, _tmp14_, _tmp14__size + 1);
		}
		_tmp14_[_tmp14__length++] = g_variant_dup_string (_tmp16_, NULL);
		g_variant_unref (_tmp16_);
	}
	inhibiters_length1 = _tmp14__length1;
	_tmp14_[_tmp14__length] = NULL;
	inhibiters = _tmp14_;
	g_variant_unref (_tmp13_);
	budgie_end_session_dialog_Open (self, type, timestamp, open_length, inhibiters, inhibiters_length1, &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);
	_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:
	inhibiters = (_vala_array_free (inhibiters, inhibiters_length1, (GDestroyNotify) g_free), NULL);
	;
}

static void
_dbus_budgie_end_session_dialog_Close (BudgieEndSessionDialog* self,
                                       GVariant* _parameters_,
                                       GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	budgie_end_session_dialog_Close (self, &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
budgie_end_session_dialog_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, "Open") == 0) {
		_dbus_budgie_end_session_dialog_Open (object, parameters, invocation);
	} else if (strcmp (method_name, "Close") == 0) {
		_dbus_budgie_end_session_dialog_Close (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
budgie_end_session_dialog_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
budgie_end_session_dialog_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;
}

static void
_dbus_budgie_end_session_dialog_confirmed_logout (GObject* _sender,
                                                  gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.budgie_desktop.Session.EndSessionDialog", "ConfirmedLogout", _arguments, NULL);
}

static void
_dbus_budgie_end_session_dialog_confirmed_reboot (GObject* _sender,
                                                  gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.budgie_desktop.Session.EndSessionDialog", "ConfirmedReboot", _arguments, NULL);
}

static void
_dbus_budgie_end_session_dialog_confirmed_shutdown (GObject* _sender,
                                                    gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.budgie_desktop.Session.EndSessionDialog", "ConfirmedShutdown", _arguments, NULL);
}

static void
_dbus_budgie_end_session_dialog_canceled (GObject* _sender,
                                          gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.budgie_desktop.Session.EndSessionDialog", "Canceled", _arguments, NULL);
}

static void
_dbus_budgie_end_session_dialog_closed (GObject* _sender,
                                        gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.budgie_desktop.Session.EndSessionDialog", "Closed", _arguments, NULL);
}

guint
budgie_end_session_dialog_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 *) (&_budgie_end_session_dialog_dbus_interface_info), &_budgie_end_session_dialog_dbus_interface_vtable, data, _budgie_end_session_dialog_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "confirmed-logout", (GCallback) _dbus_budgie_end_session_dialog_confirmed_logout, data);
	g_signal_connect (object, "confirmed-reboot", (GCallback) _dbus_budgie_end_session_dialog_confirmed_reboot, data);
	g_signal_connect (object, "confirmed-shutdown", (GCallback) _dbus_budgie_end_session_dialog_confirmed_shutdown, data);
	g_signal_connect (object, "canceled", (GCallback) _dbus_budgie_end_session_dialog_canceled, data);
	g_signal_connect (object, "closed", (GCallback) _dbus_budgie_end_session_dialog_closed, data);
	return result;
}

static void
_budgie_end_session_dialog_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_end_session_dialog_confirmed_logout, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_end_session_dialog_confirmed_reboot, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_end_session_dialog_confirmed_shutdown, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_end_session_dialog_canceled, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_end_session_dialog_closed, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

void
budgie_budgie_osd_ShowOSD (BudgieBudgieOSD* self,
                           GHashTable* params,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_)
{
	BudgieBudgieOSDIface* _iface_;
	_iface_ = BUDGIE_BUDGIE_OSD_GET_INTERFACE (self);
	if (_iface_->ShowOSD) {
		_iface_->ShowOSD (self, params, _callback_, _user_data_);
	}
}

void
budgie_budgie_osd_ShowOSD_finish (BudgieBudgieOSD* self,
                                  GAsyncResult* _res_,
                                  GError** error)
{
	BudgieBudgieOSDIface* _iface_;
	_iface_ = BUDGIE_BUDGIE_OSD_GET_INTERFACE (self);
	if (_iface_->ShowOSD_finish) {
		_iface_->ShowOSD_finish (self, _res_, error);
	}
}

static void
budgie_budgie_osd_default_init (BudgieBudgieOSDIface * iface,
                                gpointer iface_data)
{
}

/**
* Expose the BudgieOSD functionality for proxying of the Shell OSD Functionality
*/
static GType
budgie_budgie_osd_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BudgieBudgieOSDIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_budgie_osd_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType budgie_budgie_osd_type_id;
	budgie_budgie_osd_type_id = g_type_register_static (G_TYPE_INTERFACE, "BudgieBudgieOSD", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (budgie_budgie_osd_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (budgie_budgie_osd_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) budgie_budgie_osd_proxy_get_type);
	g_type_set_qdata (budgie_budgie_osd_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.budgie_desktop.BudgieOSD");
	g_type_set_qdata (budgie_budgie_osd_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_budgie_budgie_osd_dbus_interface_info));
	g_type_set_qdata (budgie_budgie_osd_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) budgie_budgie_osd_register_object);
	return budgie_budgie_osd_type_id;
}

GType
budgie_budgie_osd_get_type (void)
{
	static volatile gsize budgie_budgie_osd_type_id__once = 0;
	if (g_once_init_enter (&budgie_budgie_osd_type_id__once)) {
		GType budgie_budgie_osd_type_id;
		budgie_budgie_osd_type_id = budgie_budgie_osd_get_type_once ();
		g_once_init_leave (&budgie_budgie_osd_type_id__once, budgie_budgie_osd_type_id);
	}
	return budgie_budgie_osd_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (BudgieBudgieOSDProxy, budgie_budgie_osd_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (BUDGIE_TYPE_BUDGIE_OSD, budgie_budgie_osd_proxy_budgie_budgie_osd_interface_init) )
static void
budgie_budgie_osd_proxy_class_init (BudgieBudgieOSDProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = budgie_budgie_osd_proxy_g_signal;
}

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

static void
budgie_budgie_osd_proxy_init (BudgieBudgieOSDProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_budgie_budgie_osd_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
budgie_budgie_osd_proxy_ShowOSD_async (BudgieBudgieOSD* self,
                                       GHashTable* params,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp17_;
	GHashTableIter _tmp18_;
	gpointer _tmp19_;
	gpointer _tmp20_;
	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.budgie_desktop.BudgieOSD", "ShowOSD");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_hash_table_iter_init (&_tmp18_, params);
	g_variant_builder_init (&_tmp17_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp18_, &_tmp19_, &_tmp20_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp19_;
		_value = (GVariant*) _tmp20_;
		g_variant_builder_add (&_tmp17_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp17_));
	_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 void
budgie_budgie_osd_proxy_ShowOSD_finish (BudgieBudgieOSD* self,
                                        GAsyncResult* _res_,
                                        GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_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) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
budgie_budgie_osd_proxy_budgie_budgie_osd_interface_init (BudgieBudgieOSDIface* iface)
{
	iface->ShowOSD = budgie_budgie_osd_proxy_ShowOSD_async;
	iface->ShowOSD_finish = budgie_budgie_osd_proxy_ShowOSD_finish;
}

static void
_dbus_budgie_budgie_osd_ShowOSD (BudgieBudgieOSD* self,
                                 GVariant* _parameters_,
                                 GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	budgie_budgie_osd_ShowOSDReadyData* _ready_data;
	GVariant* _tmp21_;
	GHashTable* _tmp22_;
	GVariantIter _tmp23_;
	GVariant* _tmp24_;
	GVariant* _tmp25_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (budgie_budgie_osd_ShowOSDReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp21_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp22_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp23_, _tmp21_);
	while (g_variant_iter_loop (&_tmp23_, "{?*}", &_tmp24_, &_tmp25_)) {
		g_hash_table_insert (_tmp22_, g_variant_dup_string (_tmp24_, NULL), g_variant_get_variant (_tmp25_));
	}
	_ready_data->params = _tmp22_;
	g_variant_unref (_tmp21_);
	budgie_budgie_osd_ShowOSD (self, _ready_data->params, (GAsyncReadyCallback) _dbus_budgie_budgie_osd_ShowOSD_ready, _ready_data);
	_error:
	;
}

static void
_dbus_budgie_budgie_osd_ShowOSD_ready (GObject * source_object,
                                       GAsyncResult * _res_,
                                       gpointer _user_data_)
{
	budgie_budgie_osd_ShowOSDReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	budgie_budgie_osd_ShowOSD_finish ((BudgieBudgieOSD*) 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);
	_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_hash_table_unref0 (_ready_data->params);
	g_slice_free (budgie_budgie_osd_ShowOSDReadyData, _ready_data);
}

static void
budgie_budgie_osd_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, "ShowOSD") == 0) {
		_dbus_budgie_budgie_osd_ShowOSD (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
budgie_budgie_osd_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
budgie_budgie_osd_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
budgie_budgie_osd_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 *) (&_budgie_budgie_osd_dbus_interface_info), &_budgie_budgie_osd_dbus_interface_vtable, data, _budgie_budgie_osd_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_budgie_budgie_osd_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
budgie_shell_shim_get_instance_private (BudgieShellShim* self)
{
	return G_STRUCT_MEMBER_P (self, BudgieShellShim_private_offset);
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static void
_budgie_shell_shim_on_accelerator_activated_meta_display_accelerator_activated (MetaDisplay* _sender,
                                                                                guint object,
                                                                                ClutterInputDevice* p0,
                                                                                guint p1,
                                                                                gpointer self)
{
	budgie_shell_shim_on_accelerator_activated ((BudgieShellShim*) self, object, p0, p1);
}

static void
_budgie_shell_shim_has_osd_proxy_gbus_name_appeared_callback (GDBusConnection* connection,
                                                              const gchar* name,
                                                              const gchar* name_owner,
                                                              gpointer self)
{
	budgie_shell_shim_has_osd_proxy ((BudgieShellShim*) self);
}

static void
_budgie_shell_shim_lost_osd_proxy_gbus_name_vanished_callback (GDBusConnection* connection,
                                                               const gchar* name,
                                                               gpointer self)
{
	budgie_shell_shim_lost_osd_proxy ((BudgieShellShim*) self);
}

BudgieShellShim*
budgie_shell_shim_construct (GType object_type,
                             BudgieBudgieWM* wm)
{
	BudgieShellShim * self = NULL;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	MetaDisplay* _tmp3_;
	MetaDisplay* _tmp4_;
	BudgieSessionHandler* _tmp5_;
	self = (BudgieShellShim*) g_object_new (object_type, NULL);
	_tmp0_ = g_str_hash;
	_tmp1_ = g_str_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_free0_);
	_g_hash_table_unref0 (self->priv->grabs);
	self->priv->grabs = _tmp2_;
	_tmp3_ = meta_plugin_get_display ((MetaPlugin*) wm);
	self->priv->display = _tmp3_;
	_tmp4_ = self->priv->display;
	g_signal_connect_object (_tmp4_, "accelerator-activated", (GCallback) _budgie_shell_shim_on_accelerator_activated_meta_display_accelerator_activated, self, 0);
	_tmp5_ = budgie_session_handler_new ();
	_g_object_unref0 (self->priv->handler);
	self->priv->handler = _tmp5_;
	g_bus_watch_name_with_closures (G_BUS_TYPE_SESSION, "org.budgie_desktop.BudgieOSD", G_BUS_NAME_WATCHER_FLAGS_NONE, (GClosure*) ((_budgie_shell_shim_has_osd_proxy_gbus_name_appeared_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _budgie_shell_shim_has_osd_proxy_gbus_name_appeared_callback, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((_budgie_shell_shim_lost_osd_proxy_gbus_name_vanished_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _budgie_shell_shim_lost_osd_proxy_gbus_name_vanished_callback, g_object_ref (self), (GClosureNotify) g_object_unref)));
	return self;
}

BudgieShellShim*
budgie_shell_shim_new (BudgieBudgieWM* wm)
{
	return budgie_shell_shim_construct (BUDGIE_TYPE_SHELL_SHIM, wm);
}

/**
* BudgieOSD known to be present, now try to get the proxy
*/
static void
budgie_shell_shim_on_osd_proxy_get (BudgieShellShim* self,
                                    GObject* o,
                                    GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	{
		BudgieBudgieOSD* _tmp0_ = NULL;
		BudgieBudgieOSD* _tmp1_;
		BudgieBudgieOSD* _tmp2_;
		BudgieBudgieOSD* _tmp3_;
		_tmp1_ = g_async_result_get_source_object (res);
		_tmp2_ = (BudgieBudgieOSD*) g_async_initable_new_finish ((GAsyncInitable *) _tmp1_, res, &_inner_error0_);
		g_object_unref (_tmp1_);
		_tmp0_ = (BudgieBudgieOSD*) _tmp2_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp3_ = _tmp0_;
		_tmp0_ = NULL;
		_g_object_unref0 (self->priv->osd_proxy);
		self->priv->osd_proxy = _tmp3_;
		_g_object_unref0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		_g_object_unref0 (self->priv->osd_proxy);
		self->priv->osd_proxy = NULL;
	}
	__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;
	}
}

/**
* BudgieOSD appeared, schedule a proxy-get
*/
static void
_budgie_shell_shim_on_osd_proxy_get_gasync_ready_callback (GObject* source_object,
                                                           GAsyncResult* res,
                                                           gpointer self)
{
	budgie_shell_shim_on_osd_proxy_get ((BudgieShellShim*) self, source_object, res);
	g_object_unref (self);
}

static void
budgie_shell_shim_has_osd_proxy (BudgieShellShim* self)
{
	BudgieBudgieOSD* _tmp0_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->osd_proxy;
	if (_tmp0_ != NULL) {
		return;
	}
	g_async_initable_new_async (BUDGIE_TYPE_BUDGIE_OSD_PROXY, 0, NULL, _budgie_shell_shim_on_osd_proxy_get_gasync_ready_callback, g_object_ref (self), "g-flags", 0, "g-name", "org.budgie_desktop.BudgieOSD", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/budgie_desktop/BudgieOSD", "g-interface-name", "org.budgie_desktop.BudgieOSD", NULL);
}

/**
* BudgieOSD disappeared, drop the reference
*/
static void
budgie_shell_shim_lost_osd_proxy (BudgieShellShim* self)
{
	g_return_if_fail (self != NULL);
	_g_object_unref0 (self->priv->osd_proxy);
	self->priv->osd_proxy = NULL;
}

static gboolean
_uint_equal (const guint * s1,
             const guint * s2)
{
	if (s1 == s2) {
		return TRUE;
	}
	if (s1 == NULL) {
		return FALSE;
	}
	if (s2 == NULL) {
		return FALSE;
	}
	return (*s1) == (*s2);
}

static void
_g_variant_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_variant_unref (var), NULL));
}

static void
budgie_shell_shim_on_accelerator_activated (BudgieShellShim* self,
                                            guint action,
                                            ClutterInputDevice* dev,
                                            guint timestamp)
{
	GHashTable* _tmp0_;
	GList* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (dev != NULL);
	_tmp0_ = self->priv->grabs;
	_tmp1_ = g_hash_table_get_keys (_tmp0_);
	{
		GList* accelerator_collection = NULL;
		GList* accelerator_it = NULL;
		accelerator_collection = _tmp1_;
		for (accelerator_it = accelerator_collection; accelerator_it != NULL; accelerator_it = accelerator_it->next) {
			gchar* _tmp2_;
			gchar* accelerator = NULL;
			_tmp2_ = g_strdup ((const gchar*) accelerator_it->data);
			accelerator = _tmp2_;
			{
				GHashTable* _tmp3_;
				const gchar* _tmp4_;
				gconstpointer _tmp5_;
				_tmp3_ = self->priv->grabs;
				_tmp4_ = accelerator;
				_tmp5_ = g_hash_table_lookup (_tmp3_, _tmp4_);
				if (_uint_equal ((guint*) _tmp5_, &action) == TRUE) {
					GHashTable* params = NULL;
					GHashTable* _tmp6_;
					GHashTable* _tmp7_;
					gchar* _tmp8_;
					const gchar* _tmp9_;
					GVariant* _tmp10_;
					GHashTable* _tmp11_;
					gchar* _tmp12_;
					GVariant* _tmp13_;
					GHashTable* _tmp14_;
					gchar* _tmp15_;
					const gchar* _tmp16_;
					GVariant* _tmp17_;
					GHashTable* _tmp18_;
					gchar* _tmp19_;
					GVariant* _tmp20_;
					GHashTable* _tmp21_;
					_tmp6_ = g_hash_table_new_full (NULL, NULL, _g_free0_, _g_variant_unref0_);
					params = _tmp6_;
					_tmp7_ = params;
					_tmp8_ = g_strdup ("device-name");
					_tmp9_ = clutter_input_device_get_device_name (dev);
					_tmp10_ = g_variant_new_string (_tmp9_);
					g_variant_ref_sink (_tmp10_);
					g_hash_table_insert (_tmp7_, _tmp8_, _tmp10_);
					_tmp11_ = params;
					_tmp12_ = g_strdup ("action-mode");
					_tmp13_ = g_variant_new_uint32 ((guint32) action);
					g_variant_ref_sink (_tmp13_);
					g_hash_table_insert (_tmp11_, _tmp12_, _tmp13_);
					_tmp14_ = params;
					_tmp15_ = g_strdup ("device-mode");
					_tmp16_ = clutter_input_device_get_device_node (dev);
					_tmp17_ = g_variant_new_string (_tmp16_);
					g_variant_ref_sink (_tmp17_);
					g_hash_table_insert (_tmp14_, _tmp15_, _tmp17_);
					_tmp18_ = params;
					_tmp19_ = g_strdup ("timestamp");
					_tmp20_ = g_variant_new_uint32 ((guint32) timestamp);
					g_variant_ref_sink (_tmp20_);
					g_hash_table_insert (_tmp18_, _tmp19_, _tmp20_);
					_tmp21_ = params;
					g_signal_emit (self, budgie_shell_shim_signals[BUDGIE_SHELL_SHIM_ACCELERATOR_ACTIVATED_SIGNAL], 0, action, _tmp21_);
					_g_hash_table_unref0 (params);
				}
				_g_free0 (accelerator);
			}
		}
		(accelerator_collection == NULL) ? NULL : (accelerator_collection = (g_list_free (accelerator_collection), NULL));
	}
}

static guint*
_uint_dup (guint* self)
{
	guint* dup;
	dup = g_new0 (guint, 1);
	memcpy (dup, self, sizeof (guint));
	return dup;
}

static gpointer
__uint_dup0 (gpointer self)
{
	return self ? _uint_dup (self) : NULL;
}

guint
budgie_shell_shim_grab_accelerator (BudgieShellShim* self,
                                    const gchar* accelerator,
                                    MetaKeyBindingFlags flags,
                                    GError** error)
{
	guint* action = NULL;
	GHashTable* _tmp0_;
	gconstpointer _tmp1_;
	guint* _tmp2_;
	guint* _tmp3_;
	guint* _tmp12_;
	guint _tmp13_;
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	g_return_val_if_fail (accelerator != NULL, 0U);
	_tmp0_ = self->priv->grabs;
	_tmp1_ = g_hash_table_lookup (_tmp0_, accelerator);
	_tmp2_ = __uint_dup0 ((guint*) _tmp1_);
	action = _tmp2_;
	_tmp3_ = action;
	if (_tmp3_ == NULL) {
		MetaDisplay* _tmp4_;
		guint _tmp5_;
		guint* _tmp6_;
		guint* _tmp7_;
		_tmp4_ = self->priv->display;
		_tmp5_ = meta_display_grab_accelerator (_tmp4_, accelerator, flags);
		_tmp6_ = __uint_dup0 (&_tmp5_);
		_g_free0 (action);
		action = _tmp6_;
		_tmp7_ = action;
		if ((*_tmp7_) > ((guint) 0)) {
			GHashTable* _tmp8_;
			gchar* _tmp9_;
			guint* _tmp10_;
			guint* _tmp11_;
			_tmp8_ = self->priv->grabs;
			_tmp9_ = g_strdup (accelerator);
			_tmp10_ = action;
			_tmp11_ = __uint_dup0 (_tmp10_);
			g_hash_table_insert (_tmp8_, _tmp9_, _tmp11_);
		}
	}
	_tmp12_ = action;
	_tmp13_ = *_tmp12_;
	_g_free0 (_tmp12_);
	result = _tmp13_;
	return result;
}

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

guint*
budgie_shell_shim_grab_accelerators (BudgieShellShim* self,
                                     BudgieGsdAccel* accelerators,
                                     gint accelerators_length1,
                                     gint* result_length1,
                                     GError** error)
{
	guint* actions = NULL;
	guint* _tmp0_;
	gint actions_length1;
	gint _actions_size_;
	guint* _tmp5_;
	gint _tmp5__length1;
	GError* _inner_error0_ = NULL;
	guint* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_new0 (guint, 0);
	actions = _tmp0_;
	actions_length1 = 0;
	_actions_size_ = actions_length1;
	{
		BudgieGsdAccel* accelerator_collection = NULL;
		gint accelerator_collection_length1 = 0;
		gint _accelerator_collection_size_ = 0;
		gint accelerator_it = 0;
		accelerator_collection = accelerators;
		accelerator_collection_length1 = accelerators_length1;
		for (accelerator_it = 0; accelerator_it < accelerator_collection_length1; accelerator_it = accelerator_it + 1) {
			BudgieGsdAccel* accelerator = NULL;
			accelerator = &accelerator_collection[accelerator_it];
			{
				guint _tmp1_ = 0U;
				BudgieGsdAccel* _tmp2_;
				const gchar* _tmp3_;
				BudgieGsdAccel* _tmp4_;
				_tmp2_ = accelerator;
				_tmp3_ = (*_tmp2_).accelerator;
				_tmp4_ = accelerator;
				_tmp1_ = budgie_shell_shim_grab_accelerator (self, _tmp3_, (*_tmp4_).grab_flags, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					if ((_inner_error0_->domain == G_DBUS_ERROR) || (_inner_error0_->domain == G_IO_ERROR)) {
						g_propagate_error (error, _inner_error0_);
						actions = (g_free (actions), NULL);
						return NULL;
					} else {
						actions = (g_free (actions), 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 NULL;
					}
				}
				_vala_array_add3 (&actions, &actions_length1, &_actions_size_, _tmp1_);
			}
		}
	}
	_tmp5_ = actions;
	_tmp5__length1 = actions_length1;
	if (result_length1) {
		*result_length1 = _tmp5__length1;
	}
	result = _tmp5_;
	return result;
}

gboolean
budgie_shell_shim_ungrab_accelerator (BudgieShellShim* self,
                                      guint action,
                                      GError** error)
{
	gboolean ret = FALSE;
	GList* keys = NULL;
	GHashTable* _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	ret = FALSE;
	_tmp0_ = self->priv->grabs;
	_tmp1_ = g_hash_table_get_keys (_tmp0_);
	keys = _tmp1_;
	_tmp2_ = keys;
	{
		GList* accelerator_collection = NULL;
		GList* accelerator_it = NULL;
		accelerator_collection = _tmp2_;
		for (accelerator_it = accelerator_collection; accelerator_it != NULL; accelerator_it = accelerator_it->next) {
			const gchar* accelerator = NULL;
			accelerator = (const gchar*) accelerator_it->data;
			{
				GHashTable* _tmp3_;
				const gchar* _tmp4_;
				gconstpointer _tmp5_;
				_tmp3_ = self->priv->grabs;
				_tmp4_ = accelerator;
				_tmp5_ = g_hash_table_lookup (_tmp3_, _tmp4_);
				if (_uint_equal ((guint*) _tmp5_, &action) == TRUE) {
					MetaDisplay* _tmp6_;
					GHashTable* _tmp7_;
					const gchar* _tmp8_;
					_tmp6_ = self->priv->display;
					ret = meta_display_ungrab_accelerator (_tmp6_, action);
					_tmp7_ = self->priv->grabs;
					_tmp8_ = accelerator;
					g_hash_table_remove (_tmp7_, _tmp8_);
					break;
				}
			}
		}
	}
	result = ret;
	(keys == NULL) ? NULL : (keys = (g_list_free (keys), NULL));
	return result;
}

static void
budgie_shell_shim_on_bus_acquired (BudgieShellShim* self,
                                   GDBusConnection* conn)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (conn != NULL);
	{
		BudgieSessionHandler* _tmp0_;
		budgie_shell_shim_register_object (self, conn, "/org/gnome/Shell", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp0_ = self->priv->handler;
		budgie_session_handler_register_object (_tmp0_, conn, "/org/gnome/SessionManager/EndSessionDialog", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_message ("shim.vala:229: Unable to register ShellShim: %s", _tmp2_);
		_g_error_free0 (e);
	}
	__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
_budgie_shell_shim_on_bus_acquired_gbus_acquired_callback (GDBusConnection* connection,
                                                           const gchar* name,
                                                           gpointer self)
{
	budgie_shell_shim_on_bus_acquired ((BudgieShellShim*) self, connection);
}

void
budgie_shell_shim_serve (BudgieShellShim* self)
{
	g_return_if_fail (self != NULL);
	g_bus_own_name_with_closures (G_BUS_TYPE_SESSION, "org.gnome.Shell", G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT | G_BUS_NAME_OWNER_FLAGS_REPLACE, (GClosure*) ((_budgie_shell_shim_on_bus_acquired_gbus_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _budgie_shell_shim_on_bus_acquired_gbus_acquired_callback, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
}

guint
budgie_shell_shim_GrabAccelerator (BudgieShellShim* self,
                                   const char* sender,
                                   const gchar* accelerator,
                                   guint flags,
                                   MetaKeyBindingFlags grab_flags,
                                   GError** error)
{
	guint _tmp0_ = 0U;
	GError* _inner_error0_ = NULL;
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	g_return_val_if_fail (sender != NULL, 0U);
	g_return_val_if_fail (accelerator != NULL, 0U);
	_tmp0_ = budgie_shell_shim_grab_accelerator (self, accelerator, grab_flags, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		if ((_inner_error0_->domain == G_DBUS_ERROR) || (_inner_error0_->domain == G_IO_ERROR)) {
			guint _tmp1_ = 0U;
			g_propagate_error (error, _inner_error0_);
			return _tmp1_;
		} else {
			guint _tmp2_ = 0U;
			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 _tmp2_;
		}
	}
	result = _tmp0_;
	return result;
}

guint*
budgie_shell_shim_GrabAccelerators (BudgieShellShim* self,
                                    const char* sender,
                                    BudgieGsdAccel* accelerators,
                                    gint accelerators_length1,
                                    gint* result_length1,
                                    GError** error)
{
	guint* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	guint* _tmp2_;
	gint _tmp0__length1;
	gint __tmp0__size_;
	guint* _tmp3_;
	gint _tmp3__length1;
	guint* _tmp4_;
	gint _tmp4__length1;
	GError* _inner_error0_ = NULL;
	guint* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (sender != NULL, NULL);
	_tmp2_ = budgie_shell_shim_grab_accelerators (self, accelerators, (gint) accelerators_length1, &_tmp1_, &_inner_error0_);
	_tmp0_ = _tmp2_;
	_tmp0__length1 = _tmp1_;
	__tmp0__size_ = _tmp0__length1;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		if ((_inner_error0_->domain == G_DBUS_ERROR) || (_inner_error0_->domain == G_IO_ERROR)) {
			g_propagate_error (error, _inner_error0_);
			return NULL;
		} else {
			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 NULL;
		}
	}
	_tmp3_ = _tmp0_;
	_tmp3__length1 = _tmp0__length1;
	_tmp0_ = NULL;
	_tmp0__length1 = 0;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = _tmp3__length1;
	if (result_length1) {
		*result_length1 = _tmp4__length1;
	}
	result = _tmp4_;
	_tmp0_ = (g_free (_tmp0_), NULL);
	return result;
}

gboolean
budgie_shell_shim_UngrabAccelerator (BudgieShellShim* self,
                                     const char* sender,
                                     guint action,
                                     GError** error)
{
	gboolean _tmp0_ = FALSE;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (sender != NULL, FALSE);
	_tmp0_ = budgie_shell_shim_ungrab_accelerator (self, action, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		if ((_inner_error0_->domain == G_DBUS_ERROR) || (_inner_error0_->domain == G_IO_ERROR)) {
			gboolean _tmp1_ = FALSE;
			g_propagate_error (error, _inner_error0_);
			return _tmp1_;
		} else {
			gboolean _tmp2_ = FALSE;
			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 _tmp2_;
		}
	}
	result = _tmp0_;
	return result;
}

gboolean
budgie_shell_shim_UngrabAccelerators (BudgieShellShim* self,
                                      const char* sender,
                                      guint* actions,
                                      gint actions_length1,
                                      GError** error)
{
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (sender != NULL, FALSE);
	{
		guint* action_collection = NULL;
		gint action_collection_length1 = 0;
		gint _action_collection_size_ = 0;
		gint action_it = 0;
		action_collection = actions;
		action_collection_length1 = actions_length1;
		for (action_it = 0; action_it < action_collection_length1; action_it = action_it + 1) {
			guint action = 0U;
			action = action_collection[action_it];
			{
				budgie_shell_shim_ungrab_accelerator (self, action, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					if ((_inner_error0_->domain == G_DBUS_ERROR) || (_inner_error0_->domain == G_IO_ERROR)) {
						gboolean _tmp0_ = FALSE;
						g_propagate_error (error, _inner_error0_);
						return _tmp0_;
					} else {
						gboolean _tmp1_ = FALSE;
						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 _tmp1_;
					}
				}
			}
		}
	}
	result = TRUE;
	return result;
}

/**
* Show the OSD when requested.
*/
void
budgie_shell_shim_ShowOSD (BudgieShellShim* self,
                           GHashTable* params,
                           GError** error)
{
	BudgieBudgieOSD* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (params != NULL);
	_tmp0_ = self->priv->osd_proxy;
	if (_tmp0_ != NULL) {
		BudgieBudgieOSD* _tmp1_;
		_tmp1_ = self->priv->osd_proxy;
		budgie_budgie_osd_ShowOSD (_tmp1_, params, NULL, NULL);
	}
}

static void
g_cclosure_user_marshal_VOID__UINT_BOXED (GClosure * closure,
                                          GValue * return_value,
                                          guint n_param_values,
                                          const GValue * param_values,
                                          gpointer invocation_hint,
                                          gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__UINT_BOXED) (gpointer data1, guint arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__UINT_BOXED callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__UINT_BOXED) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_uint (param_values + 1), g_value_get_boxed (param_values + 2), data2);
}

static void
budgie_shell_shim_class_init (BudgieShellShimClass * klass,
                              gpointer klass_data)
{
	budgie_shell_shim_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BudgieShellShim_private_offset);
	G_OBJECT_CLASS (klass)->finalize = budgie_shell_shim_finalize;
	budgie_shell_shim_signals[BUDGIE_SHELL_SHIM_ACCELERATOR_ACTIVATED_SIGNAL] = g_signal_new ("accelerator-activated", BUDGIE_TYPE_SHELL_SHIM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_BOXED, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_HASH_TABLE);
}

static void
budgie_shell_shim_instance_init (BudgieShellShim * self,
                                 gpointer klass)
{
	self->priv = budgie_shell_shim_get_instance_private (self);
	self->priv->handler = NULL;
	self->priv->osd_proxy = NULL;
}

static void
budgie_shell_shim_finalize (GObject * obj)
{
	BudgieShellShim * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_TYPE_SHELL_SHIM, BudgieShellShim);
	_g_hash_table_unref0 (self->priv->grabs);
	_g_object_unref0 (self->priv->handler);
	_g_object_unref0 (self->priv->osd_proxy);
	G_OBJECT_CLASS (budgie_shell_shim_parent_class)->finalize (obj);
}

static GType
budgie_shell_shim_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BudgieShellShimClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_shell_shim_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieShellShim), 0, (GInstanceInitFunc) budgie_shell_shim_instance_init, NULL };
	GType budgie_shell_shim_type_id;
	budgie_shell_shim_type_id = g_type_register_static (G_TYPE_OBJECT, "BudgieShellShim", &g_define_type_info, 0);
	g_type_set_qdata (budgie_shell_shim_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) budgie_shell_shim_register_object);
	BudgieShellShim_private_offset = g_type_add_instance_private (budgie_shell_shim_type_id, sizeof (BudgieShellShimPrivate));
	return budgie_shell_shim_type_id;
}

GType
budgie_shell_shim_get_type (void)
{
	static volatile gsize budgie_shell_shim_type_id__once = 0;
	if (g_once_init_enter (&budgie_shell_shim_type_id__once)) {
		GType budgie_shell_shim_type_id;
		budgie_shell_shim_type_id = budgie_shell_shim_get_type_once ();
		g_once_init_leave (&budgie_shell_shim_type_id__once, budgie_shell_shim_type_id);
	}
	return budgie_shell_shim_type_id__once;
}

static void
_dbus_budgie_shell_shim_grab_accelerator (BudgieShellShim* self,
                                          GVariant* _parameters_,
                                          GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* accelerator = NULL;
	GVariant* _tmp26_;
	MetaKeyBindingFlags flags = 0U;
	GVariant* _tmp27_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	guint result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp26_ = g_variant_iter_next_value (&_arguments_iter);
	accelerator = g_variant_dup_string (_tmp26_, NULL);
	g_variant_unref (_tmp26_);
	_tmp27_ = g_variant_iter_next_value (&_arguments_iter);
	flags = g_variant_get_uint32 (_tmp27_);
	g_variant_unref (_tmp27_);
	result = budgie_shell_shim_grab_accelerator (self, accelerator, flags, &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 (accelerator);
	;
}

static void
_vala_BudgieGsdAccel_array_free (BudgieGsdAccel * array,
                                 gssize array_length)
{
	if (array != NULL) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			budgie_gsd_accel_destroy (&array[i]);
		}
	}
	g_free (array);
}

static void
_dbus_budgie_shell_shim_grab_accelerators (BudgieShellShim* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	BudgieGsdAccel* accelerators = NULL;
	gint accelerators_length1 = 0;
	GVariant* _tmp28_;
	BudgieGsdAccel* _tmp29_;
	gint _tmp29__length;
	gint _tmp29__size;
	gint _tmp29__length1;
	GVariantIter _tmp30_;
	GVariant* _tmp31_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	guint* result;
	gint result_length1 = 0;
	guint* _tmp37_;
	GVariantBuilder _tmp38_;
	gint _tmp39_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp28_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp29_ = g_new (BudgieGsdAccel, 5);
	_tmp29__length = 0;
	_tmp29__size = 4;
	_tmp29__length1 = 0;
	g_variant_iter_init (&_tmp30_, _tmp28_);
	for (; (_tmp31_ = g_variant_iter_next_value (&_tmp30_)) != NULL; _tmp29__length1++) {
		BudgieGsdAccel _tmp32_;
		GVariantIter _tmp33_;
		GVariant* _tmp34_;
		GVariant* _tmp35_;
		GVariant* _tmp36_;
		if (_tmp29__size == _tmp29__length) {
			_tmp29__size = 2 * _tmp29__size;
			_tmp29_ = g_renew (BudgieGsdAccel, _tmp29_, _tmp29__size + 1);
		}
		g_variant_iter_init (&_tmp33_, _tmp31_);
		_tmp34_ = g_variant_iter_next_value (&_tmp33_);
		_tmp32_.accelerator = g_variant_dup_string (_tmp34_, NULL);
		g_variant_unref (_tmp34_);
		_tmp35_ = g_variant_iter_next_value (&_tmp33_);
		_tmp32_.flags = g_variant_get_uint32 (_tmp35_);
		g_variant_unref (_tmp35_);
		_tmp36_ = g_variant_iter_next_value (&_tmp33_);
		_tmp32_.grab_flags = g_variant_get_uint32 (_tmp36_);
		g_variant_unref (_tmp36_);
		_tmp29_[_tmp29__length++] = _tmp32_;
		g_variant_unref (_tmp31_);
	}
	accelerators_length1 = _tmp29__length1;
	accelerators = _tmp29_;
	g_variant_unref (_tmp28_);
	result = budgie_shell_shim_grab_accelerators (self, accelerators, accelerators_length1, &result_length1, &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);
	_tmp37_ = result;
	g_variant_builder_init (&_tmp38_, G_VARIANT_TYPE ("au"));
	for (_tmp39_ = 0; _tmp39_ < result_length1; _tmp39_++) {
		g_variant_builder_add_value (&_tmp38_, g_variant_new_uint32 (*_tmp37_));
		_tmp37_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp38_));
	result = (g_free (result), NULL);
	_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:
	accelerators = (_vala_BudgieGsdAccel_array_free (accelerators, accelerators_length1), NULL);
	;
}

static void
_dbus_budgie_shell_shim_ungrab_accelerator (BudgieShellShim* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	guint action = 0U;
	GVariant* _tmp40_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp40_ = g_variant_iter_next_value (&_arguments_iter);
	action = g_variant_get_uint32 (_tmp40_);
	g_variant_unref (_tmp40_);
	result = budgie_shell_shim_ungrab_accelerator (self, action, &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);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (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);
}

static void
_dbus_budgie_shell_shim_GrabAccelerator (BudgieShellShim* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* accelerator = NULL;
	GVariant* _tmp41_;
	guint flags = 0U;
	GVariant* _tmp42_;
	MetaKeyBindingFlags grab_flags = 0U;
	GVariant* _tmp43_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	guint result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp41_ = g_variant_iter_next_value (&_arguments_iter);
	accelerator = g_variant_dup_string (_tmp41_, NULL);
	g_variant_unref (_tmp41_);
	_tmp42_ = g_variant_iter_next_value (&_arguments_iter);
	flags = g_variant_get_uint32 (_tmp42_);
	g_variant_unref (_tmp42_);
	_tmp43_ = g_variant_iter_next_value (&_arguments_iter);
	grab_flags = g_variant_get_uint32 (_tmp43_);
	g_variant_unref (_tmp43_);
	result = budgie_shell_shim_GrabAccelerator (self, g_dbus_method_invocation_get_sender (invocation), accelerator, flags, grab_flags, &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 (accelerator);
	;
}

static void
_dbus_budgie_shell_shim_GrabAccelerators (BudgieShellShim* self,
                                          GVariant* _parameters_,
                                          GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	BudgieGsdAccel* accelerators = NULL;
	gint accelerators_length1 = 0;
	GVariant* _tmp44_;
	BudgieGsdAccel* _tmp45_;
	gint _tmp45__length;
	gint _tmp45__size;
	gint _tmp45__length1;
	GVariantIter _tmp46_;
	GVariant* _tmp47_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	guint* result;
	gint result_length1 = 0;
	guint* _tmp53_;
	GVariantBuilder _tmp54_;
	gint _tmp55_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp44_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp45_ = g_new (BudgieGsdAccel, 5);
	_tmp45__length = 0;
	_tmp45__size = 4;
	_tmp45__length1 = 0;
	g_variant_iter_init (&_tmp46_, _tmp44_);
	for (; (_tmp47_ = g_variant_iter_next_value (&_tmp46_)) != NULL; _tmp45__length1++) {
		BudgieGsdAccel _tmp48_;
		GVariantIter _tmp49_;
		GVariant* _tmp50_;
		GVariant* _tmp51_;
		GVariant* _tmp52_;
		if (_tmp45__size == _tmp45__length) {
			_tmp45__size = 2 * _tmp45__size;
			_tmp45_ = g_renew (BudgieGsdAccel, _tmp45_, _tmp45__size + 1);
		}
		g_variant_iter_init (&_tmp49_, _tmp47_);
		_tmp50_ = g_variant_iter_next_value (&_tmp49_);
		_tmp48_.accelerator = g_variant_dup_string (_tmp50_, NULL);
		g_variant_unref (_tmp50_);
		_tmp51_ = g_variant_iter_next_value (&_tmp49_);
		_tmp48_.flags = g_variant_get_uint32 (_tmp51_);
		g_variant_unref (_tmp51_);
		_tmp52_ = g_variant_iter_next_value (&_tmp49_);
		_tmp48_.grab_flags = g_variant_get_uint32 (_tmp52_);
		g_variant_unref (_tmp52_);
		_tmp45_[_tmp45__length++] = _tmp48_;
		g_variant_unref (_tmp47_);
	}
	accelerators_length1 = _tmp45__length1;
	accelerators = _tmp45_;
	g_variant_unref (_tmp44_);
	result = budgie_shell_shim_GrabAccelerators (self, g_dbus_method_invocation_get_sender (invocation), accelerators, accelerators_length1, &result_length1, &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);
	_tmp53_ = result;
	g_variant_builder_init (&_tmp54_, G_VARIANT_TYPE ("au"));
	for (_tmp55_ = 0; _tmp55_ < result_length1; _tmp55_++) {
		g_variant_builder_add_value (&_tmp54_, g_variant_new_uint32 (*_tmp53_));
		_tmp53_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp54_));
	result = (g_free (result), NULL);
	_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:
	accelerators = (_vala_BudgieGsdAccel_array_free (accelerators, accelerators_length1), NULL);
	;
}

static void
_dbus_budgie_shell_shim_UngrabAccelerator (BudgieShellShim* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	guint action = 0U;
	GVariant* _tmp56_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp56_ = g_variant_iter_next_value (&_arguments_iter);
	action = g_variant_get_uint32 (_tmp56_);
	g_variant_unref (_tmp56_);
	result = budgie_shell_shim_UngrabAccelerator (self, g_dbus_method_invocation_get_sender (invocation), action, &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);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (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);
}

static void
_dbus_budgie_shell_shim_UngrabAccelerators (BudgieShellShim* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	guint* actions = NULL;
	gint actions_length1 = 0;
	GVariant* _tmp57_;
	guint* _tmp58_;
	gint _tmp58__length;
	gint _tmp58__size;
	gint _tmp58__length1;
	GVariantIter _tmp59_;
	GVariant* _tmp60_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp57_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp58_ = g_new (guint, 5);
	_tmp58__length = 0;
	_tmp58__size = 4;
	_tmp58__length1 = 0;
	g_variant_iter_init (&_tmp59_, _tmp57_);
	for (; (_tmp60_ = g_variant_iter_next_value (&_tmp59_)) != NULL; _tmp58__length1++) {
		if (_tmp58__size == _tmp58__length) {
			_tmp58__size = 2 * _tmp58__size;
			_tmp58_ = g_renew (guint, _tmp58_, _tmp58__size + 1);
		}
		_tmp58_[_tmp58__length++] = g_variant_get_uint32 (_tmp60_);
		g_variant_unref (_tmp60_);
	}
	actions_length1 = _tmp58__length1;
	actions = _tmp58_;
	g_variant_unref (_tmp57_);
	result = budgie_shell_shim_UngrabAccelerators (self, g_dbus_method_invocation_get_sender (invocation), actions, actions_length1, &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_boolean (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:
	actions = (g_free (actions), NULL);
	;
}

static void
_dbus_budgie_shell_shim_ShowOSD (BudgieShellShim* self,
                                 GVariant* _parameters_,
                                 GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GHashTable* params = NULL;
	GVariant* _tmp61_;
	GHashTable* _tmp62_;
	GVariantIter _tmp63_;
	GVariant* _tmp64_;
	GVariant* _tmp65_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp61_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp62_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp63_, _tmp61_);
	while (g_variant_iter_loop (&_tmp63_, "{?*}", &_tmp64_, &_tmp65_)) {
		g_hash_table_insert (_tmp62_, g_variant_dup_string (_tmp64_, NULL), g_variant_get_variant (_tmp65_));
	}
	params = _tmp62_;
	g_variant_unref (_tmp61_);
	budgie_shell_shim_ShowOSD (self, params, &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);
	_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_hash_table_unref0 (params);
	;
}

static void
budgie_shell_shim_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, "GrabAccelerator") == 0) {
		_dbus_budgie_shell_shim_grab_accelerator (object, parameters, invocation);
	} else if (strcmp (method_name, "GrabAccelerators") == 0) {
		_dbus_budgie_shell_shim_grab_accelerators (object, parameters, invocation);
	} else if (strcmp (method_name, "UngrabAccelerator") == 0) {
		_dbus_budgie_shell_shim_ungrab_accelerator (object, parameters, invocation);
	} else if (strcmp (method_name, "GrabAccelerator") == 0) {
		_dbus_budgie_shell_shim_GrabAccelerator (object, parameters, invocation);
	} else if (strcmp (method_name, "GrabAccelerators") == 0) {
		_dbus_budgie_shell_shim_GrabAccelerators (object, parameters, invocation);
	} else if (strcmp (method_name, "UngrabAccelerator") == 0) {
		_dbus_budgie_shell_shim_UngrabAccelerator (object, parameters, invocation);
	} else if (strcmp (method_name, "UngrabAccelerators") == 0) {
		_dbus_budgie_shell_shim_UngrabAccelerators (object, parameters, invocation);
	} else if (strcmp (method_name, "ShowOSD") == 0) {
		_dbus_budgie_shell_shim_ShowOSD (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
budgie_shell_shim_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
budgie_shell_shim_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;
}

static void
_dbus_budgie_shell_shim_accelerator_activated (GObject* _sender,
                                               guint action,
                                               GHashTable* parameters,
                                               gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp66_;
	GHashTableIter _tmp67_;
	gpointer _tmp68_;
	gpointer _tmp69_;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (action));
	g_hash_table_iter_init (&_tmp67_, parameters);
	g_variant_builder_init (&_tmp66_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp67_, &_tmp68_, &_tmp69_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp68_;
		_value = (GVariant*) _tmp69_;
		g_variant_builder_add (&_tmp66_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp66_));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.Shell", "AcceleratorActivated", _arguments, NULL);
}

guint
budgie_shell_shim_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 *) (&_budgie_shell_shim_dbus_interface_info), &_budgie_shell_shim_dbus_interface_vtable, data, _budgie_shell_shim_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "accelerator-activated", (GCallback) _dbus_budgie_shell_shim_accelerator_activated, data);
	return result;
}

static void
_budgie_shell_shim_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_shell_shim_accelerator_activated, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

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

