Commit Graph

6 Commits

Author SHA1 Message Date
Emmanuele Bassi
816383e9ef Handle static inline GtkOrdering function
The introspection scanner does not handle `static inline` functions:
they are not in the shared library, so cannot be dlsym() out of it; and
the `static` keyword tells g-ir-scanner to skip the function declaration
entirely.

We can trick the scanner into thinking the gtk_ordering_from_cmpfunc()
symbol is a real, public one, by declaring and defining a regular
function under the `__GI_SCANNER__` guard; the symbol does not appear
when actually building GTK, or any code using GTK, so we don't risk
collisions.
2021-03-11 16:37:38 +00:00
Matthias Clasen
5bdcd66117 sorter: Convert docs 2021-03-11 16:37:35 +00:00
Benjamin Otte
e34c7e6796 sorter: Introduce GtkSortKeys
GtkSortKeys is an immutable struct that can be used to manage "sort
keys" for items.

Sort keys are memory that is created specifically for sorting. Because
sorting involves lots of comparisons, it's a good idea to prepare the
data relevant for sorting in advance and sort on that data.

In measurements with a PropertyExpression on a string sorter, it's about
??? faster
2020-07-22 14:30:49 +02:00
Matthias Clasen
72d66dfcdd docs: Revise sorter docs a bit 2020-07-16 21:45:11 -04:00
Benjamin Otte
d1a068e5b1 sorter: Remove a return_if_fail()
It's too expsensive.
2020-07-09 22:29:36 +02:00
Matthias Clasen
b2b847f365 Add GtkSorter
This is a helper object for sorting, similar to GtkFilter.
2020-05-30 17:48:44 -04:00