Dutch translation updated (Gideon van Melle)
[pidgin-git.git] / pidgin / pidgintooltip.h
blob889232341e51a4e0bd8c59c894644d3f2e77a839
1 /**
2 * @file pidgintooltip.h Pidgin Tooltip API
3 * @ingroup pidgin
4 */
6 /* pidgin
8 * Pidgin is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
26 #ifndef _PIDGIN_TOOLTIP_H_
27 #define _PIDGIN_TOOLTIP_H_
29 #include <gtk/gtk.h>
31 /**
32 * @param tipwindow The window for the tooltip.
33 * @param path The GtkTreePath representing the row under the cursor.
34 * @param userdata The userdata set during pidgin_tooltip_setup_for_treeview.
35 * @param w The value of this should be set to the desired width of the tooltip window.
36 * @param h The value of this should be set to the desired height of the tooltip window.
38 * @return @c TRUE if the tooltip was created correctly, @c FALSE otherwise.
39 * @since 2.4.0
41 typedef gboolean (*PidginTooltipCreateForTree)(GtkWidget *tipwindow,
42 GtkTreePath *path, gpointer userdata, int *w, int *h);
44 /**
45 * @param tipwindow The window for the tooltip.
46 * @param userdata The userdata set during pidgin_tooltip_show.
47 * @param w The value of this should be set to the desired width of the tooltip window.
48 * @param h The value of this should be set to the desired height of the tooltip window.
50 * @return @c TRUE if the tooltip was created correctly, @c FALSE otherwise.
51 * @since 2.4.0
53 typedef gboolean (*PidginTooltipCreate)(GtkWidget *tipwindow,
54 gpointer userdata, int *w, int *h);
56 /**
57 * @param tipwindow The window for the tooltip.
58 * @param userdata The userdata set during pidgin_tooltip_setup_for_treeview or pidgin_tooltip_show.
60 * @return @c TRUE if the tooltip was painted correctly, @c FALSE otherwise.
61 * @since 2.4.0
63 typedef gboolean (*PidginTooltipPaint)(GtkWidget *tipwindow, gpointer userdata);
65 /**
66 * Setup tooltip drawing functions for a treeview.
68 * @param tree The treeview
69 * @param userdata The userdata to send to the callback functions
70 * @param create_cb Callback function to create the tooltip for a GtkTreePath
71 * @param paint_cb Callback function to paint the tooltip
73 * @return @c TRUE if the tooltip callbacks were setup correctly.
74 * @since 2.4.0
76 gboolean pidgin_tooltip_setup_for_treeview(GtkWidget *tree, gpointer userdata,
77 PidginTooltipCreateForTree create_cb, PidginTooltipPaint paint_cb);
79 /**
80 * Setup tooltip drawing functions for any widget.
82 * @param widget The widget
83 * @param userdata The userdata to send to the callback functions
84 * @param create_cb Callback function to create the tooltip for the widget
85 * @param paint_cb Callback function to paint the tooltip
87 * @return @c TRUE if the tooltip callbacks were setup correctly.
88 * @since 2.4.0
90 gboolean pidgin_tooltip_setup_for_widget(GtkWidget *widget, gpointer userdata,
91 PidginTooltipCreate create_cb, PidginTooltipPaint paint_cb);
93 /**
94 * Destroy the tooltip.
95 * @since 2.4.0
97 void pidgin_tooltip_destroy(void);
99 /**
100 * Create and show a tooltip.
102 * @param widget The widget the tooltip is for
103 * @param userdata The userdata to send to the callback functions
104 * @param create_cb Callback function to create the tooltip from the GtkTreePath
105 * @param paint_cb Callback function to paint the tooltip
107 * @since 2.4.0
109 void pidgin_tooltip_show(GtkWidget *widget, gpointer userdata,
110 PidginTooltipCreate create_cb, PidginTooltipPaint paint_cb);
112 #endif