Commit Graph

3433 Commits

Author SHA1 Message Date
Timm Bäder
a2291fb989 showrendernode: Pass error to deserialize() 2020-10-22 17:46:33 +02:00
Timm Bäder
da0abfce3a showrendernode: Plug GOptionContext memory leak 2020-10-14 15:06:12 -04:00
Timm Bäder
958e4be86d testfilechooser: Stop listening to ::selection-changed
Doesn't exist anymore.
2020-10-14 15:06:12 -04:00
Matthias Clasen
593907f7b0 testupload: Test more formats
Copy the format conversion code from GdkMemoryTexture
so we can produce all formats, and test them all.

The upload fast paths assume that the stride is a
multiple of four, so some of the padding values cause
it to fail. Apart from that, things seem to work for
all combinations.
2020-09-26 17:26:12 -04:00
Matthias Clasen
d56ad7c40c Add a test for various texture uploads
Create textures with various characteristics (alpha, premultiplication,
stride) that trigger different code paths in the gl texture upload
function, and show the resulting images. If all goes well, they all
should look the same.

On my system, this tests texture upload for memory formats
GDK_MEMORY_B8G8R8A8_PREMULTIPLIED, GDK_MEMORY_R8G8B8A8, and
GDK_MEMORY_R8G8B8, and it works with both gl and gles.
2020-09-26 09:20:00 -04:00
Matthias Clasen
a9de1d702e Merge branch 'matthiasc/for-master' into 'master'
columnview: Simplify column constructors

See merge request GNOME/gtk!2622
2020-09-25 18:25:09 +00:00
Matthias Clasen
0c3f42e06e columnview: Simplify column constructors
Drop gtk_column_view_column_new_with_factory and
just make gtk_column_view_column_new accept a
nullable factory. This follows what we've been
doing elsewhere.

Update all callers.
2020-09-25 13:57:10 -04:00
Carlos Garnacho
b1606db839 gtkscrolledwindow: Drop gtk_scrolled_window_set_capture_button_press()
This API is kinda stuck in the GdkEvent days, we now negotiate ownership
of the input sequence via GtkGestures. Remove it as it reflects a way to
work that was not exactly accurate and it will turn plainly wrong soon.
2020-09-25 18:57:40 +02:00
Matthias Clasen
929a56e53c Clean up lots of GTK+ -> GTK
Replace most remaining uses of GTK+ in the docs and
user-visible strings by GTK. Also remove some leftover
"Was added in 3.x" sentences from the docs.
2020-09-12 12:01:04 -04:00
Matthias Clasen
b5f3ac9718 Add a testcase for controls in headerbars
This is meant to help with figuring out entry
selection drag issues.
2020-09-12 10:58:07 -04:00
Matthias Clasen
93078e52c0 gdk: Rename GdkSurfaceState to GdkToplevelState
That is what it is.

Fixes: #2790
2020-09-10 00:39:03 -04:00
Matthias Clasen
cb2b0688ca Merge branch 'filter-constructors' into 'master'
Filter constructors

See merge request GNOME/gtk!2360
2020-09-08 12:58:27 +00:00
Matthias Clasen
24389a0ef5 Make sorter constructors return exact types
Make functions like gtk_custom_sorter_new() return
the actual type they construct.

Update all callers.
2020-09-05 21:50:15 -04:00
Matthias Clasen
dfabe74c59 Make filter constructors return exact types
Make functions like gtk_custom_filter_new() return
the actual type they construct.

Update all callers.
2020-09-05 21:43:42 -04:00
Matthias Clasen
8a3621a125 Beef up transform testcase
Make this show 'paintings in paintings'.
2020-09-04 13:20:59 -04:00
Matthias Clasen
1a8f109af8 Add a simple testcase for transforms
This can help in tracking various things down,
from picking to clipping.
2020-09-03 10:09:22 -04:00
Matthias Clasen
b628338db3 list widgets: Simplify the constructors
Now that both arguments to the _new_with_factory() constructors
are nullable, there's no good reason to keep a separate _new()
around. Just make gtk_list_view_new() and gtk_grid_view_new()
take both a model and a factory.
2020-09-01 12:24:06 -04:00
Matthias Clasen
8d79a32c50 list widgets: Use selection models in the api
Change the apis in GtkListView, GtkColumnView and
GtkGridView to be explicitly about GtkSelectionModel,
to make it obvious that the widgets handle selection.

Update all users.
2020-08-31 17:15:05 -04:00
Matthias Clasen
c7b6c2f441 Remove GtkRadioButton references in the docs 2020-08-30 21:23:25 -04:00
Matthias Clasen
2c5c938f0d Clean up uses of gtk_toggle_button_get/set_active
Replace all uses on check buttons by the corresponding
check button api.
2020-08-30 21:23:25 -04:00
Matthias Clasen
8f1bf594b9 Drop a long-dead test
We don't parse rc files anymore. Time for testrc.c to go.
2020-08-30 21:23:25 -04:00
Matthias Clasen
1b6f734019 tests: Stop using radio buttons
Use grouped check buttons.
2020-08-30 21:23:25 -04:00
Timm Bäder
1375fb4464 Change button hierarchy
A radiobutton without indicator is really just a togglebutton with a
group.

A radiobutton with indicator is really just a checkbutton with a group.

Make checkbutton its own widget not inheriting from GtkButton.
GtkRadioButton could be removed but it stays for now.

Radiobutton && !draw-indicator => Togglebutton
Checkbutton && !draw-indicator => Togglebutton

Radiobutton && draw-indicator => CheckButton + group
2020-08-29 16:46:28 +02:00
Timm Bäder
7a8d71138f testoutsetshadowdrawing: Make window background white
This makes it easier to compare the rendering with other sources.
2020-08-29 16:46:28 +02:00
Timm Bäder
ea21e50cc1 testadjustsize: Fix overlay/box confusion 2020-08-29 11:11:29 +02:00
Matthias Clasen
125ed52ccb Merge branch 'new-sysprof' into 'master'
Port profiling to sysprof-collector api

See merge request GNOME/gtk!2457
2020-08-21 23:58:09 +00:00
Matthias Clasen
81e88c1d9e Alterative sysprof build support
Don't link libgtk against libsysprof. We only
need that for the test-performance binary.
2020-08-21 18:28:29 -04:00
Björn Daase
6315cd977c *: Fix spelling mistakes found by codespell 2020-08-21 15:29:34 +02:00
Matthias Clasen
ae7cefd97d Drop style class defines
We document the supported style classes by name,
not by macro name, and these macros don't really
add any value. Drop them for GTK 4.
2020-08-14 07:03:27 -04:00
Andreas Persson
f4a6a99b7c Specify version for optional librsvg dependency
The testsvg test uses a method in librsvg that was introduced in
2.46.0. The test is now skipped if the librsvg version is too old.
(It was previously already skipped if librsvg wasn't found.)
2020-08-06 14:02:02 +02:00
Matthias Clasen
2eec82c32a testsvg: Some additions
Load a file from the commandline, and implement
intrinsic width/height.
2020-08-05 23:53:29 -04:00
Matthias Clasen
29ba8f0819 Add an svg test
tests/testsvg is a minimal paintable implementation wrapped
around RsvgHandle.
2020-08-05 23:22:03 -04:00
Matthias Clasen
d7c4f93c76 Merge branch 'wip/compute-size' into 'master'
Compute size via signal

See merge request GNOME/gtk!2325
2020-08-05 16:19:19 +00:00
Jonas Ådahl
2ff74eb667 gdk/toplevel: Negotiate surface size via a compute-size signal
GTK will not up front know how to correctly calculate a size, since it
will not be able to reliably predict the constraints that may exist
where it will be mapped.

Thus, to handle this, calculate the size of the toplevel by having GDK
emitting a signal called 'compute-size' that will contain information
needed for computing a toplevel window size.

This signal may be emitted at any time, e.g. during
gdk_toplevel_present(), or spontaneously if constraints change.

This also drops the max size from the toplevel layout, while moving the
min size from the toplevel layout struct to the struct passed via the
signal,

This needs changes to a test case where we make sure we process
GDK_CONFIGURE etc, which means we also needs to show the window and
process all pending events in the test-focus-chain test case.
2020-08-05 15:49:00 +02:00
Matthias Clasen
9c8bceb691 testborderdrawing: Don't crash on exit 2020-08-05 08:19:07 -04:00
Matthias Clasen
8562c623d3 Drop GtkAccelLabel
We no longer use this widget anywhere.
2020-08-04 23:05:18 -04:00
Matthias Clasen
ed13e6a41e grid layout: Rename some properties
Rename GtkGridLayoutChild:left-attach/top-attach to
GtkGridLayoutChild:column/row. Update all users.

Fixes: #2967
2020-08-02 17:58:03 -04:00
Matthias Clasen
f136a6f51f testgtk: More GTimeVal eradication 2020-07-31 13:37:29 -04:00
Christian Hergert
459af3acab build: bump to sysprof 4 ABI
Sysprof has moved to a new ABI which removes GLib from the capture library
so that GLib itself can link against sysprof-capture.

This bumps the library ABI so we can keep things coordinated between all
the new tracing layers in the stack.
2020-07-28 11:22:33 -07:00
Matthias Clasen
bc0182fa3e Merge branch 'ebassi/new-a11y' into 'master'
Accessibility rework

See merge request GNOME/gtk!2239
2020-07-27 11:55:19 +00:00
Matthias Clasen
d187ff858c Merge branch 'drop-down-constructor' into 'master'
GtkDropDown api revisions

See merge request GNOME/gtk!2286
2020-07-26 23:57:48 +00:00
Matthias Clasen
eb5c76210e gridview: Revise constructors
Make both gtk_grid_view_new and gtk_grid_view_new_with_factory
take a model as first argument, and make all arguments
allow-none and transfer full.

Update all callers.
2020-07-26 18:50:50 -04:00
Matthias Clasen
fc22b75a06 columnview: Revise the constructor
Make gtk_column_view_new take a model as first argument,
and make it allow-none and transfer full.

Update all callers.
2020-07-26 18:32:50 -04:00
Matthias Clasen
43000abeff listview: Revise constructors
Make both gtk_list_view_new and gtk_list_view_new_with_factory
take a model as first argument, and make all arguments
allow-none and transfer full.

Update all callers.
2020-07-26 18:27:23 -04:00
Matthias Clasen
f7ab6f665d dropdown: Revise constructors
A dropdown without a model is useless, so accept a model
and expression in the constructor. Allow them to be NULL,
but consume them if given. This makes chained constructors
convenient without breaking language bindings.

Drop gtk_drop_down_set_from_strings() and instead add
gtk_drop_down_new_from_strings().

Update all users.
2020-07-26 18:09:54 -04:00
Matthias Clasen
dd1c0c0b22 treelistmodel: Make constructor transfer full
Make gtk_tree_list_model_new() take the root model
as first argument, and make it transfer full, for
consistency with other wrapping list constructors.

Update all callers.

Still missing here: Make the model property writable,
and allow passing NULL in the constructor.
2020-07-26 18:04:40 -04:00
Matthias Clasen
a46cfd3ff4 sortlistmodel: Make constructor transfer full
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.

Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
706d464ae6 filterlistmodel: Make constructor transfer full
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.

Update all callers.
2020-07-26 18:04:40 -04:00
Emmanuele Bassi
c63087a563 Remove ATK
To build a better world sometimes means having to tear the old one down.
        -- Alexander Pierce, "Captain America: The Winter Soldier"

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

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

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

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

For more information, see: https://gitlab.gnome.org/GNOME/gtk/-/issues/2833
2020-07-26 20:31:14 +01:00
Benjamin Otte
3078b180fe Replace "gdouble" with "double" 2020-07-25 00:47:36 +02:00