Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module contains two things:
- Extension functions to libraries like GTK. These functions wrap up some generic GTK functionality. They are not Termonad-specific.
- Wrappers around functionality that is only specific to certain versions of libraries like GTK or VTE.
For instance, terminalSetEnableSixelIfExists
is
a wrapper around terminalSetEnableSixel
. Sixel support is only availble in
vte >= 0.63, so if a user tries to compile Termonad with a version of vte
less than 0.63, this function won't do anything.
Synopsis
- objFromBuildUnsafe :: GObject o => Builder -> Text -> (ManagedPtr o -> o) -> IO o
- appNew :: (HasCallStack, MonadIO m, MonadFail m) => Maybe Text -> [ApplicationFlags] -> m Application
- widgetEq :: (MonadIO m, IsWidget a, IsWidget b) => a -> b -> m Bool
- terminalSetEnableSixelIfExists :: (HasCallStack, MonadIO m, IsTerminal t) => t -> Bool -> m ()
- imgToPixbuf :: ByteString -> IO Pixbuf
Documentation
objFromBuildUnsafe :: GObject o => Builder -> Text -> (ManagedPtr o -> o) -> IO o Source #
:: (HasCallStack, MonadIO m, MonadFail m) | |
=> Maybe Text | The application name. Must have a period in it if specified. If passed
as |
-> [ApplicationFlags] | |
-> m Application |
Unsafely creates a new Application
. This calls fail
if it cannot
create the Application
for some reason.
This can fail for different reasons, one of which being that application name does not have a period in it.
widgetEq :: (MonadIO m, IsWidget a, IsWidget b) => a -> b -> m Bool Source #
Tests to see if two GTK widgets point to the same thing. This should only happen if they are actually the same thing.
terminalSetEnableSixelIfExists Source #
:: (HasCallStack, MonadIO m, IsTerminal t) | |
=> t | a Terminal |
-> Bool | whether to enable SIXEL images |
-> m () |
Wrapper around terminalSetEnableSixel
. The terminalSetEnableSixel
function
is only available starting with vte-0.63. This function has no effect when
compiling against previous versions of vte.
imgToPixbuf :: ByteString -> IO Pixbuf Source #
Load an image in a ByteString
into a Pixbuf
.
Supports all image types that pixbufNewFromStream
supports.