Safe Haskell | None |
---|---|
Language | Haskell2010 |
This is a simple static image widget, and a polling image widget that updates its contents by calling a callback at a set interval.
Synopsis
- iconImageWidgetNew :: FilePath -> IO Widget
- pollingIconImageWidgetNew :: FilePath -> Double -> IO FilePath -> IO Widget
Documentation
iconImageWidgetNew :: FilePath -> IO Widget Source #
Create a new widget that displays a static image
iconImageWidgetNew path
returns a widget with icon at path
.
pollingIconImageWidgetNew Source #
:: FilePath | Initial file path of the icon |
-> Double | Update interval (in seconds) |
-> IO FilePath | Command to run to get the input filepath |
-> IO Widget |
Create a new widget that updates itself at regular intervals. The function
pollingIconImageWidgetNew path interval cmd
returns a widget with initial icon at path
. The widget
forks a thread to update its contents every interval
seconds.
The command should return a FilePath of a valid icon.
If the IO action throws an exception, it will be swallowed and the label will not update until the update interval expires.