gail, iconview: use atk_component_get_extents()

From the warning-cleanups branch.
This commit is contained in:
Daemonratte 2026-10-15 11:30:51 +02:00
commit c5f7672ee1
10 changed files with 16 additions and 13 deletions

View file

@ -8065,7 +8065,7 @@ gtk_icon_view_item_accessible_image_get_image_position (AtkImage *image,
if (atk_state_set_contains_state (item->state_set, ATK_STATE_DEFUNCT))
return;
atk_component_get_position (ATK_COMPONENT (image), x, y, coord_type);
atk_component_get_extents (ATK_COMPONENT (image), x, y, NULL, NULL, coord_type);
if (get_pixbuf_box (GTK_ICON_VIEW (item->widget), item->item, &box))
{
@ -8749,7 +8749,7 @@ gtk_icon_view_item_accessible_get_extents (AtkComponent *component,
if (gtk_icon_view_item_accessible_is_showing (item))
{
parent_obj = gtk_widget_get_accessible (item->widget);
atk_component_get_position (ATK_COMPONENT (parent_obj), &l_x, &l_y, coord_type);
atk_component_get_extents (ATK_COMPONENT (parent_obj), &l_x, &l_y, NULL, NULL, coord_type);
*x = l_x + item->item->x;
*y = l_y + item->item->y;
}

View file

@ -1021,7 +1021,7 @@ gail_button_get_image_position (AtkImage *image,
if (button_image != NULL)
{
obj = gtk_widget_get_accessible (GTK_WIDGET (button_image));
atk_component_get_position (ATK_COMPONENT (obj), x, y, coord_type);
atk_component_get_extents (ATK_COMPONENT (obj), x, y, NULL, NULL, coord_type);
}
else
{

View file

@ -179,7 +179,7 @@ gail_image_get_image_position (AtkImage *image,
gint *y,
AtkCoordType coord_type)
{
atk_component_get_position (ATK_COMPONENT (image), x, y, coord_type);
atk_component_get_extents (ATK_COMPONENT (image), x, y, NULL, NULL, coord_type);
}
static void

View file

@ -150,7 +150,7 @@ gail_image_cell_get_image_position (AtkImage *image,
gint *y,
AtkCoordType coord_type)
{
atk_component_get_position (ATK_COMPONENT (image), x, y, coord_type);
atk_component_get_extents (ATK_COMPONENT (image), x, y, NULL, NULL, coord_type);
}
static void

View file

@ -467,7 +467,7 @@ gail_notebook_page_get_extents (AtkComponent *component,
child = atk_object_ref_accessible_child (ATK_OBJECT (component), 0);
gail_return_if_fail (child);
atk_component_get_position (ATK_COMPONENT (child), x, y, coord_type);
atk_component_get_extents (ATK_COMPONENT (child), x, y, NULL, NULL, coord_type);
g_object_unref (child);
}
else

View file

@ -103,7 +103,7 @@ gail_pixmap_get_image_position (AtkImage *obj,
gint *y,
AtkCoordType coord_type)
{
atk_component_get_position (ATK_COMPONENT (obj), x, y, coord_type);
atk_component_get_extents (ATK_COMPONENT (obj), x, y, NULL, NULL, coord_type);
}
static void

View file

@ -251,7 +251,7 @@ gail_misc_layout_get_run_attributes (AtkAttributeSet *attrib_set,
if ((pango_string = (PangoAttrString*) pango_attr_iterator_get (iter,
PANGO_ATTR_FAMILY)) != NULL)
{
value = g_strdup_printf("%s", pango_string->value);
value = g_strdup (pango_string->value);
attrib_set = gail_misc_add_attribute (attrib_set,
ATK_TEXT_ATTR_FAMILY_NAME,
value);

View file

@ -1514,9 +1514,9 @@ _button_watcher (GSignalInvocationHint *ihint,
event = (GdkEventButton *) gp;
aobject = gtk_widget_get_accessible (widget);
aobject_x = aobject_y = 0;
atk_component_get_position (ATK_COMPONENT (aobject),
&aobject_x, &aobject_y,
ATK_XY_WINDOW);
atk_component_get_extents (ATK_COMPONENT (aobject),
&aobject_x, &aobject_y, NULL, NULL,
ATK_XY_WINDOW);
x = aobject_x + (gint) event->x;
y = aobject_y + (gint) event->y;
child = atk_component_ref_accessible_at_point (ATK_COMPONENT (aobject),

View file

@ -16,8 +16,11 @@ static void _check_position (AtkObject *obj)
return;
atk_component_get_extents (ATK_COMPONENT(obj), &x, &y, &width, &height, ATK_XY_SCREEN);
/* compares the deprecated calls with get_extents on purpose */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
atk_component_get_position (ATK_COMPONENT(obj), &x1, &y1, ATK_XY_SCREEN );
atk_component_get_size (ATK_COMPONENT(obj), &width1, &height1);
G_GNUC_END_IGNORE_DEPRECATIONS
if ((x1 != x) || (y1 != y))
{
g_print ("atk_component_get_extents and atk_get_position give different"
@ -29,7 +32,7 @@ static void _check_position (AtkObject *obj)
" values: %d,%d %d,%d\n", width, height, width1, height1);
}
atk_component_get_position (ATK_COMPONENT(obj), &x1, &y1, ATK_XY_SCREEN);
atk_component_get_extents (ATK_COMPONENT(obj), &x1, &y1, NULL, NULL, ATK_XY_SCREEN);
g_print ("Object Type: %s\n", g_type_name (G_OBJECT_TYPE (obj)));
g_print ("Object at %d, %d on screen\n", x1, y1);
g_print ("Object at %d, %d, size: %d, %d\n", x, y, width, height);

View file

@ -69,7 +69,7 @@ static gint _test_paned (gpointer data)
last_position = position;
position *= 2;
g_value_set_int (value, position);
gail_test_value_set_current_value (ATK_VALUE (obj), value);
(void) gail_test_value_set_current_value (ATK_VALUE (obj), value);
times++;
}
if (times < 4)