Safe Haskell | Safe-Inferred |
---|---|
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.
Documentation
iconImageWidgetNew :: MonadIO m => FilePath -> m Widget Source #
Create a new widget that displays a static image
iconImageWidgetNew path
returns a widget with icon at path
.
iconImageWidgetNewFromName :: MonadIO m => Text -> m Widget Source #
Create a new widget that displays a static image
iconWidgetNewFromName name
returns a widget with the icon named name
. Icon
names are sourced from the current GTK theme.
pollingIconImageWidgetNew Source #
:: MonadIO m | |
=> FilePath | Initial file path of the icon |
-> Double | Update interval (in seconds) |
-> IO FilePath | Command to run to get the input filepath |
-> m 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.
pollingIconImageWidgetNewFromName Source #
:: MonadIO m | |
=> Text | Icon Name |
-> Double | Update interval (in seconds) |
-> IO Text | Command to run update the icon name |
-> m Widget |
Create a new widget that updates itself at regular intervals. The function
pollingIconImageWidgetNewFromName name interval cmd
returns a widget with initial icon whose name is name
. The widget
forks a thread to update its contents every interval
seconds.
The command should return the name 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.