Commit Graph

38415 Commits

Author SHA1 Message Date
Matthias Clasen
4bed24a816 windowcontrols: Convert docs 2021-03-11 16:37:34 +00:00
Matthias Clasen
9104420c87 shortcutswindow: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
0d238f4c99 range: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
9b9c9ae8d4 popover: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
1f06cfd5d8 headerbar: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
ddcb76ac2d appchooserwidget: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
e21156b30b appchooserdialog: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
166edeed91 appchooser: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
86604d8e01 nativedialog: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
bb393f6496 fontchooserwidget: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
7a099604c9 fontchooserdialog: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
92009413f2 fontchooser: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
7763fc55bb filechoosernative: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
042af94048 filechooserdialog: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
d91fb26409 filechooser: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
3124a784fe searchbar: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
936a2c2c59 colorchooserdialog: Fixup 2021-03-11 16:37:33 +00:00
Matthias Clasen
53d3b46d4a actionbar: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
fc55478890 paned: Convert docs
Convert links, add example image, clean things up.
2021-03-11 16:37:33 +00:00
Matthias Clasen
d41c3e3c2d colorchooser: Convert docs
Convert link syntax.
2021-03-11 16:37:33 +00:00
Matthias Clasen
886ba1680d colorchooserwidget: Convert docs
Convert links, and clean things up.
2021-03-11 16:37:33 +00:00
Matthias Clasen
11c5523142 colorchooserdialog: Convert docs
Convert link syntax, add example image, clean things up.
2021-03-11 16:37:33 +00:00
Matthias Clasen
c0be9c5b97 colorbutton: Small doc tweaks 2021-03-11 16:37:33 +00:00
Matthias Clasen
ad2dad6612 assistant: Convert docs
Convert link syntax, an example image, clean things up.
2021-03-11 16:37:33 +00:00
Matthias Clasen
5950bcd754 frame: Convert docs
Convert link syntax, add an example image, add property
annotations.
2021-03-11 16:37:33 +00:00
Matthias Clasen
067b43fb5b aboutdialog: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
b460ffd120 dialog: Convert docs
Convert links, add an example image, generally clean up docs.
2021-03-11 16:37:33 +00:00
Matthias Clasen
7afc1291a8 window: Convert docs
Convert link format, add an example image, add
property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
cc2d9f0cb5 scrollable: Convert docs
Convert link format, add property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
73b66428a7 viewport: Convert docs
Convert link format, add property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
3a62b28344 scrolledwindow: Convert docs
Convert link format, add property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
f3b16d0e9d messagedialog: Convert docs
Convert link format, add an example image, add
property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
e999773566 grid: Convert docs
Convert link format, add an example image, add
property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
6aaa98f669 expander: Convert docs
Convert link format, add an example image, add
property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
f800178e7f centerbox: Convert docs
Convert link format, add an example image, add
property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
07a2b60f45 box: Convert docs
Convert link format, add an example image, add
property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
f5fe5c1fa6 appchooserbutton: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
e353cf38ec colorbutton: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
947ebee7d4 dropdown: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
d4eb11142a fontbutton: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
e4054d62fe switch: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
37855e2b53 spinbutton: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
08371b25dc menubutton: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
26100ad5d1 lockbutton: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
69427e98d5 editablelabel: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
d3e8607f58 combobox: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
cf6f57b41c passwordentry: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
d5a024c7f8 linkbutton: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
67fdc0491a checkbutton: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
5d69584a53 togglebutton: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
ef5b781e0c entry: Minor docs fixes 2021-03-11 16:37:33 +00:00
Matthias Clasen
72505acb9e searchentry: Minor docs tweaks 2021-03-11 16:37:33 +00:00
Matthias Clasen
d7b55cfd0c editable: Convert docs 2021-03-11 16:37:33 +00:00
Matthias Clasen
7803a09f31 entry: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Emmanuele Bassi
4f36509e5f Mark padding fields as private
And mention that they should be removed in the next version of GTK.
Padding fields in interfaces are unnecessary, as they don't contribute
to the ABI.
2021-03-11 16:37:33 +00:00
Emmanuele Bassi
198c0be5e7 flowbow: Mark private fields as private 2021-03-11 16:37:33 +00:00
Matthias Clasen
c0bd352c88 scale: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
3a62913a97 entry: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
abb951daf1 button: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:32 +00:00
Matthias Clasen
4131cb4c7b bitset: Convert docs 2021-03-11 16:37:32 +00:00
Emmanuele Bassi
e60afc6011 docs: Remove stray backtick 2021-03-11 16:37:32 +00:00
Matthias Clasen
30073de932 widget: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
b674bba155 video: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
50df5e0ec2 textview: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
693f3d6b41 separator: Add property annotations
Connect properties, getters, and setters with annotations.t
2021-03-11 16:37:32 +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
0559e9e763 scale: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
8eacbc3a20 picture: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
3fd3187d8f orientable: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
723d979be2 infobar: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
0c56522de1 image: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
8db308be4d glarea: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
30d32a1f9d drawingarea: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
08509acc04 claendar: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
6ff78c99fa accessible: Annotate properties 2021-03-11 16:37:32 +00:00
Matthias Clasen
4c50c312c1 statusbar: Remove SECTION 2021-03-11 16:37:32 +00:00
Matthias Clasen
55f1ed171a infobar: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
97c4e46e39 progressbar: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
3ed2e94f29 levelbar: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
e98ea46d87 spinner: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
a8a15d48ad label: Add property annotations
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
c6b23f8f89 constraint: Port to the new docs format
- Drop the "SECTION".
 - Add attributes annotations for properties and getter methods.
 - Remove excessive linking and redundant types
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
be93dd98f7 Hide GtkSettingsValue
This is a private type that has no public API, and no business being in
a public header.
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
a8f36b8381 Hide GtkTextBTree's typedef
It's a private type, and has no business in a public header.
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
1fb5824e1e treemodel: Update the description format
Also add a description for GtkTreePath.
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
35e438a62e treeview: Update the description format 2021-03-11 16:37:32 +00:00
Emmanuele Bassi
cf707cbfaa expression: Update docs format
And add documentation stanzas for GtkExpression sub-types.
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
1eb9d699b5 Box GtkExpressionWatch
Otherwise bindings won't know how to deal with memory management.
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
da94b461e0 csssection: Update docs syntax 2021-03-11 16:37:32 +00:00
Emmanuele Bassi
ec32ff04b8 application: Convert docs
Drop mentions of command line arguments parsed by gtk_init(), and of the
GDK lock.
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
8d12dce174 docs: Fix property annotation 2021-03-11 16:37:32 +00:00
Matthias Clasen
63dc97fb29 spinbutton: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
6c315b1b8a searchentry: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
231a19abb9 passwordentry: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
99a3dbef00 editablelabel: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
9934f9c43b constrainttarget: Convert docs 2021-03-11 16:37:31 +00:00
Matthias Clasen
c4e43c1cd5 buildable: Convert docs
Change link syntax.
2021-03-11 16:37:31 +00:00
Matthias Clasen
3549914d0f accessible: Convert docs
Change link syntax.
2021-03-11 16:37:31 +00:00
Matthias Clasen
e034046724 widget: Convert docs
Some work toward converting the docs to markdown.

More work needed, in particular around vfuncs and
class functions.
2021-03-11 16:37:31 +00:00
Matthias Clasen
c975216f47 entry: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
18e5192a58 switch: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
dc8ee5a992 volumebutton: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
e75c3d0380 fontbutton: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
47cb0771f5 colorbutton: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
6884a1a5c6 dropdown: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
d028f7ed9a appchooserbutton: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
fc6f16cb61 lockbutton: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
1692b41b30 comboboxtext: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
8e6b6ae26e combobox: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Emmanuele Bassi
b6b30c9bcf docs: Fix the MenuButton direction property links 2021-03-11 16:37:31 +00:00
Matthias Clasen
47b9a554ac menubutton: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
3d8c810ab7 checkbutton: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
f854136676 linkbutton: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
ec78bf3309 togglebutton: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
4bf7bfb41a button: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Emmanuele Bassi
538f935d44 docs: Fix the annotation for GtkTextView:justification 2021-03-11 16:37:31 +00:00
Matthias Clasen
df9c469acd video: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
8cf04b3345 glarea: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
1072b56970 drawingarea: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
f94fc28eb5 textview: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
3b42440805 picture: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
dcf53bced2 scale: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
76e9a7bbb4 image: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
12ccc68c99 separator: Convert docs
Change link syntax and add an example image.
2021-03-11 16:37:30 +00:00
Matthias Clasen
834295dde0 calendar: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +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
61d85f32a2 infobar: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
03c5b680ec statusbar: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
8de0a2c7c6 infobar: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
d58655b4ae progressbar: Convert docs
Change link syntax, add an example image, generally clean
things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
f2b482ef65 levelbar: Convert docs
Change link syntax, add an example image, generally
clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
a2e8bd24ca spinner: Convert docs
Change link syntax and add an example image.
2021-03-11 16:37:30 +00:00
Matthias Clasen
584e978840 aboutdialog: tweak the docs
Add a short summary.
2021-03-11 16:37:30 +00:00
Matthias Clasen
f00f900224 label: Convert docs
Change link syntax, add singl-line summaries,
add missing property docs.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
af8d8113eb docs: Remove the last few remaining '+' from GTK 2021-03-11 16:37:30 +00:00
Emmanuele Bassi
e8b6e6cad0 docs: Clean up the first paragraph for various symbols
The documentation engine will use the first paragraph as the summary for
a type or constant.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
6781de96a5 docs: Start porting GtkImage to the new style 2021-03-11 16:37:30 +00:00
Emmanuele Bassi
4fef62c38d docs: Port GtkAboutDialog to the new syntax
We should also clean up the annotations, while we're at it.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
abb33bd65f docs: Move the gtkmain section to its own document
The introspection data does not handle unattached sections like gtk-doc
does, so we need to move what was gtkmain into its own Markdown
document.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
542b959933 docs: Use new link syntax 2021-03-11 16:37:30 +00:00
Emmanuele Bassi
b2a99642a9 docs: Begin porting GtkWidget to the new format 2021-03-11 16:37:30 +00:00
Emmanuele Bassi
6f7e933713 doc: Port GtkConstraint to the new format 2021-03-11 16:37:30 +00:00
Emmanuele Bassi
3c0f047597 docs: De-indent GtkRecentInfo.get_applications() return value
Otherwise the four spaces will be treated as a pre-formatted block by
Markdown.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
a6da2db4ea docs: Start porting GtkConstraintLayout to the new doc format
Drop the old gtk-doc'isms, and use the gi-docgen links instead.
2021-03-11 16:37:30 +00:00
Matthias Clasen
27295bc555 Limit tooltip queries to the same native
Without this, the menubuttons tooltip pops up
when hovering the popover, which is suprising
and unintended.

Fixes: #3719
2021-03-11 08:56:56 -05:00
Matthias Clasen
5556907194 inspector: Fix surface transform regression
Ever since we added surface-to-widget transforms,
the autofading of the fps overlay did not work anymore,
since it was given the transient transform node, most
of the time.

Fix this by passing both the root of the node tree and
the node for the toplevel widget to prepare_render, and
hande the widget node to the overlays. Update the
affected overlays that need to have their positioning
adjusted.
2021-03-09 18:27:04 -05:00
Matthias Clasen
cba8c40aa0 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!3276
2021-03-09 00:12:11 +00:00
Matthias Clasen
98b13933d9 Merge branch 'bilelmoussaoui/size-request-annotations' into 'master'
g-i: update distribute_natural_allocation annotation

See merge request GNOME/gtk!3271
2021-03-08 23:07:18 +00:00
Matthias Clasen
91e94556ad spinbutton: Interpret localized digits
Interpret input where the characters have numeric values.

See #3387
2021-03-08 17:49:21 -05:00
Matthias Clasen
d786e1d614 Merge branch 'ebassi/iface-macros' into 'master'
Remove invalid class macros

See merge request GNOME/gtk!3270
2021-03-07 20:22:14 +00:00
Matthias Clasen
c60a316e22 Move gtk_rounded_rect_scale_affine to the right place
This function should live with the rest of the
GskRoundedRect code in gskroundedrect.c.
2021-03-07 15:17:32 -05:00
Matthias Clasen
b73c9e992f imcontext: Fix a docs mishap 2021-03-07 15:16:59 -05:00
Bilal Elmoussaoui
4980f620f9 g-i: update distribute_natural_allocation annotation 2021-03-07 20:59:01 +01:00
Matthias Clasen
87b800c11d Merge branch 'bilelmoussaoui/gi-annotations' into 'master'
g-i: add missing since annotations for 4.2

See merge request GNOME/gtk!3268
2021-03-07 19:46:59 +00:00
Bilal Elmoussaoui
6e903e13a5 g-i: add missing since annotations for 4.2 2021-03-07 19:50:32 +01:00
Emmanuele Bassi
70fbfd8ede treesortable: Remove class check macro 2021-03-07 18:26:31 +00:00
Emmanuele Bassi
6234ccc974 orientable: Remove class macros 2021-03-07 18:25:55 +00:00
Emmanuele Bassi
0cfe3d45f5 celleditable: Remove class cast check macro 2021-03-07 18:25:07 +00:00
Emmanuele Bassi
41371ccae6 buildable: Remove "class" macro 2021-03-07 18:23:23 +00:00
Emmanuel Gil Peyrot
5807fee893 icons: Rename two icons which had the wrong extension
Fixes two warnings when opening the inspector on my PinePhone, these two
files were attempted to be loaded as PNG (as per the extension) instead
of SVG.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
2021-03-07 18:59:04 +01:00
Matthias Clasen
82f40a92c1 searchentry: Typo fix 2021-03-05 15:07:02 -05:00
Alexander Mikhaylenko
0942e863f2 Adwaita: Use transparent black for window border in dark too
Avoid smear when the background behind the window is dark. Adjust opacity
to make it appear roughly the same as before on white background.
2021-03-05 22:59:25 +05:00
Jakub Steiner
11d6f2ddd0 Adwaita: Regular focus ring for sidebar rows
- style sidebar rows as regular items like buttons wrt focus
- define transition as part of the focus-ring(),
  only animate outline related properties rather than `all`

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3708
2021-03-05 17:45:58 +01:00
Matthias Clasen
d28df0b87e textview: Delete selection when preedit starts
This prevents confusing misrendering when the preedit text
pushes the selection text out of the rendered selection.

Fixes: #1123
2021-03-04 15:18:30 -05:00
Matthias Clasen
d1fbfb9c4e textview: Send anchor with surrounding
We have the api to do it now.
2021-03-04 15:18:30 -05:00
Matthias Clasen
ccae0e1732 text: Optimize away 0-change insertions and deletions
We can short-circuit insert and delete calls that are
not causing any change.
2021-03-04 15:18:30 -05:00
Matthias Clasen
447203ce52 text: Delete selection when preedit starts
This prevents confusing misrendering when the preedit text
pushes the selection text out of the rendered selection.

Fixes: #1123
2021-03-04 15:18:30 -05:00
Matthias Clasen
feccdad9d2 text: Send anchor with surrounding
We have the api to do it now.
2021-03-04 15:18:30 -05:00
Matthias Clasen
35fceca157 imwayland: Pass anchor with surrounding
This was missing in the initial implementation since
GtkIMContext did not have it in its api, but it was
added now, so we can send the information.
2021-03-04 15:18:30 -05:00
Matthias Clasen
97db959305 immulticontext: Implement [gs]et_surrounding_with_selection
This is the recommended api, going forward.
2021-03-04 15:18:30 -05:00
Matthias Clasen
4b9aeaf9e3 imcontext: Add [gs]et_surrounding_with_selection
The Wayland text protocol expects to get both ends
of the selection with its surrounding call, so make
that available via GtkIMContext. We add this as new
api and vfuncs, and fall back, so that existing
implementations keep working.
2021-03-04 15:18:30 -05:00
Matthias Clasen
b533bba3f3 Merge branch 'bilelmoussaoui/annotations-fix' into 'master'
update annotation of gtk_single_selection_get_selected_item

See merge request GNOME/gtk!3253
2021-03-03 15:11:00 +00:00
Bilal Elmoussaoui
aae67b8fbd gtk: update annotation of gtk_single_selection_get_selected_item 2021-03-03 14:19:45 +01:00
Alexander Mikhaylenko
aa693159dc adwaita: Remove the nested headerbars hack
We clip the window now, it's not necessary anymore.
2021-03-03 17:35:15 +05:00
Alexander Mikhaylenko
5fef637e84 adwaita: Remove headerbar sheen on backdrop
It's gone from active windows since c9807f5afe,
but was still there in backdrop.
2021-03-03 17:34:22 +05:00
Matthias Clasen
875a92b95f label: Fix markup parsing interactions
We were not handling mnemonics vs markup right
in all cases. Rewrite the _-stripping code to
do it during the link parsing, instead of as
a separate function. This avoids the issue of
stripping _ from attribute names in markup.

Add tests.

Fixes: 3706
2021-03-02 23:25:01 -05:00
Matthias Clasen
55f871c193 imcontext: Fixes to the state machine
It turns out that we we were sometimes emitting
preedit-end multiple times, and sometimes not at
all. Same for preedit-start. To fix this up, introduce
a in_compose_sequence flag, maintain it, and use it
in the right places.

After these changes, both

C-S-u 1 2 3 Enter
Compose a e

generate the right signals:

preedit-start, preedit-changed,..., preedit-end, commit
2021-02-24 13:31:31 -05:00
Matthias Clasen
718a95c1d2 Merge branch 'matthiasc/for-master' into 'master'
composetable: Remove some redundant code

See merge request GNOME/gtk!3234
2021-02-24 01:57:47 +00:00
Matthias Clasen
915e3f0e28 composetable: Remove some redundant code
Pointed out by Peter Bloomfield.
2021-02-23 19:14:26 -05:00
Matthias Clasen
a4e7b03185 inspector: Fix a typo
When selecting the "ngl" renderer, the inspector was
saying Renderer: Unknown, due to a typo. Fix that.
2021-02-23 18:37:32 -05:00
Christian Hergert
2a38cecd33 gsk: add OpenGL based GskNglRenderer
The primary goal here was to cleanup the current GL renderer to make
maintenance easier going forward. Furthermore, it tracks state to allow
us to implement more advanced renderer features going forward.

Reordering

This renderer will reorder batches by render target to reduce the number
of times render targets are changed.

In the future, we could also reorder by program within the render target
if we can determine that vertices do not overlap.

Uniform Snapshots

To allow for reordering of batches all uniforms need to be tracked for
the programs. This allows us to create the full uniform state when the
batch has been moved into a new position.

Some care was taken as it can be performance sensitive.

Attachment Snapshots

Similar to uniform snapshots, we need to know all of the texture
attachments so that we can rebind them when necessary.

Render Jobs

To help isolate the process of creating GL commands from the renderer
abstraction a render job abstraction was added. This could be extended
in the future if we decided to do tiling.

Command Queue

Render jobs create batches using the command queue. The command queue
will snapshot uniform and attachment state so that it can reorder
batches right before executing them.

Currently, the only reordering done is to ensure that we only visit
each render target once. We could extend this by tracking vertices,
attachments, and others.

This code currently uses an inline array helper to reduce overhead
from GArray which was showing up on profiles. It could be changed to
use GdkArray without too much work, but had roughly double the
instructions. Cycle counts have not yet been determined.

GLSL Programs

This was simplified to use XMACROS so that we can just extend one file
(gskglprograms.defs) instead of multiple places. The programs are added
as fields in the driver for easy access.

Driver

The driver manages textures, render targets, access to atlases,
programs, and more. There is one driver per display, by using the
shared GL context.

Some work could be done here to batch uploads so that we make fewer
calls to upload when sending icon theme data to the GPU. We'd need
to keep a copy of the atlas data for such purposes.
2021-02-23 14:41:52 -08:00
Matthias Clasen
baec7079e0 imcontext: Take out the warnings
Don't warn about Compose file constructs we don't
support. We haven't supported these for a long time,
and nobody has every complained. No need to wake
up sleeping dogs.
2021-02-22 15:08:58 -05:00
Matthias Clasen
3ee5354e0f imwayland: Be careful about cursor positions
We don't want to hand out cursor positions based on
the original preedit text and then tweak the text to
be different.
2021-02-18 15:33:01 -05:00
Matthias Clasen
07295ac169 Merge branch 'unintrusive-compose-preedit' into 'master'
Unintrusive compose preedit

See merge request GNOME/gtk!3220
2021-02-18 17:36:08 +00:00
Matthias Clasen
d84a028455 imwayland: Tweak preedit text
Tweak the preedit text we get from IBus (via the compositor) to
match what GtkIMContextSimple produces for Compose sequences now.

This provides a unified experience.
2021-02-18 11:44:09 -05:00
Matthias Clasen
4327a866f4 imcontext: Make Compose preedit less intrusive
Tweak the preedit display for Compose sequences to
be not so distracting. We only show the Compose key
when it occurs in the middle of the sequence or is
the only key so far, and use · instead of ⎄ for it.

Also, make sure to display dead keys more adequately.
2021-02-18 11:44:09 -05:00
Alexander Mikhaylenko
8e2f90e342 widget: Don't assume GtkWindow root in gtk_widget_propagate_state()
Avoid crashes with GtkDragIcon children.
2021-02-18 13:41:41 +05:00
Matthias Clasen
19b9967a72 text: Fix sticky preedit attrs
In some cases, we were inadvertedly merging the
preedit attributes into priv->attrs, instead of
keeping them separate. This was causing the underlines
to grow beyond the preedit and never go away. One
place where this was showing up is the fontchooser
preview.

Fixes: #3679
2021-02-17 23:25:31 -05:00
Matthias Clasen
da71a37945 imwayland: Return limited preedit attributes
It should not matter, but it is the right thing to
do to limit the preedit attributes to the length
of the preedit text.
2021-02-17 22:57:41 -05:00
Matthias Clasen
05fe2441a7 imcontext: Enable font fallback for preedit
Not doing so only invites hexboxes.

Fixes: #3678
2021-02-17 22:11:57 -05:00
Matthias Clasen
35488959b4 paned: Add a paned handle class
Instead of bending GtkGizmo to the breaking point,
split off a GtkPanedHandle class that just does
what is needed here. Its simpler, and lets us keep
GtkGizmo simpler too. Everybody wins.
2021-02-17 21:45:33 -05:00
Matthias Clasen
af1981eda2 popovercontent: Few small fixes
Forgot to include config.h. Oops, and we make things
a bit shorter still.
2021-02-17 21:44:53 -05:00
Matthias Clasen
41abda9f03 Make gtk_im_modules_init properly private
Putting non-exported symbols in public headers can
only lead to confusion and day drinking. Don't do it.

Fixes: #3676
2021-02-17 15:25:42 -05:00
Matthias Clasen
04daa236ad Revert "gizmo: Add a css_changed function"
This reverts commit 39f72b3834.
2021-02-16 23:51:14 -05:00
Matthias Clasen
31ceb4ddfb Revert "gizmo: Chain up in css_changed"
This reverts commit bb0a1b0cfe.
2021-02-16 23:51:14 -05:00
Matthias Clasen
c2f811dd29 popover: Add a popover content class
Instead of bending GtkGizmo to the breaking point,
split off a GtkPopoverContent class that just does
what is needed here. Its simpler, and lets us keep
GtkGizmo simpler too.
2021-02-16 23:51:14 -05:00
Jakub Steiner
edcd4c6207 Adwaita: control surface for resize tiled windows
- window resizing control area is implemented as where the shadows are drawn
- create a 'fake' shadow for the tiled case to allow easier resizing of
  the tiled window ratio even if it's offset to the side of the border

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3670
2021-02-16 14:10:14 +01:00
Jakub Steiner
67b5a34bad Adwaita: Avoid fine-tune scrollbars jumping
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3672
2021-02-16 11:59:45 +01:00
Matthias Clasen
bb0a1b0cfe gizmo: Chain up in css_changed
css_changed is a vfunc that *must* chain up.
Failure to do so broke the resizing of overlay scrollbars,
amongst other things.

This bug was introduced in 39f72b3834.
2021-02-15 14:26:52 -05:00
Matthias Clasen
2ac5c3282f Merge branch 'lenient-compose-parsing' into 'master'
imcontext: Be more lenient in parsing Compose

See merge request GNOME/gtk!3201
2021-02-15 18:08:45 +00:00
Matthias Clasen
6b3c356eb7 Merge branch 'wip/jimmac/larger-smaller-scrollbar-gtk4' into 'master'
Adwaita: Scrollbar transitions and size

Closes #1886

See merge request GNOME/gtk!3204
2021-02-15 18:06:00 +00:00
Jakub Steiner
5c5cd34c2f Adwaita: Scrollbar transitions and size
- tone down the size of the controller again
- transition between the indicator and control fluidly

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1886
2021-02-15 12:25:09 +01:00
Matthias Clasen
2f43b8dc49 imcontext: Improve compose table parsing
Avoid leaking value in error cases, and actually
emit a warning for a missing quote. Pointed out
by Peter Bloomfield.
2021-02-15 01:46:00 -05:00
Matthias Clasen
d2e074e36b imcontext: Be more lenient in parsing Compose
X11 allows keysyms to be specified in addition to strings.
We only support the strings. In the past, we ignored everything
after the string. Go back to doing that, but issue a warning
that we've ignored the keysym.
2021-02-14 12:56:00 -05:00
Matthias Clasen
2623932886 Merge branch 'fix-compose-comments' into 'master'
Fix compose comments

Closes #3664

See merge request GNOME/gtk!3199
2021-02-14 17:25:58 +00:00
Matthias Clasen
f15aa2f3e5 imcontext: Fix a regression in Compose file parsing
We accidentally dropped the handing of # comments.
Bring it back. Test included.

Fixes: #3664
2021-02-14 11:56:24 -05:00
Matthias Clasen
52a2891933 window: Add some more details to css docs
Mention more of the supported style classes.
2021-02-14 11:22:44 -05:00
Matthias Clasen
7ebc3a9489 Update popover css docs
Mention that shadows are now possible.
2021-02-14 11:14:23 -05:00
Matthias Clasen
aa1d08687d popover: Handle shadow changes
When the box-shadow css property of the contents
widget changes, queue a resize on the popover.
2021-02-14 10:12:10 -05:00
Matthias Clasen
39f72b3834 gizmo: Add a css_changed function
In a break from the current gizmo api, add a separate
setter, since the calls with long argument lists full
of NULL are getting out of hand.
2021-02-14 10:12:10 -05:00
Matthias Clasen
b948799778 popover: Support shadows
Use gdk_popup_layout_set_shadow_width to take shadows into
account when positioning popovers, and set the input region
to exclude the shadow, since we aren't doing interactive
resizing and the like.

When the popover has a beak, we make the surface size be
content size + shadow + tail, and then position the content
according to the final position inside this slightly too large
surface. The surface being too large doesn't matter, since we
set up an input region.
2021-02-14 10:11:17 -05:00
Matthias Clasen
b3a055a9b7 popover: Queue a resize when position changes
At least with an arrow, changing the position
requires a resize
2021-02-13 20:27:01 -05:00
Matthias Clasen
bd877ccf06 popover: Cosmetics 2021-02-13 20:26:54 -05:00
Timm Bäder
0d5957b97a nativedialog: Remove unused run state 2021-02-12 08:39:40 +01:00
Matthias Clasen
9f10f9a595 Merge branch 'fix-network-places' into 'master'
placesview: Avoid use-after-free

See merge request GNOME/gtk!3186
2021-02-11 19:41:10 +00:00
Matthias Clasen
560e27a3f4 Merge branch 'wip/jimmac/tiled-shadow-fix-fix-gtk4' into 'master'
Adwaita: bring borders for tiled

Closes #3661

See merge request GNOME/gtk!3184
2021-02-11 17:04:47 +00:00
Emmanuele Bassi
a63a2b26cf Ensure we don't overflow when using g_memdup2()
When we turn integers into size_t we should check we're not going to
make a mess.
2021-02-11 14:22:23 +00:00
Emmanuele Bassi
78e3908a00 gtk: Move from g_memdup() to g_memdup2()
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
2021-02-11 14:22:22 +00:00
Jakub Steiner
f953dfef11 Adwaita: bring borders for tiled
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3661
2021-02-11 15:16:57 +01:00
Matthias Clasen
95d48ac2e8 placesview: Avoid use-after-free
The places view has questionable code for handling
'destroy', which seems to trigger use-after-free in
some cases. Clean this up a bit by acknowledging the
cancellation fully, rather than relying on the
destroyed flag.
2021-02-11 09:14:34 -05:00
Matthias Clasen
e823fa6665 Merge branch 'fix-filter-value' into 'master'
css: Avoid an invalid read

See merge request GNOME/gtk!3181
2021-02-11 00:51:40 +00:00
Christian Hergert
c90ffc7363 snapshot: fix warning when asserts are disabled 2021-02-10 16:13:38 -08:00
Matthias Clasen
3eb4ec89f3 css: Avoid an invalid read
This was broken in ea7185bdb1.

Pointed out by Christian Hergert.
2021-02-10 19:13:36 -05:00
Jakub Steiner
da64856f37 Adwaita: don't cast shadows for halt-tiled windows
- while the case of a single half tiled window casting shadow is valid,
  the main use case for half tiled windows is when they have a neighbor.
  The :backdrop should be enough of a focus indicator and we avoid shadow
  casting on neighbors that are on the same Z level.
2021-02-09 18:57:31 +01:00
Christian Hergert
461fe36707 adwaita: disable shadows when window is maximized or fullscreen
These shadows cause a significant draw performance drop for maximized
windows. Disabling them increases the chances we can have faster scroll
performance of text.

There is some risk here for systems where they have a dock and you expect
the shadow to draw beneath that dock for transparency reasons.
2021-02-09 09:27:22 -08:00
Alexander Mikhaylenko
cf61d96188 headerbar: Null-check boxes when removing window controls
Prevent a crash when show-title-buttons value changes to FALSE during
destruction.
2021-02-08 18:46:35 +05:00
Alexander Mikhaylenko
319755662f headerbar: Don't use gtk_widget_unparent() with GtkBox
gtk_widget_unparent() is for widget implementations, it's not supposed to
be used from outside.
2021-02-08 18:46:27 +05:00
Matthias Clasen
15697d5c0c Merge branch 'focus' into 'master'
listbox: Fix handling of non-focusable rows

Closes #3633

See merge request GNOME/gtk!3152
2021-02-07 15:57:11 +00:00
Matthias Clasen
5f48764ac8 cssfiltervalue: Reject invalid filters
The Filter Effects Spec doesn't allow negative values
for most of the filter parameters.
2021-02-06 16:16:44 -05:00
Matthias Clasen
cc6fcbfc09 cssfiltervalue: Fix blur filter interpretation
According to https://www.w3.org/TR/filter-effects-1/,
the length passed to blur() is the standard deviation,
and according to https://www.w3.org/TR/css-backgrounds-3/#shadow-blur
the blur radius is twice the standard deviation.
2021-02-06 16:16:44 -05:00
Matthias Clasen
ea7185bdb1 cssfiltervalue: Implement drop-shadows
We have all the pieces, so this is surprisingly easy.
2021-02-06 16:16:43 -05:00
Matthias Clasen
429dfcf483 cssshadowvalue: Add a 'filter mode'
Shadow values created by gtk_css_shadow_value_new_filter or
gtk_css_shadow_value_parse_filter interpret their radius value
as standard deviation. Add a flag for this mode, and use it
where necessary.
2021-02-06 16:10:34 -05:00
Matthias Clasen
be3f352b59 cssshadowvalue: Add a parsing function
Add a variant of the parse function that parses
just a single (non-box) shadow, as required for
the drop-shadow filter.
2021-02-06 16:10:32 -05:00
Matthias Clasen
5b8896f1db cssshadowvalue: Add gtk_css_shadow_value_pop_snapshot
This is the counterpart ot gtk_css_shadow_value_push_snapshot.

To make this easy, move the determination whether we need a
shadow out of the push function and save it.
2021-02-06 16:09:21 -05:00
Matthias Clasen
4e27de7df9 cssshadowvalue: Drop the underscore
Rename _gtk_css_shadow_value_parse to drop the underscore.
It was the only underscore-prefixed function in this file.
2021-02-06 16:08:19 -05:00
Matthias Clasen
9770872d12 css: Implement the drop-shadow filter
We have all the pieces, so this is surprisingly easy.
2021-02-05 21:37:14 -05:00
Matthias Clasen
de24b4f91b cssshadowvalue: Add a parsing function
Add a variant of the parse function that parses
just a single (non-box) shadow, as required for
the drop-shadow filter.
2021-02-05 21:36:22 -05:00
Emmanuele Bassi
958005317b Merge branch 'master' into 'master'
Improve the docs of GtkWidget and GtkGrid

See merge request GNOME/gtk!2946
2021-02-05 12:14:26 +00:00
Matthias Clasen
482b73c376 Merge branch 'matthiasc/for-master' into 'master'
docs: Rewrite the long description for GtkDialog

Closes #3646

See merge request GNOME/gtk!3156
2021-02-05 00:10:47 +00:00
Maximiliano Sandoval R
3e2e6633b0
gtkshow: Fix doc typo 2021-02-04 21:02:22 +01:00
Matthias Clasen
4724f9907c docs: Rewrite the long description for GtkDialog
As was pointed out in #3646, some of the content here
was a bit outdated.

Fixes: #3646
2021-02-04 13:05:28 -05:00
Matthias Clasen
26e84a7b8c Merge branch 'matthiasc/for-master' into 'master'
More work on css transition tests

See merge request GNOME/gtk!3154
2021-02-04 13:28:59 +00:00
Matthias Clasen
2f42e1fb89 treemodelfilter: Drop unreachable code
We never get here. The compiler says so.

Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:40:14 -05:00
Matthias Clasen
b5200bd076 css: Drop a bit of unreachable code
We never get here. The compiler says so.

Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:39:34 -05:00
Matthias Clasen
aa5bd38137 a11y: Avoid out-of-bounds access
Don't use the index before we've checked its good.

Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:34:05 -05:00
Matthias Clasen
1e0ea21297 messagedialog: Don't initialize twice
We don't need to set these fields more than once.

Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:25:36 -05:00
Matthias Clasen
e91e75173d composetable: Remove a redundant check
We already know seq_index is not NULL here.

Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:22:52 -05:00
Matthias Clasen
041f410838 textbtree: Avoid line vs char count confusion
The post_insert_fixup helper function was confused about
its argument order.

Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:17:55 -05:00
Matthias Clasen
c71c8919fe listbase: Don't specify the same thing twice
We only need to set EXPLICIT_NOTIFY once.

Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:13:53 -05:00
Matthias Clasen
3f28399f7d css: Fix border value parsing
This function was not resetting computed as it meant
to because the last loop was never executed.

Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:12:51 -05:00
Matthias Clasen
1af72eac21 cssvalue: Cosmetic change
Don't return FALSE from pointer-returning functions.
2021-02-03 22:10:13 -05:00
Matthias Clasen
a14a0c6315 css: Fix shadow value equal
This function was not doing the right thing.

Once we are doing the right thing and not compare
shadows as unequal, some reftests that inhibit
snapshots for a few frames now hang forever, since
we are no more redrawing unnecessarily. Fix that
with an explicit queue_draw.
2021-02-03 22:10:13 -05:00
Matthias Clasen
38481680e1 Merge branch 'wip/jimmac/colored-list-image-buttons' into 'master'
Adwaita: allow suggested and destructive action buttons in lists

Closes #3643

See merge request GNOME/gtk!3153
2021-02-04 01:38:47 +00:00
Jakub Steiner
289bf078bf Adwaita: allow suggested and destructive action buttons in lists
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3643
2021-02-03 23:15:30 +01:00
Elias Projahn
a7ae94c06e listbox: Fix handling of non-focusable rows
This commit modifies the gtk_list_box_row_grab_focus() implementation to
correctly return FALSE in case the row couldn't be focused. This behavior will
also be honored by gtk_list_box_row_focus() to properly handle focus in that
case. To achieve that, the method has been restructured slightly.

Closes #3633
2021-02-03 21:22:55 +01:00
Emmanuele Bassi
592b33cb48 Graphene is a dependency of Gsk, not Gdk
So let's put it in the right place when building the introspection data.
2021-02-03 14:05:27 +00:00
Matthias Clasen
919c08d4fd css: Allow transitioning different-size shadows
The code handles it just fine. The length check was
an erronous addition.
2021-02-02 15:27:42 -05:00
Matthias Clasen
949c783187 composetable: Parse hex escapes too
This was a small omission from the Compose file
syntax that doesn't cost us much to support.

Add a test for this syntax too.

Fixes: #1004
2021-02-02 12:05:19 -05:00
Matthias Clasen
676f875bf6 composetable: Support string values in the cache
Change the cache format to include the character
data that we need to hold string values in the table.
2021-02-02 11:55:00 -05:00
Matthias Clasen
140c5c5333 composetable: Don't use GSlice for big blobs
This just doesn't make sense. This will use malloc
anyway, so just call malloc directly.
2021-02-02 11:55:00 -05:00
Matthias Clasen
cebf2b2009 composetable: Keep multi-char values
Keep string values in the table, and return them
from the check function. This commit temporarily
disables the table caching, since the cache format
does not handle string values yet.

Fixes: #186
2021-02-02 11:54:53 -05:00
Matthias Clasen
773ae0cd0f composetable: Parse multi-char values
Rewrite the value parsing function to accept strings
that hold more than a single Unicode character.
2021-02-02 09:03:53 -05:00
Matthias Clasen
564793d5b5 composetable: Another step towards multi-char values
Change the parser data structures to hold a string, rather
than a gunichar. We still only put a single Unicode character
into it, currently.
2021-02-02 09:02:46 -05:00
Matthias Clasen
9142aa0f51 composetable: Prepare for multi character values
Make it possible for gtk_compose_table_check to return
a string instead of just a single Unicode character.
Currently, we only ever return strings holding a single
character, still.
2021-02-02 09:02:00 -05:00
Matthias Clasen
af9a578d68 imcontext: Prepare for multi-char values
Reshuffle things so we can easily handle values
that are strings instead of just single Unicode
characters.
2021-02-01 23:43:59 -05:00
Matthias Clasen
ef053ebb4a composetable: Fix algorithmic matching
The code wasn't paying attention to (lack of) nul-termination
in one place, causing it to not match when it should.
2021-02-01 21:51:51 -05:00
Matthias Clasen
10fcdd88e3 imcontext: Code cleanup
Get rid of auxiliary check_table function.
2021-02-01 20:41:45 -05:00
Matthias Clasen
5d9509c51b imcontext: Move code around
Move all the checking code to gtkcomposetable.c, and
add api that we can use in tests.
2021-02-01 20:27:38 -05:00
Matthias Clasen
aa9054a5f1 imcontext: Use gtk_compose_table_check
Use the just-introduced api.
2021-02-01 19:41:07 -05:00
Matthias Clasen
9ebf3fac73 composetable: Add api to check tables
This copies the check_table code from gtkimcontextsimple.c,
in order to have an api for tests.
2021-02-01 19:40:22 -05:00
Matthias Clasen
be35c46ce9 composetable: Drop table debug code
This is better off in the tests that we are going to add.
2021-02-01 19:02:21 -05:00
Matthias Clasen
dbbcb13721 composetable: Parser fixes
We were not handling octal escapes right.
2021-02-01 16:05:05 -05:00
Matthias Clasen
edeaf9c040 imcontext: Drop GTK_MAX_COMPOSE_LEN
Drop GTK_MAX_COMPOSE_LEN from docs. It is no longer
used by GTK at all.  We leave the define in place
for now, to avoid breaking 3rd party code that might
use it.
2021-02-01 12:31:23 -05:00
Matthias Clasen
61f709811c composetable: Warn when ignoring things
We should at least give a hint that we've seen the line,
otherwise people will wonder why nothing happened.
2021-02-01 12:27:41 -05:00
Matthias Clasen
f7c4375509 composetable: parse long sequences
Allow compose sequences of up to 20 code points.

Fixes: #3521
2021-02-01 12:27:35 -05:00
Matthias Clasen
52fb900ced composetable: Fix an off-by-one
Fix an off-by-one in the code parsing octal escapes
in compose files.
2021-02-01 12:10:05 -05:00
Matthias Clasen
031944ad30 imcontext: Stop using GTK_MAX_COMPOSE_LEN
Allocate the compose_buffer, and resize it when needed
to match the tables we use.
2021-02-01 12:10:05 -05:00
Matthias Clasen
bf8b974f68 imcontext: Code cleanup
Use g_clear_pointer instead of opencoding it in
multiple places.
2021-02-01 12:10:05 -05:00
Matthias Clasen
3d85d53e5d Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #2319

See merge request GNOME/gtk!3140
2021-02-01 06:20:40 +00:00
Matthias Clasen
094a346539 imcontext: Allow sequences of length GTK_MAX_COMPOSE_LEN
There was an off-by-one error, making us reject sequences
of this length. But the rest of the code handles them
just fine.

Fixes: #2319
2021-02-01 00:55:25 -05:00
Matthias Clasen
162814f969 imcontext: Improve an error message
This error message was misleading, as pointed out
by Ralf Jung.
2021-02-01 00:44:41 -05:00
Matthias Clasen
e39b5c99f1 imcontext: Add a precondition check 2021-02-01 00:43:44 -05:00
Matthias Clasen
8883243aaa imcontext: Show preedit for compose sequences
Show the sequences as they are entered, using ⎄ for
the compose key, to match what IBus does nowadays.
Also handle backspace to allow corrections.
2021-02-01 00:37:43 -05:00
Matthias Clasen
89511eecf1 imcontext: Update our check for dead keys
A bunch of keysyms for dead keys have been added since this
code was last touched. Update the check to cover the full
range from dead_grave to dead_greek.
2021-01-31 23:56:24 -05:00
Matthias Clasen
2c304ca80d Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!3139
2021-02-01 01:48:47 +00:00
Matthias Clasen
bf4102e664 Merge branch 'wip/exalm/consumes-motion' into 'master'
Drag fixes and cleanups

Closes #3513

See merge request GNOME/gtk!3001
2021-02-01 01:34:45 +00:00
Matthias Clasen
7985d277b3 nativedialog: Add more docs
Emphasize that native dialogs aren't widgets, and are not
kept alive by GTK.
2021-01-31 20:25:44 -05:00
Matthias Clasen
de4b8d547b Merge branch 'wip/exalm/activate' into 'master'
listitemwidget: Activate on release instead of press

Closes #3345

See merge request GNOME/gtk!3008
2021-02-01 00:32:05 +00:00
Ungedummt
4d11158d97 GtkGrid: Add xml example for GtkBuildable to docs
Added an example and a short discription for the properties
2021-01-31 10:19:14 +01:00
Ungedummt
293b81cad2 Fix small typo in the docs of GtkWidget
In a XML example was MyGrid as a class defined; replaced with GtkGrid
2021-01-31 10:19:08 +01:00
Michael McClurg
cd7ec8ac92 Document nullability of gtk_list_box_get_selected_row 2021-01-30 15:23:41 +00:00
Matthias Clasen
3dbf5038fa Fix unsetting focus
Make _gtk_window_unset_focus_and_default queue the changes
for after the next draw. This achieves two things: first,
it avoids invalidating css at the wrong time (e.g. when
setting child-visible during size-allocation), and second,
it defers the focus change until after the widget is
hidden, so that moving the focus has the desired effect
of picking a different, visible widget.

Fixes: #3623
2021-01-29 21:41:16 -05:00
Emmanuele Bassi
988ebc2248 docs: Annotate XML fragments as such
This way we can get syntax highlighting.
2021-01-29 16:31:10 +00:00
Emmanuele Bassi
9f31e95420 docs: Escape bare tags
Otherwise tools processing the description of GtkWidget will be *very*
confused.
2021-01-29 16:31:10 +00:00
Emmanuele Bassi
3a076e26f7 docs: Use the appropriate syntax for code block language 2021-01-29 16:31:09 +00:00
Emmanuele Bassi
e3e85fc6f3 docs: Remove stray code block end marker 2021-01-29 16:31:09 +00:00
Alexander Mikhaylenko
11f3b7730c windowhandle: Use drag threshold instead of double click threshold
Now that we have gtk_drag_check_threshold_double(), be consistent with
other draggable widgets and make sure we don't take over a drag before a
child does.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3513
2021-01-29 12:01:34 +05:00
Alexander Mikhaylenko
f63e6394ac dragsource: Use double coordinates for checking drag threshold
If multiple nested widgets have drag sources on them, both using bubble
phase, we need to reliably pick the inner one. Both of them will try to
start dragging, and we need to make sure there are no situations where the
outer widget starts drag earlier and cancels the inner one.

Currently, this can easily happen via integer rounding: start and current
coordinates passed into gtk_drag_check_threshold() are initially doubles
(other than in GtkNotebook and GtkIconView), and are casted to ints. Then
those rounded values are used to calculate deltas to compare to the drag
threshold, losing quite a lot of precision along the way, and often
resulting in the outer widget getting larger deltas.

To avoid it, just don't round it. Introduce a variant of the function that
operates on doubles: gtk_drag_check_threshold_double() and use it instead
of the original everywhere.
2021-01-29 12:01:34 +05:00
Alexander Mikhaylenko
bbca4c38df entry: Fix drag threshold check
It was passing offsets as current oordinates.
2021-01-29 12:00:10 +05:00
Alexander Mikhaylenko
28f5d26719 windowhandle: Don't drag on capture phase
This was needed to work around widgets claiming event sequences on press,
by ignoring them and starting the drag anyway unless they have certain
event controllers on them.

The most visible offender was GtkButton, but since the last commit it
doesn't claim the sequence anymore and we can remove the hack.
2021-01-29 12:00:10 +05:00
Alexander Mikhaylenko
bf2620f041 checkbutton: Claim sequence on release instead of press
Make it possible to drag windows from check buttons in future.
2021-01-29 12:00:10 +05:00
Alexander Mikhaylenko
870b82b541 button: Stop claiming event sequence on press
Currently GtkButton claims the sequence both on press and on release. Stop
claiming it on press and only do it on release, allowing drags to start
from it.

This will allow to remove a hack from GtkWindowHandle.
2021-01-29 12:00:10 +05:00
Matthias Clasen
da59c77ae2 widget: Use subpixel positioning
Before turning off pangos rounding of glyph positions,
we must check if the cairo we are using is new enough
to have working subpixel positioning (the relevant
cairo commit is 52a7c79fd4ff96bb5fac175f0199819b0f8c18fc).
2021-01-28 18:17:22 -05:00
Matthias Clasen
98c247ec29 label: Drop some unused includes 2021-01-28 12:27:07 -05:00
Matthias Clasen
38e2f9138d Remove vestigial glade support
These files have not been kept up to date, and
glade doesn't work with GTK4 currently.
2021-01-28 12:27:07 -05:00
Matthias Clasen
3cc7d9b8c0 Move the gesture icons in the right place
Put these images into gtk/icons, where they belong.
2021-01-28 12:27:07 -05:00
Matthias Clasen
1ac9400712 Drop unused logo resource
The inspector no longer sets a window icon.
2021-01-28 12:27:07 -05:00
Matthias Clasen
10d5705b70 Reduce use of GtkStyleContext
Remove some unnecessary uses of GtkStyleContext where
we can directly go to the GtkCssStyle, and and drop
unnnecessary includes.
2021-01-28 12:27:07 -05:00
Matthias Clasen
2d0d579735 Unify border-spacing handling
Avoid using GtkStyleContext unnecessarily, just go
to the css node directly.
2021-01-28 12:27:07 -05:00
Matthias Clasen
ac0f524722 build: Redo the tools build
Move the tools directory to be toplevel, and instead of
recompiling sources twice, link them with the our new
static libgtk.a.
2021-01-28 12:27:07 -05:00
Matthias Clasen
06321511ad builder-tool: Translate GtkImage:pixbuf
The pixbuf property doesn't exist anymore. It is
commonly set to a path in ui files, so translate it
to the file property.
2021-01-27 17:01:51 -05:00
Sophie Herold
b89376da55 widget: get_name() is not nullable
Partial revert of !2905
2021-01-27 17:49:17 +00:00
Matthias Clasen
eeb3dd3511 Merge branch 'fix-can-focus' into 'master'
widget: Fix can-focus

Closes #3610

See merge request GNOME/gtk!3123
2021-01-27 05:34:21 +00:00
Matthias Clasen
7b0ce11e46 Merge branch 'search-entry-capture' into 'master'
Search entry capture

Closes #3098

See merge request GNOME/gtk!3115
2021-01-27 05:14:30 +00:00
Matthias Clasen
8ef1d6a49c widget: Fix can-focus
Setting can-focus to FALSE on a widget is supposed
to prevent focus from entering the entire subtree.
So when we grab focus directly to a widget, we need
to check the can-focus flag not just of the widget
itself, but all its ancestors.

Fixes: #3610
2021-01-26 23:45:06 -05:00
Matthias Clasen
7db60f958d searchentry: Capture events in the bubble phase
This is an unfortunate naming clash, but it avoids
an event handling clash between the capture widget
and its children.

Fixes: #3098
2021-01-26 22:17:57 -05:00
Matthias Clasen
5ee7606779 css: Support colors in cross fades
The CSS Image Spec (Level 4) allows colors in
cross-fade expressions to specify solid-color images.

Support this.
2021-01-26 21:14:09 -05:00
Matthias Clasen
25409c5a5a css: Add a constructor for GtkCssImageFallback
Add a way to create a solid color image.
2021-01-26 21:10:11 -05:00
Matthias Clasen
1258fcaaf4 css: Fix text-decoration-line support
This property needs to be treated as flags, not as
enum, since it should be possible to specify more
than one value, e.g.

text-decoration-line: underline overline;

Tests included.

Fixes: #3621
2021-01-26 17:53:14 -05:00
Matthias Clasen
1fe6fb6739 Merge branch 'circular-menubutton' into 'master'
Allow circular menubuttons

Closes #3423 and #3523

See merge request GNOME/gtk!3117
2021-01-26 12:47:38 +00:00
Matthias Clasen
80b1d55683 Merge branch 'css-overline' into 'master'
css: Support overline

See merge request GNOME/gtk!3116
2021-01-26 05:44:14 +00:00
Matthias Clasen
1cebc4316b Allow circular menubuttons
Fixes #3523
2021-01-26 00:20:23 -05:00
Matthias Clasen
65a4118d50 css: Support overline
We can support text-decoration-line: overline,
since pango supports it now.
2021-01-26 00:04:04 -05:00
Matthias Clasen
4857829aaa popover: Try to not exceed monitor bounds
When the natural size of the popover exceeds
the monitor width, clamp it to fit on screen.

This gives the Emoji chooser a chance to
work on phone screens.

Fixes: #3307
2021-01-25 23:33:04 -05:00
Matthias Clasen
2ea4574caf emojichooser: Allow the section buttons to wrap
Use a flowbox instead of a horizontal box for
the section buttons at the bottom, so they can
wrap and allow for narrow layout.

We also need to stop giving the scrolledwindow
a content height, so it can shrink to make room
for more rows of section buttons.
2021-01-25 23:32:15 -05:00
Matthias Clasen
102b74f9eb emojichooser: Make keynav work with != 7 columns
The number of 7 columns was hardcoded in a few places
related to keynav across sections. The flowbox does
not have an api for it, but we can find out anyway
how many columns there are.
2021-01-25 23:32:08 -05:00
Matthias Clasen
8a0d4dfa94 searchbar: Capture events in the bubble phase
This is an unfortunate naming clash, but it avoids
an event handling clash between the capture widget
and its children.

Fixes: #3098
2021-01-25 22:16:29 -05:00
Matthias Clasen
b4e645862a searchbar: Fix documentation mishap
The css section was inserted between the example
and the sentence referring to it.
2021-01-25 22:15:56 -05:00
Matthias Clasen
ea48506a32 Merge branch 'simplify-get-module-path' into 'master'
modules: Simplify _gtk_get_module_path

See merge request GNOME/gtk!3113
2021-01-26 02:53:38 +00:00
Jan Alexander Steffens (heftig)
23f0a29260
modules: Simplify _gtk_get_module_path
Remove the bizarre loops.
2021-01-25 22:47:16 +01:00
Jakub Steiner
23af707b41 Adwaita: make scrollbars larger
When using scrollbars as active controls, rather than their primary role as indicators,
increase their size as click targets.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1886
2021-01-25 14:15:22 +01:00
Matthias Clasen
344f9fcf05 css: Implement transform-origin
Implement most of transform-origin. We only
handle the xy components currently, which lets
us reuse the position value implementation that
is used for background-position.
2021-01-24 22:49:08 -05:00
Matthias Clasen
fe515c4c1c testsuite: Link some tests statically
Link tests for private apis statically.
2021-01-23 10:34:57 -05:00
Matthias Clasen
14f0a0addb Create a static library
Rearrange our build to create a libgtk.a for the the contents of gtk/,
and build libgtk-4.so from our per-subdirectory static libraries.
This will let us link tests statically for testing internal apis.
2021-01-23 10:31:23 -05:00
Matthias Clasen
0ef91c3ba8 Avoid a buffer overrun
We were putting the '\0' behind the end. Oops.
2021-01-22 13:56:04 -05:00
Matthias Clasen
39d5dd89c5 Avoid a heap-use-after-free
_gtk_gesture_cancel_sequence frees the struct pointed to by data,
so don't write to it afterwards. Found by asan.
2021-01-22 11:39:04 -05:00
Matthias Clasen
6c54abeca7 wayland: Explicitly announce ssd for kwin
Without this, kwin correctly assumes that we are
using client-side decorations. This is a port
of 32ae97f1 from GTK 3.24.

Fixes: #3609
2021-01-21 22:45:47 -05:00
Emmanuele Bassi
c46391420f Merge branch 'ebassi/lazier-a11y' into 'master'
Lazier accessibility

See merge request GNOME/gtk!3102
2021-01-21 18:57:34 +00:00
Matthias Clasen
5a3c3d8210 Merge branch 'inspector-controllers' into 'master'
Inspector controllers

See merge request GNOME/gtk!3101
2021-01-21 18:15:57 +00:00
Emmanuele Bassi
95ceb49770 a11y: Make GtkATContext realization lazier
We only realize the ATContext on the top level, which will create an
GtkAtSpiRoot object and the corresponding GtkAtSpiCache object. Whenever
an AT connects to the accessibility bus, and asks for the various
objects, all the ATContext will be realized on demand.
2021-01-21 16:40:57 +00:00
Emmanuele Bassi
0bde58ffd7 a11y: Avoid signal emission during cache population
If we're responding to a request to get all the cached items, there's no
need to emit signals when adding an ATContext to the cache.
2021-01-21 16:40:57 +00:00
Matthias Clasen
ccd9827b63 inspector: Redo the actions page
Don't create widgets in bind, instead just set
the new action on the action-editor, and let it
recreate the parts that need to be recreated.
2021-01-21 10:25:13 -05:00
Matthias Clasen
db189cfb9f inspector: Reshuffle action editor
Prepare the action editor for being able to change its
actions after creation.
2021-01-21 10:24:31 -05:00
Matthias Clasen
7527f181d5 inspector: Simplify action editor
We are not using the size group anymore, so drop it.
2021-01-21 10:20:21 -05:00
Matthias Clasen
c05b418512 inspector: Split out variant editor 2021-01-21 10:19:18 -05:00
Matthias Clasen
e97d996fe4 inspector: Redo the shortcuts page
Use a column view here.
2021-01-21 10:19:18 -05:00
Matthias Clasen
0537b167ca inspector: Redo the controllers page
Use a column view, and only show the widgets own
controllers.
2021-01-21 10:19:18 -05:00
Matthias Clasen
fff6b35821 inspector: Redo the controllers page
Use a column view, and only show the widgets own
controllers.
2021-01-20 18:51:01 -05:00
Emmanuele Bassi
a1216599ff Add rename-to annotation for GtkListStore.insert_valuesv()
The vector-based variant should shadow the variadic arguments function
in bindings.
2021-01-20 14:10:17 +00:00
Emmanuele Bassi
8fff0e0fdf docs: Reformat GtkListStore.insert_values() 2021-01-20 14:10:17 +00:00