]> Pileus Git - ~andy/gtk/blob - gtk/gtktooltips.h
Initial revision
[~andy/gtk] / gtk / gtktooltips.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the Free
16  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  */
18 #ifndef __GTK_TOOLTIPS_H__
19 #define __GTK_TOOLTIPS_H__
20
21 #include <gdk/gdk.h>
22
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* __cplusplus */
27
28
29 typedef struct
30 {
31   GtkWidget *widget;
32   gchar *tips_text;
33   GdkFont *font;
34   gint width;
35   GList *row;
36   gint old_event_mask;
37 } GtkTooltipsData;
38
39 typedef struct
40 {
41   GtkWidget *tip_window;
42   GtkTooltipsData *active_widget;
43   GList *widget_list;
44
45   GdkGC *gc;
46   GdkColor *foreground;
47   GdkColor *background;
48
49   gint numwidgets;
50   gint enabled;
51   gint inside;
52   gint delay;
53   gint timer_tag;
54   gint timer_active;
55
56   gint ref_count;
57   gint pending_destroy;
58 } GtkTooltips;
59
60
61 GtkTooltips* gtk_tooltips_new        (void);
62
63 void         gtk_tooltips_destroy    (GtkTooltips *tooltips);
64 GtkTooltips* gtk_tooltips_ref        (GtkTooltips *tooltips);
65 void         gtk_tooltips_unref      (GtkTooltips *tooltips);
66
67 void         gtk_tooltips_enable     (GtkTooltips *tooltips);
68
69 void         gtk_tooltips_disable    (GtkTooltips *tooltips);
70
71 void         gtk_tooltips_set_delay  (GtkTooltips *tooltips,
72                                       gint         delay);
73
74 void         gtk_tooltips_set_tips   (GtkTooltips *tooltips,
75                                       GtkWidget   *widget,
76                                       const gchar *tips_text);
77
78 void         gtk_tooltips_set_colors (GtkTooltips *tooltips,
79                                       GdkColor    *background,
80                                       GdkColor    *foreground);
81
82
83 #ifdef __cplusplus
84 }
85 #endif /* __cplusplus */
86
87
88 #endif /* __GTK_TOOLTIPS_H__ */