New function to improve the accessibility of tooltips. (#114851, Padraig

Thu Feb 12 23:55:08 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktooltips.h:
	* gtk/gtktooltips.c (gtk_tooltips_get_info_from_tip_window): New
	function to improve the accessibility of tooltips.  (#114851,
	Padraig O'Briain)
This commit is contained in:
Matthias Clasen 2004-02-12 22:57:56 +00:00 committed by Matthias Clasen
parent 78b3f2d576
commit 7b1d024a0e
9 changed files with 118 additions and 0 deletions

View File

@ -1,3 +1,16 @@
Thu Feb 12 23:55:08 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktooltips.h:
* gtk/gtktooltips.c (gtk_tooltips_get_info_from_tip_window): New
function to improve the accessibility of tooltips. (#114851,
Padraig O'Briain)
Thu Feb 12 23:16:04 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (gtk_combo_box_popup):
* gtk/gtkcombobox.c (gtk_combo_box_popdown): Make these public and
add docs. (#132847)
Thu Feb 12 11:05:16 2004 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkproperty-x11.c (gdk_property_get): Assign xtype using

View File

@ -1,3 +1,16 @@
Thu Feb 12 23:55:08 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktooltips.h:
* gtk/gtktooltips.c (gtk_tooltips_get_info_from_tip_window): New
function to improve the accessibility of tooltips. (#114851,
Padraig O'Briain)
Thu Feb 12 23:16:04 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (gtk_combo_box_popup):
* gtk/gtkcombobox.c (gtk_combo_box_popdown): Make these public and
add docs. (#132847)
Thu Feb 12 11:05:16 2004 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkproperty-x11.c (gdk_property_get): Assign xtype using

View File

@ -1,3 +1,16 @@
Thu Feb 12 23:55:08 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktooltips.h:
* gtk/gtktooltips.c (gtk_tooltips_get_info_from_tip_window): New
function to improve the accessibility of tooltips. (#114851,
Padraig O'Briain)
Thu Feb 12 23:16:04 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (gtk_combo_box_popup):
* gtk/gtkcombobox.c (gtk_combo_box_popdown): Make these public and
add docs. (#132847)
Thu Feb 12 11:05:16 2004 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkproperty-x11.c (gdk_property_get): Assign xtype using

View File

@ -1,3 +1,16 @@
Thu Feb 12 23:55:08 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktooltips.h:
* gtk/gtktooltips.c (gtk_tooltips_get_info_from_tip_window): New
function to improve the accessibility of tooltips. (#114851,
Padraig O'Briain)
Thu Feb 12 23:16:04 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (gtk_combo_box_popup):
* gtk/gtkcombobox.c (gtk_combo_box_popdown): Make these public and
add docs. (#132847)
Thu Feb 12 11:05:16 2004 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkproperty-x11.c (gdk_property_get): Assign xtype using

View File

@ -1,3 +1,16 @@
Thu Feb 12 23:55:08 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktooltips.h:
* gtk/gtktooltips.c (gtk_tooltips_get_info_from_tip_window): New
function to improve the accessibility of tooltips. (#114851,
Padraig O'Briain)
Thu Feb 12 23:16:04 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (gtk_combo_box_popup):
* gtk/gtkcombobox.c (gtk_combo_box_popdown): Make these public and
add docs. (#132847)
Thu Feb 12 11:05:16 2004 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkproperty-x11.c (gdk_property_get): Assign xtype using

View File

@ -1,3 +1,7 @@
Thu Feb 12 23:56:12 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtk-sections.txt: Add gtk_tooltips_get_info_from_tip_window.
Thu Feb 12 23:30:25 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtk-sections.txt: Add gtk_combo_box_{popup,popdown}.

View File

@ -3388,6 +3388,8 @@ gtk_tooltips_set_delay
gtk_tooltips_set_tip
gtk_tooltips_data_get
gtk_tooltips_force_window
gtk_tooltips_get_info_from_tip_window
<SUBSECTION Standard>
GTK_TOOLTIPS
GTK_IS_TOOLTIPS

View File

@ -68,6 +68,7 @@ static gboolean get_keyboard_mode (GtkWidget *widget);
static GtkObjectClass *parent_class;
static const gchar *tooltips_data_key = "_GtkTooltipsData";
static const gchar *tooltips_info_key = "_GtkTooltipsInfo";
GType
gtk_tooltips_get_type (void)
@ -407,6 +408,8 @@ gtk_tooltips_draw_tips (GtkTooltips *tooltips)
style = tooltips->tip_window->style;
widget = tooltips->active_tips_data->widget;
g_object_set_data (G_OBJECT (tooltips->tip_window), tooltips_info_key,
tooltips);
keyboard_mode = get_keyboard_mode (widget);
@ -746,3 +749,42 @@ _gtk_tooltips_toggle_keyboard_mode (GtkWidget *widget)
start_keyboard_mode (widget);
}
/**
* gtk_tooltips_get_info_from_tip_window:
* @tip_window: a #GtkWindow
* @tooltips: the return location for the tooltips which are displayed
* in @tip_window, or %NULL
* @current_widget: the return location for the widget whose tooltips
* are displayed, or %NULL
*
* Determines the tooltips and the widget they belong to from the window in
* which they are displayed.
*
* This function is mostly intended for use by accessibility technologies;
* applications should have little use for it.
*
* Return value: %TRUE if @tip_window is displaying tooltips, otherwise %FALSE.
*
* Since: 2.4
**/
gboolean
gtk_tooltips_get_info_from_tip_window (GtkWindow *tip_window,
GtkTooltips **tooltips,
GtkWidget **current_widget)
{
GtkTooltips *current_tooltips;
gboolean has_tips;
g_return_val_if_fail (GTK_IS_WINDOW (tip_window), FALSE);
current_tooltips = g_object_get_data (G_OBJECT (tip_window), tooltips_info_key);
has_tips = current_tooltips != NULL;
if (tooltips)
*tooltips = current_tooltips;
if (current_widget)
*current_widget = has_tips ? current_tooltips->active_tips_data->widget : NULL;
return has_tips;
}

View File

@ -28,6 +28,7 @@
#define __GTK_TOOLTIPS_H__
#include <gtk/gtkwidget.h>
#include <gtk/gtkwindow.h>
#ifdef __cplusplus
@ -102,6 +103,10 @@ void gtk_tooltips_force_window (GtkTooltips *tooltips);
void _gtk_tooltips_toggle_keyboard_mode (GtkWidget *widget);
gboolean gtk_tooltips_get_info_from_tip_window (GtkWindow *tip_window,
GtkTooltips **tooltips,
GtkWidget **current_widget);
#ifdef __cplusplus
}
#endif /* __cplusplus */