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

/*
 * This file is part of budgie-desktop
 *
 * Copyright Budgie Desktop Developers
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

#include <glib-object.h>
#include <gio/gio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include "trayapplet.h"
#include <gtk/gtk.h>
#include <gdk/gdk.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#define TYPE_DBUS_MENU_INTERFACE (dbus_menu_interface_get_type ())
#define DBUS_MENU_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DBUS_MENU_INTERFACE, DBusMenuInterface))
#define IS_DBUS_MENU_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DBUS_MENU_INTERFACE))
#define DBUS_MENU_INTERFACE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_DBUS_MENU_INTERFACE, DBusMenuInterfaceIface))

typedef struct _DBusMenuInterface DBusMenuInterface;
typedef struct _DBusMenuInterfaceIface DBusMenuInterfaceIface;

#define TYPE_DBUS_MENU_INTERFACE_PROXY (dbus_menu_interface_proxy_get_type ())
enum  {
	DBUS_MENU_INTERFACE_ITEM_ACTIVATION_REQUESTED_SIGNAL,
	DBUS_MENU_INTERFACE_ITEMS_PROPERTIES_UPDATED_SIGNAL,
	DBUS_MENU_INTERFACE_LAYOUT_UPDATED_SIGNAL,
	DBUS_MENU_INTERFACE_NUM_SIGNALS
};
static guint dbus_menu_interface_signals[DBUS_MENU_INTERFACE_NUM_SIGNALS] = {0};
typedef GDBusProxy DBusMenuInterfaceProxy;
typedef GDBusProxyClass DBusMenuInterfaceProxyClass;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	DBUS_MENU_0_PROPERTY,
	DBUS_MENU_NUM_PROPERTIES
};
static GParamSpec* dbus_menu_properties[DBUS_MENU_NUM_PROPERTIES];
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _Block1Data Block1Data;
#define _g_variant_iter_free0(var) ((var == NULL) ? NULL : (var = (g_variant_iter_free (var), NULL)))
#define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))

struct _DBusMenuInterfaceIface {
	GTypeInterface parent_iface;
	gboolean (*about_to_show) (DBusMenuInterface* self, gint32 id, gboolean* need_update, GError** error);
	void (*about_to_show_group) (DBusMenuInterface* self, gint32* ids, gint ids_length1, gint32** updates_needed, gint* updates_needed_length1, gint32** id_errors, gint* id_errors_length1, GError** error);
	void (*event) (DBusMenuInterface* self, gint32 id, const gchar* event_id, GVariant* data, guint32 timestamp, GError** error);
	void (*event_group) (DBusMenuInterface* self, GVariant* events, gint32** id_errors, gint* id_errors_length1, GError** error);
	void (*get_layout) (DBusMenuInterface* self, gint32 parent_id, gint32 recursion_depth, gchar** property_names, gint property_names_length1, guint32* revision, GVariant** layout, GError** error);
	GVariant* (*get_property) (DBusMenuInterface* self, gint32 id, const gchar* name, GError** error);
	void (*get_group_properties) (DBusMenuInterface* self, gint32* ids, gint ids_length1, gchar** property_names, gint property_names_length1, GVariant** properties, GError** error);
	guint32 (*get_version) (DBusMenuInterface* self);
	gchar* (*get_status) (DBusMenuInterface* self);
	gchar* (*get_text_direction) (DBusMenuInterface* self);
	gchar** (*get_icon_theme_path) (DBusMenuInterface* self, gint* result_length1);
};

struct _DBusMenuPrivate {
	GHashTable* all_nodes;
	DBusMenuInterface* iface;
};

struct _Block1Data {
	int _ref_count_;
	DBusMenu* self;
	gint32 id;
};

static GType dbus_menu_interface_type_id = 0;
static gint DBusMenu_private_offset;
static gpointer dbus_menu_parent_class = NULL;
static GType dbus_menu_type_id = 0;

VALA_EXTERN GType dbus_menu_interface_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void dbus_menu_interface_proxy_register_dynamic_type (GTypeModule* module);
VALA_EXTERN guint dbus_menu_interface_register_object (void* object,
                                           GDBusConnection* connection,
                                           const gchar* path,
                                           GError** error);
GType dbus_menu_interface_register_type (GTypeModule * module);
VALA_EXTERN GType dbus_menu_interface_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gboolean dbus_menu_interface_about_to_show (DBusMenuInterface* self,
                                            gint32 id,
                                            gboolean* need_update,
                                            GError** error);
VALA_EXTERN void dbus_menu_interface_about_to_show_group (DBusMenuInterface* 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 dbus_menu_interface_event (DBusMenuInterface* self,
                                gint32 id,
                                const gchar* event_id,
                                GVariant* data,
                                guint32 timestamp,
                                GError** error);
VALA_EXTERN void dbus_menu_interface_event_group (DBusMenuInterface* self,
                                      GVariant* events,
                                      gint32** id_errors,
                                      gint* id_errors_length1,
                                      GError** error);
VALA_EXTERN void dbus_menu_interface_get_layout (DBusMenuInterface* self,
                                     gint32 parent_id,
                                     gint32 recursion_depth,
                                     gchar** property_names,
                                     gint property_names_length1,
                                     guint32* revision,
                                     GVariant** layout,
                                     GError** error);
VALA_EXTERN GVariant* dbus_menu_interface_get_property (DBusMenuInterface* self,
                                            gint32 id,
                                            const gchar* name,
                                            GError** error);
VALA_EXTERN void dbus_menu_interface_get_group_properties (DBusMenuInterface* self,
                                               gint32* ids,
                                               gint ids_length1,
                                               gchar** property_names,
                                               gint property_names_length1,
                                               GVariant** properties,
                                               GError** error);
VALA_EXTERN guint32 dbus_menu_interface_get_version (DBusMenuInterface* self);
VALA_EXTERN gchar* dbus_menu_interface_get_status (DBusMenuInterface* self);
VALA_EXTERN gchar* dbus_menu_interface_get_text_direction (DBusMenuInterface* self);
VALA_EXTERN gchar** dbus_menu_interface_get_icon_theme_path (DBusMenuInterface* self,
                                                 gint* result_length1);
static void g_cclosure_user_marshal_VOID__INT_UINT (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__VARIANT_VARIANT (GClosure * closure,
                                                    GValue * return_value,
                                                    guint n_param_values,
                                                    const GValue * param_values,
                                                    gpointer invocation_hint,
                                                    gpointer marshal_data);
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 dbus_menu_interface_proxy_g_signal (GDBusProxy* proxy,
                                         const gchar* sender_name,
                                         const gchar* signal_name,
                                         GVariant* parameters);
static void _dbus_handle_dbus_menu_interface_item_activation_requested (DBusMenuInterface* self,
                                                                 GVariant* parameters);
static void _dbus_handle_dbus_menu_interface_items_properties_updated (DBusMenuInterface* self,
                                                                GVariant* parameters);
static void _dbus_handle_dbus_menu_interface_layout_updated (DBusMenuInterface* self,
                                                      GVariant* parameters);
static gboolean dbus_menu_interface_proxy_about_to_show (DBusMenuInterface* self,
                                                  gint32 id,
                                                  gboolean* need_update,
                                                  GError** error);
static void dbus_menu_interface_proxy_about_to_show_group (DBusMenuInterface* self,
                                                    gint32* ids,
                                                    gint ids_length1,
                                                    gint32** updates_needed,
                                                    gint* updates_needed_length1,
                                                    gint32** id_errors,
                                                    gint* id_errors_length1,
                                                    GError** error);
static void dbus_menu_interface_proxy_event (DBusMenuInterface* self,
                                      gint32 id,
                                      const gchar* event_id,
                                      GVariant* data,
                                      guint32 timestamp,
                                      GError** error);
static void dbus_menu_interface_proxy_event_group (DBusMenuInterface* self,
                                            GVariant* events,
                                            gint32** id_errors,
                                            gint* id_errors_length1,
                                            GError** error);
static void dbus_menu_interface_proxy_get_layout (DBusMenuInterface* self,
                                           gint32 parent_id,
                                           gint32 recursion_depth,
                                           gchar** property_names,
                                           gint property_names_length1,
                                           guint32* revision,
                                           GVariant** layout,
                                           GError** error);
static GVariant* dbus_menu_interface_proxy_get_property (DBusMenuInterface* self,
                                                  gint32 id,
                                                  const gchar* name,
                                                  GError** error);
static void dbus_menu_interface_proxy_get_group_properties (DBusMenuInterface* self,
                                                     gint32* ids,
                                                     gint ids_length1,
                                                     gchar** property_names,
                                                     gint property_names_length1,
                                                     GVariant** properties,
                                                     GError** error);
static guint32 dbus_menu_interface_dbus_proxy_get_version (DBusMenuInterface* self);
static gchar* dbus_menu_interface_dbus_proxy_get_status (DBusMenuInterface* self);
static gchar* dbus_menu_interface_dbus_proxy_get_text_direction (DBusMenuInterface* self);
static gchar** dbus_menu_interface_dbus_proxy_get_icon_theme_path (DBusMenuInterface* self,
                                                            gint* result_length1);
static void dbus_menu_interface_proxy_dbus_menu_interface_interface_init (DBusMenuInterfaceIface* iface);
static void _dbus_dbus_menu_interface_about_to_show (DBusMenuInterface* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation);
static void _dbus_dbus_menu_interface_about_to_show_group (DBusMenuInterface* self,
                                                    GVariant* _parameters_,
                                                    GDBusMethodInvocation* invocation);
static void _dbus_dbus_menu_interface_event (DBusMenuInterface* self,
                                      GVariant* _parameters_,
                                      GDBusMethodInvocation* invocation);
static void _dbus_dbus_menu_interface_event_group (DBusMenuInterface* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation);
static void _dbus_dbus_menu_interface_get_layout (DBusMenuInterface* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation);
static void _dbus_dbus_menu_interface_get_property (DBusMenuInterface* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation);
static void _dbus_dbus_menu_interface_get_group_properties (DBusMenuInterface* self,
                                                     GVariant* _parameters_,
                                                     GDBusMethodInvocation* invocation);
static void dbus_menu_interface_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* dbus_menu_interface_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_dbus_menu_interface_get_version (DBusMenuInterface* self);
static GVariant* _dbus_dbus_menu_interface_get_status (DBusMenuInterface* self);
static GVariant* _dbus_dbus_menu_interface_get_text_direction (DBusMenuInterface* self);
static GVariant* _dbus_dbus_menu_interface_get_icon_theme_path (DBusMenuInterface* self);
static gboolean dbus_menu_interface_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_dbus_menu_interface_item_activation_requested (GObject* _sender,
                                                          gint32 id,
                                                          guint32 timestamp,
                                                          gpointer* _data);
static void _dbus_dbus_menu_interface_items_properties_updated (GObject* _sender,
                                                         GVariant* updated_props,
                                                         GVariant* removed_props,
                                                         gpointer* _data);
static void _dbus_dbus_menu_interface_layout_updated (GObject* _sender,
                                               guint32 revision,
                                               gint32 parent_id,
                                               gpointer* _data);
static void _dbus_menu_interface_unregister_object (gpointer user_data);
static void _g_object_unref0_ (gpointer var);
static void dbus_menu_update_layout (DBusMenu* self);
static void __lambda14_ (DBusMenu* self,
                  guint32 revision,
                  gint32 parent);
static void ___lambda14__dbus_menu_interface_layout_updated (DBusMenuInterface* _sender,
                                                      guint32 revision,
                                                      gint32 parent_id,
                                                      gpointer self);
static void __lambda15_ (DBusMenu* self,
                  GVariant* updated_props,
                  GVariant* removed_props);
static void dbus_menu_on_items_properties_updated (DBusMenu* self,
                                            GVariant* updated_props);
static void ___lambda15__dbus_menu_interface_items_properties_updated (DBusMenuInterface* _sender,
                                                                GVariant* updated_props,
                                                                GVariant* removed_props,
                                                                gpointer self);
static DBusMenuNode* dbus_menu_parse_layout (DBusMenu* self,
                                      GVariant* layout);
static gboolean __lambda13_ (DBusMenu* self,
                      gint32 id,
                      DBusMenuNode* node);
static gboolean ___lambda13__ghr_func (gconstpointer key,
                                gconstpointer value,
                                gpointer self);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void dbus_menu_update_node_properties (DBusMenu* self,
                                       DBusMenuNode* node,
                                       GVariant* props);
static void ___lambda9_ (Block1Data* _data1_,
                  GVariant* data);
static void dbus_menu_send_event (DBusMenu* self,
                           gint32 node_id,
                           const gchar* type,
                           GVariant* data);
static void ____lambda9__dbus_menu_node_clicked (DBusMenuNode* _sender,
                                          GVariant* data,
                                          gpointer self);
static void ___lambda10_ (Block1Data* _data1_,
                   DBusMenuNode* event);
static void ____lambda10__dbus_menu_node_hovered (DBusMenuNode* _sender,
                                           gpointer self);
static void ___lambda11_ (Block1Data* _data1_,
                   DBusMenuNode* event);
static void ____lambda11__dbus_menu_node_opened (DBusMenuNode* _sender,
                                          gpointer self);
static void ___lambda12_ (Block1Data* _data1_,
                   DBusMenuNode* event);
static void ____lambda12__dbus_menu_node_closed (DBusMenuNode* _sender,
                                          gpointer self);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void dbus_menu_finalize (GObject * obj);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_about_to_show_id = {-1, "id", "i", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_about_to_show_need_update = {-1, "need_update", "b", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_about_to_show_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_about_to_show_in[] = {&_dbus_menu_interface_dbus_arg_info_about_to_show_id, NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_about_to_show_out[] = {&_dbus_menu_interface_dbus_arg_info_about_to_show_need_update, &_dbus_menu_interface_dbus_arg_info_about_to_show_result, NULL};
static const GDBusMethodInfo _dbus_menu_interface_dbus_method_info_about_to_show = {-1, "AboutToShow", (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_about_to_show_in), (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_about_to_show_out), NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_about_to_show_group_ids = {-1, "ids", "ai", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_about_to_show_group_updates_needed = {-1, "updates_needed", "ai", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_about_to_show_group_id_errors = {-1, "id_errors", "ai", NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_about_to_show_group_in[] = {&_dbus_menu_interface_dbus_arg_info_about_to_show_group_ids, NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_about_to_show_group_out[] = {&_dbus_menu_interface_dbus_arg_info_about_to_show_group_updates_needed, &_dbus_menu_interface_dbus_arg_info_about_to_show_group_id_errors, NULL};
static const GDBusMethodInfo _dbus_menu_interface_dbus_method_info_about_to_show_group = {-1, "AboutToShowGroup", (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_about_to_show_group_in), (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_about_to_show_group_out), NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_event_id = {-1, "id", "i", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_event_event_id = {-1, "event_id", "s", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_event_data = {-1, "data", "v", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_event_timestamp = {-1, "timestamp", "u", NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_event_in[] = {&_dbus_menu_interface_dbus_arg_info_event_id, &_dbus_menu_interface_dbus_arg_info_event_event_id, &_dbus_menu_interface_dbus_arg_info_event_data, &_dbus_menu_interface_dbus_arg_info_event_timestamp, NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_event_out[] = {NULL};
static const GDBusMethodInfo _dbus_menu_interface_dbus_method_info_event = {-1, "Event", (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_event_in), (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_event_out), NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_event_group_events = {-1, "events", "a(isvu)", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_event_group_id_errors = {-1, "id_errors", "ai", NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_event_group_in[] = {&_dbus_menu_interface_dbus_arg_info_event_group_events, NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_event_group_out[] = {&_dbus_menu_interface_dbus_arg_info_event_group_id_errors, NULL};
static const GDBusMethodInfo _dbus_menu_interface_dbus_method_info_event_group = {-1, "EventGroup", (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_event_group_in), (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_event_group_out), NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_get_layout_parent_id = {-1, "parent_id", "i", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_get_layout_recursion_depth = {-1, "recursion_depth", "i", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_get_layout_property_names = {-1, "property_names", "as", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_get_layout_revision = {-1, "revision", "u", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_get_layout_layout = {-1, "layout", "(ia{sv}av)", NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_get_layout_in[] = {&_dbus_menu_interface_dbus_arg_info_get_layout_parent_id, &_dbus_menu_interface_dbus_arg_info_get_layout_recursion_depth, &_dbus_menu_interface_dbus_arg_info_get_layout_property_names, NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_get_layout_out[] = {&_dbus_menu_interface_dbus_arg_info_get_layout_revision, &_dbus_menu_interface_dbus_arg_info_get_layout_layout, NULL};
static const GDBusMethodInfo _dbus_menu_interface_dbus_method_info_get_layout = {-1, "GetLayout", (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_get_layout_in), (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_get_layout_out), NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_get_property_id = {-1, "id", "i", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_get_property_name = {-1, "name", "s", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_get_property_result = {-1, "result", "v", NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_get_property_in[] = {&_dbus_menu_interface_dbus_arg_info_get_property_id, &_dbus_menu_interface_dbus_arg_info_get_property_name, NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_get_property_out[] = {&_dbus_menu_interface_dbus_arg_info_get_property_result, NULL};
static const GDBusMethodInfo _dbus_menu_interface_dbus_method_info_get_property = {-1, "GetProperty", (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_get_property_in), (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_get_property_out), NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_get_group_properties_ids = {-1, "ids", "ai", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_get_group_properties_property_names = {-1, "property_names", "as", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_get_group_properties_properties = {-1, "properties", "a(ia{sv})", NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_get_group_properties_in[] = {&_dbus_menu_interface_dbus_arg_info_get_group_properties_ids, &_dbus_menu_interface_dbus_arg_info_get_group_properties_property_names, NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_get_group_properties_out[] = {&_dbus_menu_interface_dbus_arg_info_get_group_properties_properties, NULL};
static const GDBusMethodInfo _dbus_menu_interface_dbus_method_info_get_group_properties = {-1, "GetGroupProperties", (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_get_group_properties_in), (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_get_group_properties_out), NULL};
static const GDBusMethodInfo * const _dbus_menu_interface_dbus_method_info[] = {&_dbus_menu_interface_dbus_method_info_about_to_show, &_dbus_menu_interface_dbus_method_info_about_to_show_group, &_dbus_menu_interface_dbus_method_info_event, &_dbus_menu_interface_dbus_method_info_event_group, &_dbus_menu_interface_dbus_method_info_get_layout, &_dbus_menu_interface_dbus_method_info_get_property, &_dbus_menu_interface_dbus_method_info_get_group_properties, NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_item_activation_requested_id = {-1, "id", "i", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_item_activation_requested_timestamp = {-1, "timestamp", "u", NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_item_activation_requested[] = {&_dbus_menu_interface_dbus_arg_info_item_activation_requested_id, &_dbus_menu_interface_dbus_arg_info_item_activation_requested_timestamp, NULL};
static const GDBusSignalInfo _dbus_menu_interface_dbus_signal_info_item_activation_requested = {-1, "ItemActivationRequested", (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_item_activation_requested), NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_items_properties_updated_updated_props = {-1, "updated_props", "a(ia{sv})", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_items_properties_updated_removed_props = {-1, "removed_props", "a(ias)", NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_items_properties_updated[] = {&_dbus_menu_interface_dbus_arg_info_items_properties_updated_updated_props, &_dbus_menu_interface_dbus_arg_info_items_properties_updated_removed_props, NULL};
static const GDBusSignalInfo _dbus_menu_interface_dbus_signal_info_items_properties_updated = {-1, "ItemsPropertiesUpdated", (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_items_properties_updated), NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_layout_updated_revision = {-1, "revision", "u", NULL};
static const GDBusArgInfo _dbus_menu_interface_dbus_arg_info_layout_updated_parent_id = {-1, "parent_id", "i", NULL};
static const GDBusArgInfo * const _dbus_menu_interface_dbus_arg_info_layout_updated[] = {&_dbus_menu_interface_dbus_arg_info_layout_updated_revision, &_dbus_menu_interface_dbus_arg_info_layout_updated_parent_id, NULL};
static const GDBusSignalInfo _dbus_menu_interface_dbus_signal_info_layout_updated = {-1, "LayoutUpdated", (GDBusArgInfo **) (&_dbus_menu_interface_dbus_arg_info_layout_updated), NULL};
static const GDBusSignalInfo * const _dbus_menu_interface_dbus_signal_info[] = {&_dbus_menu_interface_dbus_signal_info_item_activation_requested, &_dbus_menu_interface_dbus_signal_info_items_properties_updated, &_dbus_menu_interface_dbus_signal_info_layout_updated, NULL};
static const GDBusPropertyInfo _dbus_menu_interface_dbus_property_info_version = {-1, "Version", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dbus_menu_interface_dbus_property_info_status = {-1, "Status", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dbus_menu_interface_dbus_property_info_text_direction = {-1, "TextDirection", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _dbus_menu_interface_dbus_property_info_icon_theme_path = {-1, "IconThemePath", "as", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _dbus_menu_interface_dbus_property_info[] = {&_dbus_menu_interface_dbus_property_info_version, &_dbus_menu_interface_dbus_property_info_status, &_dbus_menu_interface_dbus_property_info_text_direction, &_dbus_menu_interface_dbus_property_info_icon_theme_path, NULL};
static const GDBusInterfaceInfo _dbus_menu_interface_dbus_interface_info = {-1, "com.canonical.dbusmenu", (GDBusMethodInfo **) (&_dbus_menu_interface_dbus_method_info), (GDBusSignalInfo **) (&_dbus_menu_interface_dbus_signal_info), (GDBusPropertyInfo **) (&_dbus_menu_interface_dbus_property_info), NULL};
static const GDBusInterfaceVTable _dbus_menu_interface_dbus_interface_vtable = {dbus_menu_interface_dbus_interface_method_call, dbus_menu_interface_dbus_interface_get_property, dbus_menu_interface_dbus_interface_set_property};

gboolean
dbus_menu_interface_about_to_show (DBusMenuInterface* self,
                                   gint32 id,
                                   gboolean* need_update,
                                   GError** error)
{
	DBusMenuInterfaceIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = DBUS_MENU_INTERFACE_GET_INTERFACE (self);
	if (_iface_->about_to_show) {
		return _iface_->about_to_show (self, id, need_update, error);
	}
	return FALSE;
}

void
dbus_menu_interface_about_to_show_group (DBusMenuInterface* self,
                                         gint32* ids,
                                         gint ids_length1,
                                         gint32** updates_needed,
                                         gint* updates_needed_length1,
                                         gint32** id_errors,
                                         gint* id_errors_length1,
                                         GError** error)
{
	DBusMenuInterfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = DBUS_MENU_INTERFACE_GET_INTERFACE (self);
	if (_iface_->about_to_show_group) {
		_iface_->about_to_show_group (self, ids, ids_length1, updates_needed, updates_needed_length1, id_errors, id_errors_length1, error);
	}
}

void
dbus_menu_interface_event (DBusMenuInterface* self,
                           gint32 id,
                           const gchar* event_id,
                           GVariant* data,
                           guint32 timestamp,
                           GError** error)
{
	DBusMenuInterfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = DBUS_MENU_INTERFACE_GET_INTERFACE (self);
	if (_iface_->event) {
		_iface_->event (self, id, event_id, data, timestamp, error);
	}
}

void
dbus_menu_interface_event_group (DBusMenuInterface* self,
                                 GVariant* events,
                                 gint32** id_errors,
                                 gint* id_errors_length1,
                                 GError** error)
{
	DBusMenuInterfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = DBUS_MENU_INTERFACE_GET_INTERFACE (self);
	if (_iface_->event_group) {
		_iface_->event_group (self, events, id_errors, id_errors_length1, error);
	}
}

void
dbus_menu_interface_get_layout (DBusMenuInterface* self,
                                gint32 parent_id,
                                gint32 recursion_depth,
                                gchar** property_names,
                                gint property_names_length1,
                                guint32* revision,
                                GVariant** layout,
                                GError** error)
{
	DBusMenuInterfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = DBUS_MENU_INTERFACE_GET_INTERFACE (self);
	if (_iface_->get_layout) {
		_iface_->get_layout (self, parent_id, recursion_depth, property_names, property_names_length1, revision, layout, error);
	}
}

GVariant*
dbus_menu_interface_get_property (DBusMenuInterface* self,
                                  gint32 id,
                                  const gchar* name,
                                  GError** error)
{
	DBusMenuInterfaceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = DBUS_MENU_INTERFACE_GET_INTERFACE (self);
	if (_iface_->get_property) {
		return _iface_->get_property (self, id, name, error);
	}
	return NULL;
}

void
dbus_menu_interface_get_group_properties (DBusMenuInterface* self,
                                          gint32* ids,
                                          gint ids_length1,
                                          gchar** property_names,
                                          gint property_names_length1,
                                          GVariant** properties,
                                          GError** error)
{
	DBusMenuInterfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = DBUS_MENU_INTERFACE_GET_INTERFACE (self);
	if (_iface_->get_group_properties) {
		_iface_->get_group_properties (self, ids, ids_length1, property_names, property_names_length1, properties, error);
	}
}

guint32
dbus_menu_interface_get_version (DBusMenuInterface* self)
{
	DBusMenuInterfaceIface* _iface_;
	g_return_val_if_fail (self != NULL, 0U);
	_iface_ = DBUS_MENU_INTERFACE_GET_INTERFACE (self);
	if (_iface_->get_version) {
		return _iface_->get_version (self);
	}
	return 0U;
}

gchar*
dbus_menu_interface_get_status (DBusMenuInterface* self)
{
	DBusMenuInterfaceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = DBUS_MENU_INTERFACE_GET_INTERFACE (self);
	if (_iface_->get_status) {
		return _iface_->get_status (self);
	}
	return NULL;
}

gchar*
dbus_menu_interface_get_text_direction (DBusMenuInterface* self)
{
	DBusMenuInterfaceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = DBUS_MENU_INTERFACE_GET_INTERFACE (self);
	if (_iface_->get_text_direction) {
		return _iface_->get_text_direction (self);
	}
	return NULL;
}

gchar**
dbus_menu_interface_get_icon_theme_path (DBusMenuInterface* self,
                                         gint* result_length1)
{
	DBusMenuInterfaceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = DBUS_MENU_INTERFACE_GET_INTERFACE (self);
	if (_iface_->get_icon_theme_path) {
		return _iface_->get_icon_theme_path (self, result_length1);
	}
	return NULL;
}

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

static void
g_cclosure_user_marshal_VOID__VARIANT_VARIANT (GClosure * closure,
                                               GValue * return_value,
                                               guint n_param_values,
                                               const GValue * param_values,
                                               gpointer invocation_hint,
                                               gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__VARIANT_VARIANT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__VARIANT_VARIANT 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__VARIANT_VARIANT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_variant (param_values + 1), g_value_get_variant (param_values + 2), data2);
}

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
dbus_menu_interface_default_init (DBusMenuInterfaceIface * iface,
                                  gpointer iface_data)
{
	dbus_menu_interface_signals[DBUS_MENU_INTERFACE_ITEM_ACTIVATION_REQUESTED_SIGNAL] = g_signal_new ("item-activation-requested", TYPE_DBUS_MENU_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__INT_UINT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_UINT);
	dbus_menu_interface_signals[DBUS_MENU_INTERFACE_ITEMS_PROPERTIES_UPDATED_SIGNAL] = g_signal_new ("items-properties-updated", TYPE_DBUS_MENU_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__VARIANT_VARIANT, G_TYPE_NONE, 2, G_TYPE_VARIANT, G_TYPE_VARIANT);
	dbus_menu_interface_signals[DBUS_MENU_INTERFACE_LAYOUT_UPDATED_SIGNAL] = g_signal_new ("layout-updated", TYPE_DBUS_MENU_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_INT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_INT);
}

GType
dbus_menu_interface_get_type (void)
{
	return dbus_menu_interface_type_id;
}

GType
dbus_menu_interface_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (DBusMenuInterfaceIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dbus_menu_interface_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	dbus_menu_interface_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "DBusMenuInterface", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (dbus_menu_interface_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (dbus_menu_interface_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) dbus_menu_interface_proxy_get_type);
	g_type_set_qdata (dbus_menu_interface_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "com.canonical.dbusmenu");
	g_type_set_qdata (dbus_menu_interface_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_dbus_menu_interface_dbus_interface_info));
	g_type_set_qdata (dbus_menu_interface_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) dbus_menu_interface_register_object);
	return dbus_menu_interface_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (DBusMenuInterfaceProxy, dbus_menu_interface_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_DBUS_MENU_INTERFACE, dbus_menu_interface_proxy_dbus_menu_interface_interface_init) )
static void
dbus_menu_interface_proxy_class_init (DBusMenuInterfaceProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = dbus_menu_interface_proxy_g_signal;
}

static void
_dbus_handle_dbus_menu_interface_item_activation_requested (DBusMenuInterface* self,
                                                            GVariant* parameters)
{
	GVariantIter _arguments_iter;
	gint32 id = 0;
	GVariant* _tmp0_;
	guint32 timestamp = 0U;
	GVariant* _tmp1_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp0_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_get_int32 (_tmp0_);
	g_variant_unref (_tmp0_);
	_tmp1_ = g_variant_iter_next_value (&_arguments_iter);
	timestamp = g_variant_get_uint32 (_tmp1_);
	g_variant_unref (_tmp1_);
	g_signal_emit_by_name (self, "item-activation-requested", id, timestamp);
}

static void
_dbus_handle_dbus_menu_interface_items_properties_updated (DBusMenuInterface* self,
                                                           GVariant* parameters)
{
	GVariantIter _arguments_iter;
	GVariant* updated_props = NULL;
	GVariant* removed_props = NULL;
	g_variant_iter_init (&_arguments_iter, parameters);
	updated_props = g_variant_iter_next_value (&_arguments_iter);
	removed_props = g_variant_iter_next_value (&_arguments_iter);
	g_signal_emit_by_name (self, "items-properties-updated", updated_props, removed_props);
	_g_variant_unref0 (updated_props);
	_g_variant_unref0 (removed_props);
}

static void
_dbus_handle_dbus_menu_interface_layout_updated (DBusMenuInterface* self,
                                                 GVariant* parameters)
{
	GVariantIter _arguments_iter;
	guint32 revision = 0U;
	GVariant* _tmp2_;
	gint32 parent_id = 0;
	GVariant* _tmp3_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp2_ = g_variant_iter_next_value (&_arguments_iter);
	revision = g_variant_get_uint32 (_tmp2_);
	g_variant_unref (_tmp2_);
	_tmp3_ = g_variant_iter_next_value (&_arguments_iter);
	parent_id = g_variant_get_int32 (_tmp3_);
	g_variant_unref (_tmp3_);
	g_signal_emit_by_name (self, "layout-updated", revision, parent_id);
}

static void
dbus_menu_interface_proxy_g_signal (GDBusProxy* proxy,
                                    const gchar* sender_name,
                                    const gchar* signal_name,
                                    GVariant* parameters)
{
	if (strcmp (signal_name, "ItemActivationRequested") == 0) {
		_dbus_handle_dbus_menu_interface_item_activation_requested ((DBusMenuInterface*) proxy, parameters);
	} else if (strcmp (signal_name, "ItemsPropertiesUpdated") == 0) {
		_dbus_handle_dbus_menu_interface_items_properties_updated ((DBusMenuInterface*) proxy, parameters);
	} else if (strcmp (signal_name, "LayoutUpdated") == 0) {
		_dbus_handle_dbus_menu_interface_layout_updated ((DBusMenuInterface*) proxy, parameters);
	}
}

static void
dbus_menu_interface_proxy_class_finalize (DBusMenuInterfaceProxyClass* klass)
{
}

void
dbus_menu_interface_proxy_register_dynamic_type (GTypeModule* module)
{
	dbus_menu_interface_proxy_register_type (module);
}

static void
dbus_menu_interface_proxy_init (DBusMenuInterfaceProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_dbus_menu_interface_dbus_interface_info));
}

static gboolean
dbus_menu_interface_proxy_about_to_show (DBusMenuInterface* self,
                                         gint32 id,
                                         gboolean* need_update,
                                         GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _vala_need_update = FALSE;
	GVariant* _tmp6_;
	gboolean _result = FALSE;
	GVariant* _tmp7_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "com.canonical.dbusmenu", "AboutToShow");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (id));
	_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) {
		gboolean _tmp4_ = FALSE;
		return _tmp4_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		gboolean _tmp5_ = FALSE;
		g_object_unref (_reply_message);
		return _tmp5_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp6_ = g_variant_iter_next_value (&_reply_iter);
	_vala_need_update = g_variant_get_boolean (_tmp6_);
	g_variant_unref (_tmp6_);
	*need_update = _vala_need_update;
	_tmp7_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp7_);
	g_variant_unref (_tmp7_);
	g_object_unref (_reply_message);
	return _result;
}

static void
dbus_menu_interface_proxy_about_to_show_group (DBusMenuInterface* self,
                                               gint32* ids,
                                               gint ids_length1,
                                               gint32** updates_needed,
                                               gint* updates_needed_length1,
                                               gint32** id_errors,
                                               gint* id_errors_length1,
                                               GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	gint32* _tmp8_;
	GVariantBuilder _tmp9_;
	gint _tmp10_;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gint32* _vala_updates_needed = NULL;
	gint _vala_updates_needed_length1;
	GVariant* _tmp11_;
	gint32* _tmp12_;
	gint _tmp12__length;
	gint _tmp12__size;
	gint _tmp12__length1;
	GVariantIter _tmp13_;
	GVariant* _tmp14_;
	gint32* _vala_id_errors = NULL;
	gint _vala_id_errors_length1;
	GVariant* _tmp15_;
	gint32* _tmp16_;
	gint _tmp16__length;
	gint _tmp16__size;
	gint _tmp16__length1;
	GVariantIter _tmp17_;
	GVariant* _tmp18_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "com.canonical.dbusmenu", "AboutToShowGroup");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_tmp8_ = ids;
	g_variant_builder_init (&_tmp9_, G_VARIANT_TYPE ("ai"));
	for (_tmp10_ = 0; _tmp10_ < ids_length1; _tmp10_++) {
		g_variant_builder_add_value (&_tmp9_, g_variant_new_int32 (*_tmp8_));
		_tmp8_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp9_));
	_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;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_vala_updates_needed_length1 = 0;
	_tmp11_ = g_variant_iter_next_value (&_reply_iter);
	_tmp12_ = g_new (gint32, 5);
	_tmp12__length = 0;
	_tmp12__size = 4;
	_tmp12__length1 = 0;
	g_variant_iter_init (&_tmp13_, _tmp11_);
	for (; (_tmp14_ = g_variant_iter_next_value (&_tmp13_)) != NULL; _tmp12__length1++) {
		if (_tmp12__size == _tmp12__length) {
			_tmp12__size = 2 * _tmp12__size;
			_tmp12_ = g_renew (gint32, _tmp12_, _tmp12__size + 1);
		}
		_tmp12_[_tmp12__length++] = g_variant_get_int32 (_tmp14_);
		g_variant_unref (_tmp14_);
	}
	_vala_updates_needed_length1 = _tmp12__length1;
	_vala_updates_needed = _tmp12_;
	g_variant_unref (_tmp11_);
	*updates_needed = _vala_updates_needed;
	*updates_needed_length1 = _vala_updates_needed_length1;
	_vala_id_errors_length1 = 0;
	_tmp15_ = g_variant_iter_next_value (&_reply_iter);
	_tmp16_ = g_new (gint32, 5);
	_tmp16__length = 0;
	_tmp16__size = 4;
	_tmp16__length1 = 0;
	g_variant_iter_init (&_tmp17_, _tmp15_);
	for (; (_tmp18_ = g_variant_iter_next_value (&_tmp17_)) != NULL; _tmp16__length1++) {
		if (_tmp16__size == _tmp16__length) {
			_tmp16__size = 2 * _tmp16__size;
			_tmp16_ = g_renew (gint32, _tmp16_, _tmp16__size + 1);
		}
		_tmp16_[_tmp16__length++] = g_variant_get_int32 (_tmp18_);
		g_variant_unref (_tmp18_);
	}
	_vala_id_errors_length1 = _tmp16__length1;
	_vala_id_errors = _tmp16_;
	g_variant_unref (_tmp15_);
	*id_errors = _vala_id_errors;
	*id_errors_length1 = _vala_id_errors_length1;
	g_object_unref (_reply_message);
}

static void
dbus_menu_interface_proxy_event (DBusMenuInterface* self,
                                 gint32 id,
                                 const gchar* event_id,
                                 GVariant* data,
                                 guint32 timestamp,
                                 GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "com.canonical.dbusmenu", "Event");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (event_id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_variant (data));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (timestamp));
	_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
dbus_menu_interface_proxy_event_group (DBusMenuInterface* self,
                                       GVariant* events,
                                       gint32** id_errors,
                                       gint* id_errors_length1,
                                       GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gint32* _vala_id_errors = NULL;
	gint _vala_id_errors_length1;
	GVariant* _tmp19_;
	gint32* _tmp20_;
	gint _tmp20__length;
	gint _tmp20__size;
	gint _tmp20__length1;
	GVariantIter _tmp21_;
	GVariant* _tmp22_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "com.canonical.dbusmenu", "EventGroup");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, events);
	_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;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_vala_id_errors_length1 = 0;
	_tmp19_ = g_variant_iter_next_value (&_reply_iter);
	_tmp20_ = g_new (gint32, 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 (gint32, _tmp20_, _tmp20__size + 1);
		}
		_tmp20_[_tmp20__length++] = g_variant_get_int32 (_tmp22_);
		g_variant_unref (_tmp22_);
	}
	_vala_id_errors_length1 = _tmp20__length1;
	_vala_id_errors = _tmp20_;
	g_variant_unref (_tmp19_);
	*id_errors = _vala_id_errors;
	*id_errors_length1 = _vala_id_errors_length1;
	g_object_unref (_reply_message);
}

static void
dbus_menu_interface_proxy_get_layout (DBusMenuInterface* self,
                                      gint32 parent_id,
                                      gint32 recursion_depth,
                                      gchar** property_names,
                                      gint property_names_length1,
                                      guint32* revision,
                                      GVariant** layout,
                                      GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	gchar** _tmp23_;
	GVariantBuilder _tmp24_;
	gint _tmp25_;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	guint32 _vala_revision = 0U;
	GVariant* _tmp26_;
	GVariant* _vala_layout = NULL;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "com.canonical.dbusmenu", "GetLayout");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (parent_id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (recursion_depth));
	_tmp23_ = property_names;
	g_variant_builder_init (&_tmp24_, G_VARIANT_TYPE ("as"));
	for (_tmp25_ = 0; _tmp25_ < property_names_length1; _tmp25_++) {
		g_variant_builder_add_value (&_tmp24_, g_variant_new_string (*_tmp23_));
		_tmp23_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp24_));
	_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;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp26_ = g_variant_iter_next_value (&_reply_iter);
	_vala_revision = g_variant_get_uint32 (_tmp26_);
	g_variant_unref (_tmp26_);
	*revision = _vala_revision;
	_vala_layout = g_variant_iter_next_value (&_reply_iter);
	*layout = _vala_layout;
	g_object_unref (_reply_message);
}

static GVariant*
dbus_menu_interface_proxy_get_property (DBusMenuInterface* self,
                                        gint32 id,
                                        const gchar* name,
                                        GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	GVariant* _result = NULL;
	GVariant* _tmp27_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "com.canonical.dbusmenu", "GetProperty");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name));
	_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 NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp27_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_variant (_tmp27_);
	g_variant_unref (_tmp27_);
	g_object_unref (_reply_message);
	return _result;
}

static void
dbus_menu_interface_proxy_get_group_properties (DBusMenuInterface* self,
                                                gint32* ids,
                                                gint ids_length1,
                                                gchar** property_names,
                                                gint property_names_length1,
                                                GVariant** properties,
                                                GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	gint32* _tmp28_;
	GVariantBuilder _tmp29_;
	gint _tmp30_;
	gchar** _tmp31_;
	GVariantBuilder _tmp32_;
	gint _tmp33_;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	GVariant* _vala_properties = NULL;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "com.canonical.dbusmenu", "GetGroupProperties");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_tmp28_ = ids;
	g_variant_builder_init (&_tmp29_, G_VARIANT_TYPE ("ai"));
	for (_tmp30_ = 0; _tmp30_ < ids_length1; _tmp30_++) {
		g_variant_builder_add_value (&_tmp29_, g_variant_new_int32 (*_tmp28_));
		_tmp28_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp29_));
	_tmp31_ = property_names;
	g_variant_builder_init (&_tmp32_, G_VARIANT_TYPE ("as"));
	for (_tmp33_ = 0; _tmp33_ < property_names_length1; _tmp33_++) {
		g_variant_builder_add_value (&_tmp32_, g_variant_new_string (*_tmp31_));
		_tmp31_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp32_));
	_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;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_vala_properties = g_variant_iter_next_value (&_reply_iter);
	*properties = _vala_properties;
	g_object_unref (_reply_message);
}

static guint32
dbus_menu_interface_dbus_proxy_get_version (DBusMenuInterface* self)
{
	GVariant *_inner_reply;
	guint32 _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Version");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("com.canonical.dbusmenu"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Version"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			guint32 _tmp34_ = 0U;
			return _tmp34_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_uint32 (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static gchar*
dbus_menu_interface_dbus_proxy_get_status (DBusMenuInterface* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Status");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("com.canonical.dbusmenu"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Status"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			return NULL;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_dup_string (_inner_reply, NULL);
	g_variant_unref (_inner_reply);
	return _result;
}

static gchar*
dbus_menu_interface_dbus_proxy_get_text_direction (DBusMenuInterface* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "TextDirection");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("com.canonical.dbusmenu"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("TextDirection"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			return NULL;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_dup_string (_inner_reply, NULL);
	g_variant_unref (_inner_reply);
	return _result;
}

static gchar**
dbus_menu_interface_dbus_proxy_get_icon_theme_path (DBusMenuInterface* self,
                                                    gint* result_length1)
{
	GVariant *_inner_reply;
	gchar** _result;
	gint _result_length1;
	gchar** _tmp35_;
	gint _tmp35__length;
	gint _tmp35__size;
	gint _tmp35__length1;
	GVariantIter _tmp36_;
	GVariant* _tmp37_;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "IconThemePath");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("com.canonical.dbusmenu"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("IconThemePath"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			return NULL;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result_length1 = 0;
	_tmp35_ = g_new (gchar*, 5);
	_tmp35__length = 0;
	_tmp35__size = 4;
	_tmp35__length1 = 0;
	g_variant_iter_init (&_tmp36_, _inner_reply);
	for (; (_tmp37_ = g_variant_iter_next_value (&_tmp36_)) != NULL; _tmp35__length1++) {
		if (_tmp35__size == _tmp35__length) {
			_tmp35__size = 2 * _tmp35__size;
			_tmp35_ = g_renew (gchar*, _tmp35_, _tmp35__size + 1);
		}
		_tmp35_[_tmp35__length++] = g_variant_dup_string (_tmp37_, NULL);
		g_variant_unref (_tmp37_);
	}
	_result_length1 = _tmp35__length1;
	_tmp35_[_tmp35__length] = NULL;
	_result = _tmp35_;
	*result_length1 = _result_length1;
	g_variant_unref (_inner_reply);
	return _result;
}

static void
dbus_menu_interface_proxy_dbus_menu_interface_interface_init (DBusMenuInterfaceIface* iface)
{
	iface->about_to_show = dbus_menu_interface_proxy_about_to_show;
	iface->about_to_show_group = dbus_menu_interface_proxy_about_to_show_group;
	iface->event = dbus_menu_interface_proxy_event;
	iface->event_group = dbus_menu_interface_proxy_event_group;
	iface->get_layout = dbus_menu_interface_proxy_get_layout;
	iface->get_property = dbus_menu_interface_proxy_get_property;
	iface->get_group_properties = dbus_menu_interface_proxy_get_group_properties;
	iface->get_version = dbus_menu_interface_dbus_proxy_get_version;
	iface->get_status = dbus_menu_interface_dbus_proxy_get_status;
	iface->get_text_direction = dbus_menu_interface_dbus_proxy_get_text_direction;
	iface->get_icon_theme_path = dbus_menu_interface_dbus_proxy_get_icon_theme_path;
}

static void
_dbus_dbus_menu_interface_about_to_show (DBusMenuInterface* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint32 id = 0;
	GVariant* _tmp38_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean need_update = FALSE;
	gboolean result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp38_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_get_int32 (_tmp38_);
	g_variant_unref (_tmp38_);
	result = dbus_menu_interface_about_to_show (self, id, &need_update, &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 (need_update));
	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_dbus_menu_interface_about_to_show_group (DBusMenuInterface* self,
                                               GVariant* _parameters_,
                                               GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint32* ids = NULL;
	gint ids_length1 = 0;
	GVariant* _tmp39_;
	gint32* _tmp40_;
	gint _tmp40__length;
	gint _tmp40__size;
	gint _tmp40__length1;
	GVariantIter _tmp41_;
	GVariant* _tmp42_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gint32* updates_needed = NULL;
	gint updates_needed_length1 = 0;
	gint32* _tmp43_;
	GVariantBuilder _tmp44_;
	gint _tmp45_;
	gint32* id_errors = NULL;
	gint id_errors_length1 = 0;
	gint32* _tmp46_;
	GVariantBuilder _tmp47_;
	gint _tmp48_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp39_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp40_ = g_new (gint32, 5);
	_tmp40__length = 0;
	_tmp40__size = 4;
	_tmp40__length1 = 0;
	g_variant_iter_init (&_tmp41_, _tmp39_);
	for (; (_tmp42_ = g_variant_iter_next_value (&_tmp41_)) != NULL; _tmp40__length1++) {
		if (_tmp40__size == _tmp40__length) {
			_tmp40__size = 2 * _tmp40__size;
			_tmp40_ = g_renew (gint32, _tmp40_, _tmp40__size + 1);
		}
		_tmp40_[_tmp40__length++] = g_variant_get_int32 (_tmp42_);
		g_variant_unref (_tmp42_);
	}
	ids_length1 = _tmp40__length1;
	ids = _tmp40_;
	g_variant_unref (_tmp39_);
	dbus_menu_interface_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);
	_tmp43_ = updates_needed;
	g_variant_builder_init (&_tmp44_, G_VARIANT_TYPE ("ai"));
	for (_tmp45_ = 0; _tmp45_ < updates_needed_length1; _tmp45_++) {
		g_variant_builder_add_value (&_tmp44_, g_variant_new_int32 (*_tmp43_));
		_tmp43_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp44_));
	_tmp46_ = id_errors;
	g_variant_builder_init (&_tmp47_, G_VARIANT_TYPE ("ai"));
	for (_tmp48_ = 0; _tmp48_ < id_errors_length1; _tmp48_++) {
		g_variant_builder_add_value (&_tmp47_, g_variant_new_int32 (*_tmp46_));
		_tmp46_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp47_));
	_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_dbus_menu_interface_event (DBusMenuInterface* self,
                                 GVariant* _parameters_,
                                 GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint32 id = 0;
	GVariant* _tmp49_;
	gchar* event_id = NULL;
	GVariant* _tmp50_;
	GVariant* data = NULL;
	GVariant* _tmp51_;
	guint32 timestamp = 0U;
	GVariant* _tmp52_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp49_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_get_int32 (_tmp49_);
	g_variant_unref (_tmp49_);
	_tmp50_ = g_variant_iter_next_value (&_arguments_iter);
	event_id = g_variant_dup_string (_tmp50_, NULL);
	g_variant_unref (_tmp50_);
	_tmp51_ = g_variant_iter_next_value (&_arguments_iter);
	data = g_variant_get_variant (_tmp51_);
	g_variant_unref (_tmp51_);
	_tmp52_ = g_variant_iter_next_value (&_arguments_iter);
	timestamp = g_variant_get_uint32 (_tmp52_);
	g_variant_unref (_tmp52_);
	dbus_menu_interface_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_dbus_menu_interface_event_group (DBusMenuInterface* 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* _tmp53_;
	GVariantBuilder _tmp54_;
	gint _tmp55_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	events = g_variant_iter_next_value (&_arguments_iter);
	dbus_menu_interface_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);
	_tmp53_ = id_errors;
	g_variant_builder_init (&_tmp54_, G_VARIANT_TYPE ("ai"));
	for (_tmp55_ = 0; _tmp55_ < id_errors_length1; _tmp55_++) {
		g_variant_builder_add_value (&_tmp54_, g_variant_new_int32 (*_tmp53_));
		_tmp53_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp54_));
	_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
_dbus_dbus_menu_interface_get_layout (DBusMenuInterface* self,
                                      GVariant* _parameters_,
                                      GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint32 parent_id = 0;
	GVariant* _tmp56_;
	gint32 recursion_depth = 0;
	GVariant* _tmp57_;
	gchar** property_names = NULL;
	gint property_names_length1 = 0;
	GVariant* _tmp58_;
	gchar** _tmp59_;
	gint _tmp59__length;
	gint _tmp59__size;
	gint _tmp59__length1;
	GVariantIter _tmp60_;
	GVariant* _tmp61_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	guint32 revision = 0U;
	GVariant* layout = NULL;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp56_ = g_variant_iter_next_value (&_arguments_iter);
	parent_id = g_variant_get_int32 (_tmp56_);
	g_variant_unref (_tmp56_);
	_tmp57_ = g_variant_iter_next_value (&_arguments_iter);
	recursion_depth = g_variant_get_int32 (_tmp57_);
	g_variant_unref (_tmp57_);
	_tmp58_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp59_ = g_new (gchar*, 5);
	_tmp59__length = 0;
	_tmp59__size = 4;
	_tmp59__length1 = 0;
	g_variant_iter_init (&_tmp60_, _tmp58_);
	for (; (_tmp61_ = g_variant_iter_next_value (&_tmp60_)) != NULL; _tmp59__length1++) {
		if (_tmp59__size == _tmp59__length) {
			_tmp59__size = 2 * _tmp59__size;
			_tmp59_ = g_renew (gchar*, _tmp59_, _tmp59__size + 1);
		}
		_tmp59_[_tmp59__length++] = g_variant_dup_string (_tmp61_, NULL);
		g_variant_unref (_tmp61_);
	}
	property_names_length1 = _tmp59__length1;
	_tmp59_[_tmp59__length] = NULL;
	property_names = _tmp59_;
	g_variant_unref (_tmp58_);
	dbus_menu_interface_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_dbus_menu_interface_get_property (DBusMenuInterface* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint32 id = 0;
	GVariant* _tmp62_;
	gchar* name = NULL;
	GVariant* _tmp63_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	GVariant* result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp62_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_get_int32 (_tmp62_);
	g_variant_unref (_tmp62_);
	_tmp63_ = g_variant_iter_next_value (&_arguments_iter);
	name = g_variant_dup_string (_tmp63_, NULL);
	g_variant_unref (_tmp63_);
	result = dbus_menu_interface_get_property (self, id, name, &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 (result));
	_g_variant_unref0 (result);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (name);
	;
}

static void
_dbus_dbus_menu_interface_get_group_properties (DBusMenuInterface* self,
                                                GVariant* _parameters_,
                                                GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint32* ids = NULL;
	gint ids_length1 = 0;
	GVariant* _tmp64_;
	gint32* _tmp65_;
	gint _tmp65__length;
	gint _tmp65__size;
	gint _tmp65__length1;
	GVariantIter _tmp66_;
	GVariant* _tmp67_;
	gchar** property_names = NULL;
	gint property_names_length1 = 0;
	GVariant* _tmp68_;
	gchar** _tmp69_;
	gint _tmp69__length;
	gint _tmp69__size;
	gint _tmp69__length1;
	GVariantIter _tmp70_;
	GVariant* _tmp71_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	GVariant* properties = NULL;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp64_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp65_ = g_new (gint32, 5);
	_tmp65__length = 0;
	_tmp65__size = 4;
	_tmp65__length1 = 0;
	g_variant_iter_init (&_tmp66_, _tmp64_);
	for (; (_tmp67_ = g_variant_iter_next_value (&_tmp66_)) != NULL; _tmp65__length1++) {
		if (_tmp65__size == _tmp65__length) {
			_tmp65__size = 2 * _tmp65__size;
			_tmp65_ = g_renew (gint32, _tmp65_, _tmp65__size + 1);
		}
		_tmp65_[_tmp65__length++] = g_variant_get_int32 (_tmp67_);
		g_variant_unref (_tmp67_);
	}
	ids_length1 = _tmp65__length1;
	ids = _tmp65_;
	g_variant_unref (_tmp64_);
	_tmp68_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp69_ = g_new (gchar*, 5);
	_tmp69__length = 0;
	_tmp69__size = 4;
	_tmp69__length1 = 0;
	g_variant_iter_init (&_tmp70_, _tmp68_);
	for (; (_tmp71_ = g_variant_iter_next_value (&_tmp70_)) != NULL; _tmp69__length1++) {
		if (_tmp69__size == _tmp69__length) {
			_tmp69__size = 2 * _tmp69__size;
			_tmp69_ = g_renew (gchar*, _tmp69_, _tmp69__size + 1);
		}
		_tmp69_[_tmp69__length++] = g_variant_dup_string (_tmp71_, NULL);
		g_variant_unref (_tmp71_);
	}
	property_names_length1 = _tmp69__length1;
	_tmp69_[_tmp69__length] = NULL;
	property_names = _tmp69_;
	g_variant_unref (_tmp68_);
	dbus_menu_interface_get_group_properties (self, ids, ids_length1, property_names, property_names_length1, &properties, &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, properties);
	_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 (properties);
	;
}

static void
dbus_menu_interface_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, "AboutToShow") == 0) {
		_dbus_dbus_menu_interface_about_to_show (object, parameters, invocation);
	} else if (strcmp (method_name, "AboutToShowGroup") == 0) {
		_dbus_dbus_menu_interface_about_to_show_group (object, parameters, invocation);
	} else if (strcmp (method_name, "Event") == 0) {
		_dbus_dbus_menu_interface_event (object, parameters, invocation);
	} else if (strcmp (method_name, "EventGroup") == 0) {
		_dbus_dbus_menu_interface_event_group (object, parameters, invocation);
	} else if (strcmp (method_name, "GetLayout") == 0) {
		_dbus_dbus_menu_interface_get_layout (object, parameters, invocation);
	} else if (strcmp (method_name, "GetProperty") == 0) {
		_dbus_dbus_menu_interface_get_property (object, parameters, invocation);
	} else if (strcmp (method_name, "GetGroupProperties") == 0) {
		_dbus_dbus_menu_interface_get_group_properties (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_dbus_menu_interface_get_version (DBusMenuInterface* self)
{
	guint32 result;
	GVariant* _reply;
	result = dbus_menu_interface_get_version (self);
	_reply = g_variant_new_uint32 (result);
	return _reply;
}

static GVariant*
_dbus_dbus_menu_interface_get_status (DBusMenuInterface* self)
{
	gchar* result;
	GVariant* _reply;
	result = dbus_menu_interface_get_status (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_dbus_menu_interface_get_text_direction (DBusMenuInterface* self)
{
	gchar* result;
	GVariant* _reply;
	result = dbus_menu_interface_get_text_direction (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_dbus_menu_interface_get_icon_theme_path (DBusMenuInterface* self)
{
	gchar** result;
	gint result_length1 = 0;
	GVariant* _reply;
	gchar** _tmp72_;
	GVariantBuilder _tmp73_;
	gint _tmp74_;
	result = dbus_menu_interface_get_icon_theme_path (self, &result_length1);
	_tmp72_ = result;
	g_variant_builder_init (&_tmp73_, G_VARIANT_TYPE ("as"));
	for (_tmp74_ = 0; _tmp74_ < result_length1; _tmp74_++) {
		g_variant_builder_add_value (&_tmp73_, g_variant_new_string (*_tmp72_));
		_tmp72_++;
	}
	_reply = g_variant_builder_end (&_tmp73_);
	result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
	return _reply;
}

static GVariant*
dbus_menu_interface_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_dbus_menu_interface_get_version (object);
	} else if (strcmp (property_name, "Status") == 0) {
		return _dbus_dbus_menu_interface_get_status (object);
	} else if (strcmp (property_name, "TextDirection") == 0) {
		return _dbus_dbus_menu_interface_get_text_direction (object);
	} else if (strcmp (property_name, "IconThemePath") == 0) {
		return _dbus_dbus_menu_interface_get_icon_theme_path (object);
	}
	return NULL;
}

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

static void
_dbus_dbus_menu_interface_item_activation_requested (GObject* _sender,
                                                     gint32 id,
                                                     guint32 timestamp,
                                                     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_int32 (id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (timestamp));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "com.canonical.dbusmenu", "ItemActivationRequested", _arguments, NULL);
}

static void
_dbus_dbus_menu_interface_items_properties_updated (GObject* _sender,
                                                    GVariant* updated_props,
                                                    GVariant* removed_props,
                                                    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, updated_props);
	g_variant_builder_add_value (&_arguments_builder, removed_props);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "com.canonical.dbusmenu", "ItemsPropertiesUpdated", _arguments, NULL);
}

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

guint
dbus_menu_interface_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 *) (&_dbus_menu_interface_dbus_interface_info), &_dbus_menu_interface_dbus_interface_vtable, data, _dbus_menu_interface_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "item-activation-requested", (GCallback) _dbus_dbus_menu_interface_item_activation_requested, data);
	g_signal_connect (object, "items-properties-updated", (GCallback) _dbus_dbus_menu_interface_items_properties_updated, data);
	g_signal_connect (object, "layout-updated", (GCallback) _dbus_dbus_menu_interface_layout_updated, data);
	return result;
}

static void
_dbus_menu_interface_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_dbus_menu_interface_item_activation_requested, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_dbus_menu_interface_items_properties_updated, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_dbus_menu_interface_layout_updated, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

static inline gpointer
dbus_menu_get_instance_private (DBusMenu* self)
{
	return G_STRUCT_MEMBER_P (self, DBusMenu_private_offset);
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static void
__lambda14_ (DBusMenu* self,
             guint32 revision,
             gint32 parent)
{
	dbus_menu_update_layout (self);
}

static void
___lambda14__dbus_menu_interface_layout_updated (DBusMenuInterface* _sender,
                                                 guint32 revision,
                                                 gint32 parent_id,
                                                 gpointer self)
{
	__lambda14_ ((DBusMenu*) self, revision, parent_id);
}

static void
__lambda15_ (DBusMenu* self,
             GVariant* updated_props,
             GVariant* removed_props)
{
	g_return_if_fail (updated_props != NULL);
	g_return_if_fail (removed_props != NULL);
	dbus_menu_on_items_properties_updated (self, updated_props);
	dbus_menu_on_items_properties_updated (self, removed_props);
}

static void
___lambda15__dbus_menu_interface_items_properties_updated (DBusMenuInterface* _sender,
                                                           GVariant* updated_props,
                                                           GVariant* removed_props,
                                                           gpointer self)
{
	__lambda15_ ((DBusMenu*) self, updated_props, removed_props);
}

DBusMenu*
dbus_menu_construct (GType object_type,
                     const gchar* dbus_name,
                     const char* dbus_object_path,
                     GError** error)
{
	DBusMenu * self = NULL;
	DBusMenuInterface* _tmp0_ = NULL;
	DBusMenuInterface* _tmp1_;
	DBusMenuInterface* _tmp2_;
	DBusMenuInterface* _tmp3_;
	DBusMenuInterface* _tmp4_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (dbus_name != NULL, NULL);
	g_return_val_if_fail (dbus_object_path != NULL, NULL);
	self = (DBusMenu*) g_object_new (object_type, NULL);
	_tmp1_ = (DBusMenuInterface*) g_initable_new (TYPE_DBUS_MENU_INTERFACE_PROXY, NULL, &_inner_error0_, "g-flags", 0, "g-name", dbus_name, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", (const gchar*) dbus_object_path, "g-interface-name", "com.canonical.dbusmenu", NULL);
	_tmp0_ = (DBusMenuInterface*) _tmp1_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		if ((_inner_error0_->domain == G_DBUS_ERROR) || (_inner_error0_->domain == G_IO_ERROR)) {
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (self);
			return NULL;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	_tmp2_ = _tmp0_;
	_tmp0_ = NULL;
	_g_object_unref0 (self->priv->iface);
	self->priv->iface = _tmp2_;
	dbus_menu_update_layout (self);
	_tmp3_ = self->priv->iface;
	g_signal_connect_object (_tmp3_, "layout-updated", (GCallback) ___lambda14__dbus_menu_interface_layout_updated, self, 0);
	_tmp4_ = self->priv->iface;
	g_signal_connect_object (_tmp4_, "items-properties-updated", (GCallback) ___lambda15__dbus_menu_interface_items_properties_updated, self, 0);
	_g_object_unref0 (_tmp0_);
	return self;
}

DBusMenu*
dbus_menu_new (const gchar* dbus_name,
               const char* dbus_object_path,
               GError** error)
{
	return dbus_menu_construct (TYPE_DBUS_MENU, dbus_name, dbus_object_path, error);
}

static gboolean
__lambda13_ (DBusMenu* self,
             gint32 id,
             DBusMenuNode* node)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (node != NULL, FALSE);
	if (id != ((gint32) 0)) {
		GtkMenuItem* _tmp1_;
		GtkContainer* _tmp2_;
		GtkContainer* _tmp3_;
		_tmp1_ = node->item;
		_tmp2_ = gtk_widget_get_parent ((GtkWidget*) _tmp1_);
		_tmp3_ = _tmp2_;
		_tmp0_ = _tmp3_ == NULL;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static gboolean
___lambda13__ghr_func (gconstpointer key,
                       gconstpointer value,
                       gpointer self)
{
	gboolean result;
	result = __lambda13_ ((DBusMenu*) self, (gint32) ((gintptr) key), (DBusMenuNode*) value);
	return result;
}

static void
dbus_menu_update_layout (DBusMenu* self)
{
	guint32 revision = 0U;
	GVariant* layout = NULL;
	GVariant* _tmp7_;
	DBusMenuNode* _tmp8_;
	DBusMenuNode* _tmp9_;
	GHashTable* _tmp10_;
	GHashTable* _tmp11_;
	gconstpointer _tmp12_;
	GtkMenu* _tmp13_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	{
		DBusMenuInterface* _tmp0_;
		gchar** _tmp1_;
		gchar** _tmp2_;
		gint _tmp2__length1;
		guint32 _tmp3_ = 0U;
		GVariant* _tmp4_ = NULL;
		_tmp0_ = self->priv->iface;
		_tmp1_ = g_new0 (gchar*, 0 + 1);
		_tmp2_ = _tmp1_;
		_tmp2__length1 = 0;
		dbus_menu_interface_get_layout (_tmp0_, (gint32) 0, (gint32) -1, _tmp2_, (gint) 0, &_tmp3_, &_tmp4_, &_inner_error0_);
		revision = _tmp3_;
		_g_variant_unref0 (layout);
		layout = _tmp4_;
		_tmp2_ = (_vala_array_free (_tmp2_, _tmp2__length1, (GDestroyNotify) g_free), NULL);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp5_;
		const gchar* _tmp6_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp5_ = e;
		_tmp6_ = _tmp5_->message;
		g_warning ("DBusMenu.vala:56: Failed to update layout: %s", _tmp6_);
		_g_error_free0 (e);
		_g_variant_unref0 (layout);
		return;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_variant_unref0 (layout);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_tmp7_ = layout;
	_tmp8_ = dbus_menu_parse_layout (self, _tmp7_);
	_tmp9_ = _tmp8_;
	_g_object_unref0 (_tmp9_);
	_tmp10_ = self->priv->all_nodes;
	g_hash_table_foreach_remove (_tmp10_, ___lambda13__ghr_func, self);
	_tmp11_ = self->priv->all_nodes;
	_tmp12_ = g_hash_table_lookup (_tmp11_, (gpointer) ((gintptr) 0));
	_tmp13_ = ((DBusMenuNode*) _tmp12_)->submenu;
	gtk_widget_show_all ((GtkWidget*) _tmp13_);
	_g_variant_unref0 (layout);
}

static Block1Data*
block1_data_ref (Block1Data* _data1_)
{
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}

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

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

static void
___lambda9_ (Block1Data* _data1_,
             GVariant* data)
{
	DBusMenu* self;
	self = _data1_->self;
	dbus_menu_send_event (self, _data1_->id, "clicked", data);
}

static void
____lambda9__dbus_menu_node_clicked (DBusMenuNode* _sender,
                                     GVariant* data,
                                     gpointer self)
{
	___lambda9_ (self, data);
}

static void
___lambda10_ (Block1Data* _data1_,
              DBusMenuNode* event)
{
	DBusMenu* self;
	self = _data1_->self;
	g_return_if_fail (event != NULL);
	dbus_menu_send_event (self, _data1_->id, "hovered", NULL);
}

static void
____lambda10__dbus_menu_node_hovered (DBusMenuNode* _sender,
                                      gpointer self)
{
	___lambda10_ (self, _sender);
}

static void
___lambda11_ (Block1Data* _data1_,
              DBusMenuNode* event)
{
	DBusMenu* self;
	self = _data1_->self;
	g_return_if_fail (event != NULL);
	dbus_menu_send_event (self, _data1_->id, "opened", NULL);
}

static void
____lambda11__dbus_menu_node_opened (DBusMenuNode* _sender,
                                     gpointer self)
{
	___lambda11_ (self, _sender);
}

static void
___lambda12_ (Block1Data* _data1_,
              DBusMenuNode* event)
{
	DBusMenu* self;
	self = _data1_->self;
	g_return_if_fail (event != NULL);
	dbus_menu_send_event (self, _data1_->id, "closed", NULL);
}

static void
____lambda12__dbus_menu_node_closed (DBusMenuNode* _sender,
                                     gpointer self)
{
	___lambda12_ (self, _sender);
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

static DBusMenuNode*
dbus_menu_parse_layout (DBusMenu* self,
                        GVariant* layout)
{
	Block1Data* _data1_;
	GVariant* v_id = NULL;
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	const GVariantType* _tmp2_;
	GVariant* _tmp3_;
	GVariant* v_props = NULL;
	GVariant* _tmp4_;
	GVariant* v_children = NULL;
	GVariant* _tmp5_;
	DBusMenuNode* node = NULL;
	GHashTable* _tmp6_;
	gconstpointer _tmp7_;
	DBusMenuNode* _tmp8_;
	DBusMenuNode* _tmp9_;
	gboolean _tmp21_ = FALSE;
	GVariant* _tmp22_;
	const GVariantType* _tmp23_;
	DBusMenuNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (layout != NULL, NULL);
	_data1_ = g_slice_new0 (Block1Data);
	_data1_->_ref_count_ = 1;
	_data1_->self = g_object_ref (self);
	_tmp0_ = g_variant_get_child_value (layout, (gsize) 0);
	v_id = _tmp0_;
	_tmp1_ = v_id;
	_tmp2_ = G_VARIANT_TYPE_INT32;
	if (!g_variant_is_of_type (_tmp1_, _tmp2_)) {
		result = NULL;
		_g_variant_unref0 (v_id);
		block1_data_unref (_data1_);
		_data1_ = NULL;
		return result;
	}
	_tmp3_ = v_id;
	_data1_->id = g_variant_get_int32 (_tmp3_);
	_tmp4_ = g_variant_get_child_value (layout, (gsize) 1);
	v_props = _tmp4_;
	_tmp5_ = g_variant_get_child_value (layout, (gsize) 2);
	v_children = _tmp5_;
	_tmp6_ = self->priv->all_nodes;
	_tmp7_ = g_hash_table_lookup (_tmp6_, (gpointer) ((gintptr) _data1_->id));
	_tmp8_ = _g_object_ref0 ((DBusMenuNode*) _tmp7_);
	node = _tmp8_;
	_tmp9_ = node;
	if (_tmp9_ != NULL) {
		DBusMenuNode* _tmp10_;
		GVariant* _tmp11_;
		_tmp10_ = node;
		_tmp11_ = v_props;
		dbus_menu_update_node_properties (self, _tmp10_, _tmp11_);
	} else {
		GVariant* _tmp12_;
		DBusMenuNode* _tmp13_;
		DBusMenuNode* _tmp14_;
		DBusMenuNode* _tmp15_;
		DBusMenuNode* _tmp16_;
		DBusMenuNode* _tmp17_;
		GHashTable* _tmp18_;
		DBusMenuNode* _tmp19_;
		DBusMenuNode* _tmp20_;
		_tmp12_ = v_props;
		_tmp13_ = dbus_menu_node_new (_data1_->id, _tmp12_);
		_g_object_unref0 (node);
		node = _tmp13_;
		_tmp14_ = node;
		g_signal_connect_data (_tmp14_, "clicked", (GCallback) ____lambda9__dbus_menu_node_clicked, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
		_tmp15_ = node;
		g_signal_connect_data (_tmp15_, "hovered", (GCallback) ____lambda10__dbus_menu_node_hovered, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
		_tmp16_ = node;
		g_signal_connect_data (_tmp16_, "opened", (GCallback) ____lambda11__dbus_menu_node_opened, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
		_tmp17_ = node;
		g_signal_connect_data (_tmp17_, "closed", (GCallback) ____lambda12__dbus_menu_node_closed, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
		_tmp18_ = self->priv->all_nodes;
		_tmp19_ = node;
		_tmp20_ = _g_object_ref0 (_tmp19_);
		g_hash_table_insert (_tmp18_, (gpointer) ((gintptr) _data1_->id), _tmp20_);
	}
	_tmp22_ = v_children;
	_tmp23_ = g_variant_get_type (_tmp22_);
	if (g_variant_type_is_array (_tmp23_)) {
		GVariant* _tmp24_;
		_tmp24_ = v_children;
		_tmp21_ = g_variant_n_children (_tmp24_) > ((gsize) 0);
	} else {
		_tmp21_ = FALSE;
	}
	if (_tmp21_) {
		GList* new_children = NULL;
		GVariantIter* it = NULL;
		GVariant* _tmp25_;
		GVariantIter* _tmp26_;
		DBusMenuNode* _tmp40_;
		GList* _tmp41_;
		new_children = NULL;
		_tmp25_ = v_children;
		_tmp26_ = g_variant_iter_new (_tmp25_);
		it = _tmp26_;
		{
			GVariant* v_child = NULL;
			GVariantIter* _tmp27_;
			GVariant* _tmp28_;
			_tmp27_ = it;
			_tmp28_ = g_variant_iter_next_value (_tmp27_);
			v_child = _tmp28_;
			{
				gboolean _tmp29_ = FALSE;
				_tmp29_ = TRUE;
				while (TRUE) {
					GVariant* _tmp32_;
					GVariant* _tmp33_;
					GVariant* _tmp34_;
					DBusMenuNode* child_node = NULL;
					GVariant* _tmp35_;
					DBusMenuNode* _tmp36_;
					DBusMenuNode* _tmp37_;
					if (!_tmp29_) {
						GVariantIter* _tmp30_;
						GVariant* _tmp31_;
						_tmp30_ = it;
						_tmp31_ = g_variant_iter_next_value (_tmp30_);
						_g_variant_unref0 (v_child);
						v_child = _tmp31_;
					}
					_tmp29_ = FALSE;
					_tmp32_ = v_child;
					if (!(_tmp32_ != NULL)) {
						break;
					}
					_tmp33_ = v_child;
					_tmp34_ = g_variant_get_variant (_tmp33_);
					_g_variant_unref0 (v_child);
					v_child = _tmp34_;
					_tmp35_ = v_child;
					_tmp36_ = dbus_menu_parse_layout (self, _tmp35_);
					child_node = _tmp36_;
					_tmp37_ = child_node;
					if (_tmp37_ != NULL) {
						DBusMenuNode* _tmp38_;
						DBusMenuNode* _tmp39_;
						_tmp38_ = child_node;
						_tmp39_ = _g_object_ref0 (_tmp38_);
						new_children = g_list_append (new_children, _tmp39_);
					}
					_g_object_unref0 (child_node);
				}
			}
			_g_variant_unref0 (v_child);
		}
		_tmp40_ = node;
		_tmp41_ = new_children;
		dbus_menu_node_update_children (_tmp40_, _tmp41_);
		_g_variant_iter_free0 (it);
		(new_children == NULL) ? NULL : (new_children = (_g_list_free__g_object_unref0_ (new_children), NULL));
	}
	result = node;
	_g_variant_unref0 (v_children);
	_g_variant_unref0 (v_props);
	_g_variant_unref0 (v_id);
	block1_data_unref (_data1_);
	_data1_ = NULL;
	return result;
}

static void
dbus_menu_on_items_properties_updated (DBusMenu* self,
                                       GVariant* updated_props)
{
	GVariantIter* it = NULL;
	GVariantIter* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (updated_props != NULL);
	_tmp0_ = g_variant_iter_new (updated_props);
	it = _tmp0_;
	{
		GVariant* child = NULL;
		GVariantIter* _tmp1_;
		GVariant* _tmp2_;
		_tmp1_ = it;
		_tmp2_ = g_variant_iter_next_value (_tmp1_);
		child = _tmp2_;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				GVariant* _tmp6_;
				gint32 child_id = 0;
				GVariant* _tmp7_;
				GVariant* _tmp8_;
				GVariant* _tmp9_;
				gint32 _tmp10_;
				DBusMenuNode* node = NULL;
				GHashTable* _tmp11_;
				gconstpointer _tmp12_;
				DBusMenuNode* _tmp13_;
				DBusMenuNode* _tmp14_;
				if (!_tmp3_) {
					GVariantIter* _tmp4_;
					GVariant* _tmp5_;
					_tmp4_ = it;
					_tmp5_ = g_variant_iter_next_value (_tmp4_);
					_g_variant_unref0 (child);
					child = _tmp5_;
				}
				_tmp3_ = FALSE;
				_tmp6_ = child;
				if (!(_tmp6_ != NULL)) {
					break;
				}
				_tmp7_ = child;
				_tmp8_ = g_variant_get_child_value (_tmp7_, (gsize) 0);
				_tmp9_ = _tmp8_;
				_tmp10_ = g_variant_get_int32 (_tmp9_);
				_g_variant_unref0 (_tmp9_);
				child_id = _tmp10_;
				_tmp11_ = self->priv->all_nodes;
				_tmp12_ = g_hash_table_lookup (_tmp11_, (gpointer) ((gintptr) child_id));
				_tmp13_ = _g_object_ref0 ((DBusMenuNode*) _tmp12_);
				node = _tmp13_;
				_tmp14_ = node;
				if (_tmp14_ != NULL) {
					DBusMenuNode* _tmp15_;
					GVariant* _tmp16_;
					GVariant* _tmp17_;
					GVariant* _tmp18_;
					_tmp15_ = node;
					_tmp16_ = child;
					_tmp17_ = g_variant_get_child_value (_tmp16_, (gsize) 1);
					_tmp18_ = _tmp17_;
					dbus_menu_update_node_properties (self, _tmp15_, _tmp18_);
					_g_variant_unref0 (_tmp18_);
				}
				_g_object_unref0 (node);
			}
		}
		_g_variant_unref0 (child);
	}
	_g_variant_iter_free0 (it);
}

static void
dbus_menu_update_node_properties (DBusMenu* self,
                                  DBusMenuNode* node,
                                  GVariant* props)
{
	GVariantIter* it = NULL;
	GVariantIter* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	g_return_if_fail (props != NULL);
	_tmp0_ = g_variant_iter_new (props);
	it = _tmp0_;
	{
		GVariant* prop = NULL;
		GVariantIter* _tmp1_;
		GVariant* _tmp2_;
		_tmp1_ = it;
		_tmp2_ = g_variant_iter_next_value (_tmp1_);
		prop = _tmp2_;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				GVariant* _tmp6_;
				GVariant* _tmp7_;
				GVariantType* _tmp8_;
				GVariantType* _tmp9_;
				gboolean _tmp10_;
				if (!_tmp3_) {
					GVariantIter* _tmp4_;
					GVariant* _tmp5_;
					_tmp4_ = it;
					_tmp5_ = g_variant_iter_next_value (_tmp4_);
					_g_variant_unref0 (prop);
					prop = _tmp5_;
				}
				_tmp3_ = FALSE;
				_tmp6_ = prop;
				if (!(_tmp6_ != NULL)) {
					break;
				}
				_tmp7_ = prop;
				_tmp8_ = g_variant_type_new ("{sv}");
				_tmp9_ = _tmp8_;
				_tmp10_ = g_variant_is_of_type (_tmp7_, _tmp9_);
				_g_variant_type_free0 (_tmp9_);
				if (_tmp10_) {
					gchar* key = NULL;
					GVariant* _tmp11_;
					GVariant* _tmp12_;
					GVariant* _tmp13_;
					const gchar* _tmp14_;
					gchar* _tmp15_;
					gchar* _tmp16_;
					GVariant* value = NULL;
					GVariant* _tmp17_;
					GVariant* _tmp18_;
					const gchar* _tmp19_;
					GVariant* _tmp20_;
					_tmp11_ = prop;
					_tmp12_ = g_variant_get_child_value (_tmp11_, (gsize) 0);
					_tmp13_ = _tmp12_;
					_tmp14_ = g_variant_get_string (_tmp13_, NULL);
					_tmp15_ = g_strdup (_tmp14_);
					_tmp16_ = _tmp15_;
					_g_variant_unref0 (_tmp13_);
					key = _tmp16_;
					_tmp17_ = prop;
					_tmp18_ = g_variant_get_child_value (_tmp17_, (gsize) 1);
					value = _tmp18_;
					_tmp19_ = key;
					_tmp20_ = value;
					dbus_menu_node_update_property (node, _tmp19_, _tmp20_);
					_g_variant_unref0 (value);
					_g_free0 (key);
				}
			}
		}
		_g_variant_unref0 (prop);
	}
	_g_variant_iter_free0 (it);
}

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

static void
dbus_menu_send_event (DBusMenu* self,
                      gint32 node_id,
                      const gchar* type,
                      GVariant* data)
{
	GHashTable* _tmp0_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (type != NULL);
	_tmp0_ = self->priv->all_nodes;
	if (g_hash_table_contains (_tmp0_, (gpointer) ((gintptr) node_id))) {
		{
			GVariant* _tmp1_ = NULL;
			GVariant* _tmp2_;
			DBusMenuInterface* _tmp4_;
			_tmp2_ = _g_variant_ref0 (data);
			_tmp1_ = _tmp2_;
			if (_tmp1_ == NULL) {
				GVariant* _tmp3_;
				_tmp3_ = g_variant_new_int32 ((gint32) 0);
				g_variant_ref_sink (_tmp3_);
				_g_variant_unref0 (_tmp1_);
				_tmp1_ = _tmp3_;
			}
			_tmp4_ = self->priv->iface;
			dbus_menu_interface_event (_tmp4_, node_id, type, _tmp1_, (guint32) gtk_get_current_event_time (), &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_variant_unref0 (_tmp1_);
				goto __catch0_g_error;
			}
			_g_variant_unref0 (_tmp1_);
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			GError* _tmp5_;
			const gchar* _tmp6_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp5_ = e;
			_tmp6_ = _tmp5_->message;
			g_warning ("DBusMenu.vala:137: Failed to send %s event to node %d: %s", type, (gint) node_id, _tmp6_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
}

static inline gboolean
vala_g_list_is_empty (GList* self)
{
	gboolean result;
	result = ((GList*) self) == NULL;
	return result;
}

void
dbus_menu_popup_at_pointer (DBusMenu* self,
                            GdkEvent* event)
{
	GtkMenu* submenu = NULL;
	GHashTable* _tmp0_;
	gconstpointer _tmp1_;
	GtkMenu* _tmp2_;
	GtkMenu* _tmp3_;
	GtkMenu* _tmp4_;
	GList* _tmp5_;
	GList* _tmp6_;
	gboolean _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (event != NULL);
	_tmp0_ = self->priv->all_nodes;
	_tmp1_ = g_hash_table_lookup (_tmp0_, (gpointer) ((gintptr) 0));
	_tmp2_ = ((DBusMenuNode*) _tmp1_)->submenu;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	submenu = _tmp3_;
	_tmp4_ = submenu;
	_tmp5_ = gtk_container_get_children ((GtkContainer*) _tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = !vala_g_list_is_empty (_tmp6_);
	(_tmp6_ == NULL) ? NULL : (_tmp6_ = (g_list_free (_tmp6_), NULL));
	if (_tmp7_) {
		GtkMenu* _tmp8_;
		_tmp8_ = submenu;
		gtk_menu_popup_at_pointer (_tmp8_, event);
	}
	_g_object_unref0 (submenu);
}

static void
dbus_menu_class_init (DBusMenuClass * klass,
                      gpointer klass_data)
{
	dbus_menu_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DBusMenu_private_offset);
	G_OBJECT_CLASS (klass)->finalize = dbus_menu_finalize;
}

static void
dbus_menu_instance_init (DBusMenu * self,
                         gpointer klass)
{
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	self->priv = dbus_menu_get_instance_private (self);
	_tmp0_ = g_direct_hash;
	_tmp1_ = g_direct_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, NULL, _g_object_unref0_);
	self->priv->all_nodes = _tmp2_;
}

static void
dbus_menu_finalize (GObject * obj)
{
	DBusMenu * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DBUS_MENU, DBusMenu);
	_g_hash_table_unref0 (self->priv->all_nodes);
	_g_object_unref0 (self->priv->iface);
	G_OBJECT_CLASS (dbus_menu_parent_class)->finalize (obj);
}

GType
dbus_menu_get_type (void)
{
	return dbus_menu_type_id;
}

GType
dbus_menu_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (DBusMenuClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dbus_menu_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DBusMenu), 0, (GInstanceInitFunc) dbus_menu_instance_init, NULL };
	dbus_menu_type_id = g_type_module_register_type (module, G_TYPE_OBJECT, "DBusMenu", &g_define_type_info, 0);
	DBusMenu_private_offset = sizeof (DBusMenuPrivate);
	return dbus_menu_type_id;
}

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

