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

#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <unistd.h>

#define DC_STATUS_NOTIFIER_ITEM_ICON_NAME "parla-tray"
#define DC_STATUS_NOTIFIER_ITEM_ICON_RESOURCE "/io/github/trufae/Parla/icons/scalable/apps/parla-tray.svg"
#define DC_TRAY_MENU_ID_SHOW ((gint32) 1)
#define DC_TRAY_MENU_ID_NOTIFY ((gint32) 2)
#define DC_TRAY_MENU_ID_QUIT ((gint32) 3)
#define DC_TRAY_ICON_ITEM_PATH "/StatusNotifierItem"
#define DC_TRAY_ICON_MENU_PATH "/MenuBar"
#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 DC_TYPE_STATUS_NOTIFIER_WATCHER (dc_status_notifier_watcher_get_type ())
#define DC_STATUS_NOTIFIER_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DC_TYPE_STATUS_NOTIFIER_WATCHER, DcStatusNotifierWatcher))
#define DC_IS_STATUS_NOTIFIER_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DC_TYPE_STATUS_NOTIFIER_WATCHER))
#define DC_STATUS_NOTIFIER_WATCHER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DC_TYPE_STATUS_NOTIFIER_WATCHER, DcStatusNotifierWatcherIface))

typedef struct _DcStatusNotifierWatcher DcStatusNotifierWatcher;
typedef struct _DcStatusNotifierWatcherIface DcStatusNotifierWatcherIface;

#define DC_TYPE_STATUS_NOTIFIER_WATCHER_PROXY (dc_status_notifier_watcher_proxy_get_type ())
typedef GDBusProxy DcStatusNotifierWatcherProxy;
typedef GDBusProxyClass DcStatusNotifierWatcherProxyClass;
#define _g_free0(var) (var = (g_free (var), NULL))

#define DC_TYPE_STATUS_NOTIFIER_ITEM (dc_status_notifier_item_get_type ())
#define DC_STATUS_NOTIFIER_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DC_TYPE_STATUS_NOTIFIER_ITEM, DcStatusNotifierItem))
#define DC_STATUS_NOTIFIER_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DC_TYPE_STATUS_NOTIFIER_ITEM, DcStatusNotifierItemClass))
#define DC_IS_STATUS_NOTIFIER_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DC_TYPE_STATUS_NOTIFIER_ITEM))
#define DC_IS_STATUS_NOTIFIER_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DC_TYPE_STATUS_NOTIFIER_ITEM))
#define DC_STATUS_NOTIFIER_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DC_TYPE_STATUS_NOTIFIER_ITEM, DcStatusNotifierItemClass))

typedef struct _DcStatusNotifierItem DcStatusNotifierItem;
typedef struct _DcStatusNotifierItemClass DcStatusNotifierItemClass;
typedef struct _DcStatusNotifierItemPrivate DcStatusNotifierItemPrivate;
enum  {
	DC_STATUS_NOTIFIER_ITEM_0_PROPERTY,
	DC_STATUS_NOTIFIER_ITEM_CATEGORY_PROPERTY,
	DC_STATUS_NOTIFIER_ITEM_ID_PROPERTY,
	DC_STATUS_NOTIFIER_ITEM_TITLE_PROPERTY,
	DC_STATUS_NOTIFIER_ITEM_STATUS_PROPERTY,
	DC_STATUS_NOTIFIER_ITEM_WINDOW_ID_PROPERTY,
	DC_STATUS_NOTIFIER_ITEM_ICON_NAME_PROPERTY,
	DC_STATUS_NOTIFIER_ITEM_ICON_THEME_PATH_PROPERTY,
	DC_STATUS_NOTIFIER_ITEM_ICON_PIXMAP_PROPERTY,
	DC_STATUS_NOTIFIER_ITEM_OVERLAY_ICON_NAME_PROPERTY,
	DC_STATUS_NOTIFIER_ITEM_ATTENTION_ICON_NAME_PROPERTY,
	DC_STATUS_NOTIFIER_ITEM_ATTENTION_MOVIE_NAME_PROPERTY,
	DC_STATUS_NOTIFIER_ITEM_ITEM_IS_MENU_PROPERTY,
	DC_STATUS_NOTIFIER_ITEM_MENU_PROPERTY,
	DC_STATUS_NOTIFIER_ITEM_NUM_PROPERTIES
};
static GParamSpec* dc_status_notifier_item_properties[DC_STATUS_NOTIFIER_ITEM_NUM_PROPERTIES];
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
#define _g_variant_builder_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_builder_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_bytes_unref0(var) ((var == NULL) ? NULL : (var = (g_bytes_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
enum  {
	DC_STATUS_NOTIFIER_ITEM_NEW_TITLE_SIGNAL,
	DC_STATUS_NOTIFIER_ITEM_NEW_ICON_SIGNAL,
	DC_STATUS_NOTIFIER_ITEM_NEW_ATTENTION_ICON_SIGNAL,
	DC_STATUS_NOTIFIER_ITEM_NEW_OVERLAY_ICON_SIGNAL,
	DC_STATUS_NOTIFIER_ITEM_NEW_STATUS_SIGNAL,
	DC_STATUS_NOTIFIER_ITEM_ACTIVATE_REQUESTED_SIGNAL,
	DC_STATUS_NOTIFIER_ITEM_NUM_SIGNALS
};
static guint dc_status_notifier_item_signals[DC_STATUS_NOTIFIER_ITEM_NUM_SIGNALS] = {0};

#define DC_TYPE_TRAY_MENU (dc_tray_menu_get_type ())
#define DC_TRAY_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DC_TYPE_TRAY_MENU, DcTrayMenu))
#define DC_TRAY_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DC_TYPE_TRAY_MENU, DcTrayMenuClass))
#define DC_IS_TRAY_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DC_TYPE_TRAY_MENU))
#define DC_IS_TRAY_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DC_TYPE_TRAY_MENU))
#define DC_TRAY_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DC_TYPE_TRAY_MENU, DcTrayMenuClass))

typedef struct _DcTrayMenu DcTrayMenu;
typedef struct _DcTrayMenuClass DcTrayMenuClass;
typedef struct _DcTrayMenuPrivate DcTrayMenuPrivate;
enum  {
	DC_TRAY_MENU_0_PROPERTY,
	DC_TRAY_MENU_VERSION_PROPERTY,
	DC_TRAY_MENU_TEXT_DIRECTION_PROPERTY,
	DC_TRAY_MENU_STATUS_PROPERTY,
	DC_TRAY_MENU_ICON_THEME_PATH_PROPERTY,
	DC_TRAY_MENU_NUM_PROPERTIES
};
static GParamSpec* dc_tray_menu_properties[DC_TRAY_MENU_NUM_PROPERTIES];
#define _g_variant_iter_free0(var) ((var == NULL) ? NULL : (var = (g_variant_iter_free (var), NULL)))
enum  {
	DC_TRAY_MENU_LAYOUT_UPDATED_SIGNAL,
	DC_TRAY_MENU_SHOW_TOGGLE_REQUESTED_SIGNAL,
	DC_TRAY_MENU_QUIT_REQUESTED_SIGNAL,
	DC_TRAY_MENU_NOTIFICATIONS_TOGGLE_REQUESTED_SIGNAL,
	DC_TRAY_MENU_NUM_SIGNALS
};
static guint dc_tray_menu_signals[DC_TRAY_MENU_NUM_SIGNALS] = {0};

#define DC_TYPE_TRAY_ICON (dc_tray_icon_get_type ())
#define DC_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DC_TYPE_TRAY_ICON, DcTrayIcon))
#define DC_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DC_TYPE_TRAY_ICON, DcTrayIconClass))
#define DC_IS_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DC_TYPE_TRAY_ICON))
#define DC_IS_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DC_TYPE_TRAY_ICON))
#define DC_TRAY_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DC_TYPE_TRAY_ICON, DcTrayIconClass))

typedef struct _DcTrayIcon DcTrayIcon;
typedef struct _DcTrayIconClass DcTrayIconClass;
typedef struct _DcTrayIconPrivate DcTrayIconPrivate;
enum  {
	DC_TRAY_ICON_0_PROPERTY,
	DC_TRAY_ICON_NUM_PROPERTIES
};
static GParamSpec* dc_tray_icon_properties[DC_TRAY_ICON_NUM_PROPERTIES];
typedef struct _Block124Data Block124Data;
typedef struct _Block125Data Block125Data;
typedef struct _Block126Data Block126Data;
typedef struct _DcTrayIconRegisterWithWatcherData DcTrayIconRegisterWithWatcherData;
enum  {
	DC_TRAY_ICON_SHOW_ON_CURRENT_DESKTOP_REQUESTED_SIGNAL,
	DC_TRAY_ICON_WINDOW_TOGGLE_REQUESTED_SIGNAL,
	DC_TRAY_ICON_QUIT_REQUESTED_SIGNAL,
	DC_TRAY_ICON_NOTIFICATIONS_TOGGLE_REQUESTED_SIGNAL,
	DC_TRAY_ICON_NUM_SIGNALS
};
static guint dc_tray_icon_signals[DC_TRAY_ICON_NUM_SIGNALS] = {0};

struct _DcStatusNotifierWatcherIface {
	GTypeInterface parent_iface;
	void (*register_status_notifier_item) (DcStatusNotifierWatcher* self, const gchar* service, GError** error);
};

struct _DcStatusNotifierItem {
	GObject parent_instance;
	DcStatusNotifierItemPrivate * priv;
};

struct _DcStatusNotifierItemClass {
	GObjectClass parent_class;
};

struct _DcStatusNotifierItemPrivate {
	GVariant* _icon_pixmap;
	gchar* pending_activation_token;
};

struct _DcTrayMenu {
	GObject parent_instance;
	DcTrayMenuPrivate * priv;
};

struct _DcTrayMenuClass {
	GObjectClass parent_class;
};

struct _DcTrayMenuPrivate {
	gboolean notifications_on;
	gboolean window_visible;
	guint32 revision;
};

struct _DcTrayIcon {
	GObject parent_instance;
	DcTrayIconPrivate * priv;
};

struct _DcTrayIconClass {
	GObjectClass parent_class;
};

struct _DcTrayIconPrivate {
	GDBusConnection* conn;
	DcStatusNotifierItem* item;
	DcTrayMenu* menu;
	guint item_reg;
	guint menu_reg;
	guint name_own;
	gboolean visible;
};

struct _Block124Data {
	int _ref_count_;
	DcTrayIcon* self;
	gboolean v;
};

struct _Block125Data {
	int _ref_count_;
	DcTrayIcon* self;
	gchar* token;
};

struct _Block126Data {
	int _ref_count_;
	DcTrayIcon* self;
	gchar* token;
};

struct _DcTrayIconRegisterWithWatcherData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DcTrayIcon* self;
	gchar* name;
	DcStatusNotifierWatcher* watcher;
	DcStatusNotifierWatcher* _tmp0_;
	DcStatusNotifierWatcher* _tmp1_;
	GError* e;
	GError* _tmp2_;
	const gchar* _tmp3_;
	GError* _inner_error0_;
};

static gint DcStatusNotifierItem_private_offset;
static gpointer dc_status_notifier_item_parent_class = NULL;
static gint DcTrayMenu_private_offset;
static gpointer dc_tray_menu_parent_class = NULL;
static gint DcTrayIcon_private_offset;
static gpointer dc_tray_icon_parent_class = NULL;

VALA_EXTERN GType dc_status_notifier_watcher_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint dc_status_notifier_watcher_register_object (void* object,
                                                  GDBusConnection* connection,
                                                  const gchar* path,
                                                  GError** error);
VALA_EXTERN GType dc_status_notifier_watcher_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DcStatusNotifierWatcher, g_object_unref)
VALA_EXTERN void dc_status_notifier_watcher_register_status_notifier_item (DcStatusNotifierWatcher* self,
                                                               const gchar* service,
                                                               GError** error);
static GType dc_status_notifier_watcher_get_type_once (void);
static void dc_status_notifier_watcher_proxy_g_signal (GDBusProxy* proxy,
                                                const gchar* sender_name,
                                                const gchar* signal_name,
                                                GVariant* parameters);
static void dc_status_notifier_watcher_proxy_register_status_notifier_item (DcStatusNotifierWatcher* self,
                                                                     const gchar* service,
                                                                     GError** error);
static void dc_status_notifier_watcher_proxy_dc_status_notifier_watcher_interface_init (DcStatusNotifierWatcherIface* iface);
static void _dbus_dc_status_notifier_watcher_register_status_notifier_item (DcStatusNotifierWatcher* self,
                                                                     GVariant* _parameters_,
                                                                     GDBusMethodInvocation* invocation);
static void dc_status_notifier_watcher_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* dc_status_notifier_watcher_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 dc_status_notifier_watcher_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 _dc_status_notifier_watcher_unregister_object (gpointer user_data);
VALA_EXTERN GType dc_status_notifier_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DcStatusNotifierItem, g_object_unref)
VALA_EXTERN guint dc_status_notifier_item_register_object (void* object,
                                               GDBusConnection* connection,
                                               const gchar* path,
                                               GError** error);
VALA_EXTERN DcStatusNotifierItem* dc_status_notifier_item_new (void);
VALA_EXTERN DcStatusNotifierItem* dc_status_notifier_item_construct (GType object_type);
static GVariant* dc_status_notifier_item_build_pixmaps (void);
static void dc_status_notifier_item_append_pixmap (GVariantBuilder* b,
                                            gint size);
VALA_EXTERN void dc_status_notifier_item_context_menu (DcStatusNotifierItem* self,
                                           gint x,
                                           gint y,
                                           GError** error);
VALA_EXTERN void dc_status_notifier_item_activate (DcStatusNotifierItem* self,
                                       gint x,
                                       gint y,
                                       GError** error);
VALA_EXTERN void dc_status_notifier_item_secondary_activate (DcStatusNotifierItem* self,
                                                 gint x,
                                                 gint y,
                                                 GError** error);
VALA_EXTERN void dc_status_notifier_item_scroll (DcStatusNotifierItem* self,
                                     gint delta,
                                     const gchar* orientation,
                                     GError** error);
VALA_EXTERN void dc_status_notifier_item_provide_xdg_activation_token (DcStatusNotifierItem* self,
                                                           const gchar* token,
                                                           GError** error);
VALA_EXTERN gchar* dc_status_notifier_item_take_activation_token (DcStatusNotifierItem* self);
VALA_EXTERN gchar* dc_status_notifier_item_get_category (DcStatusNotifierItem* self);
VALA_EXTERN gchar* dc_status_notifier_item_get_id (DcStatusNotifierItem* self);
VALA_EXTERN gchar* dc_status_notifier_item_get_title (DcStatusNotifierItem* self);
VALA_EXTERN gchar* dc_status_notifier_item_get_status (DcStatusNotifierItem* self);
VALA_EXTERN guint32 dc_status_notifier_item_get_window_id (DcStatusNotifierItem* self);
VALA_EXTERN gchar* dc_status_notifier_item_get_icon_name (DcStatusNotifierItem* self);
VALA_EXTERN gchar* dc_status_notifier_item_get_icon_theme_path (DcStatusNotifierItem* self);
VALA_EXTERN GVariant* dc_status_notifier_item_get_icon_pixmap (DcStatusNotifierItem* self);
VALA_EXTERN gchar* dc_status_notifier_item_get_overlay_icon_name (DcStatusNotifierItem* self);
VALA_EXTERN gchar* dc_status_notifier_item_get_attention_icon_name (DcStatusNotifierItem* self);
VALA_EXTERN gchar* dc_status_notifier_item_get_attention_movie_name (DcStatusNotifierItem* self);
VALA_EXTERN gboolean dc_status_notifier_item_get_item_is_menu (DcStatusNotifierItem* self);
VALA_EXTERN char* dc_status_notifier_item_get_menu (DcStatusNotifierItem* self);
static void dc_status_notifier_item_finalize (GObject * obj);
static GType dc_status_notifier_item_get_type_once (void);
static void _vala_dc_status_notifier_item_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _dbus_dc_status_notifier_item_context_menu (DcStatusNotifierItem* self,
                                                 GVariant* _parameters_,
                                                 GDBusMethodInvocation* invocation);
static void _dbus_dc_status_notifier_item_activate (DcStatusNotifierItem* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation);
static void _dbus_dc_status_notifier_item_secondary_activate (DcStatusNotifierItem* self,
                                                       GVariant* _parameters_,
                                                       GDBusMethodInvocation* invocation);
static void _dbus_dc_status_notifier_item_scroll (DcStatusNotifierItem* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation);
static void _dbus_dc_status_notifier_item_provide_xdg_activation_token (DcStatusNotifierItem* self,
                                                                 GVariant* _parameters_,
                                                                 GDBusMethodInvocation* invocation);
static void dc_status_notifier_item_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* dc_status_notifier_item_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 GVariant* _dbus_dc_status_notifier_item_get_category (DcStatusNotifierItem* self);
static GVariant* _dbus_dc_status_notifier_item_get_id (DcStatusNotifierItem* self);
static GVariant* _dbus_dc_status_notifier_item_get_title (DcStatusNotifierItem* self);
static GVariant* _dbus_dc_status_notifier_item_get_status (DcStatusNotifierItem* self);
static GVariant* _dbus_dc_status_notifier_item_get_window_id (DcStatusNotifierItem* self);
static GVariant* _dbus_dc_status_notifier_item_get_icon_name (DcStatusNotifierItem* self);
static GVariant* _dbus_dc_status_notifier_item_get_icon_theme_path (DcStatusNotifierItem* self);
static GVariant* _dbus_dc_status_notifier_item_get_icon_pixmap (DcStatusNotifierItem* self);
static GVariant* _dbus_dc_status_notifier_item_get_overlay_icon_name (DcStatusNotifierItem* self);
static GVariant* _dbus_dc_status_notifier_item_get_attention_icon_name (DcStatusNotifierItem* self);
static GVariant* _dbus_dc_status_notifier_item_get_attention_movie_name (DcStatusNotifierItem* self);
static GVariant* _dbus_dc_status_notifier_item_get_item_is_menu (DcStatusNotifierItem* self);
static GVariant* _dbus_dc_status_notifier_item_get_menu (DcStatusNotifierItem* self);
static gboolean dc_status_notifier_item_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_dc_status_notifier_item_new_title (GObject* _sender,
                                              gpointer* _data);
static void _dbus_dc_status_notifier_item_new_icon (GObject* _sender,
                                             gpointer* _data);
static void _dbus_dc_status_notifier_item_new_attention_icon (GObject* _sender,
                                                       gpointer* _data);
static void _dbus_dc_status_notifier_item_new_overlay_icon (GObject* _sender,
                                                     gpointer* _data);
static void _dbus_dc_status_notifier_item_new_status (GObject* _sender,
                                               const gchar* status,
                                               gpointer* _data);
static void _dc_status_notifier_item_unregister_object (gpointer user_data);
VALA_EXTERN GType dc_tray_menu_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DcTrayMenu, g_object_unref)
VALA_EXTERN guint dc_tray_menu_register_object (void* object,
                                    GDBusConnection* connection,
                                    const gchar* path,
                                    GError** error);
VALA_EXTERN void dc_tray_menu_set_notifications_enabled (DcTrayMenu* self,
                                             gboolean enabled);
VALA_EXTERN void dc_tray_menu_set_window_visible (DcTrayMenu* self,
                                      gboolean visible);
static gchar* dc_tray_menu_label_for (DcTrayMenu* self,
                               gint32 id);
static GVariant* dc_tray_menu_item_props (DcTrayMenu* self,
                                   gint32 id);
static GVariant* dc_tray_menu_layout_node (DcTrayMenu* self,
                                    gint32 id);
VALA_EXTERN void dc_tray_menu_get_layout (DcTrayMenu* self,
                              gint32 parent_id,
                              gint32 recursion_depth,
                              gchar** property_names,
                              gint property_names_length1,
                              guint32* revision,
                              GVariant** layout,
                              GError** error);
VALA_EXTERN void dc_tray_menu_get_group_properties (DcTrayMenu* self,
                                        gint32* ids,
                                        gint ids_length1,
                                        gchar** property_names,
                                        gint property_names_length1,
                                        GVariant** props,
                                        GError** error);
static gint32* _vala_array_dup29 (gint32* self,
                           gssize length);
VALA_EXTERN void dc_tray_menu_get_dbus_property (DcTrayMenu* self,
                                     gint32 id,
                                     const gchar* name,
                                     GVariant** value,
                                     GError** error);
VALA_EXTERN void dc_tray_menu_event (DcTrayMenu* self,
                         gint32 id,
                         const gchar* event_id,
                         GVariant* data,
                         guint32 timestamp,
                         GError** error);
VALA_EXTERN gboolean dc_tray_menu_about_to_show (DcTrayMenu* self,
                                     gint32 id,
                                     GError** error);
VALA_EXTERN void dc_tray_menu_about_to_show_group (DcTrayMenu* self,
                                       gint32* ids,
                                       gint ids_length1,
                                       gint32** updates_needed,
                                       gint* updates_needed_length1,
                                       gint32** id_errors,
                                       gint* id_errors_length1,
                                       GError** error);
VALA_EXTERN void dc_tray_menu_event_group (DcTrayMenu* self,
                               GVariant* events,
                               gint32** id_errors,
                               gint* id_errors_length1,
                               GError** error);
VALA_EXTERN DcTrayMenu* dc_tray_menu_new (void);
VALA_EXTERN DcTrayMenu* dc_tray_menu_construct (GType object_type);
VALA_EXTERN guint32 dc_tray_menu_get_version (DcTrayMenu* self);
VALA_EXTERN gchar* dc_tray_menu_get_text_direction (DcTrayMenu* self);
VALA_EXTERN gchar* dc_tray_menu_get_status (DcTrayMenu* self);
VALA_EXTERN gchar** dc_tray_menu_get_icon_theme_path (DcTrayMenu* self,
                                          gint* result_length1);
static void g_cclosure_user_marshal_VOID__UINT_INT (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data);
static void dc_tray_menu_finalize (GObject * obj);
static GType dc_tray_menu_get_type_once (void);
static void _vala_dc_tray_menu_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec);
static void _dbus_dc_tray_menu_get_layout (DcTrayMenu* self,
                                    GVariant* _parameters_,
                                    GDBusMethodInvocation* invocation);
static void _dbus_dc_tray_menu_get_group_properties (DcTrayMenu* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation);
static void _dbus_dc_tray_menu_get_dbus_property (DcTrayMenu* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation);
static void _dbus_dc_tray_menu_event (DcTrayMenu* self,
                               GVariant* _parameters_,
                               GDBusMethodInvocation* invocation);
static void _dbus_dc_tray_menu_about_to_show (DcTrayMenu* self,
                                       GVariant* _parameters_,
                                       GDBusMethodInvocation* invocation);
static void _dbus_dc_tray_menu_about_to_show_group (DcTrayMenu* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation);
static void _dbus_dc_tray_menu_event_group (DcTrayMenu* self,
                                     GVariant* _parameters_,
                                     GDBusMethodInvocation* invocation);
static void dc_tray_menu_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* dc_tray_menu_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 GVariant* _dbus_dc_tray_menu_get_version (DcTrayMenu* self);
static GVariant* _dbus_dc_tray_menu_get_text_direction (DcTrayMenu* self);
static GVariant* _dbus_dc_tray_menu_get_status (DcTrayMenu* self);
static GVariant* _dbus_dc_tray_menu_get_icon_theme_path (DcTrayMenu* self);
static gboolean dc_tray_menu_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_dc_tray_menu_layout_updated (GObject* _sender,
                                        guint32 revision,
                                        gint32 parent,
                                        gpointer* _data);
static void _dc_tray_menu_unregister_object (gpointer user_data);
VALA_EXTERN GType dc_tray_icon_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DcTrayIcon, g_object_unref)
VALA_EXTERN DcTrayIcon* dc_tray_icon_new (GDBusConnection* connection);
VALA_EXTERN DcTrayIcon* dc_tray_icon_construct (GType object_type,
                                    GDBusConnection* connection);
static void dc_tray_icon_request_show_on_current_desktop (DcTrayIcon* self);
static void _dc_tray_icon_request_show_on_current_desktop_dc_status_notifier_item_activate_requested (DcStatusNotifierItem* _sender,
                                                                                               gpointer self);
static void dc_tray_icon_request_window_toggle (DcTrayIcon* self);
static void _dc_tray_icon_request_window_toggle_dc_tray_menu_show_toggle_requested (DcTrayMenu* _sender,
                                                                             gpointer self);
static void __lambda292_ (DcTrayIcon* self);
static gboolean __lambda293_ (DcTrayIcon* self);
static gboolean ___lambda293__gsource_func (gpointer self);
static void ___lambda292__dc_tray_menu_quit_requested (DcTrayMenu* _sender,
                                                gpointer self);
static void __lambda294_ (DcTrayIcon* self,
                   gboolean v);
static Block124Data* block124_data_ref (Block124Data* _data124_);
static void block124_data_unref (void * _userdata_);
static gboolean __lambda295_ (Block124Data* _data124_);
static gboolean ___lambda295__gsource_func (gpointer self);
static void ___lambda294__dc_tray_menu_notifications_toggle_requested (DcTrayMenu* _sender,
                                                                gboolean enabled,
                                                                gpointer self);
static Block125Data* block125_data_ref (Block125Data* _data125_);
static void block125_data_unref (void * _userdata_);
static gboolean __lambda290_ (Block125Data* _data125_);
static gboolean ___lambda290__gsource_func (gpointer self);
static Block126Data* block126_data_ref (Block126Data* _data126_);
static void block126_data_unref (void * _userdata_);
static gboolean __lambda291_ (Block126Data* _data126_);
static gboolean ___lambda291__gsource_func (gpointer self);
VALA_EXTERN void dc_tray_icon_set_notifications_enabled (DcTrayIcon* self,
                                             gboolean enabled);
VALA_EXTERN void dc_tray_icon_set_window_visible (DcTrayIcon* self,
                                      gboolean window_visible);
VALA_EXTERN gboolean dc_tray_icon_show (DcTrayIcon* self);
static void __lambda296_ (DcTrayIcon* self,
                   GDBusConnection* c,
                   const gchar* n);
static void dc_tray_icon_register_with_watcher (DcTrayIcon* self,
                                         const gchar* name,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_);
static void dc_tray_icon_register_with_watcher_finish (DcTrayIcon* self,
                                                GAsyncResult* _res_);
static void ___lambda296__gbus_name_acquired_callback (GDBusConnection* connection,
                                                const gchar* name,
                                                gpointer self);
static void __lambda297_ (DcTrayIcon* self,
                   GDBusConnection* c,
                   const gchar* n);
static void ___lambda297__gbus_name_lost_callback (GDBusConnection* connection,
                                            const gchar* name,
                                            gpointer self);
VALA_EXTERN void dc_tray_icon_hide (DcTrayIcon* self);
static void dc_tray_icon_register_with_watcher_data_free (gpointer _data);
static gboolean dc_tray_icon_register_with_watcher_co (DcTrayIconRegisterWithWatcherData* _data_);
static void dc_tray_icon_register_with_watcher_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_);
static void dc_tray_icon_finalize (GObject * obj);
static GType dc_tray_icon_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static const GDBusArgInfo _dc_status_notifier_watcher_dbus_arg_info_register_status_notifier_item_service = {-1, "service", "s", NULL};
static const GDBusArgInfo * const _dc_status_notifier_watcher_dbus_arg_info_register_status_notifier_item_in[] = {&_dc_status_notifier_watcher_dbus_arg_info_register_status_notifier_item_service, NULL};
static const GDBusArgInfo * const _dc_status_notifier_watcher_dbus_arg_info_register_status_notifier_item_out[] = {NULL};
static const GDBusMethodInfo _dc_status_notifier_watcher_dbus_method_info_register_status_notifier_item = {-1, "RegisterStatusNotifierItem", (GDBusArgInfo **) (&_dc_status_notifier_watcher_dbus_arg_info_register_status_notifier_item_in), (GDBusArgInfo **) (&_dc_status_notifier_watcher_dbus_arg_info_register_status_notifier_item_out), NULL};
static const GDBusMethodInfo * const _dc_status_notifier_watcher_dbus_method_info[] = {&_dc_status_notifier_watcher_dbus_method_info_register_status_notifier_item, NULL};
static const GDBusSignalInfo * const _dc_status_notifier_watcher_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _dc_status_notifier_watcher_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _dc_status_notifier_watcher_dbus_interface_info = {-1, "org.kde.StatusNotifierWatcher", (GDBusMethodInfo **) (&_dc_status_notifier_watcher_dbus_method_info), (GDBusSignalInfo **) (&_dc_status_notifier_watcher_dbus_signal_info), (GDBusPropertyInfo **) (&_dc_status_notifier_watcher_dbus_property_info), NULL};
static const GDBusInterfaceVTable _dc_status_notifier_watcher_dbus_interface_vtable = {dc_status_notifier_watcher_dbus_interface_method_call, dc_status_notifier_watcher_dbus_interface_get_property, dc_status_notifier_watcher_dbus_interface_set_property};
static const GDBusArgInfo _dc_status_notifier_item_dbus_arg_info_context_menu_x = {-1, "x", "i", NULL};
static const GDBusArgInfo _dc_status_notifier_item_dbus_arg_info_context_menu_y = {-1, "y", "i", NULL};
static const GDBusArgInfo * const _dc_status_notifier_item_dbus_arg_info_context_menu_in[] = {&_dc_status_notifier_item_dbus_arg_info_context_menu_x, &_dc_status_notifier_item_dbus_arg_info_context_menu_y, NULL};
static const GDBusArgInfo * const _dc_status_notifier_item_dbus_arg_info_context_menu_out[] = {NULL};
static const GDBusMethodInfo _dc_status_notifier_item_dbus_method_info_context_menu = {-1, "ContextMenu", (GDBusArgInfo **) (&_dc_status_notifier_item_dbus_arg_info_context_menu_in), (GDBusArgInfo **) (&_dc_status_notifier_item_dbus_arg_info_context_menu_out), NULL};
static const GDBusArgInfo _dc_status_notifier_item_dbus_arg_info_activate_x = {-1, "x", "i", NULL};
static const GDBusArgInfo _dc_status_notifier_item_dbus_arg_info_activate_y = {-1, "y", "i", NULL};
static const GDBusArgInfo * const _dc_status_notifier_item_dbus_arg_info_activate_in[] = {&_dc_status_notifier_item_dbus_arg_info_activate_x, &_dc_status_notifier_item_dbus_arg_info_activate_y, NULL};
static const GDBusArgInfo * const _dc_status_notifier_item_dbus_arg_info_activate_out[] = {NULL};
static const GDBusMethodInfo _dc_status_notifier_item_dbus_method_info_activate = {-1, "Activate", (GDBusArgInfo **) (&_dc_status_notifier_item_dbus_arg_info_activate_in), (GDBusArgInfo **) (&_dc_status_notifier_item_dbus_arg_info_activate_out), NULL};
static const GDBusArgInfo _dc_status_notifier_item_dbus_arg_info_secondary_activate_x = {-1, "x", "i", NULL};
static const GDBusArgInfo _dc_status_notifier_item_dbus_arg_info_secondary_activate_y = {-1, "y", "i", NULL};
static const GDBusArgInfo * const _dc_status_notifier_item_dbus_arg_info_secondary_activate_in[] = {&_dc_status_notifier_item_dbus_arg_info_secondary_activate_x, &_dc_status_notifier_item_dbus_arg_info_secondary_activate_y, NULL};
static const GDBusArgInfo * const _dc_status_notifier_item_dbus_arg_info_secondary_activate_out[] = {NULL};
static const GDBusMethodInfo _dc_status_notifier_item_dbus_method_info_secondary_activate = {-1, "SecondaryActivate", (GDBusArgInfo **) (&_dc_status_notifier_item_dbus_arg_info_secondary_activate_in), (GDBusArgInfo **) (&_dc_status_notifier_item_dbus_arg_info_secondary_activate_out), NULL};
static const GDBusArgInfo _dc_status_notifier_item_dbus_arg_info_scroll_delta = {-1, "delta", "i", NULL};
static const GDBusArgInfo _dc_status_notifier_item_dbus_arg_info_scroll_orientation = {-1, "orientation", "s", NULL};
static const GDBusArgInfo * const _dc_status_notifier_item_dbus_arg_info_scroll_in[] = {&_dc_status_notifier_item_dbus_arg_info_scroll_delta, &_dc_status_notifier_item_dbus_arg_info_scroll_orientation, NULL};
static const GDBusArgInfo * const _dc_status_notifier_item_dbus_arg_info_scroll_out[] = {NULL};
static const GDBusMethodInfo _dc_status_notifier_item_dbus_method_info_scroll = {-1, "Scroll", (GDBusArgInfo **) (&_dc_status_notifier_item_dbus_arg_info_scroll_in), (GDBusArgInfo **) (&_dc_status_notifier_item_dbus_arg_info_scroll_out), NULL};
static const GDBusArgInfo _dc_status_notifier_item_dbus_arg_info_provide_xdg_activation_token_token = {-1, "token", "s", NULL};
static const GDBusArgInfo * const _dc_status_notifier_item_dbus_arg_info_provide_xdg_activation_token_in[] = {&_dc_status_notifier_item_dbus_arg_info_provide_xdg_activation_token_token, NULL};
static const GDBusArgInfo * const _dc_status_notifier_item_dbus_arg_info_provide_xdg_activation_token_out[] = {NULL};
static const GDBusMethodInfo _dc_status_notifier_item_dbus_method_info_provide_xdg_activation_token = {-1, "ProvideXdgActivationToken", (GDBusArgInfo **) (&_dc_status_notifier_item_dbus_arg_info_provide_xdg_activation_token_in), (GDBusArgInfo **) (&_dc_status_notifier_item_dbus_arg_info_provide_xdg_activation_token_out), NULL};
static const GDBusMethodInfo * const _dc_status_notifier_item_dbus_method_info[] = {&_dc_status_notifier_item_dbus_method_info_context_menu, &_dc_status_notifier_item_dbus_method_info_activate, &_dc_status_notifier_item_dbus_method_info_secondary_activate, &_dc_status_notifier_item_dbus_method_info_scroll, &_dc_status_notifier_item_dbus_method_info_provide_xdg_activation_token, NULL};
static const GDBusArgInfo * const _dc_status_notifier_item_dbus_arg_info_new_title[] = {NULL};
static const GDBusSignalInfo _dc_status_notifier_item_dbus_signal_info_new_title = {-1, "NewTitle", (GDBusArgInfo **) (&_dc_status_notifier_item_dbus_arg_info_new_title), NULL};
static const GDBusArgInfo * const _dc_status_notifier_item_dbus_arg_info_new_icon[] = {NULL};
static const GDBusSignalInfo _dc_status_notifier_item_dbus_signal_info_new_icon = {-1, "NewIcon", (GDBusArgInfo **) (&_dc_status_notifier_item_dbus_arg_info_new_icon), NULL};
static const GDBusArgInfo * const _dc_status_notifier_item_dbus_arg_info_new_attention_icon[] = {NULL};
static const GDBusSignalInfo _dc_status_notifier_item_dbus_signal_info_new_attention_icon = {-1, "NewAttentionIcon", (GDBusArgInfo **) (&_dc_status_notifier_item_dbus_arg_info_new_attention_icon), NULL};
static const GDBusArgInfo * const _dc_status_notifier_item_dbus_arg_info_new_overlay_icon[] = {NULL};
static const GDBusSignalInfo _dc_status_notifier_item_dbus_signal_info_new_overlay_icon = {-1, "NewOverlayIcon", (GDBusArgInfo **) (&_dc_status_notifier_item_dbus_arg_info_new_overlay_icon), NULL};
static const GDBusArgInfo _dc_status_notifier_item_dbus_arg_info_new_status_status = {-1, "status", "s", NULL};
static const GDBusArgInfo * const _dc_status_notifier_item_dbus_arg_info_new_status[] = {&_dc_status_notifier_item_dbus_arg_info_new_status_status, NULL};
static const GDBusSignalInfo _dc_status_notifier_item_dbus_signal_info_new_status = {-1, "NewStatus", (GDBusArgInfo **) (&_dc_status_notifier_item_dbus_arg_info_new_status), NULL};
static const GDBusSignalInfo * const _dc_status_notifier_item_dbus_signal_info[] = {&_dc_status_notifier_item_dbus_signal_info_new_title, &_dc_status_notifier_item_dbus_signal_info_new_icon, &_dc_status_notifier_item_dbus_signal_info_new_attention_icon, &_dc_status_notifier_item_dbus_signal_info_new_overlay_icon, &_dc_status_notifier_item_dbus_signal_info_new_status, NULL};
static const GDBusPropertyInfo _dc_status_notifier_item_dbus_property_info_category = {-1, "Category", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dc_status_notifier_item_dbus_property_info_id = {-1, "Id", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dc_status_notifier_item_dbus_property_info_title = {-1, "Title", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dc_status_notifier_item_dbus_property_info_status = {-1, "Status", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dc_status_notifier_item_dbus_property_info_window_id = {-1, "WindowId", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dc_status_notifier_item_dbus_property_info_icon_name = {-1, "IconName", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dc_status_notifier_item_dbus_property_info_icon_theme_path = {-1, "IconThemePath", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dc_status_notifier_item_dbus_property_info_icon_pixmap = {-1, "IconPixmap", "a(iiay)", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dc_status_notifier_item_dbus_property_info_overlay_icon_name = {-1, "OverlayIconName", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dc_status_notifier_item_dbus_property_info_attention_icon_name = {-1, "AttentionIconName", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dc_status_notifier_item_dbus_property_info_attention_movie_name = {-1, "AttentionMovieName", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dc_status_notifier_item_dbus_property_info_item_is_menu = {-1, "ItemIsMenu", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dc_status_notifier_item_dbus_property_info_menu = {-1, "Menu", "o", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _dc_status_notifier_item_dbus_property_info[] = {&_dc_status_notifier_item_dbus_property_info_category, &_dc_status_notifier_item_dbus_property_info_id, &_dc_status_notifier_item_dbus_property_info_title, &_dc_status_notifier_item_dbus_property_info_status, &_dc_status_notifier_item_dbus_property_info_window_id, &_dc_status_notifier_item_dbus_property_info_icon_name, &_dc_status_notifier_item_dbus_property_info_icon_theme_path, &_dc_status_notifier_item_dbus_property_info_icon_pixmap, &_dc_status_notifier_item_dbus_property_info_overlay_icon_name, &_dc_status_notifier_item_dbus_property_info_attention_icon_name, &_dc_status_notifier_item_dbus_property_info_attention_movie_name, &_dc_status_notifier_item_dbus_property_info_item_is_menu, &_dc_status_notifier_item_dbus_property_info_menu, NULL};
static const GDBusInterfaceInfo _dc_status_notifier_item_dbus_interface_info = {-1, "org.kde.StatusNotifierItem", (GDBusMethodInfo **) (&_dc_status_notifier_item_dbus_method_info), (GDBusSignalInfo **) (&_dc_status_notifier_item_dbus_signal_info), (GDBusPropertyInfo **) (&_dc_status_notifier_item_dbus_property_info), NULL};
static const GDBusInterfaceVTable _dc_status_notifier_item_dbus_interface_vtable = {dc_status_notifier_item_dbus_interface_method_call, dc_status_notifier_item_dbus_interface_get_property, dc_status_notifier_item_dbus_interface_set_property};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_get_layout_parent_id = {-1, "parent_id", "i", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_get_layout_recursion_depth = {-1, "recursion_depth", "i", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_get_layout_property_names = {-1, "property_names", "as", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_get_layout_revision = {-1, "revision", "u", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_get_layout_layout = {-1, "layout", "(ia{sv}av)", NULL};
static const GDBusArgInfo * const _dc_tray_menu_dbus_arg_info_get_layout_in[] = {&_dc_tray_menu_dbus_arg_info_get_layout_parent_id, &_dc_tray_menu_dbus_arg_info_get_layout_recursion_depth, &_dc_tray_menu_dbus_arg_info_get_layout_property_names, NULL};
static const GDBusArgInfo * const _dc_tray_menu_dbus_arg_info_get_layout_out[] = {&_dc_tray_menu_dbus_arg_info_get_layout_revision, &_dc_tray_menu_dbus_arg_info_get_layout_layout, NULL};
static const GDBusMethodInfo _dc_tray_menu_dbus_method_info_get_layout = {-1, "GetLayout", (GDBusArgInfo **) (&_dc_tray_menu_dbus_arg_info_get_layout_in), (GDBusArgInfo **) (&_dc_tray_menu_dbus_arg_info_get_layout_out), NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_get_group_properties_ids = {-1, "ids", "ai", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_get_group_properties_property_names = {-1, "property_names", "as", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_get_group_properties_props = {-1, "props", "a(ia{sv})", NULL};
static const GDBusArgInfo * const _dc_tray_menu_dbus_arg_info_get_group_properties_in[] = {&_dc_tray_menu_dbus_arg_info_get_group_properties_ids, &_dc_tray_menu_dbus_arg_info_get_group_properties_property_names, NULL};
static const GDBusArgInfo * const _dc_tray_menu_dbus_arg_info_get_group_properties_out[] = {&_dc_tray_menu_dbus_arg_info_get_group_properties_props, NULL};
static const GDBusMethodInfo _dc_tray_menu_dbus_method_info_get_group_properties = {-1, "GetGroupProperties", (GDBusArgInfo **) (&_dc_tray_menu_dbus_arg_info_get_group_properties_in), (GDBusArgInfo **) (&_dc_tray_menu_dbus_arg_info_get_group_properties_out), NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_get_dbus_property_id = {-1, "id", "i", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_get_dbus_property_name = {-1, "name", "s", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_get_dbus_property_value = {-1, "value", "v", NULL};
static const GDBusArgInfo * const _dc_tray_menu_dbus_arg_info_get_dbus_property_in[] = {&_dc_tray_menu_dbus_arg_info_get_dbus_property_id, &_dc_tray_menu_dbus_arg_info_get_dbus_property_name, NULL};
static const GDBusArgInfo * const _dc_tray_menu_dbus_arg_info_get_dbus_property_out[] = {&_dc_tray_menu_dbus_arg_info_get_dbus_property_value, NULL};
static const GDBusMethodInfo _dc_tray_menu_dbus_method_info_get_dbus_property = {-1, "GetProperty", (GDBusArgInfo **) (&_dc_tray_menu_dbus_arg_info_get_dbus_property_in), (GDBusArgInfo **) (&_dc_tray_menu_dbus_arg_info_get_dbus_property_out), NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_event_id = {-1, "id", "i", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_event_event_id = {-1, "event_id", "s", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_event_data = {-1, "data", "v", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_event_timestamp = {-1, "timestamp", "u", NULL};
static const GDBusArgInfo * const _dc_tray_menu_dbus_arg_info_event_in[] = {&_dc_tray_menu_dbus_arg_info_event_id, &_dc_tray_menu_dbus_arg_info_event_event_id, &_dc_tray_menu_dbus_arg_info_event_data, &_dc_tray_menu_dbus_arg_info_event_timestamp, NULL};
static const GDBusArgInfo * const _dc_tray_menu_dbus_arg_info_event_out[] = {NULL};
static const GDBusMethodInfo _dc_tray_menu_dbus_method_info_event = {-1, "Event", (GDBusArgInfo **) (&_dc_tray_menu_dbus_arg_info_event_in), (GDBusArgInfo **) (&_dc_tray_menu_dbus_arg_info_event_out), NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_about_to_show_id = {-1, "id", "i", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_about_to_show_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _dc_tray_menu_dbus_arg_info_about_to_show_in[] = {&_dc_tray_menu_dbus_arg_info_about_to_show_id, NULL};
static const GDBusArgInfo * const _dc_tray_menu_dbus_arg_info_about_to_show_out[] = {&_dc_tray_menu_dbus_arg_info_about_to_show_result, NULL};
static const GDBusMethodInfo _dc_tray_menu_dbus_method_info_about_to_show = {-1, "AboutToShow", (GDBusArgInfo **) (&_dc_tray_menu_dbus_arg_info_about_to_show_in), (GDBusArgInfo **) (&_dc_tray_menu_dbus_arg_info_about_to_show_out), NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_about_to_show_group_ids = {-1, "ids", "ai", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_about_to_show_group_updates_needed = {-1, "updates_needed", "ai", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_about_to_show_group_id_errors = {-1, "id_errors", "ai", NULL};
static const GDBusArgInfo * const _dc_tray_menu_dbus_arg_info_about_to_show_group_in[] = {&_dc_tray_menu_dbus_arg_info_about_to_show_group_ids, NULL};
static const GDBusArgInfo * const _dc_tray_menu_dbus_arg_info_about_to_show_group_out[] = {&_dc_tray_menu_dbus_arg_info_about_to_show_group_updates_needed, &_dc_tray_menu_dbus_arg_info_about_to_show_group_id_errors, NULL};
static const GDBusMethodInfo _dc_tray_menu_dbus_method_info_about_to_show_group = {-1, "AboutToShowGroup", (GDBusArgInfo **) (&_dc_tray_menu_dbus_arg_info_about_to_show_group_in), (GDBusArgInfo **) (&_dc_tray_menu_dbus_arg_info_about_to_show_group_out), NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_event_group_events = {-1, "events", "a(isvu)", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_event_group_id_errors = {-1, "id_errors", "ai", NULL};
static const GDBusArgInfo * const _dc_tray_menu_dbus_arg_info_event_group_in[] = {&_dc_tray_menu_dbus_arg_info_event_group_events, NULL};
static const GDBusArgInfo * const _dc_tray_menu_dbus_arg_info_event_group_out[] = {&_dc_tray_menu_dbus_arg_info_event_group_id_errors, NULL};
static const GDBusMethodInfo _dc_tray_menu_dbus_method_info_event_group = {-1, "EventGroup", (GDBusArgInfo **) (&_dc_tray_menu_dbus_arg_info_event_group_in), (GDBusArgInfo **) (&_dc_tray_menu_dbus_arg_info_event_group_out), NULL};
static const GDBusMethodInfo * const _dc_tray_menu_dbus_method_info[] = {&_dc_tray_menu_dbus_method_info_get_layout, &_dc_tray_menu_dbus_method_info_get_group_properties, &_dc_tray_menu_dbus_method_info_get_dbus_property, &_dc_tray_menu_dbus_method_info_event, &_dc_tray_menu_dbus_method_info_about_to_show, &_dc_tray_menu_dbus_method_info_about_to_show_group, &_dc_tray_menu_dbus_method_info_event_group, NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_layout_updated_revision = {-1, "revision", "u", NULL};
static const GDBusArgInfo _dc_tray_menu_dbus_arg_info_layout_updated_parent = {-1, "parent", "i", NULL};
static const GDBusArgInfo * const _dc_tray_menu_dbus_arg_info_layout_updated[] = {&_dc_tray_menu_dbus_arg_info_layout_updated_revision, &_dc_tray_menu_dbus_arg_info_layout_updated_parent, NULL};
static const GDBusSignalInfo _dc_tray_menu_dbus_signal_info_layout_updated = {-1, "LayoutUpdated", (GDBusArgInfo **) (&_dc_tray_menu_dbus_arg_info_layout_updated), NULL};
static const GDBusSignalInfo * const _dc_tray_menu_dbus_signal_info[] = {&_dc_tray_menu_dbus_signal_info_layout_updated, NULL};
static const GDBusPropertyInfo _dc_tray_menu_dbus_property_info_version = {-1, "Version", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dc_tray_menu_dbus_property_info_text_direction = {-1, "TextDirection", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dc_tray_menu_dbus_property_info_status = {-1, "Status", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dc_tray_menu_dbus_property_info_icon_theme_path = {-1, "IconThemePath", "as", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _dc_tray_menu_dbus_property_info[] = {&_dc_tray_menu_dbus_property_info_version, &_dc_tray_menu_dbus_property_info_text_direction, &_dc_tray_menu_dbus_property_info_status, &_dc_tray_menu_dbus_property_info_icon_theme_path, NULL};
static const GDBusInterfaceInfo _dc_tray_menu_dbus_interface_info = {-1, "com.canonical.dbusmenu", (GDBusMethodInfo **) (&_dc_tray_menu_dbus_method_info), (GDBusSignalInfo **) (&_dc_tray_menu_dbus_signal_info), (GDBusPropertyInfo **) (&_dc_tray_menu_dbus_property_info), NULL};
static const GDBusInterfaceVTable _dc_tray_menu_dbus_interface_vtable = {dc_tray_menu_dbus_interface_method_call, dc_tray_menu_dbus_interface_get_property, dc_tray_menu_dbus_interface_set_property};

void
dc_status_notifier_watcher_register_status_notifier_item (DcStatusNotifierWatcher* self,
                                                          const gchar* service,
                                                          GError** error)
{
	DcStatusNotifierWatcherIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = DC_STATUS_NOTIFIER_WATCHER_GET_INTERFACE (self);
	if (_iface_->register_status_notifier_item) {
		_iface_->register_status_notifier_item (self, service, error);
	}
}

static void
dc_status_notifier_watcher_default_init (DcStatusNotifierWatcherIface * iface,
                                         gpointer iface_data)
{
}

static GType
dc_status_notifier_watcher_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DcStatusNotifierWatcherIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dc_status_notifier_watcher_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType dc_status_notifier_watcher_type_id;
	dc_status_notifier_watcher_type_id = g_type_register_static (G_TYPE_INTERFACE, "DcStatusNotifierWatcher", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (dc_status_notifier_watcher_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (dc_status_notifier_watcher_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) dc_status_notifier_watcher_proxy_get_type);
	g_type_set_qdata (dc_status_notifier_watcher_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.kde.StatusNotifierWatcher");
	g_type_set_qdata (dc_status_notifier_watcher_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_dc_status_notifier_watcher_dbus_interface_info));
	g_type_set_qdata (dc_status_notifier_watcher_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) dc_status_notifier_watcher_register_object);
	return dc_status_notifier_watcher_type_id;
}

GType
dc_status_notifier_watcher_get_type (void)
{
	static volatile gsize dc_status_notifier_watcher_type_id__once = 0;
	if (g_once_init_enter (&dc_status_notifier_watcher_type_id__once)) {
		GType dc_status_notifier_watcher_type_id;
		dc_status_notifier_watcher_type_id = dc_status_notifier_watcher_get_type_once ();
		g_once_init_leave (&dc_status_notifier_watcher_type_id__once, dc_status_notifier_watcher_type_id);
	}
	return dc_status_notifier_watcher_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (DcStatusNotifierWatcherProxy, dc_status_notifier_watcher_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (DC_TYPE_STATUS_NOTIFIER_WATCHER, dc_status_notifier_watcher_proxy_dc_status_notifier_watcher_interface_init) )
static void
dc_status_notifier_watcher_proxy_class_init (DcStatusNotifierWatcherProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = dc_status_notifier_watcher_proxy_g_signal;
}

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

static void
dc_status_notifier_watcher_proxy_init (DcStatusNotifierWatcherProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_dc_status_notifier_watcher_dbus_interface_info));
}

static void
dc_status_notifier_watcher_proxy_register_status_notifier_item (DcStatusNotifierWatcher* self,
                                                                const gchar* service,
                                                                GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.kde.StatusNotifierWatcher", "RegisterStatusNotifierItem");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (service));
	_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
dc_status_notifier_watcher_proxy_dc_status_notifier_watcher_interface_init (DcStatusNotifierWatcherIface* iface)
{
	iface->register_status_notifier_item = dc_status_notifier_watcher_proxy_register_status_notifier_item;
}

static void
_dbus_dc_status_notifier_watcher_register_status_notifier_item (DcStatusNotifierWatcher* self,
                                                                GVariant* _parameters_,
                                                                GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* service = NULL;
	GVariant* _tmp7_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp7_ = g_variant_iter_next_value (&_arguments_iter);
	service = g_variant_dup_string (_tmp7_, NULL);
	g_variant_unref (_tmp7_);
	dc_status_notifier_watcher_register_status_notifier_item (self, service, &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_free0 (service);
	;
}

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

static GVariant*
dc_status_notifier_watcher_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)
{
	return NULL;
}

static gboolean
dc_status_notifier_watcher_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)
{
	return FALSE;
}

guint
dc_status_notifier_watcher_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 *) (&_dc_status_notifier_watcher_dbus_interface_info), &_dc_status_notifier_watcher_dbus_interface_vtable, data, _dc_status_notifier_watcher_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_dc_status_notifier_watcher_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
dc_status_notifier_item_get_instance_private (DcStatusNotifierItem* self)
{
	return G_STRUCT_MEMBER_P (self, DcStatusNotifierItem_private_offset);
}

DcStatusNotifierItem*
dc_status_notifier_item_construct (GType object_type)
{
	DcStatusNotifierItem * self = NULL;
	GVariant* _tmp0_;
	self = (DcStatusNotifierItem*) g_object_new (object_type, NULL);
	_tmp0_ = dc_status_notifier_item_build_pixmaps ();
	_g_variant_unref0 (self->priv->_icon_pixmap);
	self->priv->_icon_pixmap = _tmp0_;
	return self;
}

DcStatusNotifierItem*
dc_status_notifier_item_new (void)
{
	return dc_status_notifier_item_construct (DC_TYPE_STATUS_NOTIFIER_ITEM);
}

static GVariant*
dc_status_notifier_item_build_pixmaps (void)
{
	GVariantBuilder* b = NULL;
	GVariantType* _tmp0_;
	GVariantType* _tmp1_;
	GVariantBuilder* _tmp2_;
	GVariantBuilder* _tmp3_;
	gint* _tmp4_;
	GVariantBuilder* _tmp6_;
	GVariant* _tmp7_;
	GVariant* result;
	_tmp0_ = g_variant_type_new ("a(iiay)");
	_tmp1_ = _tmp0_;
	_tmp2_ = g_variant_builder_new (_tmp1_);
	_tmp3_ = _tmp2_;
	_g_variant_type_free0 (_tmp1_);
	b = _tmp3_;
	_tmp4_ = g_new0 (gint, 4);
	_tmp4_[0] = 22;
	_tmp4_[1] = 24;
	_tmp4_[2] = 32;
	_tmp4_[3] = 48;
	{
		gint* size_collection = NULL;
		gint size_collection_length1 = 0;
		gint _size_collection_size_ = 0;
		gint size_it = 0;
		size_collection = _tmp4_;
		size_collection_length1 = 4;
		for (size_it = 0; size_it < size_collection_length1; size_it = size_it + 1) {
			gint size = 0;
			size = size_collection[size_it];
			{
				GVariantBuilder* _tmp5_;
				_tmp5_ = b;
				dc_status_notifier_item_append_pixmap (_tmp5_, size);
			}
		}
		size_collection = (g_free (size_collection), NULL);
	}
	_tmp6_ = b;
	_tmp7_ = g_variant_builder_end (_tmp6_);
	g_variant_ref_sink (_tmp7_);
	result = _tmp7_;
	_g_variant_builder_unref0 (b);
	return result;
}

static void
dc_status_notifier_item_append_pixmap (GVariantBuilder* b,
                                       gint size)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (b != NULL);
	{
		GdkPixbuf* pix = NULL;
		GdkPixbuf* _tmp0_;
		GdkPixbuf* _tmp1_;
		gint w = 0;
		GdkPixbuf* _tmp4_;
		gint h = 0;
		GdkPixbuf* _tmp5_;
		gint stride = 0;
		GdkPixbuf* _tmp6_;
		gint channels = 0;
		GdkPixbuf* _tmp7_;
		guint8* src = NULL;
		GdkPixbuf* _tmp8_;
		guint8* _tmp9_;
		gint src_length1;
		gint _src_size_;
		guint8* bytes = NULL;
		guint8* _tmp10_;
		gint bytes_length1;
		gint _bytes_size_;
		gint o = 0;
		GVariantType* _tmp34_;
		GVariantType* _tmp35_;
		guint8* _tmp36_;
		gint _tmp36__length1;
		GBytes* _tmp37_;
		GBytes* _tmp38_;
		GVariant* _tmp39_;
		GVariant* _tmp40_;
		_tmp0_ = gdk_pixbuf_new_from_resource_at_scale (DC_STATUS_NOTIFIER_ITEM_ICON_RESOURCE, size, size, TRUE, &_inner_error0_);
		pix = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp1_ = pix;
		if (!gdk_pixbuf_get_has_alpha (_tmp1_)) {
			GdkPixbuf* _tmp2_;
			GdkPixbuf* _tmp3_;
			_tmp2_ = pix;
			_tmp3_ = gdk_pixbuf_add_alpha (_tmp2_, FALSE, (guint8) 0, (guint8) 0, (guint8) 0);
			_g_object_unref0 (pix);
			pix = _tmp3_;
		}
		_tmp4_ = pix;
		w = gdk_pixbuf_get_width (_tmp4_);
		_tmp5_ = pix;
		h = gdk_pixbuf_get_height (_tmp5_);
		_tmp6_ = pix;
		stride = gdk_pixbuf_get_rowstride (_tmp6_);
		_tmp7_ = pix;
		channels = gdk_pixbuf_get_n_channels (_tmp7_);
		_tmp8_ = pix;
		_tmp9_ = gdk_pixbuf_get_pixels (_tmp8_);
		src = _tmp9_;
		src_length1 = -1;
		_src_size_ = src_length1;
		_tmp10_ = g_new0 (guint8, (w * h) * 4);
		bytes = _tmp10_;
		bytes_length1 = (w * h) * 4;
		_bytes_size_ = bytes_length1;
		o = 0;
		{
			gint y = 0;
			y = 0;
			{
				gboolean _tmp11_ = FALSE;
				_tmp11_ = TRUE;
				while (TRUE) {
					if (!_tmp11_) {
						gint _tmp12_;
						_tmp12_ = y;
						y = _tmp12_ + 1;
					}
					_tmp11_ = FALSE;
					if (!(y < h)) {
						break;
					}
					{
						gint x = 0;
						x = 0;
						{
							gboolean _tmp13_ = FALSE;
							_tmp13_ = TRUE;
							while (TRUE) {
								gint p = 0;
								guint8 _tmp15_ = 0U;
								guint8* _tmp18_;
								gint _tmp18__length1;
								gint _tmp19_;
								guint8* _tmp20_;
								gint _tmp20__length1;
								gint _tmp21_;
								guint8* _tmp22_;
								gint _tmp22__length1;
								guint8 _tmp23_;
								guint8* _tmp24_;
								gint _tmp24__length1;
								gint _tmp25_;
								guint8* _tmp26_;
								gint _tmp26__length1;
								gint _tmp27_;
								guint8 _tmp28_;
								guint8* _tmp29_;
								gint _tmp29__length1;
								gint _tmp30_;
								guint8* _tmp31_;
								gint _tmp31__length1;
								gint _tmp32_;
								guint8 _tmp33_;
								if (!_tmp13_) {
									gint _tmp14_;
									_tmp14_ = x;
									x = _tmp14_ + 1;
								}
								_tmp13_ = FALSE;
								if (!(x < w)) {
									break;
								}
								p = (y * stride) + (x * channels);
								if (channels == 4) {
									guint8* _tmp16_;
									gint _tmp16__length1;
									guint8 _tmp17_;
									_tmp16_ = src;
									_tmp16__length1 = src_length1;
									_tmp17_ = _tmp16_[p + 3];
									_tmp15_ = _tmp17_;
								} else {
									_tmp15_ = (guint8) 255;
								}
								_tmp18_ = bytes;
								_tmp18__length1 = bytes_length1;
								_tmp19_ = o;
								o = _tmp19_ + 1;
								_tmp18_[_tmp19_] = _tmp15_;
								_tmp20_ = bytes;
								_tmp20__length1 = bytes_length1;
								_tmp21_ = o;
								o = _tmp21_ + 1;
								_tmp22_ = src;
								_tmp22__length1 = src_length1;
								_tmp23_ = _tmp22_[p];
								_tmp20_[_tmp21_] = _tmp23_;
								_tmp24_ = bytes;
								_tmp24__length1 = bytes_length1;
								_tmp25_ = o;
								o = _tmp25_ + 1;
								_tmp26_ = src;
								_tmp26__length1 = src_length1;
								_tmp27_ = p;
								_tmp28_ = _tmp26_[_tmp27_ + 1];
								_tmp24_[_tmp25_] = _tmp28_;
								_tmp29_ = bytes;
								_tmp29__length1 = bytes_length1;
								_tmp30_ = o;
								o = _tmp30_ + 1;
								_tmp31_ = src;
								_tmp31__length1 = src_length1;
								_tmp32_ = p;
								_tmp33_ = _tmp31_[_tmp32_ + 2];
								_tmp29_[_tmp30_] = _tmp33_;
							}
						}
					}
				}
			}
		}
		_tmp34_ = g_variant_type_new ("ay");
		_tmp35_ = _tmp34_;
		_tmp36_ = bytes;
		_tmp36__length1 = bytes_length1;
		_tmp37_ = g_bytes_new (_tmp36_, _tmp36__length1);
		_tmp38_ = _tmp37_;
		_tmp39_ = g_variant_new_from_bytes (_tmp35_, _tmp38_, TRUE);
		g_variant_ref_sink (_tmp39_);
		_tmp40_ = _tmp39_;
		g_variant_builder_add (b, "(ii@ay)", w, h, _tmp40_, NULL);
		_g_variant_unref0 (_tmp40_);
		_g_bytes_unref0 (_tmp38_);
		_g_variant_type_free0 (_tmp35_);
		bytes = (g_free (bytes), NULL);
		_g_object_unref0 (pix);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp41_;
		const gchar* _tmp42_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp41_ = e;
		_tmp42_ = _tmp41_->message;
		g_info ("tray_icon.vala:58: tray pixmap %dpx unavailable: %s", size, _tmp42_);
		_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;
	}
}

void
dc_status_notifier_item_context_menu (DcStatusNotifierItem* self,
                                      gint x,
                                      gint y,
                                      GError** error)
{
	g_return_if_fail (self != NULL);
}

void
dc_status_notifier_item_activate (DcStatusNotifierItem* self,
                                  gint x,
                                  gint y,
                                  GError** error)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, dc_status_notifier_item_signals[DC_STATUS_NOTIFIER_ITEM_ACTIVATE_REQUESTED_SIGNAL], 0);
}

void
dc_status_notifier_item_secondary_activate (DcStatusNotifierItem* self,
                                            gint x,
                                            gint y,
                                            GError** error)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, dc_status_notifier_item_signals[DC_STATUS_NOTIFIER_ITEM_ACTIVATE_REQUESTED_SIGNAL], 0);
}

void
dc_status_notifier_item_scroll (DcStatusNotifierItem* self,
                                gint delta,
                                const gchar* orientation,
                                GError** error)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (orientation != NULL);
}

void
dc_status_notifier_item_provide_xdg_activation_token (DcStatusNotifierItem* self,
                                                      const gchar* token,
                                                      GError** error)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (token != NULL);
	_tmp0_ = g_strdup (token);
	_g_free0 (self->priv->pending_activation_token);
	self->priv->pending_activation_token = _tmp0_;
}

gchar*
dc_status_notifier_item_take_activation_token (DcStatusNotifierItem* self)
{
	gchar* token = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->pending_activation_token;
	_tmp1_ = g_strdup (_tmp0_);
	token = _tmp1_;
	_g_free0 (self->priv->pending_activation_token);
	self->priv->pending_activation_token = NULL;
	result = token;
	return result;
}

gchar*
dc_status_notifier_item_get_category (DcStatusNotifierItem* self)
{
	gchar* result;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("Communications");
	result = _tmp0_;
	return result;
}

gchar*
dc_status_notifier_item_get_id (DcStatusNotifierItem* self)
{
	gchar* result;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("parla");
	result = _tmp0_;
	return result;
}

gchar*
dc_status_notifier_item_get_title (DcStatusNotifierItem* self)
{
	gchar* result;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("Parla");
	result = _tmp0_;
	return result;
}

gchar*
dc_status_notifier_item_get_status (DcStatusNotifierItem* self)
{
	gchar* result;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("Active");
	result = _tmp0_;
	return result;
}

guint32
dc_status_notifier_item_get_window_id (DcStatusNotifierItem* self)
{
	guint32 result;
	g_return_val_if_fail (self != NULL, 0U);
	result = (guint32) 0;
	return result;
}

gchar*
dc_status_notifier_item_get_icon_name (DcStatusNotifierItem* self)
{
	gchar* result;
	const gchar* _tmp0_ = NULL;
	GVariant* _tmp1_;
	gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->_icon_pixmap;
	if (g_variant_n_children (_tmp1_) > ((gsize) 0)) {
		_tmp0_ = "";
	} else {
		_tmp0_ = DC_STATUS_NOTIFIER_ITEM_ICON_NAME;
	}
	_tmp2_ = g_strdup (_tmp0_);
	result = _tmp2_;
	return result;
}

gchar*
dc_status_notifier_item_get_icon_theme_path (DcStatusNotifierItem* self)
{
	gchar* result;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("");
	result = _tmp0_;
	return result;
}

static gpointer
_g_variant_ref0 (gpointer self)
{
	return self ? g_variant_ref (self) : NULL;
}

GVariant*
dc_status_notifier_item_get_icon_pixmap (DcStatusNotifierItem* self)
{
	GVariant* result;
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_icon_pixmap;
	_tmp1_ = _g_variant_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

gchar*
dc_status_notifier_item_get_overlay_icon_name (DcStatusNotifierItem* self)
{
	gchar* result;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("");
	result = _tmp0_;
	return result;
}

gchar*
dc_status_notifier_item_get_attention_icon_name (DcStatusNotifierItem* self)
{
	gchar* result;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("");
	result = _tmp0_;
	return result;
}

gchar*
dc_status_notifier_item_get_attention_movie_name (DcStatusNotifierItem* self)
{
	gchar* result;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("");
	result = _tmp0_;
	return result;
}

gboolean
dc_status_notifier_item_get_item_is_menu (DcStatusNotifierItem* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = FALSE;
	return result;
}

char*
dc_status_notifier_item_get_menu (DcStatusNotifierItem* self)
{
	char* result;
	char* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("/MenuBar");
	result = _tmp0_;
	return result;
}

static void
dc_status_notifier_item_class_init (DcStatusNotifierItemClass * klass,
                                    gpointer klass_data)
{
	dc_status_notifier_item_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DcStatusNotifierItem_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dc_status_notifier_item_get_property;
	G_OBJECT_CLASS (klass)->finalize = dc_status_notifier_item_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_STATUS_NOTIFIER_ITEM_CATEGORY_PROPERTY, dc_status_notifier_item_properties[DC_STATUS_NOTIFIER_ITEM_CATEGORY_PROPERTY] = g_param_spec_string ("category", "category", "category", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_STATUS_NOTIFIER_ITEM_ID_PROPERTY, dc_status_notifier_item_properties[DC_STATUS_NOTIFIER_ITEM_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_STATUS_NOTIFIER_ITEM_TITLE_PROPERTY, dc_status_notifier_item_properties[DC_STATUS_NOTIFIER_ITEM_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_STATUS_NOTIFIER_ITEM_STATUS_PROPERTY, dc_status_notifier_item_properties[DC_STATUS_NOTIFIER_ITEM_STATUS_PROPERTY] = g_param_spec_string ("status", "status", "status", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_STATUS_NOTIFIER_ITEM_WINDOW_ID_PROPERTY, dc_status_notifier_item_properties[DC_STATUS_NOTIFIER_ITEM_WINDOW_ID_PROPERTY] = g_param_spec_uint ("window-id", "window-id", "window-id", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_STATUS_NOTIFIER_ITEM_ICON_NAME_PROPERTY, dc_status_notifier_item_properties[DC_STATUS_NOTIFIER_ITEM_ICON_NAME_PROPERTY] = g_param_spec_string ("icon-name", "icon-name", "icon-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_STATUS_NOTIFIER_ITEM_ICON_THEME_PATH_PROPERTY, dc_status_notifier_item_properties[DC_STATUS_NOTIFIER_ITEM_ICON_THEME_PATH_PROPERTY] = g_param_spec_string ("icon-theme-path", "icon-theme-path", "icon-theme-path", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_STATUS_NOTIFIER_ITEM_ICON_PIXMAP_PROPERTY, dc_status_notifier_item_properties[DC_STATUS_NOTIFIER_ITEM_ICON_PIXMAP_PROPERTY] = g_param_spec_variant ("icon-pixmap", "icon-pixmap", "icon-pixmap", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_STATUS_NOTIFIER_ITEM_OVERLAY_ICON_NAME_PROPERTY, dc_status_notifier_item_properties[DC_STATUS_NOTIFIER_ITEM_OVERLAY_ICON_NAME_PROPERTY] = g_param_spec_string ("overlay-icon-name", "overlay-icon-name", "overlay-icon-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_STATUS_NOTIFIER_ITEM_ATTENTION_ICON_NAME_PROPERTY, dc_status_notifier_item_properties[DC_STATUS_NOTIFIER_ITEM_ATTENTION_ICON_NAME_PROPERTY] = g_param_spec_string ("attention-icon-name", "attention-icon-name", "attention-icon-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_STATUS_NOTIFIER_ITEM_ATTENTION_MOVIE_NAME_PROPERTY, dc_status_notifier_item_properties[DC_STATUS_NOTIFIER_ITEM_ATTENTION_MOVIE_NAME_PROPERTY] = g_param_spec_string ("attention-movie-name", "attention-movie-name", "attention-movie-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_STATUS_NOTIFIER_ITEM_ITEM_IS_MENU_PROPERTY, dc_status_notifier_item_properties[DC_STATUS_NOTIFIER_ITEM_ITEM_IS_MENU_PROPERTY] = g_param_spec_boolean ("item-is-menu", "item-is-menu", "item-is-menu", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_STATUS_NOTIFIER_ITEM_MENU_PROPERTY, dc_status_notifier_item_properties[DC_STATUS_NOTIFIER_ITEM_MENU_PROPERTY] = g_param_spec_string ("menu", "menu", "menu", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	dc_status_notifier_item_signals[DC_STATUS_NOTIFIER_ITEM_NEW_TITLE_SIGNAL] = g_signal_new ("new-title", DC_TYPE_STATUS_NOTIFIER_ITEM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	dc_status_notifier_item_signals[DC_STATUS_NOTIFIER_ITEM_NEW_ICON_SIGNAL] = g_signal_new ("new-icon", DC_TYPE_STATUS_NOTIFIER_ITEM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	dc_status_notifier_item_signals[DC_STATUS_NOTIFIER_ITEM_NEW_ATTENTION_ICON_SIGNAL] = g_signal_new ("new-attention-icon", DC_TYPE_STATUS_NOTIFIER_ITEM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	dc_status_notifier_item_signals[DC_STATUS_NOTIFIER_ITEM_NEW_OVERLAY_ICON_SIGNAL] = g_signal_new ("new-overlay-icon", DC_TYPE_STATUS_NOTIFIER_ITEM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	dc_status_notifier_item_signals[DC_STATUS_NOTIFIER_ITEM_NEW_STATUS_SIGNAL] = g_signal_new ("new-status", DC_TYPE_STATUS_NOTIFIER_ITEM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	dc_status_notifier_item_signals[DC_STATUS_NOTIFIER_ITEM_ACTIVATE_REQUESTED_SIGNAL] = g_signal_new ("activate-requested", DC_TYPE_STATUS_NOTIFIER_ITEM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
dc_status_notifier_item_instance_init (DcStatusNotifierItem * self,
                                       gpointer klass)
{
	self->priv = dc_status_notifier_item_get_instance_private (self);
	self->priv->pending_activation_token = NULL;
}

static void
dc_status_notifier_item_finalize (GObject * obj)
{
	DcStatusNotifierItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DC_TYPE_STATUS_NOTIFIER_ITEM, DcStatusNotifierItem);
	_g_variant_unref0 (self->priv->_icon_pixmap);
	_g_free0 (self->priv->pending_activation_token);
	G_OBJECT_CLASS (dc_status_notifier_item_parent_class)->finalize (obj);
}

static GType
dc_status_notifier_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DcStatusNotifierItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dc_status_notifier_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DcStatusNotifierItem), 0, (GInstanceInitFunc) dc_status_notifier_item_instance_init, NULL };
	GType dc_status_notifier_item_type_id;
	dc_status_notifier_item_type_id = g_type_register_static (G_TYPE_OBJECT, "DcStatusNotifierItem", &g_define_type_info, 0);
	g_type_set_qdata (dc_status_notifier_item_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) dc_status_notifier_item_register_object);
	DcStatusNotifierItem_private_offset = g_type_add_instance_private (dc_status_notifier_item_type_id, sizeof (DcStatusNotifierItemPrivate));
	return dc_status_notifier_item_type_id;
}

GType
dc_status_notifier_item_get_type (void)
{
	static volatile gsize dc_status_notifier_item_type_id__once = 0;
	if (g_once_init_enter (&dc_status_notifier_item_type_id__once)) {
		GType dc_status_notifier_item_type_id;
		dc_status_notifier_item_type_id = dc_status_notifier_item_get_type_once ();
		g_once_init_leave (&dc_status_notifier_item_type_id__once, dc_status_notifier_item_type_id);
	}
	return dc_status_notifier_item_type_id__once;
}

static void
_vala_dc_status_notifier_item_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	DcStatusNotifierItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DC_TYPE_STATUS_NOTIFIER_ITEM, DcStatusNotifierItem);
	switch (property_id) {
		case DC_STATUS_NOTIFIER_ITEM_CATEGORY_PROPERTY:
		g_value_take_string (value, dc_status_notifier_item_get_category (self));
		break;
		case DC_STATUS_NOTIFIER_ITEM_ID_PROPERTY:
		g_value_take_string (value, dc_status_notifier_item_get_id (self));
		break;
		case DC_STATUS_NOTIFIER_ITEM_TITLE_PROPERTY:
		g_value_take_string (value, dc_status_notifier_item_get_title (self));
		break;
		case DC_STATUS_NOTIFIER_ITEM_STATUS_PROPERTY:
		g_value_take_string (value, dc_status_notifier_item_get_status (self));
		break;
		case DC_STATUS_NOTIFIER_ITEM_WINDOW_ID_PROPERTY:
		g_value_set_uint (value, dc_status_notifier_item_get_window_id (self));
		break;
		case DC_STATUS_NOTIFIER_ITEM_ICON_NAME_PROPERTY:
		g_value_take_string (value, dc_status_notifier_item_get_icon_name (self));
		break;
		case DC_STATUS_NOTIFIER_ITEM_ICON_THEME_PATH_PROPERTY:
		g_value_take_string (value, dc_status_notifier_item_get_icon_theme_path (self));
		break;
		case DC_STATUS_NOTIFIER_ITEM_ICON_PIXMAP_PROPERTY:
		g_value_take_variant (value, dc_status_notifier_item_get_icon_pixmap (self));
		break;
		case DC_STATUS_NOTIFIER_ITEM_OVERLAY_ICON_NAME_PROPERTY:
		g_value_take_string (value, dc_status_notifier_item_get_overlay_icon_name (self));
		break;
		case DC_STATUS_NOTIFIER_ITEM_ATTENTION_ICON_NAME_PROPERTY:
		g_value_take_string (value, dc_status_notifier_item_get_attention_icon_name (self));
		break;
		case DC_STATUS_NOTIFIER_ITEM_ATTENTION_MOVIE_NAME_PROPERTY:
		g_value_take_string (value, dc_status_notifier_item_get_attention_movie_name (self));
		break;
		case DC_STATUS_NOTIFIER_ITEM_ITEM_IS_MENU_PROPERTY:
		g_value_set_boolean (value, dc_status_notifier_item_get_item_is_menu (self));
		break;
		case DC_STATUS_NOTIFIER_ITEM_MENU_PROPERTY:
		g_value_take_string (value, dc_status_notifier_item_get_menu (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_dbus_dc_status_notifier_item_context_menu (DcStatusNotifierItem* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint x = 0;
	GVariant* _tmp8_;
	gint y = 0;
	GVariant* _tmp9_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp8_ = g_variant_iter_next_value (&_arguments_iter);
	x = g_variant_get_int32 (_tmp8_);
	g_variant_unref (_tmp8_);
	_tmp9_ = g_variant_iter_next_value (&_arguments_iter);
	y = g_variant_get_int32 (_tmp9_);
	g_variant_unref (_tmp9_);
	dc_status_notifier_item_context_menu (self, x, y, &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
_dbus_dc_status_notifier_item_activate (DcStatusNotifierItem* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint x = 0;
	GVariant* _tmp10_;
	gint y = 0;
	GVariant* _tmp11_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp10_ = g_variant_iter_next_value (&_arguments_iter);
	x = g_variant_get_int32 (_tmp10_);
	g_variant_unref (_tmp10_);
	_tmp11_ = g_variant_iter_next_value (&_arguments_iter);
	y = g_variant_get_int32 (_tmp11_);
	g_variant_unref (_tmp11_);
	dc_status_notifier_item_activate (self, x, y, &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
_dbus_dc_status_notifier_item_secondary_activate (DcStatusNotifierItem* self,
                                                  GVariant* _parameters_,
                                                  GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint x = 0;
	GVariant* _tmp12_;
	gint y = 0;
	GVariant* _tmp13_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp12_ = g_variant_iter_next_value (&_arguments_iter);
	x = g_variant_get_int32 (_tmp12_);
	g_variant_unref (_tmp12_);
	_tmp13_ = g_variant_iter_next_value (&_arguments_iter);
	y = g_variant_get_int32 (_tmp13_);
	g_variant_unref (_tmp13_);
	dc_status_notifier_item_secondary_activate (self, x, y, &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
_dbus_dc_status_notifier_item_scroll (DcStatusNotifierItem* self,
                                      GVariant* _parameters_,
                                      GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint delta = 0;
	GVariant* _tmp14_;
	gchar* orientation = NULL;
	GVariant* _tmp15_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp14_ = g_variant_iter_next_value (&_arguments_iter);
	delta = g_variant_get_int32 (_tmp14_);
	g_variant_unref (_tmp14_);
	_tmp15_ = g_variant_iter_next_value (&_arguments_iter);
	orientation = g_variant_dup_string (_tmp15_, NULL);
	g_variant_unref (_tmp15_);
	dc_status_notifier_item_scroll (self, delta, orientation, &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_free0 (orientation);
	;
}

static void
_dbus_dc_status_notifier_item_provide_xdg_activation_token (DcStatusNotifierItem* self,
                                                            GVariant* _parameters_,
                                                            GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* token = NULL;
	GVariant* _tmp16_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp16_ = g_variant_iter_next_value (&_arguments_iter);
	token = g_variant_dup_string (_tmp16_, NULL);
	g_variant_unref (_tmp16_);
	dc_status_notifier_item_provide_xdg_activation_token (self, token, &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_free0 (token);
	;
}

static void
dc_status_notifier_item_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, "ContextMenu") == 0) {
		_dbus_dc_status_notifier_item_context_menu (object, parameters, invocation);
	} else if (strcmp (method_name, "Activate") == 0) {
		_dbus_dc_status_notifier_item_activate (object, parameters, invocation);
	} else if (strcmp (method_name, "SecondaryActivate") == 0) {
		_dbus_dc_status_notifier_item_secondary_activate (object, parameters, invocation);
	} else if (strcmp (method_name, "Scroll") == 0) {
		_dbus_dc_status_notifier_item_scroll (object, parameters, invocation);
	} else if (strcmp (method_name, "ProvideXdgActivationToken") == 0) {
		_dbus_dc_status_notifier_item_provide_xdg_activation_token (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_dc_status_notifier_item_get_category (DcStatusNotifierItem* self)
{
	gchar* result;
	GVariant* _reply;
	result = dc_status_notifier_item_get_category (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_dc_status_notifier_item_get_id (DcStatusNotifierItem* self)
{
	gchar* result;
	GVariant* _reply;
	result = dc_status_notifier_item_get_id (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_dc_status_notifier_item_get_title (DcStatusNotifierItem* self)
{
	gchar* result;
	GVariant* _reply;
	result = dc_status_notifier_item_get_title (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_dc_status_notifier_item_get_status (DcStatusNotifierItem* self)
{
	gchar* result;
	GVariant* _reply;
	result = dc_status_notifier_item_get_status (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_dc_status_notifier_item_get_window_id (DcStatusNotifierItem* self)
{
	guint32 result;
	GVariant* _reply;
	result = dc_status_notifier_item_get_window_id (self);
	_reply = g_variant_new_uint32 (result);
	return _reply;
}

static GVariant*
_dbus_dc_status_notifier_item_get_icon_name (DcStatusNotifierItem* self)
{
	gchar* result;
	GVariant* _reply;
	result = dc_status_notifier_item_get_icon_name (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_dc_status_notifier_item_get_icon_theme_path (DcStatusNotifierItem* self)
{
	gchar* result;
	GVariant* _reply;
	result = dc_status_notifier_item_get_icon_theme_path (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_dc_status_notifier_item_get_icon_pixmap (DcStatusNotifierItem* self)
{
	GVariant* result;
	GVariant* _reply;
	result = dc_status_notifier_item_get_icon_pixmap (self);
	_reply = result;
	return _reply;
}

static GVariant*
_dbus_dc_status_notifier_item_get_overlay_icon_name (DcStatusNotifierItem* self)
{
	gchar* result;
	GVariant* _reply;
	result = dc_status_notifier_item_get_overlay_icon_name (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_dc_status_notifier_item_get_attention_icon_name (DcStatusNotifierItem* self)
{
	gchar* result;
	GVariant* _reply;
	result = dc_status_notifier_item_get_attention_icon_name (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_dc_status_notifier_item_get_attention_movie_name (DcStatusNotifierItem* self)
{
	gchar* result;
	GVariant* _reply;
	result = dc_status_notifier_item_get_attention_movie_name (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_dc_status_notifier_item_get_item_is_menu (DcStatusNotifierItem* self)
{
	gboolean result;
	GVariant* _reply;
	result = dc_status_notifier_item_get_item_is_menu (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_dc_status_notifier_item_get_menu (DcStatusNotifierItem* self)
{
	char* result;
	GVariant* _reply;
	result = dc_status_notifier_item_get_menu (self);
	_reply = g_variant_new_object_path (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
dc_status_notifier_item_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];
	if (strcmp (property_name, "Category") == 0) {
		return _dbus_dc_status_notifier_item_get_category (object);
	} else if (strcmp (property_name, "Id") == 0) {
		return _dbus_dc_status_notifier_item_get_id (object);
	} else if (strcmp (property_name, "Title") == 0) {
		return _dbus_dc_status_notifier_item_get_title (object);
	} else if (strcmp (property_name, "Status") == 0) {
		return _dbus_dc_status_notifier_item_get_status (object);
	} else if (strcmp (property_name, "WindowId") == 0) {
		return _dbus_dc_status_notifier_item_get_window_id (object);
	} else if (strcmp (property_name, "IconName") == 0) {
		return _dbus_dc_status_notifier_item_get_icon_name (object);
	} else if (strcmp (property_name, "IconThemePath") == 0) {
		return _dbus_dc_status_notifier_item_get_icon_theme_path (object);
	} else if (strcmp (property_name, "IconPixmap") == 0) {
		return _dbus_dc_status_notifier_item_get_icon_pixmap (object);
	} else if (strcmp (property_name, "OverlayIconName") == 0) {
		return _dbus_dc_status_notifier_item_get_overlay_icon_name (object);
	} else if (strcmp (property_name, "AttentionIconName") == 0) {
		return _dbus_dc_status_notifier_item_get_attention_icon_name (object);
	} else if (strcmp (property_name, "AttentionMovieName") == 0) {
		return _dbus_dc_status_notifier_item_get_attention_movie_name (object);
	} else if (strcmp (property_name, "ItemIsMenu") == 0) {
		return _dbus_dc_status_notifier_item_get_item_is_menu (object);
	} else if (strcmp (property_name, "Menu") == 0) {
		return _dbus_dc_status_notifier_item_get_menu (object);
	}
	return NULL;
}

static gboolean
dc_status_notifier_item_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)
{
	return FALSE;
}

static void
_dbus_dc_status_notifier_item_new_title (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.kde.StatusNotifierItem", "NewTitle", _arguments, NULL);
}

static void
_dbus_dc_status_notifier_item_new_icon (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.kde.StatusNotifierItem", "NewIcon", _arguments, NULL);
}

static void
_dbus_dc_status_notifier_item_new_attention_icon (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.kde.StatusNotifierItem", "NewAttentionIcon", _arguments, NULL);
}

static void
_dbus_dc_status_notifier_item_new_overlay_icon (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.kde.StatusNotifierItem", "NewOverlayIcon", _arguments, NULL);
}

static void
_dbus_dc_status_notifier_item_new_status (GObject* _sender,
                                          const gchar* status,
                                          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);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (status));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.kde.StatusNotifierItem", "NewStatus", _arguments, NULL);
}

guint
dc_status_notifier_item_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 *) (&_dc_status_notifier_item_dbus_interface_info), &_dc_status_notifier_item_dbus_interface_vtable, data, _dc_status_notifier_item_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "new-title", (GCallback) _dbus_dc_status_notifier_item_new_title, data);
	g_signal_connect (object, "new-icon", (GCallback) _dbus_dc_status_notifier_item_new_icon, data);
	g_signal_connect (object, "new-attention-icon", (GCallback) _dbus_dc_status_notifier_item_new_attention_icon, data);
	g_signal_connect (object, "new-overlay-icon", (GCallback) _dbus_dc_status_notifier_item_new_overlay_icon, data);
	g_signal_connect (object, "new-status", (GCallback) _dbus_dc_status_notifier_item_new_status, data);
	return result;
}

static void
_dc_status_notifier_item_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_dc_status_notifier_item_new_title, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_dc_status_notifier_item_new_icon, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_dc_status_notifier_item_new_attention_icon, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_dc_status_notifier_item_new_overlay_icon, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_dc_status_notifier_item_new_status, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

static inline gpointer
dc_tray_menu_get_instance_private (DcTrayMenu* self)
{
	return G_STRUCT_MEMBER_P (self, DcTrayMenu_private_offset);
}

void
dc_tray_menu_set_notifications_enabled (DcTrayMenu* self,
                                        gboolean enabled)
{
	guint32 _tmp0_;
	g_return_if_fail (self != NULL);
	if (self->priv->notifications_on == enabled) {
		return;
	}
	self->priv->notifications_on = enabled;
	_tmp0_ = self->priv->revision;
	self->priv->revision = _tmp0_ + 1;
	g_signal_emit (self, dc_tray_menu_signals[DC_TRAY_MENU_LAYOUT_UPDATED_SIGNAL], 0, self->priv->revision, (gint32) 0);
}

void
dc_tray_menu_set_window_visible (DcTrayMenu* self,
                                 gboolean visible)
{
	guint32 _tmp0_;
	g_return_if_fail (self != NULL);
	if (self->priv->window_visible == visible) {
		return;
	}
	self->priv->window_visible = visible;
	_tmp0_ = self->priv->revision;
	self->priv->revision = _tmp0_ + 1;
	g_signal_emit (self, dc_tray_menu_signals[DC_TRAY_MENU_LAYOUT_UPDATED_SIGNAL], 0, self->priv->revision, (gint32) 0);
}

static gchar*
dc_tray_menu_label_for (DcTrayMenu* self,
                        gint32 id)
{
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	switch (id) {
		case DC_TRAY_MENU_ID_SHOW:
		{
			const gchar* _tmp0_ = NULL;
			gchar* _tmp1_;
			if (self->priv->window_visible) {
				_tmp0_ = "Minimize to tray";
			} else {
				_tmp0_ = "Show Parla";
			}
			_tmp1_ = g_strdup (_tmp0_);
			result = _tmp1_;
			return result;
		}
		case DC_TRAY_MENU_ID_NOTIFY:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("Notifications");
			result = _tmp2_;
			return result;
		}
		default:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("Quit");
			result = _tmp3_;
			return result;
		}
	}
}

static GVariant*
dc_tray_menu_item_props (DcTrayMenu* self,
                         gint32 id)
{
	GVariantBuilder* props = NULL;
	GVariantType* _tmp0_;
	GVariantType* _tmp1_;
	GVariantBuilder* _tmp2_;
	GVariantBuilder* _tmp3_;
	GVariantBuilder* _tmp25_;
	GVariant* _tmp26_;
	GVariant* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_variant_type_new ("a{sv}");
	_tmp1_ = _tmp0_;
	_tmp2_ = g_variant_builder_new (_tmp1_);
	_tmp3_ = _tmp2_;
	_g_variant_type_free0 (_tmp1_);
	props = _tmp3_;
	if (id == ((gint32) 0)) {
		GVariantBuilder* _tmp4_;
		GVariant* _tmp5_;
		GVariant* _tmp6_;
		_tmp4_ = props;
		_tmp5_ = g_variant_new_string ("submenu");
		g_variant_ref_sink (_tmp5_);
		_tmp6_ = _tmp5_;
		g_variant_builder_add (_tmp4_, "{sv}", "children-display", _tmp6_, NULL);
		_g_variant_unref0 (_tmp6_);
	} else {
		GVariantBuilder* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		GVariant* _tmp10_;
		GVariant* _tmp11_;
		GVariantBuilder* _tmp12_;
		GVariant* _tmp13_;
		GVariant* _tmp14_;
		GVariantBuilder* _tmp15_;
		GVariant* _tmp16_;
		GVariant* _tmp17_;
		_tmp7_ = props;
		_tmp8_ = dc_tray_menu_label_for (self, id);
		_tmp9_ = _tmp8_;
		_tmp10_ = g_variant_new_string (_tmp9_);
		g_variant_ref_sink (_tmp10_);
		_tmp11_ = _tmp10_;
		g_variant_builder_add (_tmp7_, "{sv}", "label", _tmp11_, NULL);
		_g_variant_unref0 (_tmp11_);
		_g_free0 (_tmp9_);
		_tmp12_ = props;
		_tmp13_ = g_variant_new_boolean (TRUE);
		g_variant_ref_sink (_tmp13_);
		_tmp14_ = _tmp13_;
		g_variant_builder_add (_tmp12_, "{sv}", "enabled", _tmp14_, NULL);
		_g_variant_unref0 (_tmp14_);
		_tmp15_ = props;
		_tmp16_ = g_variant_new_boolean (TRUE);
		g_variant_ref_sink (_tmp16_);
		_tmp17_ = _tmp16_;
		g_variant_builder_add (_tmp15_, "{sv}", "visible", _tmp17_, NULL);
		_g_variant_unref0 (_tmp17_);
		if (id == DC_TRAY_MENU_ID_NOTIFY) {
			GVariantBuilder* _tmp18_;
			GVariant* _tmp19_;
			GVariant* _tmp20_;
			gint _tmp21_ = 0;
			GVariantBuilder* _tmp22_;
			GVariant* _tmp23_;
			GVariant* _tmp24_;
			_tmp18_ = props;
			_tmp19_ = g_variant_new_string ("checkmark");
			g_variant_ref_sink (_tmp19_);
			_tmp20_ = _tmp19_;
			g_variant_builder_add (_tmp18_, "{sv}", "toggle-type", _tmp20_, NULL);
			_g_variant_unref0 (_tmp20_);
			if (self->priv->notifications_on) {
				_tmp21_ = 1;
			} else {
				_tmp21_ = 0;
			}
			_tmp22_ = props;
			_tmp23_ = g_variant_new_int32 ((gint32) _tmp21_);
			g_variant_ref_sink (_tmp23_);
			_tmp24_ = _tmp23_;
			g_variant_builder_add (_tmp22_, "{sv}", "toggle-state", _tmp24_, NULL);
			_g_variant_unref0 (_tmp24_);
		}
	}
	_tmp25_ = props;
	_tmp26_ = g_variant_builder_end (_tmp25_);
	g_variant_ref_sink (_tmp26_);
	result = _tmp26_;
	_g_variant_builder_unref0 (props);
	return result;
}

static GVariant*
dc_tray_menu_layout_node (DcTrayMenu* self,
                          gint32 id)
{
	GVariantBuilder* children = NULL;
	GVariantType* _tmp0_;
	GVariantType* _tmp1_;
	GVariantBuilder* _tmp2_;
	GVariantBuilder* _tmp3_;
	GVariant* _tmp13_;
	GVariant* _tmp14_;
	GVariantBuilder* _tmp15_;
	GVariant* _tmp16_;
	GVariant* _tmp17_;
	GVariant* _tmp18_;
	GVariant* _tmp19_;
	GVariant* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_variant_type_new ("av");
	_tmp1_ = _tmp0_;
	_tmp2_ = g_variant_builder_new (_tmp1_);
	_tmp3_ = _tmp2_;
	_g_variant_type_free0 (_tmp1_);
	children = _tmp3_;
	if (id == ((gint32) 0)) {
		GVariantBuilder* _tmp4_;
		GVariant* _tmp5_;
		GVariant* _tmp6_;
		GVariantBuilder* _tmp7_;
		GVariant* _tmp8_;
		GVariant* _tmp9_;
		GVariantBuilder* _tmp10_;
		GVariant* _tmp11_;
		GVariant* _tmp12_;
		_tmp4_ = children;
		_tmp5_ = dc_tray_menu_layout_node (self, DC_TRAY_MENU_ID_SHOW);
		_tmp6_ = _tmp5_;
		g_variant_builder_add (_tmp4_, "v", _tmp6_, NULL);
		_g_variant_unref0 (_tmp6_);
		_tmp7_ = children;
		_tmp8_ = dc_tray_menu_layout_node (self, DC_TRAY_MENU_ID_NOTIFY);
		_tmp9_ = _tmp8_;
		g_variant_builder_add (_tmp7_, "v", _tmp9_, NULL);
		_g_variant_unref0 (_tmp9_);
		_tmp10_ = children;
		_tmp11_ = dc_tray_menu_layout_node (self, DC_TRAY_MENU_ID_QUIT);
		_tmp12_ = _tmp11_;
		g_variant_builder_add (_tmp10_, "v", _tmp12_, NULL);
		_g_variant_unref0 (_tmp12_);
	}
	_tmp13_ = dc_tray_menu_item_props (self, id);
	_tmp14_ = _tmp13_;
	_tmp15_ = children;
	_tmp16_ = g_variant_builder_end (_tmp15_);
	g_variant_ref_sink (_tmp16_);
	_tmp17_ = _tmp16_;
	_tmp18_ = g_variant_new ("(i@a{sv}@av)", id, _tmp14_, _tmp17_, NULL);
	g_variant_ref_sink (_tmp18_);
	_tmp19_ = _tmp18_;
	_g_variant_unref0 (_tmp17_);
	_g_variant_unref0 (_tmp14_);
	result = _tmp19_;
	_g_variant_builder_unref0 (children);
	return result;
}

void
dc_tray_menu_get_layout (DcTrayMenu* self,
                         gint32 parent_id,
                         gint32 recursion_depth,
                         gchar** property_names,
                         gint property_names_length1,
                         guint32* revision,
                         GVariant** layout,
                         GError** error)
{
	guint32 _vala_revision = 0U;
	GVariant* _vala_layout = NULL;
	gint _tmp0_ = 0;
	GVariant* _tmp1_;
	g_return_if_fail (self != NULL);
	_vala_revision = self->priv->revision;
	if (parent_id == ((gint32) 0)) {
		_tmp0_ = 0;
	} else {
		_tmp0_ = (gint) parent_id;
	}
	_tmp1_ = dc_tray_menu_layout_node (self, (gint32) _tmp0_);
	_g_variant_unref0 (_vala_layout);
	_vala_layout = _tmp1_;
	if (revision) {
		*revision = _vala_revision;
	}
	if (layout) {
		*layout = _vala_layout;
	} else {
		_g_variant_unref0 (_vala_layout);
	}
}

static gint32*
_vala_array_dup29 (gint32* self,
                   gssize length)
{
	if (length > 0) {
		return _vala_memdup2 (self, length * sizeof (gint32));
	}
	return NULL;
}

void
dc_tray_menu_get_group_properties (DcTrayMenu* self,
                                   gint32* ids,
                                   gint ids_length1,
                                   gchar** property_names,
                                   gint property_names_length1,
                                   GVariant** props,
                                   GError** error)
{
	GVariant* _vala_props = NULL;
	GVariantBuilder* b = NULL;
	GVariantType* _tmp0_;
	GVariantType* _tmp1_;
	GVariantBuilder* _tmp2_;
	GVariantBuilder* _tmp3_;
	gint32* _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	gint __tmp4__size_ = 0;
	gint32* wanted = NULL;
	gint32* _tmp7_;
	gint _tmp7__length1;
	gint wanted_length1;
	gint _wanted_size_;
	gint32* _tmp8_;
	gint _tmp8__length1;
	GVariantBuilder* _tmp14_;
	GVariant* _tmp15_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_variant_type_new ("a(ia{sv})");
	_tmp1_ = _tmp0_;
	_tmp2_ = g_variant_builder_new (_tmp1_);
	_tmp3_ = _tmp2_;
	_g_variant_type_free0 (_tmp1_);
	b = _tmp3_;
	if (ids_length1 == 0) {
		gint32* _tmp5_;
		_tmp5_ = g_new0 (gint32, 3);
		_tmp5_[0] = DC_TRAY_MENU_ID_SHOW;
		_tmp5_[1] = DC_TRAY_MENU_ID_NOTIFY;
		_tmp5_[2] = DC_TRAY_MENU_ID_QUIT;
		_tmp4_ = (g_free (_tmp4_), NULL);
		_tmp4_ = _tmp5_;
		_tmp4__length1 = 3;
		__tmp4__size_ = _tmp4__length1;
	} else {
		gint32* _tmp6_;
		gint _tmp6__length1;
		_tmp6_ = (ids != NULL) ? _vala_array_dup29 (ids, ids_length1) : ids;
		_tmp6__length1 = ids_length1;
		_tmp4_ = (g_free (_tmp4_), NULL);
		_tmp4_ = _tmp6_;
		_tmp4__length1 = _tmp6__length1;
		__tmp4__size_ = _tmp4__length1;
	}
	_tmp7_ = _tmp4_;
	_tmp7__length1 = _tmp4__length1;
	_tmp4_ = NULL;
	_tmp4__length1 = 0;
	wanted = _tmp7_;
	wanted_length1 = _tmp7__length1;
	_wanted_size_ = wanted_length1;
	_tmp8_ = wanted;
	_tmp8__length1 = wanted_length1;
	{
		gint32* id_collection = NULL;
		gint id_collection_length1 = 0;
		gint _id_collection_size_ = 0;
		gint id_it = 0;
		id_collection = _tmp8_;
		id_collection_length1 = _tmp8__length1;
		for (id_it = 0; id_it < id_collection_length1; id_it = id_it + 1) {
			gint32 id = 0;
			id = id_collection[id_it];
			{
				gboolean _tmp9_ = FALSE;
				gboolean _tmp10_ = FALSE;
				if (id == DC_TRAY_MENU_ID_SHOW) {
					_tmp10_ = TRUE;
				} else {
					_tmp10_ = id == DC_TRAY_MENU_ID_NOTIFY;
				}
				if (_tmp10_) {
					_tmp9_ = TRUE;
				} else {
					_tmp9_ = id == DC_TRAY_MENU_ID_QUIT;
				}
				if (_tmp9_) {
					GVariantBuilder* _tmp11_;
					GVariant* _tmp12_;
					GVariant* _tmp13_;
					_tmp11_ = b;
					_tmp12_ = dc_tray_menu_item_props (self, id);
					_tmp13_ = _tmp12_;
					g_variant_builder_add (_tmp11_, "(i@a{sv})", id, _tmp13_, NULL);
					_g_variant_unref0 (_tmp13_);
				}
			}
		}
	}
	_tmp14_ = b;
	_tmp15_ = g_variant_builder_end (_tmp14_);
	g_variant_ref_sink (_tmp15_);
	_g_variant_unref0 (_vala_props);
	_vala_props = _tmp15_;
	wanted = (g_free (wanted), NULL);
	_tmp4_ = (g_free (_tmp4_), NULL);
	_g_variant_builder_unref0 (b);
	if (props) {
		*props = _vala_props;
	} else {
		_g_variant_unref0 (_vala_props);
	}
}

void
dc_tray_menu_get_dbus_property (DcTrayMenu* self,
                                gint32 id,
                                const gchar* name,
                                GVariant** value,
                                GError** error)
{
	GVariant* _vala_value = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	if (g_strcmp0 (name, "label") == 0) {
		gchar* _tmp0_;
		gchar* _tmp1_;
		GVariant* _tmp2_;
		GVariant* _tmp3_;
		GVariant* _tmp4_;
		_tmp0_ = dc_tray_menu_label_for (self, id);
		_tmp1_ = _tmp0_;
		_tmp2_ = g_variant_new_string (_tmp1_);
		g_variant_ref_sink (_tmp2_);
		_tmp3_ = _tmp2_;
		_tmp4_ = g_variant_new_variant (_tmp3_);
		g_variant_ref_sink (_tmp4_);
		_g_variant_unref0 (_vala_value);
		_vala_value = _tmp4_;
		_g_variant_unref0 (_tmp3_);
		_g_free0 (_tmp1_);
	} else {
		GVariant* _tmp5_;
		GVariant* _tmp6_;
		GVariant* _tmp7_;
		_tmp5_ = g_variant_new_boolean (TRUE);
		g_variant_ref_sink (_tmp5_);
		_tmp6_ = _tmp5_;
		_tmp7_ = g_variant_new_variant (_tmp6_);
		g_variant_ref_sink (_tmp7_);
		_g_variant_unref0 (_vala_value);
		_vala_value = _tmp7_;
		_g_variant_unref0 (_tmp6_);
	}
	if (value) {
		*value = _vala_value;
	} else {
		_g_variant_unref0 (_vala_value);
	}
}

void
dc_tray_menu_event (DcTrayMenu* self,
                    gint32 id,
                    const gchar* event_id,
                    GVariant* data,
                    guint32 timestamp,
                    GError** error)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (event_id != NULL);
	g_return_if_fail (data != NULL);
	if (g_strcmp0 (event_id, "clicked") != 0) {
		return;
	}
	switch (id) {
		case DC_TRAY_MENU_ID_SHOW:
		{
			g_signal_emit (self, dc_tray_menu_signals[DC_TRAY_MENU_SHOW_TOGGLE_REQUESTED_SIGNAL], 0);
			break;
		}
		case DC_TRAY_MENU_ID_NOTIFY:
		{
			g_signal_emit (self, dc_tray_menu_signals[DC_TRAY_MENU_NOTIFICATIONS_TOGGLE_REQUESTED_SIGNAL], 0, !self->priv->notifications_on);
			break;
		}
		case DC_TRAY_MENU_ID_QUIT:
		{
			g_signal_emit (self, dc_tray_menu_signals[DC_TRAY_MENU_QUIT_REQUESTED_SIGNAL], 0);
			break;
		}
		default:
		break;
	}
}

gboolean
dc_tray_menu_about_to_show (DcTrayMenu* self,
                            gint32 id,
                            GError** error)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = FALSE;
	return result;
}

void
dc_tray_menu_about_to_show_group (DcTrayMenu* self,
                                  gint32* ids,
                                  gint ids_length1,
                                  gint32** updates_needed,
                                  gint* updates_needed_length1,
                                  gint32** id_errors,
                                  gint* id_errors_length1,
                                  GError** error)
{
	gint32* _vala_updates_needed = NULL;
	gint _vala_updates_needed_length1 = 0;
	gint32* _vala_id_errors = NULL;
	gint _vala_id_errors_length1 = 0;
	gint32* _tmp0_;
	gint32* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_new0 (gint32, 0);
	_vala_updates_needed = (g_free (_vala_updates_needed), NULL);
	_vala_updates_needed = _tmp0_;
	_vala_updates_needed_length1 = 0;
	_tmp1_ = g_new0 (gint32, 0);
	_vala_id_errors = (g_free (_vala_id_errors), NULL);
	_vala_id_errors = _tmp1_;
	_vala_id_errors_length1 = 0;
	if (updates_needed) {
		*updates_needed = _vala_updates_needed;
	} else {
		_vala_updates_needed = (g_free (_vala_updates_needed), NULL);
	}
	if (updates_needed_length1) {
		*updates_needed_length1 = _vala_updates_needed_length1;
	}
	if (id_errors) {
		*id_errors = _vala_id_errors;
	} else {
		_vala_id_errors = (g_free (_vala_id_errors), NULL);
	}
	if (id_errors_length1) {
		*id_errors_length1 = _vala_id_errors_length1;
	}
}

void
dc_tray_menu_event_group (DcTrayMenu* self,
                          GVariant* events,
                          gint32** id_errors,
                          gint* id_errors_length1,
                          GError** error)
{
	gint32* _vala_id_errors = NULL;
	gint _vala_id_errors_length1 = 0;
	GVariantIter* iter = NULL;
	GVariantIter* _tmp0_;
	gint32 id = 0;
	gchar* event_id = NULL;
	GVariant* data = NULL;
	guint32 timestamp = 0U;
	gint32* _tmp9_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (events != NULL);
	_tmp0_ = g_variant_iter_new (events);
	iter = _tmp0_;
	while (TRUE) {
		GVariantIter* _tmp1_;
		gint32 _tmp2_ = 0;
		gchar* _tmp3_ = NULL;
		GVariant* _tmp4_ = NULL;
		guint32 _tmp5_ = 0U;
		gboolean _tmp6_;
		const gchar* _tmp7_;
		GVariant* _tmp8_;
		_tmp1_ = iter;
		_tmp6_ = g_variant_iter_next (_tmp1_, "(isvu)", &_tmp2_, &_tmp3_, &_tmp4_, &_tmp5_, NULL);
		id = _tmp2_;
		_g_free0 (event_id);
		event_id = _tmp3_;
		_g_variant_unref0 (data);
		data = _tmp4_;
		timestamp = _tmp5_;
		if (!_tmp6_) {
			break;
		}
		_tmp7_ = event_id;
		_tmp8_ = data;
		dc_tray_menu_event (self, id, _tmp7_, _tmp8_, timestamp, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_propagate_error (error, _inner_error0_);
			_g_variant_unref0 (data);
			_g_free0 (event_id);
			_g_variant_iter_free0 (iter);
			_vala_id_errors = (g_free (_vala_id_errors), NULL);
			return;
		}
	}
	_tmp9_ = g_new0 (gint32, 0);
	_vala_id_errors = (g_free (_vala_id_errors), NULL);
	_vala_id_errors = _tmp9_;
	_vala_id_errors_length1 = 0;
	_g_variant_unref0 (data);
	_g_free0 (event_id);
	_g_variant_iter_free0 (iter);
	if (id_errors) {
		*id_errors = _vala_id_errors;
	} else {
		_vala_id_errors = (g_free (_vala_id_errors), NULL);
	}
	if (id_errors_length1) {
		*id_errors_length1 = _vala_id_errors_length1;
	}
}

DcTrayMenu*
dc_tray_menu_construct (GType object_type)
{
	DcTrayMenu * self = NULL;
	self = (DcTrayMenu*) g_object_new (object_type, NULL);
	return self;
}

DcTrayMenu*
dc_tray_menu_new (void)
{
	return dc_tray_menu_construct (DC_TYPE_TRAY_MENU);
}

guint32
dc_tray_menu_get_version (DcTrayMenu* self)
{
	guint32 result;
	g_return_val_if_fail (self != NULL, 0U);
	result = (guint32) 3;
	return result;
}

gchar*
dc_tray_menu_get_text_direction (DcTrayMenu* self)
{
	gchar* result;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("ltr");
	result = _tmp0_;
	return result;
}

gchar*
dc_tray_menu_get_status (DcTrayMenu* self)
{
	gchar* result;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("normal");
	result = _tmp0_;
	return result;
}

gchar**
dc_tray_menu_get_icon_theme_path (DcTrayMenu* self,
                                  gint* result_length1)
{
	gchar** result;
	gchar** _tmp0_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	_tmp1_ = _tmp0_;
	_tmp1__length1 = 0;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

static void
g_cclosure_user_marshal_VOID__UINT_INT (GClosure * closure,
                                        GValue * return_value,
                                        guint n_param_values,
                                        const GValue * param_values,
                                        gpointer invocation_hint,
                                        gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__UINT_INT) (gpointer data1, guint32 arg_1, gint32 arg_2, gpointer data2);
	register GMarshalFunc_VOID__UINT_INT 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_INT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_uint (param_values + 1), g_value_get_int (param_values + 2), data2);
}

static void
dc_tray_menu_class_init (DcTrayMenuClass * klass,
                         gpointer klass_data)
{
	dc_tray_menu_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DcTrayMenu_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dc_tray_menu_get_property;
	G_OBJECT_CLASS (klass)->finalize = dc_tray_menu_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_TRAY_MENU_VERSION_PROPERTY, dc_tray_menu_properties[DC_TRAY_MENU_VERSION_PROPERTY] = g_param_spec_uint ("version", "version", "version", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_TRAY_MENU_TEXT_DIRECTION_PROPERTY, dc_tray_menu_properties[DC_TRAY_MENU_TEXT_DIRECTION_PROPERTY] = g_param_spec_string ("text-direction", "text-direction", "text-direction", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_TRAY_MENU_STATUS_PROPERTY, dc_tray_menu_properties[DC_TRAY_MENU_STATUS_PROPERTY] = g_param_spec_string ("status", "status", "status", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DC_TRAY_MENU_ICON_THEME_PATH_PROPERTY, dc_tray_menu_properties[DC_TRAY_MENU_ICON_THEME_PATH_PROPERTY] = g_param_spec_boxed ("icon-theme-path", "icon-theme-path", "icon-theme-path", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	dc_tray_menu_signals[DC_TRAY_MENU_LAYOUT_UPDATED_SIGNAL] = g_signal_new ("layout-updated", DC_TYPE_TRAY_MENU, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_INT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_INT);
	dc_tray_menu_signals[DC_TRAY_MENU_SHOW_TOGGLE_REQUESTED_SIGNAL] = g_signal_new ("show-toggle-requested", DC_TYPE_TRAY_MENU, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	dc_tray_menu_signals[DC_TRAY_MENU_QUIT_REQUESTED_SIGNAL] = g_signal_new ("quit-requested", DC_TYPE_TRAY_MENU, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	dc_tray_menu_signals[DC_TRAY_MENU_NOTIFICATIONS_TOGGLE_REQUESTED_SIGNAL] = g_signal_new ("notifications-toggle-requested", DC_TYPE_TRAY_MENU, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
}

static void
dc_tray_menu_instance_init (DcTrayMenu * self,
                            gpointer klass)
{
	self->priv = dc_tray_menu_get_instance_private (self);
	self->priv->notifications_on = TRUE;
	self->priv->window_visible = FALSE;
	self->priv->revision = (guint32) 1;
}

static void
dc_tray_menu_finalize (GObject * obj)
{
	DcTrayMenu * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DC_TYPE_TRAY_MENU, DcTrayMenu);
	G_OBJECT_CLASS (dc_tray_menu_parent_class)->finalize (obj);
}

static GType
dc_tray_menu_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DcTrayMenuClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dc_tray_menu_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DcTrayMenu), 0, (GInstanceInitFunc) dc_tray_menu_instance_init, NULL };
	GType dc_tray_menu_type_id;
	dc_tray_menu_type_id = g_type_register_static (G_TYPE_OBJECT, "DcTrayMenu", &g_define_type_info, 0);
	g_type_set_qdata (dc_tray_menu_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) dc_tray_menu_register_object);
	DcTrayMenu_private_offset = g_type_add_instance_private (dc_tray_menu_type_id, sizeof (DcTrayMenuPrivate));
	return dc_tray_menu_type_id;
}

GType
dc_tray_menu_get_type (void)
{
	static volatile gsize dc_tray_menu_type_id__once = 0;
	if (g_once_init_enter (&dc_tray_menu_type_id__once)) {
		GType dc_tray_menu_type_id;
		dc_tray_menu_type_id = dc_tray_menu_get_type_once ();
		g_once_init_leave (&dc_tray_menu_type_id__once, dc_tray_menu_type_id);
	}
	return dc_tray_menu_type_id__once;
}

static void
_vala_dc_tray_menu_get_property (GObject * object,
                                 guint property_id,
                                 GValue * value,
                                 GParamSpec * pspec)
{
	DcTrayMenu * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DC_TYPE_TRAY_MENU, DcTrayMenu);
	switch (property_id) {
		case DC_TRAY_MENU_VERSION_PROPERTY:
		g_value_set_uint (value, dc_tray_menu_get_version (self));
		break;
		case DC_TRAY_MENU_TEXT_DIRECTION_PROPERTY:
		g_value_take_string (value, dc_tray_menu_get_text_direction (self));
		break;
		case DC_TRAY_MENU_STATUS_PROPERTY:
		g_value_take_string (value, dc_tray_menu_get_status (self));
		break;
		case DC_TRAY_MENU_ICON_THEME_PATH_PROPERTY:
		{
			int length;
			g_value_take_boxed (value, dc_tray_menu_get_icon_theme_path (self, &length));
		}
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_dbus_dc_tray_menu_get_layout (DcTrayMenu* self,
                               GVariant* _parameters_,
                               GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint32 parent_id = 0;
	GVariant* _tmp17_;
	gint32 recursion_depth = 0;
	GVariant* _tmp18_;
	gchar** property_names = NULL;
	gint property_names_length1 = 0;
	GVariant* _tmp19_;
	gchar** _tmp20_;
	gint _tmp20__length;
	gint _tmp20__size;
	gint _tmp20__length1;
	GVariantIter _tmp21_;
	GVariant* _tmp22_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	guint32 revision = 0U;
	GVariant* layout = NULL;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp17_ = g_variant_iter_next_value (&_arguments_iter);
	parent_id = g_variant_get_int32 (_tmp17_);
	g_variant_unref (_tmp17_);
	_tmp18_ = g_variant_iter_next_value (&_arguments_iter);
	recursion_depth = g_variant_get_int32 (_tmp18_);
	g_variant_unref (_tmp18_);
	_tmp19_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp20_ = g_new (gchar*, 5);
	_tmp20__length = 0;
	_tmp20__size = 4;
	_tmp20__length1 = 0;
	g_variant_iter_init (&_tmp21_, _tmp19_);
	for (; (_tmp22_ = g_variant_iter_next_value (&_tmp21_)) != NULL; _tmp20__length1++) {
		if (_tmp20__size == _tmp20__length) {
			_tmp20__size = 2 * _tmp20__size;
			_tmp20_ = g_renew (gchar*, _tmp20_, _tmp20__size + 1);
		}
		_tmp20_[_tmp20__length++] = g_variant_dup_string (_tmp22_, NULL);
		g_variant_unref (_tmp22_);
	}
	property_names_length1 = _tmp20__length1;
	_tmp20_[_tmp20__length] = NULL;
	property_names = _tmp20_;
	g_variant_unref (_tmp19_);
	dc_tray_menu_get_layout (self, parent_id, recursion_depth, property_names, property_names_length1, &revision, &layout, &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 (revision));
	g_variant_builder_add_value (&_reply_builder, layout);
	_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:
	property_names = (_vala_array_free (property_names, property_names_length1, (GDestroyNotify) g_free), NULL);
	_g_variant_unref0 (layout);
	;
}

static void
_dbus_dc_tray_menu_get_group_properties (DcTrayMenu* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint32* ids = NULL;
	gint ids_length1 = 0;
	GVariant* _tmp23_;
	gint32* _tmp24_;
	gint _tmp24__length;
	gint _tmp24__size;
	gint _tmp24__length1;
	GVariantIter _tmp25_;
	GVariant* _tmp26_;
	gchar** property_names = NULL;
	gint property_names_length1 = 0;
	GVariant* _tmp27_;
	gchar** _tmp28_;
	gint _tmp28__length;
	gint _tmp28__size;
	gint _tmp28__length1;
	GVariantIter _tmp29_;
	GVariant* _tmp30_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	GVariant* props = NULL;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp23_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp24_ = g_new (gint32, 5);
	_tmp24__length = 0;
	_tmp24__size = 4;
	_tmp24__length1 = 0;
	g_variant_iter_init (&_tmp25_, _tmp23_);
	for (; (_tmp26_ = g_variant_iter_next_value (&_tmp25_)) != NULL; _tmp24__length1++) {
		if (_tmp24__size == _tmp24__length) {
			_tmp24__size = 2 * _tmp24__size;
			_tmp24_ = g_renew (gint32, _tmp24_, _tmp24__size + 1);
		}
		_tmp24_[_tmp24__length++] = g_variant_get_int32 (_tmp26_);
		g_variant_unref (_tmp26_);
	}
	ids_length1 = _tmp24__length1;
	ids = _tmp24_;
	g_variant_unref (_tmp23_);
	_tmp27_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp28_ = g_new (gchar*, 5);
	_tmp28__length = 0;
	_tmp28__size = 4;
	_tmp28__length1 = 0;
	g_variant_iter_init (&_tmp29_, _tmp27_);
	for (; (_tmp30_ = g_variant_iter_next_value (&_tmp29_)) != NULL; _tmp28__length1++) {
		if (_tmp28__size == _tmp28__length) {
			_tmp28__size = 2 * _tmp28__size;
			_tmp28_ = g_renew (gchar*, _tmp28_, _tmp28__size + 1);
		}
		_tmp28_[_tmp28__length++] = g_variant_dup_string (_tmp30_, NULL);
		g_variant_unref (_tmp30_);
	}
	property_names_length1 = _tmp28__length1;
	_tmp28_[_tmp28__length] = NULL;
	property_names = _tmp28_;
	g_variant_unref (_tmp27_);
	dc_tray_menu_get_group_properties (self, ids, ids_length1, property_names, property_names_length1, &props, &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, props);
	_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:
	ids = (g_free (ids), NULL);
	property_names = (_vala_array_free (property_names, property_names_length1, (GDestroyNotify) g_free), NULL);
	_g_variant_unref0 (props);
	;
}

static void
_dbus_dc_tray_menu_get_dbus_property (DcTrayMenu* self,
                                      GVariant* _parameters_,
                                      GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint32 id = 0;
	GVariant* _tmp31_;
	gchar* name = NULL;
	GVariant* _tmp32_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	GVariant* value = NULL;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp31_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_get_int32 (_tmp31_);
	g_variant_unref (_tmp31_);
	_tmp32_ = g_variant_iter_next_value (&_arguments_iter);
	name = g_variant_dup_string (_tmp32_, NULL);
	g_variant_unref (_tmp32_);
	dc_tray_menu_get_dbus_property (self, id, name, &value, &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_variant (value));
	_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 (name);
	_g_variant_unref0 (value);
	;
}

static void
_dbus_dc_tray_menu_event (DcTrayMenu* self,
                          GVariant* _parameters_,
                          GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint32 id = 0;
	GVariant* _tmp33_;
	gchar* event_id = NULL;
	GVariant* _tmp34_;
	GVariant* data = NULL;
	GVariant* _tmp35_;
	guint32 timestamp = 0U;
	GVariant* _tmp36_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp33_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_get_int32 (_tmp33_);
	g_variant_unref (_tmp33_);
	_tmp34_ = g_variant_iter_next_value (&_arguments_iter);
	event_id = g_variant_dup_string (_tmp34_, NULL);
	g_variant_unref (_tmp34_);
	_tmp35_ = g_variant_iter_next_value (&_arguments_iter);
	data = g_variant_get_variant (_tmp35_);
	g_variant_unref (_tmp35_);
	_tmp36_ = g_variant_iter_next_value (&_arguments_iter);
	timestamp = g_variant_get_uint32 (_tmp36_);
	g_variant_unref (_tmp36_);
	dc_tray_menu_event (self, id, event_id, data, timestamp, &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_free0 (event_id);
	_g_variant_unref0 (data);
	;
}

static void
_dbus_dc_tray_menu_about_to_show (DcTrayMenu* self,
                                  GVariant* _parameters_,
                                  GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint32 id = 0;
	GVariant* _tmp37_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp37_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_get_int32 (_tmp37_);
	g_variant_unref (_tmp37_);
	result = dc_tray_menu_about_to_show (self, id, &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_dc_tray_menu_about_to_show_group (DcTrayMenu* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint32* ids = NULL;
	gint ids_length1 = 0;
	GVariant* _tmp38_;
	gint32* _tmp39_;
	gint _tmp39__length;
	gint _tmp39__size;
	gint _tmp39__length1;
	GVariantIter _tmp40_;
	GVariant* _tmp41_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gint32* updates_needed = NULL;
	gint updates_needed_length1 = 0;
	gint32* _tmp42_;
	GVariantBuilder _tmp43_;
	gint _tmp44_;
	gint32* id_errors = NULL;
	gint id_errors_length1 = 0;
	gint32* _tmp45_;
	GVariantBuilder _tmp46_;
	gint _tmp47_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp38_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp39_ = g_new (gint32, 5);
	_tmp39__length = 0;
	_tmp39__size = 4;
	_tmp39__length1 = 0;
	g_variant_iter_init (&_tmp40_, _tmp38_);
	for (; (_tmp41_ = g_variant_iter_next_value (&_tmp40_)) != NULL; _tmp39__length1++) {
		if (_tmp39__size == _tmp39__length) {
			_tmp39__size = 2 * _tmp39__size;
			_tmp39_ = g_renew (gint32, _tmp39_, _tmp39__size + 1);
		}
		_tmp39_[_tmp39__length++] = g_variant_get_int32 (_tmp41_);
		g_variant_unref (_tmp41_);
	}
	ids_length1 = _tmp39__length1;
	ids = _tmp39_;
	g_variant_unref (_tmp38_);
	dc_tray_menu_about_to_show_group (self, ids, ids_length1, &updates_needed, &updates_needed_length1, &id_errors, &id_errors_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);
	_tmp42_ = updates_needed;
	g_variant_builder_init (&_tmp43_, G_VARIANT_TYPE ("ai"));
	for (_tmp44_ = 0; _tmp44_ < updates_needed_length1; _tmp44_++) {
		g_variant_builder_add_value (&_tmp43_, g_variant_new_int32 (*_tmp42_));
		_tmp42_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp43_));
	_tmp45_ = id_errors;
	g_variant_builder_init (&_tmp46_, G_VARIANT_TYPE ("ai"));
	for (_tmp47_ = 0; _tmp47_ < id_errors_length1; _tmp47_++) {
		g_variant_builder_add_value (&_tmp46_, g_variant_new_int32 (*_tmp45_));
		_tmp45_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp46_));
	_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:
	ids = (g_free (ids), NULL);
	updates_needed = (g_free (updates_needed), NULL);
	id_errors = (g_free (id_errors), NULL);
	;
}

static void
_dbus_dc_tray_menu_event_group (DcTrayMenu* self,
                                GVariant* _parameters_,
                                GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GVariant* events = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gint32* id_errors = NULL;
	gint id_errors_length1 = 0;
	gint32* _tmp48_;
	GVariantBuilder _tmp49_;
	gint _tmp50_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	events = g_variant_iter_next_value (&_arguments_iter);
	dc_tray_menu_event_group (self, events, &id_errors, &id_errors_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);
	_tmp48_ = id_errors;
	g_variant_builder_init (&_tmp49_, G_VARIANT_TYPE ("ai"));
	for (_tmp50_ = 0; _tmp50_ < id_errors_length1; _tmp50_++) {
		g_variant_builder_add_value (&_tmp49_, g_variant_new_int32 (*_tmp48_));
		_tmp48_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp49_));
	_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_variant_unref0 (events);
	id_errors = (g_free (id_errors), NULL);
	;
}

static void
dc_tray_menu_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, "GetLayout") == 0) {
		_dbus_dc_tray_menu_get_layout (object, parameters, invocation);
	} else if (strcmp (method_name, "GetGroupProperties") == 0) {
		_dbus_dc_tray_menu_get_group_properties (object, parameters, invocation);
	} else if (strcmp (method_name, "GetProperty") == 0) {
		_dbus_dc_tray_menu_get_dbus_property (object, parameters, invocation);
	} else if (strcmp (method_name, "Event") == 0) {
		_dbus_dc_tray_menu_event (object, parameters, invocation);
	} else if (strcmp (method_name, "AboutToShow") == 0) {
		_dbus_dc_tray_menu_about_to_show (object, parameters, invocation);
	} else if (strcmp (method_name, "AboutToShowGroup") == 0) {
		_dbus_dc_tray_menu_about_to_show_group (object, parameters, invocation);
	} else if (strcmp (method_name, "EventGroup") == 0) {
		_dbus_dc_tray_menu_event_group (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_dc_tray_menu_get_version (DcTrayMenu* self)
{
	guint32 result;
	GVariant* _reply;
	result = dc_tray_menu_get_version (self);
	_reply = g_variant_new_uint32 (result);
	return _reply;
}

static GVariant*
_dbus_dc_tray_menu_get_text_direction (DcTrayMenu* self)
{
	gchar* result;
	GVariant* _reply;
	result = dc_tray_menu_get_text_direction (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_dc_tray_menu_get_status (DcTrayMenu* self)
{
	gchar* result;
	GVariant* _reply;
	result = dc_tray_menu_get_status (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_dc_tray_menu_get_icon_theme_path (DcTrayMenu* self)
{
	gchar** result;
	gint result_length1 = 0;
	GVariant* _reply;
	gchar** _tmp51_;
	GVariantBuilder _tmp52_;
	gint _tmp53_;
	result = dc_tray_menu_get_icon_theme_path (self, &result_length1);
	_tmp51_ = result;
	g_variant_builder_init (&_tmp52_, G_VARIANT_TYPE ("as"));
	for (_tmp53_ = 0; _tmp53_ < result_length1; _tmp53_++) {
		g_variant_builder_add_value (&_tmp52_, g_variant_new_string (*_tmp51_));
		_tmp51_++;
	}
	_reply = g_variant_builder_end (&_tmp52_);
	result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
	return _reply;
}

static GVariant*
dc_tray_menu_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];
	if (strcmp (property_name, "Version") == 0) {
		return _dbus_dc_tray_menu_get_version (object);
	} else if (strcmp (property_name, "TextDirection") == 0) {
		return _dbus_dc_tray_menu_get_text_direction (object);
	} else if (strcmp (property_name, "Status") == 0) {
		return _dbus_dc_tray_menu_get_status (object);
	} else if (strcmp (property_name, "IconThemePath") == 0) {
		return _dbus_dc_tray_menu_get_icon_theme_path (object);
	}
	return NULL;
}

static gboolean
dc_tray_menu_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)
{
	return FALSE;
}

static void
_dbus_dc_tray_menu_layout_updated (GObject* _sender,
                                   guint32 revision,
                                   gint32 parent,
                                   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);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (revision));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (parent));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "com.canonical.dbusmenu", "LayoutUpdated", _arguments, NULL);
}

guint
dc_tray_menu_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 *) (&_dc_tray_menu_dbus_interface_info), &_dc_tray_menu_dbus_interface_vtable, data, _dc_tray_menu_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "layout-updated", (GCallback) _dbus_dc_tray_menu_layout_updated, data);
	return result;
}

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

static inline gpointer
dc_tray_icon_get_instance_private (DcTrayIcon* self)
{
	return G_STRUCT_MEMBER_P (self, DcTrayIcon_private_offset);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
_dc_tray_icon_request_show_on_current_desktop_dc_status_notifier_item_activate_requested (DcStatusNotifierItem* _sender,
                                                                                          gpointer self)
{
	dc_tray_icon_request_show_on_current_desktop ((DcTrayIcon*) self);
}

static void
_dc_tray_icon_request_window_toggle_dc_tray_menu_show_toggle_requested (DcTrayMenu* _sender,
                                                                        gpointer self)
{
	dc_tray_icon_request_window_toggle ((DcTrayIcon*) self);
}

static gboolean
__lambda293_ (DcTrayIcon* self)
{
	gboolean result;
	g_signal_emit (self, dc_tray_icon_signals[DC_TRAY_ICON_QUIT_REQUESTED_SIGNAL], 0);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda293__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda293_ ((DcTrayIcon*) self);
	return result;
}

static void
__lambda292_ (DcTrayIcon* self)
{
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda293__gsource_func, g_object_ref (self), g_object_unref);
}

static void
___lambda292__dc_tray_menu_quit_requested (DcTrayMenu* _sender,
                                           gpointer self)
{
	__lambda292_ ((DcTrayIcon*) self);
}

static Block124Data*
block124_data_ref (Block124Data* _data124_)
{
	g_atomic_int_inc (&_data124_->_ref_count_);
	return _data124_;
}

static void
block124_data_unref (void * _userdata_)
{
	Block124Data* _data124_;
	_data124_ = (Block124Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data124_->_ref_count_)) {
		DcTrayIcon* self;
		self = _data124_->self;
		_g_object_unref0 (self);
		g_slice_free (Block124Data, _data124_);
	}
}

static gboolean
__lambda295_ (Block124Data* _data124_)
{
	DcTrayIcon* self;
	gboolean result;
	self = _data124_->self;
	g_signal_emit (self, dc_tray_icon_signals[DC_TRAY_ICON_NOTIFICATIONS_TOGGLE_REQUESTED_SIGNAL], 0, _data124_->v);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda295__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda295_ (self);
	return result;
}

static void
__lambda294_ (DcTrayIcon* self,
              gboolean v)
{
	Block124Data* _data124_;
	DcStatusNotifierItem* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	_data124_ = g_slice_new0 (Block124Data);
	_data124_->_ref_count_ = 1;
	_data124_->self = g_object_ref (self);
	_data124_->v = v;
	_tmp0_ = self->priv->item;
	_tmp1_ = dc_status_notifier_item_take_activation_token (_tmp0_);
	_tmp2_ = _tmp1_;
	_g_free0 (_tmp2_);
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda295__gsource_func, block124_data_ref (_data124_), block124_data_unref);
	block124_data_unref (_data124_);
	_data124_ = NULL;
}

static void
___lambda294__dc_tray_menu_notifications_toggle_requested (DcTrayMenu* _sender,
                                                           gboolean enabled,
                                                           gpointer self)
{
	__lambda294_ ((DcTrayIcon*) self, enabled);
}

DcTrayIcon*
dc_tray_icon_construct (GType object_type,
                        GDBusConnection* connection)
{
	DcTrayIcon * self = NULL;
	GDBusConnection* _tmp0_;
	DcStatusNotifierItem* _tmp1_;
	DcTrayMenu* _tmp2_;
	DcStatusNotifierItem* _tmp3_;
	DcTrayMenu* _tmp4_;
	DcTrayMenu* _tmp5_;
	DcTrayMenu* _tmp6_;
	g_return_val_if_fail (connection != NULL, NULL);
	self = (DcTrayIcon*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (connection);
	_g_object_unref0 (self->priv->conn);
	self->priv->conn = _tmp0_;
	_tmp1_ = dc_status_notifier_item_new ();
	_g_object_unref0 (self->priv->item);
	self->priv->item = _tmp1_;
	_tmp2_ = dc_tray_menu_new ();
	_g_object_unref0 (self->priv->menu);
	self->priv->menu = _tmp2_;
	_tmp3_ = self->priv->item;
	g_signal_connect_object (_tmp3_, "activate-requested", (GCallback) _dc_tray_icon_request_show_on_current_desktop_dc_status_notifier_item_activate_requested, self, 0);
	_tmp4_ = self->priv->menu;
	g_signal_connect_object (_tmp4_, "show-toggle-requested", (GCallback) _dc_tray_icon_request_window_toggle_dc_tray_menu_show_toggle_requested, self, 0);
	_tmp5_ = self->priv->menu;
	g_signal_connect_object (_tmp5_, "quit-requested", (GCallback) ___lambda292__dc_tray_menu_quit_requested, self, 0);
	_tmp6_ = self->priv->menu;
	g_signal_connect_object (_tmp6_, "notifications-toggle-requested", (GCallback) ___lambda294__dc_tray_menu_notifications_toggle_requested, self, 0);
	return self;
}

DcTrayIcon*
dc_tray_icon_new (GDBusConnection* connection)
{
	return dc_tray_icon_construct (DC_TYPE_TRAY_ICON, connection);
}

static Block125Data*
block125_data_ref (Block125Data* _data125_)
{
	g_atomic_int_inc (&_data125_->_ref_count_);
	return _data125_;
}

static void
block125_data_unref (void * _userdata_)
{
	Block125Data* _data125_;
	_data125_ = (Block125Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data125_->_ref_count_)) {
		DcTrayIcon* self;
		self = _data125_->self;
		_g_free0 (_data125_->token);
		_g_object_unref0 (self);
		g_slice_free (Block125Data, _data125_);
	}
}

static gboolean
__lambda290_ (Block125Data* _data125_)
{
	DcTrayIcon* self;
	gboolean result;
	self = _data125_->self;
	g_signal_emit (self, dc_tray_icon_signals[DC_TRAY_ICON_SHOW_ON_CURRENT_DESKTOP_REQUESTED_SIGNAL], 0, _data125_->token);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda290__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda290_ (self);
	return result;
}

static void
dc_tray_icon_request_show_on_current_desktop (DcTrayIcon* self)
{
	Block125Data* _data125_;
	DcStatusNotifierItem* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_data125_ = g_slice_new0 (Block125Data);
	_data125_->_ref_count_ = 1;
	_data125_->self = g_object_ref (self);
	_tmp0_ = self->priv->item;
	_tmp1_ = dc_status_notifier_item_take_activation_token (_tmp0_);
	_data125_->token = _tmp1_;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda290__gsource_func, block125_data_ref (_data125_), block125_data_unref);
	block125_data_unref (_data125_);
	_data125_ = NULL;
}

static Block126Data*
block126_data_ref (Block126Data* _data126_)
{
	g_atomic_int_inc (&_data126_->_ref_count_);
	return _data126_;
}

static void
block126_data_unref (void * _userdata_)
{
	Block126Data* _data126_;
	_data126_ = (Block126Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data126_->_ref_count_)) {
		DcTrayIcon* self;
		self = _data126_->self;
		_g_free0 (_data126_->token);
		_g_object_unref0 (self);
		g_slice_free (Block126Data, _data126_);
	}
}

static gboolean
__lambda291_ (Block126Data* _data126_)
{
	DcTrayIcon* self;
	gboolean result;
	self = _data126_->self;
	g_signal_emit (self, dc_tray_icon_signals[DC_TRAY_ICON_WINDOW_TOGGLE_REQUESTED_SIGNAL], 0, _data126_->token);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda291__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda291_ (self);
	return result;
}

static void
dc_tray_icon_request_window_toggle (DcTrayIcon* self)
{
	Block126Data* _data126_;
	DcStatusNotifierItem* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_data126_ = g_slice_new0 (Block126Data);
	_data126_->_ref_count_ = 1;
	_data126_->self = g_object_ref (self);
	_tmp0_ = self->priv->item;
	_tmp1_ = dc_status_notifier_item_take_activation_token (_tmp0_);
	_data126_->token = _tmp1_;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda291__gsource_func, block126_data_ref (_data126_), block126_data_unref);
	block126_data_unref (_data126_);
	_data126_ = NULL;
}

void
dc_tray_icon_set_notifications_enabled (DcTrayIcon* self,
                                        gboolean enabled)
{
	DcTrayMenu* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->menu;
	dc_tray_menu_set_notifications_enabled (_tmp0_, enabled);
}

void
dc_tray_icon_set_window_visible (DcTrayIcon* self,
                                 gboolean window_visible)
{
	DcTrayMenu* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->menu;
	dc_tray_menu_set_window_visible (_tmp0_, window_visible);
}

static void
__lambda296_ (DcTrayIcon* self,
              GDBusConnection* c,
              const gchar* n)
{
	g_return_if_fail (c != NULL);
	g_return_if_fail (n != NULL);
	dc_tray_icon_register_with_watcher (self, n, NULL, NULL);
}

static void
___lambda296__gbus_name_acquired_callback (GDBusConnection* connection,
                                           const gchar* name,
                                           gpointer self)
{
	__lambda296_ ((DcTrayIcon*) self, connection, name);
}

static void
__lambda297_ (DcTrayIcon* self,
              GDBusConnection* c,
              const gchar* n)
{
	g_return_if_fail (c != NULL);
	g_return_if_fail (n != NULL);
}

static void
___lambda297__gbus_name_lost_callback (GDBusConnection* connection,
                                       const gchar* name,
                                       gpointer self)
{
	__lambda297_ ((DcTrayIcon*) self, connection, name);
}

gboolean
dc_tray_icon_show (DcTrayIcon* self)
{
	gchar* name = NULL;
	gchar* _tmp11_;
	GDBusConnection* _tmp12_;
	const gchar* _tmp13_;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (self->priv->visible) {
		result = TRUE;
		return result;
	}
	{
		guint _tmp0_ = 0U;
		GDBusConnection* _tmp1_;
		DcStatusNotifierItem* _tmp2_;
		guint _tmp3_;
		guint _tmp4_ = 0U;
		GDBusConnection* _tmp5_;
		DcTrayMenu* _tmp6_;
		guint _tmp7_;
		_tmp1_ = self->priv->conn;
		_tmp2_ = self->priv->item;
		_tmp3_ = dc_status_notifier_item_register_object (_tmp2_, _tmp1_, DC_TRAY_ICON_ITEM_PATH, &_inner_error0_);
		_tmp0_ = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		self->priv->item_reg = _tmp0_;
		_tmp5_ = self->priv->conn;
		_tmp6_ = self->priv->menu;
		_tmp7_ = dc_tray_menu_register_object (_tmp6_, _tmp5_, DC_TRAY_ICON_MENU_PATH, &_inner_error0_);
		_tmp4_ = _tmp7_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		self->priv->menu_reg = _tmp4_;
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp8_;
		const gchar* _tmp9_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp8_ = e;
		_tmp9_ = _tmp8_->message;
		g_warning ("tray_icon.vala:345: Failed to export tray objects: %s", _tmp9_);
		result = FALSE;
		_g_error_free0 (e);
		return result;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp10_ = 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 _tmp10_;
	}
	self->priv->visible = TRUE;
	_tmp11_ = g_strdup_printf ("org.kde.StatusNotifierItem-%d-1", (gint) getpid ());
	name = _tmp11_;
	_tmp12_ = self->priv->conn;
	_tmp13_ = name;
	self->priv->name_own = g_bus_own_name_on_connection_with_closures (_tmp12_, _tmp13_, G_BUS_NAME_OWNER_FLAGS_NONE, (GClosure*) ((___lambda296__gbus_name_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda296__gbus_name_acquired_callback, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((___lambda297__gbus_name_lost_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda297__gbus_name_lost_callback, g_object_ref (self), (GClosureNotify) g_object_unref)));
	result = TRUE;
	_g_free0 (name);
	return result;
}

void
dc_tray_icon_hide (DcTrayIcon* self)
{
	g_return_if_fail (self != NULL);
	if (!self->priv->visible) {
		return;
	}
	self->priv->visible = FALSE;
	if (self->priv->name_own != ((guint) 0)) {
		g_bus_unown_name (self->priv->name_own);
		self->priv->name_own = (guint) 0;
	}
	if (self->priv->item_reg != ((guint) 0)) {
		GDBusConnection* _tmp0_;
		_tmp0_ = self->priv->conn;
		g_dbus_connection_unregister_object (_tmp0_, self->priv->item_reg);
		self->priv->item_reg = (guint) 0;
	}
	if (self->priv->menu_reg != ((guint) 0)) {
		GDBusConnection* _tmp1_;
		_tmp1_ = self->priv->conn;
		g_dbus_connection_unregister_object (_tmp1_, self->priv->menu_reg);
		self->priv->menu_reg = (guint) 0;
	}
}

static void
dc_tray_icon_register_with_watcher_data_free (gpointer _data)
{
	DcTrayIconRegisterWithWatcherData* _data_;
	_data_ = _data;
	_g_free0 (_data_->name);
	_g_object_unref0 (_data_->self);
	g_slice_free (DcTrayIconRegisterWithWatcherData, _data_);
}

static void
dc_tray_icon_register_with_watcher (DcTrayIcon* self,
                                    const gchar* name,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_)
{
	DcTrayIconRegisterWithWatcherData* _data_;
	DcTrayIcon* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	_data_ = g_slice_new0 (DcTrayIconRegisterWithWatcherData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dc_tray_icon_register_with_watcher_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (name);
	_g_free0 (_data_->name);
	_data_->name = _tmp1_;
	dc_tray_icon_register_with_watcher_co (_data_);
}

static void
dc_tray_icon_register_with_watcher_finish (DcTrayIcon* self,
                                           GAsyncResult* _res_)
{
	DcTrayIconRegisterWithWatcherData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
dc_tray_icon_register_with_watcher_ready (GObject* source_object,
                                          GAsyncResult* _res_,
                                          gpointer _user_data_)
{
	DcTrayIconRegisterWithWatcherData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dc_tray_icon_register_with_watcher_co (_data_);
}

static gboolean
dc_tray_icon_register_with_watcher_co (DcTrayIconRegisterWithWatcherData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_state_ = 1;
		g_async_initable_new_async (DC_TYPE_STATUS_NOTIFIER_WATCHER_PROXY, 0, NULL, dc_tray_icon_register_with_watcher_ready, _data_, "g-flags", 0, "g-name", "org.kde.StatusNotifierWatcher", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/StatusNotifierWatcher", "g-interface-name", "org.kde.StatusNotifierWatcher", NULL);
		return FALSE;
		_state_1:
		_data_->_tmp0_ = (DcStatusNotifierWatcher*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->watcher = (DcStatusNotifierWatcher*) _data_->_tmp0_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp1_ = _data_->watcher;
		dc_status_notifier_watcher_register_status_notifier_item (_data_->_tmp1_, _data_->name, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->watcher);
			goto __catch0_g_error;
		}
		_g_object_unref0 (_data_->watcher);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp2_ = _data_->e;
		_data_->_tmp3_ = _data_->_tmp2_->message;
		g_info ("tray_icon.vala:384: StatusNotifierWatcher unavailable: %s", _data_->_tmp3_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
dc_tray_icon_class_init (DcTrayIconClass * klass,
                         gpointer klass_data)
{
	dc_tray_icon_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DcTrayIcon_private_offset);
	G_OBJECT_CLASS (klass)->finalize = dc_tray_icon_finalize;
	dc_tray_icon_signals[DC_TRAY_ICON_SHOW_ON_CURRENT_DESKTOP_REQUESTED_SIGNAL] = g_signal_new ("show-on-current-desktop-requested", DC_TYPE_TRAY_ICON, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	dc_tray_icon_signals[DC_TRAY_ICON_WINDOW_TOGGLE_REQUESTED_SIGNAL] = g_signal_new ("window-toggle-requested", DC_TYPE_TRAY_ICON, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	dc_tray_icon_signals[DC_TRAY_ICON_QUIT_REQUESTED_SIGNAL] = g_signal_new ("quit-requested", DC_TYPE_TRAY_ICON, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	dc_tray_icon_signals[DC_TRAY_ICON_NOTIFICATIONS_TOGGLE_REQUESTED_SIGNAL] = g_signal_new ("notifications-toggle-requested", DC_TYPE_TRAY_ICON, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
}

static void
dc_tray_icon_instance_init (DcTrayIcon * self,
                            gpointer klass)
{
	self->priv = dc_tray_icon_get_instance_private (self);
	self->priv->item_reg = (guint) 0;
	self->priv->menu_reg = (guint) 0;
	self->priv->name_own = (guint) 0;
	self->priv->visible = FALSE;
}

static void
dc_tray_icon_finalize (GObject * obj)
{
	DcTrayIcon * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DC_TYPE_TRAY_ICON, DcTrayIcon);
	_g_object_unref0 (self->priv->conn);
	_g_object_unref0 (self->priv->item);
	_g_object_unref0 (self->priv->menu);
	G_OBJECT_CLASS (dc_tray_icon_parent_class)->finalize (obj);
}

static GType
dc_tray_icon_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DcTrayIconClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dc_tray_icon_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DcTrayIcon), 0, (GInstanceInitFunc) dc_tray_icon_instance_init, NULL };
	GType dc_tray_icon_type_id;
	dc_tray_icon_type_id = g_type_register_static (G_TYPE_OBJECT, "DcTrayIcon", &g_define_type_info, 0);
	DcTrayIcon_private_offset = g_type_add_instance_private (dc_tray_icon_type_id, sizeof (DcTrayIconPrivate));
	return dc_tray_icon_type_id;
}

GType
dc_tray_icon_get_type (void)
{
	static volatile gsize dc_tray_icon_type_id__once = 0;
	if (g_once_init_enter (&dc_tray_icon_type_id__once)) {
		GType dc_tray_icon_type_id;
		dc_tray_icon_type_id = dc_tray_icon_get_type_once ();
		g_once_init_leave (&dc_tray_icon_type_id__once, dc_tray_icon_type_id);
	}
	return dc_tray_icon_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

