Matthias Clasen
9faf1a0377
gsk: Comment out some debug code
...
The calls of these functions are #ifdef'ed out,
so no point in compiling these functions.
2023-05-11 06:13:42 -04:00
Matthias Clasen
1a9c03449e
gtk: Don't drop too many references
...
We only have one reference to the surface,
and it is dropped by gdk_surface_destroy.
All the users of surfaces in gtk had the same
bug: they were all stealing an extra reference
to drop - the one that the renderer was leaking
until recently.
2023-05-11 06:13:03 -04:00
Matthias Clasen
aee214b09d
gsk: Fix some renderer gotchas
...
unrealize() needs to clean up the surface that was set
in realize(), and both need to emit property change
notification.
2023-05-10 20:21:54 -04:00
Matthias Clasen
dc3003bc4d
gsk: Improve test coverage
...
Add more tests for gsk transforms, render node
and renderer apis.
2023-05-10 20:21:31 -04:00
Matthias Clasen
845f4b1536
gsk: Drop an unused function
2023-05-10 20:21:12 -04:00
Matthias Clasen
abbb3a2da6
testsuite: Close displays in the gsk tests
...
This gives us better coverage of the dispose
codepath for a driver that has actually been
used.
2023-05-10 20:21:12 -04:00
Matthias Clasen
1a93efecf3
gsk: Dispose the driver when the display is closed
...
This was the intention, but the object data by itself
does not achieve that: We do run dispose on the display
when it is closed, but object data is only cleared in
finalize. So listen to the ::closed signal and remove
the driver ourselves.
Fix up the drivers dispose implementation enough for
that to actually work.
2023-05-10 20:21:12 -04:00
Matthias Clasen
440d56a44f
Use gsk_matrix_transform_point3d consistently
2023-05-10 20:21:12 -04:00
Matthias Clasen
f10603e97d
Merge branch 'matthiasc/for-main' into 'main'
...
tests: Stop copying the tool tests
See merge request GNOME/gtk!5947
2023-05-10 10:38:07 +00:00
Matthias Clasen
9a9257d7be
tests: Don't disable vertex arrays
...
It doesn't work, and that makes tests fail.
2023-05-09 23:02:48 -04:00
Matthias Clasen
5c10f2b4cd
Improve coverage for half-float fallbacks
2023-05-09 23:02:30 -04:00
Matthias Clasen
ba6a618d44
build: Rename another option
2023-05-09 21:41:27 -04:00
Matthias Clasen
5fbeea3870
build: Deprecate an option
...
Rename the demos option to build-demos, to match
the other options for building optional parts.
2023-05-09 21:34:05 -04:00
Matthias Clasen
27368a418a
build: Require meson 0.63
...
This is needed for option deprecation.
2023-05-09 21:34:05 -04:00
Matthias Clasen
676cd1e673
tests: Stop copying the tool tests
...
No point in doing that, and the meson feature
we are using here is deprecated.
2023-05-09 21:21:39 -04:00
Matthias Clasen
d6a4c65bfa
Post-release version bump
2023-05-09 20:48:33 -04:00
Matthias Clasen
4695f583c1
4.11.2
2023-05-09 20:46:21 -04:00
Matthias Clasen
fa88d738dc
Update baseline docs a bit
2023-05-09 18:59:11 -04:00
Matthias Clasen
7841248c1d
Merge branch 'deprecate-align-value' into 'main'
...
Deprecate GTK_ALIGN_BASELINE
See merge request GNOME/gtk!5946
2023-05-09 20:53:59 +00:00
Matthias Clasen
ef5f34c985
Update tests
2023-05-09 16:36:07 -04:00
Matthias Clasen
1dfa54c117
Deprecate GTK_ALIGN_BASELINE
...
We can deprecated enum values now.
2023-05-09 14:28:26 -04:00
Matthias Clasen
ff920d98ec
Use GTK_ALIGN_BASELINE_FILL
...
Replace GTK_ALIGN_BASELINE with its new name
everywhere.
2023-05-09 14:28:26 -04:00
Matthias Clasen
91ca6d0851
Merge branch 'wip/ebassi/gen-version-macros' into 'main'
...
Generate version and deprecation macros at build time
See merge request GNOME/gtk!5945
2023-05-09 18:23:40 +00:00
Emmanuele Bassi
cdeeb3275a
build: Internal tests must set GTK_COMPILATION
...
Otherwise they won't be able to use the appropriate function visibility
on Windows.
2023-05-09 19:01:21 +01:00
Emmanuele Bassi
9d68bebdd1
Minimize the amount of inclusions in public headers
...
Public headers should mainly include gdktypes.h, which already include
the symbol visibility and versioning macros; we can also modify
gdktypes.h to include the enumerations.
2023-05-09 17:36:59 +01:00
Matthias Clasen
526ddfa866
Merge branch 'wip/otte/sections' into 'main'
...
Add GtkSectionModel
See merge request GNOME/gtk!5818
2023-05-09 16:36:55 +00:00
Matthias Clasen
d7b9d35c02
Use #pragma once
...
We switched over to using #pragma once, so lets
use it consistently, in generated headers as well.
2023-05-09 16:43:35 +01:00
Matthias Clasen
383c404792
Drop the gdk/gdkversionmacros.h header
...
It was just added to avoid touching too many files.
Touching them now.
2023-05-09 16:43:35 +01:00
Emmanuele Bassi
33d0cfd4f8
demos: Drop symbol visibility macros from demo types
...
Since the corresponding source files do not include "config.h", and are
not compiled with `GTK_COMPILATION`, they will generate the wrong symbol
exporting under Windows.
2023-05-09 16:43:35 +01:00
Emmanuele Bassi
43311f3a80
build: Minor style nitpicks
2023-05-09 16:43:35 +01:00
Emmanuele Bassi
265bc90524
build: Use Meson's gnu_symbol_visibility
...
Instead of injecting `-fvisibility=hidden` depending on a compiler check
ourselves, let Meson do it for us.
This also avoids us having to filter `-fvisibility=hidden` when reusing
the common compiler flags.
2023-05-09 16:43:25 +01:00
Matthias Clasen
197d921347
Add a missing file
2023-05-09 16:43:25 +01:00
Matthias Clasen
3d5529760a
Fix install location
2023-05-09 16:43:25 +01:00
Matthias Clasen
3a2c4be44b
Use GTK_COMPILATION throughout
...
It is a bit ugly that it doesn't fit the neat
namespace schema, but it is what we use everywhere.
2023-05-09 16:43:25 +01:00
Matthias Clasen
e216f469a1
Don't excessively define GDK_EXTERN
...
Once is enough.
2023-05-09 16:43:25 +01:00
Matthias Clasen
5ae25519a7
Make it build
...
Fix the circular dependency by moving the generated
headers to gdk/version/, and build that directory
first.
Misc other fixes, such as putting the custom targets
as sources, not depedencies, and using the correct
major version in the generator script.
2023-05-09 16:43:25 +01:00
Emmanuele Bassi
4d1f7a476d
Generate version and deprecation macros at build time
...
Let's poach the same script used by GLib to avoid having to add all the
version macros by hand every time we increment the GTK version.
This is a work in progress:
- need to rename the GLIB_STATIC_COMPILATION check
- circular dependency: libgtkcss depends on gdkversionmacros.h, but libgdk
depends on libgtkcss
2023-05-09 16:43:25 +01:00
Benjamin Otte
a959fba18a
Merge branch 'wip/otte/no-vsync' into 'main'
...
Add GDK_DEBUG=no-vsync
See merge request GNOME/gtk!5944
2023-05-09 15:16:43 +00:00
Benjamin Otte
c88ac79437
listview: Make inertness not depend on factory
...
The inertness concept introduced in 62e9d1e470
assumed a listview was
inert when no factory was set. This has 2 problems:
1. columnview uses a listview without factories.
2. header factory being set but factory not being set technically makes
the listiew inert - but should it?
So for now, make inertness only depend on visibility and root.
A side benefit is that this matches columnview semantics.
2023-05-09 17:03:35 +02:00
Benjamin Otte
ddefbfa8b5
gtk-demo: Add alternative settings demo
...
This one displays a long list of all settings with sections and allows
filtering the list to quickly search for keys.
2023-05-09 17:03:35 +02:00
Benjamin Otte
435a405c55
gtk-demo: Split out code from the settings demo
...
I want to add another demo using settings and share relevant code.
2023-05-09 17:01:20 +02:00
Benjamin Otte
e1ed9f10c6
theme: Add some random CSS for section headers
2023-05-09 17:00:40 +02:00
Benjamin Otte
46adfbef4f
listitemmanager: Create header items for sections
...
Now, finally, listitemmanager has all the necessary support to make
section headers work.
2023-05-09 17:00:40 +02:00
Benjamin Otte
53bfcf7f0a
listview: GtkListHeader and gtk_list_view_set_header_factory()
...
Adds infrastructure for handling factories for list headers.
For now, listitemmanager doesn't instantiate them, so they aren't used.
2023-05-09 17:00:40 +02:00
Benjamin Otte
76d601631d
listitemmanager: Add GtkListItemChange
...
... for tracking widgets during changes.
This just pulls all the different disjointed parts into one struct with
a sensible API.
2023-05-09 17:00:40 +02:00
Benjamin Otte
38844fef4d
listitemmanager: Add GtkListHeaderBase and vfuncs
...
This is plumbing for section handling.
The vfuncs don't do anything, this is just the infrastructure.
2023-05-09 17:00:40 +02:00
Benjamin Otte
03ac6611c1
listitembase: exit early
...
When update() is called but no values are changed, exit early.
2023-05-09 17:00:40 +02:00
Benjamin Otte
0ff88346cd
listitemmanager: Make sections configurable
...
Add a gtk_list_item_manager_set_has_sections() (default: FALSE) that
requires explicit turning on for the listitemmanager to gain section
support.
2023-05-09 17:00:40 +02:00
Benjamin Otte
a73256e5c9
listitemmanager: Add/remove sections as needed
...
When ensuring widgets, ensure that their section is known. This will
be relevant when we use section widgets.
Also ensure that sections that don't cover any widget get destroyed.
2023-05-09 17:00:40 +02:00
Benjamin Otte
5d2605a151
testsuite: assert widgets are in matched sections
...
All widgets that we display should have their sections known, so assert
that that is the case.
2023-05-09 17:00:40 +02:00