query
On this page

mkDictionaryEntry

lib.gvariant.mkDictionaryEntry

Docs pulled from | This Revision | 35 minutes ago


Returns the GVariant dictionary entry from the given key and value.

Inputs

name

The key of the entry

value

The value of the entry

Type

mkDictionaryEntry :: String -> Any -> gvariant

Examples

lib.gvariant.mkDictionaryEntry usage example

# A dictionary describing an Epiphany’s search provider
[
  (lib.gvariant.mkDictionaryEntry "url" (lib.gvariant.mkVariant "https://duckduckgo.com/?q=%s&t=epiphany"))
  (lib.gvariant.mkDictionaryEntry "bang" (lib.gvariant.mkVariant "!d"))
  (lib.gvariant.mkDictionaryEntry "name" (lib.gvariant.mkVariant "DuckDuckGo"))
]