gtk2/testsuite/gtk
Christian Hergert ccac404f28 widget: fix class private data usage to be _init() safe
Before this commit, adding GtkWidgetAction to class private data would
require copying the actions to each subclass as they were built or
modified. This was convenient in that it is a sort of "copy on write"
semantic.

However, due to the way that GTypeInstance works with base _init()
functions, the "g_class" pointer in GTypeInstance is updated as each
_init() function is called. That means you cannot access the subclasses
class private data, but only the parent class private data.

If instead we use a singly linked list of GtkWidgetAction, each subclass
has their own "head" yet all subclasses share the tail of the
GtkWidgetAction chain.

This creates one bit of complexity though. You need a stable way to know
which "bit" is the "enabled" bit of the action so we can track enabled
GAction state. That is easily solved by calculating the distance to the
end of the chain for a given action so that base classes sort ahead of
subclasses. Since the parent class always knows its parent's actions, the
position is stable.

A new dynamic bitarray helper also helps us avoid allocations in all the
current cases (up to 64 actions per widget) and dynamically switches to
malloc if that is to ever be exceeded.
2020-03-20 11:17:56 -07:00
..
file-chooser-test-dir
focus-chain Add a focus-chain test for focusable containers 2019-06-11 17:15:02 +00:00
icons testsuite: add a test for non-square symbolic icons 2015-06-12 08:55:23 -07:00
icons2 icon-theme: Test inheritance vs. generic fallback 2014-09-21 16:34:27 -04:00
ui Remove new attributes from tests 2019-07-28 11:00:29 -04:00
accel.c Revert "Merge branch 'disable-window-test' into 'master'" 2020-03-19 18:03:16 -04:00
accessible.c testsuite: Fix the accessible test 2020-03-20 10:03:04 -04:00
action.c widget: fix class private data usage to be _init() safe 2020-03-20 11:17:56 -07:00
adjustment.c adjustment: Remove deprecated API 2016-10-18 00:29:19 +02:00
autotestkeywords.cc testsuite: Update C++ keywords test to GTK 3.0.0 2018-03-18 19:20:46 +01:00
bitmask.c testsuite: Stop using g_test_bug() 2019-05-12 17:28:18 +02:00
builder.c Revert "Merge branch 'disable-window-test' into 'master'" 2020-03-19 18:03:16 -04:00
builderparser.c Add a a drop-in test for the GtkBuilder parser 2014-10-18 22:18:59 -04:00
cellarea.c treeview column: Make final 2019-05-28 23:22:57 -04:00
check-icon-names.c testsuite/gtk: Add common_cflags to build 2020-03-07 16:28:04 +01:00
constraint-solver.c Use explicit values for constraint strength 2019-07-01 12:39:24 +01:00
cssprovider.c cssprovider test: Remove style property test case 2017-07-19 21:27:14 -04:00
defaultvalue.c Revert "Merge branch 'disable-window-test' into 'master'" 2020-03-19 18:03:16 -04:00
displayclose.c window: Remove type argument from gtk_window_new() 2020-02-14 21:18:49 +01:00
entry.c entry, spin button: Drop redundant API 2019-02-28 16:34:00 -05:00
filterlistmodel.c Fix leaks in tests 2019-12-04 18:24:56 -05:00
filtermodel.c testsuite: Use g_assert() in tests 2020-03-02 03:18:55 +01:00
flattenlistmodel.c Fix leaks in tests 2019-12-04 18:24:56 -05:00
floating.c
focus.c testsuite: Check proper notify emissions, too 2020-02-22 07:33:40 +01:00
gestures.c wip: Use event constructors in the testsuite 2020-02-21 00:40:52 -05:00
grid-layout.c window: Remove type argument from gtk_window_new() 2020-02-14 21:18:49 +01:00
grid.c tests: Update the GtkGrid suite 2019-04-04 22:43:07 +01:00
gtk.test.in Add a forgotten file 2017-10-18 18:52:06 +02:00
gtktreemodelrefcount.c testsuite: Strip newlines from g_warning and g_error 2016-02-28 12:23:12 -05:00
gtktreemodelrefcount.h
icontheme.c icontheme: Update the api 2020-02-18 20:32:17 -05:00
keyhash.c Replace gdk_keymap_get_for_display by gdk_display_get_keymap 2017-12-15 07:44:58 -05:00
listbox.c GtkListBox: Fix a bug in unselection 2014-10-31 22:34:09 -04:00
liststore.c
main.c Drop gtk_get_main_thread 2020-02-09 23:13:13 -05:00
maplistmodel.c Fix leaks in tests 2019-12-04 18:24:56 -05:00
meson.build testsuite: disable performance tests 2020-03-20 13:47:58 -04:00
modelrefcount.c
no-gtk-init.c testsuite: Stop using g_test_bug() 2019-05-12 17:28:18 +02:00
notify.c Small fixups 2020-02-26 08:13:45 -05:00
object.c testsuite: Remove outdated exclusions 2020-02-24 23:08:34 -05:00
objects-finalize.c Stop using gtk_main_quit 2020-02-09 23:12:32 -05:00
papersize.c
popover.c popover: Drop ::relative-to 2020-02-24 20:46:41 -05:00
propertylookuplistmodel.c window: Remove type argument from gtk_window_new() 2020-02-14 21:18:49 +01:00
rbtree-crash.c testsuite: Don't g_print from tests 2020-03-20 10:03:04 -04:00
rbtree.c testsuite/gtk: Add common_cflags to build 2020-03-07 16:28:04 +01:00
recentmanager.c testsuite/gtk: Add common_cflags to build 2020-03-07 16:28:04 +01:00
regression-tests.c window: Remove type argument from gtk_window_new() 2020-02-14 21:18:49 +01:00
revealer-size.c testsuite/gtk: Add common_cflags to build 2020-03-07 16:28:04 +01:00
scrolledwindow.c testsuite/scrolledwindow: Try non-overlay/non-auto 2017-05-10 22:29:01 +01:00
searchbar.c Add basic searchbar set_key_capture_widget tests 2018-05-19 10:18:50 +02:00
singleselection.c testsuite: Stop using g_test_bug() 2019-05-12 17:28:18 +02:00
slicelistmodel.c slicelistmodel: Fix two wrong computations 2020-02-14 03:15:22 +01:00
sortlistmodel.c Fix leaks in tests 2019-12-04 18:24:56 -05:00
sortmodel.c testsuite: Stop using g_test_bug() 2019-05-12 17:28:18 +02:00
spinbutton.c Add some spinbutton tests 2014-08-14 00:04:10 -04:00
templates.c testsuite: Stop using type-hint 2020-03-11 19:35:56 -04:00
test-focus-chain.c testsuite: Be robust against broken focus 2019-06-11 17:14:42 +00:00
textbuffer.c textview: Use paintables instead of textures, and fix the support 2020-02-06 17:47:56 +01:00
textiter.c testsuite/gtk: Add common_cflags to build 2020-03-07 16:28:04 +01:00
theme-validate.c testsuite: Add theme-validate test 2019-04-18 02:28:42 +02:00
treelistmodel.c Fix treelistmodel tests 2019-12-04 18:30:37 -05:00
treemodel.c testsuite/gtk: Add common_cflags to build 2020-03-07 16:28:04 +01:00
treemodel.h testsuite/gtk: Add common_cflags to build 2020-03-07 16:28:04 +01:00
treepath.c
treestore.c testsuite: Stop using g_test_bug() 2019-05-12 17:28:18 +02:00
treeview.c testsuite: Don't use return_if_fail() 2020-02-22 07:35:23 +01:00
typename.c builder: Improve type name mangling 2019-12-13 14:21:44 -05:00
widgetorder.c testsuite: Add test case for previous commit 2017-09-29 12:16:06 +02:00
window.c window: Remove type argument from gtk_window_new() 2020-02-14 21:18:49 +01:00