taffybar-4.0.2: A desktop bar similar to xmobar, but with more GUI

Safe Haskell | Safe-Inferred
Language | Haskell2010

System.Taffybar.Widget.Generic.AutoSizeImage

Synopsis

- imageLog :: Priority -> String -> IO ()
- borderFunctions :: [StyleContext -> [StateFlags] -> IO Border]
- data BorderInfo = BorderInfo {
  - borderTop :: Int16
  - borderBottom :: Int16
  - borderLeft :: Int16
  - borderRight :: Int16
  }
- borderInfoZero :: BorderInfo
- borderWidth :: BorderInfo -> Int16
- borderHeight :: BorderInfo -> Int16
- toBorderInfo :: MonadIO m => Border -> m BorderInfo
- addBorderInfo :: BorderInfo -> BorderInfo -> BorderInfo
- getBorderInfo :: (MonadIO m, IsWidget a) => a -> m BorderInfo
- getContentAllocation :: (MonadIO m, IsWidget a) => a -> BorderInfo -> m Rectangle
- autoSizeImage :: MonadIO m => Image -> (Int32 -> IO (Maybe Pixbuf)) -> Orientation -> m (IO ())
- autoSizeImageNew :: MonadIO m => (Int32 -> IO Pixbuf) -> Orientation -> m Image
- imageMenuItemNew :: MonadIO m => Text -> (Int32 -> IO (Maybe Pixbuf)) -> m MenuItem

# Documentation

imageLog :: Priority -> String -> IO () Source #

borderFunctions :: [StyleContext -> [StateFlags] -> IO Border] Source #

data BorderInfo Source #

Constructors

BorderInfo |

Fields

- borderTop :: Int16
- borderBottom :: Int16
- borderLeft :: Int16
- borderRight :: Int16

#### Instances

Instances details

Show BorderInfo Source # |
Instance details Defined in System.Taffybar.Widget.Generic.AutoSizeImage Methods showsPrec :: Int -> BorderInfo -> ShowS Source # show :: BorderInfo -> String Source # showList :: [BorderInfo] -> ShowS Source #
Eq BorderInfo Source # |
Instance details Defined in System.Taffybar.Widget.Generic.AutoSizeImage Methods (==) :: BorderInfo -> BorderInfo -> Bool Source # (/=) :: BorderInfo -> BorderInfo -> Bool Source #

borderInfoZero :: BorderInfo Source #

borderWidth :: BorderInfo -> Int16 Source #

borderHeight :: BorderInfo -> Int16 Source #

toBorderInfo :: MonadIO m => Border -> m BorderInfo Source #

addBorderInfo :: BorderInfo -> BorderInfo -> BorderInfo Source #

getBorderInfo :: (MonadIO m, IsWidget a) => a -> m BorderInfo Source #

Get the total size of the border (the sum of its assigned margin, border and padding values) that will be drawn for a widget as a BorderInfo record.

getContentAllocation :: (MonadIO m, IsWidget a) => a -> BorderInfo -> m Rectangle Source #

Get the actual allocation for a Gtk.Widget, accounting for the size of its CSS assined margin, border and padding values.

autoSizeImage :: MonadIO m => Image -> (Int32 -> IO (Maybe Pixbuf)) -> Orientation -> m (IO ()) Source #

Automatically update the Gdk.Pixbuf of a Gtk.Image using the provided action whenever the Gtk.Image is allocated. Returns an action that forces a refresh of the image through the provided action.

autoSizeImageNew :: MonadIO m => (Int32 -> IO Pixbuf) -> Orientation -> m Image Source #

Make a new Gtk.Image and call "autoSizeImage" on it. Automatically scale the Gdk.Pixbuf returned from the provided getter to the appropriate size using "scalePixbufToSize".

imageMenuItemNew :: MonadIO m => Text -> (Int32 -> IO (Maybe Pixbuf)) -> m MenuItem Source #

Make a new Gtk.MenuItem that has both a label and an icon.