Commit Graph

106 Commits

Author SHA1 Message Date
Matthias Clasen
e499a09759 Drop gtkintl.h
Include gtkprivate.h for I_() and glib-i18n.h for
gettext macros.
2022-09-24 10:03:37 -04:00
Sophie Herold
a546ae32d7 Remove all nicks and blurbs from param specs
Those property features don't seem to be in use anywhere.
They are redundant since the docs cover the same information
and more. They also created unnecessary translation work.

Closes #4904
2022-05-11 18:16:29 +02:00
Bilal Elmoussaoui
8ebdd256a5 docs: fix broken links 2021-05-27 00:18:23 +00:00
Matthias Clasen
7fe0610b68 introspection: Stop using allow-none
allow-none has been deprecated for a long time
already. Instead use optional and nullable everywhere.
2021-05-20 19:17:49 -04:00
Matthias Clasen
8497f285c4 scrollbar: Tweak docs 2021-03-11 16:37:37 +00:00
Matthias Clasen
d7ce5c55c8 scrollbar: Use markdown for css tree 2021-03-11 16:37:35 +00:00
Matthias Clasen
e78302c4e5 scrollbar: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
b7f4f5d234 scrollbar: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
88be92ceee scrollbar: Don't talk about steppers
There steppers were lost on the way from GtkRange
to GtkScrollbar, so don't talk about them in the docs.
2020-11-18 17:27:13 -05:00
Matthias Clasen
a63d03810f scrollbar: Update accessible state
We have the scrollbar role, and are therefore expected
to set value-min/max/now properties.
2020-07-27 21:18:10 -04:00
Matthias Clasen
d90f79de0e a11y: Document roles of widgets
Add a section to the long description for each
widget that is using a non-default accessible role.
2020-07-27 10:48:08 -04:00
Emmanuele Bassi
58628f9a9e a11y: Add roles to various widgets 2020-07-26 20:31:15 +01:00
Emmanuele Bassi
c63087a563 Remove ATK
To build a better world sometimes means having to tear the old one down.
        -- Alexander Pierce, "Captain America: The Winter Soldier"

ATK served us well for nearly 20 years, but the world has changed, and
GTK has changed with it. Now ATK is mostly a hindrance towards improving
the accessibility stack:

 - it maps to a very specific implementation, AT-SPI, which is Linux and
   Unix specific
 - it requires implementing the same functionality in three different
   layers of the stack: AT-SPI, ATK, and GTK
 - only GTK uses it; every other Linux and Unix toolkit and application
   talks to AT-SPI directly, including assistive technologies

Sadly, we cannot incrementally port GTK to a new accessibility stack;
since ATK insulates us entirely from the underlying implementation, we
cannot replace it piecemeal. Instead, we're going to remove everything
and then incrementally build on a clean slate:

 - add an "accessible" interface, implemented by GTK objects directly,
   which describe the accessible role and state changes for every UI
   element
 - add an "assistive technology context" to proxy a native accessibility
   API, and assign it to every widget
 - implement the AT context depending on the platform

For more information, see: https://gitlab.gnome.org/GNOME/gtk/-/issues/2833
2020-07-26 20:31:14 +01:00
Emmanuele Bassi
6e52ef96a4 Move orientable style classes into GtkWidget
It feels slightly wrong to have GtkOrientable operate on widgets, but at
least what happens when an orientable widget changes orientation should
be part of GtkWidget.

This will allow to add more state changes without accessing widget state
from the outside of gtkwidget.c.
2020-06-05 20:35:09 +01:00
Matthias Clasen
b93631164f Remove lots of focus vfuncs
In many cases, the default widget vfuncs work just fine,
combined with setting focusable.
2020-05-11 00:11:37 -04:00
Matthias Clasen
632524f679 Reinstate expected focus behavior
After the :can-focus change in the previous commit, widgets
need to set suitable focus and grab_focus implementations
to implement the desired focus behavior.

This commit does that for all widgets.
2020-04-09 17:50:29 -04:00
Matthias Clasen
5205fa0ff7 scrollbar: Be more defensive
Somehow the scrollbar accessible manages to call
gtk_scrollbar_get_adjustment when priv->range is NULL.
Survive taht.
2020-04-03 23:31:45 -04:00
Matthias Clasen
339d3e41b0 Add GtkScrollbarAccessible
When GtkScrollbar stopped being a GtkRange,
GtkRangeAccessible stopped working for scrollbars.

Update a11y tests to match.
2020-04-03 15:20:27 -04:00
Matthias Clasen
ca1d4322a2 scrollbar: Remove :popup-menu forwarding
This signal is going away.
2020-03-25 23:14:44 -04:00
Matthias Clasen
31db615885 Revert "Merge branch 'disable-window-test' into 'master'"
This reverts commit 3ac4c76b18, reversing
changes made to 6ec96d2e98.
2020-03-19 18:03:16 -04:00
Matthias Clasen
4bc60c6110 scrollbar: Remove :popup-menu forwarding
This signal is going away.
2020-03-18 23:00:51 -04:00
Timm Bäder
24a4063645 scrollbar: Use a box layout
Makes a lot more sense than the intermediate box just for its layout.
2019-07-15 07:52:42 +02:00
Matthias Clasen
18788c2a86 Remove gtk_widget_get/set_has_surface
These serve no purpose anymore - widgets don't
have surfaces, unless they're a GtkNative.
2019-05-28 20:25:15 +00:00
Matthias Clasen
835f392196 scrollbar: Make final 2019-05-26 22:37:42 -04:00
Timm Bäder
359d874ddb Use g_clear_pointer to unparent widgets 2018-11-13 20:53:14 +01: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
Timm Bäder
a0d0b52034 scrollbar: Remove get_wheel_delta
Unused and undocumented.
2018-05-19 10:18:50 +02:00
Benjamin Otte
169203951b widget: Remove clip from size-allocate vfunc
As the clip is no longer needed, get rid of it.
2018-04-05 14:56:38 +02:00
Alexander Larsson
63e060a21d GtkWidget: Start renaming widget->window
This is an automated change doing these command:

git sed -f g gtk_widget_set_has_window gtk_widget_set_has_surface
git sed -f g gtk_widget_get_has_window gtk_widget_get_has_surface
git sed -f g gtk_widget_set_parent_window gtk_widget_set_parent_surface
git sed -f g gtk_widget_get_parent_window gtk_widget_get_parent_surface
git sed -f g gtk_widget_set_window gtk_widget_set_surface
git sed -f g gtk_widget_get_window gtk_widget_get_surface
git sed -f g gtk_widget_register_window gtk_widget_register_surface
git sed -f g gtk_widget_unregister_window gtk_widget_unregister_surface

git checkout NEWS*
2018-03-20 15:21:12 +01:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Matthias Clasen
ffd6baec42 gtk: Intern css names
This avoids a bunch of strdups at startup.
2017-11-17 22:49:57 -05:00
Matthias Clasen
7e64ee52a8 scrollbar: keep populate-popup signal working
This is used for example in the source tab of gtk4-demo.
It broke because GtkScrollbar no longer is a GtkRange,
but rather has one. So we need to forward the signal.
2017-10-07 19:53:19 -04:00
Matthias Clasen
f2a7e1219b scrollbar: Correct css docs
The .fine-tune class appears on the range node.
2017-10-07 19:10:10 -04:00
Timm Bäder
36ab70ddf5 widget: Add baseline and out_clip parameters to size-allocate
Since setting a clip is mandatory for almost all widgets, we can as well
change the size-allocate signature to include a out_clip parameter, just
like GtkCssGadget did. And since we now always propagate baselines, we
might as well pass that one on to size-allocate.

This way we can also make sure to transform the clip returned from
size-allocate to parent-coordinates, i.e. the same coordinate space
priv->allocation is in.
2017-07-19 21:27:16 -04:00
Timm Bäder
c56bad4be5 scrollbar: notify when setting the orientation 2017-07-19 21:27:14 -04:00
Timm Bäder
b9f70b473c scrollbar: Add new API to gtk4-sections.txt
and update the css node docs
2017-07-19 21:27:13 -04:00
Timm Bäder
753e915f87 scrollbar: Add accessor for wheel delta
Make the one in gtkrange.c static since it was only ever used from
GtkScrolledWindow.
2017-07-19 21:27:12 -04:00
Timm Bäder
4dc5790058 scrollbar: Inherit from GtkWidget 2017-07-19 21:27:12 -04:00
Daniel Boles
bb4aaa8bbf Scrollbar: grammar fix for previous commit 2017-03-21 00:06:50 +00:00
Daniel Boles
874b03e4fe Scrollbar: Tweak intro docs a bit
Explain where the adjustment comes from, clarify some of the wording
about how its fields influence the scrollbar, and also note that the
steppers may not be present, since they aren’t in our default themes.
2017-03-21 00:00:45 +00:00
Timm Bäder
296db5ab52 scrollbar: Remove style property 2016-10-18 00:29:17 +02:00
Timm Bäder
efffa3b6bd range: Remove min slider size setter/getter 2016-10-16 18:17:21 +02:00
Timm Bäder
aca35a14a0 scrollbar: Remove min-slider-length style property 2016-10-16 18:17:21 +02:00
Cosimo Cecchi
5a83787dc0 Update CSS nodes documentation 2016-02-29 10:45:14 -08:00
Cosimo Cecchi
424f17c0fb range: don't use gtk_range_set_min_slider_size()
The way this method is used from the GtkRange subclasses doesn't really
work well when the slider properties change as a consequence of e.g. a
style class being applied (e.g. the fine-tune style class).

In fact, there's no need to read the minimum slider size out of band,
and we can obtain the same result in a way that always work by setting a
private property on GtkRange.
2016-02-29 10:45:13 -08:00
Cosimo Cecchi
f0d9afd300 scrollbar: deprecate min-slider-length style property
In favor of min-height/min-width, like we did for other similar
properties.
2016-02-29 10:45:12 -08:00
Matthias Clasen
cf7f23f4dd scrolledwindow: Document overlay scrolling style classes
Document which style classes are used on scrollbars to
implement overlay scrolling.
2015-11-06 23:35:20 -05:00
Matthias Clasen
76fbcc2f26 range: Document fine-tuning style class use 2015-11-06 11:50:23 -05:00
Matthias Clasen
2bfb5ad812 range: Add a CSS node for the trough
This is in sync with what we do elsewhere for troughs.
2015-11-05 07:26:10 -05:00
Matthias Clasen
8727c8fe24 range: Convert to CSS nodes
Use CSS nodes for GtkScale and GtkScrollbar. See their documentation
for details on what subnodes with what names exist.
2015-11-03 23:17:09 -05:00