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

/*-
 * Copyright 2019-2020 elementary, Inc (htts://elementary.io)
 *           2015 Adam Bieńkowski
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA
 *
 * Authored by: Adam Bieńkowski <donadigos159@gmail.com>
 */

#include <granite-7.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.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 PC_CLIENT_TYPE_APP_UNAVAILABLE_DIALOG (pc_client_app_unavailable_dialog_get_type ())
#define PC_CLIENT_APP_UNAVAILABLE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PC_CLIENT_TYPE_APP_UNAVAILABLE_DIALOG, PCClientAppUnavailableDialog))
#define PC_CLIENT_APP_UNAVAILABLE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PC_CLIENT_TYPE_APP_UNAVAILABLE_DIALOG, PCClientAppUnavailableDialogClass))
#define PC_CLIENT_IS_APP_UNAVAILABLE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PC_CLIENT_TYPE_APP_UNAVAILABLE_DIALOG))
#define PC_CLIENT_IS_APP_UNAVAILABLE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PC_CLIENT_TYPE_APP_UNAVAILABLE_DIALOG))
#define PC_CLIENT_APP_UNAVAILABLE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PC_CLIENT_TYPE_APP_UNAVAILABLE_DIALOG, PCClientAppUnavailableDialogClass))

typedef struct _PCClientAppUnavailableDialog PCClientAppUnavailableDialog;
typedef struct _PCClientAppUnavailableDialogClass PCClientAppUnavailableDialogClass;
typedef struct _PCClientAppUnavailableDialogPrivate PCClientAppUnavailableDialogPrivate;
enum  {
	PC_CLIENT_APP_UNAVAILABLE_DIALOG_0_PROPERTY,
	PC_CLIENT_APP_UNAVAILABLE_DIALOG_NUM_PROPERTIES
};
static GParamSpec* pc_client_app_unavailable_dialog_properties[PC_CLIENT_APP_UNAVAILABLE_DIALOG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _PCClientAppUnavailableDialog {
	GraniteMessageDialog parent_instance;
	PCClientAppUnavailableDialogPrivate * priv;
};

struct _PCClientAppUnavailableDialogClass {
	GraniteMessageDialogClass parent_class;
};

static gpointer pc_client_app_unavailable_dialog_parent_class = NULL;

VALA_EXTERN GType pc_client_app_unavailable_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PCClientAppUnavailableDialog, g_object_unref)
VALA_EXTERN PCClientAppUnavailableDialog* pc_client_app_unavailable_dialog_new (void);
VALA_EXTERN PCClientAppUnavailableDialog* pc_client_app_unavailable_dialog_construct (GType object_type);
static GObject * pc_client_app_unavailable_dialog_constructor (GType type,
                                                        guint n_construct_properties,
                                                        GObjectConstructParam * construct_properties);
static void _pc_client_app_unavailable_dialog___lambda4_ (PCClientAppUnavailableDialog* self);
static void __pc_client_app_unavailable_dialog___lambda4__gtk_dialog_response (GtkDialog* _sender,
                                                                        gint response_id,
                                                                        gpointer self);
static GType pc_client_app_unavailable_dialog_get_type_once (void);

PCClientAppUnavailableDialog*
pc_client_app_unavailable_dialog_construct (GType object_type)
{
	PCClientAppUnavailableDialog * self = NULL;
	GThemedIcon* _tmp0_;
	GThemedIcon* _tmp1_;
	_tmp0_ = (GThemedIcon*) g_themed_icon_new ("io.elementary.settings.screentime-limits");
	_tmp1_ = _tmp0_;
	self = (PCClientAppUnavailableDialog*) g_object_new (object_type, "image-icon", _tmp1_, "primary-text", _ ("You are not permitted to run this application"), "secondary-text", _ ("An administrator has restricted your access to this application."), "buttons", GTK_BUTTONS_CLOSE, NULL);
	_g_object_unref0 (_tmp1_);
	return self;
}

PCClientAppUnavailableDialog*
pc_client_app_unavailable_dialog_new (void)
{
	return pc_client_app_unavailable_dialog_construct (PC_CLIENT_TYPE_APP_UNAVAILABLE_DIALOG);
}

static void
_pc_client_app_unavailable_dialog___lambda4_ (PCClientAppUnavailableDialog* self)
{
	gtk_window_destroy ((GtkWindow*) self);
}

static void
__pc_client_app_unavailable_dialog___lambda4__gtk_dialog_response (GtkDialog* _sender,
                                                                   gint response_id,
                                                                   gpointer self)
{
	_pc_client_app_unavailable_dialog___lambda4_ ((PCClientAppUnavailableDialog*) self);
}

static GObject *
pc_client_app_unavailable_dialog_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	PCClientAppUnavailableDialog * self;
	parent_class = G_OBJECT_CLASS (pc_client_app_unavailable_dialog_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PC_CLIENT_TYPE_APP_UNAVAILABLE_DIALOG, PCClientAppUnavailableDialog);
	g_signal_connect_object ((GtkDialog*) self, "response", (GCallback) __pc_client_app_unavailable_dialog___lambda4__gtk_dialog_response, self, 0);
	return obj;
}

static void
pc_client_app_unavailable_dialog_class_init (PCClientAppUnavailableDialogClass * klass,
                                             gpointer klass_data)
{
	pc_client_app_unavailable_dialog_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->constructor = pc_client_app_unavailable_dialog_constructor;
}

static void
pc_client_app_unavailable_dialog_instance_init (PCClientAppUnavailableDialog * self,
                                                gpointer klass)
{
}

static GType
pc_client_app_unavailable_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PCClientAppUnavailableDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pc_client_app_unavailable_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PCClientAppUnavailableDialog), 0, (GInstanceInitFunc) pc_client_app_unavailable_dialog_instance_init, NULL };
	GType pc_client_app_unavailable_dialog_type_id;
	pc_client_app_unavailable_dialog_type_id = g_type_register_static (GRANITE_TYPE_MESSAGE_DIALOG, "PCClientAppUnavailableDialog", &g_define_type_info, 0);
	return pc_client_app_unavailable_dialog_type_id;
}

GType
pc_client_app_unavailable_dialog_get_type (void)
{
	static volatile gsize pc_client_app_unavailable_dialog_type_id__once = 0;
	if (g_once_init_enter (&pc_client_app_unavailable_dialog_type_id__once)) {
		GType pc_client_app_unavailable_dialog_type_id;
		pc_client_app_unavailable_dialog_type_id = pc_client_app_unavailable_dialog_get_type_once ();
		g_once_init_leave (&pc_client_app_unavailable_dialog_type_id__once, pc_client_app_unavailable_dialog_type_id);
	}
	return pc_client_app_unavailable_dialog_type_id__once;
}

