View Source ExSni.Menu.Item (ExSNI v0.2.9)
Link to this section Summary
Functions
WARNING: Always use unique IDs across the entire tree. If you set the same ID for a node and any of its descendants, most menu hosts (i.e. libdbusmenu) will recurse indefinitely when attempting to build the list of IDs to request the layout for; which will most likely result in a system-wide crash/hang.
Link to this section Types
Specs
Specs
id() :: non_neg_integer()
Specs
item_type() :: :separator | :root | :standard | :checkbox | :radio | :menu
Specs
layout() :: {:dbus_variant, {:struct, list()}, dbus_menu_item()}
Specs
Specs
toggle_state() :: nil | :on | :off
Specs
toggle_type() :: nil | :checkmark | :radio
Link to this section Functions
Specs
Specs
Specs
Specs
Specs
Specs
Specs
separator() :: t()
Specs
set_callbacks(t(), callbacks :: [ExSni.Menu.callback()]) :: t()
Specs
Specs
Specs
WARNING: Always use unique IDs across the entire tree. If you set the same ID for a node and any of its descendants, most menu hosts (i.e. libdbusmenu) will recurse indefinitely when attempting to build the list of IDs to request the layout for; which will most likely result in a system-wide crash/hang.
To store custom ID (e.g. "id" attribute), use uid property and set_uid/2