~ubuntu-branches/ubuntu/vivid/pidgin-otr/vivid-proposed

« back to all changes in this revision

Viewing changes to tooltipmenu.h

  • Committer: Bazaar Package Importer
  • Author(s): Thibaut VARENE
  • Date: 2008-07-10 17:34:32 UTC
  • mfrom: (2.1.2 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080710173432-aqx359odj7cp182a
Tags: 3.2.0-2
Make key generation use /dev/urandom (Closes: #489523)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  Off-the-Record Messaging plugin for pidgin
 
3
 *  Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
 
4
 *                           Chris Alexander, Nikita Borisov
 
5
 *                           <otr@cypherpunks.ca>
 
6
 *
 
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.
 
10
 *
 
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.
 
15
 *
 
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
 
19
 */
 
20
 
 
21
/* This file is based on a copy of gtkkmenutray.h  */
 
22
 
 
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.
 
26
 *
 
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.
 
31
 *
 
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.
 
36
 *
 
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
 
40
 */
 
41
#ifndef TOOLTIP_MENU_H
 
42
#define TOOLTIP_MENU_H
 
43
 
 
44
#include <gtk/gtkhbox.h>
 
45
#include <gtk/gtkmenuitem.h>
 
46
#include <gtk/gtktooltips.h>
 
47
 
 
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))
 
54
 
 
55
typedef struct _TooltipMenu                          TooltipMenu;
 
56
typedef struct _TooltipMenuClass             TooltipMenuClass;
 
57
 
 
58
struct _TooltipMenu {
 
59
        GtkMenuItem gparent;                                    /**< The parent instance */
 
60
        GtkWidget *tray;                                                /**< The tray */
 
61
        GtkTooltips *tooltips;                                  /**< Tooltips */
 
62
};
 
63
 
 
64
struct _TooltipMenuClass {
 
65
        GtkMenuItemClass gparent;                               /**< The parent class */
 
66
};
 
67
 
 
68
G_BEGIN_DECLS
 
69
 
 
70
/**
 
71
 * Registers the TooltipMenu class if necessary and returns the
 
72
 * type ID assigned to it.
 
73
 *
 
74
 * @return The TooltipMenu type ID
 
75
 */
 
76
GType tooltip_menu_get_gtype(void);
 
77
 
 
78
/**
 
79
 * Creates a new TooltipMenu
 
80
 *
 
81
 * @return A new TooltipMenu
 
82
 */
 
83
GtkWidget *tooltip_menu_new(void);
 
84
 
 
85
/**
 
86
 * Gets the box for the TooltipMenu
 
87
 *
 
88
 * @param tooltip_menu The TooltipMenu
 
89
 *
 
90
 * @return The box that this menu tray is using
 
91
 */
 
92
GtkWidget *tooltip_menu_get_box(TooltipMenu *tooltip_menu);
 
93
 
 
94
/**
 
95
 * Appends a widget into the tray
 
96
 *
 
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)
 
100
 */
 
101
void tooltip_menu_append(TooltipMenu *tooltip_menu, GtkWidget *widget, const char *tooltip);
 
102
 
 
103
/**
 
104
 * Prepends a widget into the tray
 
105
 *
 
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)
 
109
 */
 
110
void tooltip_menu_prepend(TooltipMenu *tooltip_menu, GtkWidget *widget, const char *tooltip);
 
111
 
 
112
/**
 
113
 * Set the tooltip for a widget
 
114
 *
 
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)
 
118
 */
 
119
void tooltip_menu_set_tooltip(TooltipMenu *tooltip_menu, GtkWidget *widget, const char *tooltip);
 
120
 
 
121
G_END_DECLS
 
122
 
 
123
#endif /* PIDGIN_MENU_TRAY_H */