Package: glib

Function glib:variant-dict-lookup-value

Lambda List

glib:variant-dict-lookup-value (dict key &optional vtype)

Arguments

dict -- a g:variant-dict instance
key -- a string for the key to look up in the dictionary
vtype -- an optional g:variant-type instance or the string representation for the expected type, the default value is nil

Return Value

The g:variant instance for the value of the dictionary key.

Details

Looks up a value in a g:variant-dict instance. If key is not found in the dictionary, nil is returned. The vtype argument specifies what type of value is expected. If the value associated with key has a different type then nil is returned.

If the key is found and the value has the correct type, it is returned. If vtype was specified then any non-nil return value will have this type.
 

See also

2026-11-21