/* screenshot_main.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from screenshot_main.vala, do not modify */

#include <glib-object.h>
#include <gio/gio.h>
#include <glib.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define BUDGIE_TYPE_SCREENSHOT_CONTROL (budgie_screenshot_control_get_type ())
#define BUDGIE_SCREENSHOT_CONTROL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_TYPE_SCREENSHOT_CONTROL, BudgieScreenshotControl))
#define BUDGIE_IS_SCREENSHOT_CONTROL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_TYPE_SCREENSHOT_CONTROL))
#define BUDGIE_SCREENSHOT_CONTROL_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BUDGIE_TYPE_SCREENSHOT_CONTROL, BudgieScreenshotControlIface))

typedef struct _BudgieScreenshotControl BudgieScreenshotControl;
typedef struct _BudgieScreenshotControlIface BudgieScreenshotControlIface;

#define BUDGIE_TYPE_SCREENSHOT_CONTROL_PROXY (budgie_screenshot_control_proxy_get_type ())
typedef GDBusProxy BudgieScreenshotControlProxy;
typedef GDBusProxyClass BudgieScreenshotControlProxyClass;
typedef struct _budgie_screenshot_control_StartMainWindowReadyData budgie_screenshot_control_StartMainWindowReadyData;
typedef struct _budgie_screenshot_control_StartAreaSelectReadyData budgie_screenshot_control_StartAreaSelectReadyData;
typedef struct _budgie_screenshot_control_StartWindowScreenshotReadyData budgie_screenshot_control_StartWindowScreenshotReadyData;
typedef struct _budgie_screenshot_control_StartFullScreenshotReadyData budgie_screenshot_control_StartFullScreenshotReadyData;
typedef struct _Block1Data Block1Data;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

struct _BudgieScreenshotControlIface {
	GTypeInterface parent_iface;
	void (*StartMainWindow) (BudgieScreenshotControl* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*StartMainWindow_finish) (BudgieScreenshotControl* self, GAsyncResult* _res_, GError** error);
	void (*StartAreaSelect) (BudgieScreenshotControl* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*StartAreaSelect_finish) (BudgieScreenshotControl* self, GAsyncResult* _res_, GError** error);
	void (*StartWindowScreenshot) (BudgieScreenshotControl* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*StartWindowScreenshot_finish) (BudgieScreenshotControl* self, GAsyncResult* _res_, GError** error);
	void (*StartFullScreenshot) (BudgieScreenshotControl* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*StartFullScreenshot_finish) (BudgieScreenshotControl* self, GAsyncResult* _res_, GError** error);
};

struct _budgie_screenshot_control_StartMainWindowReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _budgie_screenshot_control_StartAreaSelectReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _budgie_screenshot_control_StartWindowScreenshotReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _budgie_screenshot_control_StartFullScreenshotReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _Block1Data {
	int _ref_count_;
	BudgieScreenshotControl* control;
};

VALA_EXTERN gboolean budgie_interactive;
gboolean budgie_interactive = FALSE;
VALA_EXTERN gboolean budgie_window;
gboolean budgie_window = FALSE;
VALA_EXTERN gboolean budgie_area;
gboolean budgie_area = FALSE;

VALA_EXTERN GType budgie_screenshot_control_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint budgie_screenshot_control_register_object (void* object,
                                                 GDBusConnection* connection,
                                                 const gchar* path,
                                                 GError** error);
VALA_EXTERN GType budgie_screenshot_control_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BudgieScreenshotControl, g_object_unref)
VALA_EXTERN void budgie_screenshot_control_StartMainWindow (BudgieScreenshotControl* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
VALA_EXTERN void budgie_screenshot_control_StartMainWindow_finish (BudgieScreenshotControl* self,
                                                       GAsyncResult* _res_,
                                                       GError** error);
VALA_EXTERN void budgie_screenshot_control_StartAreaSelect (BudgieScreenshotControl* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
VALA_EXTERN void budgie_screenshot_control_StartAreaSelect_finish (BudgieScreenshotControl* self,
                                                       GAsyncResult* _res_,
                                                       GError** error);
VALA_EXTERN void budgie_screenshot_control_StartWindowScreenshot (BudgieScreenshotControl* self,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
VALA_EXTERN void budgie_screenshot_control_StartWindowScreenshot_finish (BudgieScreenshotControl* self,
                                                             GAsyncResult* _res_,
                                                             GError** error);
VALA_EXTERN void budgie_screenshot_control_StartFullScreenshot (BudgieScreenshotControl* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
VALA_EXTERN void budgie_screenshot_control_StartFullScreenshot_finish (BudgieScreenshotControl* self,
                                                           GAsyncResult* _res_,
                                                           GError** error);
static GType budgie_screenshot_control_get_type_once (void);
static void budgie_screenshot_control_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_screenshot_control_proxy_StartMainWindow_async (BudgieScreenshotControl* self,
                                                            GAsyncReadyCallback _callback_,
                                                            gpointer _user_data_);
static void budgie_screenshot_control_proxy_StartMainWindow_finish (BudgieScreenshotControl* self,
                                                             GAsyncResult* _res_,
                                                             GError** error);
static void budgie_screenshot_control_proxy_StartAreaSelect_async (BudgieScreenshotControl* self,
                                                            GAsyncReadyCallback _callback_,
                                                            gpointer _user_data_);
static void budgie_screenshot_control_proxy_StartAreaSelect_finish (BudgieScreenshotControl* self,
                                                             GAsyncResult* _res_,
                                                             GError** error);
static void budgie_screenshot_control_proxy_StartWindowScreenshot_async (BudgieScreenshotControl* self,
                                                                  GAsyncReadyCallback _callback_,
                                                                  gpointer _user_data_);
static void budgie_screenshot_control_proxy_StartWindowScreenshot_finish (BudgieScreenshotControl* self,
                                                                   GAsyncResult* _res_,
                                                                   GError** error);
static void budgie_screenshot_control_proxy_StartFullScreenshot_async (BudgieScreenshotControl* self,
                                                                GAsyncReadyCallback _callback_,
                                                                gpointer _user_data_);
static void budgie_screenshot_control_proxy_StartFullScreenshot_finish (BudgieScreenshotControl* self,
                                                                 GAsyncResult* _res_,
                                                                 GError** error);
static void budgie_screenshot_control_proxy_budgie_screenshot_control_interface_init (BudgieScreenshotControlIface* iface);
static void _dbus_budgie_screenshot_control_StartMainWindow (BudgieScreenshotControl* self,
                                                      GVariant* _parameters_,
                                                      GDBusMethodInvocation* invocation);
static void _dbus_budgie_screenshot_control_StartMainWindow_ready (GObject * source_object,
                                                            GAsyncResult * _res_,
                                                            gpointer _user_data_);
static void _dbus_budgie_screenshot_control_StartAreaSelect (BudgieScreenshotControl* self,
                                                      GVariant* _parameters_,
                                                      GDBusMethodInvocation* invocation);
static void _dbus_budgie_screenshot_control_StartAreaSelect_ready (GObject * source_object,
                                                            GAsyncResult * _res_,
                                                            gpointer _user_data_);
static void _dbus_budgie_screenshot_control_StartWindowScreenshot (BudgieScreenshotControl* self,
                                                            GVariant* _parameters_,
                                                            GDBusMethodInvocation* invocation);
static void _dbus_budgie_screenshot_control_StartWindowScreenshot_ready (GObject * source_object,
                                                                  GAsyncResult * _res_,
                                                                  gpointer _user_data_);
static void _dbus_budgie_screenshot_control_StartFullScreenshot (BudgieScreenshotControl* self,
                                                          GVariant* _parameters_,
                                                          GDBusMethodInvocation* invocation);
static void _dbus_budgie_screenshot_control_StartFullScreenshot_ready (GObject * source_object,
                                                                GAsyncResult * _res_,
                                                                gpointer _user_data_);
static void budgie_screenshot_control_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_screenshot_control_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_screenshot_control_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_screenshot_control_unregister_object (gpointer user_data);
static gint budgie_main (gchar** args,
                  gint args_length1);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void ____lambda4_ (Block1Data* _data1_,
                   GObject* obj,
                   GAsyncResult* res);
static void _____lambda4__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ____lambda5_ (Block1Data* _data1_,
                   GObject* obj,
                   GAsyncResult* res);
static void _____lambda5__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ____lambda6_ (Block1Data* _data1_,
                   GObject* obj,
                   GAsyncResult* res);
static void _____lambda6__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda7_ (Block1Data* _data1_,
                  GObject* obj,
                  GAsyncResult* res);
static void ____lambda7__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);

static const GDBusArgInfo * const _budgie_screenshot_control_dbus_arg_info_StartMainWindow_in[] = {NULL};
static const GDBusArgInfo * const _budgie_screenshot_control_dbus_arg_info_StartMainWindow_out[] = {NULL};
static const GDBusMethodInfo _budgie_screenshot_control_dbus_method_info_StartMainWindow = {-1, "StartMainWindow", (GDBusArgInfo **) (&_budgie_screenshot_control_dbus_arg_info_StartMainWindow_in), (GDBusArgInfo **) (&_budgie_screenshot_control_dbus_arg_info_StartMainWindow_out), NULL};
static const GDBusArgInfo * const _budgie_screenshot_control_dbus_arg_info_StartAreaSelect_in[] = {NULL};
static const GDBusArgInfo * const _budgie_screenshot_control_dbus_arg_info_StartAreaSelect_out[] = {NULL};
static const GDBusMethodInfo _budgie_screenshot_control_dbus_method_info_StartAreaSelect = {-1, "StartAreaSelect", (GDBusArgInfo **) (&_budgie_screenshot_control_dbus_arg_info_StartAreaSelect_in), (GDBusArgInfo **) (&_budgie_screenshot_control_dbus_arg_info_StartAreaSelect_out), NULL};
static const GDBusArgInfo * const _budgie_screenshot_control_dbus_arg_info_StartWindowScreenshot_in[] = {NULL};
static const GDBusArgInfo * const _budgie_screenshot_control_dbus_arg_info_StartWindowScreenshot_out[] = {NULL};
static const GDBusMethodInfo _budgie_screenshot_control_dbus_method_info_StartWindowScreenshot = {-1, "StartWindowScreenshot", (GDBusArgInfo **) (&_budgie_screenshot_control_dbus_arg_info_StartWindowScreenshot_in), (GDBusArgInfo **) (&_budgie_screenshot_control_dbus_arg_info_StartWindowScreenshot_out), NULL};
static const GDBusArgInfo * const _budgie_screenshot_control_dbus_arg_info_StartFullScreenshot_in[] = {NULL};
static const GDBusArgInfo * const _budgie_screenshot_control_dbus_arg_info_StartFullScreenshot_out[] = {NULL};
static const GDBusMethodInfo _budgie_screenshot_control_dbus_method_info_StartFullScreenshot = {-1, "StartFullScreenshot", (GDBusArgInfo **) (&_budgie_screenshot_control_dbus_arg_info_StartFullScreenshot_in), (GDBusArgInfo **) (&_budgie_screenshot_control_dbus_arg_info_StartFullScreenshot_out), NULL};
static const GDBusMethodInfo * const _budgie_screenshot_control_dbus_method_info[] = {&_budgie_screenshot_control_dbus_method_info_StartMainWindow, &_budgie_screenshot_control_dbus_method_info_StartAreaSelect, &_budgie_screenshot_control_dbus_method_info_StartWindowScreenshot, &_budgie_screenshot_control_dbus_method_info_StartFullScreenshot, NULL};
static const GDBusSignalInfo * const _budgie_screenshot_control_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _budgie_screenshot_control_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _budgie_screenshot_control_dbus_interface_info = {-1, "org.buddiesofbudgie.BudgieScreenshotControl", (GDBusMethodInfo **) (&_budgie_screenshot_control_dbus_method_info), (GDBusSignalInfo **) (&_budgie_screenshot_control_dbus_signal_info), (GDBusPropertyInfo **) (&_budgie_screenshot_control_dbus_property_info), NULL};
static const GDBusInterfaceVTable _budgie_screenshot_control_dbus_interface_vtable = {budgie_screenshot_control_dbus_interface_method_call, budgie_screenshot_control_dbus_interface_get_property, budgie_screenshot_control_dbus_interface_set_property};
const GOptionEntry BUDGIE_options[4] = {{"interactive", 'i', (gint) 0, G_OPTION_ARG_NONE, &budgie_interactive, "Interactively set options"}, {"window", 'w', (gint) 0, G_OPTION_ARG_NONE, &budgie_window, "Grab a window instead of the entire display. This capability only work" \
"s for compatible window managers."}, {"area", 'a', (gint) 0, G_OPTION_ARG_NONE, &budgie_area, "Grab an area of the display instead of the entire display"}, {NULL}};

void
budgie_screenshot_control_StartMainWindow (BudgieScreenshotControl* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	BudgieScreenshotControlIface* _iface_;
	_iface_ = BUDGIE_SCREENSHOT_CONTROL_GET_INTERFACE (self);
	if (_iface_->StartMainWindow) {
		_iface_->StartMainWindow (self, _callback_, _user_data_);
	}
}

void
budgie_screenshot_control_StartMainWindow_finish (BudgieScreenshotControl* self,
                                                  GAsyncResult* _res_,
                                                  GError** error)
{
	BudgieScreenshotControlIface* _iface_;
	_iface_ = BUDGIE_SCREENSHOT_CONTROL_GET_INTERFACE (self);
	if (_iface_->StartMainWindow_finish) {
		_iface_->StartMainWindow_finish (self, _res_, error);
	}
}

void
budgie_screenshot_control_StartAreaSelect (BudgieScreenshotControl* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	BudgieScreenshotControlIface* _iface_;
	_iface_ = BUDGIE_SCREENSHOT_CONTROL_GET_INTERFACE (self);
	if (_iface_->StartAreaSelect) {
		_iface_->StartAreaSelect (self, _callback_, _user_data_);
	}
}

void
budgie_screenshot_control_StartAreaSelect_finish (BudgieScreenshotControl* self,
                                                  GAsyncResult* _res_,
                                                  GError** error)
{
	BudgieScreenshotControlIface* _iface_;
	_iface_ = BUDGIE_SCREENSHOT_CONTROL_GET_INTERFACE (self);
	if (_iface_->StartAreaSelect_finish) {
		_iface_->StartAreaSelect_finish (self, _res_, error);
	}
}

void
budgie_screenshot_control_StartWindowScreenshot (BudgieScreenshotControl* self,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_)
{
	BudgieScreenshotControlIface* _iface_;
	_iface_ = BUDGIE_SCREENSHOT_CONTROL_GET_INTERFACE (self);
	if (_iface_->StartWindowScreenshot) {
		_iface_->StartWindowScreenshot (self, _callback_, _user_data_);
	}
}

void
budgie_screenshot_control_StartWindowScreenshot_finish (BudgieScreenshotControl* self,
                                                        GAsyncResult* _res_,
                                                        GError** error)
{
	BudgieScreenshotControlIface* _iface_;
	_iface_ = BUDGIE_SCREENSHOT_CONTROL_GET_INTERFACE (self);
	if (_iface_->StartWindowScreenshot_finish) {
		_iface_->StartWindowScreenshot_finish (self, _res_, error);
	}
}

void
budgie_screenshot_control_StartFullScreenshot (BudgieScreenshotControl* self,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	BudgieScreenshotControlIface* _iface_;
	_iface_ = BUDGIE_SCREENSHOT_CONTROL_GET_INTERFACE (self);
	if (_iface_->StartFullScreenshot) {
		_iface_->StartFullScreenshot (self, _callback_, _user_data_);
	}
}

void
budgie_screenshot_control_StartFullScreenshot_finish (BudgieScreenshotControl* self,
                                                      GAsyncResult* _res_,
                                                      GError** error)
{
	BudgieScreenshotControlIface* _iface_;
	_iface_ = BUDGIE_SCREENSHOT_CONTROL_GET_INTERFACE (self);
	if (_iface_->StartFullScreenshot_finish) {
		_iface_->StartFullScreenshot_finish (self, _res_, error);
	}
}

static void
budgie_screenshot_control_default_init (BudgieScreenshotControlIface * iface,
                                        gpointer iface_data)
{
}

static GType
budgie_screenshot_control_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BudgieScreenshotControlIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_screenshot_control_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType budgie_screenshot_control_type_id;
	budgie_screenshot_control_type_id = g_type_register_static (G_TYPE_INTERFACE, "BudgieScreenshotControl", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (budgie_screenshot_control_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (budgie_screenshot_control_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) budgie_screenshot_control_proxy_get_type);
	g_type_set_qdata (budgie_screenshot_control_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.buddiesofbudgie.BudgieScreenshotControl");
	g_type_set_qdata (budgie_screenshot_control_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_budgie_screenshot_control_dbus_interface_info));
	g_type_set_qdata (budgie_screenshot_control_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) budgie_screenshot_control_register_object);
	return budgie_screenshot_control_type_id;
}

GType
budgie_screenshot_control_get_type (void)
{
	static volatile gsize budgie_screenshot_control_type_id__once = 0;
	if (g_once_init_enter (&budgie_screenshot_control_type_id__once)) {
		GType budgie_screenshot_control_type_id;
		budgie_screenshot_control_type_id = budgie_screenshot_control_get_type_once ();
		g_once_init_leave (&budgie_screenshot_control_type_id__once, budgie_screenshot_control_type_id);
	}
	return budgie_screenshot_control_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (BudgieScreenshotControlProxy, budgie_screenshot_control_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (BUDGIE_TYPE_SCREENSHOT_CONTROL, budgie_screenshot_control_proxy_budgie_screenshot_control_interface_init) )
static void
budgie_screenshot_control_proxy_class_init (BudgieScreenshotControlProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = budgie_screenshot_control_proxy_g_signal;
}

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

static void
budgie_screenshot_control_proxy_init (BudgieScreenshotControlProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_budgie_screenshot_control_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_screenshot_control_proxy_StartMainWindow_async (BudgieScreenshotControl* self,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.buddiesofbudgie.BudgieScreenshotControl", "StartMainWindow");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_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_screenshot_control_proxy_StartMainWindow_finish (BudgieScreenshotControl* 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_screenshot_control_proxy_StartAreaSelect_async (BudgieScreenshotControl* self,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.buddiesofbudgie.BudgieScreenshotControl", "StartAreaSelect");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_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_screenshot_control_proxy_StartAreaSelect_finish (BudgieScreenshotControl* 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_screenshot_control_proxy_StartWindowScreenshot_async (BudgieScreenshotControl* self,
                                                             GAsyncReadyCallback _callback_,
                                                             gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.buddiesofbudgie.BudgieScreenshotControl", "StartWindowScreenshot");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_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_screenshot_control_proxy_StartWindowScreenshot_finish (BudgieScreenshotControl* 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_screenshot_control_proxy_StartFullScreenshot_async (BudgieScreenshotControl* self,
                                                           GAsyncReadyCallback _callback_,
                                                           gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.buddiesofbudgie.BudgieScreenshotControl", "StartFullScreenshot");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_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_screenshot_control_proxy_StartFullScreenshot_finish (BudgieScreenshotControl* 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_screenshot_control_proxy_budgie_screenshot_control_interface_init (BudgieScreenshotControlIface* iface)
{
	iface->StartMainWindow = budgie_screenshot_control_proxy_StartMainWindow_async;
	iface->StartMainWindow_finish = budgie_screenshot_control_proxy_StartMainWindow_finish;
	iface->StartAreaSelect = budgie_screenshot_control_proxy_StartAreaSelect_async;
	iface->StartAreaSelect_finish = budgie_screenshot_control_proxy_StartAreaSelect_finish;
	iface->StartWindowScreenshot = budgie_screenshot_control_proxy_StartWindowScreenshot_async;
	iface->StartWindowScreenshot_finish = budgie_screenshot_control_proxy_StartWindowScreenshot_finish;
	iface->StartFullScreenshot = budgie_screenshot_control_proxy_StartFullScreenshot_async;
	iface->StartFullScreenshot_finish = budgie_screenshot_control_proxy_StartFullScreenshot_finish;
}

static void
_dbus_budgie_screenshot_control_StartMainWindow (BudgieScreenshotControl* self,
                                                 GVariant* _parameters_,
                                                 GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	budgie_screenshot_control_StartMainWindowReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (budgie_screenshot_control_StartMainWindowReadyData);
	_ready_data->_invocation_ = invocation;
	budgie_screenshot_control_StartMainWindow (self, (GAsyncReadyCallback) _dbus_budgie_screenshot_control_StartMainWindow_ready, _ready_data);
}

static void
_dbus_budgie_screenshot_control_StartMainWindow_ready (GObject * source_object,
                                                       GAsyncResult * _res_,
                                                       gpointer _user_data_)
{
	budgie_screenshot_control_StartMainWindowReadyData* _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_screenshot_control_StartMainWindow_finish ((BudgieScreenshotControl*) 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_slice_free (budgie_screenshot_control_StartMainWindowReadyData, _ready_data);
}

static void
_dbus_budgie_screenshot_control_StartAreaSelect (BudgieScreenshotControl* self,
                                                 GVariant* _parameters_,
                                                 GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	budgie_screenshot_control_StartAreaSelectReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (budgie_screenshot_control_StartAreaSelectReadyData);
	_ready_data->_invocation_ = invocation;
	budgie_screenshot_control_StartAreaSelect (self, (GAsyncReadyCallback) _dbus_budgie_screenshot_control_StartAreaSelect_ready, _ready_data);
}

static void
_dbus_budgie_screenshot_control_StartAreaSelect_ready (GObject * source_object,
                                                       GAsyncResult * _res_,
                                                       gpointer _user_data_)
{
	budgie_screenshot_control_StartAreaSelectReadyData* _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_screenshot_control_StartAreaSelect_finish ((BudgieScreenshotControl*) 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_slice_free (budgie_screenshot_control_StartAreaSelectReadyData, _ready_data);
}

static void
_dbus_budgie_screenshot_control_StartWindowScreenshot (BudgieScreenshotControl* self,
                                                       GVariant* _parameters_,
                                                       GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	budgie_screenshot_control_StartWindowScreenshotReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (budgie_screenshot_control_StartWindowScreenshotReadyData);
	_ready_data->_invocation_ = invocation;
	budgie_screenshot_control_StartWindowScreenshot (self, (GAsyncReadyCallback) _dbus_budgie_screenshot_control_StartWindowScreenshot_ready, _ready_data);
}

static void
_dbus_budgie_screenshot_control_StartWindowScreenshot_ready (GObject * source_object,
                                                             GAsyncResult * _res_,
                                                             gpointer _user_data_)
{
	budgie_screenshot_control_StartWindowScreenshotReadyData* _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_screenshot_control_StartWindowScreenshot_finish ((BudgieScreenshotControl*) 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_slice_free (budgie_screenshot_control_StartWindowScreenshotReadyData, _ready_data);
}

static void
_dbus_budgie_screenshot_control_StartFullScreenshot (BudgieScreenshotControl* self,
                                                     GVariant* _parameters_,
                                                     GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	budgie_screenshot_control_StartFullScreenshotReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (budgie_screenshot_control_StartFullScreenshotReadyData);
	_ready_data->_invocation_ = invocation;
	budgie_screenshot_control_StartFullScreenshot (self, (GAsyncReadyCallback) _dbus_budgie_screenshot_control_StartFullScreenshot_ready, _ready_data);
}

static void
_dbus_budgie_screenshot_control_StartFullScreenshot_ready (GObject * source_object,
                                                           GAsyncResult * _res_,
                                                           gpointer _user_data_)
{
	budgie_screenshot_control_StartFullScreenshotReadyData* _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_screenshot_control_StartFullScreenshot_finish ((BudgieScreenshotControl*) 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_slice_free (budgie_screenshot_control_StartFullScreenshotReadyData, _ready_data);
}

static void
budgie_screenshot_control_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, "StartMainWindow") == 0) {
		_dbus_budgie_screenshot_control_StartMainWindow (object, parameters, invocation);
	} else if (strcmp (method_name, "StartAreaSelect") == 0) {
		_dbus_budgie_screenshot_control_StartAreaSelect (object, parameters, invocation);
	} else if (strcmp (method_name, "StartWindowScreenshot") == 0) {
		_dbus_budgie_screenshot_control_StartWindowScreenshot (object, parameters, invocation);
	} else if (strcmp (method_name, "StartFullScreenshot") == 0) {
		_dbus_budgie_screenshot_control_StartFullScreenshot (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
budgie_screenshot_control_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_screenshot_control_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_screenshot_control_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_screenshot_control_dbus_interface_info), &_budgie_screenshot_control_dbus_interface_vtable, data, _budgie_screenshot_control_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_budgie_screenshot_control_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 Block1Data*
block1_data_ref (Block1Data* _data1_)
{
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}

static void
block1_data_unref (void * _userdata_)
{
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		_g_object_unref0 (_data1_->control);
		g_slice_free (Block1Data, _data1_);
	}
}

static void
____lambda4_ (Block1Data* _data1_,
              GObject* obj,
              GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		BudgieScreenshotControl* _tmp0_;
		_tmp0_ = _data1_->control;
		budgie_screenshot_control_StartMainWindow_finish (_tmp0_, res, &_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 ("screenshot_main.vala:59: Failed to StartMainWindow: %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
_____lambda4__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	____lambda4_ (self, source_object, res);
	block1_data_unref (self);
}

static void
____lambda5_ (Block1Data* _data1_,
              GObject* obj,
              GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		BudgieScreenshotControl* _tmp0_;
		_tmp0_ = _data1_->control;
		budgie_screenshot_control_StartAreaSelect_finish (_tmp0_, res, &_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 ("screenshot_main.vala:70: Failed to StartAreaSelect: %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
_____lambda5__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	____lambda5_ (self, source_object, res);
	block1_data_unref (self);
}

static void
____lambda6_ (Block1Data* _data1_,
              GObject* obj,
              GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		BudgieScreenshotControl* _tmp0_;
		_tmp0_ = _data1_->control;
		budgie_screenshot_control_StartWindowScreenshot_finish (_tmp0_, res, &_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 ("screenshot_main.vala:81: Failed to StartWindowScreenshot: %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
_____lambda6__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	____lambda6_ (self, source_object, res);
	block1_data_unref (self);
}

static void
___lambda7_ (Block1Data* _data1_,
             GObject* obj,
             GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		BudgieScreenshotControl* _tmp0_;
		_tmp0_ = _data1_->control;
		budgie_screenshot_control_StartFullScreenshot_finish (_tmp0_, res, &_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 ("screenshot_main.vala:92: Failed to StartFullScreenshot: %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
____lambda7__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	___lambda7_ (self, source_object, res);
	block1_data_unref (self);
}

static gint
budgie_main (gchar** args,
             gint args_length1)
{
	Block1Data* _data1_;
	GOptionContext* ctx = NULL;
	GOptionContext* _tmp0_;
	GOptionContext* _tmp1_;
	GOptionContext* _tmp2_;
	gint _tmp18_ = -1;
	GError* _inner_error0_ = NULL;
	gint result;
	_data1_ = g_slice_new0 (Block1Data);
	_data1_->_ref_count_ = 1;
	_tmp0_ = g_option_context_new ("- Budgie Screenshot");
	_g_option_context_free0 (ctx);
	ctx = _tmp0_;
	_tmp1_ = ctx;
	g_option_context_set_help_enabled (_tmp1_, TRUE);
	_tmp2_ = ctx;
	g_option_context_add_main_entries (_tmp2_, BUDGIE_options, NULL);
	{
		GOptionContext* _tmp3_;
		_tmp3_ = ctx;
		g_option_context_parse (_tmp3_, (gint*) (&args_length1), &args, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		FILE* _tmp4_;
		GError* _tmp5_;
		const gchar* _tmp6_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp4_ = stderr;
		_tmp5_ = e;
		_tmp6_ = _tmp5_->message;
		fprintf (_tmp4_, "Error: %s\n", _tmp6_);
		result = 0;
		_g_error_free0 (e);
		_g_option_context_free0 (ctx);
		block1_data_unref (_data1_);
		_data1_ = NULL;
		return result;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gint _tmp7_ = -1;
		_g_option_context_free0 (ctx);
		block1_data_unref (_data1_);
		_data1_ = 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 _tmp7_;
	}
	{
		BudgieScreenshotControl* _tmp8_ = NULL;
		BudgieScreenshotControl* _tmp9_;
		BudgieScreenshotControl* _tmp10_;
		BudgieScreenshotControl* _tmp14_;
		_tmp9_ = (BudgieScreenshotControl*) g_initable_new (BUDGIE_TYPE_SCREENSHOT_CONTROL_PROXY, NULL, &_inner_error0_, "g-flags", 0, "g-name", "org.buddiesofbudgie.BudgieScreenshotControl", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/buddiesofbudgie/ScreenshotControl", "g-interface-name", "org.buddiesofbudgie.BudgieScreenshotControl", NULL);
		_tmp8_ = (BudgieScreenshotControl*) _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch1_g_error;
		}
		_tmp10_ = _tmp8_;
		_tmp8_ = NULL;
		_g_object_unref0 (_data1_->control);
		_data1_->control = _tmp10_;
		if (budgie_interactive) {
			BudgieScreenshotControl* _tmp11_;
			_tmp11_ = _data1_->control;
			budgie_screenshot_control_StartMainWindow (_tmp11_, _____lambda4__gasync_ready_callback, block1_data_ref (_data1_));
			g_usleep ((gulong) 2000);
			result = 0;
			_g_object_unref0 (_tmp8_);
			_g_option_context_free0 (ctx);
			block1_data_unref (_data1_);
			_data1_ = NULL;
			return result;
		}
		if (budgie_area) {
			BudgieScreenshotControl* _tmp12_;
			_tmp12_ = _data1_->control;
			budgie_screenshot_control_StartAreaSelect (_tmp12_, _____lambda5__gasync_ready_callback, block1_data_ref (_data1_));
			g_usleep ((gulong) 2000);
			result = 0;
			_g_object_unref0 (_tmp8_);
			_g_option_context_free0 (ctx);
			block1_data_unref (_data1_);
			_data1_ = NULL;
			return result;
		}
		if (budgie_window) {
			BudgieScreenshotControl* _tmp13_;
			_tmp13_ = _data1_->control;
			budgie_screenshot_control_StartWindowScreenshot (_tmp13_, _____lambda6__gasync_ready_callback, block1_data_ref (_data1_));
			g_usleep ((gulong) 2000);
			result = 0;
			_g_object_unref0 (_tmp8_);
			_g_option_context_free0 (ctx);
			block1_data_unref (_data1_);
			_data1_ = NULL;
			return result;
		}
		_tmp14_ = _data1_->control;
		budgie_screenshot_control_StartFullScreenshot (_tmp14_, ____lambda7__gasync_ready_callback, block1_data_ref (_data1_));
		g_usleep ((gulong) 2000);
		result = 0;
		_g_object_unref0 (_tmp8_);
		_g_option_context_free0 (ctx);
		block1_data_unref (_data1_);
		_data1_ = NULL;
		return result;
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
		FILE* _tmp15_;
		GError* _tmp16_;
		const gchar* _tmp17_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp15_ = stderr;
		_tmp16_ = e;
		_tmp17_ = _tmp16_->message;
		fprintf (_tmp15_, "%s\n", _tmp17_);
		result = 1;
		_g_error_free0 (e);
		_g_option_context_free0 (ctx);
		block1_data_unref (_data1_);
		_data1_ = NULL;
		return result;
	}
	__finally1:
	_g_option_context_free0 (ctx);
	block1_data_unref (_data1_);
	_data1_ = 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 _tmp18_;
}

int
main (int argc,
      char ** argv)
{
	return budgie_main (argv, argc);
}

