1 /* GTK - The GTK+ 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 Lesser 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 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
24 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
25 * file for a list of people on the GTK+ Team. See the ChangeLog
26 * files for a list of changes. These files are distributed with
27 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
30 #ifndef GTK_DISABLE_DEPRECATED
32 #ifndef __GTK_TIPS_QUERY_H__
33 #define __GTK_TIPS_QUERY_H__
40 /* --- type macros --- */
41 #define GTK_TYPE_TIPS_QUERY (gtk_tips_query_get_type ())
42 #define GTK_TIPS_QUERY(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TIPS_QUERY, GtkTipsQuery))
43 #define GTK_TIPS_QUERY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TIPS_QUERY, GtkTipsQueryClass))
44 #define GTK_IS_TIPS_QUERY(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TIPS_QUERY))
45 #define GTK_IS_TIPS_QUERY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TIPS_QUERY))
46 #define GTK_TIPS_QUERY_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_TIPS_QUERY, GtkTipsQueryClass))
49 /* --- typedefs --- */
50 typedef struct _GtkTipsQuery GtkTipsQuery;
51 typedef struct _GtkTipsQueryClass GtkTipsQueryClass;
54 /* --- structures --- */
59 guint emit_always : 1;
61 gchar *label_inactive;
65 GtkWidget *last_crossed;
67 GdkCursor *query_cursor;
70 struct _GtkTipsQueryClass
72 GtkLabelClass parent_class;
74 void (*start_query) (GtkTipsQuery *tips_query);
75 void (*stop_query) (GtkTipsQuery *tips_query);
76 void (*widget_entered) (GtkTipsQuery *tips_query,
78 const gchar *tip_text,
79 const gchar *tip_private);
80 gint (*widget_selected) (GtkTipsQuery *tips_query,
82 const gchar *tip_text,
83 const gchar *tip_private,
84 GdkEventButton *event);
86 /* Padding for future expansion */
87 void (*_gtk_reserved1) (void);
88 void (*_gtk_reserved2) (void);
89 void (*_gtk_reserved3) (void);
90 void (*_gtk_reserved4) (void);
94 /* --- prototypes --- */
95 GtkType gtk_tips_query_get_type (void) G_GNUC_CONST;
96 GtkWidget* gtk_tips_query_new (void);
97 void gtk_tips_query_start_query (GtkTipsQuery *tips_query);
98 void gtk_tips_query_stop_query (GtkTipsQuery *tips_query);
99 void gtk_tips_query_set_caller (GtkTipsQuery *tips_query,
101 void gtk_tips_query_set_labels (GtkTipsQuery *tips_query,
102 const gchar *label_inactive,
103 const gchar *label_no_tip);
107 #endif /* __GTK_TIPS_QUERY_H__ */
109 #endif /* GTK_DISABLE_DEPRECATED */