3 * Copyright (C) 2003 Sun Microsystems, Inc.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 * Mark McLoughlin <mark@skynet.ie>
24 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
25 #error "Only <gtk/gtk.h> can be included directly."
28 #ifndef __GTK_STATUS_ICON_H__
29 #define __GTK_STATUS_ICON_H__
31 #include <gtk/gtkimage.h>
32 #include <gtk/gtkmenu.h>
36 #define GTK_TYPE_STATUS_ICON (gtk_status_icon_get_type ())
37 #define GTK_STATUS_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_STATUS_ICON, GtkStatusIcon))
38 #define GTK_STATUS_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTK_TYPE_STATUS_ICON, GtkStatusIconClass))
39 #define GTK_IS_STATUS_ICON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_STATUS_ICON))
40 #define GTK_IS_STATUS_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_STATUS_ICON))
41 #define GTK_STATUS_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_STATUS_ICON, GtkStatusIconClass))
43 typedef struct _GtkStatusIcon GtkStatusIcon;
44 typedef struct _GtkStatusIconClass GtkStatusIconClass;
45 typedef struct _GtkStatusIconPrivate GtkStatusIconPrivate;
49 GObject parent_instance;
51 GtkStatusIconPrivate *priv;
54 struct _GtkStatusIconClass
56 GObjectClass parent_class;
58 void (* activate) (GtkStatusIcon *status_icon);
59 void (* popup_menu) (GtkStatusIcon *status_icon,
61 guint32 activate_time);
62 gboolean (* size_changed) (GtkStatusIcon *status_icon,
65 void (*__gtk_reserved1);
66 void (*__gtk_reserved2);
67 void (*__gtk_reserved3);
68 void (*__gtk_reserved4);
69 void (*__gtk_reserved5);
70 void (*__gtk_reserved6);
73 GType gtk_status_icon_get_type (void) G_GNUC_CONST;
75 GtkStatusIcon *gtk_status_icon_new (void);
76 GtkStatusIcon *gtk_status_icon_new_from_pixbuf (GdkPixbuf *pixbuf);
77 GtkStatusIcon *gtk_status_icon_new_from_file (const gchar *filename);
78 GtkStatusIcon *gtk_status_icon_new_from_stock (const gchar *stock_id);
79 GtkStatusIcon *gtk_status_icon_new_from_icon_name (const gchar *icon_name);
81 void gtk_status_icon_set_from_pixbuf (GtkStatusIcon *status_icon,
83 void gtk_status_icon_set_from_file (GtkStatusIcon *status_icon,
84 const gchar *filename);
85 void gtk_status_icon_set_from_stock (GtkStatusIcon *status_icon,
86 const gchar *stock_id);
87 void gtk_status_icon_set_from_icon_name (GtkStatusIcon *status_icon,
88 const gchar *icon_name);
90 GtkImageType gtk_status_icon_get_storage_type (GtkStatusIcon *status_icon);
92 GdkPixbuf *gtk_status_icon_get_pixbuf (GtkStatusIcon *status_icon);
93 G_CONST_RETURN gchar *gtk_status_icon_get_stock (GtkStatusIcon *status_icon);
94 G_CONST_RETURN gchar *gtk_status_icon_get_icon_name (GtkStatusIcon *status_icon);
96 gint gtk_status_icon_get_size (GtkStatusIcon *status_icon);
98 void gtk_status_icon_set_screen (GtkStatusIcon *status_icon,
100 GdkScreen *gtk_status_icon_get_screen (GtkStatusIcon *status_icon);
102 void gtk_status_icon_set_tooltip (GtkStatusIcon *status_icon,
103 const gchar *tooltip_text);
105 void gtk_status_icon_set_visible (GtkStatusIcon *status_icon,
107 gboolean gtk_status_icon_get_visible (GtkStatusIcon *status_icon);
109 void gtk_status_icon_set_blinking (GtkStatusIcon *status_icon,
111 gboolean gtk_status_icon_get_blinking (GtkStatusIcon *status_icon);
113 gboolean gtk_status_icon_is_embedded (GtkStatusIcon *status_icon);
115 void gtk_status_icon_position_menu (GtkMenu *menu,
120 gboolean gtk_status_icon_get_geometry (GtkStatusIcon *status_icon,
123 GtkOrientation *orientation);
127 #endif /* __GTK_STATUS_ICON_H__ */