Merge branch 'wip/matthiasc/can-focus' into 'master'

Implement new focus behavior

See merge request GNOME/gtk!1652
This commit is contained in:
Matthias Clasen 2020-04-10 00:26:53 +00:00
commit a11f9fea76
233 changed files with 8332 additions and 1385 deletions

View File

@ -189,8 +189,6 @@ gtk_font_plane_init (GtkFontPlane *plane)
{
GtkGesture *gesture;
gtk_widget_set_can_focus (GTK_WIDGET (plane), TRUE);
gesture = gtk_gesture_drag_new ();
g_signal_connect (gesture, "drag-begin",
G_CALLBACK (plane_drag_gesture_begin), plane);

View File

@ -470,6 +470,22 @@
</para>
</section>
<section>
<title>Focus handling changes</title>
<para>
The semantics of the #GtkWidget:can-focus property have changed.
In GTK 3, this property only meant that the widget itself would not
accept keyboard input, but its children still might (in the case of
containers). In GTK 4, if :can-focus is %FALSE, the focus cannot enter
the widget or any of its descendents, and the default value has changed
from %FALSE to %TRUE.
</para>
<para>
The recommended way to influence focus behavior of custom widgets
in GTK 4 is to override the focus() and grab_focus() vfuncs.
</para>
</section>
<section>
<title>Stop using GtkEventBox</title>
<para>

View File

@ -293,6 +293,36 @@ gtk_widget_accessible_ref_relation_set (AtkObject *obj)
return relation_set;
}
static gboolean
takes_focus (GtkWidget *widget)
{
if (GTK_IS_NOTEBOOK (widget) ||
GTK_IS_BUTTON (widget))
return TRUE;
if (GTK_IS_ACCEL_LABEL (widget) ||
GTK_IS_CONTAINER(widget) ||
GTK_IS_DRAG_ICON (widget) ||
GTK_IS_DRAWING_AREA (widget) ||
GTK_IS_GL_AREA (widget) ||
GTK_IS_IMAGE (widget) ||
GTK_IS_LEVEL_BAR (widget) ||
GTK_IS_MEDIA_CONTROLS (widget) ||
GTK_IS_PICTURE (widget) ||
GTK_IS_PROGRESS_BAR (widget) ||
GTK_IS_SCROLLBAR (widget) ||
GTK_IS_SEPARATOR (widget) ||
GTK_IS_SHORTCUT_LABEL (widget) ||
GTK_IS_SHORTCUTS_SHORTCUT (widget) ||
GTK_IS_SPINNER (widget) ||
GTK_IS_STACK_SIDEBAR (widget) ||
GTK_IS_STATUSBAR (widget) ||
GTK_IS_VIDEO (widget))
return FALSE;
return gtk_widget_get_can_focus (widget);
}
static AtkStateSet *
gtk_widget_accessible_ref_state_set (AtkObject *accessible)
{
@ -312,7 +342,7 @@ gtk_widget_accessible_ref_state_set (AtkObject *accessible)
atk_state_set_add_state (state_set, ATK_STATE_ENABLED);
}
if (gtk_widget_get_can_focus (widget))
if (takes_focus (widget))
{
atk_state_set_add_state (state_set, ATK_STATE_FOCUSABLE);
}

View File

@ -128,6 +128,9 @@ gtk_accel_label_class_init (GtkAccelLabelClass *class)
gobject_class->set_property = gtk_accel_label_set_property;
gobject_class->get_property = gtk_accel_label_get_property;
widget_class->focus = gtk_widget_focus_none;
widget_class->grab_focus = gtk_widget_grab_focus_none;
gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_ACCEL_LABEL);
props[PROP_LABEL] =

View File

@ -57,6 +57,7 @@
#include "gtkcellrendererpixbuf.h"
#include "gtkcellrenderertext.h"
#include "gtkcombobox.h"
#include "gtkwidgetprivate.h"
#include "gtkdialog.h"
#include "gtkintl.h"
#include "gtkmarshalers.h"
@ -667,6 +668,8 @@ gtk_app_chooser_button_class_init (GtkAppChooserButtonClass *klass)
widget_class->measure = gtk_app_chooser_button_measure;
widget_class->size_allocate = gtk_app_chooser_button_size_allocate;
widget_class->grab_focus = gtk_widget_grab_focus_child;
widget_class->focus = gtk_widget_focus_child;
g_object_class_override_property (oclass, PROP_CONTENT_TYPE, "content-type");

View File

@ -38,6 +38,7 @@
#include "gtkscrolledwindow.h"
#include "gtklabel.h"
#include "gtkgestureclick.h"
#include "gtkwidgetprivate.h"
#include <string.h>
#include <glib/gi18n-lib.h>
@ -913,7 +914,8 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
widget_class->measure = gtk_app_chooser_widget_measure;
widget_class->size_allocate = gtk_app_chooser_widget_size_allocate;
widget_class->snapshot = gtk_app_chooser_widget_snapshot;
widget_class->grab_focus = gtk_widget_grab_focus_child;
widget_class->focus = gtk_widget_focus_child;
g_object_class_override_property (gobject_class, PROP_CONTENT_TYPE, "content-type");

View File

@ -95,6 +95,8 @@ gtk_builtin_icon_class_init (GtkBuiltinIconClass *klass)
wclass->snapshot = gtk_builtin_icon_snapshot;
wclass->measure = gtk_builtin_icon_measure;
wclass->css_changed = gtk_builtin_icon_css_changed;
wclass->grab_focus = gtk_widget_grab_focus_none;
wclass->focus = gtk_widget_focus_none;
}
static void

View File

@ -68,6 +68,7 @@
#include "gtkprivate.h"
#include "gtkstylecontext.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
#include "a11y/gtkbuttonaccessible.h"
@ -204,6 +205,8 @@ gtk_button_class_init (GtkButtonClass *klass)
widget_class->state_flags_changed = gtk_button_state_flags_changed;
widget_class->grab_notify = gtk_button_grab_notify;
widget_class->unmap = gtk_button_unmap;
widget_class->grab_focus = gtk_widget_grab_focus_self;
widget_class->focus = gtk_widget_focus_self;
container_class->add = gtk_button_add;
container_class->remove = gtk_button_remove;
@ -408,7 +411,6 @@ gtk_button_init (GtkButton *button)
GtkButtonPrivate *priv = gtk_button_get_instance_private (button);
GtkEventController *key_controller;
gtk_widget_set_can_focus (GTK_WIDGET (button), TRUE);
gtk_widget_set_receives_default (GTK_WIDGET (button), TRUE);
priv->in_button = FALSE;

View File

@ -365,6 +365,9 @@ gtk_calendar_class_init (GtkCalendarClass *class)
gobject_class->set_property = gtk_calendar_set_property;
gobject_class->get_property = gtk_calendar_get_property;
widget_class->focus = gtk_widget_focus_all;
widget_class->grab_focus = gtk_widget_grab_focus_self;
/**
* GtkCalendar:year:
*

View File

@ -199,6 +199,9 @@ gtk_center_box_class_init (GtkCenterBoxClass *klass)
object_class->get_property = gtk_center_box_get_property;
object_class->dispose = gtk_center_box_dispose;
widget_class->grab_focus = gtk_widget_grab_focus_child;
widget_class->focus = gtk_widget_focus_child;
g_object_class_override_property (object_class, PROP_ORIENTATION, "orientation");
g_object_class_install_property (object_class, PROP_BASELINE_POSITION,

View File

@ -44,6 +44,7 @@
#include "gtkprivate.h"
#include "gtksnapshot.h"
#include "gtkstylecontext.h"
#include "gtkwidgetprivate.h"
/**
@ -143,6 +144,9 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
gobject_class->set_property = gtk_color_button_set_property;
gobject_class->finalize = gtk_color_button_finalize;
widget_class->grab_focus = gtk_widget_grab_focus_child;
widget_class->focus = gtk_widget_focus_child;
klass->color_set = NULL;
/**

View File

@ -30,6 +30,7 @@
#include "gtksizegroup.h"
#include "gtkstylecontext.h"
#include "gtkboxlayout.h"
#include "gtkwidgetprivate.h"
#include "a11y/gtkcompositeaccessible.h"
@ -709,6 +710,9 @@ gtk_color_chooser_widget_class_init (GtkColorChooserWidgetClass *class)
object_class->set_property = gtk_color_chooser_widget_set_property;
object_class->finalize = gtk_color_chooser_widget_finalize;
widget_class->grab_focus = gtk_widget_grab_focus_child;
widget_class->focus = gtk_widget_focus_child;
g_object_class_override_property (object_class, PROP_RGBA, "rgba");
g_object_class_override_property (object_class, PROP_USE_ALPHA, "use-alpha");

View File

@ -407,8 +407,6 @@ gtk_color_plane_init (GtkColorPlane *plane)
plane->priv = gtk_color_plane_get_instance_private (plane);
gtk_widget_set_can_focus (GTK_WIDGET (plane), TRUE);
atk_obj = gtk_widget_get_accessible (GTK_WIDGET (plane));
if (GTK_IS_ACCESSIBLE (atk_obj))
{

View File

@ -481,6 +481,8 @@ gtk_color_swatch_class_init (GtkColorSwatchClass *class)
widget_class->snapshot = swatch_snapshot;
widget_class->size_allocate = swatch_size_allocate;
widget_class->state_flags_changed = swatch_state_flags_changed;
widget_class->grab_focus = gtk_widget_grab_focus_self;
widget_class->focus = gtk_widget_focus_self;
g_object_class_install_property (object_class, PROP_RGBA,
g_param_spec_boxed ("rgba", P_("RGBA Color"), P_("Color as RGBA"),

View File

@ -420,6 +420,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
widget_class->size_allocate = gtk_combo_box_size_allocate;
widget_class->mnemonic_activate = gtk_combo_box_mnemonic_activate;
widget_class->grab_focus = gtk_combo_box_grab_focus;
widget_class->focus = gtk_widget_focus_child;
widget_class->measure = gtk_combo_box_measure;
widget_class->unmap = gtk_combo_box_unmap;
widget_class->destroy = gtk_combo_box_destroy;

View File

@ -140,6 +140,8 @@ gtk_container_class_init (GtkContainerClass *class)
widget_class->destroy = gtk_container_destroy;
widget_class->compute_expand = gtk_container_compute_expand;
widget_class->get_request_mode = gtk_container_get_request_mode;
widget_class->grab_focus = gtk_widget_grab_focus_none;
widget_class->focus = gtk_widget_focus_child;
class->add = gtk_container_add_unimplemented;
class->remove = gtk_container_remove_unimplemented;

View File

@ -317,10 +317,6 @@ gtk_drag_icon_get_property (GObject *object,
g_value_set_object (value, self->child);
break;
case LAST_ARG + GTK_ROOT_PROP_FOCUS_WIDGET:
g_value_set_object (value, NULL);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@ -341,9 +337,6 @@ gtk_drag_icon_set_property (GObject *object,
gtk_drag_icon_set_child (self, g_value_get_object (value));
break;
case LAST_ARG + GTK_ROOT_PROP_FOCUS_WIDGET:
// do nothing
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@ -368,6 +361,8 @@ gtk_drag_icon_class_init (GtkDragIconClass *klass)
widget_class->size_allocate = gtk_drag_icon_size_allocate;
widget_class->show = gtk_drag_icon_show;
widget_class->hide = gtk_drag_icon_hide;
widget_class->focus = gtk_widget_focus_none;
widget_class->grab_focus = gtk_widget_grab_focus_none;
/**
* GtkDragIcon:child:
@ -382,7 +377,6 @@ gtk_drag_icon_class_init (GtkDragIconClass *klass)
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, LAST_ARG, properties);
gtk_root_install_properties (object_class, LAST_ARG);
gtk_widget_class_set_css_name (widget_class, "dnd");
}

View File

@ -262,6 +262,8 @@ gtk_drawing_area_class_init (GtkDrawingAreaClass *class)
widget_class->measure = gtk_drawing_area_measure;
widget_class->snapshot = gtk_drawing_area_snapshot;
widget_class->focus = gtk_widget_focus_none;
widget_class->grab_focus = gtk_widget_grab_focus_none;
/**
* GtkDrawingArea:content-width

View File

@ -437,6 +437,7 @@ gtk_entry_class_init (GtkEntryClass *class)
widget_class->query_tooltip = gtk_entry_query_tooltip;
widget_class->direction_changed = gtk_entry_direction_changed;
widget_class->grab_focus = gtk_entry_grab_focus;
widget_class->focus = gtk_widget_focus_child;
widget_class->mnemonic_activate = gtk_entry_mnemonic_activate;
quark_entry_completion = g_quark_from_static_string ("gtk-entry-completion-key");

View File

@ -300,12 +300,13 @@ gtk_expander_class_init (GtkExpanderClass *klass)
gobject_class->set_property = gtk_expander_set_property;
gobject_class->get_property = gtk_expander_get_property;
widget_class->destroy = gtk_expander_destroy;
widget_class->size_allocate = gtk_expander_size_allocate;
widget_class->focus = gtk_expander_focus;
widget_class->measure = gtk_expander_measure;
widget_class->destroy = gtk_expander_destroy;
widget_class->size_allocate = gtk_expander_size_allocate;
widget_class->focus = gtk_expander_focus;
widget_class->grab_focus = gtk_widget_grab_focus_self;
widget_class->measure = gtk_expander_measure;
container_class->add = gtk_expander_add;
container_class->add = gtk_expander_add;
container_class->remove = gtk_expander_remove;
container_class->forall = gtk_expander_forall;
@ -385,8 +386,6 @@ gtk_expander_init (GtkExpander *expander)
GtkGesture *gesture;
GtkEventController *controller;
gtk_widget_set_can_focus (GTK_WIDGET (expander), TRUE);
priv->label_widget = NULL;
priv->child = NULL;

View File

@ -61,6 +61,7 @@
#include "gtkstylecontextprivate.h"
#include "gtkbitmaskprivate.h"
#include "gtkeventcontroller.h"
#include "gtkwidgetprivate.h"
/**
* SECTION:gtkfilechooserbutton
@ -476,6 +477,8 @@ gtk_file_chooser_button_class_init (GtkFileChooserButtonClass * class)
widget_class->root = gtk_file_chooser_button_root;
widget_class->mnemonic_activate = gtk_file_chooser_button_mnemonic_activate;
widget_class->state_flags_changed = gtk_file_chooser_button_state_flags_changed;
widget_class->grab_focus = gtk_widget_grab_focus_child;
widget_class->focus = gtk_widget_focus_child;
/**
* GtkFileChooserButton::file-set:

View File

@ -7222,6 +7222,8 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
widget_class->unroot = gtk_file_chooser_widget_unroot;
widget_class->css_changed = gtk_file_chooser_widget_css_changed;
widget_class->size_allocate = gtk_file_chooser_widget_size_allocate;
widget_class->grab_focus = gtk_widget_grab_focus_child;
widget_class->focus = gtk_widget_focus_child;
/*
* Signals

View File

@ -41,6 +41,7 @@
#include "gtkprivate.h"
#include "gtkseparator.h"
#include "gtkstylecontext.h"
#include "gtkwidgetprivate.h"
#include <string.h>
#include <stdio.h>
@ -483,6 +484,9 @@ gtk_font_button_class_init (GtkFontButtonClass *klass)
gobject_class->set_property = gtk_font_button_set_property;
gobject_class->get_property = gtk_font_button_get_property;
widget_class->grab_focus = gtk_widget_grab_focus_child;
widget_class->focus = gtk_widget_focus_child;
klass->font_set = NULL;
_gtk_font_chooser_install_properties (gobject_class);

View File

@ -49,7 +49,7 @@
#include "gtktextview.h"
#include "gtktreeselection.h"
#include "gtktreeview.h"
#include "gtkwidget.h"
#include "gtkwidgetprivate.h"
#include "gtksettings.h"
#include "gtkdialog.h"
#include "gtkradiobutton.h"
@ -737,6 +737,8 @@ gtk_font_chooser_widget_class_init (GtkFontChooserWidgetClass *klass)
widget_class->unroot = gtk_font_chooser_widget_unroot;
widget_class->map = gtk_font_chooser_widget_map;
widget_class->unmap = gtk_font_chooser_widget_unmap;
widget_class->focus = gtk_widget_focus_child;
widget_class->grab_focus = gtk_widget_grab_focus_child;
gobject_class->finalize = gtk_font_chooser_widget_finalize;
gobject_class->dispose = gtk_font_chooser_widget_dispose;

View File

@ -59,6 +59,29 @@ gtk_gizmo_contains (GtkWidget *widget,
return GTK_WIDGET_CLASS (gtk_gizmo_parent_class)->contains (widget, x, y);
}
static gboolean
gtk_gizmo_focus (GtkWidget *widget,
GtkDirectionType direction)
{
GtkGizmo *self = GTK_GIZMO (widget);
if (self->focus_func)
return self->focus_func (self, direction);
return FALSE;
}
static gboolean
gtk_gizmo_grab_focus (GtkWidget *widget)
{
GtkGizmo *self = GTK_GIZMO (widget);
if (self->grab_focus_func)
return self->grab_focus_func (self);
return FALSE;
}
static void
gtk_gizmo_finalize (GObject *object)
{
@ -90,6 +113,8 @@ gtk_gizmo_class_init (GtkGizmoClass *klass)
widget_class->size_allocate = gtk_gizmo_size_allocate;
widget_class->snapshot = gtk_gizmo_snapshot;
widget_class->contains = gtk_gizmo_contains;
widget_class->grab_focus = gtk_gizmo_grab_focus;
widget_class->focus = gtk_gizmo_focus;
}
static void
@ -98,11 +123,13 @@ gtk_gizmo_init (GtkGizmo *self)
}
GtkWidget *
gtk_gizmo_new (const char *css_name,
GtkGizmoMeasureFunc measure_func,
GtkGizmoAllocateFunc allocate_func,
GtkGizmoSnapshotFunc snapshot_func,
GtkGizmoContainsFunc contains_func)
gtk_gizmo_new (const char *css_name,
GtkGizmoMeasureFunc measure_func,
GtkGizmoAllocateFunc allocate_func,
GtkGizmoSnapshotFunc snapshot_func,
GtkGizmoContainsFunc contains_func,
GtkGizmoFocusFunc focus_func,
GtkGizmoGrabFocusFunc grab_focus_func)
{
GtkGizmo *gizmo = GTK_GIZMO (g_object_new (GTK_TYPE_GIZMO,
"css-name", css_name,
@ -112,6 +139,8 @@ gtk_gizmo_new (const char *css_name,
gizmo->allocate_func = allocate_func;
gizmo->snapshot_func = snapshot_func;
gizmo->contains_func = contains_func;
gizmo->focus_func = focus_func;
gizmo->grab_focus_func = grab_focus_func;
return GTK_WIDGET (gizmo);
}

View File

@ -30,15 +30,20 @@ typedef void (* GtkGizmoSnapshotFunc) (GtkGizmo *gizmo,
typedef gboolean (* GtkGizmoContainsFunc) (GtkGizmo *gizmo,
double x,
double y);
typedef gboolean (* GtkGizmoFocusFunc) (GtkGizmo *gizmo,
GtkDirectionType direction);
typedef gboolean (* GtkGizmoGrabFocusFunc)(GtkGizmo *gizmo);
struct _GtkGizmo
{
GtkWidget parent_instance;
GtkGizmoMeasureFunc measure_func;
GtkGizmoAllocateFunc allocate_func;
GtkGizmoSnapshotFunc snapshot_func;
GtkGizmoContainsFunc contains_func;
GtkGizmoMeasureFunc measure_func;
GtkGizmoAllocateFunc allocate_func;
GtkGizmoSnapshotFunc snapshot_func;
GtkGizmoContainsFunc contains_func;
GtkGizmoFocusFunc focus_func;
GtkGizmoGrabFocusFunc grab_focus_func;
};
struct _GtkGizmoClass
@ -48,11 +53,13 @@ struct _GtkGizmoClass
GType gtk_gizmo_get_type (void) G_GNUC_CONST;
GtkWidget *gtk_gizmo_new (const char *css_name,
GtkGizmoMeasureFunc measure_func,
GtkGizmoAllocateFunc allocate_func,
GtkGizmoSnapshotFunc snapshot_func,
GtkGizmoContainsFunc contains_func);
GtkWidget *gtk_gizmo_new (const char *css_name,
GtkGizmoMeasureFunc measure_func,
GtkGizmoAllocateFunc allocate_func,
GtkGizmoSnapshotFunc snapshot_func,
GtkGizmoContainsFunc contains_func,
GtkGizmoFocusFunc focus_func,
GtkGizmoGrabFocusFunc grab_focus_func);
#endif

View File

@ -30,6 +30,7 @@
#include "gtkrender.h"
#include "gtksnapshot.h"
#include "gtknative.h"
#include "gtkwidgetprivate.h"
#include <epoxy/gl.h>
@ -782,6 +783,8 @@ gtk_gl_area_class_init (GtkGLAreaClass *klass)
widget_class->unrealize = gtk_gl_area_unrealize;
widget_class->size_allocate = gtk_gl_area_size_allocate;
widget_class->snapshot = gtk_gl_area_snapshot;
widget_class->focus = gtk_widget_focus_none;
widget_class->grab_focus = gtk_widget_grab_focus_none;
gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_DRAWING_AREA);

View File

@ -350,6 +350,8 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
widget_class->measure = gtk_icon_view_measure;
widget_class->size_allocate = gtk_icon_view_size_allocate;
widget_class->snapshot = gtk_icon_view_snapshot;
widget_class->focus = gtk_widget_focus_self;
widget_class->grab_focus = gtk_widget_grab_focus_self;
container_class->remove = gtk_icon_view_remove;
container_class->forall = gtk_icon_view_forall;
@ -943,7 +945,6 @@ gtk_icon_view_init (GtkIconView *icon_view)
icon_view->priv->mouse_x = -1;
icon_view->priv->mouse_y = -1;
gtk_widget_set_can_focus (GTK_WIDGET (icon_view), TRUE);
gtk_widget_set_overflow (GTK_WIDGET (icon_view), GTK_OVERFLOW_HIDDEN);
icon_view->priv->item_orientation = GTK_ORIENTATION_VERTICAL;

View File

@ -157,6 +157,8 @@ gtk_image_class_init (GtkImageClass *class)
widget_class->measure = gtk_image_measure;
widget_class->unrealize = gtk_image_unrealize;
widget_class->css_changed = gtk_image_css_changed;
widget_class->grab_focus = gtk_widget_grab_focus_none;
widget_class->focus = gtk_widget_focus_none;
image_props[PROP_PAINTABLE] =
g_param_spec_object ("paintable",

View File

@ -545,7 +545,7 @@ update_block_nodes (GtkLevelBar *self)
self->block_widget = g_renew (GtkWidget*, self->block_widget, n_blocks);
for (i = self->n_blocks; i < n_blocks; i++)
{
self->block_widget[i] = gtk_gizmo_new ("block", NULL, NULL, NULL, NULL);
self->block_widget[i] = gtk_gizmo_new ("block", NULL, NULL, NULL, NULL, NULL, NULL);
gtk_widget_insert_before (self->block_widget[i], GTK_WIDGET (self->trough_widget), NULL);
}
self->n_blocks = n_blocks;
@ -901,6 +901,8 @@ gtk_level_bar_class_init (GtkLevelBarClass *klass)
oclass->finalize = gtk_level_bar_finalize;
wclass->direction_changed = gtk_level_bar_direction_changed;
wclass->grab_focus = gtk_widget_grab_focus_none;
wclass->focus = gtk_widget_focus_none;
g_object_class_override_property (oclass, PROP_ORIENTATION, "orientation");
@ -1022,7 +1024,8 @@ gtk_level_bar_init (GtkLevelBar *self)
gtk_level_bar_measure_trough,
gtk_level_bar_allocate_trough,
gtk_level_bar_render_trough,
NULL);
NULL,
NULL, NULL);
gtk_widget_set_parent (self->trough_widget, GTK_WIDGET (self));
gtk_level_bar_ensure_offset (self, GTK_LEVEL_BAR_OFFSET_LOW, 0.25);

View File

@ -436,6 +436,7 @@ gtk_list_box_class_init (GtkListBoxClass *klass)
object_class->finalize = gtk_list_box_finalize;
widget_class->show = gtk_list_box_show;
widget_class->focus = gtk_list_box_focus;
widget_class->grab_focus = gtk_widget_grab_focus_self;
widget_class->compute_expand = gtk_list_box_compute_expand;
widget_class->get_request_mode = gtk_list_box_get_request_mode;
widget_class->measure = gtk_list_box_measure;
@ -3346,8 +3347,7 @@ gtk_list_box_row_grab_focus (GtkWidget *widget)
g_return_val_if_fail (box != NULL, FALSE);
if (!GTK_WIDGET_CLASS (gtk_list_box_row_parent_class)->grab_focus (widget))
return FALSE;
gtk_widget_grab_focus_self (widget);
if (box->cursor_row != row)
gtk_list_box_update_cursor (box, row, FALSE);
@ -3430,8 +3430,6 @@ gtk_list_box_row_class_init (GtkListBoxRowClass *klass)
static void
gtk_list_box_row_init (GtkListBoxRow *row)
{
gtk_widget_set_can_focus (GTK_WIDGET (row), TRUE);
ROW_PRIV (row)->activatable = TRUE;
ROW_PRIV (row)->selectable = TRUE;

View File

@ -25,6 +25,7 @@
#include "gtkbutton.h"
#include "gtkintl.h"
#include "gtklabel.h"
#include "gtkwidgetprivate.h"
/**
* SECTION:gtkmediacontrols
@ -259,6 +260,8 @@ gtk_media_controls_class_init (GtkMediaControlsClass *klass)
widget_class->measure = gtk_media_controls_measure;
widget_class->size_allocate = gtk_media_controls_size_allocate;
widget_class->grab_focus = gtk_widget_grab_focus_none;
widget_class->focus = gtk_widget_focus_child;
gobject_class->dispose = gtk_media_controls_dispose;
gobject_class->get_property = gtk_media_controls_get_property;

View File

@ -330,7 +330,15 @@ gtk_menu_button_focus (GtkWidget *widget,
if (self->popover && gtk_widget_get_visible (self->popover))
return gtk_widget_child_focus (self->popover, direction);
else
return GTK_WIDGET_CLASS (gtk_menu_button_parent_class)->focus (widget, direction);
return gtk_widget_child_focus (self->button, direction);
}
static gboolean
gtk_menu_button_grab_focus (GtkWidget *widget)
{
GtkMenuButton *self = GTK_MENU_BUTTON (widget);
return gtk_widget_grab_focus (self->button);
}
static void
@ -347,6 +355,7 @@ gtk_menu_button_class_init (GtkMenuButtonClass *klass)
widget_class->size_allocate = gtk_menu_button_size_allocate;
widget_class->state_flags_changed = gtk_menu_button_state_flags_changed;
widget_class->focus = gtk_menu_button_focus;
widget_class->grab_focus = gtk_menu_button_grab_focus;
/**
* GtkMenuButton:menu-model:

View File

@ -780,6 +780,7 @@ static void gtk_notebook_direction_changed (GtkWidget *widget,
GtkTextDirection previous_direction);
static gboolean gtk_notebook_focus (GtkWidget *widget,
GtkDirectionType direction);
static gboolean gtk_notebook_grab_focus (GtkWidget *widget);
/*** Drag and drop Methods ***/
static void gtk_notebook_dnd_finished_cb (GdkDrag *drag,
@ -1043,6 +1044,7 @@ gtk_notebook_class_init (GtkNotebookClass *class)
widget_class->state_flags_changed = gtk_notebook_state_flags_changed;
widget_class->direction_changed = gtk_notebook_direction_changed;
widget_class->focus = gtk_notebook_focus;
widget_class->grab_focus = gtk_notebook_grab_focus;
widget_class->compute_expand = gtk_notebook_compute_expand;
container_class->add = gtk_notebook_add;
@ -1387,8 +1389,6 @@ gtk_notebook_init (GtkNotebook *notebook)
GtkLayoutManager *layout;
GtkDropTarget *dest;
gtk_widget_set_can_focus (GTK_WIDGET (notebook), TRUE);
notebook->cur_page = NULL;
notebook->children = NULL;
notebook->first_tab = NULL;
@ -1412,17 +1412,19 @@ gtk_notebook_init (GtkNotebook *notebook)
notebook->has_scrolled = FALSE;
notebook->header_widget = g_object_new (GTK_TYPE_BOX,
"css-name", "header",
NULL);
"css-name", "header",
NULL);
gtk_widget_add_css_class (notebook->header_widget, GTK_STYLE_CLASS_TOP);
gtk_widget_hide (notebook->header_widget);
gtk_widget_set_parent (notebook->header_widget, GTK_WIDGET (notebook));
notebook->tabs_widget = gtk_gizmo_new ("tabs",
gtk_notebook_measure_tabs,
gtk_notebook_allocate_tabs,
gtk_notebook_snapshot_tabs,
NULL);
gtk_notebook_measure_tabs,
gtk_notebook_allocate_tabs,
gtk_notebook_snapshot_tabs,
NULL,
(GtkGizmoFocusFunc)gtk_widget_focus_self,
(GtkGizmoGrabFocusFunc)gtk_widget_grab_focus_self);
gtk_widget_set_hexpand (notebook->tabs_widget, TRUE);
gtk_container_add (GTK_CONTAINER (notebook->header_widget), notebook->tabs_widget);
@ -3558,6 +3560,8 @@ gtk_notebook_focus (GtkWidget *widget,
widget_is_focus = gtk_widget_is_focus (widget);
old_focus_child = gtk_widget_get_focus_child (widget);
if (old_focus_child)
old_focus_child = gtk_widget_get_focus_child (old_focus_child);
effective_direction = get_effective_direction (notebook, direction);
@ -3705,6 +3709,17 @@ gtk_notebook_focus (GtkWidget *widget,
return FALSE;
}
static gboolean
gtk_notebook_grab_focus (GtkWidget *widget)
{
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
if (notebook->show_tabs)
return gtk_widget_grab_focus_self (widget);
else
return gtk_widget_grab_focus_child (widget);
}
static void
gtk_notebook_set_focus_child (GtkContainer *container,
GtkWidget *child)
@ -3979,7 +3994,7 @@ gtk_notebook_insert_notebook_page (GtkNotebook *notebook,
else
sibling = notebook->arrow_widget[ARROW_RIGHT_AFTER];
page->tab_widget = gtk_gizmo_new ("tab", measure_tab, allocate_tab, NULL, NULL);
page->tab_widget = gtk_gizmo_new ("tab", measure_tab, allocate_tab, NULL, NULL, NULL, NULL);
g_object_set_data (G_OBJECT (page->tab_widget), "notebook", notebook);
gtk_widget_insert_before (page->tab_widget, notebook->tabs_widget, sibling);
controller = gtk_drop_controller_motion_new ();
@ -6083,8 +6098,6 @@ gtk_notebook_set_show_tabs (GtkNotebook *notebook,
if (!show_tabs)
{
gtk_widget_set_can_focus (GTK_WIDGET (notebook), FALSE);
while (children)
{
page = children->data;
@ -6102,7 +6115,6 @@ gtk_notebook_set_show_tabs (GtkNotebook *notebook,
}
else
{
gtk_widget_set_can_focus (GTK_WIDGET (notebook), TRUE);
gtk_notebook_update_labels (notebook);
gtk_widget_show (notebook->header_widget);
}

View File

@ -1390,7 +1390,7 @@ gtk_paned_init (GtkPaned *paned)
gtk_widget_add_controller (GTK_WIDGET (paned), GTK_EVENT_CONTROLLER (gesture));
priv->drag_gesture = gesture;
priv->handle_widget = gtk_gizmo_new ("separator", NULL, NULL, gtk_paned_render_handle, gtk_paned_handle_contains);
priv->handle_widget = gtk_gizmo_new ("separator", NULL, NULL, gtk_paned_render_handle, gtk_paned_handle_contains, NULL, NULL);
gtk_widget_set_parent (priv->handle_widget, GTK_WIDGET (paned));
gtk_widget_set_cursor_from_name (priv->handle_widget, "col-resize");
}

View File

@ -30,6 +30,7 @@
#include "gtkimage.h"
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkmarshalers.h"
#include "gtkstylecontext.h"
#include "gtkeventcontrollerkey.h"
@ -348,15 +349,6 @@ gtk_password_entry_get_accessible (GtkWidget *widget)
return atk_obj;
}
static gboolean
gtk_password_entry_grab_focus (GtkWidget *widget)
{
GtkPasswordEntry *entry = GTK_PASSWORD_ENTRY (widget);
GtkPasswordEntryPrivate *priv = gtk_password_entry_get_instance_private (entry);
return gtk_widget_grab_focus (priv->entry);
}
static gboolean
gtk_password_entry_mnemonic_activate (GtkWidget *widget,
gboolean group_cycling)
@ -383,8 +375,10 @@ gtk_password_entry_class_init (GtkPasswordEntryClass *klass)
widget_class->measure = gtk_password_entry_measure;
widget_class->size_allocate = gtk_password_entry_size_allocate;
widget_class->get_accessible = gtk_password_entry_get_accessible;
widget_class->grab_focus = gtk_password_entry_grab_focus;
widget_class->grab_focus = gtk_widget_grab_focus_child;
widget_class->focus = gtk_widget_focus_child;
widget_class->mnemonic_activate = gtk_password_entry_mnemonic_activate;
props[PROP_PLACEHOLDER_TEXT] =
g_param_spec_string ("placeholder-text",
P_("Placeholder text"),

View File

@ -301,6 +301,8 @@ gtk_picture_class_init (GtkPictureClass *class)
widget_class->snapshot = gtk_picture_snapshot;
widget_class->get_request_mode = gtk_picture_get_request_mode;
widget_class->measure = gtk_picture_measure;
widget_class->grab_focus = gtk_widget_grab_focus_none;
widget_class->focus = gtk_widget_focus_none;
/**
* GtkPicture:paintable:

View File

@ -847,7 +847,9 @@ gtk_popover_init (GtkPopover *popover)
G_CALLBACK (node_style_changed_cb), popover, 0);
g_object_unref (priv->arrow_node);
priv->contents_widget = gtk_gizmo_new ("contents", NULL, NULL, NULL, NULL);
priv->contents_widget = gtk_gizmo_new ("contents", NULL, NULL, NULL, NULL,
(GtkGizmoFocusFunc)gtk_widget_focus_child,
(GtkGizmoGrabFocusFunc)gtk_widget_grab_focus_child);
gtk_widget_set_layout_manager (priv->contents_widget, gtk_bin_layout_new ());
gtk_widget_set_parent (priv->contents_widget, GTK_WIDGET (popover));

View File

@ -181,6 +181,8 @@ gtk_progress_bar_class_init (GtkProgressBarClass *class)
gobject_class->finalize = gtk_progress_bar_finalize;
widget_class->direction_changed = gtk_progress_bar_direction_changed;
widget_class->grab_focus = gtk_widget_grab_focus_none;
widget_class->focus = gtk_widget_focus_none;
g_object_class_override_property (gobject_class, PROP_ORIENTATION, "orientation");
@ -459,10 +461,11 @@ gtk_progress_bar_init (GtkProgressBar *pbar)
NULL,
allocate_trough,
NULL,
NULL);
NULL,
NULL, NULL);
gtk_widget_set_parent (priv->trough_widget, GTK_WIDGET (pbar));
priv->progress_widget = gtk_gizmo_new ("progress", NULL, NULL, NULL, NULL);
priv->progress_widget = gtk_gizmo_new ("progress", NULL, NULL, NULL, NULL, NULL, NULL);
gtk_widget_set_parent (priv->progress_widget, priv->trough_widget);
/* horizontal is default */

View File

@ -548,11 +548,12 @@ gtk_range_init (GtkRange *range)
gtk_range_measure_trough,
gtk_range_allocate_trough,
gtk_range_render_trough,
NULL);
NULL,
NULL, NULL);
gtk_widget_set_parent (priv->trough_widget, GTK_WIDGET (range));
priv->slider_widget = gtk_gizmo_new ("slider", NULL, NULL, NULL, NULL);
priv->slider_widget = gtk_gizmo_new ("slider", NULL, NULL, NULL, NULL, NULL, NULL);
gtk_widget_set_parent (priv->slider_widget, priv->trough_widget);
/* Note: Order is important here.
@ -1115,7 +1116,7 @@ gtk_range_set_show_fill_level (GtkRange *range,
if (show_fill_level)
{
priv->fill_widget = gtk_gizmo_new ("fill", NULL, NULL, NULL, NULL);
priv->fill_widget = gtk_gizmo_new ("fill", NULL, NULL, NULL, NULL, NULL, NULL);
gtk_widget_insert_after (priv->fill_widget, priv->trough_widget, NULL);
update_fill_position (range);
}
@ -2757,7 +2758,7 @@ _gtk_range_set_has_origin (GtkRange *range,
if (has_origin)
{
priv->highlight_widget = gtk_gizmo_new ("highlight", NULL, NULL, NULL, NULL);
priv->highlight_widget = gtk_gizmo_new ("highlight", NULL, NULL, NULL, NULL, NULL, NULL);
gtk_widget_insert_before (priv->highlight_widget, priv->trough_widget, priv->slider_widget);
update_highlight_position (range);

View File

@ -59,18 +59,25 @@ gtk_root_default_get_constraint_solver (GtkRoot *self)
return NULL;
}
static GtkWidget *
gtk_root_default_get_focus (GtkRoot *self)
{
return NULL;
}
static void
gtk_root_default_set_focus (GtkRoot *self,
GtkWidget *focus)
{
}
static void
gtk_root_default_init (GtkRootInterface *iface)
{
iface->get_display = gtk_root_default_get_display;
iface->get_constraint_solver = gtk_root_default_get_constraint_solver;
g_object_interface_install_property (iface,
g_param_spec_object ("focus-widget",
P_("Focus widget"),
P_("The focus widget"),
GTK_TYPE_WIDGET,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
iface->get_focus = gtk_root_default_get_focus;
iface->set_focus = gtk_root_default_set_focus;
}
/**
@ -123,7 +130,7 @@ gtk_root_set_focus (GtkRoot *self,
g_return_if_fail (GTK_IS_ROOT (self));
g_return_if_fail (focus == NULL || GTK_IS_WIDGET (focus));
g_object_set (self, "focus-widget", focus, NULL);
GTK_ROOT_GET_IFACE (self)->set_focus (self, focus);
}
/**
@ -143,22 +150,7 @@ gtk_root_set_focus (GtkRoot *self,
GtkWidget *
gtk_root_get_focus (GtkRoot *self)
{
GtkWidget *focus;
g_return_val_if_fail (GTK_IS_ROOT (self), NULL);
g_object_get (self, "focus-widget", &focus, NULL);
if (focus)
g_object_unref (focus);
return focus;
}
guint
gtk_root_install_properties (GObjectClass *object_class,
guint first_prop)
{
g_object_class_override_property (object_class, first_prop + GTK_ROOT_PROP_FOCUS_WIDGET, "focus-widget");
return GTK_ROOT_NUM_PROPERTIES;
return GTK_ROOT_GET_IFACE (self)->get_focus (self);
}

View File

@ -21,18 +21,15 @@ struct _GtkRootInterface
GdkDisplay * (* get_display) (GtkRoot *self);
GtkConstraintSolver * (* get_constraint_solver) (GtkRoot *self);
GtkWidget * (* get_focus) (GtkRoot *self);
void (* set_focus) (GtkRoot *self,
GtkWidget *focus);
};
GtkConstraintSolver * gtk_root_get_constraint_solver (GtkRoot *self);
typedef enum {
GTK_ROOT_PROP_FOCUS_WIDGET,
GTK_ROOT_NUM_PROPERTIES
} GtkRootProperties;
guint gtk_root_install_properties (GObjectClass *object_class,
guint first_prop);
G_END_DECLS
#endif /* __GTK_ROOT_PRIVATE_H__ */

View File

@ -41,6 +41,7 @@
#include "gtkstylecontextprivate.h"
#include "gtkstylepropertyprivate.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
#include "a11y/gtkscaleaccessible.h"
@ -663,6 +664,8 @@ gtk_scale_class_init (GtkScaleClass *class)
widget_class->snapshot = gtk_scale_snapshot;
widget_class->size_allocate = gtk_scale_size_allocate;
widget_class->measure = gtk_scale_measure;
widget_class->grab_focus = gtk_widget_grab_focus_self;
widget_class->focus = gtk_widget_focus_self;
range_class->get_range_border = gtk_scale_get_range_border;
range_class->value_changed = gtk_scale_value_changed;
@ -1715,7 +1718,8 @@ gtk_scale_add_mark (GtkScale *scale,
gtk_scale_measure_marks,
gtk_scale_allocate_marks,
NULL,
NULL);
NULL,
NULL, NULL);
gtk_widget_insert_after (priv->top_marks_widget,
GTK_WIDGET (scale),
@ -1734,7 +1738,8 @@ gtk_scale_add_mark (GtkScale *scale,
gtk_scale_measure_marks,
gtk_scale_allocate_marks,
NULL,
NULL);
NULL,
NULL, NULL);
gtk_widget_insert_before (priv->bottom_marks_widget,
GTK_WIDGET (scale),
@ -1746,10 +1751,10 @@ gtk_scale_add_mark (GtkScale *scale,
marks_widget = priv->bottom_marks_widget;
}
mark->widget = gtk_gizmo_new ("mark", gtk_scale_measure_mark, gtk_scale_allocate_mark, NULL, NULL);
mark->widget = gtk_gizmo_new ("mark", gtk_scale_measure_mark, gtk_scale_allocate_mark, NULL, NULL, NULL, NULL);
g_object_set_data (G_OBJECT (mark->widget), "mark", mark);
mark->indicator_widget = gtk_gizmo_new ("indicator", NULL, NULL, NULL, NULL);
mark->indicator_widget = gtk_gizmo_new ("indicator", NULL, NULL, NULL, NULL, NULL, NULL);
gtk_widget_set_parent (mark->indicator_widget, mark->widget);
if (mark->markup && *mark->markup)
{

View File

@ -33,6 +33,7 @@
#include "gtkorientable.h"
#include "gtkorientableprivate.h"
#include "gtkprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkboxlayout.h"
#include "a11y/gtkscrollbaraccessible.h"
@ -195,6 +196,9 @@ gtk_scrollbar_class_init (GtkScrollbarClass *class)
object_class->set_property = gtk_scrollbar_set_property;
object_class->dispose = gtk_scrollbar_dispose;
widget_class->focus = gtk_widget_focus_none;
widget_class->grab_focus = gtk_widget_grab_focus_none;
props[PROP_ADJUSTMENT] =
g_param_spec_object ("adjustment",
P_("Adjustment"),

View File

@ -526,6 +526,7 @@ gtk_scrolled_window_class_init (GtkScrolledWindowClass *class)
widget_class->snapshot = gtk_scrolled_window_snapshot;
widget_class->size_allocate = gtk_scrolled_window_size_allocate;
widget_class->focus = gtk_scrolled_window_focus;
widget_class->grab_focus = gtk_widget_grab_focus_self;
widget_class->measure = gtk_scrolled_window_measure;
widget_class->map = gtk_scrolled_window_map;
widget_class->unmap = gtk_scrolled_window_unmap;

View File

@ -29,6 +29,7 @@
#include "gtkorientableprivate.h"
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkwidgetprivate.h"
/**
* SECTION:gtkseparator
@ -141,6 +142,9 @@ gtk_separator_class_init (GtkSeparatorClass *class)
object_class->set_property = gtk_separator_set_property;
object_class->get_property = gtk_separator_get_property;
widget_class->grab_focus = gtk_widget_grab_focus_none;
widget_class->focus = gtk_widget_focus_none;
g_object_class_override_property (object_class, PROP_ORIENTATION, "orientation");
gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_SEPARATOR);

View File

@ -22,6 +22,7 @@
#include "gtkboxlayout.h"
#include "gtklabel.h"
#include "gtkframe.h"
#include "gtkwidgetprivate.h"
#include "gtkintl.h"
/**
@ -474,6 +475,9 @@ gtk_shortcut_label_class_init (GtkShortcutLabelClass *klass)
object_class->get_property = gtk_shortcut_label_get_property;
object_class->set_property = gtk_shortcut_label_set_property;
widget_class->grab_focus = gtk_widget_grab_focus_none;
widget_class->focus = gtk_widget_focus_none;
/**
* GtkShortcutLabel:accelerator:
*

View File

@ -25,6 +25,7 @@
#include "gtkintl.h"
#include "gtklabel.h"
#include "gtkprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkshortcutlabel.h"
#include "gtkshortcutswindowprivate.h"
#include "gtksizegroup.h"
@ -547,6 +548,8 @@ gtk_shortcuts_shortcut_class_init (GtkShortcutsShortcutClass *klass)
widget_class->measure = gtk_shortcuts_shortcut_measure;
widget_class->snapshot = gtk_shortcuts_shortcut_snapshot;
widget_class->size_allocate = gtk_shortcuts_shortcut_size_allocate;
widget_class->grab_focus = gtk_widget_grab_focus_none;
widget_class->focus = gtk_widget_focus_none;
/**
* GtkShortcutsShortcut:accelerator:

View File

@ -349,6 +349,7 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
widget_class->grab_notify = gtk_spin_button_grab_notify;
widget_class->state_flags_changed = gtk_spin_button_state_flags_changed;
widget_class->grab_focus = gtk_spin_button_grab_focus;
widget_class->focus = gtk_widget_focus_child;
widget_class->mnemonic_activate = gtk_spin_button_mnemonic_activate;
class->input = NULL;

View File

@ -229,6 +229,8 @@ gtk_spinner_class_init (GtkSpinnerClass *klass)
widget_class->snapshot = gtk_spinner_snapshot;
widget_class->measure = gtk_spinner_measure;
widget_class->css_changed = gtk_spinner_css_changed;
widget_class->grab_focus = gtk_widget_grab_focus_none;
widget_class->focus = gtk_widget_focus_none;
/* GtkSpinner:spinning:
*

View File

@ -32,6 +32,7 @@
#include "gtkselectionmodel.h"
#include "gtkstack.h"
#include "gtkprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkintl.h"
/**
@ -389,6 +390,9 @@ gtk_stack_sidebar_class_init (GtkStackSidebarClass *klass)
object_class->set_property = gtk_stack_sidebar_set_property;
object_class->get_property = gtk_stack_sidebar_get_property;
widget_class->grab_focus = gtk_widget_grab_focus_none;
widget_class->focus = gtk_widget_focus_child;
obj_properties[PROP_STACK] =
g_param_spec_object (I_("stack"), P_("Stack"),
P_("Associated stack for this GtkStackSidebar"),

View File

@ -518,6 +518,9 @@ gtk_stack_switcher_class_init (GtkStackSwitcherClass *class)
object_class->dispose = gtk_stack_switcher_dispose;
object_class->finalize = gtk_stack_switcher_finalize;
widget_class->grab_focus = gtk_widget_grab_focus_none;
widget_class->focus = gtk_widget_focus_child;
g_object_class_install_property (object_class,
PROP_STACK,
g_param_spec_object ("stack",

View File

@ -36,6 +36,7 @@
#include "gtkintl.h"
#include "gtkorientable.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
#include "a11y/gtkstatusbaraccessible.h"
/**
@ -151,6 +152,8 @@ gtk_statusbar_class_init (GtkStatusbarClass *class)
object_class->dispose = gtk_statusbar_dispose;
widget_class->destroy = gtk_statusbar_destroy;
widget_class->grab_focus = gtk_widget_grab_focus_none;
widget_class->focus = gtk_widget_focus_child;
class->text_pushed = gtk_statusbar_update;
class->text_popped = gtk_statusbar_update;

View File

@ -548,6 +548,9 @@ gtk_switch_class_init (GtkSwitchClass *klass)
g_object_class_install_properties (gobject_class, LAST_PROP, switch_props);
widget_class->grab_focus = gtk_widget_grab_focus_self;
widget_class->focus = gtk_widget_focus_self;
klass->activate = gtk_switch_activate;
klass->state_set = state_set;
@ -656,7 +659,7 @@ gtk_switch_init (GtkSwitch *self)
self->off_image = gtk_image_new_from_icon_name ("switch-off-symbolic");
gtk_widget_set_parent (self->off_image, GTK_WIDGET (self));
self->slider = gtk_gizmo_new ("slider", NULL, NULL, NULL, NULL);
self->slider = gtk_gizmo_new ("slider", NULL, NULL, NULL, NULL, NULL, NULL);
gtk_widget_set_parent (self->slider, GTK_WIDGET (self));
}

View File

@ -421,8 +421,6 @@ static void gtk_text_view_motion (GtkEventController *controller,
gpointer user_data);
static void gtk_text_view_snapshot (GtkWidget *widget,
GtkSnapshot *snapshot);
static gboolean gtk_text_view_focus (GtkWidget *widget,
GtkDirectionType direction);
static void gtk_text_view_select_all (GtkWidget *widget,
gboolean select);
static gboolean get_middle_click_paste (GtkTextView *text_view);
@ -823,7 +821,8 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
widget_class->measure = gtk_text_view_measure;
widget_class->size_allocate = gtk_text_view_size_allocate;
widget_class->snapshot = gtk_text_view_snapshot;
widget_class->focus = gtk_text_view_focus;
widget_class->grab_focus = gtk_widget_grab_focus_self;
widget_class->focus = gtk_widget_focus_all;
container_class->add = gtk_text_view_add;
container_class->remove = gtk_text_view_remove;
@ -5679,39 +5678,6 @@ gtk_text_view_snapshot (GtkWidget *widget,
}
}
static gboolean
gtk_text_view_focus (GtkWidget *widget,
GtkDirectionType direction)
{
gboolean result;
if (!gtk_widget_is_focus (widget) &&
gtk_widget_get_focus_child (widget) == NULL)
{
if (gtk_widget_get_can_focus (widget))
{
gtk_widget_grab_focus (widget);
return TRUE;
}
return FALSE;
}
else
{
gboolean can_focus;
/*
* Unset CAN_FOCUS flag so that gtk_container_focus() allows
* children to get the focus
*/
can_focus = gtk_widget_get_can_focus (widget);
gtk_widget_set_can_focus (widget, FALSE);
result = GTK_WIDGET_CLASS (gtk_text_view_parent_class)->focus (widget, direction);
gtk_widget_set_can_focus (widget, can_focus);
return result;
}
}
/*
* Container
*/

View File

@ -666,7 +666,7 @@ gtk_tree_popover_create_item (GtkTreePopover *popover,
gtk_cell_view_set_displayed_row (GTK_CELL_VIEW (view), path);
gtk_widget_set_hexpand (view, TRUE);
item = gtk_gizmo_new ("modelbutton", NULL, NULL, NULL, NULL);
item = gtk_gizmo_new ("modelbutton", NULL, NULL, NULL, NULL, NULL, NULL);
gtk_widget_set_layout_manager (item, gtk_box_layout_new (GTK_ORIENTATION_HORIZONTAL));
gtk_widget_add_css_class (item, "flat");

View File

@ -1707,7 +1707,6 @@ gtk_tree_view_init (GtkTreeView *tree_view)
GtkEventController **controllers;
guint n_controllers, i;
gtk_widget_set_can_focus (GTK_WIDGET (tree_view), TRUE);
gtk_widget_set_overflow (GTK_WIDGET (tree_view), GTK_OVERFLOW_HIDDEN);
tree_view->show_expanders = TRUE;
@ -7853,9 +7852,6 @@ gtk_tree_view_focus (GtkWidget *widget,
GtkTreeView *tree_view = GTK_TREE_VIEW (widget);
GtkWidget *focus_child;
if (!gtk_widget_is_sensitive (widget) || !gtk_widget_get_can_focus (widget))
return FALSE;
focus_child = gtk_widget_get_focus_child (widget);
gtk_tree_view_stop_editing (GTK_TREE_VIEW (widget), FALSE);
@ -7899,7 +7895,7 @@ gtk_tree_view_focus (GtkWidget *widget,
static gboolean
gtk_tree_view_grab_focus (GtkWidget *widget)
{
if (!GTK_WIDGET_CLASS (gtk_tree_view_parent_class)->grab_focus (widget))
if (!gtk_widget_grab_focus_self (widget))
return FALSE;
gtk_tree_view_focus_to_cursor (GTK_TREE_VIEW (widget));

View File

@ -30,6 +30,7 @@
#include "gtknative.h"
#include "gtkpicture.h"
#include "gtkrevealer.h"
#include "gtkwidgetprivate.h"
/**
* SECTION:gtkvideo
@ -252,6 +253,8 @@ gtk_video_class_init (GtkVideoClass *klass)
widget_class->unrealize = gtk_video_unrealize;
widget_class->map = gtk_video_map;
widget_class->unmap = gtk_video_unmap;
widget_class->grab_focus = gtk_widget_grab_focus_none;
widget_class->focus = gtk_widget_focus_child;
gobject_class->dispose = gtk_video_dispose;
gobject_class->get_property = gtk_video_get_property;

View File

@ -517,7 +517,6 @@ enum {
PROP_SENSITIVE,
PROP_CAN_FOCUS,
PROP_HAS_FOCUS,
PROP_IS_FOCUS,
PROP_CAN_TARGET,
PROP_FOCUS_ON_CLICK,
PROP_HAS_DEFAULT,
@ -587,7 +586,6 @@ static void gtk_widget_real_size_allocate (GtkWidget *widget,
static void gtk_widget_real_direction_changed(GtkWidget *widget,
GtkTextDirection previous_direction);
static gboolean gtk_widget_real_grab_focus (GtkWidget *focus_widget);
static gboolean gtk_widget_real_query_tooltip (GtkWidget *widget,
gint x,
gint y,
@ -596,8 +594,6 @@ static gboolean gtk_widget_real_query_tooltip (GtkWidget *widget,
static void gtk_widget_real_css_changed (GtkWidget *widget,
GtkCssStyleChange *change);
static gboolean gtk_widget_real_focus (GtkWidget *widget,
GtkDirectionType direction);
static void gtk_widget_real_move_focus (GtkWidget *widget,
GtkDirectionType direction);
static gboolean gtk_widget_real_keynav_failed (GtkWidget *widget,
@ -907,8 +903,8 @@ gtk_widget_class_init (GtkWidgetClass *klass)
klass->grab_notify = gtk_widget_real_grab_notify;
klass->snapshot = gtk_widget_real_snapshot;
klass->mnemonic_activate = gtk_widget_real_mnemonic_activate;
klass->grab_focus = gtk_widget_real_grab_focus;
klass->focus = gtk_widget_real_focus;
klass->grab_focus = gtk_widget_grab_focus_self;
klass->focus = gtk_widget_focus_all;
klass->move_focus = gtk_widget_real_move_focus;
klass->keynav_failed = gtk_widget_real_keynav_failed;
klass->query_tooltip = gtk_widget_real_query_tooltip;
@ -978,11 +974,17 @@ gtk_widget_class_init (GtkWidgetClass *klass)
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkWidget:can-focus:
*
* Whether the widget or any of its descendents can accept
* the input focus.
*/
widget_props[PROP_CAN_FOCUS] =
g_param_spec_boolean ("can-focus",
P_("Can focus"),
P_("Whether the widget can accept the input focus"),
FALSE,
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
widget_props[PROP_HAS_FOCUS] =
@ -990,14 +992,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
P_("Has focus"),
P_("Whether the widget has the input focus"),
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
widget_props[PROP_IS_FOCUS] =
g_param_spec_boolean ("is-focus",
P_("Is focus"),
P_("Whether the widget is the focus widget within the toplevel"),
FALSE,
GTK_PARAM_READWRITE);
GTK_PARAM_READABLE|G_PARAM_EXPLICIT_NOTIFY);
widget_props[PROP_CAN_TARGET] =
g_param_spec_boolean ("can-target",
@ -1012,9 +1007,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
* Whether the widget should grab focus when it is clicked with the mouse.
*
* This property is only relevant for widgets that can take focus.
*
* Before 3.20, several widgets (GtkButton, GtkFileChooserButton,
* GtkComboBox) implemented this property individually.
*/
widget_props[PROP_FOCUS_ON_CLICK] =
g_param_spec_boolean ("focus-on-click",
@ -1695,14 +1687,6 @@ gtk_widget_set_property (GObject *object,
case PROP_CAN_FOCUS:
gtk_widget_set_can_focus (widget, g_value_get_boolean (value));
break;
case PROP_HAS_FOCUS:
if (g_value_get_boolean (value))
gtk_widget_grab_focus (widget);
break;
case PROP_IS_FOCUS:
if (g_value_get_boolean (value))
gtk_widget_grab_focus (widget);
break;
case PROP_CAN_TARGET:
gtk_widget_set_can_target (widget, g_value_get_boolean (value));
break;
@ -1856,9 +1840,6 @@ gtk_widget_get_property (GObject *object,
case PROP_HAS_FOCUS:
g_value_set_boolean (value, gtk_widget_has_focus (widget));
break;
case PROP_IS_FOCUS:
g_value_set_boolean (value, gtk_widget_is_focus (widget));
break;
case PROP_CAN_TARGET:
g_value_set_boolean (value, gtk_widget_get_can_target (widget));
break;
@ -2316,6 +2297,7 @@ gtk_widget_init (GTypeInstance *instance, gpointer g_class)
#ifdef G_ENABLE_DEBUG
priv->highlight_resize = FALSE;
#endif
priv->can_focus = TRUE;
priv->can_target = TRUE;
switch (_gtk_widget_get_direction (widget))
@ -4759,25 +4741,34 @@ gtk_widget_grab_focus (GtkWidget *widget)
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
if (!gtk_widget_is_sensitive (widget) ||
!gtk_widget_get_can_focus (widget) ||
widget->priv->root == NULL)
return FALSE;
return GTK_WIDGET_GET_CLASS (widget)->grab_focus (widget);
}
static gboolean
gtk_widget_real_grab_focus (GtkWidget *focus_widget)
gboolean
gtk_widget_grab_focus_none (GtkWidget *widget)
{
return FALSE;
}
gboolean
gtk_widget_grab_focus_self (GtkWidget *widget)
{
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
gtk_root_set_focus (priv->root, widget);
return TRUE;
}
gboolean
gtk_widget_grab_focus_child (GtkWidget *widget)
{
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (focus_widget);
GtkWidget *child;
if (priv->can_focus)
{
gtk_root_set_focus (priv->root, focus_widget);
return TRUE;
}
for (child = _gtk_widget_get_first_child (focus_widget);
for (child = _gtk_widget_get_first_child (widget);
child != NULL;
child = _gtk_widget_get_next_sibling (child))
{
@ -4896,21 +4887,12 @@ direction_is_forward (GtkDirectionType direction)
}
}
static gboolean
gtk_widget_real_focus (GtkWidget *widget,
GtkDirectionType direction)
gboolean
gtk_widget_focus_all (GtkWidget *widget,
GtkDirectionType direction)
{
GtkWidget *focus;
/* The easy case: not focusable. Just try the children */
if (!gtk_widget_get_can_focus (widget))
{
if (gtk_widget_focus_move (widget, direction))
return TRUE;
return FALSE;
}
/* For focusable widgets, we want to focus the widget
* before its children. We differentiate 3 cases:
* 1) focus is currently on widget
@ -4953,6 +4935,32 @@ gtk_widget_real_focus (GtkWidget *widget,
return TRUE;
}
gboolean
gtk_widget_focus_self (GtkWidget *widget,
GtkDirectionType direction)
{
if (!gtk_widget_is_focus (widget))
{
gtk_widget_grab_focus (widget);
return TRUE;
}
return FALSE;
}
gboolean
gtk_widget_focus_child (GtkWidget *widget,
GtkDirectionType direction)
{
return gtk_widget_focus_move (widget, direction);
}
gboolean
gtk_widget_focus_none (GtkWidget *widget,
GtkDirectionType direction)
{
return FALSE;
}
static void
gtk_widget_real_move_focus (GtkWidget *widget,
GtkDirectionType direction)
@ -6677,7 +6685,8 @@ gtk_widget_child_focus (GtkWidget *widget,
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
if (!_gtk_widget_get_visible (widget) ||
!gtk_widget_is_sensitive (widget))
!gtk_widget_is_sensitive (widget) ||
!gtk_widget_get_can_focus (widget))
return FALSE;
/* Emit ::focus in any case, even if can-focus is FALSE,

View File

@ -360,6 +360,21 @@ guint gtk_widget_add_surface_transform_changed_callback (GtkWidget
void gtk_widget_remove_surface_transform_changed_callback (GtkWidget *widget,
guint id);
/* focus vfuncs for non-focusable non-containers */
gboolean gtk_widget_grab_focus_none (GtkWidget *widget);
gboolean gtk_widget_focus_none (GtkWidget *widget,
GtkDirectionType direction);
/* focus vfuncs for non-focusable containers with focusable children */
gboolean gtk_widget_grab_focus_child (GtkWidget *widget);
gboolean gtk_widget_focus_child (GtkWidget *widget,
GtkDirectionType direction);
/* focus vfuncs for focusable widgets with children that don't receive focus */
gboolean gtk_widget_grab_focus_self (GtkWidget *widget);
gboolean gtk_widget_focus_self (GtkWidget *widget,
GtkDirectionType direction);
/* focus vfuncs for focusable widgets with children that receive focus */
gboolean gtk_widget_focus_all (GtkWidget *widget,
GtkDirectionType direction);
/* inline getters */

View File

@ -288,6 +288,7 @@ enum {
PROP_TRANSIENT_FOR,
PROP_APPLICATION,
PROP_DEFAULT_WIDGET,
PROP_FOCUS_WIDGET,
/* Readonly properties */
PROP_IS_ACTIVE,
@ -941,8 +942,14 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_TYPE_WIDGET,
GTK_PARAM_READWRITE|G_PARAM_STATIC_STRINGS|G_PARAM_EXPLICIT_NOTIFY);
window_props[PROP_FOCUS_WIDGET] =
g_param_spec_object ("focus-widget",
P_("Focus widget"),
P_("The focus widget"),
GTK_TYPE_WIDGET,
GTK_PARAM_READWRITE|G_PARAM_STATIC_STRINGS|G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (gobject_class, LAST_ARG, window_props);
gtk_root_install_properties (gobject_class, LAST_ARG);
/**
* GtkWindow::activate-focus:
@ -1858,7 +1865,7 @@ gtk_window_set_property (GObject *object,
case PROP_FOCUS_VISIBLE:
gtk_window_set_focus_visible (window, g_value_get_boolean (value));
break;
case LAST_ARG + GTK_ROOT_PROP_FOCUS_WIDGET:
case PROP_FOCUS_WIDGET:
gtk_window_set_focus (window, g_value_get_object (value));
break;
default:
@ -1941,7 +1948,7 @@ gtk_window_get_property (GObject *object,
case PROP_IS_MAXIMIZED:
g_value_set_boolean (value, gtk_window_is_maximized (window));
break;
case LAST_ARG + GTK_ROOT_PROP_FOCUS_WIDGET:
case PROP_FOCUS_WIDGET:
g_value_set_object (value, gtk_window_get_focus (window));
break;
default:
@ -2028,6 +2035,52 @@ gtk_window_root_get_constraint_solver (GtkRoot *root)
return priv->constraint_solver;
}
static GtkWidget *
gtk_window_root_get_focus (GtkRoot *root)
{
GtkWindow *self = GTK_WINDOW (root);
GtkWindowPrivate *priv = gtk_window_get_instance_private (self);
return priv->focus_widget;
}
static void synthesize_focus_change_events (GtkWindow *window,
GtkWidget *old_focus,
GtkWidget *new_focus);
static void
gtk_window_root_set_focus (GtkRoot *root,
GtkWidget *focus)
{
GtkWindow *self = GTK_WINDOW (root);
GtkWindowPrivate *priv = gtk_window_get_instance_private (self);
GtkWidget *old_focus = NULL;
if (focus && !gtk_widget_is_sensitive (focus))
return;
if (focus == priv->focus_widget)
return;
if (priv->focus_widget)
old_focus = g_object_ref (priv->focus_widget);
g_set_object (&priv->focus_widget, NULL);
if (old_focus)
gtk_widget_set_has_focus (old_focus, FALSE);
synthesize_focus_change_events (self, old_focus, focus);
if (focus)
gtk_widget_set_has_focus (focus, TRUE);
g_set_object (&priv->focus_widget, focus);
g_clear_object (&old_focus);
g_object_notify (G_OBJECT (self), "focus-widget");
}
static void
gtk_window_native_get_surface_transform (GtkNative *native,
int *x,
@ -2054,6 +2107,8 @@ gtk_window_root_interface_init (GtkRootInterface *iface)
{
iface->get_display = gtk_window_root_get_display;
iface->get_constraint_solver = gtk_window_root_get_constraint_solver;
iface->get_focus = gtk_window_root_get_focus;
iface->set_focus = gtk_window_root_set_focus;
}
static void
@ -5610,34 +5665,12 @@ void
gtk_window_set_focus (GtkWindow *window,
GtkWidget *focus)
{
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
GtkWidget *old_focus = NULL;
g_return_if_fail (GTK_IS_WINDOW (window));
if (focus && !gtk_widget_is_sensitive (focus))
return;
if (focus == priv->focus_widget)
return;
if (priv->focus_widget)
old_focus = g_object_ref (priv->focus_widget);
g_set_object (&priv->focus_widget, NULL);
if (old_focus)
gtk_widget_set_has_focus (old_focus, FALSE);
synthesize_focus_change_events (window, old_focus, focus);
if (focus)
gtk_widget_set_has_focus (focus, TRUE);
g_set_object (&priv->focus_widget, focus);
g_clear_object (&old_focus);
g_object_notify (G_OBJECT (window), "focus-widget");
gtk_widget_grab_focus (focus);
else
gtk_window_root_set_focus (GTK_ROOT (window), NULL);
}
static void
@ -5707,7 +5740,16 @@ _gtk_window_unset_focus_and_default (GtkWindow *window,
child = _gtk_widget_get_parent (child);
if (child == widget)
gtk_window_set_focus (GTK_WINDOW (window), NULL);
{
GtkWidget *new_focus;
if (GTK_IS_NATIVE (widget))
new_focus = gtk_widget_get_parent (widget);
else
new_focus = NULL;
gtk_window_set_focus (GTK_WINDOW (window), new_focus);
}
}
child = priv->default_widget;

View File

@ -55,7 +55,6 @@
<property name="buffer">text</property>
<property name="wrap-mode">word</property>
<property name="monospace">1</property>
<property name="has-focus">1</property>
<property name="left-margin">6</property>
<property name="right-margin">6</property>
<property name="has-tooltip">1</property>

View File

@ -143,7 +143,6 @@
<property name="name">excuse</property>
<property name="child">
<object class="GtkBox">
<property name="can-focus">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>

View File

@ -56,7 +56,6 @@ add_row (GtkContainer *box,
row = g_object_new (GTK_TYPE_LIST_BOX_ROW,
"selectable", FALSE,
"activatable", FALSE,
"can-focus", FALSE,
NULL);
label = g_object_new (GTK_TYPE_LABEL,

View File

@ -17,7 +17,6 @@
</child>
<child>
<object class="GtkScrolledWindow">
<property name="can-focus">1</property>
<property name="shadow-type">etched-in</property>
<property name="min-content-width">200</property>
<property name="max-content-height">200</property>
@ -39,7 +38,6 @@
</child>
<child>
<object class="GtkScrolledWindow">
<property name="can-focus">1</property>
<property name="shadow-type">etched-in</property>
<property name="min-content-width">200</property>
<property name="max-content-height">150</property>

View File

@ -376,7 +376,6 @@
</child>
<child>
<object class="GtkScale" id="slowdown_scale">
<property name="can-focus">1</property>
<property name="adjustment">slowdown_adjustment</property>
<property name="valign">baseline</property>
<property name="draw-value">0</property>

View File

@ -59,14 +59,12 @@
<object class="GtkButton" id="show_more_button">
<property name="label" translatable="yes">_View All Applications</property>
<property name="use-underline">1</property>
<property name="can-focus">1</property>
<property name="receives-default">1</property>
<signal name="clicked" handler="show_more_button_clicked_cb" swapped="no"/>
</object>
<object class="GtkButton" id="software_button">
<property name="label" translatable="yes">_Find New Applications</property>
<property name="use-underline">1</property>
<property name="can-focus">1</property>
<property name="receives-default">1</property>
<signal name="clicked" handler="software_button_clicked_cb" swapped="no"/>
</object>

View File

@ -24,12 +24,10 @@
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="width-request">400</property>
<property name="height-request">300</property>
<property name="can-focus">1</property>
<property name="hscrollbar-policy">never</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="program_list">
<property name="can-focus">1</property>
<property name="model">program_list_sort</property>
<property name="headers-visible">0</property>
<signal name="row-activated" handler="program_list_selection_activated" swapped="no"/>

View File

@ -20,7 +20,6 @@
<property name="hexpand">1</property>
<child>
<object class="GtkStack" id="content">
<property name="can-focus">1</property>
<property name="vexpand">1</property>
<signal name="remove" handler="assistant_remove_page_cb" swapped="no"/>
<child type="tab"/>
@ -38,7 +37,6 @@
<object class="GtkButton" id="close">
<property name="visible">0</property>
<property name="label" translatable="yes">_Close</property>
<property name="can-focus">1</property>
<property name="receives-default">1</property>
<property name="use-underline">1</property>
<style>
@ -51,7 +49,6 @@
<object class="GtkButton" id="cancel">
<property name="visible">0</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="can-focus">1</property>
<property name="receives-default">1</property>
<property name="use-underline">1</property>
<style>
@ -64,7 +61,6 @@
<object class="GtkButton" id="last">
<property name="visible">0</property>
<property name="label" translatable="yes">_Finish</property>
<property name="can-focus">1</property>
<property name="receives-default">1</property>
<property name="use-underline">1</property>
<style>
@ -76,7 +72,6 @@
<child>
<object class="GtkButton" id="back">
<property name="label" translatable="yes">_Back</property>
<property name="can-focus">1</property>
<property name="receives-default">1</property>
<property name="use-underline">1</property>
<style>
@ -88,7 +83,6 @@
<child>
<object class="GtkButton" id="forward">
<property name="label" translatable="yes">_Next</property>
<property name="can-focus">1</property>
<property name="receives-default">1</property>
<property name="use-underline">1</property>
<style>
@ -101,7 +95,6 @@
<object class="GtkButton" id="apply">
<property name="visible">0</property>
<property name="label" translatable="yes">_Apply</property>
<property name="can-focus">1</property>
<property name="receives-default">1</property>
<property name="use-underline">1</property>
<style>

View File

@ -54,10 +54,10 @@
<child>
<object class="GtkColorSwatch" id="swatch">
<property name="name">editor-color-sample</property>
<property name="can-focus">False</property>
<property name="rgba">rgb(255,255,255)</property>
<property name="selectable">False</property>
<property name="has-menu">False</property>
<property name="can-focus">False</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
@ -66,7 +66,6 @@
</child>
<child>
<object class="GtkEntry" id="entry">
<property name="can-focus">1</property>
<child internal-child="accessible">
<object class="AtkObject" id="entry-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Color Name</property>
@ -84,7 +83,6 @@
<child>
<object class="GtkColorScale" id="h_slider">
<property name="name">h</property>
<property name="can-focus">True</property>
<property name="orientation">vertical</property>
<property name="adjustment">h_adj</property>
<property name="draw-value">False</property>
@ -98,7 +96,6 @@
<child>
<object class="GtkColorScale" id="a_slider">
<property name="name">a</property>
<property name="can-focus">True</property>
<property name="adjustment">a_adj</property>
<property name="draw-value">False</property>
<property name="scale-type">1</property>
@ -118,7 +115,6 @@
<property name="name">sv</property>
<property name="width-request">300</property>
<property name="height-request">300</property>
<property name="can-focus">True</property>
<property name="h-adjustment">h_adj</property>
<property name="s-adjustment">s_adj</property>
<property name="v-adjustment">v_adj</property>
@ -158,7 +154,6 @@
</child>
<child>
<object class="GtkSpinButton" id="a_entry">
<property name="can-focus">1</property>
<property name="width-chars">2</property>
<property name="max-width-chars">2</property>
<property name="climb-rate">1</property>
@ -200,7 +195,6 @@
</child>
<child>
<object class="GtkSpinButton" id="h_entry">
<property name="can-focus">1</property>
<property name="width-chars">2</property>
<property name="max-width-chars">2</property>
<property name="climb-rate">1</property>
@ -252,7 +246,6 @@
</child>
<child>
<object class="GtkSpinButton" id="s_entry">
<property name="can-focus">1</property>
<property name="width-chars">2</property>
<property name="max-width-chars">2</property>
<property name="climb-rate">1</property>
@ -269,7 +262,6 @@
</child>
<child>
<object class="GtkSpinButton" id="v_entry">
<property name="can-focus">1</property>
<property name="width-chars">2</property>
<property name="max-width-chars">2</property>
<property name="climb-rate">1</property>

View File

@ -61,14 +61,12 @@
<object class="GtkScrolledWindow" id="list_scrolled_window">
<property name="width-request">400</property>
<property name="height-request">300</property>
<property name="can-focus">1</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="hscrollbar-policy">never</property>
<property name="shadow-type">etched-in</property>
<child>
<object class="GtkTreeView" id="family_face_list">
<property name="can-focus">1</property>
<property name="model">filter_model</property>
<property name="headers-visible">0</property>
<property name="enable-search">0</property>
@ -103,7 +101,6 @@
</child>
<child>
<object class="GtkEntry" id="preview">
<property name="can-focus">1</property>
<property name="placeholder-text" translatable="yes">Preview text</property>
<child>
<object class="GtkEventControllerScroll">
@ -131,7 +128,6 @@
</child>
<child>
<object class="GtkScale" id="size_slider">
<property name="can-focus">1</property>
<property name="hexpand">1</property>
<property name="adjustment">slider_adjustment</property>
<property name="draw-value">0</property>
@ -150,7 +146,6 @@
</child>
<child>
<object class="GtkSpinButton" id="size_spin">
<property name="can-focus">1</property>
<property name="adjustment">spin_adjustment</property>
<property name="valign">center</property>
<signal name="output" handler="output_cb"/>
@ -233,7 +228,6 @@
</child>
<child>
<object class="GtkEntry" id="preview2">
<property name="can-focus">1</property>
<property name="placeholder-text" translatable="yes">Preview text</property>
<property name="text" bind-source="preview" bind-property="text" bind-flags="bidirectional"/>
<property name="attributes" bind-source="preview" bind-property="attributes" bind-flags="bidirectional"/>
@ -272,7 +266,6 @@
</child>
<child>
<object class="GtkScale" id="size_slider2">
<property name="can-focus">1</property>
<property name="hexpand">1</property>
<property name="adjustment">slider_adjustment</property>
<property name="draw-value">0</property>
@ -285,7 +278,6 @@
</child>
<child>
<object class="GtkSpinButton" id="size_spin2">
<property name="can-focus">1</property>
<property name="adjustment">spin_adjustment</property>
<property name="valign">center</property>
<signal name="output" handler="output_cb"/>

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="gtk40">
<template class="GtkLockButton" parent="GtkButton">
<property name="can-focus">1</property>
<property name="receives-default">1</property>
<child>
<object class="GtkBox" id="box">

View File

@ -20,7 +20,6 @@
<property name="spacing">6</property>
<child>
<object class="GtkButton" id="play_button">
<property name="can-focus">1</property>
<property name="receives-default">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
@ -36,7 +35,6 @@
<child>
<object class="GtkScale" id="seek_scale">
<property name="adjustment">time_adjustment</property>
<property name="can_focus">1</property>
<property name="draw_value">0</property>
<property name="restrict-to-fill-level">0</property>
<property name="hexpand">1</property>

View File

@ -122,7 +122,6 @@
</child>
<child>
<object class="GtkRadioButton" id="portrait_radio">
<property name="can-focus">1</property>
<property name="hexpand">1</property>
<property name="active">1</property>
<child>
@ -148,7 +147,6 @@
</child>
<child>
<object class="GtkRadioButton" id="reverse_portrait_radio">
<property name="can-focus">1</property>
<property name="hexpand">1</property>
<property name="active">1</property>
<property name="group">portrait_radio</property>
@ -175,7 +173,6 @@
</child>
<child>
<object class="GtkRadioButton" id="landscape_radio">
<property name="can-focus">1</property>
<property name="hexpand">1</property>
<property name="active">1</property>
<property name="group">portrait_radio</property>
@ -202,7 +199,6 @@
</child>
<child>
<object class="GtkRadioButton" id="reverse_landscape_radio">
<property name="can-focus">1</property>
<property name="hexpand">1</property>
<property name="group">portrait_radio</property>
<child>

View File

@ -147,7 +147,6 @@
</child>
<child>
<object class="GtkScrolledWindow">
<property name="can-focus">1</property>
<property name="vexpand">1</property>
<property name="shadow-type">in</property>
<property name="min-content-width">250</property>
@ -157,7 +156,6 @@
<property name="shadow-type">none</property>
<child>
<object class="GtkListBox" id="recent_servers_listbox">
<property name="can-focus">1</property>
<property name="selection-mode">none</property>
<signal name="row-activated" handler="on_recent_servers_listbox_row_activated" object="GtkPlacesView" swapped="yes"/>
</object>
@ -194,7 +192,6 @@
<property name="shadow-type">none</property>
<child>
<object class="GtkListBox" id="listbox">
<property name="can-focus">1</property>
<property name="selection-mode">none</property>
<signal name="row-activated" handler="on_listbox_row_activated" object="GtkPlacesView" swapped="yes"/>
</object>
@ -272,7 +269,6 @@
<object class="GtkButton" id="connect_button">
<property name="label" translatable="yes">Con_nect</property>
<property name="use-underline">1</property>
<property name="can-focus">1</property>
<property name="sensitive">0</property>
<property name="receives-default">1</property>
<property name="valign">center</property>
@ -284,7 +280,6 @@
<property name="hexpand">1</property>
<child>
<object class="GtkEntry" id="address_entry">
<property name="can-focus">1</property>
<property name="hexpand">1</property>
<property name="width-chars">20</property>
<property name="placeholder-text" translatable="yes">Enter server address…</property>
@ -297,7 +292,6 @@
</child>
<child>
<object class="GtkMenuButton" id="server_list_button">
<property name="can-focus">1</property>
<property name="receives-default">1</property>
<property name="direction">up</property>
<property name="popover">recent_servers_popover</property>

View File

@ -3,7 +3,6 @@
<requires lib="gtk+" version="3.16"/>
<template class="GtkPlacesViewRow" parent="GtkListBoxRow">
<property name="width-request">100</property>
<property name="can-focus">1</property>
<child>
<object class="GtkBox" id="box">
<property name="margin-start">12</property>

View File

@ -52,7 +52,6 @@
<property name="vexpand">1</property>
<child>
<object class="GtkNotebook" id="notebook">
<property name="can-focus">1</property>
<property name="show-border">0</property>
<child>
<object class="GtkNotebookPage">
@ -70,12 +69,10 @@
<property name="spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="printer_swin">
<property name="can-focus">1</property>
<property name="shadow-type">in</property>
<property name="vexpand">1</property>
<child>
<object class="GtkTreeView" id="printer_treeview">
<property name="can-focus">1</property>
<property name="model">printer_list_filter</property>
<signal name="row-activated" handler="emit_ok_response" swapped="no"/>
<child internal-child="selection">
@ -169,7 +166,6 @@
<child>
<object class="GtkRadioButton" id="all_pages_radio">
<property name="label" translatable="yes">_All Pages</property>
<property name="can-focus">1</property>
<property name="use-underline">1</property>
<property name="active">1</property>
<layout>
@ -183,7 +179,6 @@
<object class="GtkRadioButton" id="current_page_radio">
<property name="label" translatable="yes">C_urrent Page</property>
<property name="sensitive">0</property>
<property name="can-focus">1</property>
<property name="use-underline">1</property>
<property name="group">all_pages_radio</property>
<layout>
@ -197,7 +192,6 @@
<object class="GtkRadioButton" id="selection_radio">
<property name="label" translatable="yes">Se_lection</property>
<property name="sensitive">0</property>
<property name="can-focus">1</property>
<property name="use-underline">1</property>
<property name="group">all_pages_radio</property>
<layout>
@ -210,7 +204,6 @@
<child>
<object class="GtkRadioButton" id="page_range_radio">
<property name="label" translatable="yes">Pag_es:</property>
<property name="can-focus">1</property>
<property name="tooltip-text" translatable="yes">Specify one or more page ranges,
e.g. 13, 7, 11</property>
<property name="use-underline">1</property>
@ -224,7 +217,6 @@
</child>
<child>
<object class="GtkEntry" id="page_range_entry">
<property name="can-focus">1</property>
<property name="tooltip-text" translatable="yes">Specify one or more page ranges,
e.g. 13, 7, 11</property>
<property name="activates-default">1</property>
@ -287,7 +279,6 @@
</child>
<child>
<object class="GtkSpinButton" id="copies_spin">
<property name="can-focus">1</property>
<property name="valign">baseline</property>
<property name="adjustment">copies_spin_adjustment</property>
<signal name="changed" handler="update_dialog_from_capabilities" object="GtkPrintUnixDialog" swapped="yes"/>
@ -301,7 +292,6 @@
<child>
<object class="GtkCheckButton" id="collate_check">
<property name="label" translatable="yes">C_ollate</property>
<property name="can-focus">1</property>
<property name="use-underline">1</property>
<signal name="toggled" handler="update_collate_icon" swapped="no"/>
<layout>
@ -313,7 +303,6 @@
<child>
<object class="GtkCheckButton" id="reverse_check">
<property name="label" translatable="yes">_Reverse</property>
<property name="can-focus">1</property>
<property name="use-underline">1</property>
<signal name="toggled" handler="update_collate_icon" swapped="no"/>
<layout>
@ -506,7 +495,6 @@
<child>
<object class="GtkSpinButton" id="scale_spin">
<property name="valign">baseline</property>
<property name="can-focus">1</property>
<property name="adjustment">scale_spin_adjustment</property>
<property name="digits">1</property>
</object>
@ -817,7 +805,6 @@
<child>
<object class="GtkRadioButton" id="print_now_radio">
<property name="label" translatable="yes" comments="this is one of the choices for the print at option in the print dialog">_Now</property>
<property name="can-focus">1</property>
<property name="use-underline">1</property>
<property name="active">1</property>
<signal name="toggled" handler="update_print_at_option" object="GtkPrintUnixDialog" swapped="yes"/>
@ -832,7 +819,6 @@
<object class="GtkRadioButton" id="print_at_radio">
<property name="sensitive">0</property>
<property name="label" translatable="yes" comments="this is one of the choices for the print at option in the print dialog. It also serves as the label for an entry that allows the user to enter a time.">A_t:</property>
<property name="can-focus">1</property>
<property name="has-tooltip">1</property>
<property name="tooltip-markup" translatable="yes">Specify the time of print,
e.g. 1530, 235 pm, 141520, 114630 am, 4 pm</property>
@ -851,7 +837,6 @@
<child>
<object class="GtkEntry" id="print_at_entry">
<property name="sensitive">0</property>
<property name="can-focus">1</property>
<property name="has-tooltip">1</property>
<property name="tooltip-markup" translatable="yes">Specify the time of print,
e.g. 1530, 235 pm, 141520, 114630 am, 4 pm</property>
@ -875,7 +860,6 @@
<object class="GtkRadioButton" id="print_hold_radio">
<property name="sensitive">0</property>
<property name="label" translatable="yes" comments="this is one of the choices for the print at option in the print dialog. It means that the print job will not be printed until it explicitly gets &apos;released&apos;.">On _hold</property>
<property name="can-focus">1</property>
<property name="has-tooltip">1</property>
<property name="tooltip-markup" translatable="yes">Hold the job until it is explicitly released</property>
<property name="tooltip-text" translatable="yes">Hold the job until it is explicitly released</property>
@ -989,7 +973,6 @@
<property name="position">3</property>
<property name="child">
<object class="GtkScrolledWindow" id="image_quality_page">
<property name="can-focus">1</property>
<property name="hscrollbar-policy">never</property>
<property name="hexpand">1</property>
<child>
@ -1021,7 +1004,6 @@
<property name="position">4</property>
<property name="child">
<object class="GtkScrolledWindow" id="color_page">
<property name="can-focus">1</property>
<property name="hscrollbar-policy">never</property>
<child>
<object class="GtkViewport" id="viewport2">
@ -1052,7 +1034,6 @@
<property name="position">5</property>
<property name="child">
<object class="GtkScrolledWindow" id="finishing_page">
<property name="can-focus">1</property>
<property name="hscrollbar-policy">never</property>
<child>
<object class="GtkViewport" id="viewport3">
@ -1083,7 +1064,6 @@
<property name="position">6</property>
<property name="child">
<object class="GtkScrolledWindow" id="advanced_page">
<property name="can-focus">1</property>
<property name="hscrollbar-policy">never</property>
<child>
<object class="GtkViewport" id="viewport4">

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="gtk40">
<template class="GtkScaleButton" parent="GtkButton">
<property name="can-focus">1</property>
<property name="receives-default">1</property>
<property name="relief">none</property>
<property name="focus-on-click">0</property>
@ -27,7 +26,6 @@
<property name="spacing">4</property>
<child>
<object class="GtkButton" id="plus_button">
<property name="can-focus">1</property>
<property name="receives-default">1</property>
<property name="relief">none</property>
<property name="halign">center</property>
@ -39,7 +37,6 @@
<child>
<object class="GtkScale" id="scale">
<property name="height-request">100</property>
<property name="can-focus">1</property>
<property name="orientation">vertical</property>
<property name="inverted">1</property>
<property name="round-digits">1</property>
@ -49,7 +46,6 @@
</child>
<child>
<object class="GtkButton" id="minus_button">
<property name="can-focus">1</property>
<property name="receives-default">1</property>
<property name="relief">none</property>
<property name="halign">center</property>

View File

@ -6,7 +6,6 @@
<property name="page-increment">0.2</property>
</object>
<template class="GtkVolumeButton" parent="GtkScaleButton">
<property name="can-focus">1</property>
<property name="receives-default">1</property>
<property name="has-tooltip">1</property>
<property name="relief">none</property>

View File

@ -363,7 +363,7 @@ See the GNU General Public License, version 3 or later for details.
"filler"
parent: headerbar1
index: 0
state: enabled sensitive
state: enabled focusable sensitive
toolkit: gtk
<AtkComponent>
layer: widget

View File

@ -2,12 +2,10 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="button1">
<property name="label" translatable="yes">Hello World!</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="button1-accessible">

View File

@ -6,7 +6,6 @@
<property name="child">
<object class="GtkButton" id="button1">
<property name="label" translatable="yes">Button 1</property>
<property name="can_focus">1</property>
</object>
</property>
</object>
@ -17,7 +16,6 @@
<property name="child">
<object class="GtkButton" id="button2">
<property name="label" translatable="yes">Button 2</property>
<property name="can_focus">1</property>
</object>
</property>
</object>

View File

@ -7,7 +7,6 @@
<object class="GtkToggleButton" id="button1">
<property name="label" translatable="yes">Hello World!</property>
<property name="active">1</property>
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<layout>
<property name="left_attach">0</property>
@ -18,7 +17,6 @@
<child>
<object class="GtkCheckButton" id="button2">
<property name="label" translatable="yes">Hello World!</property>
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<layout>
<property name="left_attach">1</property>
@ -29,7 +27,6 @@
<child>
<object class="GtkRadioButton" id="button3">
<property name="label" translatable="yes">Hello World!</property>
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<layout>
<property name="left_attach">2</property>
@ -42,7 +39,6 @@
<property name="label" translatable="yes">Hello World!</property>
<property name="active">1</property>
<property name="group">button3</property>
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<layout>
<property name="left_attach">3</property>
@ -53,7 +49,6 @@
<child>
<object class="GtkSwitch" id="button5">
<property name="active">1</property>
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<layout>
<property name="left_attach">4</property>
@ -63,7 +58,6 @@
</child>
<child>
<object class="GtkSwitch" id="button6">
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<child internal-child="accessible">
<object class="AtkObject" id="button6-accessible">
@ -78,7 +72,6 @@
</child>
<child>
<object class="GtkButton" id="button7">
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<property name="label">Text Button</property>
<layout>
@ -89,7 +82,6 @@
</child>
<child>
<object class="GtkButton" id="button8">
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
@ -101,7 +93,6 @@
</child>
<child>
<object class="GtkButton" id="button9">
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<property name="halign">center</property>
<property name="valign">center</property>

View File

@ -2,7 +2,6 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<child>
<object class="GtkCalendar" id="calendar1">
<property name="visible">True</property>

View File

@ -29,7 +29,7 @@ window1
"filler"
parent: dialog-vbox1
index: 0
state: enabled sensitive showing visible
state: enabled focusable sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -678,7 +678,7 @@ window1
parent: unnamed-GtkContainerAccessible-0
index: 2
name: Custom
state: enabled multi-line sensitive showing visible
state: enabled focusable multi-line sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -787,7 +787,7 @@ window1
"radio button"
parent: grid
index: 1
state: enabled focusable sensitive visible
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -902,7 +902,7 @@ window1
parent: grid2
index: 0
name: S
state: enabled multi-line sensitive visible
state: enabled focusable multi-line sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -942,7 +942,7 @@ window1
parent: grid2
index: 1
name: V
state: enabled multi-line sensitive visible
state: enabled focusable multi-line sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -982,7 +982,7 @@ window1
parent: grid2
index: 2
name: Saturation
state: enabled horizontal sensitive visible
state: enabled focusable horizontal sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -996,7 +996,7 @@ window1
parent: grid2
index: 3
name: Value
state: enabled horizontal sensitive visible
state: enabled focusable horizontal sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -1028,7 +1028,7 @@ window1
parent: grid3
index: 0
name: H
state: enabled multi-line sensitive visible
state: enabled focusable multi-line sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -1068,7 +1068,7 @@ window1
parent: grid3
index: 1
name: Hue
state: enabled horizontal sensitive visible
state: enabled focusable horizontal sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -1100,7 +1100,7 @@ window1
parent: grid4
index: 0
name: A
state: enabled multi-line sensitive visible
state: enabled focusable multi-line sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -1140,7 +1140,7 @@ window1
parent: grid4
index: 1
name: Alpha
state: enabled horizontal sensitive visible
state: enabled focusable horizontal sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget

View File

@ -29,7 +29,7 @@ window1
index: 0
name: Combo:
label-for: combo1
state: enabled multi-line sensitive showing visible
state: enabled focusable multi-line sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget

View File

@ -2,7 +2,6 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="box1">
<child>

View File

@ -29,7 +29,7 @@ window1
index: 0
name: entry:
label-for: entry1
state: enabled multi-line sensitive showing visible
state: enabled focusable multi-line sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -70,7 +70,7 @@ window1
index: 1
name: password entry:
label-for: entry2
state: enabled multi-line sensitive showing visible
state: enabled focusable multi-line sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -111,7 +111,7 @@ window1
index: 2
name: spinbutton:
label-for: spinbutton1
state: enabled multi-line sensitive showing visible
state: enabled focusable multi-line sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -299,7 +299,7 @@ window1
parent: box1
index: 6
labelled-by: label3
state: enabled horizontal sensitive showing visible
state: enabled focusable horizontal sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget

View File

@ -10,7 +10,6 @@
<property name="page-increment">5.0</property>
</object>
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="box1">
<child>

View File

@ -19,7 +19,7 @@ window1
parent: window1
index: 0
name: Reveal this
state: enabled expandable focusable focused sensitive showing visible
state: enabled expandable focused sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -30,7 +30,7 @@ window1
label1
"label"
name: Hello World!
state: enabled multi-line sensitive visible
state: enabled focusable multi-line sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget

View File

@ -2,7 +2,6 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<child>
<object class="GtkExpander" id="expander1">
<property name="label" translatable="yes">Reveal this</property>

View File

@ -2,12 +2,10 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="button1">
<property name="label" translatable="yes">Hello World!</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
</child>

View File

@ -18,7 +18,7 @@ window1
"layered pane"
parent: window1
index: 0
state: enabled focusable focused sensitive showing visible
state: enabled focused sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget

View File

@ -14,7 +14,6 @@
</data>
</object>
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<child>
<object class="GtkIconView" id="iv1">
<property name="visible">True</property>

View File

@ -56,7 +56,7 @@ window1
parent: unnamed-GtkContainerAccessible-3
index: 0
name: Some important info
state: enabled multi-line sensitive showing visible
state: enabled focusable multi-line sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget

View File

@ -2,7 +2,6 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<child>
<object class="GtkInfoBar" id="bar1">
<property name="visible">True</property>

View File

@ -2,7 +2,6 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="label1">
<property name="label">Go to the &lt;a href="http://www.gtk.org" title="&lt;i&gt;Our&lt;/i&gt; website"&gt;GTK+ website&lt;/a&gt; or &lt;small&gt;&gt;&lt;a href="http://www.google.com"&gt;google it&lt;/a&gt;&lt;/small&gt;</property>

View File

@ -2,7 +2,6 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="label1">
<property name="label">Go to the &lt;a href="http://www.gtk.org" title="&lt;i&gt;Our&lt;/i&gt; website"&gt;GTK+ website&lt;/a&gt; or &lt;small&gt;&gt;&lt;a href="http://www.google.com"&gt;google it&lt;/a&gt;&lt;/small&gt;</property>

View File

@ -2,12 +2,10 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<child>
<object class="GtkLinkButton" id="button1">
<property name="label" translatable="yes">Hello World!</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="uri">http://www.gtk.org</property>
<property name="visited">True</property>
</object>

View File

@ -37,7 +37,7 @@ window1
"list item"
parent: listbox1
index: 0
state: enabled focusable focused sensitive showing visible
state: enabled focused sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -47,7 +47,7 @@ window1
parent: unnamed-GtkListBoxRowAccessible-1
index: 0
name: Row One
state: enabled multi-line sensitive showing visible
state: enabled focusable multi-line sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -86,7 +86,7 @@ window1
"list item"
parent: listbox1
index: 1
state: enabled focusable sensitive showing visible
state: enabled sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -96,7 +96,7 @@ window1
parent: unnamed-GtkListBoxRowAccessible-2
index: 0
name: Row Two
state: enabled multi-line sensitive showing visible
state: enabled focusable multi-line sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -145,7 +145,7 @@ window1
"list item"
parent: listbox2
index: 0
state: enabled focusable selectable sensitive showing visible
state: enabled selectable sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
@ -155,7 +155,7 @@ window1
parent: unnamed-GtkListBoxRowAccessible-3
index: 0
name: Row Tree
state: enabled multi-line sensitive showing visible
state: enabled focusable multi-line sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget

Some files were not shown because too many files have changed in this diff Show More