Sat, 26 May 2007 18:45:34 +0000
merge of 'e8ee63f710297ec6d4296fa2aa06395591fb6277'
and 'f09b952bdbebde997423ff9dd26de42bc14f25a1'
| 11553 | 1 | /** |
| 2 | * @file gtkmenutray.h GTK+ Tray menu item | |
|
16254
eeb2bba4dc94
Rename the Doxygen group from gtkui to pidgin.
Richard Laager <rlaager@pidgin.im>
parents:
15572
diff
changeset
|
3 | * @ingroup pidgin |
| 11553 | 4 | * |
| 15572 | 5 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 11553 | 6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 7 | * source distribution. | |
| 8 | * | |
| 9 | * This program is free software; you can redistribute it and/or modify | |
| 10 | * under the terms of the GNU General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This program is distributed in the hope that it will be useful, | |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 | * GNU General Public License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU General Public License | |
| 20 | * along with this program; if not, write to the Free Software | |
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 22 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
23 | #ifndef PIDGIN_MENU_TRAY_H |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
24 | #define PIDGIN_MENU_TRAY_H |
| 11553 | 25 | |
| 26 | #include <gtk/gtkhbox.h> | |
| 27 | #include <gtk/gtkmenuitem.h> | |
|
11908
ad9c7ca74793
[gaim-migrate @ 14199]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11599
diff
changeset
|
28 | #include <gtk/gtktooltips.h> |
| 11553 | 29 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
30 | #define PIDGIN_TYPE_MENU_TRAY (pidgin_menu_tray_get_gtype()) |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
31 | #define PIDGIN_MENU_TRAY(obj) (GTK_CHECK_CAST((obj), PIDGIN_TYPE_MENU_TRAY, PidginMenuTray)) |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
32 | #define PIDGIN_MENU_TRAY_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), PIDGIN_TYPE_MENU_TRAY, PidginMenuTrayClass)) |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
33 | #define PIDGIN_IS_MENU_TRAY(obj) (GTK_CHECK_TYPE((obj), PIDGIN_TYPE_MENU_TRAY)) |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
34 | #define PIDGIN_IS_MENU_TRAY_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), PIDGIN_TYPE_MENU_TRAY)) |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
35 | #define PIDGIN_MENU_TRAY_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), PIDGIN_TYPE_MENU_TRAY, PidginMenuTrayClass)) |
| 11553 | 36 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
37 | typedef struct _PidginMenuTray PidginMenuTray; |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
38 | typedef struct _PidginMenuTrayClass PidginMenuTrayClass; |
| 11553 | 39 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
40 | /** A PidginMenuTray */ |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
41 | struct _PidginMenuTray { |
| 11553 | 42 | GtkMenuItem gparent; /**< The parent instance */ |
|
11599
431352c132c8
[gaim-migrate @ 13869]
Gary Kramlich <grim@reaperworld.com>
parents:
11558
diff
changeset
|
43 | GtkWidget *tray; /**< The tray */ |
|
11908
ad9c7ca74793
[gaim-migrate @ 14199]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11599
diff
changeset
|
44 | GtkTooltips *tooltips; /**< Tooltips */ |
| 11553 | 45 | }; |
| 46 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
47 | /** A PidginMenuTrayClass */ |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
48 | struct _PidginMenuTrayClass { |
| 11553 | 49 | GtkMenuItemClass gparent; /**< The parent class */ |
| 50 | }; | |
| 51 | ||
| 52 | G_BEGIN_DECLS | |
| 53 | ||
| 54 | /** | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
55 | * Registers the PidginMenuTray class if necessary and returns the |
| 11553 | 56 | * type ID assigned to it. |
| 57 | * | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
58 | * @return The PidginMenuTray type ID |
| 11553 | 59 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
60 | GType pidgin_menu_tray_get_gtype(void); |
| 11553 | 61 | |
| 62 | /** | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
63 | * Creates a new PidginMenuTray |
| 11553 | 64 | * |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
65 | * @return A new PidginMenuTray |
| 11553 | 66 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
67 | GtkWidget *pidgin_menu_tray_new(void); |
| 11553 | 68 | |
| 69 | /** | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
70 | * Gets the box for the PidginMenuTray |
| 11553 | 71 | * |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
72 | * @param menu_tray The PidginMenuTray |
| 11553 | 73 | * |
| 74 | * @return The box that this menu tray is using | |
| 75 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
76 | GtkWidget *pidgin_menu_tray_get_box(PidginMenuTray *menu_tray); |
| 11553 | 77 | |
| 78 | /** | |
| 79 | * Appends a widget into the tray | |
| 80 | * | |
| 81 | * @param menu_tray The tray | |
| 82 | * @param widget The widget | |
|
11908
ad9c7ca74793
[gaim-migrate @ 14199]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11599
diff
changeset
|
83 | * @param tooltip The tooltip for this widget (widget requires its own X-window) |
| 11553 | 84 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
85 | void pidgin_menu_tray_append(PidginMenuTray *menu_tray, GtkWidget *widget, const char *tooltip); |
| 11553 | 86 | |
| 87 | /** | |
| 88 | * Prepends a widget into the tray | |
| 89 | * | |
|
11908
ad9c7ca74793
[gaim-migrate @ 14199]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11599
diff
changeset
|
90 | * @param menu_tray The tray |
| 11553 | 91 | * @param widget The widget |
|
11908
ad9c7ca74793
[gaim-migrate @ 14199]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11599
diff
changeset
|
92 | * @param tooltip The tooltip for this widget (widget requires its own X-window) |
| 11553 | 93 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
94 | void pidgin_menu_tray_prepend(PidginMenuTray *menu_tray, GtkWidget *widget, const char *tooltip); |
|
11908
ad9c7ca74793
[gaim-migrate @ 14199]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11599
diff
changeset
|
95 | |
|
ad9c7ca74793
[gaim-migrate @ 14199]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11599
diff
changeset
|
96 | /** |
|
ad9c7ca74793
[gaim-migrate @ 14199]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11599
diff
changeset
|
97 | * Set the tooltip for a widget |
|
ad9c7ca74793
[gaim-migrate @ 14199]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11599
diff
changeset
|
98 | * |
|
ad9c7ca74793
[gaim-migrate @ 14199]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11599
diff
changeset
|
99 | * @param menu_tray The tray |
|
ad9c7ca74793
[gaim-migrate @ 14199]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11599
diff
changeset
|
100 | * @param widget The widget |
|
ad9c7ca74793
[gaim-migrate @ 14199]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11599
diff
changeset
|
101 | * @param tooltip The tooltip to set for the widget (widget requires its own X-window) |
|
ad9c7ca74793
[gaim-migrate @ 14199]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11599
diff
changeset
|
102 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
103 | void pidgin_menu_tray_set_tooltip(PidginMenuTray *menu_tray, GtkWidget *widget, const char *tooltip); |
| 11553 | 104 | |
| 105 | G_END_DECLS | |
| 106 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
107 | #endif /* PIDGIN_MENU_TRAY_H */ |