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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <pango/pango.h>
#include "libdino.h"
#include <gio/gio.h>
#include "dino_i18n.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 DINO_UI_TYPE_PARTICIPANT_WIDGET (dino_ui_participant_widget_get_type ())
#define DINO_UI_PARTICIPANT_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_PARTICIPANT_WIDGET, DinoUiParticipantWidget))
#define DINO_UI_PARTICIPANT_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_PARTICIPANT_WIDGET, DinoUiParticipantWidgetClass))
#define DINO_UI_IS_PARTICIPANT_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_PARTICIPANT_WIDGET))
#define DINO_UI_IS_PARTICIPANT_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_PARTICIPANT_WIDGET))
#define DINO_UI_PARTICIPANT_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_PARTICIPANT_WIDGET, DinoUiParticipantWidgetClass))

typedef struct _DinoUiParticipantWidget DinoUiParticipantWidget;
typedef struct _DinoUiParticipantWidgetClass DinoUiParticipantWidgetClass;
typedef struct _DinoUiParticipantWidgetPrivate DinoUiParticipantWidgetPrivate;

#define DINO_UI_TYPE_CALL_ENCRYPTION_BUTTON_CONTROLLER (dino_ui_call_encryption_button_controller_get_type ())
#define DINO_UI_CALL_ENCRYPTION_BUTTON_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CALL_ENCRYPTION_BUTTON_CONTROLLER, DinoUiCallEncryptionButtonController))
#define DINO_UI_CALL_ENCRYPTION_BUTTON_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CALL_ENCRYPTION_BUTTON_CONTROLLER, DinoUiCallEncryptionButtonControllerClass))
#define DINO_UI_IS_CALL_ENCRYPTION_BUTTON_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CALL_ENCRYPTION_BUTTON_CONTROLLER))
#define DINO_UI_IS_CALL_ENCRYPTION_BUTTON_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CALL_ENCRYPTION_BUTTON_CONTROLLER))
#define DINO_UI_CALL_ENCRYPTION_BUTTON_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CALL_ENCRYPTION_BUTTON_CONTROLLER, DinoUiCallEncryptionButtonControllerClass))

typedef struct _DinoUiCallEncryptionButtonController DinoUiCallEncryptionButtonController;
typedef struct _DinoUiCallEncryptionButtonControllerClass DinoUiCallEncryptionButtonControllerClass;
enum  {
	DINO_UI_PARTICIPANT_WIDGET_0_PROPERTY,
	DINO_UI_PARTICIPANT_WIDGET_CONTROLS_ACTIVE_PROPERTY,
	DINO_UI_PARTICIPANT_WIDGET_MAY_SHOW_INVITE_BUTTON_PROPERTY,
	DINO_UI_PARTICIPANT_WIDGET_NUM_PROPERTIES
};
static GParamSpec* dino_ui_participant_widget_properties[DINO_UI_PARTICIPANT_WIDGET_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _pango_attr_list_unref0(var) ((var == NULL) ? NULL : (var = (pango_attr_list_unref (var), NULL)))

#define DINO_UI_TYPE_AVATAR_PICTURE (dino_ui_avatar_picture_get_type ())
#define DINO_UI_AVATAR_PICTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPicture))
#define DINO_UI_AVATAR_PICTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPictureClass))
#define DINO_UI_IS_AVATAR_PICTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_AVATAR_PICTURE))
#define DINO_UI_IS_AVATAR_PICTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_AVATAR_PICTURE))
#define DINO_UI_AVATAR_PICTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPictureClass))

typedef struct _DinoUiAvatarPicture DinoUiAvatarPicture;
typedef struct _DinoUiAvatarPictureClass DinoUiAvatarPictureClass;

#define DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL (dino_ui_view_model_avatar_picture_model_get_type ())
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModel))
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModelClass))
#define DINO_UI_VIEW_MODEL_IS_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_IS_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModelClass))

typedef struct _DinoUiViewModelAvatarPictureModel DinoUiViewModelAvatarPictureModel;
typedef struct _DinoUiViewModelAvatarPictureModelClass DinoUiViewModelAvatarPictureModelClass;

#define DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL (dino_ui_view_model_compat_avatar_picture_model_get_type ())
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModel))
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModelClass))
#define DINO_UI_VIEW_MODEL_IS_COMPAT_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_IS_COMPAT_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModelClass))

typedef struct _DinoUiViewModelCompatAvatarPictureModel DinoUiViewModelCompatAvatarPictureModel;
typedef struct _DinoUiViewModelCompatAvatarPictureModelClass DinoUiViewModelCompatAvatarPictureModelClass;
enum  {
	DINO_UI_PARTICIPANT_WIDGET_DEBUG_INFORMATION_CLICKED_SIGNAL,
	DINO_UI_PARTICIPANT_WIDGET_INVITE_BUTTON_CLICKED_SIGNAL,
	DINO_UI_PARTICIPANT_WIDGET_NUM_SIGNALS
};
static guint dino_ui_participant_widget_signals[DINO_UI_PARTICIPANT_WIDGET_NUM_SIGNALS] = {0};

struct _DinoUiParticipantWidget {
	GtkBox parent_instance;
	DinoUiParticipantWidgetPrivate * priv;
	GtkOverlay* overlay;
	GtkWidget* main_widget;
	GtkHeaderBar* header_bar;
	GtkLabel* title_label;
	GtkLabel* subtitle_label;
	GtkBox* inner_box;
	GtkBox* title_box;
	GtkMenuButton* encryption_button;
	DinoUiCallEncryptionButtonController* encryption_button_controller;
	GtkMenuButton* menu_button;
	GtkButton* invite_button;
	gboolean shows_video;
	gchar* participant_name;
};

struct _DinoUiParticipantWidgetClass {
	GtkBoxClass parent_class;
};

struct _DinoUiParticipantWidgetPrivate {
	gboolean is_highest_row;
	gboolean is_start_row;
	gboolean _controls_active;
	gboolean _may_show_invite_button;
};

static gint DinoUiParticipantWidget_private_offset;
static gpointer dino_ui_participant_widget_parent_class = NULL;

VALA_EXTERN GType dino_ui_participant_widget_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiParticipantWidget, g_object_unref)
VALA_EXTERN GType dino_ui_call_encryption_button_controller_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiCallEncryptionButtonController, g_object_unref)
VALA_EXTERN DinoUiParticipantWidget* dino_ui_participant_widget_new (const gchar* participant_name);
VALA_EXTERN DinoUiParticipantWidget* dino_ui_participant_widget_construct (GType object_type,
                                                               const gchar* participant_name);
VALA_EXTERN DinoUiCallEncryptionButtonController* dino_ui_call_encryption_button_controller_new (GtkMenuButton* button);
VALA_EXTERN DinoUiCallEncryptionButtonController* dino_ui_call_encryption_button_controller_construct (GType object_type,
                                                                                           GtkMenuButton* button);
static void dino_ui_participant_widget_create_menu (DinoUiParticipantWidget* self);
static void __lambda49_ (DinoUiParticipantWidget* self);
static void ___lambda49__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void dino_ui_participant_widget_reveal_or_hide_controls (DinoUiParticipantWidget* self);
static void _dino_ui_participant_widget_reveal_or_hide_controls_g_object_notify (GObject* _sender,
                                                                          GParamSpec* pspec,
                                                                          gpointer self);
VALA_EXTERN void dino_ui_participant_widget_on_row_changed (DinoUiParticipantWidget* self,
                                                gboolean is_highest,
                                                gboolean is_lowest,
                                                gboolean is_start,
                                                gboolean is_end);
VALA_EXTERN void dino_ui_participant_widget_set_video (DinoUiParticipantWidget* self,
                                           GtkWidget* widget);
static void dino_ui_participant_widget_set_participant_widget (DinoUiParticipantWidget* self,
                                                        GtkWidget* widget);
VALA_EXTERN void dino_ui_participant_widget_set_placeholder (DinoUiParticipantWidget* self,
                                                 DinoEntitiesConversation* conversation,
                                                 DinoStreamInteractor* stream_interactor);
VALA_EXTERN GType dino_ui_avatar_picture_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiAvatarPicture, g_object_unref)
VALA_EXTERN DinoUiAvatarPicture* dino_ui_avatar_picture_new (void);
VALA_EXTERN DinoUiAvatarPicture* dino_ui_avatar_picture_construct (GType object_type);
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_construct (GType object_type,
                                                                                                   DinoStreamInteractor* stream_interactor);
VALA_EXTERN GType dino_ui_view_model_avatar_picture_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelAvatarPictureModel, g_object_unref)
VALA_EXTERN GType dino_ui_view_model_compat_avatar_picture_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelCompatAvatarPictureModel, g_object_unref)
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_set_conversation (DinoUiViewModelCompatAvatarPictureModel* self,
                                                                                                          DinoEntitiesConversation* conversation);
VALA_EXTERN void dino_ui_avatar_picture_set_model (DinoUiAvatarPicture* self,
                                       DinoUiViewModelAvatarPictureModel* value);
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_add (DinoUiViewModelCompatAvatarPictureModel* self,
                                                                                             const gchar* display,
                                                                                             const gchar* color_id,
                                                                                             GFile* image_file);
VALA_EXTERN void dino_ui_participant_widget_set_status (DinoUiParticipantWidget* self,
                                            const gchar* state);
VALA_EXTERN gboolean dino_ui_participant_widget_is_menu_active (DinoUiParticipantWidget* self);
VALA_EXTERN gboolean dino_ui_participant_widget_get_controls_active (DinoUiParticipantWidget* self);
VALA_EXTERN gboolean dino_ui_participant_widget_get_may_show_invite_button (DinoUiParticipantWidget* self);
static void dino_ui_participant_widget_real_dispose (GObject* base);
VALA_EXTERN void dino_ui_participant_widget_set_controls_active (DinoUiParticipantWidget* self,
                                                     gboolean value);
VALA_EXTERN void dino_ui_participant_widget_set_may_show_invite_button (DinoUiParticipantWidget* self,
                                                            gboolean value);
static void _dino_ui_participant_widget___lambda50_ (GtkWidget* widget,
                                              const gchar* action_name);
static void __dino_ui_participant_widget___lambda50__gtk_widget_action_activate_func (GtkWidget* widget,
                                                                               const gchar* action_name,
                                                                               GVariant* parameter);
static void dino_ui_participant_widget_finalize (GObject * obj);
static GType dino_ui_participant_widget_get_type_once (void);
static void _vala_dino_ui_participant_widget_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);
static void _vala_dino_ui_participant_widget_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dino_ui_participant_widget_get_instance_private (DinoUiParticipantWidget* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiParticipantWidget_private_offset);
}

static void
__lambda49_ (DinoUiParticipantWidget* self)
{
	g_signal_emit (self, dino_ui_participant_widget_signals[DINO_UI_PARTICIPANT_WIDGET_INVITE_BUTTON_CLICKED_SIGNAL], 0);
}

static void
___lambda49__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda49_ ((DinoUiParticipantWidget*) self);
}

static void
_dino_ui_participant_widget_reveal_or_hide_controls_g_object_notify (GObject* _sender,
                                                                     GParamSpec* pspec,
                                                                     gpointer self)
{
	dino_ui_participant_widget_reveal_or_hide_controls ((DinoUiParticipantWidget*) self);
}

DinoUiParticipantWidget*
dino_ui_participant_widget_construct (GType object_type,
                                      const gchar* participant_name)
{
	DinoUiParticipantWidget * self = NULL;
	GtkMenuButton* _tmp0_;
	DinoUiCallEncryptionButtonController* _tmp1_;
	gchar* _tmp2_;
	GtkBox* titles_box = NULL;
	GtkBox* _tmp3_ = NULL;
	GtkLabel* _tmp4_;
	PangoAttrList* _tmp5_;
	PangoAttrList* _tmp6_;
	GtkLabel* _tmp7_;
	PangoAttrList* _tmp8_;
	PangoAttrList* _tmp9_;
	PangoAttribute* _tmp10_;
	GtkLabel* _tmp11_;
	GtkLabel* _tmp12_;
	PangoAttrList* _tmp13_;
	PangoAttrList* _tmp14_;
	GtkLabel* _tmp15_;
	PangoAttrList* _tmp16_;
	PangoAttrList* _tmp17_;
	PangoAttribute* _tmp18_;
	GtkLabel* _tmp19_;
	GtkLabel* _tmp20_;
	GtkHeaderBar* _tmp21_;
	GtkLabel* _tmp22_;
	GtkHeaderBar* _tmp23_;
	GtkHeaderBar* _tmp24_;
	GtkButton* _tmp25_;
	GtkHeaderBar* _tmp26_;
	GtkMenuButton* _tmp27_;
	GtkHeaderBar* _tmp28_;
	GtkMenuButton* _tmp29_;
	GtkButton* _tmp30_;
	GtkOverlay* _tmp31_;
	GtkOverlay* _tmp32_;
	GtkHeaderBar* _tmp33_;
	g_return_val_if_fail (participant_name != NULL, NULL);
	self = (DinoUiParticipantWidget*) g_object_new (object_type, NULL);
	_tmp0_ = self->encryption_button;
	_tmp1_ = dino_ui_call_encryption_button_controller_new (_tmp0_);
	_g_object_unref0 (self->encryption_button_controller);
	self->encryption_button_controller = _tmp1_;
	_tmp2_ = g_strdup (participant_name);
	_g_free0 (self->participant_name);
	self->participant_name = _tmp2_;
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_valign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp3_);
	titles_box = _tmp3_;
	gtk_widget_add_css_class ((GtkWidget*) titles_box, "titles");
	_tmp4_ = self->title_label;
	_tmp5_ = pango_attr_list_new ();
	_tmp6_ = _tmp5_;
	gtk_label_set_attributes (_tmp4_, _tmp6_);
	_pango_attr_list_unref0 (_tmp6_);
	_tmp7_ = self->title_label;
	_tmp8_ = gtk_label_get_attributes (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
	pango_attr_list_insert (_tmp9_, _tmp10_);
	_tmp11_ = self->title_label;
	gtk_box_append (titles_box, (GtkWidget*) _tmp11_);
	_tmp12_ = self->subtitle_label;
	_tmp13_ = pango_attr_list_new ();
	_tmp14_ = _tmp13_;
	gtk_label_set_attributes (_tmp12_, _tmp14_);
	_pango_attr_list_unref0 (_tmp14_);
	_tmp15_ = self->subtitle_label;
	_tmp16_ = gtk_label_get_attributes (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = pango_attr_scale_new (PANGO_SCALE_SMALL);
	pango_attr_list_insert (_tmp17_, _tmp18_);
	_tmp19_ = self->subtitle_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp19_, "dim-label");
	_tmp20_ = self->subtitle_label;
	gtk_box_append (titles_box, (GtkWidget*) _tmp20_);
	_tmp21_ = self->header_bar;
	gtk_header_bar_set_title_widget (_tmp21_, (GtkWidget*) titles_box);
	_tmp22_ = self->title_label;
	gtk_label_set_label (_tmp22_, participant_name);
	_tmp23_ = self->header_bar;
	gtk_widget_add_css_class ((GtkWidget*) _tmp23_, "participant-header-bar");
	_tmp24_ = self->header_bar;
	_tmp25_ = self->invite_button;
	gtk_header_bar_pack_start (_tmp24_, (GtkWidget*) _tmp25_);
	_tmp26_ = self->header_bar;
	_tmp27_ = self->encryption_button;
	gtk_header_bar_pack_start (_tmp26_, (GtkWidget*) _tmp27_);
	_tmp28_ = self->header_bar;
	_tmp29_ = self->menu_button;
	gtk_header_bar_pack_end (_tmp28_, (GtkWidget*) _tmp29_);
	dino_ui_participant_widget_create_menu (self);
	_tmp30_ = self->invite_button;
	g_signal_connect_object (_tmp30_, "clicked", (GCallback) ___lambda49__gtk_button_clicked, self, 0);
	_tmp31_ = self->overlay;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp31_);
	_tmp32_ = self->overlay;
	_tmp33_ = self->header_bar;
	gtk_overlay_add_overlay (_tmp32_, (GtkWidget*) _tmp33_);
	g_signal_connect_object ((GObject*) self, "notify::controls-active", (GCallback) _dino_ui_participant_widget_reveal_or_hide_controls_g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) self, "notify::may-show-invite-button", (GCallback) _dino_ui_participant_widget_reveal_or_hide_controls_g_object_notify, self, 0);
	_g_object_unref0 (titles_box);
	return self;
}

DinoUiParticipantWidget*
dino_ui_participant_widget_new (const gchar* participant_name)
{
	return dino_ui_participant_widget_construct (DINO_UI_TYPE_PARTICIPANT_WIDGET, participant_name);
}

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

void
dino_ui_participant_widget_on_row_changed (DinoUiParticipantWidget* self,
                                           gboolean is_highest,
                                           gboolean is_lowest,
                                           gboolean is_start,
                                           gboolean is_end)
{
	GtkHeaderBar* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->is_highest_row = is_highest;
	self->priv->is_start_row = is_start;
	_tmp0_ = self->header_bar;
	gtk_header_bar_set_show_title_buttons (_tmp0_, self->priv->is_highest_row);
	if (self->priv->is_highest_row) {
		GtkSettings* gtk_settings = NULL;
		GtkSettings* _tmp1_;
		GtkSettings* _tmp2_;
		GtkSettings* _tmp3_;
		_tmp1_ = gtk_settings_get_default ();
		_tmp2_ = _g_object_ref0 (_tmp1_);
		gtk_settings = _tmp2_;
		_tmp3_ = gtk_settings;
		if (_tmp3_ != NULL) {
			gchar** buttons = NULL;
			GtkSettings* _tmp4_;
			gchar* _tmp5_;
			gchar* _tmp6_;
			gchar* _tmp7_;
			gchar** _tmp8_;
			gchar** _tmp9_;
			gchar** _tmp10_;
			gint _tmp10__length1;
			gint buttons_length1;
			gint _buttons_size_;
			const gchar* _tmp11_ = NULL;
			const gchar* _tmp14_ = NULL;
			gboolean _tmp15_ = FALSE;
			GtkHeaderBar* _tmp19_;
			gchar* _tmp20_;
			gchar* _tmp21_;
			gchar* _tmp22_;
			gchar* _tmp23_;
			_tmp4_ = gtk_settings;
			g_object_get (_tmp4_, "gtk-decoration-layout", &_tmp5_, NULL);
			_tmp6_ = _tmp5_;
			_tmp7_ = _tmp6_;
			_tmp9_ = _tmp8_ = g_strsplit (_tmp7_, ":", 0);
			_tmp10_ = _tmp9_;
			_tmp10__length1 = _vala_array_length (_tmp8_);
			_g_free0 (_tmp7_);
			buttons = _tmp10_;
			buttons_length1 = _tmp10__length1;
			_buttons_size_ = buttons_length1;
			if (is_start) {
				gchar** _tmp12_;
				gint _tmp12__length1;
				const gchar* _tmp13_;
				_tmp12_ = buttons;
				_tmp12__length1 = buttons_length1;
				_tmp13_ = _tmp12_[0];
				_tmp11_ = _tmp13_;
			} else {
				_tmp11_ = "";
			}
			if (is_end) {
				gchar** _tmp16_;
				gint _tmp16__length1;
				_tmp16_ = buttons;
				_tmp16__length1 = buttons_length1;
				_tmp15_ = _tmp16__length1 == 2;
			} else {
				_tmp15_ = FALSE;
			}
			if (_tmp15_) {
				gchar** _tmp17_;
				gint _tmp17__length1;
				const gchar* _tmp18_;
				_tmp17_ = buttons;
				_tmp17__length1 = buttons_length1;
				_tmp18_ = _tmp17_[1];
				_tmp14_ = _tmp18_;
			} else {
				_tmp14_ = "";
			}
			_tmp19_ = self->header_bar;
			_tmp20_ = g_strconcat (_tmp11_, ":", NULL);
			_tmp21_ = _tmp20_;
			_tmp22_ = g_strconcat (_tmp21_, _tmp14_, NULL);
			_tmp23_ = _tmp22_;
			gtk_header_bar_set_decoration_layout (_tmp19_, _tmp23_);
			_g_free0 (_tmp23_);
			_g_free0 (_tmp21_);
			buttons = (_vala_array_free (buttons, buttons_length1, (GDestroyNotify) g_free), NULL);
		}
		_g_object_unref0 (gtk_settings);
	}
	dino_ui_participant_widget_reveal_or_hide_controls (self);
}

void
dino_ui_participant_widget_set_video (DinoUiParticipantWidget* self,
                                      GtkWidget* widget)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	self->shows_video = TRUE;
	gtk_widget_set_visible (widget, TRUE);
	dino_ui_participant_widget_set_participant_widget (self, widget);
}

void
dino_ui_participant_widget_set_placeholder (DinoUiParticipantWidget* self,
                                            DinoEntitiesConversation* conversation,
                                            DinoStreamInteractor* stream_interactor)
{
	GtkBox* box = NULL;
	GtkBox* _tmp0_;
	GtkBox* _tmp1_;
	DinoUiAvatarPicture* avatar = NULL;
	DinoUiAvatarPicture* _tmp2_ = NULL;
	GtkBox* _tmp13_;
	DinoUiAvatarPicture* _tmp14_;
	GtkBox* _tmp15_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream_interactor != NULL);
	self->shows_video = FALSE;
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp0_);
	box = _tmp0_;
	_tmp1_ = box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp1_, "video-placeholder-box");
	_tmp2_ = dino_ui_avatar_picture_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp2_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp2_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp2_, GTK_ALIGN_CENTER);
	gtk_widget_set_valign ((GtkWidget*) _tmp2_, GTK_ALIGN_CENTER);
	g_object_set ((GtkWidget*) _tmp2_, "height-request", 100, NULL);
	g_object_set ((GtkWidget*) _tmp2_, "width-request", 100, NULL);
	g_object_ref_sink (_tmp2_);
	avatar = _tmp2_;
	if (conversation != NULL) {
		DinoUiAvatarPicture* _tmp3_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp4_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp5_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp6_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp7_;
		_tmp3_ = avatar;
		_tmp4_ = dino_ui_view_model_compat_avatar_picture_model_new (stream_interactor);
		_tmp5_ = _tmp4_;
		_tmp6_ = dino_ui_view_model_compat_avatar_picture_model_set_conversation (_tmp5_, conversation);
		_tmp7_ = _tmp6_;
		dino_ui_avatar_picture_set_model (_tmp3_, (DinoUiViewModelAvatarPictureModel*) _tmp7_);
		_g_object_unref0 (_tmp7_);
		_g_object_unref0 (_tmp5_);
	} else {
		DinoUiAvatarPicture* _tmp8_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp9_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp10_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp11_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp12_;
		_tmp8_ = avatar;
		_tmp9_ = dino_ui_view_model_compat_avatar_picture_model_new (stream_interactor);
		_tmp10_ = _tmp9_;
		_tmp11_ = dino_ui_view_model_compat_avatar_picture_model_add (_tmp10_, "?", NULL, NULL);
		_tmp12_ = _tmp11_;
		dino_ui_avatar_picture_set_model (_tmp8_, (DinoUiViewModelAvatarPictureModel*) _tmp12_);
		_g_object_unref0 (_tmp12_);
		_g_object_unref0 (_tmp10_);
	}
	_tmp13_ = box;
	_tmp14_ = avatar;
	gtk_box_append (_tmp13_, (GtkWidget*) _tmp14_);
	_tmp15_ = box;
	dino_ui_participant_widget_set_participant_widget (self, (GtkWidget*) _tmp15_);
	_g_object_unref0 (avatar);
	_g_object_unref0 (box);
}

static void
dino_ui_participant_widget_set_participant_widget (DinoUiParticipantWidget* self,
                                                   GtkWidget* widget)
{
	GtkWidget* _tmp0_;
	GtkOverlay* _tmp1_;
	GtkWidget* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	gtk_widget_set_vexpand (widget, TRUE);
	gtk_widget_set_hexpand (widget, TRUE);
	_tmp0_ = _g_object_ref0 (widget);
	_g_object_unref0 (self->main_widget);
	self->main_widget = _tmp0_;
	_tmp1_ = self->overlay;
	_tmp2_ = self->main_widget;
	gtk_overlay_set_child (_tmp1_, _tmp2_);
}

static void
dino_ui_participant_widget_create_menu (DinoUiParticipantWidget* self)
{
	GMenu* menu_model = NULL;
	GMenu* _tmp0_;
	const gchar* _tmp1_;
	GtkPopoverMenu* popover_menu = NULL;
	GtkPopoverMenu* _tmp2_;
	GtkMenuButton* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_menu_new ();
	menu_model = _tmp0_;
	_tmp1_ = dino_gettext ("Debug information");
	g_menu_append (menu_model, _tmp1_, "menu.debuginfo");
	_tmp2_ = (GtkPopoverMenu*) gtk_popover_menu_new_from_model ((GMenuModel*) menu_model);
	g_object_ref_sink (_tmp2_);
	popover_menu = _tmp2_;
	_tmp3_ = self->menu_button;
	gtk_menu_button_set_popover (_tmp3_, (GtkPopover*) popover_menu);
	_g_object_unref0 (popover_menu);
	_g_object_unref0 (menu_model);
}

void
dino_ui_participant_widget_set_status (DinoUiParticipantWidget* self,
                                       const gchar* state)
{
	GtkLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (state != NULL);
	_tmp0_ = self->subtitle_label;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, TRUE);
	if (g_strcmp0 (state, "requested") == 0) {
		GtkLabel* _tmp1_;
		const gchar* _tmp2_;
		_tmp1_ = self->subtitle_label;
		_tmp2_ = dino_gettext ("Calling…");
		gtk_label_set_label (_tmp1_, _tmp2_);
	} else {
		if (g_strcmp0 (state, "ringing") == 0) {
			GtkLabel* _tmp3_;
			const gchar* _tmp4_;
			_tmp3_ = self->subtitle_label;
			_tmp4_ = dino_gettext ("Ringing…");
			gtk_label_set_label (_tmp3_, _tmp4_);
		} else {
			if (g_strcmp0 (state, "establishing") == 0) {
				GtkLabel* _tmp5_;
				const gchar* _tmp6_;
				_tmp5_ = self->subtitle_label;
				_tmp6_ = dino_gettext ("Connecting…");
				gtk_label_set_label (_tmp5_, _tmp6_);
			} else {
				GtkLabel* _tmp7_;
				_tmp7_ = self->subtitle_label;
				gtk_widget_set_visible ((GtkWidget*) _tmp7_, FALSE);
			}
		}
	}
}

gboolean
dino_ui_participant_widget_is_menu_active (DinoUiParticipantWidget* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = FALSE;
	return result;
}

static void
dino_ui_participant_widget_reveal_or_hide_controls (DinoUiParticipantWidget* self)
{
	gdouble _tmp0_ = 0.0;
	gboolean _tmp1_;
	GtkHeaderBar* _tmp2_;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_;
	GtkButton* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_controls_active;
	if (_tmp1_) {
		_tmp0_ = 1.0;
	} else {
		_tmp0_ = 0.0;
	}
	_tmp2_ = self->header_bar;
	gtk_widget_set_opacity ((GtkWidget*) _tmp2_, _tmp0_);
	_tmp5_ = self->priv->_may_show_invite_button;
	if (_tmp5_) {
		_tmp4_ = self->priv->is_highest_row;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		_tmp3_ = self->priv->is_start_row;
	} else {
		_tmp3_ = FALSE;
	}
	_tmp6_ = self->invite_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp6_, _tmp3_);
}

static void
dino_ui_participant_widget_real_dispose (GObject* base)
{
	DinoUiParticipantWidget * self;
	self = (DinoUiParticipantWidget*) base;
	_g_object_unref0 (self->main_widget);
	self->main_widget = NULL;
	_g_object_unref0 (self->overlay);
	self->overlay = NULL;
	G_OBJECT_CLASS (dino_ui_participant_widget_parent_class)->dispose ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_box_get_type (), GtkBox));
}

gboolean
dino_ui_participant_widget_get_controls_active (DinoUiParticipantWidget* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_controls_active;
	return result;
}

void
dino_ui_participant_widget_set_controls_active (DinoUiParticipantWidget* self,
                                                gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_participant_widget_get_controls_active (self);
	if (old_value != value) {
		self->priv->_controls_active = value;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_participant_widget_properties[DINO_UI_PARTICIPANT_WIDGET_CONTROLS_ACTIVE_PROPERTY]);
	}
}

gboolean
dino_ui_participant_widget_get_may_show_invite_button (DinoUiParticipantWidget* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_may_show_invite_button;
	return result;
}

void
dino_ui_participant_widget_set_may_show_invite_button (DinoUiParticipantWidget* self,
                                                       gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_participant_widget_get_may_show_invite_button (self);
	if (old_value != value) {
		self->priv->_may_show_invite_button = value;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_participant_widget_properties[DINO_UI_PARTICIPANT_WIDGET_MAY_SHOW_INVITE_BUTTON_PROPERTY]);
	}
}

static void
_dino_ui_participant_widget___lambda50_ (GtkWidget* widget,
                                         const gchar* action_name)
{
	g_return_if_fail (widget != NULL);
	g_return_if_fail (action_name != NULL);
	g_signal_emit (G_TYPE_CHECK_INSTANCE_CAST (widget, DINO_UI_TYPE_PARTICIPANT_WIDGET, DinoUiParticipantWidget), dino_ui_participant_widget_signals[DINO_UI_PARTICIPANT_WIDGET_DEBUG_INFORMATION_CLICKED_SIGNAL], 0);
}

static void
__dino_ui_participant_widget___lambda50__gtk_widget_action_activate_func (GtkWidget* widget,
                                                                          const gchar* action_name,
                                                                          GVariant* parameter)
{
	_dino_ui_participant_widget___lambda50_ (widget, action_name);
}

static void
dino_ui_participant_widget_base_init (DinoUiParticipantWidgetClass * klass)
{
	gtk_widget_class_install_action (GTK_WIDGET_CLASS (klass), "menu.debuginfo", NULL, __dino_ui_participant_widget___lambda50__gtk_widget_action_activate_func);
}

static void
dino_ui_participant_widget_class_init (DinoUiParticipantWidgetClass * klass,
                                       gpointer klass_data)
{
	dino_ui_participant_widget_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiParticipantWidget_private_offset);
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) dino_ui_participant_widget_real_dispose;
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_participant_widget_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dino_ui_participant_widget_set_property;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_participant_widget_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_PARTICIPANT_WIDGET_CONTROLS_ACTIVE_PROPERTY, dino_ui_participant_widget_properties[DINO_UI_PARTICIPANT_WIDGET_CONTROLS_ACTIVE_PROPERTY] = g_param_spec_boolean ("controls-active", "controls-active", "controls-active", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_PARTICIPANT_WIDGET_MAY_SHOW_INVITE_BUTTON_PROPERTY, dino_ui_participant_widget_properties[DINO_UI_PARTICIPANT_WIDGET_MAY_SHOW_INVITE_BUTTON_PROPERTY] = g_param_spec_boolean ("may-show-invite-button", "may-show-invite-button", "may-show-invite-button", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	dino_ui_participant_widget_signals[DINO_UI_PARTICIPANT_WIDGET_DEBUG_INFORMATION_CLICKED_SIGNAL] = g_signal_new ("debug-information-clicked", DINO_UI_TYPE_PARTICIPANT_WIDGET, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	dino_ui_participant_widget_signals[DINO_UI_PARTICIPANT_WIDGET_INVITE_BUTTON_CLICKED_SIGNAL] = g_signal_new ("invite-button-clicked", DINO_UI_TYPE_PARTICIPANT_WIDGET, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
dino_ui_participant_widget_instance_init (DinoUiParticipantWidget * self,
                                          gpointer klass)
{
	GtkOverlay* _tmp0_;
	GtkHeaderBar* _tmp1_ = NULL;
	GtkLabel* _tmp2_;
	GtkLabel* _tmp3_;
	GtkBox* _tmp4_ = NULL;
	GtkBox* _tmp5_ = NULL;
	GtkMenuButton* _tmp6_ = NULL;
	gchar* _tmp7_;
	GtkMenuButton* _tmp8_ = NULL;
	GtkButton* _tmp9_ = NULL;
	self->priv = dino_ui_participant_widget_get_instance_private (self);
	_tmp0_ = (GtkOverlay*) gtk_overlay_new ();
	g_object_ref_sink (_tmp0_);
	self->overlay = _tmp0_;
	_tmp1_ = (GtkHeaderBar*) gtk_header_bar_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp1_);
	self->header_bar = _tmp1_;
	_tmp2_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp2_);
	self->title_label = _tmp2_;
	_tmp3_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp3_);
	self->subtitle_label = _tmp3_;
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp4_, 5);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp4_, 5);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp4_, TRUE);
	g_object_ref_sink (_tmp4_);
	self->inner_box = _tmp4_;
	_tmp5_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_valign ((GtkWidget*) _tmp5_, GTK_ALIGN_CENTER);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp5_, TRUE);
	g_object_ref_sink (_tmp5_);
	self->title_box = _tmp5_;
	_tmp6_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_widget_set_opacity ((GtkWidget*) _tmp6_, (gdouble) 0);
	gtk_menu_button_set_has_frame (_tmp6_, FALSE);
	g_object_set ((GtkWidget*) _tmp6_, "height-request", 30, NULL);
	g_object_set ((GtkWidget*) _tmp6_, "width-request", 30, NULL);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp6_, 5);
	g_object_ref_sink (_tmp6_);
	self->encryption_button = _tmp6_;
	_tmp7_ = g_strdup ("view-more-symbolic");
	_tmp8_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_menu_button_set_icon_name (_tmp8_, _tmp7_);
	_g_free0 (_tmp7_);
	gtk_menu_button_set_has_frame (_tmp8_, FALSE);
	g_object_ref_sink (_tmp8_);
	self->menu_button = _tmp8_;
	_tmp9_ = (GtkButton*) gtk_button_new_from_icon_name ("contact-new-symbolic");
	gtk_button_set_has_frame (_tmp9_, FALSE);
	g_object_ref_sink (_tmp9_);
	self->invite_button = _tmp9_;
	self->shows_video = FALSE;
	self->priv->is_highest_row = FALSE;
	self->priv->is_start_row = FALSE;
}

static void
dino_ui_participant_widget_finalize (GObject * obj)
{
	DinoUiParticipantWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_PARTICIPANT_WIDGET, DinoUiParticipantWidget);
	_g_object_unref0 (self->overlay);
	_g_object_unref0 (self->main_widget);
	_g_object_unref0 (self->header_bar);
	_g_object_unref0 (self->title_label);
	_g_object_unref0 (self->subtitle_label);
	_g_object_unref0 (self->inner_box);
	_g_object_unref0 (self->title_box);
	_g_object_unref0 (self->encryption_button);
	_g_object_unref0 (self->encryption_button_controller);
	_g_object_unref0 (self->menu_button);
	_g_object_unref0 (self->invite_button);
	_g_free0 (self->participant_name);
	G_OBJECT_CLASS (dino_ui_participant_widget_parent_class)->finalize (obj);
}

static GType
dino_ui_participant_widget_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiParticipantWidgetClass), (GBaseInitFunc) dino_ui_participant_widget_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_participant_widget_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiParticipantWidget), 0, (GInstanceInitFunc) dino_ui_participant_widget_instance_init, NULL };
	GType dino_ui_participant_widget_type_id;
	dino_ui_participant_widget_type_id = g_type_register_static (gtk_box_get_type (), "DinoUiParticipantWidget", &g_define_type_info, 0);
	DinoUiParticipantWidget_private_offset = g_type_add_instance_private (dino_ui_participant_widget_type_id, sizeof (DinoUiParticipantWidgetPrivate));
	return dino_ui_participant_widget_type_id;
}

GType
dino_ui_participant_widget_get_type (void)
{
	static volatile gsize dino_ui_participant_widget_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_participant_widget_type_id__once)) {
		GType dino_ui_participant_widget_type_id;
		dino_ui_participant_widget_type_id = dino_ui_participant_widget_get_type_once ();
		g_once_init_leave (&dino_ui_participant_widget_type_id__once, dino_ui_participant_widget_type_id);
	}
	return dino_ui_participant_widget_type_id__once;
}

static void
_vala_dino_ui_participant_widget_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	DinoUiParticipantWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_PARTICIPANT_WIDGET, DinoUiParticipantWidget);
	switch (property_id) {
		case DINO_UI_PARTICIPANT_WIDGET_CONTROLS_ACTIVE_PROPERTY:
		g_value_set_boolean (value, dino_ui_participant_widget_get_controls_active (self));
		break;
		case DINO_UI_PARTICIPANT_WIDGET_MAY_SHOW_INVITE_BUTTON_PROPERTY:
		g_value_set_boolean (value, dino_ui_participant_widget_get_may_show_invite_button (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dino_ui_participant_widget_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec)
{
	DinoUiParticipantWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_PARTICIPANT_WIDGET, DinoUiParticipantWidget);
	switch (property_id) {
		case DINO_UI_PARTICIPANT_WIDGET_CONTROLS_ACTIVE_PROPERTY:
		dino_ui_participant_widget_set_controls_active (self, g_value_get_boolean (value));
		break;
		case DINO_UI_PARTICIPANT_WIDGET_MAY_SHOW_INVITE_BUTTON_PROPERTY:
		dino_ui_participant_widget_set_may_show_invite_button (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

