1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * GtkQueryTips: Query onscreen widgets for their tooltips
5 * Copyright (C) 1998 Tim Janik
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the Free
19 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef __GTKTIPSQUERY_H__
22 #define __GTKTIPSQUERY_H__
25 #include <gtk/gtklabel.h>
31 #endif /* __cplusplus */
34 /* --- type macros --- */
35 #define GTK_TIPS_QUERY(obj) (GTK_CHECK_CAST (obj, gtk_tips_query_get_type (), GtkTipsQuery))
36 #define GTK_TIPS_QUERY_CLASS(klass) (GTK_CHECK_CLASS_CAST (klass, gtk_tips_query_get_type (), GtkTipsQueryClass))
37 #define GTK_IS_TIPS_QUERY(obj) (GTK_CHECK_TYPE (obj, gtk_tips_query_get_type ()))
40 /* --- typedefs --- */
41 typedef struct _GtkTipsQuery GtkTipsQuery;
42 typedef struct _GtkTipsQueryClass GtkTipsQueryClass;
45 /* --- structures --- */
50 guint emit_always : 1;
52 gchar *label_inactive;
56 GtkWidget *last_crossed;
58 GdkCursor *query_cursor;
61 struct _GtkTipsQueryClass
63 GtkLabelClass parent_class;
65 void (*start_query) (GtkTipsQuery *tips_query);
66 void (*stop_query) (GtkTipsQuery *tips_query);
67 void (*widget_entered) (GtkTipsQuery *tips_query,
69 const gchar *tip_text,
70 const gchar *tip_private);
71 gint (*widget_selected) (GtkTipsQuery *tips_query,
73 const gchar *tip_text,
74 const gchar *tip_private,
75 GdkEventButton *event);
79 /* --- prototypes --- */
80 GtkType gtk_tips_query_get_type (void);
81 GtkWidget* gtk_tips_query_new (void);
82 void gtk_tips_query_start_query (GtkTipsQuery *tips_query);
83 void gtk_tips_query_stop_query (GtkTipsQuery *tips_query);
84 void gtk_tips_query_set_caller (GtkTipsQuery *tips_query,
86 void gtk_tips_query_set_labels (GtkTipsQuery *tips_query,
87 const gchar *label_inactive,
88 const gchar *label_no_tip);
95 #endif /* __cplusplus */
98 #endif /* __GTKTIPSQUERY_H__ */