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

/**/
/*  Copyright (C) 2011 Robert Dyer*/
/**/
/*  This file is part of Plank.*/
/**/
/*  Plank 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 3 of the License, or*/
/*  (at your option) any later version.*/
/**/
/*  Plank 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, see <http://www.gnu.org/licenses/>.*/
/**/

#include <plank.h>
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.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 DOCKY_TYPE_TRASH_DOCKLET (docky_trash_docklet_get_type ())
#define DOCKY_TRASH_DOCKLET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DOCKY_TYPE_TRASH_DOCKLET, DockyTrashDocklet))
#define DOCKY_TRASH_DOCKLET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DOCKY_TYPE_TRASH_DOCKLET, DockyTrashDockletClass))
#define DOCKY_IS_TRASH_DOCKLET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DOCKY_TYPE_TRASH_DOCKLET))
#define DOCKY_IS_TRASH_DOCKLET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DOCKY_TYPE_TRASH_DOCKLET))
#define DOCKY_TRASH_DOCKLET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DOCKY_TYPE_TRASH_DOCKLET, DockyTrashDockletClass))

typedef struct _DockyTrashDocklet DockyTrashDocklet;
typedef struct _DockyTrashDockletClass DockyTrashDockletClass;
typedef struct _DockyTrashDockletPrivate DockyTrashDockletPrivate;
enum  {
	DOCKY_TRASH_DOCKLET_0_PROPERTY,
	DOCKY_TRASH_DOCKLET_NUM_PROPERTIES
};
static GParamSpec* docky_trash_docklet_properties[DOCKY_TRASH_DOCKLET_NUM_PROPERTIES];

#define DOCKY_TYPE_TRASH_DOCK_ITEM (docky_trash_dock_item_get_type ())
#define DOCKY_TRASH_DOCK_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DOCKY_TYPE_TRASH_DOCK_ITEM, DockyTrashDockItem))
#define DOCKY_TRASH_DOCK_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DOCKY_TYPE_TRASH_DOCK_ITEM, DockyTrashDockItemClass))
#define DOCKY_IS_TRASH_DOCK_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DOCKY_TYPE_TRASH_DOCK_ITEM))
#define DOCKY_IS_TRASH_DOCK_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DOCKY_TYPE_TRASH_DOCK_ITEM))
#define DOCKY_TRASH_DOCK_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DOCKY_TYPE_TRASH_DOCK_ITEM, DockyTrashDockItemClass))

typedef struct _DockyTrashDockItem DockyTrashDockItem;
typedef struct _DockyTrashDockItemClass DockyTrashDockItemClass;

struct _DockyTrashDocklet {
	GObject parent_instance;
	DockyTrashDockletPrivate * priv;
};

struct _DockyTrashDockletClass {
	GObjectClass parent_class;
};

static gpointer docky_trash_docklet_parent_class = NULL;
static PlankDockletIface * docky_trash_docklet_plank_docklet_parent_iface = NULL;

VALA_EXTERN void docklet_init (PlankDockletManager* manager);
VALA_EXTERN GType docky_trash_docklet_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DockyTrashDocklet, g_object_unref)
static const gchar* docky_trash_docklet_real_get_id (PlankDocklet* base);
static const gchar* docky_trash_docklet_real_get_name (PlankDocklet* base);
static const gchar* docky_trash_docklet_real_get_description (PlankDocklet* base);
static const gchar* docky_trash_docklet_real_get_icon (PlankDocklet* base);
static gboolean docky_trash_docklet_real_is_supported (PlankDocklet* base);
static PlankDockElement* docky_trash_docklet_real_make_element (PlankDocklet* base,
                                                         const gchar* launcher,
                                                         GFile* file);
VALA_EXTERN DockyTrashDockItem* docky_trash_dock_item_new_with_dockitem_file (GFile* file);
VALA_EXTERN DockyTrashDockItem* docky_trash_dock_item_construct_with_dockitem_file (GType object_type,
                                                                        GFile* file);
VALA_EXTERN GType docky_trash_dock_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DockyTrashDockItem, g_object_unref)
VALA_EXTERN DockyTrashDocklet* docky_trash_docklet_new (void);
VALA_EXTERN DockyTrashDocklet* docky_trash_docklet_construct (GType object_type);
static GType docky_trash_docklet_get_type_once (void);

void
docklet_init (PlankDockletManager* manager)
{
	g_return_if_fail (manager != NULL);
	plank_docklet_manager_register_docklet (manager, DOCKY_TYPE_TRASH_DOCKLET);
}

static const gchar*
docky_trash_docklet_real_get_id (PlankDocklet* base)
{
	DockyTrashDocklet * self;
	const gchar* result;
	self = (DockyTrashDocklet*) base;
	result = "trash";
	return result;
}

static const gchar*
docky_trash_docklet_real_get_name (PlankDocklet* base)
{
	DockyTrashDocklet * self;
	const gchar* result;
	self = (DockyTrashDocklet*) base;
	result = _ ("Trash");
	return result;
}

static const gchar*
docky_trash_docklet_real_get_description (PlankDocklet* base)
{
	DockyTrashDocklet * self;
	const gchar* result;
	self = (DockyTrashDocklet*) base;
	result = _ ("Have a look at your trash!");
	return result;
}

static const gchar*
docky_trash_docklet_real_get_icon (PlankDocklet* base)
{
	DockyTrashDocklet * self;
	const gchar* result;
	self = (DockyTrashDocklet*) base;
	result = "user-trash-full";
	return result;
}

static gboolean
docky_trash_docklet_real_is_supported (PlankDocklet* base)
{
	DockyTrashDocklet * self;
	gboolean result;
	self = (DockyTrashDocklet*) base;
	result = TRUE;
	return result;
}

static PlankDockElement*
docky_trash_docklet_real_make_element (PlankDocklet* base,
                                       const gchar* launcher,
                                       GFile* file)
{
	DockyTrashDocklet * self;
	DockyTrashDockItem* _tmp0_;
	PlankDockElement* result;
	self = (DockyTrashDocklet*) base;
	g_return_val_if_fail (launcher != NULL, NULL);
	g_return_val_if_fail (file != NULL, NULL);
	_tmp0_ = docky_trash_dock_item_new_with_dockitem_file (file);
	result = (PlankDockElement*) _tmp0_;
	return result;
}

DockyTrashDocklet*
docky_trash_docklet_construct (GType object_type)
{
	DockyTrashDocklet * self = NULL;
	self = (DockyTrashDocklet*) g_object_new (object_type, NULL);
	return self;
}

DockyTrashDocklet*
docky_trash_docklet_new (void)
{
	return docky_trash_docklet_construct (DOCKY_TYPE_TRASH_DOCKLET);
}

static void
docky_trash_docklet_class_init (DockyTrashDockletClass * klass,
                                gpointer klass_data)
{
	docky_trash_docklet_parent_class = g_type_class_peek_parent (klass);
}

static void
docky_trash_docklet_plank_docklet_interface_init (PlankDockletIface * iface,
                                                  gpointer iface_data)
{
	docky_trash_docklet_plank_docklet_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_id = (const gchar* (*) (PlankDocklet*)) docky_trash_docklet_real_get_id;
	iface->get_name = (const gchar* (*) (PlankDocklet*)) docky_trash_docklet_real_get_name;
	iface->get_description = (const gchar* (*) (PlankDocklet*)) docky_trash_docklet_real_get_description;
	iface->get_icon = (const gchar* (*) (PlankDocklet*)) docky_trash_docklet_real_get_icon;
	iface->is_supported = (gboolean (*) (PlankDocklet*)) docky_trash_docklet_real_is_supported;
	iface->make_element = (PlankDockElement* (*) (PlankDocklet*, const gchar*, GFile*)) docky_trash_docklet_real_make_element;
}

static void
docky_trash_docklet_instance_init (DockyTrashDocklet * self,
                                   gpointer klass)
{
}

static GType
docky_trash_docklet_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DockyTrashDockletClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) docky_trash_docklet_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DockyTrashDocklet), 0, (GInstanceInitFunc) docky_trash_docklet_instance_init, NULL };
	static const GInterfaceInfo plank_docklet_info = { (GInterfaceInitFunc) docky_trash_docklet_plank_docklet_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType docky_trash_docklet_type_id;
	docky_trash_docklet_type_id = g_type_register_static (G_TYPE_OBJECT, "DockyTrashDocklet", &g_define_type_info, 0);
	g_type_add_interface_static (docky_trash_docklet_type_id, PLANK_TYPE_DOCKLET, &plank_docklet_info);
	return docky_trash_docklet_type_id;
}

GType
docky_trash_docklet_get_type (void)
{
	static volatile gsize docky_trash_docklet_type_id__once = 0;
	if (g_once_init_enter (&docky_trash_docklet_type_id__once)) {
		GType docky_trash_docklet_type_id;
		docky_trash_docklet_type_id = docky_trash_docklet_get_type_once ();
		g_once_init_leave (&docky_trash_docklet_type_id__once, docky_trash_docklet_type_id);
	}
	return docky_trash_docklet_type_id__once;
}

