Commit Graph

649 Commits

Author SHA1 Message Date
Matthias Clasen
7ee5779efc gtk: Remove menu code
GtkMenu, GtkMenuBar, GtkMenuItem and their subclasses
and supporting classes are replaced by model-based popover
implementations.
2019-12-29 20:31:58 -05:00
Matthias Clasen
27543120f2 menubutton: Stop supporting menus 2019-12-29 20:31:57 -05:00
Benjamin Otte
336d652be5 a11y: We can peek here
Avoids instantiating a11y objects when we don't need to.
2019-12-09 16:35:41 +01:00
Emmanuele Bassi
def700739d Use a single compilation symbol
We use a compilation symbol in our build to allow the inclusion of
specific headers while building GTK, to avoid the need to include only
the global header.

Each namespace has its own compilation symbol because we used to have
different libraries, and strict symbol visibility between libraries;
now that we have a single library, and we can use private symbols across
namespaces while building GTK, we should have a single compilation
symbol, and simplify the build rules.
2019-11-27 13:33:43 +00:00
Emmanuele Bassi
b70e4f6de9 Rename "iconify" to "minimize"
The "iconified" state is mostly an X11-ism; every other platform calls
this state "minimized" because it may not involve turning a window into
an icon at all.
2019-11-16 20:07:37 +00:00
Christian Hergert
8373cc6c47 textview: revert renaming of buffer_to_surface_coords()
The renaming of this function doesn't make much since because the window
is the GtkTextWindowType, not GdkWindow specifically. So we can keep the
old name which is closer to the proper meaning and less code for consumers
to change when porting to 4.x.
2019-10-04 13:22:49 -07:00
Matthias Clasen
fcdea03796 Fix menu item accessible
The menu shell is not a direct parent anymore.
2019-06-01 03:39:12 +00:00
Matthias Clasen
f0ef5332be a11y: Stop using gdk_surface_get_frame_extnts
This api is going away.
2019-05-29 18:04:08 +00:00
Matthias Clasen
83827d3199 a11y: Stop using gdk_surface_get_origin
Global coordinates are going away.
Stop supporting ATK_XY_SCREEN.
2019-05-29 18:04:08 +00:00
Matthias Clasen
7447abb52b Stop using gtk_widget_get_toplevel
All uses of it can be replaced by gtk_widget_get_root.
2019-05-28 20:25:16 +00:00
Matthias Clasen
948347afa9 Stop using gtk_widget_is_toplevel 2019-05-28 20:25:16 +00:00
Matthias Clasen
302d2a04ae Stop using gtk_widget_get_surface
Replace all uses of gtk_widget_get_surface by
gtk_native_get_surface.
2019-05-28 20:25:16 +00:00
Matthias Clasen
25aef96d5d popover: Rename modal to autohide
This is the term we use for the surface,
and it matches the behavior a bit better
than modal.

Update all callers.
2019-05-28 20:25:15 +00:00
Matthias Clasen
43d4c908c9 a11y: Stop supporting ATK_XY_SCREEN
We were already not supporting ATK_XY_PARENT, and we can't
support global positions, so just always do ATK_XY_WINDOW.
2019-05-28 20:25:13 +00:00
Matthias Clasen
9059eee2f0 Review and replace uses of get_toplevel
Now that roots can have parent widgets, we need to
carefully examine all calls of gtk_widget_get_toplevel,
and replace them with gtk_widget_get_root if we want
the nearest root, and not the ultimate end of the parent
chain.
2019-05-28 20:24:39 +00:00
Matthias Clasen
cf47bb9355 gtk: Stop using gtk_button_clicked
This function is going away.
2019-05-18 14:27:09 -04:00
Matthias Clasen
9111541807 a11y: Adapt to menu button changes 2019-05-18 13:06:32 +00:00
Matthias Clasen
4ff578db10 Fix the compiler warning, again 2019-05-07 14:57:53 +00:00
Matthias Clasen
248c07c65e Fix a compiler warning 2019-05-07 04:01:21 +00:00
Matthias Clasen
77b7817266 a11y: Stop using child-notify
This was showing up in the accessibility tests failing.
2019-05-07 02:21:30 +00:00
Rico Tzschichholz
724ec3ca92 Add a few placeholder documentation block to have g-i annotations 2019-05-01 15:03:16 +02:00
Matthias Clasen
7d9364655d icon view accessible: Stop presenting windows
Thats really not its business.
2019-04-29 14:46:40 -04:00
Matthias Clasen
33f034d0d7 a11y: Stop using gtk_widget_get_parent_surface
We can just use the surface of the parent.
2019-04-24 20:54:05 -04:00
Matthias Clasen
8d4343a550 Merge branch 'get_caret_offset_negative_one' into 'master'
Return -1 for AtkText::get_caret_offset on failure

See merge request GNOME/gtk!666
2019-03-26 23:14:48 +00:00
Matthias Clasen
f7d3815fa8 a11y: Don't support changing widget size and position
This does not make sense.
2019-03-26 17:55:29 -04:00
Martin Robinson
c8d250deb1 Return -1 for AtkText::get_caret_offset on failure
ATK now expects this virtual method to return -1 on failure. This allows
ATs to distinguish between a caret at position 0 and a failure.
2019-03-26 15:38:20 +01:00
Matthias Clasen
8e4c441f78 a11y: More entry fixes
Remove the GtkEntry assumption from more places.
2019-03-14 17:58:02 -04:00
Bastien Nocera
5a6a7b50af all: Don't warn about deprecated gtk_window_present usage
Avoid compilation warnings about internal users of gtk_window_present().
2019-02-25 17:38:08 +01:00
Matthias Clasen
bd99ae3767 entry accessible: Make work with almost-entries
This is not perfect, but gives a quick way to have
an accessible that can be used for password and
search entries.
2019-02-22 15:49:47 -05:00
Matthias Clasen
ea098f8d51 entry accessible: Make this work with the text widget 2019-02-19 00:25:59 -05:00
Matthias Clasen
936181f354 Add a GtkTextAccessible
Add an accessible implementation for GtkText.
2019-02-18 14:24:21 -05:00
Benjamin Otte
285aba6ece widget: Make width, height and transform be widget-relative
Previously, those numbers stored the values relative to the margin box
of the widget. Now they store values relative to the content box,
thereby getting rid of the last remains of weird coordinate systems.
2019-02-15 06:53:22 +01:00
Emmanuele Bassi
25fd230327 gtk: Drop the "plus"
Source names should use "[gtk]" without the plus.
2019-02-05 11:26:20 +01:00
Emmanuele Bassi
95c0f07295 Merge branch 'master' into 'master'
A11y: export gtk_cell_accessible_parent_get_(row|column)_header_cells

See merge request GNOME/gtk!505
2019-01-18 23:13:31 +00:00
Matthias Clasen
e269f43afc Rename GtkRBTree to GtkTreeRBTree
This frees up the generic name for a more
generic rbtree implementation.
2019-01-14 02:14:11 +01:00
Mike Gorse
a52431d2b4 A11y: export gtk_cell_accessible_parent_get_(row|column)_header_cells
These functions were missing GDK_AVAILABLE_IN macros, so they were
listed in the gir but not exported.
2019-01-11 16:53:39 -06:00
Olivier Fourdan
58e273d056 a11y: Check display in *grab_cell_focus()
Calling the accessibility function `grab_focus()` on a `GtkCell` under
Wayland will cause the client to crash.

This is another case of `gdk_x11_get_server_time()` being called
regardless of the actual windowing backend used.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1507
2019-01-07 21:06:57 +00:00
Daniel Boles
480a04131c CellAccessible: Fix return type of row|column_span
See:
 * c876c74eb7
 * 63e0eb5de5
2018-12-30 18:15:11 +00:00
Benjamin Otte
c30968861f a11y: Fix function return type
Typo right there.
2018-12-18 01:20:36 +01:00
Mike Gorse
8f29a0633b A11y: Add support for AtkTableCell 2018-12-14 19:25:27 +00:00
Timm Bäder
ade171a2ed widget: Don't pass a position to ->size_allocate
The values have been 0/0 for a long time now, so just drop the
GtkAllocation argument and replace it with width and height.
2018-11-13 16:28:54 +01:00
Benjamin Otte
813957a92f gdk: Remove gdk_event_get_string()
You want to use an IM module to get strings out of keypresses, not some
crude hack that only works on X11 and Wayland anyway.
2018-07-30 19:32:38 +02:00
Carlos Garnacho
e08e15ba51 gtkentry: Use gestures for entry icons
Instead of doing all handling manually in the ::event vfunc,
set up drag/multipress gestures on icon images, and implement
emission of ::icon-press/release and DnD there.

As a side effect, the GdkEvent field in ::icon-press/release
signals has been dropped. Callers that might be interested on it
may still use gtk_get_current_event*().
2018-06-21 12:50:57 +02:00
Daniel Boles
4f979469f1 a11y/entry: Fix copy-pasteo re 2ndary icon tooltip
The else case was wrongly resetting the accessible description on the
primary icon, which might not exist and can therefore cause a crash.

https://gitlab.gnome.org/GNOME/gtk/issues/1160
2018-06-19 18:37:25 +01:00
Benjamin Otte
6546ef3459 picture: Introduce
This commit introduces GtkPicture, which is supposed to complement
GtkImage.

GtkImage will be adapted to always display an icon, while
GtkPicture displays regular imagery.
2018-06-10 02:23:02 +02:00
Benjamin Otte
7e574fa98c gdk: Get rid of gdk_event_free()
Events are objects, so use g_object_unref().
2018-05-29 21:53:44 +02:00
Matthias Clasen
d561e52cde a11y: Stop using ::event
We can just as well use notify::has-focus for the purpose of
focus tracking, and we can at the same time avoid emitting the
deprecated AtkObject::focus-event signal.
2018-05-26 08:46:06 -04:00
Juan Pablo Ugarte
bc2fad6842 a11y/ScrolledWin|IconView: Connect signals safely
Use g_signal_connect_data() instead of g_signal_connect_object()
to make sure the callback gets disconnected when the data object
is destroyed. This avoids problems in garbage-collected bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=789215
2018-04-22 16:11:08 +01:00
Benjamin Otte
374467c11c a11y: Fix headers
We were getting a gcc warning before.
2018-04-05 17:05:21 +02:00
Benjamin Otte
8cb0df7554 Merge branch 'window-activate' into 'master'
a11y: restore window:activate/deactivate emission

Closes #127

See merge request GNOME/gtk!77
2018-04-05 14:36:13 +00:00