summaryrefslogtreecommitdiff
path: root/gtk/gtktooltips.h
diff options
context:
space:
mode:
authorTim Janik <timj@gimp.org>1998-02-18 02:40:08 +0000
committerTim Janik <timj@src.gnome.org>1998-02-18 02:40:08 +0000
commit83e3008d35031d6756d6b26add1ab67dcdc4741c (patch)
tree550647bc0ed4dadebe1d4f0546f022d74b314ffd /gtk/gtktooltips.h
parent1410a8a00332ac0f6079102fbc02134a10a250a2 (diff)
downloadgdk-pixbuf-83e3008d35031d6756d6b26add1ab67dcdc4741c.tar.gz
new functions gtk_tooltips_data_get and gtk_tooltips_set_tip,
Wed Feb 18 02:58:50 1998 Tim Janik <timj@gimp.org> * gtk/gtktooltips.h: new functions gtk_tooltips_data_get and gtk_tooltips_set_tip, gtk_tooltips_set_tips is discouraged now. (_GtkTooltips): removed some fields that were never used. changed boolean fields to one bit size, to pack together with the delay field. (_GtkTooltipsData): added tip_private, renamed tips_text to tip_text. * gtk/gtktooltips.c: (gtk_tooltips_data_get): new function to retrive the _GtkTooltipsData structure of a widget. (gtk_tooltips_set_tip): new function for more extensible tooltips settings than gtk_tooltips_set_tips which is discuraged now. removed a bug that caused a stale object_data key to a _GtkTooltipsData structure. removed a bug that caused tips falsly to come up for a grab widget on widgets where events were grabbed from.
Diffstat (limited to 'gtk/gtktooltips.h')
-rw-r--r--gtk/gtktooltips.h57
1 files changed, 32 insertions, 25 deletions
diff --git a/gtk/gtktooltips.h b/gtk/gtktooltips.h
index 3bbd09dfd..4ed9b7c2f 100644
--- a/gtk/gtktooltips.h
+++ b/gtk/gtktooltips.h
@@ -8,7 +8,7 @@
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
@@ -26,19 +26,20 @@
extern "C" {
#endif /* __cplusplus */
-#define GTK_TOOLTIPS(obj) GTK_CHECK_CAST (obj, gtk_tooltips_get_type (), GtkTooltips)
+#define GTK_TOOLTIPS(obj) GTK_CHECK_CAST (obj, gtk_tooltips_get_type (), GtkTooltips)
#define GTK_TOOLTIPS_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_tooltips_get_type (), GtkTooltipsClass)
-#define GTK_IS_TOOLTIPS(obj) GTK_CHECK_TYPE (obj, gtk_tooltips_get_type ())
+#define GTK_IS_TOOLTIPS(obj) GTK_CHECK_TYPE (obj, gtk_tooltips_get_type ())
-typedef struct _GtkTooltips GtkTooltips;
+typedef struct _GtkTooltips GtkTooltips;
typedef struct _GtkTooltipsClass GtkTooltipsClass;
-typedef struct _GtkTooltipsData GtkTooltipsData;
+typedef struct _GtkTooltipsData GtkTooltipsData;
struct _GtkTooltipsData
{
GtkTooltips *tooltips;
GtkWidget *widget;
- gchar *tips_text;
+ gchar *tip_text;
+ gchar *tip_private;
GdkFont *font;
gint width;
GList *row;
@@ -56,12 +57,10 @@ struct _GtkTooltips
GdkColor *foreground;
GdkColor *background;
- gint numwidgets;
- gint enabled;
- gint inside;
- gint delay;
- gint timer_tag;
- gint timer_active;
+ gint16 delay;
+ gint enabled : 1;
+ gint timer_active : 1;
+ gint timer_tag;
};
struct _GtkTooltipsClass
@@ -69,19 +68,27 @@ struct _GtkTooltipsClass
GtkDataClass parent_class;
};
-GtkType gtk_tooltips_get_type (void);
-GtkTooltips* gtk_tooltips_new (void);
-
-void gtk_tooltips_enable (GtkTooltips *tooltips);
-void gtk_tooltips_disable (GtkTooltips *tooltips);
-void gtk_tooltips_set_delay (GtkTooltips *tooltips,
- gint delay);
-void gtk_tooltips_set_tips (GtkTooltips *tooltips,
- GtkWidget *widget,
- const gchar *tips_text);
-void gtk_tooltips_set_colors (GtkTooltips *tooltips,
- GdkColor *background,
- GdkColor *foreground);
+GtkType gtk_tooltips_get_type (void);
+GtkTooltips* gtk_tooltips_new (void);
+
+void gtk_tooltips_enable (GtkTooltips *tooltips);
+void gtk_tooltips_disable (GtkTooltips *tooltips);
+void gtk_tooltips_set_delay (GtkTooltips *tooltips,
+ gint delay);
+void gtk_tooltips_set_tip (GtkTooltips *tooltips,
+ GtkWidget *widget,
+ const gchar *tip_text,
+ const gchar *tip_private);
+void gtk_tooltips_set_colors (GtkTooltips *tooltips,
+ GdkColor *background,
+ GdkColor *foreground);
+GtkTooltipsData* gtk_tooltips_data_get (GtkWidget *widget);
+
+/* discouraged old function name
+ */
+#define gtk_tooltips_set_tips(t,w,x) gtk_tooltips_set_tip(t,w,x,NULL)
+
+
#ifdef __cplusplus
}