2 * gtknumerableicon.h: an emblemed icon with number emblems
4 * Copyright (C) 2010 Red Hat, Inc.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 * Authors: Cosimo Cecchi <cosimoc@redhat.com>
22 #ifndef __GTK_NUMERABLE_ICON_H__
23 #define __GTK_NUMERABLE_ICON_H__
25 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
26 #error "Only <gtk/gtk.h> can be included directly."
30 #include <gtk/gtkstylecontext.h>
34 #define GTK_TYPE_NUMERABLE_ICON (gtk_numerable_icon_get_type ())
35 #define GTK_NUMERABLE_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_NUMERABLE_ICON, GtkNumerableIcon))
36 #define GTK_NUMERABLE_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_NUMERABLE_ICON, GtkNumerableIconClass))
37 #define GTK_IS_NUMERABLE_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_NUMERABLE_ICON))
38 #define GTK_IS_NUMERABLE_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_NUMERABLE_ICON))
39 #define GTK_NUMERABLE_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_NUMERABLE_ICON, GtkNumerableIconClass))
41 typedef struct _GtkNumerableIcon GtkNumerableIcon;
42 typedef struct _GtkNumerableIconClass GtkNumerableIconClass;
43 typedef struct _GtkNumerableIconPrivate GtkNumerableIconPrivate;
45 struct _GtkNumerableIcon {
49 GtkNumerableIconPrivate *priv;
52 struct _GtkNumerableIconClass {
53 GEmblemedIconClass parent_class;
55 /* padding for future class expansion */
59 GType gtk_numerable_icon_get_type (void) G_GNUC_CONST;
61 GIcon * gtk_numerable_icon_new (GIcon *base_icon);
62 GIcon * gtk_numerable_icon_new_with_style_context (GIcon *base_icon,
63 GtkStyleContext *context);
65 GtkStyleContext * gtk_numerable_icon_get_style_context (GtkNumerableIcon *self);
66 void gtk_numerable_icon_set_style_context (GtkNumerableIcon *self,
67 GtkStyleContext *style);
69 gint gtk_numerable_icon_get_count (GtkNumerableIcon *self);
70 void gtk_numerable_icon_set_count (GtkNumerableIcon *self,
73 const gchar * gtk_numerable_icon_get_label (GtkNumerableIcon *self);
74 void gtk_numerable_icon_set_label (GtkNumerableIcon *self,
77 void gtk_numerable_icon_set_background_gicon (GtkNumerableIcon *self,
79 GIcon * gtk_numerable_icon_get_background_gicon (GtkNumerableIcon *self);
81 void gtk_numerable_icon_set_background_icon_name (GtkNumerableIcon *self,
82 const gchar *icon_name);
83 const gchar * gtk_numerable_icon_get_background_icon_name (GtkNumerableIcon *self);
87 #endif /* __GTK_NUMERABLE_ICON_H__ */