/* notifications.c generated by valac 0.56.18-dirty, 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 <gtk/gtk.h>
#include <glib-object.h>
#include <gobject/gvaluecollector.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>

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

#define 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;
enum  {
	LXSESSION_MENU_ITEM_OBJECT_0_PROPERTY,
	LXSESSION_MENU_ITEM_OBJECT_NUM_PROPERTIES
};
static GParamSpec* lxsession_menu_item_object_properties[LXSESSION_MENU_ITEM_OBJECT_NUM_PROPERTIES];

#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;
enum  {
	LXSESSION_MENU_OBJECT_0_PROPERTY,
	LXSESSION_MENU_OBJECT_NUM_PROPERTIES
};
static GParamSpec* lxsession_menu_object_properties[LXSESSION_MENU_OBJECT_NUM_PROPERTIES];

#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;
enum  {
	LXSESSION_MENU_GENERIC_OBJECT_0_PROPERTY,
	LXSESSION_MENU_GENERIC_OBJECT_NUM_PROPERTIES
};
static GParamSpec* lxsession_menu_generic_object_properties[LXSESSION_MENU_GENERIC_OBJECT_NUM_PROPERTIES];
typedef void (*LxsessionMenuGenericObjectActionCallback) (gpointer user_data);

#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;
enum  {
	LXSESSION_ICON_OBJECT_0_PROPERTY,
	LXSESSION_ICON_OBJECT_NUM_PROPERTIES
};
static GParamSpec* lxsession_icon_object_properties[LXSESSION_ICON_OBJECT_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef void (*LxsessionIconObjectActionCallback) (gpointer user_data);

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

struct _LxsessionIconObject {
	GObject parent_instance;
	LxsessionIconObjectPrivate * priv;
	gchar* name;
	gchar* icon_name;
	gchar* notification_text;
	LxsessionMenuObject* menu;
};

struct _LxsessionIconObjectClass {
	GObjectClass parent_class;
};

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;

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

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,
                                       gpointer klass_data)
{
	lxsession_menu_item_object_parent_class = g_type_class_peek_parent (klass);
}

static void
lxsession_menu_item_object_instance_init (LxsessionMenuItemObject * self,
                                          gpointer klass)
{
}

static GType
lxsession_menu_item_object_get_type_once (void)
{
	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_menu_item_get_type (), "LxsessionMenuItemObject", &g_define_type_info, 0);
	return lxsession_menu_item_object_type_id;
}

GType
lxsession_menu_item_object_get_type (void)
{
	static volatile gsize lxsession_menu_item_object_type_id__once = 0;
	if (g_once_init_enter (&lxsession_menu_item_object_type_id__once)) {
		GType lxsession_menu_item_object_type_id;
		lxsession_menu_item_object_type_id = lxsession_menu_item_object_get_type_once ();
		g_once_init_leave (&lxsession_menu_item_object_type_id__once, lxsession_menu_item_object_type_id);
	}
	return lxsession_menu_item_object_type_id__once;
}

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,
                                               gpointer klass_data)
{
	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,
                                                  gpointer klass)
{
	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);
}

static GType
lxsession_menu_item_generic_object_get_type_once (void)
{
	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);
	return lxsession_menu_item_generic_object_type_id;
}

GType
lxsession_menu_item_generic_object_get_type (void)
{
	static volatile gsize lxsession_menu_item_generic_object_type_id__once = 0;
	if (g_once_init_enter (&lxsession_menu_item_generic_object_type_id__once)) {
		GType lxsession_menu_item_generic_object_type_id;
		lxsession_menu_item_generic_object_type_id = lxsession_menu_item_generic_object_get_type_once ();
		g_once_init_leave (&lxsession_menu_item_generic_object_type_id__once, lxsession_menu_item_generic_object_type_id);
	}
	return lxsession_menu_item_generic_object_type_id__once;
}

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,
                                  gpointer klass_data)
{
	lxsession_menu_object_parent_class = g_type_class_peek_parent (klass);
}

static void
lxsession_menu_object_instance_init (LxsessionMenuObject * self,
                                     gpointer klass)
{
}

static GType
lxsession_menu_object_get_type_once (void)
{
	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_menu_get_type (), "LxsessionMenuObject", &g_define_type_info, 0);
	return lxsession_menu_object_type_id;
}

GType
lxsession_menu_object_get_type (void)
{
	static volatile gsize lxsession_menu_object_type_id__once = 0;
	if (g_once_init_enter (&lxsession_menu_object_type_id__once)) {
		GType lxsession_menu_object_type_id;
		lxsession_menu_object_type_id = lxsession_menu_object_get_type_once ();
		g_once_init_leave (&lxsession_menu_object_type_id__once, lxsession_menu_object_type_id);
	}
	return lxsession_menu_object_type_id__once;
}

void
lxsession_menu_generic_object_add_item (LxsessionMenuGenericObject* self,
                                        const gchar* text,
                                        LxsessionMenuGenericObjectActionCallback callback,
                                        gpointer 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,
                                          gpointer klass_data)
{
	lxsession_menu_generic_object_parent_class = g_type_class_peek_parent (klass);
}

static void
lxsession_menu_generic_object_instance_init (LxsessionMenuGenericObject * self,
                                             gpointer klass)
{
}

static GType
lxsession_menu_generic_object_get_type_once (void)
{
	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);
	return lxsession_menu_generic_object_type_id;
}

GType
lxsession_menu_generic_object_get_type (void)
{
	static volatile gsize lxsession_menu_generic_object_type_id__once = 0;
	if (g_once_init_enter (&lxsession_menu_generic_object_type_id__once)) {
		GType lxsession_menu_generic_object_type_id;
		lxsession_menu_generic_object_type_id = lxsession_menu_generic_object_get_type_once ();
		g_once_init_leave (&lxsession_menu_generic_object_type_id__once, lxsession_menu_generic_object_type_id);
	}
	return lxsession_menu_generic_object_type_id__once;
}

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;
	gchar* _tmp0_;
	LxsessionMenuObject* _tmp4_;
	g_return_val_if_fail (name_param != NULL, NULL);
	self = (LxsessionIconObject*) g_object_new (object_type, NULL);
	_tmp0_ = g_strdup (name_param);
	_g_free0 (self->name);
	self->name = _tmp0_;
	if (icon_name_param != NULL) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup (icon_name_param);
		_g_free0 (self->icon_name);
		self->icon_name = _tmp1_;
	} else {
		gchar* _tmp2_;
		_tmp2_ = g_strdup ("dialog-warning");
		_g_free0 (self->icon_name);
		self->icon_name = _tmp2_;
	}
	if (notification_param != NULL) {
		gchar* _tmp3_;
		_tmp3_ = g_strdup (notification_param);
		_g_free0 (self->notification_text);
		self->notification_text = _tmp3_;
	}
	_tmp4_ = _g_object_ref0 (menu_param);
	_g_object_unref0 (self->menu);
	self->menu = _tmp4_;
	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,
                                  gpointer 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,
                                  gpointer klass_data)
{
	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,
                                     gpointer klass)
{
}

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

static GType
lxsession_icon_object_get_type_once (void)
{
	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);
	return lxsession_icon_object_type_id;
}

GType
lxsession_icon_object_get_type (void)
{
	static volatile gsize lxsession_icon_object_type_id__once = 0;
	if (g_once_init_enter (&lxsession_icon_object_type_id__once)) {
		GType lxsession_icon_object_type_id;
		lxsession_icon_object_type_id = lxsession_icon_object_get_type_once ();
		g_once_init_leave (&lxsession_icon_object_type_id__once, lxsession_icon_object_type_id);
	}
	return lxsession_icon_object_type_id__once;
}

