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

/* 
 *      Copyright 2015 Julien Lavergne <gilir@ubuntu.com>
 *
 *      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.
 *
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gobject/gvaluecollector.h>


#define LXSESSION_TYPE_MENU_ITEM_OBJECT (lxsession_menu_item_object_get_type ())
#define LXSESSION_MENU_ITEM_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_MENU_ITEM_OBJECT, LxsessionMenuItemObject))
#define LXSESSION_MENU_ITEM_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_MENU_ITEM_OBJECT, LxsessionMenuItemObjectClass))
#define LXSESSION_IS_MENU_ITEM_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_MENU_ITEM_OBJECT))
#define LXSESSION_IS_MENU_ITEM_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_MENU_ITEM_OBJECT))
#define LXSESSION_MENU_ITEM_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_MENU_ITEM_OBJECT, LxsessionMenuItemObjectClass))

typedef struct _LxsessionMenuItemObject LxsessionMenuItemObject;
typedef struct _LxsessionMenuItemObjectClass LxsessionMenuItemObjectClass;
typedef struct _LxsessionMenuItemObjectPrivate LxsessionMenuItemObjectPrivate;

#define LXSESSION_TYPE_MENU_ITEM_GENERIC_OBJECT (lxsession_menu_item_generic_object_get_type ())
#define LXSESSION_MENU_ITEM_GENERIC_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_MENU_ITEM_GENERIC_OBJECT, LxsessionMenuItemGenericObject))
#define LXSESSION_MENU_ITEM_GENERIC_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_MENU_ITEM_GENERIC_OBJECT, LxsessionMenuItemGenericObjectClass))
#define LXSESSION_IS_MENU_ITEM_GENERIC_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_MENU_ITEM_GENERIC_OBJECT))
#define LXSESSION_IS_MENU_ITEM_GENERIC_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_MENU_ITEM_GENERIC_OBJECT))
#define LXSESSION_MENU_ITEM_GENERIC_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_MENU_ITEM_GENERIC_OBJECT, LxsessionMenuItemGenericObjectClass))

typedef struct _LxsessionMenuItemGenericObject LxsessionMenuItemGenericObject;
typedef struct _LxsessionMenuItemGenericObjectClass LxsessionMenuItemGenericObjectClass;
typedef struct _LxsessionMenuItemGenericObjectPrivate LxsessionMenuItemGenericObjectPrivate;
typedef struct _LxsessionParamSpecMenuItemGenericObject LxsessionParamSpecMenuItemGenericObject;

#define LXSESSION_TYPE_MENU_OBJECT (lxsession_menu_object_get_type ())
#define LXSESSION_MENU_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_MENU_OBJECT, LxsessionMenuObject))
#define LXSESSION_MENU_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_MENU_OBJECT, LxsessionMenuObjectClass))
#define LXSESSION_IS_MENU_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_MENU_OBJECT))
#define LXSESSION_IS_MENU_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_MENU_OBJECT))
#define LXSESSION_MENU_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_MENU_OBJECT, LxsessionMenuObjectClass))

typedef struct _LxsessionMenuObject LxsessionMenuObject;
typedef struct _LxsessionMenuObjectClass LxsessionMenuObjectClass;
typedef struct _LxsessionMenuObjectPrivate LxsessionMenuObjectPrivate;

#define LXSESSION_TYPE_MENU_GENERIC_OBJECT (lxsession_menu_generic_object_get_type ())
#define LXSESSION_MENU_GENERIC_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_MENU_GENERIC_OBJECT, LxsessionMenuGenericObject))
#define LXSESSION_MENU_GENERIC_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_MENU_GENERIC_OBJECT, LxsessionMenuGenericObjectClass))
#define LXSESSION_IS_MENU_GENERIC_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_MENU_GENERIC_OBJECT))
#define LXSESSION_IS_MENU_GENERIC_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_MENU_GENERIC_OBJECT))
#define LXSESSION_MENU_GENERIC_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_MENU_GENERIC_OBJECT, LxsessionMenuGenericObjectClass))

typedef struct _LxsessionMenuGenericObject LxsessionMenuGenericObject;
typedef struct _LxsessionMenuGenericObjectClass LxsessionMenuGenericObjectClass;
typedef struct _LxsessionMenuGenericObjectPrivate LxsessionMenuGenericObjectPrivate;

#define LXSESSION_TYPE_ICON_OBJECT (lxsession_icon_object_get_type ())
#define LXSESSION_ICON_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_ICON_OBJECT, LxsessionIconObject))
#define LXSESSION_ICON_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_ICON_OBJECT, LxsessionIconObjectClass))
#define LXSESSION_IS_ICON_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_ICON_OBJECT))
#define LXSESSION_IS_ICON_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_ICON_OBJECT))
#define LXSESSION_ICON_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_ICON_OBJECT, LxsessionIconObjectClass))

typedef struct _LxsessionIconObject LxsessionIconObject;
typedef struct _LxsessionIconObjectClass LxsessionIconObjectClass;
typedef struct _LxsessionIconObjectPrivate LxsessionIconObjectPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _LxsessionMenuItemObject {
	GtkMenuItem parent_instance;
	LxsessionMenuItemObjectPrivate * priv;
};

struct _LxsessionMenuItemObjectClass {
	GtkMenuItemClass parent_class;
};

struct _LxsessionMenuItemGenericObject {
	GTypeInstance parent_instance;
	volatile int ref_count;
	LxsessionMenuItemGenericObjectPrivate * priv;
};

struct _LxsessionMenuItemGenericObjectClass {
	GTypeClass parent_class;
	void (*finalize) (LxsessionMenuItemGenericObject *self);
};

struct _LxsessionParamSpecMenuItemGenericObject {
	GParamSpec parent_instance;
};

struct _LxsessionMenuObject {
	GtkMenu parent_instance;
	LxsessionMenuObjectPrivate * priv;
};

struct _LxsessionMenuObjectClass {
	GtkMenuClass parent_class;
};

struct _LxsessionMenuGenericObject {
	GObject parent_instance;
	LxsessionMenuGenericObjectPrivate * priv;
};

struct _LxsessionMenuGenericObjectClass {
	GObjectClass parent_class;
};

typedef void (*LxsessionMenuGenericObjectActionCallback) (void* user_data);
struct _LxsessionIconObject {
	GObject parent_instance;
	LxsessionIconObjectPrivate * priv;
	gchar* name;
	gchar* icon_name;
	gchar* notification_text;
	LxsessionMenuObject* menu;
};

struct _LxsessionIconObjectClass {
	GObjectClass parent_class;
};

typedef void (*LxsessionIconObjectActionCallback) (void* user_data);

static gpointer lxsession_menu_item_object_parent_class = NULL;
static gpointer lxsession_menu_item_generic_object_parent_class = NULL;
static gpointer lxsession_menu_object_parent_class = NULL;
static gpointer lxsession_menu_generic_object_parent_class = NULL;
static gpointer lxsession_icon_object_parent_class = NULL;

GType lxsession_menu_item_object_get_type (void) G_GNUC_CONST;
enum  {
	LXSESSION_MENU_ITEM_OBJECT_DUMMY_PROPERTY
};
LxsessionMenuItemObject* lxsession_menu_item_object_new (void);
LxsessionMenuItemObject* lxsession_menu_item_object_construct (GType object_type);
gpointer lxsession_menu_item_generic_object_ref (gpointer instance);
void lxsession_menu_item_generic_object_unref (gpointer instance);
GParamSpec* lxsession_param_spec_menu_item_generic_object (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void lxsession_value_set_menu_item_generic_object (GValue* value, gpointer v_object);
void lxsession_value_take_menu_item_generic_object (GValue* value, gpointer v_object);
gpointer lxsession_value_get_menu_item_generic_object (const GValue* value);
GType lxsession_menu_item_generic_object_get_type (void) G_GNUC_CONST;
enum  {
	LXSESSION_MENU_ITEM_GENERIC_OBJECT_DUMMY_PROPERTY
};
LxsessionMenuItemGenericObject* lxsession_menu_item_generic_object_new (void);
LxsessionMenuItemGenericObject* lxsession_menu_item_generic_object_construct (GType object_type);
static void lxsession_menu_item_generic_object_finalize (LxsessionMenuItemGenericObject* obj);
GType lxsession_menu_object_get_type (void) G_GNUC_CONST;
enum  {
	LXSESSION_MENU_OBJECT_DUMMY_PROPERTY
};
LxsessionMenuObject* lxsession_menu_object_new (void);
LxsessionMenuObject* lxsession_menu_object_construct (GType object_type);
GType lxsession_menu_generic_object_get_type (void) G_GNUC_CONST;
enum  {
	LXSESSION_MENU_GENERIC_OBJECT_DUMMY_PROPERTY
};
void lxsession_menu_generic_object_add_item (LxsessionMenuGenericObject* self, const gchar* text, LxsessionMenuGenericObjectActionCallback callback, void* callback_target, GDestroyNotify callback_target_destroy_notify);
LxsessionMenuGenericObject* lxsession_menu_generic_object_new (void);
LxsessionMenuGenericObject* lxsession_menu_generic_object_construct (GType object_type);
GType lxsession_icon_object_get_type (void) G_GNUC_CONST;
enum  {
	LXSESSION_ICON_OBJECT_DUMMY_PROPERTY
};
LxsessionIconObject* lxsession_icon_object_new (const gchar* name_param, const gchar* icon_name_param, const gchar* notification_param, LxsessionMenuObject* menu_param);
LxsessionIconObject* lxsession_icon_object_construct (GType object_type, const gchar* name_param, const gchar* icon_name_param, const gchar* notification_param, LxsessionMenuObject* menu_param);
void lxsession_icon_object_init (LxsessionIconObject* self);
void lxsession_icon_object_activate (LxsessionIconObject* self);
void lxsession_icon_object_inactivate (LxsessionIconObject* self);
void lxsession_icon_object_set_icon (LxsessionIconObject* self, const gchar* param_icon_name);
void lxsession_icon_object_set_menu (LxsessionIconObject* self, LxsessionMenuObject* param_menu);
void lxsession_icon_object_add_action (LxsessionIconObject* self, const gchar* action, const gchar* label, LxsessionIconObjectActionCallback callback, void* callback_target, GDestroyNotify callback_target_destroy_notify);
void lxsession_icon_object_set_notification_body (LxsessionIconObject* self, const gchar* text);
void lxsession_icon_object_clear_actions (LxsessionIconObject* self);
static void lxsession_icon_object_finalize (GObject* obj);


LxsessionMenuItemObject* lxsession_menu_item_object_construct (GType object_type) {
	LxsessionMenuItemObject * self = NULL;
	self = (LxsessionMenuItemObject*) g_object_new (object_type, NULL);
	return self;
}


LxsessionMenuItemObject* lxsession_menu_item_object_new (void) {
	return lxsession_menu_item_object_construct (LXSESSION_TYPE_MENU_ITEM_OBJECT);
}


static void lxsession_menu_item_object_class_init (LxsessionMenuItemObjectClass * klass) {
	lxsession_menu_item_object_parent_class = g_type_class_peek_parent (klass);
}


static void lxsession_menu_item_object_instance_init (LxsessionMenuItemObject * self) {
}


GType lxsession_menu_item_object_get_type (void) {
	static volatile gsize lxsession_menu_item_object_type_id__volatile = 0;
	if (g_once_init_enter (&lxsession_menu_item_object_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (LxsessionMenuItemObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) lxsession_menu_item_object_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LxsessionMenuItemObject), 0, (GInstanceInitFunc) lxsession_menu_item_object_instance_init, NULL };
		GType lxsession_menu_item_object_type_id;
		lxsession_menu_item_object_type_id = g_type_register_static (GTK_TYPE_MENU_ITEM, "LxsessionMenuItemObject", &g_define_type_info, 0);
		g_once_init_leave (&lxsession_menu_item_object_type_id__volatile, lxsession_menu_item_object_type_id);
	}
	return lxsession_menu_item_object_type_id__volatile;
}


LxsessionMenuItemGenericObject* lxsession_menu_item_generic_object_construct (GType object_type) {
	LxsessionMenuItemGenericObject* self = NULL;
	self = (LxsessionMenuItemGenericObject*) g_type_create_instance (object_type);
	return self;
}


LxsessionMenuItemGenericObject* lxsession_menu_item_generic_object_new (void) {
	return lxsession_menu_item_generic_object_construct (LXSESSION_TYPE_MENU_ITEM_GENERIC_OBJECT);
}


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


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


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


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


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


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


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


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


void lxsession_value_set_menu_item_generic_object (GValue* value, gpointer v_object) {
	LxsessionMenuItemGenericObject* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LXSESSION_TYPE_MENU_ITEM_GENERIC_OBJECT));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LXSESSION_TYPE_MENU_ITEM_GENERIC_OBJECT));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		lxsession_menu_item_generic_object_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		lxsession_menu_item_generic_object_unref (old);
	}
}


void lxsession_value_take_menu_item_generic_object (GValue* value, gpointer v_object) {
	LxsessionMenuItemGenericObject* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LXSESSION_TYPE_MENU_ITEM_GENERIC_OBJECT));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LXSESSION_TYPE_MENU_ITEM_GENERIC_OBJECT));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		lxsession_menu_item_generic_object_unref (old);
	}
}


static void lxsession_menu_item_generic_object_class_init (LxsessionMenuItemGenericObjectClass * klass) {
	lxsession_menu_item_generic_object_parent_class = g_type_class_peek_parent (klass);
	((LxsessionMenuItemGenericObjectClass *) klass)->finalize = lxsession_menu_item_generic_object_finalize;
}


static void lxsession_menu_item_generic_object_instance_init (LxsessionMenuItemGenericObject * self) {
	self->ref_count = 1;
}


static void lxsession_menu_item_generic_object_finalize (LxsessionMenuItemGenericObject* obj) {
	LxsessionMenuItemGenericObject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LXSESSION_TYPE_MENU_ITEM_GENERIC_OBJECT, LxsessionMenuItemGenericObject);
	g_signal_handlers_destroy (self);
}


GType lxsession_menu_item_generic_object_get_type (void) {
	static volatile gsize lxsession_menu_item_generic_object_type_id__volatile = 0;
	if (g_once_init_enter (&lxsession_menu_item_generic_object_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { lxsession_value_menu_item_generic_object_init, lxsession_value_menu_item_generic_object_free_value, lxsession_value_menu_item_generic_object_copy_value, lxsession_value_menu_item_generic_object_peek_pointer, "p", lxsession_value_menu_item_generic_object_collect_value, "p", lxsession_value_menu_item_generic_object_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (LxsessionMenuItemGenericObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) lxsession_menu_item_generic_object_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LxsessionMenuItemGenericObject), 0, (GInstanceInitFunc) lxsession_menu_item_generic_object_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType lxsession_menu_item_generic_object_type_id;
		lxsession_menu_item_generic_object_type_id = g_type_register_fundamental (g_type_fundamental_next (), "LxsessionMenuItemGenericObject", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&lxsession_menu_item_generic_object_type_id__volatile, lxsession_menu_item_generic_object_type_id);
	}
	return lxsession_menu_item_generic_object_type_id__volatile;
}


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


void lxsession_menu_item_generic_object_unref (gpointer instance) {
	LxsessionMenuItemGenericObject* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		LXSESSION_MENU_ITEM_GENERIC_OBJECT_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


LxsessionMenuObject* lxsession_menu_object_construct (GType object_type) {
	LxsessionMenuObject * self = NULL;
	self = (LxsessionMenuObject*) g_object_new (object_type, NULL);
	return self;
}


LxsessionMenuObject* lxsession_menu_object_new (void) {
	return lxsession_menu_object_construct (LXSESSION_TYPE_MENU_OBJECT);
}


static void lxsession_menu_object_class_init (LxsessionMenuObjectClass * klass) {
	lxsession_menu_object_parent_class = g_type_class_peek_parent (klass);
}


static void lxsession_menu_object_instance_init (LxsessionMenuObject * self) {
}


GType lxsession_menu_object_get_type (void) {
	static volatile gsize lxsession_menu_object_type_id__volatile = 0;
	if (g_once_init_enter (&lxsession_menu_object_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (LxsessionMenuObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) lxsession_menu_object_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LxsessionMenuObject), 0, (GInstanceInitFunc) lxsession_menu_object_instance_init, NULL };
		GType lxsession_menu_object_type_id;
		lxsession_menu_object_type_id = g_type_register_static (GTK_TYPE_MENU, "LxsessionMenuObject", &g_define_type_info, 0);
		g_once_init_leave (&lxsession_menu_object_type_id__volatile, lxsession_menu_object_type_id);
	}
	return lxsession_menu_object_type_id__volatile;
}


void lxsession_menu_generic_object_add_item (LxsessionMenuGenericObject* self, const gchar* text, LxsessionMenuGenericObjectActionCallback callback, void* callback_target, GDestroyNotify callback_target_destroy_notify) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (text != NULL);
	g_warning ("notifications.vala:68: Not implemented");
	(callback_target_destroy_notify == NULL) ? NULL : (callback_target_destroy_notify (callback_target), NULL);
	callback = NULL;
	callback_target = NULL;
	callback_target_destroy_notify = NULL;
}


LxsessionMenuGenericObject* lxsession_menu_generic_object_construct (GType object_type) {
	LxsessionMenuGenericObject * self = NULL;
	self = (LxsessionMenuGenericObject*) g_object_new (object_type, NULL);
	return self;
}


LxsessionMenuGenericObject* lxsession_menu_generic_object_new (void) {
	return lxsession_menu_generic_object_construct (LXSESSION_TYPE_MENU_GENERIC_OBJECT);
}


static void lxsession_menu_generic_object_class_init (LxsessionMenuGenericObjectClass * klass) {
	lxsession_menu_generic_object_parent_class = g_type_class_peek_parent (klass);
}


static void lxsession_menu_generic_object_instance_init (LxsessionMenuGenericObject * self) {
}


GType lxsession_menu_generic_object_get_type (void) {
	static volatile gsize lxsession_menu_generic_object_type_id__volatile = 0;
	if (g_once_init_enter (&lxsession_menu_generic_object_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (LxsessionMenuGenericObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) lxsession_menu_generic_object_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LxsessionMenuGenericObject), 0, (GInstanceInitFunc) lxsession_menu_generic_object_instance_init, NULL };
		GType lxsession_menu_generic_object_type_id;
		lxsession_menu_generic_object_type_id = g_type_register_static (G_TYPE_OBJECT, "LxsessionMenuGenericObject", &g_define_type_info, 0);
		g_once_init_leave (&lxsession_menu_generic_object_type_id__volatile, lxsession_menu_generic_object_type_id);
	}
	return lxsession_menu_generic_object_type_id__volatile;
}


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


LxsessionIconObject* lxsession_icon_object_construct (GType object_type, const gchar* name_param, const gchar* icon_name_param, const gchar* notification_param, LxsessionMenuObject* menu_param) {
	LxsessionIconObject * self = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp6_ = NULL;
	LxsessionMenuObject* _tmp9_ = NULL;
	LxsessionMenuObject* _tmp10_ = NULL;
	g_return_val_if_fail (name_param != NULL, NULL);
	self = (LxsessionIconObject*) g_object_new (object_type, NULL);
	_tmp0_ = name_param;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->name);
	self->name = _tmp1_;
	_tmp2_ = icon_name_param;
	if (_tmp2_ != NULL) {
		const gchar* _tmp3_ = NULL;
		gchar* _tmp4_ = NULL;
		_tmp3_ = icon_name_param;
		_tmp4_ = g_strdup (_tmp3_);
		_g_free0 (self->icon_name);
		self->icon_name = _tmp4_;
	} else {
		gchar* _tmp5_ = NULL;
		_tmp5_ = g_strdup ("dialog-warning");
		_g_free0 (self->icon_name);
		self->icon_name = _tmp5_;
	}
	_tmp6_ = notification_param;
	if (_tmp6_ != NULL) {
		const gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		_tmp7_ = notification_param;
		_tmp8_ = g_strdup (_tmp7_);
		_g_free0 (self->notification_text);
		self->notification_text = _tmp8_;
	}
	_tmp9_ = menu_param;
	_tmp10_ = _g_object_ref0 (_tmp9_);
	_g_object_unref0 (self->menu);
	self->menu = _tmp10_;
	return self;
}


LxsessionIconObject* lxsession_icon_object_new (const gchar* name_param, const gchar* icon_name_param, const gchar* notification_param, LxsessionMenuObject* menu_param) {
	return lxsession_icon_object_construct (LXSESSION_TYPE_ICON_OBJECT, name_param, icon_name_param, notification_param, menu_param);
}


void lxsession_icon_object_init (LxsessionIconObject* self) {
	g_return_if_fail (self != NULL);
}


void lxsession_icon_object_activate (LxsessionIconObject* self) {
	g_return_if_fail (self != NULL);
}


void lxsession_icon_object_inactivate (LxsessionIconObject* self) {
	g_return_if_fail (self != NULL);
}


void lxsession_icon_object_set_icon (LxsessionIconObject* self, const gchar* param_icon_name) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (param_icon_name != NULL);
}


void lxsession_icon_object_set_menu (LxsessionIconObject* self, LxsessionMenuObject* param_menu) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (param_menu != NULL);
}


void lxsession_icon_object_add_action (LxsessionIconObject* self, const gchar* action, const gchar* label, LxsessionIconObjectActionCallback callback, void* callback_target, GDestroyNotify callback_target_destroy_notify) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	g_return_if_fail (label != NULL);
	(callback_target_destroy_notify == NULL) ? NULL : (callback_target_destroy_notify (callback_target), NULL);
	callback = NULL;
	callback_target = NULL;
	callback_target_destroy_notify = NULL;
}


void lxsession_icon_object_set_notification_body (LxsessionIconObject* self, const gchar* text) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (text != NULL);
}


void lxsession_icon_object_clear_actions (LxsessionIconObject* self) {
	g_return_if_fail (self != NULL);
}


static void lxsession_icon_object_class_init (LxsessionIconObjectClass * klass) {
	lxsession_icon_object_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = lxsession_icon_object_finalize;
}


static void lxsession_icon_object_instance_init (LxsessionIconObject * self) {
}


static void lxsession_icon_object_finalize (GObject* obj) {
	LxsessionIconObject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LXSESSION_TYPE_ICON_OBJECT, LxsessionIconObject);
	_g_free0 (self->name);
	_g_free0 (self->icon_name);
	_g_free0 (self->notification_text);
	_g_object_unref0 (self->menu);
	G_OBJECT_CLASS (lxsession_icon_object_parent_class)->finalize (obj);
}


GType lxsession_icon_object_get_type (void) {
	static volatile gsize lxsession_icon_object_type_id__volatile = 0;
	if (g_once_init_enter (&lxsession_icon_object_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (LxsessionIconObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) lxsession_icon_object_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LxsessionIconObject), 0, (GInstanceInitFunc) lxsession_icon_object_instance_init, NULL };
		GType lxsession_icon_object_type_id;
		lxsession_icon_object_type_id = g_type_register_static (G_TYPE_OBJECT, "LxsessionIconObject", &g_define_type_info, 0);
		g_once_init_leave (&lxsession_icon_object_type_id__volatile, lxsession_icon_object_type_id);
	}
	return lxsession_icon_object_type_id__volatile;
}



