Commit Graph

66466 Commits

Author SHA1 Message Date
Matthias Clasen
e823218ee7 atspiroot: Fix GetState implementation
When the GetState signature says 'au', it actually
means a bitset that is sent as a pair of 32bit integers.
2020-10-10 13:10:36 +01:00
Matthias Clasen
9ab449e0af atspiroot: Implement GetIndexInParent
Just for good measure
2020-10-10 13:10:36 +01:00
Matthias Clasen
049a06b6a6 atspicontext: Implement GetIndexInParent
This is needed for ATs to take our tree seriously.
2020-10-10 13:10:36 +01:00
Matthias Clasen
b39f2b6465 atspicontext: Implement more accessible api
Implement GetChildAtIndex, GetChildren and ChildCount.
2020-10-10 13:10:36 +01:00
Matthias Clasen
c78019852e atspiroot: Implement GetChildren
No surprises here.
2020-10-10 13:10:36 +01:00
Matthias Clasen
948845b28b atspiroot: Don't leak references
The reffing getter trap, lurking behind g_list_model_get_item().
2020-10-10 13:10:36 +01:00
Matthias Clasen
416d7de267 atspiroot: Implement GetLocale 2020-10-10 13:10:36 +01:00
Matthias Clasen
af99e4ca4b atspicontext: Print out the a11y bus address
Make our debug spew useful: Having the bus address
makes it easy to jump on the a11y bus to look around
with dbus tools.
2020-10-10 13:10:36 +01:00
Emmanuele Bassi
5a733854b6 a11y: Localise the role name of the root node 2020-10-10 13:10:36 +01:00
Emmanuele Bassi
19eb3019fe ci: Use test AT context with installed tests
Otherwise we're going to need an AT-SPI service on the session, and the
accessibility bus.
2020-10-10 13:10:36 +01:00
Emmanuele Bassi
ad5277145e a11y: Register the Accessible interface on all AtSpiContext instances
This is not a complement implementation.
2020-10-10 13:10:36 +01:00
Emmanuele Bassi
32ab032cfa a11y: Implement more ATSPI methods on the root node 2020-10-10 13:10:36 +01:00
Emmanuele Bassi
7661759acd a11y: Add method to extract desktop data
We are going to need the desktop name and path to populate the parent
property of AtSpiContexts associated to top level widgets.
2020-10-10 13:10:36 +01:00
Emmanuele Bassi
468317fef2 a11y: Validate the DBus context path
UUIDs use dashes to separate the various blocks; unfortunately, this
results in an invalid DBus object path. Replace the dashes with an
underscore.
2020-10-10 13:10:36 +01:00
Emmanuele Bassi
343c9ca4fc a11y: Turn accessible roles to string
Add a simple utility function to turn GtkAccessibleRole values into the
appropriate string, including localization.
2020-10-10 13:10:36 +01:00
Emmanuele Bassi
edd05cd69b a11y: Convert GTK roles to ATSPI ones
There's not a precise, 1:1 mapping between the newer ARIA roles and the
older ATSPI ones. We make do with what we have.
2020-10-10 13:10:36 +01:00
Emmanuele Bassi
47e537678d a11y: Compute the label for a GtkATContext
The ARIA spec defines the mechanism for determining the name of an
accessible element—see §4.3 of the WAI-ARIA spec.

We follow the specification as much as it makes sense for GTK to do
so:

 1. if the element is hidden, return an empty string
 1. if the element has a labelled-by relation set, retrieve the
    label of the related element
 2. if the element has a label property set, use the value of
    the property
 3. if neither labelled-by nor label attributes are set, we use
    the role to compute the name:
   - for a `range` role, we return the contents of the value of
     the `value-text` or `value-now` properties
   - for any other role, we return a textual representation of
     the GtkAccessibleRole enumeration value
2020-10-10 13:10:36 +01:00
Emmanuele Bassi
fb552ba10a tests: Use the test ATContext for every test
Otherwise we're going to need a full desktop session in order to run the
test suite.
2020-10-10 13:10:36 +01:00
Emmanuele Bassi
33d9f46574 a11y: Return the ATSPI role for the root element 2020-10-10 13:10:36 +01:00
Emmanuele Bassi
ae7429a7d0 a11y: Add AT-SPI cache object
Right now, the cache is unused, and we still need to implement the
serialisation method and emit the signals.
2020-10-10 13:10:36 +01:00
Emmanuele Bassi
d6554e37b6 a11y: Ignore widgets during destruction
There's no point in creating a GtkATContext when a widget is getting
destroyed.
2020-10-10 13:10:36 +01:00
Emmanuele Bassi
67c91bad5f a11y: Register the accessible root object
When we create the first AT-SPI context we also need to register the
accessible root on the accessibility bus. The accessible root object is
the main entry point of an accessible application, and it holds the
global state to present to the ATs that connect to the bus.
2020-10-10 13:10:36 +01:00
Emmanuele Bassi
65e6e9854e a11y: Add a display to GtkATContext
Since we need to check at run time what kind of AT context to use, we
need a hook into the whole GDK backend machinery. The display connection
seems to be the best choice, in this case, as it allows us to determine
whether we're running on an X11 or Wayland system, and thus whether we
should create a GtkAtSpiContext.

This requires some surgery to fix the GtkATContext creation function, in
order to include a GdkDisplay instance.
2020-10-10 13:10:36 +01:00
Emmanuele Bassi
a9a5453a4b a11y: Add dummy AT-SPI context
Does not do anything, at the moment, but it's going to get filled out
soon.

The backend is selected depending on the platform being compiled in;
since we're using AT-SPI on X11 and Wayland, and we don't have other
accessibility implementations, we currently don't care about run time
selection, but we're going to have to deal with that.
2020-10-10 13:10:36 +01:00
Emmanuele Bassi
5b4ae36c64 a11y: Add the AT-SPI DBus descriptions
And generate the code for the DBus interfaces.

We don't want the full object manager experience, here, because we're
going to have a single object responding to various interfaces and
remote method calls. For this reason, we're not using the gnome module
in Meson to call gdbus-codegen for us: we need to use the interface info
command line arguments, and those are not available from Meson.
2020-10-10 13:10:36 +01:00
Piotr Drąg
91ba0a31e7 Update Polish translation 2020-10-10 12:45:37 +02:00
Marek Černocký
72ea3a1655 Updated Czech translation 2020-10-10 12:17:27 +02:00
Matthias Clasen
758675f44e Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #3242 and #3240

See merge request GNOME/gtk!2679
2020-10-09 13:35:57 +00:00
Matthias Clasen
8fcd4ac0f9 gtk-demo: Keep undisplayable resources out of view
No point in showing an apologetic tab for a blob of binary data.
gtk4-demo shows the resources under /DEMONAME/ for each demo,
so move the data to /DEMONAME_data/.
2020-10-09 07:52:29 -04:00
Matthias Clasen
4c3eb7c6f7 Merge branch 'ebassi/for-master' into 'master'
Tone down a user visible message

See merge request GNOME/gtk!2678
2020-10-09 11:47:38 +00:00
Matthias Clasen
115ed005e6 Send focus events to the root
We are not propagating focus change events, and that is the only
place where we are listening for focus change events. If GtkWindow
does not see focus-in events for its popovers, we end up with
inadvertendly inactive windows.

Fixes: #3240
2020-10-09 07:43:40 -04:00
Matthias Clasen
6a0704aeb4 window: Be more careful when looking for focus
When passing focus up to a parent, make sure the
newly chosen focus widget actually accepts the focus.
2020-10-09 07:43:25 -04:00
Matthias Clasen
eb647299d4 build: Require sysprof 3.38.0
We use sysprof_collector_request_counters, which
was introduced in sysprof 3.38.0.
2020-10-09 07:43:25 -04:00
Matthias Clasen
e7aa10342b gtk-demo: Ellipsize columns in the characters demo
some of the columns have uneven widths, causing them
to bounce around as you scroll. Ellipsize them and
give them a fixed with.
2020-10-09 07:43:25 -04:00
Matthias Clasen
c835df5602 docs: Add more details to the migration guide
Add some details about GdkSurface and GtkWindow api changes.

Fixes: #3242
2020-10-09 07:43:25 -04:00
Emmanuele Bassi
43300b4047 Tone down a user visible message
Self-deprecating humour badly translates to a demo message.
2020-10-09 10:14:41 +01:00
Timm Bäder
cdd2a2af1b Merge branch 'kjellahl/gdkseat' into 'master'
gdkseat: Make gdk_seat_get_tools() public

Closes #3241

See merge request GNOME/gtk!2677
2020-10-08 15:05:57 +00:00
Kjell Ahlstedt
cb98a732e4 gdkseat: Make gdk_seat_get_tools() public
Fixes #3241
2020-10-08 16:22:05 +02:00
Timm Bäder
4450f64421 Merge branch 'fix.builder.msvc' into 'master'
testsuite/gtk/builder.c: Fix running on Visual Studio

See merge request GNOME/gtk!2676
2020-10-08 09:42:04 +00:00
Chun-wei Fan
1e4d3b6ca1 testsuite/gtk/builder.c: Fix running on Visual Studio
Explicitly say in the code that we are exporting the symbols so that when the
test program runs, it can find the required builder symbols.
2020-10-08 16:11:35 +08:00
Matthias Clasen
08ecf779f9 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!2674
2020-10-08 02:19:42 +00:00
Matthias Clasen
5d7907caa5 gdk: Drop gdk_surface_new_temp
It is not used anymore.
2020-10-07 21:18:25 -04:00
Matthias Clasen
606ab611bd win32: Stop using gdk_surface_new_temp
No need to roundtrip through the frontend to create
one of our own surfaces.
2020-10-07 21:07:40 -04:00
Matthias Clasen
27ef9d9e5e broadway: Stop using gdk_surface_new_temp
No need to roundtrip through the frontend to create
one of our own surfaces.
2020-10-07 21:04:05 -04:00
Matthias Clasen
839baf2bef x11: Stop using gdk_surface_new_temp
No need to roundtrip through the frontend to create
one of our own surfaces.
2020-10-07 21:02:22 -04:00
Matthias Clasen
e602d67e59 wayland: Stop using gdk_surface_new_temp
No need to roundtrip through the frontend to create
one of our own surfaces.
2020-10-07 21:02:22 -04:00
Matthias Clasen
ba108f261f gdk: Drop some unused private api
No users of gdk_display_peek_event, gdk_display_has_pending
_gdk_display_event_data_copy or _gdk_display_event_data_free,
so drop all of these, and related vfuncs.
2020-10-07 21:02:22 -04:00
Matthias Clasen
668868fb1f Merge branch 'master' into 'master'
Allow LPR backend to print PDF and PS file formats

See merge request GNOME/gtk!418
2020-10-07 20:51:40 +00:00
Benjamin Otte
bc5723a846 Merge branch 'wip/otte/for-master' into 'master'
textbuffer: Don't serialize the \0 byte

See merge request GNOME/gtk!2672
2020-10-07 20:33:25 +00:00
Matthias Clasen
98c7de4aa3 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #3237

See merge request GNOME/gtk!2673
2020-10-07 20:30:52 +00:00