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

/*
 * SPDX-License-Identifier: LGPL-3.0-or-later
 * SPDX-FileCopyrightText: 2023 elementary, Inc. (https://elementary.io)
 *
 * Authored by: Leonhard Kargl <leo.kargl@proton.me>
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <granite-7.h>
#include <glib/gi18n-lib.h>
#include <adwaita.h>

#define AUDIENCE_WINDOW_ACTION_GROUP_PREFIX "win"
#define AUDIENCE_WINDOW_ACTION_PREFIX AUDIENCE_WINDOW_ACTION_GROUP_PREFIX "."
#define AUDIENCE_WINDOW_ACTION_BACK "back"
#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 AUDIENCE_TYPE_HEADER_BAR (audience_header_bar_get_type ())
#define AUDIENCE_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AUDIENCE_TYPE_HEADER_BAR, AudienceHeaderBar))
#define AUDIENCE_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AUDIENCE_TYPE_HEADER_BAR, AudienceHeaderBarClass))
#define AUDIENCE_IS_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AUDIENCE_TYPE_HEADER_BAR))
#define AUDIENCE_IS_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AUDIENCE_TYPE_HEADER_BAR))
#define AUDIENCE_HEADER_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AUDIENCE_TYPE_HEADER_BAR, AudienceHeaderBarClass))

typedef struct _AudienceHeaderBar AudienceHeaderBar;
typedef struct _AudienceHeaderBarClass AudienceHeaderBarClass;
typedef struct _AudienceHeaderBarPrivate AudienceHeaderBarPrivate;
enum  {
	AUDIENCE_HEADER_BAR_0_PROPERTY,
	AUDIENCE_HEADER_BAR_FULLSCREENED_PROPERTY,
	AUDIENCE_HEADER_BAR_HEADER_BAR_PROPERTY,
	AUDIENCE_HEADER_BAR_NUM_PROPERTIES
};
static GParamSpec* audience_header_bar_properties[AUDIENCE_HEADER_BAR_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block11Data Block11Data;
#define _g_free0(var) (var = (g_free (var), NULL))

#define AUDIENCE_TYPE_WINDOW (audience_window_get_type ())
#define AUDIENCE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AUDIENCE_TYPE_WINDOW, AudienceWindow))
#define AUDIENCE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AUDIENCE_TYPE_WINDOW, AudienceWindowClass))
#define AUDIENCE_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AUDIENCE_TYPE_WINDOW))
#define AUDIENCE_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AUDIENCE_TYPE_WINDOW))
#define AUDIENCE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AUDIENCE_TYPE_WINDOW, AudienceWindowClass))

typedef struct _AudienceWindow AudienceWindow;
typedef struct _AudienceWindowClass AudienceWindowClass;

struct _AudienceHeaderBar {
	GtkBox parent_instance;
	AudienceHeaderBarPrivate * priv;
};

struct _AudienceHeaderBarClass {
	GtkBoxClass parent_class;
};

struct _AudienceHeaderBarPrivate {
	GtkHeaderBar* _header_bar;
	GtkButton* unfullscreen_button;
	GBinding* binding;
};

struct _Block11Data {
	int _ref_count_;
	AudienceHeaderBar* self;
	GtkButton* navigation_button;
	GtkLabel* title_label;
};

static gint AudienceHeaderBar_private_offset;
static gpointer audience_header_bar_parent_class = NULL;

VALA_EXTERN GType audience_header_bar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AudienceHeaderBar, g_object_unref)
VALA_EXTERN AudienceHeaderBar* audience_header_bar_new (void);
VALA_EXTERN AudienceHeaderBar* audience_header_bar_construct (GType object_type);
VALA_EXTERN void audience_header_bar_set_fullscreened (AudienceHeaderBar* self,
                                           gboolean value);
VALA_EXTERN GtkHeaderBar* audience_header_bar_get_header_bar (AudienceHeaderBar* self);
static void audience_header_bar_set_header_bar (AudienceHeaderBar* self,
                                         GtkHeaderBar* value);
static GObject * audience_header_bar_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties);
static Block11Data* block11_data_ref (Block11Data* _data11_);
static void block11_data_unref (void * _userdata_);
static void _audience_header_bar___lambda28_ (Block11Data* _data11_);
VALA_EXTERN GType audience_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AudienceWindow, g_object_unref)
static void __audience_header_bar___lambda28__gtk_widget_map (GtkWidget* _sender,
                                                       gpointer self);
static void _audience_header_bar___lambda29_ (AudienceHeaderBar* self);
static void __audience_header_bar___lambda29__gtk_widget_unmap (GtkWidget* _sender,
                                                         gpointer self);
static void _audience_header_bar___lambda30_ (AudienceHeaderBar* self);
static void __audience_header_bar___lambda30__gtk_button_clicked (GtkButton* _sender,
                                                           gpointer self);
static void audience_header_bar_finalize (GObject * obj);
static GType audience_header_bar_get_type_once (void);
static void _vala_audience_header_bar_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec);
static void _vala_audience_header_bar_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec);

static inline gpointer
audience_header_bar_get_instance_private (AudienceHeaderBar* self)
{
	return G_STRUCT_MEMBER_P (self, AudienceHeaderBar_private_offset);
}

AudienceHeaderBar*
audience_header_bar_construct (GType object_type)
{
	AudienceHeaderBar * self = NULL;
	self = (AudienceHeaderBar*) g_object_new (object_type, NULL);
	return self;
}

AudienceHeaderBar*
audience_header_bar_new (void)
{
	return audience_header_bar_construct (AUDIENCE_TYPE_HEADER_BAR);
}

void
audience_header_bar_set_fullscreened (AudienceHeaderBar* self,
                                      gboolean value)
{
	GtkButton* _tmp2_;
	g_return_if_fail (self != NULL);
	if (value) {
		GtkHeaderBar* _tmp0_;
		_tmp0_ = self->priv->_header_bar;
		gtk_header_bar_set_decoration_layout (_tmp0_, "close");
	} else {
		GtkHeaderBar* _tmp1_;
		_tmp1_ = self->priv->_header_bar;
		gtk_header_bar_set_decoration_layout (_tmp1_, NULL);
	}
	_tmp2_ = self->priv->unfullscreen_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp2_, value);
	g_object_notify_by_pspec ((GObject *) self, audience_header_bar_properties[AUDIENCE_HEADER_BAR_FULLSCREENED_PROPERTY]);
}

GtkHeaderBar*
audience_header_bar_get_header_bar (AudienceHeaderBar* self)
{
	GtkHeaderBar* result;
	GtkHeaderBar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_header_bar;
	result = _tmp0_;
	return result;
}

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

static void
audience_header_bar_set_header_bar (AudienceHeaderBar* self,
                                    GtkHeaderBar* value)
{
	GtkHeaderBar* old_value;
	g_return_if_fail (self != NULL);
	old_value = audience_header_bar_get_header_bar (self);
	if (old_value != value) {
		GtkHeaderBar* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_header_bar);
		self->priv->_header_bar = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, audience_header_bar_properties[AUDIENCE_HEADER_BAR_HEADER_BAR_PROPERTY]);
	}
}

static Block11Data*
block11_data_ref (Block11Data* _data11_)
{
	g_atomic_int_inc (&_data11_->_ref_count_);
	return _data11_;
}

static void
block11_data_unref (void * _userdata_)
{
	Block11Data* _data11_;
	_data11_ = (Block11Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data11_->_ref_count_)) {
		AudienceHeaderBar* self;
		self = _data11_->self;
		_g_object_unref0 (_data11_->title_label);
		_g_object_unref0 (_data11_->navigation_button);
		_g_object_unref0 (self);
		g_slice_free (Block11Data, _data11_);
	}
}

static void
_audience_header_bar___lambda28_ (Block11Data* _data11_)
{
	AudienceHeaderBar* self;
	AdwNavigationPage* current_page = NULL;
	GtkWidget* _tmp0_;
	AdwNavigationPage* _tmp1_;
	AdwNavigationView* navigation_view = NULL;
	GtkWidget* _tmp2_;
	AdwNavigationView* _tmp3_;
	AdwNavigationPage* _tmp4_;
	GtkLabel* _tmp5_;
	AdwNavigationPage* previous_page = NULL;
	AdwNavigationView* _tmp6_;
	AdwNavigationPage* _tmp7_;
	AdwNavigationPage* _tmp8_;
	AdwNavigationPage* _tmp9_;
	AdwNavigationPage* _tmp10_;
	GtkRoot* _tmp17_;
	GBinding* _tmp18_;
	self = _data11_->self;
	_tmp0_ = gtk_widget_get_ancestor ((GtkWidget*) self, adw_navigation_page_get_type ());
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, adw_navigation_page_get_type (), AdwNavigationPage));
	current_page = _tmp1_;
	_tmp2_ = gtk_widget_get_ancestor ((GtkWidget*) self, adw_navigation_view_get_type ());
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, adw_navigation_view_get_type (), AdwNavigationView));
	navigation_view = _tmp3_;
	_tmp4_ = current_page;
	_tmp5_ = _data11_->title_label;
	g_object_bind_property_with_closures ((GObject*) _tmp4_, "title", (GObject*) _tmp5_, "label", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp6_ = navigation_view;
	_tmp7_ = current_page;
	_tmp8_ = adw_navigation_view_get_previous_page (_tmp6_, _tmp7_);
	_tmp9_ = _g_object_ref0 (_tmp8_);
	previous_page = _tmp9_;
	_tmp10_ = previous_page;
	if (_tmp10_ != NULL) {
		GtkButton* _tmp11_;
		GtkButton* _tmp12_;
		AdwNavigationPage* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		_tmp11_ = _data11_->navigation_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp11_, TRUE);
		_tmp12_ = _data11_->navigation_button;
		_tmp13_ = previous_page;
		_tmp14_ = adw_navigation_page_get_title (_tmp13_);
		_tmp15_ = _tmp14_;
		gtk_button_set_label (_tmp12_, _tmp15_);
	} else {
		GtkButton* _tmp16_;
		_tmp16_ = _data11_->navigation_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp16_, FALSE);
	}
	_tmp17_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp18_ = g_object_bind_property_with_closures ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, AUDIENCE_TYPE_WINDOW, AudienceWindow), "fullscreened", (GObject*) self, "fullscreened", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	self->priv->binding = _tmp18_;
	_g_object_unref0 (previous_page);
	_g_object_unref0 (navigation_view);
	_g_object_unref0 (current_page);
}

static void
__audience_header_bar___lambda28__gtk_widget_map (GtkWidget* _sender,
                                                  gpointer self)
{
	_audience_header_bar___lambda28_ (self);
}

static void
_audience_header_bar___lambda29_ (AudienceHeaderBar* self)
{
	GBinding* _tmp0_;
	GBinding* _tmp1_;
	_tmp0_ = self->priv->binding;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	g_binding_unbind (_tmp1_);
}

static void
__audience_header_bar___lambda29__gtk_widget_unmap (GtkWidget* _sender,
                                                    gpointer self)
{
	_audience_header_bar___lambda29_ ((AudienceHeaderBar*) self);
}

static void
_audience_header_bar___lambda30_ (AudienceHeaderBar* self)
{
	GtkRoot* _tmp0_;
	_tmp0_ = gtk_widget_get_root ((GtkWidget*) self);
	gtk_window_unfullscreen ((GtkWindow*) G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, AUDIENCE_TYPE_WINDOW, AudienceWindow));
}

static void
__audience_header_bar___lambda30__gtk_button_clicked (GtkButton* _sender,
                                                      gpointer self)
{
	_audience_header_bar___lambda30_ ((AudienceHeaderBar*) self);
}

static GObject *
audience_header_bar_constructor (GType type,
                                 guint n_construct_properties,
                                 GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	AudienceHeaderBar * self;
	Block11Data* _data11_;
	gchar* _tmp0_;
	GtkButton* _tmp1_ = NULL;
	GtkButton* _tmp2_;
	GtkStyleContext* _tmp3_;
	gchar* _tmp4_;
	GtkButton* _tmp5_ = NULL;
	GtkLabel* _tmp6_;
	GtkLabel* _tmp7_;
	GtkLabel* _tmp8_;
	GtkWidget* _tmp9_;
	GtkHeaderBar* _tmp10_ = NULL;
	GtkHeaderBar* _tmp11_;
	GtkHeaderBar* _tmp12_;
	GtkButton* _tmp13_;
	GtkHeaderBar* _tmp14_;
	GtkButton* _tmp15_;
	GtkHeaderBar* _tmp16_;
	GtkHeaderBar* _tmp17_;
	GtkButton* _tmp18_;
	parent_class = G_OBJECT_CLASS (audience_header_bar_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, AUDIENCE_TYPE_HEADER_BAR, AudienceHeaderBar);
	_data11_ = g_slice_new0 (Block11Data);
	_data11_->_ref_count_ = 1;
	_data11_->self = g_object_ref (self);
	_tmp0_ = g_strdup (AUDIENCE_WINDOW_ACTION_PREFIX AUDIENCE_WINDOW_ACTION_BACK);
	_tmp1_ = (GtkButton*) gtk_button_new_with_label ("");
	gtk_actionable_set_action_name ((GtkActionable*) _tmp1_, _tmp0_);
	_g_free0 (_tmp0_);
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp1_);
	_data11_->navigation_button = _tmp1_;
	_tmp2_ = _data11_->navigation_button;
	_tmp3_ = gtk_widget_get_style_context ((GtkWidget*) _tmp2_);
	gtk_style_context_add_class (_tmp3_, GRANITE_STYLE_CLASS_BACK_BUTTON);
	_tmp4_ = g_strdup (_ ("Unfullscreen"));
	_tmp5_ = (GtkButton*) gtk_button_new_from_icon_name ("view-restore-symbolic");
	gtk_widget_set_visible ((GtkWidget*) _tmp5_, FALSE);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp5_, _tmp4_);
	_g_free0 (_tmp4_);
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->unfullscreen_button);
	self->priv->unfullscreen_button = _tmp5_;
	_tmp6_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp6_);
	_data11_->title_label = _tmp6_;
	_tmp7_ = _data11_->title_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp7_, GRANITE_STYLE_CLASS_TITLE_LABEL);
	_tmp8_ = _data11_->title_label;
	_tmp9_ = _g_object_ref0 ((GtkWidget*) _tmp8_);
	_tmp10_ = (GtkHeaderBar*) gtk_header_bar_new ();
	gtk_header_bar_set_show_title_buttons (_tmp10_, TRUE);
	gtk_header_bar_set_title_widget (_tmp10_, _tmp9_);
	_g_object_unref0 (_tmp9_);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp10_, TRUE);
	g_object_ref_sink (_tmp10_);
	_tmp11_ = _tmp10_;
	audience_header_bar_set_header_bar (self, _tmp11_);
	_g_object_unref0 (_tmp11_);
	_tmp12_ = self->priv->_header_bar;
	_tmp13_ = _data11_->navigation_button;
	gtk_header_bar_pack_start (_tmp12_, (GtkWidget*) _tmp13_);
	_tmp14_ = self->priv->_header_bar;
	_tmp15_ = self->priv->unfullscreen_button;
	gtk_header_bar_pack_end (_tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = self->priv->_header_bar;
	gtk_widget_add_css_class ((GtkWidget*) _tmp16_, GRANITE_STYLE_CLASS_FLAT);
	_tmp17_ = self->priv->_header_bar;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp17_);
	g_signal_connect_data ((GtkWidget*) self, "map", (GCallback) __audience_header_bar___lambda28__gtk_widget_map, block11_data_ref (_data11_), (GClosureNotify) block11_data_unref, 0);
	g_signal_connect_object ((GtkWidget*) self, "unmap", (GCallback) __audience_header_bar___lambda29__gtk_widget_unmap, self, 0);
	_tmp18_ = self->priv->unfullscreen_button;
	g_signal_connect_object (_tmp18_, "clicked", (GCallback) __audience_header_bar___lambda30__gtk_button_clicked, self, 0);
	block11_data_unref (_data11_);
	_data11_ = NULL;
	return obj;
}

static void
audience_header_bar_class_init (AudienceHeaderBarClass * klass,
                                gpointer klass_data)
{
	audience_header_bar_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AudienceHeaderBar_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_audience_header_bar_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_audience_header_bar_set_property;
	G_OBJECT_CLASS (klass)->constructor = audience_header_bar_constructor;
	G_OBJECT_CLASS (klass)->finalize = audience_header_bar_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), AUDIENCE_HEADER_BAR_FULLSCREENED_PROPERTY, audience_header_bar_properties[AUDIENCE_HEADER_BAR_FULLSCREENED_PROPERTY] = g_param_spec_boolean ("fullscreened", "fullscreened", "fullscreened", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), AUDIENCE_HEADER_BAR_HEADER_BAR_PROPERTY, audience_header_bar_properties[AUDIENCE_HEADER_BAR_HEADER_BAR_PROPERTY] = g_param_spec_object ("header-bar", "header-bar", "header-bar", gtk_header_bar_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
audience_header_bar_instance_init (AudienceHeaderBar * self,
                                   gpointer klass)
{
	self->priv = audience_header_bar_get_instance_private (self);
}

static void
audience_header_bar_finalize (GObject * obj)
{
	AudienceHeaderBar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, AUDIENCE_TYPE_HEADER_BAR, AudienceHeaderBar);
	_g_object_unref0 (self->priv->_header_bar);
	_g_object_unref0 (self->priv->unfullscreen_button);
	G_OBJECT_CLASS (audience_header_bar_parent_class)->finalize (obj);
}

static GType
audience_header_bar_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AudienceHeaderBarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) audience_header_bar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AudienceHeaderBar), 0, (GInstanceInitFunc) audience_header_bar_instance_init, NULL };
	GType audience_header_bar_type_id;
	audience_header_bar_type_id = g_type_register_static (gtk_box_get_type (), "AudienceHeaderBar", &g_define_type_info, 0);
	AudienceHeaderBar_private_offset = g_type_add_instance_private (audience_header_bar_type_id, sizeof (AudienceHeaderBarPrivate));
	return audience_header_bar_type_id;
}

GType
audience_header_bar_get_type (void)
{
	static volatile gsize audience_header_bar_type_id__once = 0;
	if (g_once_init_enter (&audience_header_bar_type_id__once)) {
		GType audience_header_bar_type_id;
		audience_header_bar_type_id = audience_header_bar_get_type_once ();
		g_once_init_leave (&audience_header_bar_type_id__once, audience_header_bar_type_id);
	}
	return audience_header_bar_type_id__once;
}

static void
_vala_audience_header_bar_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	AudienceHeaderBar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, AUDIENCE_TYPE_HEADER_BAR, AudienceHeaderBar);
	switch (property_id) {
		case AUDIENCE_HEADER_BAR_HEADER_BAR_PROPERTY:
		g_value_set_object (value, audience_header_bar_get_header_bar (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_audience_header_bar_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	AudienceHeaderBar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, AUDIENCE_TYPE_HEADER_BAR, AudienceHeaderBar);
	switch (property_id) {
		case AUDIENCE_HEADER_BAR_FULLSCREENED_PROPERTY:
		audience_header_bar_set_fullscreened (self, g_value_get_boolean (value));
		break;
		case AUDIENCE_HEADER_BAR_HEADER_BAR_PROPERTY:
		audience_header_bar_set_header_bar (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

