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

/**/
/*  Copyright (C) 2014 Rico Tzschichholz*/
/**/
/*  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 <gdk/gdk.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib-object.h>
#include <glib/gi18n-lib.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

enum  {
	PLANK_PLACEHOLDER_DOCK_ITEM_0_PROPERTY,
	PLANK_PLACEHOLDER_DOCK_ITEM_NUM_PROPERTIES
};
static GParamSpec* plank_placeholder_dock_item_properties[PLANK_PLACEHOLDER_DOCK_ITEM_NUM_PROPERTIES];

static gpointer plank_placeholder_dock_item_parent_class = NULL;

static PlankAnimationType plank_placeholder_dock_item_real_on_clicked (PlankDockElement* base,
                                                                PlankPopupButton button,
                                                                GdkModifierType mod,
                                                                guint32 event_time);
static gchar* plank_placeholder_dock_item_real_get_drop_text (PlankDockElement* base);
static gboolean plank_placeholder_dock_item_real_can_be_removed (PlankDockElement* base);
static gboolean plank_placeholder_dock_item_real_is_valid (PlankDockItem* base);
static GObject * plank_placeholder_dock_item_constructor (GType type,
                                                   guint n_construct_properties,
                                                   GObjectConstructParam * construct_properties);
static GType plank_placeholder_dock_item_get_type_once (void);

/**
 * Create a new placeholder dock-item
 */
PlankPlaceholderDockItem*
plank_placeholder_dock_item_construct (GType object_type)
{
	PlankPlaceholderDockItem * self = NULL;
	self = (PlankPlaceholderDockItem*) plank_dock_item_construct (object_type);
	return self;
}

PlankPlaceholderDockItem*
plank_placeholder_dock_item_new (void)
{
	return plank_placeholder_dock_item_construct (PLANK_TYPE_PLACEHOLDER_DOCK_ITEM);
}

/**
 * {@inheritDoc}
 */
static PlankAnimationType
plank_placeholder_dock_item_real_on_clicked (PlankDockElement* base,
                                             PlankPopupButton button,
                                             GdkModifierType mod,
                                             guint32 event_time)
{
	PlankPlaceholderDockItem * self;
	PlankAnimationType result;
	self = (PlankPlaceholderDockItem*) base;
	result = PLANK_ANIMATION_TYPE_NONE;
	return result;
}

static gchar*
plank_placeholder_dock_item_real_get_drop_text (PlankDockElement* base)
{
	PlankPlaceholderDockItem * self;
	gchar* _tmp0_;
	gchar* result;
	self = (PlankPlaceholderDockItem*) base;
	_tmp0_ = g_strdup (_ ("Drop to add to dock"));
	result = _tmp0_;
	return result;
}

/**
 * {@inheritDoc}
 */
static gboolean
plank_placeholder_dock_item_real_can_be_removed (PlankDockElement* base)
{
	PlankPlaceholderDockItem * self;
	gboolean result;
	self = (PlankPlaceholderDockItem*) base;
	result = FALSE;
	return result;
}

/**
 * {@inheritDoc}
 */
static gboolean
plank_placeholder_dock_item_real_is_valid (PlankDockItem* base)
{
	PlankPlaceholderDockItem * self;
	gboolean result;
	self = (PlankPlaceholderDockItem*) base;
	result = TRUE;
	return result;
}

static GObject *
plank_placeholder_dock_item_constructor (GType type,
                                         guint n_construct_properties,
                                         GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	PlankPlaceholderDockItem * self;
	parent_class = G_OBJECT_CLASS (plank_placeholder_dock_item_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PLANK_TYPE_PLACEHOLDER_DOCK_ITEM, PlankPlaceholderDockItem);
	plank_dock_item_set_Indicator ((PlankDockItem*) self, PLANK_INDICATOR_STATE_NONE);
	plank_dock_element_set_Text ((PlankDockElement*) self, _ ("Drop applications or files here"));
	plank_dock_item_set_Icon ((PlankDockItem*) self, "add");
	return obj;
}

static void
plank_placeholder_dock_item_class_init (PlankPlaceholderDockItemClass * klass,
                                        gpointer klass_data)
{
	plank_placeholder_dock_item_parent_class = g_type_class_peek_parent (klass);
	((PlankDockElementClass *) klass)->on_clicked = (PlankAnimationType (*) (PlankDockElement*, PlankPopupButton, GdkModifierType, guint32)) plank_placeholder_dock_item_real_on_clicked;
	((PlankDockElementClass *) klass)->get_drop_text = (gchar* (*) (PlankDockElement*)) plank_placeholder_dock_item_real_get_drop_text;
	((PlankDockElementClass *) klass)->can_be_removed = (gboolean (*) (PlankDockElement*)) plank_placeholder_dock_item_real_can_be_removed;
	((PlankDockItemClass *) klass)->is_valid = (gboolean (*) (PlankDockItem*)) plank_placeholder_dock_item_real_is_valid;
	G_OBJECT_CLASS (klass)->constructor = plank_placeholder_dock_item_constructor;
}

static void
plank_placeholder_dock_item_instance_init (PlankPlaceholderDockItem * self,
                                           gpointer klass)
{
}

/**
 * A dock item as a placeholder for the dock itself if nothing was added yet.
 */
static GType
plank_placeholder_dock_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PlankPlaceholderDockItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) plank_placeholder_dock_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PlankPlaceholderDockItem), 0, (GInstanceInitFunc) plank_placeholder_dock_item_instance_init, NULL };
	GType plank_placeholder_dock_item_type_id;
	plank_placeholder_dock_item_type_id = g_type_register_static (PLANK_TYPE_DOCK_ITEM, "PlankPlaceholderDockItem", &g_define_type_info, 0);
	return plank_placeholder_dock_item_type_id;
}

GType
plank_placeholder_dock_item_get_type (void)
{
	static volatile gsize plank_placeholder_dock_item_type_id__once = 0;
	if (g_once_init_enter (&plank_placeholder_dock_item_type_id__once)) {
		GType plank_placeholder_dock_item_type_id;
		plank_placeholder_dock_item_type_id = plank_placeholder_dock_item_get_type_once ();
		g_once_init_leave (&plank_placeholder_dock_item_type_id__once, plank_placeholder_dock_item_type_id);
	}
	return plank_placeholder_dock_item_type_id__once;
}

