2
* Off-the-Record Messaging plugin for pidgin
3
* Copyright (C) 2004-2008 Ian Goldberg, Rob Smits,
4
* Chris Alexander, Nikita Borisov
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of version 2 of the GNU General Public License as
9
* published by the Free Software Foundation.
11
* This program 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
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
/* This file is based on a copy of gtkkmenutray.h */
23
/* Pidgin is the legal property of its developers, whose names are too numerous
24
* to list here. Please refer to the COPYRIGHT file distributed with this
25
* source distribution.
27
* This program is free software; you can redistribute it and/or modify
28
* under the terms of the GNU General Public License as published by
29
* the Free Software Foundation; either version 2 of the License, or
30
* (at your option) any later version.
32
* This program is distributed in the hope that it will be useful,
33
* but WITHOUT ANY WARRANTY; without even the implied warranty of
34
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35
* GNU General Public License for more details.
37
* You should have received a copy of the GNU General Public License
38
* along with this program; if not, write to the Free Software
39
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
41
#ifndef TOOLTIP_MENU_H
42
#define TOOLTIP_MENU_H
44
#include <gtk/gtkhbox.h>
45
#include <gtk/gtkmenuitem.h>
46
#include <gtk/gtktooltips.h>
48
#define TYPE_TOOLTIP_MENU (tooltip_menu_get_gtype())
49
#define TOOLTIP_MENU(obj) (GTK_CHECK_CAST((obj), TYPE_TOOLTIP_MENU, TooltipMenu))
50
#define TOOLTIP_MENU_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), TYPE_TOOLTIP_MENU, TooltipMenuClass))
51
#define IS_TOOLTIP_MENU(obj) (GTK_CHECK_TYPE((obj), TYPE_TOOLTIP_MENU))
52
#define IS_TOOLTIP_MENU_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), TYPE_TOOLTIP_MENU))
53
#define TOOLTIP_MENU_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), TYPE_TOOLTIP_MENU, TooltipMenuClass))
55
typedef struct _TooltipMenu TooltipMenu;
56
typedef struct _TooltipMenuClass TooltipMenuClass;
59
GtkMenuItem gparent; /**< The parent instance */
60
GtkWidget *tray; /**< The tray */
61
GtkTooltips *tooltips; /**< Tooltips */
64
struct _TooltipMenuClass {
65
GtkMenuItemClass gparent; /**< The parent class */
71
* Registers the TooltipMenu class if necessary and returns the
72
* type ID assigned to it.
74
* @return The TooltipMenu type ID
76
GType tooltip_menu_get_gtype(void);
79
* Creates a new TooltipMenu
81
* @return A new TooltipMenu
83
GtkWidget *tooltip_menu_new(void);
86
* Gets the box for the TooltipMenu
88
* @param tooltip_menu The TooltipMenu
90
* @return The box that this menu tray is using
92
GtkWidget *tooltip_menu_get_box(TooltipMenu *tooltip_menu);
95
* Appends a widget into the tray
97
* @param tooltip_menu The tray
98
* @param widget The widget
99
* @param tooltip The tooltip for this widget (widget requires its own X-window)
101
void tooltip_menu_append(TooltipMenu *tooltip_menu, GtkWidget *widget, const char *tooltip);
104
* Prepends a widget into the tray
106
* @param tooltip_menu The tray
107
* @param widget The widget
108
* @param tooltip The tooltip for this widget (widget requires its own X-window)
110
void tooltip_menu_prepend(TooltipMenu *tooltip_menu, GtkWidget *widget, const char *tooltip);
113
* Set the tooltip for a widget
115
* @param tooltip_menu The tray
116
* @param widget The widget
117
* @param tooltip The tooltip to set for the widget (widget requires its own X-window)
119
void tooltip_menu_set_tooltip(TooltipMenu *tooltip_menu, GtkWidget *widget, const char *tooltip);
123
#endif /* PIDGIN_MENU_TRAY_H */