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

/*
 * Copyright 2019 elementary, Inc. (https://elementary.io)
 * SPDX-License-Identifier: LGPL-3.0-or-later
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include "granite.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 TYPE_ACCEL_LABEL_VIEW (accel_label_view_get_type ())
#define ACCEL_LABEL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ACCEL_LABEL_VIEW, AccelLabelView))
#define ACCEL_LABEL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ACCEL_LABEL_VIEW, AccelLabelViewClass))
#define IS_ACCEL_LABEL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ACCEL_LABEL_VIEW))
#define IS_ACCEL_LABEL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ACCEL_LABEL_VIEW))
#define ACCEL_LABEL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ACCEL_LABEL_VIEW, AccelLabelViewClass))

typedef struct _AccelLabelView AccelLabelView;
typedef struct _AccelLabelViewClass AccelLabelViewClass;
typedef struct _AccelLabelViewPrivate AccelLabelViewPrivate;
enum  {
	ACCEL_LABEL_VIEW_0_PROPERTY,
	ACCEL_LABEL_VIEW_NUM_PROPERTIES
};
static GParamSpec* accel_label_view_properties[ACCEL_LABEL_VIEW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _AccelLabelView {
	GtkGrid parent_instance;
	AccelLabelViewPrivate * priv;
};

struct _AccelLabelViewClass {
	GtkGridClass parent_class;
};

static gpointer accel_label_view_parent_class = NULL;

VALA_EXTERN GType accel_label_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AccelLabelView, g_object_unref)
VALA_EXTERN AccelLabelView* accel_label_view_new (void);
VALA_EXTERN AccelLabelView* accel_label_view_construct (GType object_type);
static GObject * accel_label_view_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties);
static GType accel_label_view_get_type_once (void);

AccelLabelView*
accel_label_view_construct (GType object_type)
{
	AccelLabelView * self = NULL;
	self = (AccelLabelView*) g_object_new (object_type, NULL);
	return self;
}

AccelLabelView*
accel_label_view_new (void)
{
	return accel_label_view_construct (TYPE_ACCEL_LABEL_VIEW);
}

static GObject *
accel_label_view_constructor (GType type,
                              guint n_construct_properties,
                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	AccelLabelView * self;
	GtkLabel* accellabel_label = NULL;
	GtkLabel* _tmp0_;
	GtkLabel* _tmp1_;
	GraniteAccelLabel* copy_label = NULL;
	GraniteAccelLabel* _tmp2_;
	GtkLabel* popover_label = NULL;
	GtkLabel* _tmp3_;
	GtkLabel* _tmp4_;
	GtkModelButton* lock_button = NULL;
	GtkModelButton* _tmp5_;
	GtkModelButton* _tmp6_;
	GtkWidget* _tmp7_;
	GtkModelButton* _tmp8_;
	GraniteAccelLabel* _tmp9_;
	GraniteAccelLabel* _tmp10_;
	GtkModelButton* logout_button = NULL;
	GtkModelButton* _tmp11_;
	GtkModelButton* _tmp12_;
	GtkWidget* _tmp13_;
	GtkModelButton* _tmp14_;
	GraniteAccelLabel* _tmp15_;
	GraniteAccelLabel* _tmp16_;
	GtkGrid* popover_grid = NULL;
	GtkGrid* _tmp17_;
	GtkGrid* _tmp18_;
	GtkGrid* _tmp19_;
	GtkGrid* _tmp20_;
	GtkGrid* _tmp21_;
	GtkModelButton* _tmp22_;
	GtkGrid* _tmp23_;
	GtkModelButton* _tmp24_;
	GtkGrid* _tmp25_;
	GtkPopover* popover = NULL;
	GtkPopover* _tmp26_;
	GtkPopover* _tmp27_;
	GtkGrid* _tmp28_;
	GtkMenuButton* popover_button = NULL;
	GtkMenuButton* _tmp29_;
	GtkMenuButton* _tmp30_;
	GtkPopover* _tmp31_;
	GtkMenuItem* undo_menuitem = NULL;
	GtkMenuItem* _tmp32_;
	GtkMenuItem* _tmp33_;
	GraniteAccelLabel* _tmp34_;
	GraniteAccelLabel* _tmp35_;
	GtkMenuItem* redo_menuitem = NULL;
	GtkMenuItem* _tmp36_;
	GtkMenuItem* _tmp37_;
	GraniteAccelLabel* _tmp38_;
	GraniteAccelLabel* _tmp39_;
	GtkLabel* menu_label = NULL;
	GtkLabel* _tmp40_;
	GtkLabel* _tmp41_;
	GtkMenu* menu = NULL;
	GtkMenu* _tmp42_;
	GtkMenu* _tmp43_;
	GtkMenuItem* _tmp44_;
	GtkMenu* _tmp45_;
	GtkMenuItem* _tmp46_;
	GtkMenu* _tmp47_;
	GtkMenuButton* menu_button = NULL;
	GtkMenuButton* _tmp48_;
	GtkMenuButton* _tmp49_;
	GtkMenu* _tmp50_;
	GtkLabel* _tmp51_;
	GraniteAccelLabel* _tmp52_;
	GtkLabel* _tmp53_;
	GtkMenuButton* _tmp54_;
	GtkLabel* _tmp55_;
	GtkMenuButton* _tmp56_;
	parent_class = G_OBJECT_CLASS (accel_label_view_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ACCEL_LABEL_VIEW, AccelLabelView);
	_tmp0_ = (GtkLabel*) gtk_label_new ("AccelLabel:");
	g_object_ref_sink (_tmp0_);
	accellabel_label = _tmp0_;
	_tmp1_ = accellabel_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	_tmp2_ = granite_accel_label_new ("Copy", "<Ctrl>C");
	g_object_ref_sink (_tmp2_);
	copy_label = _tmp2_;
	_tmp3_ = (GtkLabel*) gtk_label_new ("In a Popover:");
	g_object_ref_sink (_tmp3_);
	popover_label = _tmp3_;
	_tmp4_ = popover_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_END);
	_tmp5_ = (GtkModelButton*) gtk_model_button_new ();
	g_object_ref_sink (_tmp5_);
	lock_button = _tmp5_;
	_tmp6_ = lock_button;
	_tmp7_ = gtk_bin_get_child ((GtkBin*) _tmp6_);
	gtk_widget_destroy (_tmp7_);
	_tmp8_ = lock_button;
	_tmp9_ = granite_accel_label_new ("Lock", "<Super>L");
	g_object_ref_sink (_tmp9_);
	_tmp10_ = _tmp9_;
	gtk_container_add ((GtkContainer*) _tmp8_, (GtkWidget*) _tmp10_);
	_g_object_unref0 (_tmp10_);
	_tmp11_ = (GtkModelButton*) gtk_model_button_new ();
	g_object_ref_sink (_tmp11_);
	logout_button = _tmp11_;
	_tmp12_ = logout_button;
	_tmp13_ = gtk_bin_get_child ((GtkBin*) _tmp12_);
	gtk_widget_destroy (_tmp13_);
	_tmp14_ = logout_button;
	_tmp15_ = granite_accel_label_new ("Log Out…", "<Ctrl><Alt>Delete");
	g_object_ref_sink (_tmp15_);
	_tmp16_ = _tmp15_;
	gtk_container_add ((GtkContainer*) _tmp14_, (GtkWidget*) _tmp16_);
	_g_object_unref0 (_tmp16_);
	_tmp17_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp17_);
	popover_grid = _tmp17_;
	_tmp18_ = popover_grid;
	_tmp19_ = popover_grid;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp19_, 3);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp18_, 3);
	_tmp20_ = popover_grid;
	gtk_orientable_set_orientation ((GtkOrientable*) _tmp20_, GTK_ORIENTATION_VERTICAL);
	_tmp21_ = popover_grid;
	_tmp22_ = lock_button;
	gtk_container_add ((GtkContainer*) _tmp21_, (GtkWidget*) _tmp22_);
	_tmp23_ = popover_grid;
	_tmp24_ = logout_button;
	gtk_container_add ((GtkContainer*) _tmp23_, (GtkWidget*) _tmp24_);
	_tmp25_ = popover_grid;
	gtk_widget_show_all ((GtkWidget*) _tmp25_);
	_tmp26_ = (GtkPopover*) gtk_popover_new (NULL);
	g_object_ref_sink (_tmp26_);
	popover = _tmp26_;
	_tmp27_ = popover;
	_tmp28_ = popover_grid;
	gtk_container_add ((GtkContainer*) _tmp27_, (GtkWidget*) _tmp28_);
	_tmp29_ = (GtkMenuButton*) gtk_menu_button_new ();
	g_object_ref_sink (_tmp29_);
	popover_button = _tmp29_;
	_tmp30_ = popover_button;
	_tmp31_ = popover;
	gtk_menu_button_set_popover (_tmp30_, _tmp31_);
	_tmp32_ = (GtkMenuItem*) gtk_menu_item_new ();
	g_object_ref_sink (_tmp32_);
	undo_menuitem = _tmp32_;
	_tmp33_ = undo_menuitem;
	_tmp34_ = granite_accel_label_new ("Undo", "<Ctrl>Z");
	g_object_ref_sink (_tmp34_);
	_tmp35_ = _tmp34_;
	gtk_container_add ((GtkContainer*) _tmp33_, (GtkWidget*) _tmp35_);
	_g_object_unref0 (_tmp35_);
	_tmp36_ = (GtkMenuItem*) gtk_menu_item_new ();
	g_object_ref_sink (_tmp36_);
	redo_menuitem = _tmp36_;
	_tmp37_ = redo_menuitem;
	_tmp38_ = granite_accel_label_new ("Redo", "<Ctrl><Shift>Z");
	g_object_ref_sink (_tmp38_);
	_tmp39_ = _tmp38_;
	gtk_container_add ((GtkContainer*) _tmp37_, (GtkWidget*) _tmp39_);
	_g_object_unref0 (_tmp39_);
	_tmp40_ = (GtkLabel*) gtk_label_new ("In a Menu:");
	g_object_ref_sink (_tmp40_);
	menu_label = _tmp40_;
	_tmp41_ = menu_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp41_, GTK_ALIGN_END);
	_tmp42_ = (GtkMenu*) gtk_menu_new ();
	g_object_ref_sink (_tmp42_);
	menu = _tmp42_;
	_tmp43_ = menu;
	_tmp44_ = undo_menuitem;
	gtk_container_add ((GtkContainer*) _tmp43_, (GtkWidget*) _tmp44_);
	_tmp45_ = menu;
	_tmp46_ = redo_menuitem;
	gtk_container_add ((GtkContainer*) _tmp45_, (GtkWidget*) _tmp46_);
	_tmp47_ = menu;
	gtk_widget_show_all ((GtkWidget*) _tmp47_);
	_tmp48_ = (GtkMenuButton*) gtk_menu_button_new ();
	g_object_ref_sink (_tmp48_);
	menu_button = _tmp48_;
	_tmp49_ = menu_button;
	_tmp50_ = menu;
	gtk_menu_button_set_popup (_tmp49_, _tmp50_);
	gtk_grid_set_column_spacing ((GtkGrid*) self, 12);
	gtk_grid_set_row_spacing ((GtkGrid*) self, 12);
	gtk_widget_set_halign ((GtkWidget*) self, GTK_ALIGN_CENTER);
	gtk_widget_set_valign ((GtkWidget*) self, GTK_ALIGN_CENTER);
	_tmp51_ = accellabel_label;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp51_, 0, 0, 1, 1);
	_tmp52_ = copy_label;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp52_, 1, 0, 1, 1);
	_tmp53_ = popover_label;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp53_, 0, 1, 1, 1);
	_tmp54_ = popover_button;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp54_, 1, 1, 1, 1);
	_tmp55_ = menu_label;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp55_, 0, 2, 1, 1);
	_tmp56_ = menu_button;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp56_, 1, 2, 1, 1);
	_g_object_unref0 (menu_button);
	_g_object_unref0 (menu);
	_g_object_unref0 (menu_label);
	_g_object_unref0 (redo_menuitem);
	_g_object_unref0 (undo_menuitem);
	_g_object_unref0 (popover_button);
	_g_object_unref0 (popover);
	_g_object_unref0 (popover_grid);
	_g_object_unref0 (logout_button);
	_g_object_unref0 (lock_button);
	_g_object_unref0 (popover_label);
	_g_object_unref0 (copy_label);
	_g_object_unref0 (accellabel_label);
	return obj;
}

static void
accel_label_view_class_init (AccelLabelViewClass * klass,
                             gpointer klass_data)
{
	accel_label_view_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->constructor = accel_label_view_constructor;
}

static void
accel_label_view_instance_init (AccelLabelView * self,
                                gpointer klass)
{
}

static GType
accel_label_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccelLabelViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accel_label_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccelLabelView), 0, (GInstanceInitFunc) accel_label_view_instance_init, NULL };
	GType accel_label_view_type_id;
	accel_label_view_type_id = g_type_register_static (gtk_grid_get_type (), "AccelLabelView", &g_define_type_info, 0);
	return accel_label_view_type_id;
}

GType
accel_label_view_get_type (void)
{
	static volatile gsize accel_label_view_type_id__once = 0;
	if (g_once_init_enter (&accel_label_view_type_id__once)) {
		GType accel_label_view_type_id;
		accel_label_view_type_id = accel_label_view_get_type_once ();
		g_once_init_leave (&accel_label_view_type_id__once, accel_label_view_type_id);
	}
	return accel_label_view_type_id__once;
}

