2 * @file gtkmenutray.h GTK+ Tray menu item
6 /* Pidgin is the legal property of its developers, whose names are too numerous
7 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * This program is free software; you can redistribute it and/or modify
11 * under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
24 #ifndef PIDGIN_MENU_TRAY_H
25 #define PIDGIN_MENU_TRAY_H
27 #include <gtk/gtkhbox.h>
28 #include <gtk/gtkmenuitem.h>
29 #include <gtk/gtktooltips.h>
31 #define PIDGIN_TYPE_MENU_TRAY (pidgin_menu_tray_get_gtype())
32 #define PIDGIN_MENU_TRAY(obj) (GTK_CHECK_CAST((obj), PIDGIN_TYPE_MENU_TRAY, PidginMenuTray))
33 #define PIDGIN_MENU_TRAY_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), PIDGIN_TYPE_MENU_TRAY, PidginMenuTrayClass))
34 #define PIDGIN_IS_MENU_TRAY(obj) (GTK_CHECK_TYPE((obj), PIDGIN_TYPE_MENU_TRAY))
35 #define PIDGIN_IS_MENU_TRAY_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), PIDGIN_TYPE_MENU_TRAY))
36 #define PIDGIN_MENU_TRAY_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), PIDGIN_TYPE_MENU_TRAY, PidginMenuTrayClass))
38 typedef struct _PidginMenuTray PidginMenuTray
;
39 typedef struct _PidginMenuTrayClass PidginMenuTrayClass
;
41 /** A PidginMenuTray */
42 struct _PidginMenuTray
{
43 GtkMenuItem gparent
; /**< The parent instance */
44 GtkWidget
*tray
; /**< The tray */
45 GtkTooltips
*tooltips
; /**< Tooltips */
48 /** A PidginMenuTrayClass */
49 struct _PidginMenuTrayClass
{
50 GtkMenuItemClass gparent
; /**< The parent class */
56 * Registers the PidginMenuTray class if necessary and returns the
57 * type ID assigned to it.
59 * @return The PidginMenuTray type ID
61 GType
pidgin_menu_tray_get_gtype(void);
64 * Creates a new PidginMenuTray
66 * @return A new PidginMenuTray
68 GtkWidget
*pidgin_menu_tray_new(void);
71 * Gets the box for the PidginMenuTray
73 * @param menu_tray The PidginMenuTray
75 * @return The box that this menu tray is using
77 GtkWidget
*pidgin_menu_tray_get_box(PidginMenuTray
*menu_tray
);
80 * Appends a widget into the tray
82 * @param menu_tray The tray
83 * @param widget The widget
84 * @param tooltip The tooltip for this widget (widget requires its own X-window)
86 void pidgin_menu_tray_append(PidginMenuTray
*menu_tray
, GtkWidget
*widget
, const char *tooltip
);
89 * Prepends a widget into the tray
91 * @param menu_tray The tray
92 * @param widget The widget
93 * @param tooltip The tooltip for this widget (widget requires its own X-window)
95 void pidgin_menu_tray_prepend(PidginMenuTray
*menu_tray
, GtkWidget
*widget
, const char *tooltip
);
98 * Set the tooltip for a widget
100 * @param menu_tray The tray
101 * @param widget The widget
102 * @param tooltip The tooltip to set for the widget (widget requires its own X-window)
104 void pidgin_menu_tray_set_tooltip(PidginMenuTray
*menu_tray
, GtkWidget
*widget
, const char *tooltip
);
108 #endif /* PIDGIN_MENU_TRAY_H */