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

/*
 * Copyright (c) 2011-2015 Wingpanel Developers (http://launchpad.net/wingpanel)
 *
 * 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 <gee.h>
#include <glib.h>
#include "wingpanel.h"
#include <stdlib.h>
#include <string.h>

#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 WINGPANEL_WIDGETS_TYPE_INDICATOR_MENU_BAR (wingpanel_widgets_indicator_menu_bar_get_type ())
#define WINGPANEL_WIDGETS_INDICATOR_MENU_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WINGPANEL_WIDGETS_TYPE_INDICATOR_MENU_BAR, WingpanelWidgetsIndicatorMenuBar))
#define WINGPANEL_WIDGETS_INDICATOR_MENU_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WINGPANEL_WIDGETS_TYPE_INDICATOR_MENU_BAR, WingpanelWidgetsIndicatorMenuBarClass))
#define WINGPANEL_WIDGETS_IS_INDICATOR_MENU_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WINGPANEL_WIDGETS_TYPE_INDICATOR_MENU_BAR))
#define WINGPANEL_WIDGETS_IS_INDICATOR_MENU_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WINGPANEL_WIDGETS_TYPE_INDICATOR_MENU_BAR))
#define WINGPANEL_WIDGETS_INDICATOR_MENU_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WINGPANEL_WIDGETS_TYPE_INDICATOR_MENU_BAR, WingpanelWidgetsIndicatorMenuBarClass))

typedef struct _WingpanelWidgetsIndicatorMenuBar WingpanelWidgetsIndicatorMenuBar;
typedef struct _WingpanelWidgetsIndicatorMenuBarClass WingpanelWidgetsIndicatorMenuBarClass;
typedef struct _WingpanelWidgetsIndicatorMenuBarPrivate WingpanelWidgetsIndicatorMenuBarPrivate;

#define WINGPANEL_WIDGETS_TYPE_INDICATOR_ENTRY (wingpanel_widgets_indicator_entry_get_type ())
#define WINGPANEL_WIDGETS_INDICATOR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WINGPANEL_WIDGETS_TYPE_INDICATOR_ENTRY, WingpanelWidgetsIndicatorEntry))
#define WINGPANEL_WIDGETS_INDICATOR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WINGPANEL_WIDGETS_TYPE_INDICATOR_ENTRY, WingpanelWidgetsIndicatorEntryClass))
#define WINGPANEL_WIDGETS_IS_INDICATOR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WINGPANEL_WIDGETS_TYPE_INDICATOR_ENTRY))
#define WINGPANEL_WIDGETS_IS_INDICATOR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WINGPANEL_WIDGETS_TYPE_INDICATOR_ENTRY))
#define WINGPANEL_WIDGETS_INDICATOR_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WINGPANEL_WIDGETS_TYPE_INDICATOR_ENTRY, WingpanelWidgetsIndicatorEntryClass))

typedef struct _WingpanelWidgetsIndicatorEntry WingpanelWidgetsIndicatorEntry;
typedef struct _WingpanelWidgetsIndicatorEntryClass WingpanelWidgetsIndicatorEntryClass;

#define WINGPANEL_SERVICES_TYPE_INDICATOR_SORTER (wingpanel_services_indicator_sorter_get_type ())
#define WINGPANEL_SERVICES_INDICATOR_SORTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WINGPANEL_SERVICES_TYPE_INDICATOR_SORTER, WingpanelServicesIndicatorSorter))
#define WINGPANEL_SERVICES_INDICATOR_SORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WINGPANEL_SERVICES_TYPE_INDICATOR_SORTER, WingpanelServicesIndicatorSorterClass))
#define WINGPANEL_SERVICES_IS_INDICATOR_SORTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WINGPANEL_SERVICES_TYPE_INDICATOR_SORTER))
#define WINGPANEL_SERVICES_IS_INDICATOR_SORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WINGPANEL_SERVICES_TYPE_INDICATOR_SORTER))
#define WINGPANEL_SERVICES_INDICATOR_SORTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WINGPANEL_SERVICES_TYPE_INDICATOR_SORTER, WingpanelServicesIndicatorSorterClass))

typedef struct _WingpanelServicesIndicatorSorter WingpanelServicesIndicatorSorter;
typedef struct _WingpanelServicesIndicatorSorterClass WingpanelServicesIndicatorSorterClass;
enum  {
	WINGPANEL_WIDGETS_INDICATOR_MENU_BAR_0_PROPERTY,
	WINGPANEL_WIDGETS_INDICATOR_MENU_BAR_NUM_PROPERTIES
};
static GParamSpec* wingpanel_widgets_indicator_menu_bar_properties[WINGPANEL_WIDGETS_INDICATOR_MENU_BAR_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _WingpanelWidgetsIndicatorEntryPrivate WingpanelWidgetsIndicatorEntryPrivate;

struct _WingpanelWidgetsIndicatorMenuBar {
	GtkMenuBar parent_instance;
	WingpanelWidgetsIndicatorMenuBarPrivate * priv;
};

struct _WingpanelWidgetsIndicatorMenuBarClass {
	GtkMenuBarClass parent_class;
};

struct _WingpanelWidgetsIndicatorMenuBarPrivate {
	GeeList* sorted_items;
	WingpanelServicesIndicatorSorter* sorter;
	guint apply_new_order_idle_id;
};

struct _WingpanelWidgetsIndicatorEntry {
	GtkMenuItem parent_instance;
	WingpanelWidgetsIndicatorEntryPrivate * priv;
	WingpanelWidgetsIndicatorMenuBar* menu_bar;
};

struct _WingpanelWidgetsIndicatorEntryClass {
	GtkMenuItemClass parent_class;
};

static gint WingpanelWidgetsIndicatorMenuBar_private_offset;
static gpointer wingpanel_widgets_indicator_menu_bar_parent_class = NULL;

VALA_EXTERN GType wingpanel_widgets_indicator_menu_bar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WingpanelWidgetsIndicatorMenuBar, g_object_unref)
VALA_EXTERN GType wingpanel_widgets_indicator_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WingpanelWidgetsIndicatorEntry, g_object_unref)
VALA_EXTERN GType wingpanel_services_indicator_sorter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WingpanelServicesIndicatorSorter, g_object_unref)
VALA_EXTERN WingpanelServicesIndicatorSorter* wingpanel_services_indicator_sorter_new (void);
VALA_EXTERN WingpanelServicesIndicatorSorter* wingpanel_services_indicator_sorter_construct (GType object_type);
VALA_EXTERN WingpanelWidgetsIndicatorMenuBar* wingpanel_widgets_indicator_menu_bar_new (void);
VALA_EXTERN WingpanelWidgetsIndicatorMenuBar* wingpanel_widgets_indicator_menu_bar_construct (GType object_type);
VALA_EXTERN void wingpanel_widgets_indicator_menu_bar_insert_sorted (WingpanelWidgetsIndicatorMenuBar* self,
                                                         WingpanelWidgetsIndicatorEntry* item);
VALA_EXTERN WingpanelIndicator* wingpanel_widgets_indicator_entry_get_base_indicator (WingpanelWidgetsIndicatorEntry* self);
VALA_EXTERN gint wingpanel_services_indicator_sorter_compare_func (WingpanelServicesIndicatorSorter* self,
                                                       WingpanelWidgetsIndicatorEntry* a,
                                                       WingpanelWidgetsIndicatorEntry* b);
static gint _wingpanel_services_indicator_sorter_compare_func_gcompare_data_func (gconstpointer a,
                                                                           gconstpointer b,
                                                                           gpointer self);
VALA_EXTERN void wingpanel_widgets_indicator_menu_bar_apply_new_order (WingpanelWidgetsIndicatorMenuBar* self);
static void wingpanel_widgets_indicator_menu_bar_real_remove (GtkContainer* base,
                                                       GtkWidget* widget);
static gboolean __lambda4_ (WingpanelWidgetsIndicatorMenuBar* self);
static void wingpanel_widgets_indicator_menu_bar_clear (WingpanelWidgetsIndicatorMenuBar* self);
static void wingpanel_widgets_indicator_menu_bar_append_all_items (WingpanelWidgetsIndicatorMenuBar* self);
static gboolean ___lambda4__gsource_func (gpointer self);
static void wingpanel_widgets_indicator_menu_bar_finalize (GObject * obj);
static GType wingpanel_widgets_indicator_menu_bar_get_type_once (void);

static inline gpointer
wingpanel_widgets_indicator_menu_bar_get_instance_private (WingpanelWidgetsIndicatorMenuBar* self)
{
	return G_STRUCT_MEMBER_P (self, WingpanelWidgetsIndicatorMenuBar_private_offset);
}

WingpanelWidgetsIndicatorMenuBar*
wingpanel_widgets_indicator_menu_bar_construct (GType object_type)
{
	WingpanelWidgetsIndicatorMenuBar * self = NULL;
	GeeArrayList* _tmp0_;
	self = (WingpanelWidgetsIndicatorMenuBar*) g_object_new (object_type, NULL);
	_tmp0_ = gee_array_list_new (WINGPANEL_WIDGETS_TYPE_INDICATOR_ENTRY, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->sorted_items);
	self->priv->sorted_items = (GeeList*) _tmp0_;
	return self;
}

WingpanelWidgetsIndicatorMenuBar*
wingpanel_widgets_indicator_menu_bar_new (void)
{
	return wingpanel_widgets_indicator_menu_bar_construct (WINGPANEL_WIDGETS_TYPE_INDICATOR_MENU_BAR);
}

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

static gint
_wingpanel_services_indicator_sorter_compare_func_gcompare_data_func (gconstpointer a,
                                                                      gconstpointer b,
                                                                      gpointer self)
{
	gint result;
	result = wingpanel_services_indicator_sorter_compare_func ((WingpanelServicesIndicatorSorter*) self, (WingpanelWidgetsIndicatorEntry*) a, (WingpanelWidgetsIndicatorEntry*) b);
	return result;
}

void
wingpanel_widgets_indicator_menu_bar_insert_sorted (WingpanelWidgetsIndicatorMenuBar* self,
                                                    WingpanelWidgetsIndicatorEntry* item)
{
	WingpanelWidgetsIndicatorMenuBar* _tmp17_;
	GeeList* _tmp18_;
	GeeList* _tmp19_;
	WingpanelServicesIndicatorSorter* _tmp20_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	{
		GeeList* _indicator_list = NULL;
		GeeList* _tmp0_;
		gint _indicator_size = 0;
		GeeList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _indicator_index = 0;
		_tmp0_ = self->priv->sorted_items;
		_indicator_list = _tmp0_;
		_tmp1_ = _indicator_list;
		_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_indicator_size = _tmp3_;
		_indicator_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			WingpanelWidgetsIndicatorEntry* indicator = NULL;
			GeeList* _tmp6_;
			gpointer _tmp7_;
			WingpanelIndicator* _tmp8_;
			WingpanelIndicator* _tmp9_;
			const gchar* _tmp10_;
			const gchar* _tmp11_;
			WingpanelWidgetsIndicatorEntry* _tmp12_;
			WingpanelIndicator* _tmp13_;
			WingpanelIndicator* _tmp14_;
			const gchar* _tmp15_;
			const gchar* _tmp16_;
			_indicator_index = _indicator_index + 1;
			_tmp4_ = _indicator_index;
			_tmp5_ = _indicator_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _indicator_list;
			_tmp7_ = gee_list_get (_tmp6_, _indicator_index);
			indicator = (WingpanelWidgetsIndicatorEntry*) _tmp7_;
			_tmp8_ = wingpanel_widgets_indicator_entry_get_base_indicator (item);
			_tmp9_ = _tmp8_;
			_tmp10_ = wingpanel_indicator_get_code_name (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = indicator;
			_tmp13_ = wingpanel_widgets_indicator_entry_get_base_indicator (_tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = wingpanel_indicator_get_code_name (_tmp14_);
			_tmp16_ = _tmp15_;
			if (g_strcmp0 (_tmp11_, _tmp16_) == 0) {
				_g_object_unref0 (indicator);
				return;
			}
			_g_object_unref0 (indicator);
		}
	}
	_tmp17_ = _g_object_ref0 (self);
	_g_object_unref0 (item->menu_bar);
	item->menu_bar = _tmp17_;
	_tmp18_ = self->priv->sorted_items;
	gee_collection_add ((GeeCollection*) _tmp18_, item);
	_tmp19_ = self->priv->sorted_items;
	_tmp20_ = self->priv->sorter;
	gee_list_sort (_tmp19_, _wingpanel_services_indicator_sorter_compare_func_gcompare_data_func, g_object_ref (_tmp20_), g_object_unref);
	wingpanel_widgets_indicator_menu_bar_apply_new_order (self);
}

static void
wingpanel_widgets_indicator_menu_bar_real_remove (GtkContainer* base,
                                                  GtkWidget* widget)
{
	WingpanelWidgetsIndicatorMenuBar * self;
	WingpanelWidgetsIndicatorEntry* indicator_widget = NULL;
	WingpanelWidgetsIndicatorEntry* _tmp0_;
	WingpanelWidgetsIndicatorEntry* _tmp1_;
	self = (WingpanelWidgetsIndicatorMenuBar*) base;
	g_return_if_fail (widget != NULL);
	_tmp0_ = _g_object_ref0 (WINGPANEL_WIDGETS_IS_INDICATOR_ENTRY (widget) ? ((WingpanelWidgetsIndicatorEntry*) widget) : NULL);
	indicator_widget = _tmp0_;
	_tmp1_ = indicator_widget;
	if (_tmp1_ != NULL) {
		GeeList* _tmp2_;
		WingpanelWidgetsIndicatorEntry* _tmp3_;
		_tmp2_ = self->priv->sorted_items;
		_tmp3_ = indicator_widget;
		gee_collection_remove ((GeeCollection*) _tmp2_, _tmp3_);
	}
	GTK_CONTAINER_CLASS (wingpanel_widgets_indicator_menu_bar_parent_class)->remove ((GtkContainer*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_menu_bar_get_type (), GtkMenuBar), widget);
	_g_object_unref0 (indicator_widget);
}

static gboolean
__lambda4_ (WingpanelWidgetsIndicatorMenuBar* self)
{
	gboolean result;
	wingpanel_widgets_indicator_menu_bar_clear (self);
	wingpanel_widgets_indicator_menu_bar_append_all_items (self);
	self->priv->apply_new_order_idle_id = (guint) 0;
	result = FALSE;
	return result;
}

static gboolean
___lambda4__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda4_ ((WingpanelWidgetsIndicatorMenuBar*) self);
	return result;
}

void
wingpanel_widgets_indicator_menu_bar_apply_new_order (WingpanelWidgetsIndicatorMenuBar* self)
{
	g_return_if_fail (self != NULL);
	if (self->priv->apply_new_order_idle_id > ((guint) 0)) {
		g_source_remove (self->priv->apply_new_order_idle_id);
		self->priv->apply_new_order_idle_id = (guint) 0;
	}
	self->priv->apply_new_order_idle_id = g_idle_add_full (G_PRIORITY_LOW, ___lambda4__gsource_func, g_object_ref (self), g_object_unref);
}

static void
wingpanel_widgets_indicator_menu_bar_clear (WingpanelWidgetsIndicatorMenuBar* self)
{
	GList* children = NULL;
	GList* _tmp0_;
	GList* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_container_get_children ((GtkContainer*) self);
	children = _tmp0_;
	_tmp1_ = children;
	{
		GList* child_collection = NULL;
		GList* child_it = NULL;
		child_collection = _tmp1_;
		for (child_it = child_collection; child_it != NULL; child_it = child_it->next) {
			GtkWidget* child = NULL;
			child = (GtkWidget*) child_it->data;
			{
				GtkWidget* _tmp2_;
				_tmp2_ = child;
				GTK_CONTAINER_CLASS (wingpanel_widgets_indicator_menu_bar_parent_class)->remove ((GtkContainer*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_menu_bar_get_type (), GtkMenuBar), _tmp2_);
			}
		}
	}
	(children == NULL) ? NULL : (children = (g_list_free (children), NULL));
}

static void
wingpanel_widgets_indicator_menu_bar_append_all_items (WingpanelWidgetsIndicatorMenuBar* self)
{
	g_return_if_fail (self != NULL);
	{
		GeeList* _widget_list = NULL;
		GeeList* _tmp0_;
		gint _widget_size = 0;
		GeeList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _widget_index = 0;
		_tmp0_ = self->priv->sorted_items;
		_widget_list = _tmp0_;
		_tmp1_ = _widget_list;
		_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_widget_size = _tmp3_;
		_widget_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			WingpanelWidgetsIndicatorEntry* widget = NULL;
			GeeList* _tmp6_;
			gpointer _tmp7_;
			WingpanelWidgetsIndicatorEntry* _tmp8_;
			WingpanelIndicator* _tmp9_;
			WingpanelIndicator* _tmp10_;
			gboolean _tmp11_;
			gboolean _tmp12_;
			_widget_index = _widget_index + 1;
			_tmp4_ = _widget_index;
			_tmp5_ = _widget_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _widget_list;
			_tmp7_ = gee_list_get (_tmp6_, _widget_index);
			widget = (WingpanelWidgetsIndicatorEntry*) _tmp7_;
			_tmp8_ = widget;
			_tmp9_ = wingpanel_widgets_indicator_entry_get_base_indicator (_tmp8_);
			_tmp10_ = _tmp9_;
			_tmp11_ = wingpanel_indicator_get_visible (_tmp10_);
			_tmp12_ = _tmp11_;
			if (_tmp12_) {
				WingpanelWidgetsIndicatorEntry* _tmp13_;
				_tmp13_ = widget;
				gtk_menu_shell_append ((GtkMenuShell*) self, (GtkMenuItem*) _tmp13_);
			}
			_g_object_unref0 (widget);
		}
	}
}

static void
wingpanel_widgets_indicator_menu_bar_class_init (WingpanelWidgetsIndicatorMenuBarClass * klass,
                                                 gpointer klass_data)
{
	wingpanel_widgets_indicator_menu_bar_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WingpanelWidgetsIndicatorMenuBar_private_offset);
	((GtkContainerClass *) klass)->remove = (void (*) (GtkContainer*, GtkWidget*)) wingpanel_widgets_indicator_menu_bar_real_remove;
	G_OBJECT_CLASS (klass)->finalize = wingpanel_widgets_indicator_menu_bar_finalize;
}

static void
wingpanel_widgets_indicator_menu_bar_instance_init (WingpanelWidgetsIndicatorMenuBar * self,
                                                    gpointer klass)
{
	WingpanelServicesIndicatorSorter* _tmp0_;
	self->priv = wingpanel_widgets_indicator_menu_bar_get_instance_private (self);
	_tmp0_ = wingpanel_services_indicator_sorter_new ();
	self->priv->sorter = _tmp0_;
	self->priv->apply_new_order_idle_id = (guint) 0;
}

static void
wingpanel_widgets_indicator_menu_bar_finalize (GObject * obj)
{
	WingpanelWidgetsIndicatorMenuBar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WINGPANEL_WIDGETS_TYPE_INDICATOR_MENU_BAR, WingpanelWidgetsIndicatorMenuBar);
	_g_object_unref0 (self->priv->sorted_items);
	_g_object_unref0 (self->priv->sorter);
	G_OBJECT_CLASS (wingpanel_widgets_indicator_menu_bar_parent_class)->finalize (obj);
}

static GType
wingpanel_widgets_indicator_menu_bar_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WingpanelWidgetsIndicatorMenuBarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) wingpanel_widgets_indicator_menu_bar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WingpanelWidgetsIndicatorMenuBar), 0, (GInstanceInitFunc) wingpanel_widgets_indicator_menu_bar_instance_init, NULL };
	GType wingpanel_widgets_indicator_menu_bar_type_id;
	wingpanel_widgets_indicator_menu_bar_type_id = g_type_register_static (gtk_menu_bar_get_type (), "WingpanelWidgetsIndicatorMenuBar", &g_define_type_info, 0);
	WingpanelWidgetsIndicatorMenuBar_private_offset = g_type_add_instance_private (wingpanel_widgets_indicator_menu_bar_type_id, sizeof (WingpanelWidgetsIndicatorMenuBarPrivate));
	return wingpanel_widgets_indicator_menu_bar_type_id;
}

GType
wingpanel_widgets_indicator_menu_bar_get_type (void)
{
	static volatile gsize wingpanel_widgets_indicator_menu_bar_type_id__once = 0;
	if (g_once_init_enter (&wingpanel_widgets_indicator_menu_bar_type_id__once)) {
		GType wingpanel_widgets_indicator_menu_bar_type_id;
		wingpanel_widgets_indicator_menu_bar_type_id = wingpanel_widgets_indicator_menu_bar_get_type_once ();
		g_once_init_leave (&wingpanel_widgets_indicator_menu_bar_type_id__once, wingpanel_widgets_indicator_menu_bar_type_id);
	}
	return wingpanel_widgets_indicator_menu_bar_type_id__once;
}

