1/* gtkstatusicon.h:
2 *
3 * Copyright (C) 2003 Sun Microsystems, Inc.
4 *
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.
9 *
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.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * Authors:
19 * Mark McLoughlin <mark@skynet.ie>
20 */
21
22#ifndef __GTK_STATUS_ICON_H__
23#define __GTK_STATUS_ICON_H__
24
25#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
26#error "Only <gtk/gtk.h> can be included directly."
27#endif
28
29#include <gtk/gtkimage.h>
30#include <gtk/gtkmenu.h>
31
32G_BEGIN_DECLS
33
34#define GTK_TYPE_STATUS_ICON (gtk_status_icon_get_type ())
35#define GTK_STATUS_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_STATUS_ICON, GtkStatusIcon))
36#define GTK_STATUS_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTK_TYPE_STATUS_ICON, GtkStatusIconClass))
37#define GTK_IS_STATUS_ICON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_STATUS_ICON))
38#define GTK_IS_STATUS_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_STATUS_ICON))
39#define GTK_STATUS_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_STATUS_ICON, GtkStatusIconClass))
40
41typedef struct _GtkStatusIcon GtkStatusIcon;
42typedef struct _GtkStatusIconClass GtkStatusIconClass;
43typedef struct _GtkStatusIconPrivate GtkStatusIconPrivate;
44
45struct _GtkStatusIcon
46{
47 GObject parent_instance;
48
49 GtkStatusIconPrivate *priv;
50};
51
52struct _GtkStatusIconClass
53{
54 GObjectClass parent_class;
55
56 void (* activate) (GtkStatusIcon *status_icon);
57 void (* popup_menu) (GtkStatusIcon *status_icon,
58 guint button,
59 guint32 activate_time);
60 gboolean (* size_changed) (GtkStatusIcon *status_icon,
61 gint size);
62 gboolean (* button_press_event) (GtkStatusIcon *status_icon,
63 GdkEventButton *event);
64 gboolean (* button_release_event) (GtkStatusIcon *status_icon,
65 GdkEventButton *event);
66 gboolean (* scroll_event) (GtkStatusIcon *status_icon,
67 GdkEventScroll *event);
68 gboolean (* query_tooltip) (GtkStatusIcon *status_icon,
69 gint x,
70 gint y,
71 gboolean keyboard_mode,
72 GtkTooltip *tooltip);
73
74 void (*__gtk_reserved1) (void);
75 void (*__gtk_reserved2) (void);
76 void (*__gtk_reserved3) (void);
77 void (*__gtk_reserved4) (void);
78};
79
80GDK_AVAILABLE_IN_ALL
81GType gtk_status_icon_get_type (void) G_GNUC_CONST;
82
83GDK_DEPRECATED_IN_3_14
84GtkStatusIcon *gtk_status_icon_new (void);
85GDK_DEPRECATED_IN_3_14
86GtkStatusIcon *gtk_status_icon_new_from_pixbuf (GdkPixbuf *pixbuf);
87GDK_DEPRECATED_IN_3_14
88GtkStatusIcon *gtk_status_icon_new_from_file (const gchar *filename);
89GDK_DEPRECATED_IN_3_10_FOR(gtk_status_icon_new_from_icon_name)
90GtkStatusIcon *gtk_status_icon_new_from_stock (const gchar *stock_id);
91GDK_DEPRECATED_IN_3_14
92GtkStatusIcon *gtk_status_icon_new_from_icon_name (const gchar *icon_name);
93GDK_DEPRECATED_IN_3_14
94GtkStatusIcon *gtk_status_icon_new_from_gicon (GIcon *icon);
95
96GDK_DEPRECATED_IN_3_14
97void gtk_status_icon_set_from_pixbuf (GtkStatusIcon *status_icon,
98 GdkPixbuf *pixbuf);
99GDK_DEPRECATED_IN_3_14
100void gtk_status_icon_set_from_file (GtkStatusIcon *status_icon,
101 const gchar *filename);
102GDK_DEPRECATED_IN_3_10_FOR(gtk_status_icon_set_from_icon_name)
103void gtk_status_icon_set_from_stock (GtkStatusIcon *status_icon,
104 const gchar *stock_id);
105GDK_DEPRECATED_IN_3_14
106void gtk_status_icon_set_from_icon_name (GtkStatusIcon *status_icon,
107 const gchar *icon_name);
108GDK_DEPRECATED_IN_3_14
109void gtk_status_icon_set_from_gicon (GtkStatusIcon *status_icon,
110 GIcon *icon);
111
112GDK_DEPRECATED_IN_3_14
113GtkImageType gtk_status_icon_get_storage_type (GtkStatusIcon *status_icon);
114
115GDK_DEPRECATED_IN_3_14
116GdkPixbuf *gtk_status_icon_get_pixbuf (GtkStatusIcon *status_icon);
117GDK_DEPRECATED_IN_3_10_FOR(gtk_status_icon_get_icon_name)
118const gchar * gtk_status_icon_get_stock (GtkStatusIcon *status_icon);
119GDK_DEPRECATED_IN_3_14
120const gchar * gtk_status_icon_get_icon_name (GtkStatusIcon *status_icon);
121GDK_DEPRECATED_IN_3_14
122GIcon *gtk_status_icon_get_gicon (GtkStatusIcon *status_icon);
123
124GDK_DEPRECATED_IN_3_14
125gint gtk_status_icon_get_size (GtkStatusIcon *status_icon);
126
127GDK_DEPRECATED_IN_3_14
128void gtk_status_icon_set_screen (GtkStatusIcon *status_icon,
129 GdkScreen *screen);
130GDK_DEPRECATED_IN_3_14
131GdkScreen *gtk_status_icon_get_screen (GtkStatusIcon *status_icon);
132
133GDK_DEPRECATED_IN_3_14
134void gtk_status_icon_set_has_tooltip (GtkStatusIcon *status_icon,
135 gboolean has_tooltip);
136GDK_DEPRECATED_IN_3_14
137void gtk_status_icon_set_tooltip_text (GtkStatusIcon *status_icon,
138 const gchar *text);
139GDK_DEPRECATED_IN_3_14
140void gtk_status_icon_set_tooltip_markup (GtkStatusIcon *status_icon,
141 const gchar *markup);
142GDK_DEPRECATED_IN_3_14
143void gtk_status_icon_set_title (GtkStatusIcon *status_icon,
144 const gchar *title);
145GDK_DEPRECATED_IN_3_14
146const gchar * gtk_status_icon_get_title (GtkStatusIcon *status_icon);
147GDK_DEPRECATED_IN_3_14
148void gtk_status_icon_set_name (GtkStatusIcon *status_icon,
149 const gchar *name);
150GDK_DEPRECATED_IN_3_14
151void gtk_status_icon_set_visible (GtkStatusIcon *status_icon,
152 gboolean visible);
153GDK_DEPRECATED_IN_3_14
154gboolean gtk_status_icon_get_visible (GtkStatusIcon *status_icon);
155
156GDK_DEPRECATED_IN_3_14
157gboolean gtk_status_icon_is_embedded (GtkStatusIcon *status_icon);
158
159GDK_DEPRECATED_IN_3_14
160void gtk_status_icon_position_menu (GtkMenu *menu,
161 gint *x,
162 gint *y,
163 gboolean *push_in,
164 gpointer user_data);
165GDK_DEPRECATED_IN_3_14
166gboolean gtk_status_icon_get_geometry (GtkStatusIcon *status_icon,
167 GdkScreen **screen,
168 GdkRectangle *area,
169 GtkOrientation *orientation);
170GDK_DEPRECATED_IN_3_14
171gboolean gtk_status_icon_get_has_tooltip (GtkStatusIcon *status_icon);
172GDK_DEPRECATED_IN_3_14
173gchar *gtk_status_icon_get_tooltip_text (GtkStatusIcon *status_icon);
174GDK_DEPRECATED_IN_3_14
175gchar *gtk_status_icon_get_tooltip_markup (GtkStatusIcon *status_icon);
176
177GDK_DEPRECATED_IN_3_14
178guint32 gtk_status_icon_get_x11_window_id (GtkStatusIcon *status_icon);
179
180G_END_DECLS
181
182#endif /* __GTK_STATUS_ICON_H__ */
183