Compare commits
9 Commits
wip/toolti
...
wip/a11y
Author | SHA1 | Date | |
---|---|---|---|
|
1a696408b2 | ||
|
b0e2fd453c | ||
|
6088f59b5e | ||
|
bc907c1471 | ||
|
a1bb39a42b | ||
|
6c68b25008 | ||
|
0c6deef968 | ||
|
8eb20f751e | ||
|
9b933c2a0c |
@@ -103,8 +103,12 @@ gtka11y_private_h_sources = \
|
|||||||
gtkaccessibilityutil.h \
|
gtkaccessibilityutil.h \
|
||||||
gtkcellaccessibleprivate.h \
|
gtkcellaccessibleprivate.h \
|
||||||
gtkcolorswatchaccessibleprivate.h \
|
gtkcolorswatchaccessibleprivate.h \
|
||||||
|
gtkcontaineraccessibleprivate.h \
|
||||||
gtkiconviewaccessibleprivate.h \
|
gtkiconviewaccessibleprivate.h \
|
||||||
|
gtklinkbuttonaccessibleprivate.h \
|
||||||
gtklockbuttonaccessibleprivate.h \
|
gtklockbuttonaccessibleprivate.h \
|
||||||
|
gtkrangeaccessibleprivate.h \
|
||||||
|
gtkstatusbaraccessibleprivate.h \
|
||||||
gtktextviewaccessibleprivate.h \
|
gtktextviewaccessibleprivate.h \
|
||||||
gtktreeviewaccessibleprivate.h \
|
gtktreeviewaccessibleprivate.h \
|
||||||
gtkwidgetaccessibleprivate.h
|
gtkwidgetaccessibleprivate.h
|
||||||
|
@@ -234,8 +234,8 @@ gtk_button_accessible_class_init (GtkButtonAccessibleClass *klass)
|
|||||||
|
|
||||||
widget_class->notify_gtk = gtk_button_accessible_notify_gtk;
|
widget_class->notify_gtk = gtk_button_accessible_notify_gtk;
|
||||||
|
|
||||||
container_class->add_gtk = NULL;
|
container_class->add = NULL;
|
||||||
container_class->remove_gtk = NULL;
|
container_class->remove = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include "gtkcontaineraccessible.h"
|
#include "gtkcontaineraccessible.h"
|
||||||
|
#include "gtkwidgetprivate.h"
|
||||||
|
|
||||||
struct _GtkContainerAccessiblePrivate
|
struct _GtkContainerAccessiblePrivate
|
||||||
{
|
{
|
||||||
@@ -72,85 +73,79 @@ gtk_container_accessible_ref_child (AtkObject *obj,
|
|||||||
return accessible;
|
return accessible;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
void
|
||||||
gtk_container_accessible_add_gtk (GtkContainer *container,
|
_gtk_container_accessible_add (GtkContainer *container,
|
||||||
GtkWidget *widget,
|
GtkWidget *child)
|
||||||
gpointer data)
|
|
||||||
{
|
{
|
||||||
GtkContainerAccessible *accessible = GTK_CONTAINER_ACCESSIBLE (data);
|
GtkContainerAccessible *accessible;
|
||||||
GtkContainerAccessibleClass *klass;
|
GtkContainerAccessibleClass *klass;
|
||||||
|
|
||||||
klass = GTK_CONTAINER_ACCESSIBLE_GET_CLASS (accessible);
|
accessible = GTK_CONTAINER_ACCESSIBLE (_gtk_widget_peek_accessible (GTK_WIDGET (container)));
|
||||||
|
if (accessible == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
if (klass->add_gtk)
|
klass = GTK_CONTAINER_ACCESSIBLE_GET_CLASS (accessible);
|
||||||
return klass->add_gtk (container, widget, data);
|
if (klass->add == NULL)
|
||||||
else
|
return;
|
||||||
return 1;
|
|
||||||
|
klass->add (accessible, child);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
void
|
||||||
gtk_container_accessible_remove_gtk (GtkContainer *container,
|
_gtk_container_accessible_remove (GtkContainer *container,
|
||||||
GtkWidget *widget,
|
GtkWidget *child)
|
||||||
gpointer data)
|
|
||||||
{
|
{
|
||||||
GtkContainerAccessible *accessible = GTK_CONTAINER_ACCESSIBLE (data);
|
GtkContainerAccessible *accessible;
|
||||||
GtkContainerAccessibleClass *klass;
|
GtkContainerAccessibleClass *klass;
|
||||||
|
|
||||||
klass = GTK_CONTAINER_ACCESSIBLE_GET_CLASS (accessible);
|
accessible = GTK_CONTAINER_ACCESSIBLE (_gtk_widget_peek_accessible (GTK_WIDGET (container)));
|
||||||
|
if (accessible == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
if (klass->remove_gtk)
|
klass = GTK_CONTAINER_ACCESSIBLE_GET_CLASS (accessible);
|
||||||
return klass->remove_gtk (container, widget, data);
|
if (klass->remove == NULL)
|
||||||
else
|
return;
|
||||||
return 1;
|
|
||||||
|
klass->remove (accessible, child);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static void
|
||||||
gtk_container_accessible_real_add_gtk (GtkContainer *container,
|
gtk_container_accessible_real_add (GtkContainerAccessible *accessible,
|
||||||
GtkWidget *widget,
|
GtkWidget *widget)
|
||||||
gpointer data)
|
|
||||||
{
|
{
|
||||||
AtkObject *atk_parent;
|
GtkContainer *container;
|
||||||
AtkObject *atk_child;
|
AtkObject *atk_child;
|
||||||
GtkContainerAccessible *accessible;
|
|
||||||
gint index;
|
gint index;
|
||||||
|
|
||||||
atk_parent = ATK_OBJECT (data);
|
|
||||||
atk_child = gtk_widget_get_accessible (widget);
|
atk_child = gtk_widget_get_accessible (widget);
|
||||||
accessible = GTK_CONTAINER_ACCESSIBLE (atk_parent);
|
container = GTK_CONTAINER (gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)));
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (atk_child), "accessible-parent");
|
g_object_notify (G_OBJECT (atk_child), "accessible-parent");
|
||||||
g_list_free (accessible->priv->children);
|
g_list_free (accessible->priv->children);
|
||||||
accessible->priv->children = gtk_container_get_children (container);
|
accessible->priv->children = gtk_container_get_children (container);
|
||||||
index = g_list_index (accessible->priv->children, widget);
|
index = g_list_index (accessible->priv->children, widget);
|
||||||
g_signal_emit_by_name (atk_parent, "children-changed::add", index, atk_child, NULL);
|
g_signal_emit_by_name (accessible, "children-changed::add", index, atk_child, NULL);
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static void
|
||||||
gtk_container_accessible_real_remove_gtk (GtkContainer *container,
|
gtk_container_accessible_real_remove (GtkContainerAccessible *accessible,
|
||||||
GtkWidget *widget,
|
GtkWidget *widget)
|
||||||
gpointer data)
|
|
||||||
{
|
{
|
||||||
AtkObject* atk_parent;
|
GtkContainer *container;
|
||||||
AtkObject *atk_child;
|
AtkObject *atk_child;
|
||||||
GtkContainerAccessible *accessible;
|
|
||||||
gint index;
|
gint index;
|
||||||
|
|
||||||
atk_parent = ATK_OBJECT (data);
|
container = GTK_CONTAINER (gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)));
|
||||||
atk_child = gtk_widget_get_accessible (widget);
|
atk_child = gtk_widget_get_accessible (widget);
|
||||||
if (atk_child == NULL)
|
if (atk_child == NULL)
|
||||||
return 1;
|
return;
|
||||||
accessible = GTK_CONTAINER_ACCESSIBLE (atk_parent);
|
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (atk_child), "accessible-parent");
|
g_object_notify (G_OBJECT (atk_child), "accessible-parent");
|
||||||
index = g_list_index (accessible->priv->children, widget);
|
index = g_list_index (accessible->priv->children, widget);
|
||||||
g_list_free (accessible->priv->children);
|
g_list_free (accessible->priv->children);
|
||||||
accessible->priv->children = gtk_container_get_children (container);
|
accessible->priv->children = gtk_container_get_children (container);
|
||||||
if (index >= 0 && index <= g_list_length (accessible->priv->children))
|
if (index >= 0 && index <= g_list_length (accessible->priv->children))
|
||||||
g_signal_emit_by_name (atk_parent, "children-changed::remove", index, atk_child, NULL);
|
g_signal_emit_by_name (accessible, "children-changed::remove", index, atk_child, NULL);
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -163,9 +158,6 @@ gtk_container_accessible_real_initialize (AtkObject *obj,
|
|||||||
|
|
||||||
accessible->priv->children = gtk_container_get_children (GTK_CONTAINER (data));
|
accessible->priv->children = gtk_container_get_children (GTK_CONTAINER (data));
|
||||||
|
|
||||||
g_signal_connect (data, "add", G_CALLBACK (gtk_container_accessible_add_gtk), obj);
|
|
||||||
g_signal_connect (data, "remove", G_CALLBACK (gtk_container_accessible_remove_gtk), obj);
|
|
||||||
|
|
||||||
obj->role = ATK_ROLE_PANEL;
|
obj->role = ATK_ROLE_PANEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,8 +183,8 @@ gtk_container_accessible_class_init (GtkContainerAccessibleClass *klass)
|
|||||||
class->ref_child = gtk_container_accessible_ref_child;
|
class->ref_child = gtk_container_accessible_ref_child;
|
||||||
class->initialize = gtk_container_accessible_real_initialize;
|
class->initialize = gtk_container_accessible_real_initialize;
|
||||||
|
|
||||||
klass->add_gtk = gtk_container_accessible_real_add_gtk;
|
klass->add = gtk_container_accessible_real_add;
|
||||||
klass->remove_gtk = gtk_container_accessible_real_remove_gtk;
|
klass->remove = gtk_container_accessible_real_remove;
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (GtkContainerAccessiblePrivate));
|
g_type_class_add_private (klass, sizeof (GtkContainerAccessiblePrivate));
|
||||||
}
|
}
|
||||||
|
@@ -49,12 +49,10 @@ struct _GtkContainerAccessibleClass
|
|||||||
{
|
{
|
||||||
GtkWidgetAccessibleClass parent_class;
|
GtkWidgetAccessibleClass parent_class;
|
||||||
|
|
||||||
gint (*add_gtk) (GtkContainer *container,
|
void (*add) (GtkContainerAccessible *container,
|
||||||
GtkWidget *widget,
|
GtkWidget *child);
|
||||||
gpointer data);
|
void (*remove) (GtkContainerAccessible *container,
|
||||||
gint (*remove_gtk) (GtkContainer *container,
|
GtkWidget *child);
|
||||||
GtkWidget *widget,
|
|
||||||
gpointer data);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gtk_container_accessible_get_type (void);
|
GType gtk_container_accessible_get_type (void);
|
||||||
|
30
gtk/a11y/gtkcontaineraccessibleprivate.h
Normal file
30
gtk/a11y/gtkcontaineraccessibleprivate.h
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
/* GTK+ - accessibility implementations
|
||||||
|
* Copyright (C) 2002, 2004 Anders Carlsson <andersca@gnu.org>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* Library General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Library General Public
|
||||||
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GTK_CONTAINER_ACCESSIBLE_PRIVATE_H__
|
||||||
|
#define __GTK_CONTAINER_ACCESSIBLE_PRIVATE_H__
|
||||||
|
|
||||||
|
#include <gtk/a11y/gtkcontaineraccessible.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
void _gtk_container_accessible_add (GtkContainer *container, GtkWidget *child);
|
||||||
|
void _gtk_container_accessible_remove (GtkContainer *container, GtkWidget *child);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* __GTK_CONTAINER_ACCESSIBLE_PRIVATE_H__ */
|
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include "gtklinkbuttonaccessibleprivate.h"
|
||||||
#include "gtklinkbuttonaccessible.h"
|
#include "gtkwidgetprivate.h"
|
||||||
|
|
||||||
typedef struct _GtkLinkButtonAccessibleLink GtkLinkButtonAccessibleLink;
|
typedef struct _GtkLinkButtonAccessibleLink GtkLinkButtonAccessibleLink;
|
||||||
typedef struct _GtkLinkButtonAccessibleLinkClass GtkLinkButtonAccessibleLinkClass;
|
typedef struct _GtkLinkButtonAccessibleLinkClass GtkLinkButtonAccessibleLinkClass;
|
||||||
@@ -171,15 +171,6 @@ atk_action_interface_init (AtkActionIface *iface)
|
|||||||
iface->get_name = gtk_link_button_accessible_link_get_name;
|
iface->get_name = gtk_link_button_accessible_link_get_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
activate_link (GtkLinkButton *button,
|
|
||||||
AtkHyperlink *atk_link)
|
|
||||||
{
|
|
||||||
g_signal_emit_by_name (atk_link, "link-activated");
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static AtkHyperlink *
|
static AtkHyperlink *
|
||||||
gtk_link_button_accessible_get_hyperlink (AtkHyperlinkImpl *impl)
|
gtk_link_button_accessible_get_hyperlink (AtkHyperlinkImpl *impl)
|
||||||
{
|
{
|
||||||
@@ -188,8 +179,6 @@ gtk_link_button_accessible_get_hyperlink (AtkHyperlinkImpl *impl)
|
|||||||
if (!button->priv->link)
|
if (!button->priv->link)
|
||||||
{
|
{
|
||||||
button->priv->link = gtk_link_button_accessible_link_new (button);
|
button->priv->link = gtk_link_button_accessible_link_new (button);
|
||||||
g_signal_connect (gtk_accessible_get_widget (GTK_ACCESSIBLE (button)),
|
|
||||||
"activate-link", G_CALLBACK (activate_link), button->priv->link);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return g_object_ref (button->priv->link);
|
return g_object_ref (button->priv->link);
|
||||||
@@ -232,3 +221,17 @@ atk_hypertext_impl_interface_init (AtkHyperlinkImplIface *iface)
|
|||||||
{
|
{
|
||||||
iface->get_hyperlink = gtk_link_button_accessible_get_hyperlink;
|
iface->get_hyperlink = gtk_link_button_accessible_get_hyperlink;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_gtk_link_button_accessible_activate_link (GtkLinkButton *link_button)
|
||||||
|
{
|
||||||
|
GtkLinkButtonAccessible *accessible;
|
||||||
|
|
||||||
|
accessible = GTK_LINK_BUTTON_ACCESSIBLE (_gtk_widget_peek_accessible (GTK_WIDGET (link_button)));
|
||||||
|
if (accessible == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (accessible->priv->link)
|
||||||
|
g_signal_emit_by_name (accessible->priv->link, "link-activated");
|
||||||
|
}
|
||||||
|
|
||||||
|
29
gtk/a11y/gtklinkbuttonaccessibleprivate.h
Normal file
29
gtk/a11y/gtklinkbuttonaccessibleprivate.h
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
/* GTK+ - accessibility implementations
|
||||||
|
* Copyright (C) 2013 Benjamin Otte <otte@gnome.org>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* Library General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Library General Public
|
||||||
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GTK_LINK_BUTTON_ACCESSIBLE_PRIVATE_H__
|
||||||
|
#define __GTK_LINK_BUTTON_ACCESSIBLE_PRIVATE_H__
|
||||||
|
|
||||||
|
#include <gtk/a11y/gtklinkbuttonaccessible.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
void _gtk_link_button_accessible_activate_link (GtkLinkButton *link_button);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* __GTK_LINK_BUTTON_ACCESSIBLE_PRIVATE_H__ */
|
@@ -834,8 +834,7 @@ menu_item_add_gtk (GtkContainer *container,
|
|||||||
parent_widget = gtk_menu_get_attach_widget (GTK_MENU (container));
|
parent_widget = gtk_menu_get_attach_widget (GTK_MENU (container));
|
||||||
if (GTK_IS_MENU_ITEM (parent_widget))
|
if (GTK_IS_MENU_ITEM (parent_widget))
|
||||||
{
|
{
|
||||||
GTK_CONTAINER_ACCESSIBLE_CLASS (gtk_menu_item_accessible_parent_class)->add_gtk (container, widget, gtk_widget_get_accessible (parent_widget));
|
GTK_CONTAINER_ACCESSIBLE_CLASS (gtk_menu_item_accessible_parent_class)->add (GTK_CONTAINER_ACCESSIBLE (gtk_widget_get_accessible (parent_widget)), widget);
|
||||||
|
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -851,7 +850,7 @@ menu_item_remove_gtk (GtkContainer *container,
|
|||||||
parent_widget = gtk_menu_get_attach_widget (GTK_MENU (container));
|
parent_widget = gtk_menu_get_attach_widget (GTK_MENU (container));
|
||||||
if (GTK_IS_MENU_ITEM (parent_widget))
|
if (GTK_IS_MENU_ITEM (parent_widget))
|
||||||
{
|
{
|
||||||
GTK_CONTAINER_ACCESSIBLE_CLASS (gtk_menu_item_accessible_parent_class)->remove_gtk (container, widget, gtk_widget_get_accessible (parent_widget));
|
GTK_CONTAINER_ACCESSIBLE_CLASS (gtk_menu_item_accessible_parent_class)->remove (GTK_CONTAINER_ACCESSIBLE (gtk_widget_get_accessible (parent_widget)), widget);
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@@ -189,6 +189,18 @@ gtk_notebook_accessible_finalize (GObject *object)
|
|||||||
G_OBJECT_CLASS (gtk_notebook_accessible_parent_class)->finalize (object);
|
G_OBJECT_CLASS (gtk_notebook_accessible_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gint
|
||||||
|
gtk_notebook_accessible_get_n_children (AtkObject *obj)
|
||||||
|
{
|
||||||
|
GtkWidget *widget;
|
||||||
|
|
||||||
|
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
|
||||||
|
if (widget == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return gtk_notebook_get_n_pages (GTK_NOTEBOOK (widget));
|
||||||
|
}
|
||||||
|
|
||||||
static AtkObject *
|
static AtkObject *
|
||||||
gtk_notebook_accessible_ref_child (AtkObject *obj,
|
gtk_notebook_accessible_ref_child (AtkObject *obj,
|
||||||
gint i)
|
gint i)
|
||||||
@@ -314,14 +326,15 @@ gtk_notebook_accessible_class_init (GtkNotebookAccessibleClass *klass)
|
|||||||
|
|
||||||
gobject_class->finalize = gtk_notebook_accessible_finalize;
|
gobject_class->finalize = gtk_notebook_accessible_finalize;
|
||||||
|
|
||||||
|
class->get_n_children = gtk_notebook_accessible_get_n_children;
|
||||||
class->ref_child = gtk_notebook_accessible_ref_child;
|
class->ref_child = gtk_notebook_accessible_ref_child;
|
||||||
class->initialize = gtk_notebook_accessible_initialize;
|
class->initialize = gtk_notebook_accessible_initialize;
|
||||||
|
|
||||||
widget_class->notify_gtk = gtk_notebook_accessible_notify_gtk;
|
widget_class->notify_gtk = gtk_notebook_accessible_notify_gtk;
|
||||||
|
|
||||||
/* we listen to page-added/-removed, so we don't care about these */
|
/* we listen to page-added/-removed, so we don't care about these */
|
||||||
container_class->add_gtk = NULL;
|
container_class->add = NULL;
|
||||||
container_class->remove_gtk = NULL;
|
container_class->remove = NULL;
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (GtkNotebookAccessiblePrivate));
|
g_type_class_add_private (klass, sizeof (GtkNotebookAccessiblePrivate));
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include "gtkrangeaccessible.h"
|
#include "gtkrangeaccessible.h"
|
||||||
|
#include "gtkwidgetprivate.h"
|
||||||
|
|
||||||
|
|
||||||
static void atk_action_interface_init (AtkActionIface *iface);
|
static void atk_action_interface_init (AtkActionIface *iface);
|
||||||
@@ -29,90 +30,21 @@ G_DEFINE_TYPE_WITH_CODE (GtkRangeAccessible, gtk_range_accessible, GTK_TYPE_WIDG
|
|||||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init)
|
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init)
|
||||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_VALUE, atk_value_interface_init))
|
G_IMPLEMENT_INTERFACE (ATK_TYPE_VALUE, atk_value_interface_init))
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_range_accessible_value_changed (GtkAdjustment *adjustment,
|
|
||||||
gpointer data)
|
|
||||||
{
|
|
||||||
g_object_notify (G_OBJECT (data), "accessible-value");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_range_accessible_initialize (AtkObject *obj,
|
gtk_range_accessible_initialize (AtkObject *obj,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkRangeAccessible *range = GTK_RANGE_ACCESSIBLE (obj);
|
|
||||||
GtkAdjustment *adj;
|
|
||||||
GtkRange *gtk_range;
|
|
||||||
|
|
||||||
ATK_OBJECT_CLASS (gtk_range_accessible_parent_class)->initialize (obj, data);
|
ATK_OBJECT_CLASS (gtk_range_accessible_parent_class)->initialize (obj, data);
|
||||||
|
|
||||||
gtk_range = GTK_RANGE (data);
|
|
||||||
/*
|
|
||||||
* If a GtkAdjustment already exists for the GtkRange,
|
|
||||||
* create the GailAdjustment
|
|
||||||
*/
|
|
||||||
adj = gtk_range_get_adjustment (gtk_range);
|
|
||||||
if (adj)
|
|
||||||
g_signal_connect (adj, "value-changed",
|
|
||||||
G_CALLBACK (gtk_range_accessible_value_changed),
|
|
||||||
range);
|
|
||||||
|
|
||||||
obj->role = ATK_ROLE_SLIDER;
|
obj->role = ATK_ROLE_SLIDER;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_range_accessible_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
GtkRangeAccessible *range = GTK_RANGE_ACCESSIBLE (object);
|
|
||||||
GtkWidget *widget;
|
|
||||||
GtkAdjustment *adj;
|
|
||||||
|
|
||||||
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (object));
|
|
||||||
if (widget)
|
|
||||||
{
|
|
||||||
adj = gtk_range_get_adjustment (GTK_RANGE (widget));
|
|
||||||
if (adj)
|
|
||||||
g_signal_handlers_disconnect_by_func (adj,
|
|
||||||
gtk_range_accessible_value_changed,
|
|
||||||
range);
|
|
||||||
}
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (gtk_range_accessible_parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_range_accessible_notify_gtk (GObject *obj,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GtkWidget *widget = GTK_WIDGET (obj);
|
|
||||||
GtkAdjustment *adj;
|
|
||||||
AtkObject *range;
|
|
||||||
|
|
||||||
if (strcmp (pspec->name, "adjustment") == 0)
|
|
||||||
{
|
|
||||||
range = gtk_widget_get_accessible (widget);
|
|
||||||
adj = gtk_range_get_adjustment (GTK_RANGE (widget));
|
|
||||||
g_signal_connect (adj, "value-changed",
|
|
||||||
G_CALLBACK (gtk_range_accessible_value_changed),
|
|
||||||
range);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_range_accessible_parent_class)->notify_gtk (obj, pspec);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_range_accessible_class_init (GtkRangeAccessibleClass *klass)
|
gtk_range_accessible_class_init (GtkRangeAccessibleClass *klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
|
||||||
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
|
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
|
||||||
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
|
|
||||||
|
|
||||||
widget_class->notify_gtk = gtk_range_accessible_notify_gtk;
|
|
||||||
|
|
||||||
class->initialize = gtk_range_accessible_initialize;
|
class->initialize = gtk_range_accessible_initialize;
|
||||||
|
|
||||||
gobject_class->finalize = gtk_range_accessible_finalize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -313,3 +245,13 @@ atk_action_interface_init (AtkActionIface *iface)
|
|||||||
iface->get_keybinding = gtk_range_accessible_get_keybinding;
|
iface->get_keybinding = gtk_range_accessible_get_keybinding;
|
||||||
iface->get_name = gtk_range_accessible_action_get_name;
|
iface->get_name = gtk_range_accessible_action_get_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_gtk_range_accessible_value_changed (GtkRange *range)
|
||||||
|
{
|
||||||
|
AtkObject *accessible;
|
||||||
|
|
||||||
|
accessible = _gtk_widget_peek_accessible (GTK_WIDGET (range));
|
||||||
|
if (accessible)
|
||||||
|
g_object_notify (G_OBJECT (accessible), "accessible-value");
|
||||||
|
}
|
||||||
|
29
gtk/a11y/gtkrangeaccessibleprivate.h
Normal file
29
gtk/a11y/gtkrangeaccessibleprivate.h
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
/* GTK+ - accessibility implementations
|
||||||
|
* Copyright (C) 2002, 2004 Anders Carlsson <andersca@gnu.org>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* Library General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Library General Public
|
||||||
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GTK_RANGE_ACCESSIBLE_PRIVATE_H__
|
||||||
|
#define __GTK_RANGE_ACCESSIBLE_PRIVATE_H__
|
||||||
|
|
||||||
|
#include <gtk/a11y/gtkrangeaccessible.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
void _gtk_range_accessible_value_changed (GtkRange *range);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* __GTK_RANGE_ACCESSIBLE_PRIVATE_H__ */
|
@@ -30,28 +30,12 @@ G_DEFINE_TYPE_WITH_CODE (GtkScaleButtonAccessible, gtk_scale_button_accessible,
|
|||||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init)
|
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init)
|
||||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_VALUE, atk_value_interface_init));
|
G_IMPLEMENT_INTERFACE (ATK_TYPE_VALUE, atk_value_interface_init));
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_scale_button_accessible_value_changed (GtkAdjustment *adjustment,
|
|
||||||
gpointer data)
|
|
||||||
{
|
|
||||||
g_object_notify (G_OBJECT (data), "accessible-value");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_scale_button_accessible_initialize (AtkObject *obj,
|
gtk_scale_button_accessible_initialize (AtkObject *obj,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkAdjustment *adjustment;
|
|
||||||
|
|
||||||
ATK_OBJECT_CLASS (gtk_scale_button_accessible_parent_class)->initialize (obj, data);
|
ATK_OBJECT_CLASS (gtk_scale_button_accessible_parent_class)->initialize (obj, data);
|
||||||
|
|
||||||
adjustment = gtk_scale_button_get_adjustment (GTK_SCALE_BUTTON (data));
|
|
||||||
if (adjustment)
|
|
||||||
g_signal_connect (adjustment,
|
|
||||||
"value-changed",
|
|
||||||
G_CALLBACK (gtk_scale_button_accessible_value_changed),
|
|
||||||
obj);
|
|
||||||
|
|
||||||
obj->role = ATK_ROLE_SLIDER;
|
obj->role = ATK_ROLE_SLIDER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,21 +44,13 @@ gtk_scale_button_accessible_notify_gtk (GObject *obj,
|
|||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GtkScaleButton *scale_button;
|
GtkScaleButton *scale_button;
|
||||||
GtkScaleButtonAccessible *accessible;
|
AtkObject *accessible;
|
||||||
|
|
||||||
scale_button = GTK_SCALE_BUTTON (obj);
|
scale_button = GTK_SCALE_BUTTON (obj);
|
||||||
accessible = GTK_SCALE_BUTTON_ACCESSIBLE (gtk_widget_get_accessible (GTK_WIDGET (scale_button)));
|
accessible = gtk_widget_get_accessible (GTK_WIDGET (scale_button));
|
||||||
|
|
||||||
if (strcmp (pspec->name, "adjustment") == 0)
|
if (strcmp (pspec->name, "value") == 0)
|
||||||
{
|
g_object_notify (G_OBJECT (accessible), "accessible-value");
|
||||||
GtkAdjustment* adjustment;
|
|
||||||
|
|
||||||
adjustment = gtk_scale_button_get_adjustment (scale_button);
|
|
||||||
g_signal_connect (adjustment,
|
|
||||||
"value-changed",
|
|
||||||
G_CALLBACK (gtk_scale_button_accessible_value_changed),
|
|
||||||
accessible);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_scale_button_accessible_parent_class)->notify_gtk (obj, pspec);
|
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_scale_button_accessible_parent_class)->notify_gtk (obj, pspec);
|
||||||
|
@@ -27,35 +27,12 @@ static void atk_value_interface_init (AtkValueIface *iface);
|
|||||||
G_DEFINE_TYPE_WITH_CODE (GtkSpinButtonAccessible, gtk_spin_button_accessible, GTK_TYPE_ENTRY_ACCESSIBLE,
|
G_DEFINE_TYPE_WITH_CODE (GtkSpinButtonAccessible, gtk_spin_button_accessible, GTK_TYPE_ENTRY_ACCESSIBLE,
|
||||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_VALUE, atk_value_interface_init))
|
G_IMPLEMENT_INTERFACE (ATK_TYPE_VALUE, atk_value_interface_init))
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_spin_button_accessible_value_changed (GtkAdjustment *adjustment,
|
|
||||||
gpointer data)
|
|
||||||
{
|
|
||||||
GtkSpinButtonAccessible *spin_button;
|
|
||||||
|
|
||||||
if (adjustment == NULL || data == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
spin_button = GTK_SPIN_BUTTON_ACCESSIBLE (data);
|
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (spin_button), "accessible-value");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_spin_button_accessible_initialize (AtkObject *obj,
|
gtk_spin_button_accessible_initialize (AtkObject *obj,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkAdjustment *adjustment;
|
|
||||||
|
|
||||||
ATK_OBJECT_CLASS (gtk_spin_button_accessible_parent_class)->initialize (obj, data);
|
ATK_OBJECT_CLASS (gtk_spin_button_accessible_parent_class)->initialize (obj, data);
|
||||||
|
|
||||||
adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (data));
|
|
||||||
if (adjustment)
|
|
||||||
g_signal_connect (adjustment,
|
|
||||||
"value-changed",
|
|
||||||
G_CALLBACK (gtk_spin_button_accessible_value_changed),
|
|
||||||
obj);
|
|
||||||
|
|
||||||
obj->role = ATK_ROLE_SPIN_BUTTON;
|
obj->role = ATK_ROLE_SPIN_BUTTON;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,15 +43,8 @@ gtk_spin_button_accessible_notify_gtk (GObject *obj,
|
|||||||
GtkWidget *widget = GTK_WIDGET (obj);
|
GtkWidget *widget = GTK_WIDGET (obj);
|
||||||
GtkSpinButtonAccessible *spin_button = GTK_SPIN_BUTTON_ACCESSIBLE (gtk_widget_get_accessible (widget));
|
GtkSpinButtonAccessible *spin_button = GTK_SPIN_BUTTON_ACCESSIBLE (gtk_widget_get_accessible (widget));
|
||||||
|
|
||||||
if (strcmp (pspec->name, "adjustment") == 0)
|
if (strcmp (pspec->name, "value") == 0)
|
||||||
{
|
g_object_notify (G_OBJECT (spin_button), "accessible-value");
|
||||||
GtkAdjustment* adjustment;
|
|
||||||
|
|
||||||
adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget));
|
|
||||||
g_signal_connect (adjustment, "value-changed",
|
|
||||||
G_CALLBACK (gtk_spin_button_accessible_value_changed),
|
|
||||||
spin_button);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_spin_button_accessible_parent_class)->notify_gtk (obj, pspec);
|
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_spin_button_accessible_parent_class)->notify_gtk (obj, pspec);
|
||||||
}
|
}
|
||||||
|
@@ -17,37 +17,20 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include "gtkstatusbaraccessible.h"
|
#include "gtkstatusbaraccessible.h"
|
||||||
|
#include "gtkstatusbaraccessibleprivate.h"
|
||||||
|
|
||||||
|
#include "gtkwidgetprivate.h"
|
||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GtkStatusbarAccessible, gtk_statusbar_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE)
|
G_DEFINE_TYPE (GtkStatusbarAccessible, gtk_statusbar_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE)
|
||||||
|
|
||||||
static void
|
|
||||||
text_changed (GtkStatusbar *statusbar,
|
|
||||||
guint context_id,
|
|
||||||
const gchar *text,
|
|
||||||
AtkObject *obj)
|
|
||||||
{
|
|
||||||
if (!obj->name)
|
|
||||||
g_object_notify (G_OBJECT (obj), "accessible-name");
|
|
||||||
g_signal_emit_by_name (obj, "visible-data-changed");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_statusbar_accessible_initialize (AtkObject *obj,
|
gtk_statusbar_accessible_initialize (AtkObject *obj,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkWidget *statusbar = data;
|
|
||||||
|
|
||||||
ATK_OBJECT_CLASS (gtk_statusbar_accessible_parent_class)->initialize (obj, data);
|
ATK_OBJECT_CLASS (gtk_statusbar_accessible_parent_class)->initialize (obj, data);
|
||||||
|
|
||||||
g_signal_connect_after (statusbar, "text-pushed",
|
|
||||||
G_CALLBACK (text_changed), obj);
|
|
||||||
g_signal_connect_after (statusbar, "text-popped",
|
|
||||||
G_CALLBACK (text_changed), obj);
|
|
||||||
|
|
||||||
obj->role = ATK_ROLE_STATUSBAR;
|
obj->role = ATK_ROLE_STATUSBAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,11 +121,25 @@ gtk_statusbar_accessible_class_init (GtkStatusbarAccessibleClass *klass)
|
|||||||
* As we report the statusbar as having no children
|
* As we report the statusbar as having no children
|
||||||
* we are not interested in add and remove signals
|
* we are not interested in add and remove signals
|
||||||
*/
|
*/
|
||||||
container_class->add_gtk = NULL;
|
container_class->add = NULL;
|
||||||
container_class->remove_gtk = NULL;
|
container_class->remove = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_statusbar_accessible_init (GtkStatusbarAccessible *bar)
|
gtk_statusbar_accessible_init (GtkStatusbarAccessible *bar)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_gtk_statusbar_accessible_update_text (GtkStatusbar *statusbar)
|
||||||
|
{
|
||||||
|
AtkObject *obj;
|
||||||
|
|
||||||
|
obj = _gtk_widget_peek_accessible (GTK_WIDGET (statusbar));
|
||||||
|
if (obj == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!obj->name)
|
||||||
|
g_object_notify (G_OBJECT (obj), "accessible-name");
|
||||||
|
g_signal_emit_by_name (obj, "visible-data-changed");
|
||||||
|
}
|
||||||
|
29
gtk/a11y/gtkstatusbaraccessibleprivate.h
Normal file
29
gtk/a11y/gtkstatusbaraccessibleprivate.h
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
/* GTK+ - accessibility implementations
|
||||||
|
* Copyright (C) 2002, 2004 Anders Carlsson <andersca@gnu.org>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* Library General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Library General Public
|
||||||
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GTK_STATUSBAR_ACCESSIBLE_PRIVATE_H__
|
||||||
|
#define __GTK_STATUSBAR_ACCESSIBLE_PRIVATE_H__
|
||||||
|
|
||||||
|
#include <gtk/a11y/gtkstatusbaraccessible.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
void _gtk_statusbar_accessible_update_text (GtkStatusbar *statusbar);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* __GTK_STATUSBAR_ACCESSIBLE_PRIVATE_H__ */
|
@@ -44,7 +44,6 @@ gtk_toplevel_accessible_initialize (AtkObject *accessible,
|
|||||||
ATK_OBJECT_CLASS (gtk_toplevel_accessible_parent_class)->initialize (accessible, data);
|
ATK_OBJECT_CLASS (gtk_toplevel_accessible_parent_class)->initialize (accessible, data);
|
||||||
|
|
||||||
accessible->role = ATK_ROLE_APPLICATION;
|
accessible->role = ATK_ROLE_APPLICATION;
|
||||||
accessible->name = g_get_prgname ();
|
|
||||||
accessible->accessible_parent = NULL;
|
accessible->accessible_parent = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,6 +86,12 @@ gtk_toplevel_accessible_ref_child (AtkObject *obj,
|
|||||||
return atk_obj;
|
return atk_obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
gtk_toplevel_accessible_get_name (AtkObject *obj)
|
||||||
|
{
|
||||||
|
return g_get_prgname ();
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
is_combo_window (GtkWidget *widget)
|
is_combo_window (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
@@ -143,6 +148,7 @@ gtk_toplevel_accessible_class_init (GtkToplevelAccessibleClass *klass)
|
|||||||
class->get_n_children = gtk_toplevel_accessible_get_n_children;
|
class->get_n_children = gtk_toplevel_accessible_get_n_children;
|
||||||
class->ref_child = gtk_toplevel_accessible_ref_child;
|
class->ref_child = gtk_toplevel_accessible_ref_child;
|
||||||
class->get_parent = NULL;
|
class->get_parent = NULL;
|
||||||
|
class->get_name = gtk_toplevel_accessible_get_name;
|
||||||
|
|
||||||
g_object_class->finalize = gtk_toplevel_accessible_object_finalize;
|
g_object_class->finalize = gtk_toplevel_accessible_object_finalize;
|
||||||
|
|
||||||
|
@@ -525,8 +525,8 @@ gtk_tree_view_accessible_class_init (GtkTreeViewAccessibleClass *klass)
|
|||||||
* we do not represent these as children so we do not want to report
|
* we do not represent these as children so we do not want to report
|
||||||
* children added or deleted when these changed.
|
* children added or deleted when these changed.
|
||||||
*/
|
*/
|
||||||
container_class->add_gtk = NULL;
|
container_class->add = NULL;
|
||||||
container_class->remove_gtk = NULL;
|
container_class->remove = NULL;
|
||||||
|
|
||||||
gobject_class->finalize = gtk_tree_view_accessible_finalize;
|
gobject_class->finalize = gtk_tree_view_accessible_finalize;
|
||||||
|
|
||||||
|
@@ -65,7 +65,7 @@
|
|||||||
#include "gtkprivate.h"
|
#include "gtkprivate.h"
|
||||||
#include "gtkintl.h"
|
#include "gtkintl.h"
|
||||||
|
|
||||||
#include "a11y/gtklinkbuttonaccessible.h"
|
#include "a11y/gtklinkbuttonaccessibleprivate.h"
|
||||||
|
|
||||||
struct _GtkLinkButtonPrivate
|
struct _GtkLinkButtonPrivate
|
||||||
{
|
{
|
||||||
@@ -548,6 +548,8 @@ gtk_link_button_activate_link (GtkLinkButton *link_button)
|
|||||||
GdkScreen *screen;
|
GdkScreen *screen;
|
||||||
GError *error;
|
GError *error;
|
||||||
|
|
||||||
|
_gtk_link_button_accessible_activate_link (link_button);
|
||||||
|
|
||||||
if (gtk_widget_has_screen (GTK_WIDGET (link_button)))
|
if (gtk_widget_has_screen (GTK_WIDGET (link_button)))
|
||||||
screen = gtk_widget_get_screen (GTK_WIDGET (link_button));
|
screen = gtk_widget_get_screen (GTK_WIDGET (link_button));
|
||||||
else
|
else
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include "gtkadjustment.h"
|
#include "gtkadjustment.h"
|
||||||
#include "gtkcolorscaleprivate.h"
|
#include "gtkcolorscaleprivate.h"
|
||||||
|
#include "gtkwidgetprivate.h"
|
||||||
#include "gtkintl.h"
|
#include "gtkintl.h"
|
||||||
#include "gtkmain.h"
|
#include "gtkmain.h"
|
||||||
#include "gtkmarshalers.h"
|
#include "gtkmarshalers.h"
|
||||||
@@ -41,7 +42,7 @@
|
|||||||
#include "gtkscrollbar.h"
|
#include "gtkscrollbar.h"
|
||||||
#include "gtktypebuiltins.h"
|
#include "gtktypebuiltins.h"
|
||||||
#include "gtkwindow.h"
|
#include "gtkwindow.h"
|
||||||
#include "a11y/gtkrangeaccessible.h"
|
#include "a11y/gtkrangeaccessibleprivate.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gtkrange
|
* SECTION:gtkrange
|
||||||
@@ -3042,6 +3043,8 @@ gtk_range_adjustment_value_changed (GtkAdjustment *adjustment,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
g_signal_emit (range, signals[VALUE_CHANGED], 0);
|
g_signal_emit (range, signals[VALUE_CHANGED], 0);
|
||||||
|
|
||||||
|
_gtk_range_accessible_value_changed (range);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -37,7 +37,7 @@
|
|||||||
#include "gtkbuildable.h"
|
#include "gtkbuildable.h"
|
||||||
#include "gtkorientable.h"
|
#include "gtkorientable.h"
|
||||||
#include "gtktypebuiltins.h"
|
#include "gtktypebuiltins.h"
|
||||||
#include "a11y/gtkstatusbaraccessible.h"
|
#include "a11y/gtkstatusbaraccessibleprivate.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gtkstatusbar
|
* SECTION:gtkstatusbar
|
||||||
@@ -286,6 +286,8 @@ gtk_statusbar_update (GtkStatusbar *statusbar,
|
|||||||
text = "";
|
text = "";
|
||||||
|
|
||||||
gtk_label_set_text (GTK_LABEL (priv->label), text);
|
gtk_label_set_text (GTK_LABEL (priv->label), text);
|
||||||
|
|
||||||
|
_gtk_statusbar_accessible_update_text (statusbar);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -62,6 +62,7 @@
|
|||||||
#include "gtkdebug.h"
|
#include "gtkdebug.h"
|
||||||
#include "gtkplug.h"
|
#include "gtkplug.h"
|
||||||
#include "gtktypebuiltins.h"
|
#include "gtktypebuiltins.h"
|
||||||
|
#include "a11y/gtkcontaineraccessibleprivate.h"
|
||||||
#include "a11y/gtkwidgetaccessible.h"
|
#include "a11y/gtkwidgetaccessible.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3865,6 +3866,8 @@ gtk_widget_unparent (GtkWidget *widget)
|
|||||||
|
|
||||||
/* keep this function in sync with gtk_menu_detach() */
|
/* keep this function in sync with gtk_menu_detach() */
|
||||||
|
|
||||||
|
_gtk_container_accessible_remove (GTK_CONTAINER (priv->parent), widget);
|
||||||
|
|
||||||
gtk_widget_push_verify_invariants (widget);
|
gtk_widget_push_verify_invariants (widget);
|
||||||
|
|
||||||
g_object_freeze_notify (G_OBJECT (widget));
|
g_object_freeze_notify (G_OBJECT (widget));
|
||||||
@@ -8079,6 +8082,8 @@ gtk_widget_set_parent (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
gtk_widget_pop_verify_invariants (widget);
|
gtk_widget_pop_verify_invariants (widget);
|
||||||
|
|
||||||
|
_gtk_container_accessible_add (GTK_CONTAINER (parent), widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user