win_notify v0.0.4 WinNotify.CSharp
Create and manage Windows notification icons.
Summary
Functions
Releases all resources used by the notify icon
Current number of existing icons
Creates a notification icon associated with reference
List of all existing icons hash codes
Sets the current icon. Requires an image with extension .ico
Sets the ToolTip text displayed when the mouse pointer rests on a notification area icon
Displays a balloon tip with the specified title, text, and icon in the taskbar for the specified time period. Notify icon must be visible and be set with an icon image
Toggles a value indicating whether the icon is visible in the notification area of the taskbar
Destroys all existing icons
Types
Functions
Specs
destroy_icon(reference) :: :ok
Releases all resources used by the notify icon.
Example
iex> ref = make_ref
iex> WinNotify.init_notify_icon ref
iex> WinNotify.destroy_icon ref
iex> :ok
Specs
icon_count :: integer
Current number of existing icons
Example
iex> WinNotify.init_notify_icon
iex> WinNotify.init_notify_icon
iex> WinNotify.icon_count
iex> 2
Specs
init_notify_icon(reference) :: :ok
Creates a notification icon associated with reference.
Example
iex> ref = make_ref
iex> WinNotify.init_notify_icon ref
iex> :ok
Specs
list_icons :: [reference]
List of all existing icons hash codes
Example
iex> ref1 = make_ref
iex> ref2 = make_ref
iex> WinNotify.init_notify_icon ref1
iex> WinNotify.init_notify_icon ref2
iex> [i1, i2] = WinNotify.list_icons
Specs
set_icon(reference, String.t) :: :ok
Sets the current icon. Requires an image with extension .ico
.
Example
iex> ref = make_ref
iex> WinNotify.init_notify_icon ref
iex> WinNotify.set_icon ref, "path/to/icon.ico"
iex> :ok
Specs
set_text(reference, String.t) :: :ok
Sets the ToolTip text displayed when the mouse pointer rests on a notification area icon.
Example
iex> ref = make_ref
iex> WinNotify.init_notify_icon ref
iex> WinNotify.set_text ref, "text"
iex> :ok
Displays a balloon tip with the specified title, text, and icon in the taskbar for the specified time period. Notify icon must be visible and be set with an icon image.
Icon types
:error
:info
:none
:warning
Example
iex> ref = make_ref
iex> WinNotify.init_notify_icon ref
iex> WinNotify.set_icon ref, ~S"path/to/icon.ico"
iex> WinNotify.show_balloon_tip ref, "title", "text", :info
iex> :ok
Specs
toggle_visibility(reference) :: :ok
Toggles a value indicating whether the icon is visible in the notification area of the taskbar.
Example
iex> ref = make_ref
iex> WinNotify.init_notify_icon ref
iex> WinNotify.toggle_visibility ref
iex> :ok