View Source ExSni (ExSNI v0.2.9)

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Returns {:ok, sni_pid} if there is a StatusNotifierWatcher available on the Session Bus. Returns {:error, reason} otherwise.

Returns true if there is a StatusNotifierWatcher available on the Session Bus.

Returns true if there is a StatusNotifierWatcher available on the Session Bus.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Specs

close(GenServer.server()) :: :ok

Specs

get_icon(GenServer.server()) :: {:ok, nil | ExSni.Icon.t()} | {:error, any()}

Specs

get_menu(
  GenServer.server()
  | {:router, ExSni.Router.t()}
  | {:server, GenServer.server() | atom() | tuple()}
) :: {:ok, nil | ExSni.Menu.t()} | {:error, any()}

Specs

get_supported(GenServer.server()) ::
  {:ok, bus_pid :: GenServer.server()} | {:error, reason :: binary()}

Returns {:ok, sni_pid} if there is a StatusNotifierWatcher available on the Session Bus. Returns {:error, reason} otherwise.

  • sni_pid - The pid of the ExSni Supervisor

Specs

is_supported?() :: boolean()

Returns true if there is a StatusNotifierWatcher available on the Session Bus.

Specs

is_supported?(GenServer.server()) :: boolean()

Returns true if there is a StatusNotifierWatcher available on the Session Bus.

  • sni_pid - The pid of the ExSni Supervisor

Specs

register_icon(pid()) :: :ok | {:error, any()}
Link to this function

set_icon(sni_pid, icon, opts \\ [])

View Source

Specs

set_icon(pid(), ExSni.Icon.t() | nil, keyword()) ::
  {:ok, ExSni.Icon.t() | nil} | {:error, any()}

Specs

set_menu(GenServer.server(), ExSni.Menu.t() | nil) ::
  {:ok, ExSni.Menu.t() | nil} | {:error, any()}
Link to this function

start_link(init_opts \\ [], start_opts \\ [])

View Source
Link to this function

update_icon(sni_pid, icon)

View Source

Specs

update_icon(sni_pid :: GenServer.server(), icon :: nil | ExSni.Icon.t()) ::
  any()
Link to this function

update_menu(sni_pid, atom, menu)

View Source

Specs

update_menu(
  sni_pid :: GenServer.server(),
  parentId :: nil | integer(),
  menu :: nil | ExSni.Menu.t()
) :: any()