Commit Graph

1913 Commits

Author SHA1 Message Date
Matthias Clasen
171612671f demo: Beef up the image scaling demo
Add buttons for loading the Portland Rose, and a nameless large
png. Make them load the texture in a thread, to demonstrate better
handling of large images.
2024-09-06 16:14:24 -04:00
Matthias Clasen
a8e49cc21f gtk-demo: Cosmetics
Don't print out when the user just canceled the print dialog,
in the fill and stroke demo.
2024-09-01 10:33:27 -04:00
Fina Wilke
649782b547 a11y: Consistently use list type for errormessage relation
This more closely matches the spec. This is an API break, however the
atspi backend already assumed that this was a list, and would throw
criticals whenever this relation was set. Therefore it can be assumed
that this relation was not previously in active use.
2024-08-30 20:22:59 +00:00
Balló György
283c66251b demos: Set icon for the windows 2024-08-28 17:02:44 +02:00
Simon McVittie
15a09c79f9 Fix debug format strings for non-LP64 platforms
Unfortunately the format string for a size_t, `%zu`, is not portable
to all Windows compilers, and the appropriate format string for the
fundamental type that implements size_t varies between platforms
(typically `%u` on 32-bit platforms, `%lu` on 64-bit Linux or
`%llu` on 64-bit Windows).

In gtk-demo, cast the number of search results to long, to avoid
breaking up a translatable string.

Elsewhere, use GLib's abstraction for this.

Signed-off-by: Simon McVittie <smcv@debian.org>
2024-07-27 18:14:31 +01:00
Benjamin Otte
32625381fa gsk: Deprecate GskGLShader and the rendernode
The new renderers don't support them due to the required complexity of
integrating them with Vulkan and the assumptions those nodes make about
the renderer (the GL renderer exports its internal APIs into the
GLShader).

There haven't been any complaints that I'm aware of since 4.14 was
released where the default renderer does not support the nodes, so usage
in public seems to be close to nonexistant.

The 2 uses I know of were workarounds about missing features in GTK that
have stopped since GTK now supports them:

1. GStreamer used in to do premultiplication when the old GL renderer
   did not do so in hardware but on the CPU.
2. Adwaita used it for masking before the mask node wa added in 4.10.
2024-07-04 21:28:06 +02:00
Georges Basile Stavracas Neto
f9929d15eb gtk-demo: Remove set-but-unused variable 2024-05-03 12:30:39 -03:00
Matthias Clasen
3b8218a99e gtk-demo: Name some idles
These show up in profiles, so give them a name.
2024-05-01 16:06:16 -04:00
Matthias Clasen
9df6f802f2 gtk-demo: Better accessibility for the sidebar
Add an accessible description saying how many search reasults
we have. This is an experiment.

Related: #6678
2024-04-30 11:54:56 -04:00
Benjamin Otte
02d7817632 demo: Use get_fps() in fishbowl demo
Hopefully that leads to somewhat more reliable fps measurements
2024-04-09 17:39:36 +02:00
Matthias Clasen
f51c82a2aa gtk-demo: Use offload for shadertoy
This is an easy way to verify that GtkGLArea delivers dmabufs
now, and it might have some practical uses to offload gl area.
2024-04-07 13:03:13 -04:00
Matthias Clasen
37e18b784e gtk-demo: Add a callback cursor
Make one of the GTK logo cursors in the cursors demo use a callback
cursor that follows the cursor theme size, to show that that is
possible.
2024-04-04 01:07:28 +02:00
Matthias Clasen
0dd58c4d1b gtk-demo: Cosmetic changes
Remove the periods from the tooltips in the cursor demo.
Tooltips are better without periods.
2024-04-03 14:39:51 +02:00
Matthias Clasen
2c1590001f Sync cursor images with Adwaita
Several cursor metaphors were changes in Adwaita. Update our docs
and the Cursors demo to match.
2024-03-20 13:19:12 -04:00
Matthias Clasen
b4f5432d5a gtk4-demo: Clean up the application demo
This partially reverts ca1c570c21.
2024-03-17 22:29:22 -04:00
Matthias Clasen
2701a2bfdd demos: Make the maze demo non-resizable
It isn't playable if the entrance/exit don't reach the edge
of the window.

Fixes: #6549
2024-03-16 10:08:37 -04:00
Matthias Clasen
d224110b48 gtk-demo: Skip the transitions demo when necessary
This demo uses GL shader nodes which only work with the GL renderer,
therefore skip the demo unless the GL renderer is in use.

Fixes: #6538
2024-03-13 21:02:17 -04:00
Matthias Clasen
8f356c2e8c gtk-demo: Skip gl shader when necessary
GL shader nodes only work with the GL renderer, therefore skip
the Shader in the list unless the GL renderer is in use.

Fixes: #6538
2024-03-13 21:02:10 -04:00
Benjamin Otte
d88e616711 demos: shadertoy only handles GL
If somebody wants to add GLES support, go for it.

For now we enforce GL.
2024-03-03 22:20:44 +00:00
Khalid Abu Shawarib
44fa748826 general: Fix leaks 2024-02-27 22:01:41 +03:00
Matthias Clasen
d4d4c7e119 gtk-demo: Add keywords to some demos
Folks had trouble finding the 'suggestion entry' demo.
2024-02-16 10:13:55 -05:00
Matthias Clasen
c7b345f73e build: Move and rename demo_conf.h header
We want to use the same header in the inspector, so move it to
the toplevel. And since it is no longer for demos only, rename
it to profile_conf.h, and also rename the build option back
to profile.
2024-01-18 20:20:58 -05:00
Benjamin Otte
63d7b22924 demo: Port the paintable demo to paths 2024-01-08 09:28:26 +01:00
Matthias Clasen
59578c6d18 Fix typos throughout
These were pointed out by codespell.
2024-01-07 20:44:05 -05:00
Matthias Clasen
4ab18b6657 gtk4-demo: Use #pragma once consistently
This is our current coding style.
2023-12-20 09:55:11 -05:00
Carlos Garnacho
39b08b82ca gtk-demo: Fix typo
Close the quotes in alert dialog message.
2023-12-11 14:22:30 +01:00
Matthias Clasen
3ab7b2d7ce Merge branch 'va-fixes-reported-by-pvs' into 'main'
Fix issues spotted by PVS-Studio

See merge request GNOME/gtk!6558
2023-11-15 00:27:08 +00:00
Andrey Kutejko
540a83327f Fix issues spotted by PVS-Studio 2023-11-14 08:56:40 +01:00
Matthias Clasen
d32ab7544d gtk-demo: Enable offload in the video player 2023-11-13 22:27:51 +01:00
Sergey Bugaev
e8ecbb2009 demo: Use the frame time for animation
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-10-10 11:38:13 +03:00
Matthias Clasen
12ad6b3157 gtk-demo: Add a demo for printing a stream
Add a Print button to the path fill demo,
and implement it using gtk_print_dialog_print.
2023-10-01 09:30:38 -04:00
Matthias Clasen
fda9fd5ced print dialog: Some API revisions
Make gtk_print_dialog_setup_finish return a GtkPrintSetup
object, which encapsulates all the data that needs to be
transferred between the setup and print calls, and make
the print_file and print methods take an extra GtkPrintSetup
argument.

Change the print call to return an output stream, rather
than take an input stream. The results are now returned
when the output stream is closed.

With some further cleanup, this makes the GtkPrintDialog
object a proper builder object - you can create multiple
print dialogs from the same GtkPrintDialog object, in
parallel, and they won't interfere with each other.
2023-10-01 09:30:38 -04:00
Matthias Clasen
bbda833b01 demos: Cosmetics 2023-09-30 21:30:15 -04:00
Matthias Clasen
b55117334c gtk-demo: Add a print dialog 2023-09-27 20:50:52 -04:00
Matthias Clasen
d8b14cd3e3 gtk-demo: Fix a refcounting mishap
gtk_font_dialog_button_new's argument is
transfer full.

Fixes: #6113
2023-09-23 07:47:09 -04:00
kramo
0b2cebe3d8
docs: Update cursor images 2023-09-21 19:51:11 +02:00
Matthias Clasen
76df3ade18 gtk-demo: Update some ifdefed code
This was from a time when we had arcs.
2023-09-20 22:12:09 -04:00
Matthias Clasen
f94a0624fa gtk4-demo: Fix a crash
This conversion of GtkStatusbar was a bit too
quick.

Fixes: #6107
2023-09-19 14:47:59 -04:00
Carlos Garnacho
cbbd3e8fc3 demos: Add step/page-increment to path_walk demo spinbutton
It had 0 defaults, so it didn't get to spin when interacted.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/6098
2023-09-18 20:09:42 +02:00
Matthias Clasen
ed44f37de4 gtk-demo: Add sound to the path maze
Its a game, after all.
2023-09-14 11:32:22 -04:00
Matthias Clasen
5721c3cb8f demos: Drop an unused variable 2023-08-28 20:50:38 -04:00
Matthias Clasen
827bbc0cc1 Change gsk_path_get_closest_point to return distance
We already compute it, so lets return it.
Bindings seems fine with this change - they
already return (success, point) as a tuple
anyway.
2023-08-28 11:22:30 -04:00
Matthias Clasen
6f823d2d0d gtk-demo: Add a few path benchmarks
The Tiger and Graph examples in the fishbowl test
path handling.
2023-08-27 12:59:10 -04:00
Benjamin Otte
2582fd45e4 demos: Add cute maze demo 2023-08-27 12:45:25 -04:00
Matthias Clasen
1db75e521d Simplify the path spinner demo
The transforms were obscuring a simple
calculation here.
2023-08-27 07:43:55 -04:00
Benjamin Otte
e2d2b57f0e demos: Add a text-on-path demo 2023-08-25 20:23:08 -04:00
Matthias Clasen
6c1a128ea3 Make the map demo more interesting
Add marching arrows to it.

With this, it can also serve as a performance
test for rendering medium complexity paths.
2023-08-25 20:23:08 -04:00
Matthias Clasen
a906dbea35 demo: Fix a bug without GL
The gears widget was just not unrealizing properly
when GL is not available. Fix that.

Fixes: #6059
2023-08-25 08:37:22 -04:00
Matthias Clasen
0b5a6ecbff demos: Cosmetics 2023-08-23 23:20:17 -04:00
Matthias Clasen
9a6aac0459 path spinner demo: Don't crash 2023-08-23 23:18:59 -04:00