gtk4.git
2 years agoAvoid a bad warning
Matthias Clasen [Mon, 1 May 2023 14:35:24 +0000 (10:35 -0400)]
Avoid a bad warning

This isn't what we intended, and it breaks CI for
various projects.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 30 Apr 2023 22:39:57 +0000 (22:39 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

docs: Migration guide updates

See merge request GNOME/gtk!5899

2 years agoMerge branch 'emojichooser-variation-fix' into 'main'
Matthias Clasen [Sun, 30 Apr 2023 22:29:11 +0000 (22:29 +0000)]
Merge branch 'emojichooser-variation-fix' into 'main'

emojichooser: Avoid extraneous variation selectors

See merge request GNOME/gtk!5898

2 years agodocs: Migration guide updates
Matthias Clasen [Sat, 29 Apr 2023 20:15:02 +0000 (16:15 -0400)]
docs: Migration guide updates

Mention various widget size apis going away.

2 years agogsk: Plug a few memory leaks
Matthias Clasen [Sun, 30 Apr 2023 22:21:23 +0000 (18:21 -0400)]
gsk: Plug a few memory leaks

2 years agoemojichooser: Avoid extraneous variation selectors
Matthias Clasen [Sun, 30 Apr 2023 15:55:17 +0000 (11:55 -0400)]
emojichooser: Avoid extraneous variation selectors

Only add a variation selector if there isn't one already.

2 years agomigrating-3to4: Fix unescaped ptr * used as italic
Daniel Boles [Sun, 30 Apr 2023 15:55:31 +0000 (16:55 +0100)]
migrating-3to4: Fix unescaped ptr * used as italic

2 years agogtk-demo/listbox: Fix 0 space between nick & date,
Daniel Boles [Sun, 30 Apr 2023 15:36:10 +0000 (16:36 +0100)]
gtk-demo/listbox: Fix 0 space between nick & date,

by restoring the right-alignment that gtk-3-24 has here, but we had lost
– I guess because we dropped the default child expand and pack-end props

2 years agoInscription|InfoBar: Fix small cosmetic issue@docs
Daniel Boles [Sun, 30 Apr 2023 15:05:11 +0000 (16:05 +0100)]
Inscription|InfoBar: Fix small cosmetic issue@docs

2 years agoMerge branch 'dboles/expander-css-nodes-doc' into 'main'
Daniel Boles [Sun, 30 Apr 2023 11:37:55 +0000 (11:37 +0000)]
Merge branch 'dboles/expander-css-nodes-doc' into 'main'

Expander: Clarify/format “CSS nodes” documentation

See merge request GNOME/gtk!5896

2 years agoExpander: Clarify/format CSS nodes documentation
Daniel Boles [Sat, 29 Apr 2023 21:38:21 +0000 (22:38 +0100)]
Expander: Clarify/format CSS nodes documentation

Use backticks to highlight the node names, mention the box, and clarify
that the arrow referred to in the last sentence is the `expander` node.

2 years agoMerge branch 'deprecated-get-allocated-width' into 'main'
Matthias Clasen [Sat, 29 Apr 2023 18:55:45 +0000 (18:55 +0000)]
Merge branch 'deprecated-get-allocated-width' into 'main'

Deprecated get allocated width

See merge request GNOME/gtk!5894

2 years agoMerge branch 'box-baseline-child' into 'main'
Matthias Clasen [Sat, 29 Apr 2023 18:30:59 +0000 (18:30 +0000)]
Merge branch 'box-baseline-child' into 'main'

boxlayout: Add a baseline child property

See merge request GNOME/gtk!5891

2 years agoDeprecate gtk_widget_get_allocated_width
Matthias Clasen [Sat, 29 Apr 2023 18:27:59 +0000 (14:27 -0400)]
Deprecate gtk_widget_get_allocated_width

2 years agotests: Stop using gtk_widget_get_allocated_width
Matthias Clasen [Sat, 29 Apr 2023 18:27:39 +0000 (14:27 -0400)]
tests: Stop using gtk_widget_get_allocated_width

2 years agogtk4-demo: Stop using gtk_widget_get_allocated_size
Matthias Clasen [Sat, 29 Apr 2023 18:10:53 +0000 (14:10 -0400)]
gtk4-demo: Stop using gtk_widget_get_allocated_size

2 years agopopover: Stop using gtk_widget_get_allocated_width
Matthias Clasen [Sat, 29 Apr 2023 18:00:30 +0000 (14:00 -0400)]
popover: Stop using gtk_widget_get_allocated_width

2 years agoplacesview: Stop using gtk_widget_get_allocated_width
Matthias Clasen [Sat, 29 Apr 2023 17:59:15 +0000 (13:59 -0400)]
placesview: Stop using gtk_widget_get_allocated_width

2 years agoplacessidebar: Stop using gtk_widget_get_allocated_width
Matthias Clasen [Sat, 29 Apr 2023 17:58:15 +0000 (13:58 -0400)]
placessidebar: Stop using gtk_widget_get_allocated_width

2 years agocolumnview: Stop using gtk_widget_get_allocated_width
Matthias Clasen [Sat, 29 Apr 2023 17:54:14 +0000 (13:54 -0400)]
columnview: Stop using gtk_widget_get_allocated_width

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 29 Apr 2023 18:29:14 +0000 (18:29 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

widget: Cosmetics

See merge request GNOME/gtk!5892

2 years agoMerge branch 'wip/carlosg/x11-artifacts' into 'main'
Benjamin Otte [Sat, 29 Apr 2023 18:11:21 +0000 (18:11 +0000)]
Merge branch 'wip/carlosg/x11-artifacts' into 'main'

gdk/x11: Invalidate whole surface after size change

See merge request GNOME/gtk!5857

2 years agodocs: Mention baselines
Matthias Clasen [Sat, 29 Apr 2023 17:46:47 +0000 (13:46 -0400)]
docs: Mention baselines

Add a paragraph about baselines to the coordinates overview.

2 years agowidget: Cosmetics
Matthias Clasen [Sat, 29 Apr 2023 17:35:24 +0000 (13:35 -0400)]
widget: Cosmetics

Rename allocated_size_baseline to allocated_baseline,
to match better with the other allocated_ fields.

2 years agospinbutton: Use GtkBoxLayout:baseline-child
Matthias Clasen [Sat, 29 Apr 2023 16:00:15 +0000 (12:00 -0400)]
spinbutton: Use GtkBoxLayout:baseline-child

This makes it so that vertical spin buttons are
properly aligned to the baseline.

2 years agoRevert "spinbutton: Use a grid layout"
Matthias Clasen [Sat, 29 Apr 2023 15:55:27 +0000 (11:55 -0400)]
Revert "spinbutton: Use a grid layout"

This reverts commit d648a7721e826717fb2c675d8202ab34e879d521.

2 years agoboxlayout: Add a baseline child property
Matthias Clasen [Thu, 27 Apr 2023 12:57:09 +0000 (14:57 +0200)]
boxlayout: Add a baseline child property

In horizontal layout, we line up the baselines of all children to find
how much space we need above and below the box baseline.

In vertical layout, we need to pick one child to inherit the baseline
from, which is what the new GtkBoxLayout:baseline-child property is
about. It is the equivalent of GtkGridLayout:baseline-row.

2 years agoEventController: Fix type "even propagation"→event
Daniel Boles [Sat, 29 Apr 2023 17:12:30 +0000 (18:12 +0100)]
EventController: Fix type "even propagation"→event

2 years agoRemove more debug spew
Matthias Clasen [Sat, 29 Apr 2023 15:45:39 +0000 (11:45 -0400)]
Remove more debug spew

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 29 Apr 2023 14:16:42 +0000 (14:16 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

entry: Ignore the baseline when centering

See merge request GNOME/gtk!5889

2 years agowidget: Don't set baselines when unused
Matthias Clasen [Sat, 29 Apr 2023 13:47:59 +0000 (09:47 -0400)]
widget: Don't set baselines when unused

When we are not doing baseline alignment, don't pass
a baseline to the allocated widget. This helps because
a number of widgets (GtkLabel, GtkEntry, etc) always
position their text on the given baseline.

2 years agoentry: Ignore the baseline when centering
Matthias Clasen [Sat, 29 Apr 2023 13:20:07 +0000 (09:20 -0400)]
entry: Ignore the baseline when centering

GtkEntry was always placing its text on the baseline,
even when the valign said something else.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 29 Apr 2023 12:27:23 +0000 (12:27 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

theme: Reinstate switch labels in hc

See merge request GNOME/gtk!5888

2 years agotestbaseline2: Don't set height-requests
Matthias Clasen [Sat, 29 Apr 2023 12:00:07 +0000 (08:00 -0400)]
testbaseline2: Don't set height-requests

Widget with height requests have their baselines
ignored. Oops.

2 years agotheme: Reinstate switch labels in hc
Matthias Clasen [Sat, 29 Apr 2023 11:58:42 +0000 (07:58 -0400)]
theme: Reinstate switch labels in hc

Since we show them in GNOME shell, show them here too.

The comment that says "only show these in the a11y
theme" was still there, but we were always hiding them.

2 years agogdk/x11: Invalidate whole surface after size change
Carlos Garnacho [Fri, 21 Apr 2023 08:58:19 +0000 (10:58 +0200)]
gdk/x11: Invalidate whole surface after size change

The Expose events following a ConfigureNotify may arrive at
a time that we did not resize the surface yet, making these
expose events a no-op. Even though gsk/gtk take care of the
window content itself, this might lead to unrendered portions
of the window shadow.

This may be seen with GSK_RENDERER=cairo and GDK_BACKEND=x11,
attempting to tile a window (e.g. gtk4-demo) left or right.
The window will show black rectangles or other artifacts in
the window shadow areas that correspond to the newly painted
portions (as the window needs to expand vertically).

In order to fix this with a similar behavior to Wayland,
consider ourselves the whole surface invalidated after resize,
in order to ensure everything is painted from scratch.

2 years agoUpdate Friulian translation
Fabio Tomat [Sat, 29 Apr 2023 08:57:53 +0000 (08:57 +0000)]
Update Friulian translation

2 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Sat, 29 Apr 2023 03:43:45 +0000 (03:43 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

wayland: Use wl_surface_damage_buffer() in Cairo

See merge request GNOME/gtk!5886

2 years agorendernode: Add diffing for affine transforms
Benjamin Otte [Fri, 28 Apr 2023 02:28:23 +0000 (04:28 +0200)]
rendernode: Add diffing for affine transforms

This will be needed most importantly for inverted textures,
like in GLArea.

2 years agowayland: Use wl_surface_damage_buffer() in Cairo
Benjamin Otte [Sat, 29 Apr 2023 03:07:03 +0000 (05:07 +0200)]
wayland: Use wl_surface_damage_buffer() in Cairo

... when it is available.

Also introduce the new function gdk_rectangle_transform_affine(), which
looks like overkill for this purpose, but I'm about to use it elsewhere.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 29 Apr 2023 01:15:58 +0000 (01:15 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

shortcutswindow: Avoid criticals

See merge request GNOME/gtk!5885

2 years agoshortcutswindow: Avoid criticals
Matthias Clasen [Sat, 29 Apr 2023 00:44:18 +0000 (20:44 -0400)]
shortcutswindow: Avoid criticals

No point in resetting accessible relations
when we are in finalize.

2 years agoMerge branch 'clarify-swapped-default-object-signal' into 'main'
Matthias Clasen [Fri, 28 Apr 2023 23:00:31 +0000 (23:00 +0000)]
Merge branch 'clarify-swapped-default-object-signal' into 'main'

builder: Clarify default "swapped" value when "object" is set for signals

See merge request GNOME/gtk!4514

2 years agoMerge branch 'gtkshortcutswindow_a11y' into 'main'
Matthias Clasen [Fri, 28 Apr 2023 22:57:10 +0000 (22:57 +0000)]
Merge branch 'gtkshortcutswindow_a11y' into 'main'

GtkShortcutsWindow: Allow a screen reader user to browse the available shortcuts

See merge request GNOME/gtk!5042

2 years agoMerge branch 'harmonize-would_drop' into 'main'
Matthias Clasen [Fri, 28 Apr 2023 22:55:42 +0000 (22:55 +0000)]
Merge branch 'harmonize-would_drop' into 'main'

Harmonize would_drop() replacement for g_log_writer_default_would_drop()

See merge request GNOME/gtk!4935

2 years agoMerge branch 'deprecate-get-allocation' into 'main'
Matthias Clasen [Fri, 28 Apr 2023 22:49:42 +0000 (22:49 +0000)]
Merge branch 'deprecate-get-allocation' into 'main'

Deprecate get allocation

See merge request GNOME/gtk!5882

2 years agoREADME: Updates
Matthias Clasen [Fri, 28 Apr 2023 21:29:08 +0000 (17:29 -0400)]
README: Updates

Drop the section that talked about main and how to update
local checkouts - its been 2 years, people should have gotten
around to it by now. Add some general git hints instead.

2 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Fri, 28 Apr 2023 21:22:12 +0000 (21:22 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

Fix hangs on Wayland

Closes #5761

See merge request GNOME/gtk!5884

2 years agowayland: Set EGL swap interval to 0.
Benjamin Otte [Fri, 28 Apr 2023 20:40:39 +0000 (22:40 +0200)]
wayland: Set EGL swap interval to 0.

There's no need for EGL to do any timing, we do it in GTK already.

This fixes hangs in Mesa when we hide a surface after a SwapBuffers()
but before the frame callback arrives.
If we then reshow the surface and immediately render to it, Mesa would
still have a frame callback from before the hiding and forever poll()
waiting for the compositor to send the callback.

Fixes #5761

2 years agowayland: Disconnect the frame callback when hiding
Benjamin Otte [Fri, 28 Apr 2023 20:21:42 +0000 (22:21 +0200)]
wayland: Disconnect the frame callback when hiding

Do not leave spurious frame callbacks around wen hiding surfaces.
Instead, store the callback and remove it.

2 years agomigrating-3to4: Don't mention removed Box method &
Daniel Boles [Fri, 28 Apr 2023 20:11:12 +0000 (21:11 +0100)]
migrating-3to4: Don't mention removed Box method &

donʼt mention its renamed successor either, as that has its own section
later. We could have another sentence paragraph like ‘In the case of
GtkBox, the pack methods have been renamed to X and lost the trailing
arguments Y’, but that wonʼt help people prepare still on GTK3, which is
the point in the affected section… so just remove the misleading relic.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Fri, 28 Apr 2023 20:09:17 +0000 (20:09 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Cosmetics

See merge request GNOME/gtk!5883

2 years agoUpdates
Matthias Clasen [Fri, 28 Apr 2023 20:02:18 +0000 (16:02 -0400)]
Updates

2 years agoCosmetics
Matthias Clasen [Fri, 28 Apr 2023 19:36:37 +0000 (15:36 -0400)]
Cosmetics

2 years agoDeprecate gtk_widget_get_allocated_baseline
Matthias Clasen [Fri, 28 Apr 2023 19:19:22 +0000 (15:19 -0400)]
Deprecate gtk_widget_get_allocated_baseline

2 years agoStop using gtk_widget_get_allocated_baseline
Matthias Clasen [Fri, 28 Apr 2023 19:25:09 +0000 (15:25 -0400)]
Stop using gtk_widget_get_allocated_baseline

Use gtk_widget_get_baseline instead.

2 years agoAdd gtk_widget_get_baseline
Matthias Clasen [Fri, 28 Apr 2023 19:18:13 +0000 (15:18 -0400)]
Add gtk_widget_get_baseline

This is just a renaming of gtk_widget_get_allocated_baseline
that fits better with gtk_widget_get_width/height.

2 years agoDeprecate gtk_widget_get_allocation
Matthias Clasen [Fri, 28 Apr 2023 19:03:30 +0000 (15:03 -0400)]
Deprecate gtk_widget_get_allocation

2 years agoflowbox: Use deprecation guards around get_allocation
Matthias Clasen [Fri, 28 Apr 2023 18:57:03 +0000 (14:57 -0400)]
flowbox: Use deprecation guards around get_allocation

2 years agoinspector: Show bounds instead of allocation
Matthias Clasen [Fri, 28 Apr 2023 19:03:07 +0000 (15:03 -0400)]
inspector: Show bounds instead of allocation

2 years agoscrolledwindow: Stop using gtk_widget_get_allocation
Matthias Clasen [Fri, 28 Apr 2023 18:27:07 +0000 (14:27 -0400)]
scrolledwindow: Stop using gtk_widget_get_allocation

2 years agotextutil: Stop using gtk_widget_get_allocation
Matthias Clasen [Fri, 28 Apr 2023 18:16:32 +0000 (14:16 -0400)]
textutil: Stop using gtk_widget_get_allocation

2 years agotetview: Stop using gtk_widget_get_allocation
Matthias Clasen [Fri, 28 Apr 2023 18:10:07 +0000 (14:10 -0400)]
tetview: Stop using gtk_widget_get_allocation

2 years agotext: Stop using gtk_widget_get_allocation
Matthias Clasen [Fri, 28 Apr 2023 17:29:15 +0000 (13:29 -0400)]
text: Stop using gtk_widget_get_allocation

2 years agoUpdate Chinese (China) translation
Boyuan Yang [Fri, 28 Apr 2023 18:51:56 +0000 (18:51 +0000)]
Update Chinese (China) translation

2 years agoMerge branch 'wip/otte/texturebuilder' into 'main'
Benjamin Otte [Fri, 28 Apr 2023 15:58:10 +0000 (15:58 +0000)]
Merge branch 'wip/otte/texturebuilder' into 'main'

Add GdkGLTextureBuilder

See merge request GNOME/gtk!5862

2 years agoMerge branch 'baseline-fixes' into 'main'
Matthias Clasen [Fri, 28 Apr 2023 14:40:57 +0000 (14:40 +0000)]
Merge branch 'baseline-fixes' into 'main'

boxlayout: Fix baselines a bit

See merge request GNOME/gtk!5879

2 years agoMore docs for BASELINE
Matthias Clasen [Fri, 28 Apr 2023 13:21:15 +0000 (09:21 -0400)]
More docs for BASELINE

Add some more details to the docs for GTK_ALIGN_BASELINE.

2 years agowidget: Handle baseline better
Matthias Clasen [Thu, 27 Apr 2023 20:19:24 +0000 (22:19 +0200)]
widget: Handle baseline better

When adjusting allocations, treat BASELINE more like CENTER
than like FILL. The results are better, in particular for
controls like entries or switches, which we never want to
scale up vertically, but still want to align to the baseline.

2 years agoimage: Simplify baseline handling
Matthias Clasen [Thu, 27 Apr 2023 20:19:01 +0000 (22:19 +0200)]
image: Simplify baseline handling

We guarantee that the out arguments of the measure
vfunc are non-NULL, no need to check.

2 years agoswitch: Fix up baseline handling
Matthias Clasen [Thu, 27 Apr 2023 20:18:20 +0000 (22:18 +0200)]
switch: Fix up baseline handling

We need to report a baseline for baseline alignment
to work...

2 years agospinbutton: Use a grid layout
Matthias Clasen [Thu, 27 Apr 2023 18:24:49 +0000 (20:24 +0200)]
spinbutton: Use a grid layout

A grid layout lets us get the baseline right in
vertical orientation, by setting a baseline row.

It would be nice if the box layout supported this
as well, but currently it doesn't, and adding that
feature isn't trivial.

2 years agoboxlayout: Fix baselines a bit
Matthias Clasen [Thu, 27 Apr 2023 16:14:49 +0000 (18:14 +0200)]
boxlayout: Fix baselines a bit

When we are not doing height-for-width, we still
need to line up baselines.

2 years agoAdd another baseline test client
Matthias Clasen [Thu, 27 Apr 2023 15:56:12 +0000 (17:56 +0200)]
Add another baseline test client

2 years agogldriver: Add a sync when creating textures
Matthias Clasen [Tue, 25 Apr 2023 09:48:50 +0000 (11:48 +0200)]
gldriver: Add a sync when creating textures

2 years agogstreamer: Defer the sync
Matthias Clasen [Tue, 25 Apr 2023 09:44:21 +0000 (11:44 +0200)]
gstreamer: Defer the sync

Don't sync right when we receive the buffer,
pass it along with the texture to be executed
later in the renderer.

2 years agoglarea: Synchronize
Matthias Clasen [Sat, 28 Jan 2023 16:04:10 +0000 (11:04 -0500)]
glarea: Synchronize

Create a fence object and pass it along when
creating the GL texture, so that the GL renderer
can wait for the texture to be ready.

2 years agofilechooser: Plug a memory leak
Matthias Clasen [Thu, 27 Apr 2023 06:46:25 +0000 (08:46 +0200)]
filechooser: Plug a memory leak

2 years agoAdd some more valgrind suppressions
Matthias Clasen [Thu, 27 Apr 2023 06:33:03 +0000 (08:33 +0200)]
Add some more valgrind suppressions

2 years agocolumnview: Plug a memory leak
Matthias Clasen [Thu, 27 Apr 2023 06:26:53 +0000 (08:26 +0200)]
columnview: Plug a memory leak

g_list_model_get_item strikes again.

2 years agofilechooser: Plug a memory leak
Matthias Clasen [Thu, 27 Apr 2023 06:26:13 +0000 (08:26 +0200)]
filechooser: Plug a memory leak

We own references to the columns. Drop them.

2 years agofilechoosernative: Plug a memory leak
Matthias Clasen [Thu, 27 Apr 2023 06:25:30 +0000 (08:25 +0200)]
filechoosernative: Plug a memory leak

Unref all the GVariants.

2 years agofiledialog: Plug a memory leak
Matthias Clasen [Thu, 27 Apr 2023 05:22:38 +0000 (07:22 +0200)]
filedialog: Plug a memory leak

We own a reference to the native dialog,
and we need to drop it when we're done.

2 years agonode-editor: Plug a memory leak
Matthias Clasen [Thu, 27 Apr 2023 04:51:30 +0000 (06:51 +0200)]
node-editor: Plug a memory leak

2 years agonotebook: Drop an unused variable
Matthias Clasen [Thu, 27 Apr 2023 11:41:16 +0000 (13:41 +0200)]
notebook: Drop an unused variable

2 years agoFix various bitfield warnings
Matthias Clasen [Thu, 27 Apr 2023 04:46:36 +0000 (06:46 +0200)]
Fix various bitfield warnings

clang rightly complains about using gboolean
as type for bitfields, since it is signed.
Avoid that.

2 years agogsk: Synchronize when using textures
Matthias Clasen [Sat, 28 Jan 2023 20:20:26 +0000 (15:20 -0500)]
gsk: Synchronize when using textures

Pass the GLsync object from texture into our
command queue, and when executing the queue,
wait on the sync object the first time we
use its associated texture.

2 years agogltexture: Synchronize when downloading
Matthias Clasen [Mon, 30 Jan 2023 13:35:43 +0000 (08:35 -0500)]
gltexture: Synchronize when downloading

If the GL texture has a sync object, wait
on it before downloading the data.

2 years agogltexture: Optionally take a sync object
Matthias Clasen [Tue, 25 Apr 2023 09:03:51 +0000 (11:03 +0200)]
gltexture: Optionally take a sync object

Add a new function to TextureBuilder that takes a GLsync that
requires internal code to wait on before using the texture.

Somewhat sneakily, we don't take the sync if syncs are not supported by
the current GL context.
As public API has no code to query the sync for the destroy notify, this
is fine and it means we don't have to do the check every time we want to
call gdk_texture_get_sync() internally.

2 years agoglcontext: Add a way to check for GLsync
Matthias Clasen [Wed, 26 Apr 2023 09:59:51 +0000 (11:59 +0200)]
glcontext: Add a way to check for GLsync

2 years agogltexture: Deprecate gdk_gl_texture_new()
Benjamin Otte [Mon, 24 Apr 2023 20:44:01 +0000 (22:44 +0200)]
gltexture: Deprecate gdk_gl_texture_new()

Use GdkGLTextureBuilder instead.

2 years agoglrenderer: Port to GdkGLTextureBuilder
Benjamin Otte [Mon, 24 Apr 2023 20:36:42 +0000 (22:36 +0200)]
glrenderer: Port to GdkGLTextureBuilder

2 years agomedia-gstreamer: Port to GdkGLTextureBuilder
Benjamin Otte [Mon, 24 Apr 2023 20:22:07 +0000 (22:22 +0200)]
media-gstreamer: Port to GdkGLTextureBuilder

This is a rudimentary port that does not take advantage of all the cool
new formats that we could support now.

2 years agotestsuite: Use GLTextureBuilder
Benjamin Otte [Mon, 24 Apr 2023 20:10:06 +0000 (22:10 +0200)]
testsuite: Use GLTextureBuilder

2 years agoglarea: Port to GdkGLTextureBuilder
Benjamin Otte [Mon, 24 Apr 2023 20:02:10 +0000 (22:02 +0200)]
glarea: Port to GdkGLTextureBuilder

2 years agotexturebuilder: Pass the destroy notify to the build() function
Benjamin Otte [Mon, 24 Apr 2023 19:56:49 +0000 (21:56 +0200)]
texturebuilder: Pass the destroy notify to the build() function

This is more compatible with bindings that want to create per-object
callbacks and not have their callbacks reused over different build()
calls.

2 years agotexturebuilder: Add ::format and ::has-mipmap
Benjamin Otte [Mon, 24 Apr 2023 12:36:38 +0000 (14:36 +0200)]
texturebuilder: Add ::format and ::has-mipmap

We were trying to deduce that previously. Now we have explicit API

2 years agogdk: Add GdkGLTextureBuilder
Benjamin Otte [Mon, 24 Apr 2023 04:04:26 +0000 (06:04 +0200)]
gdk: Add GdkGLTextureBuilder

Building GL textures is complicated, so create an object to make them.

So far, this object just contains the functionality of
gdk_gl_texture_new(), but that will change in the future.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Thu, 27 Apr 2023 04:37:12 +0000 (04:37 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Fix the build with clang

See merge request GNOME/gtk!5876

2 years agoMerge branch 'wip/otte/gl-version' into 'main'
Benjamin Otte [Thu, 27 Apr 2023 00:39:19 +0000 (00:39 +0000)]
Merge branch 'wip/otte/gl-version' into 'main'

Make sure highest possible version GLContext is created

See merge request GNOME/gtk!5870