Basics
Guides
API Reference
Basics
Guides
API Reference
[16:7] extends: object
Sorts items by comparing strings. To obtain the strings to compare, this sorter evaluates a [class@Gtk.Expression]. It does the comparison in a linguistically correct way using the current locale by normalizing Unicode strings and possibly case-folding them before performing the comparison.
StringSorter (expression = null)
Creates a new string sorter that compares items using the given
Unless an expression is set on it, this sorter will always compare items as invalid.expression is The expression to evaluate.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asSorter ()
Wraps this handle as
Sorter.
A Sorter object.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setCollation (string Value)
The collation method to use for sorting. The
GTK_COLLATION_NONEvalue is useful when the expression already returns collation keys, or strings that need to be compared byte-by-byte. The default value,GTK_COLLATION_UNICODE, compares strings according to the Unicode collation algorithm.
Value is the new property value.None.setExpression (object Value)
The expression to evaluate on item to get a string to compare with.
Value is the new property value.None.setIgnorecase (bool Value)
If sorting is case sensitive.
Value is the new property value.None.get_collation ()
Gets which collation method the sorter uses.
get_expression ()
Gets the expression that is evaluated to obtain strings from items.
get_ignore_case ()
Gets whether the sorter ignores case differences.
set_collation (string collation)
Sets the collation method to use for sorting.
collation is the collation method.None.set_expression (object expression)
Sets the expression that is evaluated to obtain strings from items. The expression must have the type %G_TYPE_STRING.
expression is a GtkExpression.None.set_ignore_case (bool ignore_case)
Sets whether the sorter will ignore case differences.
ignore_case is %TRUE to ignore case differences.None.[235:14] static extends: object
Generated metadata helpers for StringSorter class surfaces.
properties ()
Returns property metadata for
StringSorter.
A list.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.