Score:1

What are the available key types in glib schemas?

kr flag

In a glib schema.xml, keys should have a name and a type, like this:

<key name="keyname" type="b">
    <default>true</default>
    <summary>...</summary>
</key>

Looking at existing schemas in /usr/share/glib-2.0/schemas, I found booleans (type="b"), integer ("i"), strings ("s"), and doubles ("d").

You may also create pairs, like this:

<key name="keyname" type="(ii)">
    <default>(42,24)</default>
    <summary>...</summary>
</key>

What are the other possibilities give by glib schemas key types? I couldn't find any documentation about these.

hr flag
The [GIO.Settings](https://docs.gtk.org/gio/class.Settings.html) documentation says they use *"serialized GVariant form"* and that it *"allows any GVariantType for keys"* - so that means anything in [GVariant Type Strings](https://docs.gtk.org/glib/struct.VariantType.html#gvariant-type-strings) ?
sayanel avatar
kr flag
That's it yes !
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.