module GI.Gtk.Objects.Image
(
Image(..) ,
ImageK ,
toImage ,
noImage ,
imageClear ,
imageGetAnimation ,
imageGetGicon ,
imageGetIconName ,
imageGetIconSet ,
imageGetPixbuf ,
imageGetPixelSize ,
imageGetStock ,
imageGetStorageType ,
imageNew ,
imageNewFromAnimation ,
imageNewFromFile ,
imageNewFromGicon ,
imageNewFromIconName ,
imageNewFromIconSet ,
imageNewFromPixbuf ,
imageNewFromResource ,
imageNewFromStock ,
imageNewFromSurface ,
imageSetFromAnimation ,
imageSetFromFile ,
imageSetFromGicon ,
imageSetFromIconName ,
imageSetFromIconSet ,
imageSetFromPixbuf ,
imageSetFromResource ,
imageSetFromStock ,
imageSetFromSurface ,
imageSetPixelSize ,
ImageFilePropertyInfo ,
constructImageFile ,
getImageFile ,
setImageFile ,
ImageGiconPropertyInfo ,
constructImageGicon ,
getImageGicon ,
setImageGicon ,
ImageIconNamePropertyInfo ,
constructImageIconName ,
getImageIconName ,
setImageIconName ,
ImageIconSetPropertyInfo ,
constructImageIconSet ,
getImageIconSet ,
setImageIconSet ,
ImageIconSizePropertyInfo ,
constructImageIconSize ,
getImageIconSize ,
setImageIconSize ,
ImagePixbufPropertyInfo ,
constructImagePixbuf ,
getImagePixbuf ,
setImagePixbuf ,
ImagePixbufAnimationPropertyInfo ,
constructImagePixbufAnimation ,
getImagePixbufAnimation ,
setImagePixbufAnimation ,
ImagePixelSizePropertyInfo ,
constructImagePixelSize ,
getImagePixelSize ,
setImagePixelSize ,
ImageResourcePropertyInfo ,
constructImageResource ,
getImageResource ,
setImageResource ,
ImageStockPropertyInfo ,
constructImageStock ,
getImageStock ,
setImageStock ,
ImageStorageTypePropertyInfo ,
getImageStorageType ,
ImageSurfacePropertyInfo ,
constructImageSurface ,
getImageSurface ,
setImageSurface ,
ImageUseFallbackPropertyInfo ,
constructImageUseFallback ,
getImageUseFallback ,
setImageUseFallback ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Gtk.Types
import GI.Gtk.Callbacks
import qualified GI.Atk as Atk
import qualified GI.GObject as GObject
import qualified GI.GdkPixbuf as GdkPixbuf
import qualified GI.Gio as Gio
import qualified GI.Cairo as Cairo
newtype Image = Image (ForeignPtr Image)
foreign import ccall "gtk_image_get_type"
c_gtk_image_get_type :: IO GType
type instance ParentTypes Image = ImageParentTypes
type ImageParentTypes = '[Misc, Widget, GObject.Object, Atk.ImplementorIface, Buildable]
instance GObject Image where
gobjectIsInitiallyUnowned _ = True
gobjectType _ = c_gtk_image_get_type
class GObject o => ImageK o
instance (GObject o, IsDescendantOf Image o) => ImageK o
toImage :: ImageK o => o -> IO Image
toImage = unsafeCastTo Image
noImage :: Maybe Image
noImage = Nothing
getImageFile :: (MonadIO m, ImageK o) => o -> m T.Text
getImageFile obj = liftIO $ getObjectPropertyString obj "file"
setImageFile :: (MonadIO m, ImageK o) => o -> T.Text -> m ()
setImageFile obj val = liftIO $ setObjectPropertyString obj "file" val
constructImageFile :: T.Text -> IO ([Char], GValue)
constructImageFile val = constructObjectPropertyString "file" val
data ImageFilePropertyInfo
instance AttrInfo ImageFilePropertyInfo where
type AttrAllowedOps ImageFilePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ImageFilePropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ImageFilePropertyInfo = ImageK
type AttrGetType ImageFilePropertyInfo = T.Text
type AttrLabel ImageFilePropertyInfo = "Image::file"
attrGet _ = getImageFile
attrSet _ = setImageFile
attrConstruct _ = constructImageFile
getImageGicon :: (MonadIO m, ImageK o) => o -> m Gio.Icon
getImageGicon obj = liftIO $ getObjectPropertyObject obj "gicon" Gio.Icon
setImageGicon :: (MonadIO m, ImageK o, Gio.IconK a) => o -> a -> m ()
setImageGicon obj val = liftIO $ setObjectPropertyObject obj "gicon" val
constructImageGicon :: (Gio.IconK a) => a -> IO ([Char], GValue)
constructImageGicon val = constructObjectPropertyObject "gicon" val
data ImageGiconPropertyInfo
instance AttrInfo ImageGiconPropertyInfo where
type AttrAllowedOps ImageGiconPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ImageGiconPropertyInfo = Gio.IconK
type AttrBaseTypeConstraint ImageGiconPropertyInfo = ImageK
type AttrGetType ImageGiconPropertyInfo = Gio.Icon
type AttrLabel ImageGiconPropertyInfo = "Image::gicon"
attrGet _ = getImageGicon
attrSet _ = setImageGicon
attrConstruct _ = constructImageGicon
getImageIconName :: (MonadIO m, ImageK o) => o -> m T.Text
getImageIconName obj = liftIO $ getObjectPropertyString obj "icon-name"
setImageIconName :: (MonadIO m, ImageK o) => o -> T.Text -> m ()
setImageIconName obj val = liftIO $ setObjectPropertyString obj "icon-name" val
constructImageIconName :: T.Text -> IO ([Char], GValue)
constructImageIconName val = constructObjectPropertyString "icon-name" val
data ImageIconNamePropertyInfo
instance AttrInfo ImageIconNamePropertyInfo where
type AttrAllowedOps ImageIconNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ImageIconNamePropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ImageIconNamePropertyInfo = ImageK
type AttrGetType ImageIconNamePropertyInfo = T.Text
type AttrLabel ImageIconNamePropertyInfo = "Image::icon-name"
attrGet _ = getImageIconName
attrSet _ = setImageIconName
attrConstruct _ = constructImageIconName
getImageIconSet :: (MonadIO m, ImageK o) => o -> m IconSet
getImageIconSet obj = liftIO $ getObjectPropertyBoxed obj "icon-set" IconSet
setImageIconSet :: (MonadIO m, ImageK o) => o -> IconSet -> m ()
setImageIconSet obj val = liftIO $ setObjectPropertyBoxed obj "icon-set" val
constructImageIconSet :: IconSet -> IO ([Char], GValue)
constructImageIconSet val = constructObjectPropertyBoxed "icon-set" val
data ImageIconSetPropertyInfo
instance AttrInfo ImageIconSetPropertyInfo where
type AttrAllowedOps ImageIconSetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ImageIconSetPropertyInfo = (~) IconSet
type AttrBaseTypeConstraint ImageIconSetPropertyInfo = ImageK
type AttrGetType ImageIconSetPropertyInfo = IconSet
type AttrLabel ImageIconSetPropertyInfo = "Image::icon-set"
attrGet _ = getImageIconSet
attrSet _ = setImageIconSet
attrConstruct _ = constructImageIconSet
getImageIconSize :: (MonadIO m, ImageK o) => o -> m Int32
getImageIconSize obj = liftIO $ getObjectPropertyCInt obj "icon-size"
setImageIconSize :: (MonadIO m, ImageK o) => o -> Int32 -> m ()
setImageIconSize obj val = liftIO $ setObjectPropertyCInt obj "icon-size" val
constructImageIconSize :: Int32 -> IO ([Char], GValue)
constructImageIconSize val = constructObjectPropertyCInt "icon-size" val
data ImageIconSizePropertyInfo
instance AttrInfo ImageIconSizePropertyInfo where
type AttrAllowedOps ImageIconSizePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ImageIconSizePropertyInfo = (~) Int32
type AttrBaseTypeConstraint ImageIconSizePropertyInfo = ImageK
type AttrGetType ImageIconSizePropertyInfo = Int32
type AttrLabel ImageIconSizePropertyInfo = "Image::icon-size"
attrGet _ = getImageIconSize
attrSet _ = setImageIconSize
attrConstruct _ = constructImageIconSize
getImagePixbuf :: (MonadIO m, ImageK o) => o -> m GdkPixbuf.Pixbuf
getImagePixbuf obj = liftIO $ getObjectPropertyObject obj "pixbuf" GdkPixbuf.Pixbuf
setImagePixbuf :: (MonadIO m, ImageK o, GdkPixbuf.PixbufK a) => o -> a -> m ()
setImagePixbuf obj val = liftIO $ setObjectPropertyObject obj "pixbuf" val
constructImagePixbuf :: (GdkPixbuf.PixbufK a) => a -> IO ([Char], GValue)
constructImagePixbuf val = constructObjectPropertyObject "pixbuf" val
data ImagePixbufPropertyInfo
instance AttrInfo ImagePixbufPropertyInfo where
type AttrAllowedOps ImagePixbufPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ImagePixbufPropertyInfo = GdkPixbuf.PixbufK
type AttrBaseTypeConstraint ImagePixbufPropertyInfo = ImageK
type AttrGetType ImagePixbufPropertyInfo = GdkPixbuf.Pixbuf
type AttrLabel ImagePixbufPropertyInfo = "Image::pixbuf"
attrGet _ = getImagePixbuf
attrSet _ = setImagePixbuf
attrConstruct _ = constructImagePixbuf
getImagePixbufAnimation :: (MonadIO m, ImageK o) => o -> m GdkPixbuf.PixbufAnimation
getImagePixbufAnimation obj = liftIO $ getObjectPropertyObject obj "pixbuf-animation" GdkPixbuf.PixbufAnimation
setImagePixbufAnimation :: (MonadIO m, ImageK o, GdkPixbuf.PixbufAnimationK a) => o -> a -> m ()
setImagePixbufAnimation obj val = liftIO $ setObjectPropertyObject obj "pixbuf-animation" val
constructImagePixbufAnimation :: (GdkPixbuf.PixbufAnimationK a) => a -> IO ([Char], GValue)
constructImagePixbufAnimation val = constructObjectPropertyObject "pixbuf-animation" val
data ImagePixbufAnimationPropertyInfo
instance AttrInfo ImagePixbufAnimationPropertyInfo where
type AttrAllowedOps ImagePixbufAnimationPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ImagePixbufAnimationPropertyInfo = GdkPixbuf.PixbufAnimationK
type AttrBaseTypeConstraint ImagePixbufAnimationPropertyInfo = ImageK
type AttrGetType ImagePixbufAnimationPropertyInfo = GdkPixbuf.PixbufAnimation
type AttrLabel ImagePixbufAnimationPropertyInfo = "Image::pixbuf-animation"
attrGet _ = getImagePixbufAnimation
attrSet _ = setImagePixbufAnimation
attrConstruct _ = constructImagePixbufAnimation
getImagePixelSize :: (MonadIO m, ImageK o) => o -> m Int32
getImagePixelSize obj = liftIO $ getObjectPropertyCInt obj "pixel-size"
setImagePixelSize :: (MonadIO m, ImageK o) => o -> Int32 -> m ()
setImagePixelSize obj val = liftIO $ setObjectPropertyCInt obj "pixel-size" val
constructImagePixelSize :: Int32 -> IO ([Char], GValue)
constructImagePixelSize val = constructObjectPropertyCInt "pixel-size" val
data ImagePixelSizePropertyInfo
instance AttrInfo ImagePixelSizePropertyInfo where
type AttrAllowedOps ImagePixelSizePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ImagePixelSizePropertyInfo = (~) Int32
type AttrBaseTypeConstraint ImagePixelSizePropertyInfo = ImageK
type AttrGetType ImagePixelSizePropertyInfo = Int32
type AttrLabel ImagePixelSizePropertyInfo = "Image::pixel-size"
attrGet _ = getImagePixelSize
attrSet _ = setImagePixelSize
attrConstruct _ = constructImagePixelSize
getImageResource :: (MonadIO m, ImageK o) => o -> m T.Text
getImageResource obj = liftIO $ getObjectPropertyString obj "resource"
setImageResource :: (MonadIO m, ImageK o) => o -> T.Text -> m ()
setImageResource obj val = liftIO $ setObjectPropertyString obj "resource" val
constructImageResource :: T.Text -> IO ([Char], GValue)
constructImageResource val = constructObjectPropertyString "resource" val
data ImageResourcePropertyInfo
instance AttrInfo ImageResourcePropertyInfo where
type AttrAllowedOps ImageResourcePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ImageResourcePropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ImageResourcePropertyInfo = ImageK
type AttrGetType ImageResourcePropertyInfo = T.Text
type AttrLabel ImageResourcePropertyInfo = "Image::resource"
attrGet _ = getImageResource
attrSet _ = setImageResource
attrConstruct _ = constructImageResource
getImageStock :: (MonadIO m, ImageK o) => o -> m T.Text
getImageStock obj = liftIO $ getObjectPropertyString obj "stock"
setImageStock :: (MonadIO m, ImageK o) => o -> T.Text -> m ()
setImageStock obj val = liftIO $ setObjectPropertyString obj "stock" val
constructImageStock :: T.Text -> IO ([Char], GValue)
constructImageStock val = constructObjectPropertyString "stock" val
data ImageStockPropertyInfo
instance AttrInfo ImageStockPropertyInfo where
type AttrAllowedOps ImageStockPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ImageStockPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ImageStockPropertyInfo = ImageK
type AttrGetType ImageStockPropertyInfo = T.Text
type AttrLabel ImageStockPropertyInfo = "Image::stock"
attrGet _ = getImageStock
attrSet _ = setImageStock
attrConstruct _ = constructImageStock
getImageStorageType :: (MonadIO m, ImageK o) => o -> m ImageType
getImageStorageType obj = liftIO $ getObjectPropertyEnum obj "storage-type"
data ImageStorageTypePropertyInfo
instance AttrInfo ImageStorageTypePropertyInfo where
type AttrAllowedOps ImageStorageTypePropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint ImageStorageTypePropertyInfo = (~) ()
type AttrBaseTypeConstraint ImageStorageTypePropertyInfo = ImageK
type AttrGetType ImageStorageTypePropertyInfo = ImageType
type AttrLabel ImageStorageTypePropertyInfo = "Image::storage-type"
attrGet _ = getImageStorageType
attrSet _ = undefined
attrConstruct _ = undefined
getImageSurface :: (MonadIO m, ImageK o) => o -> m Cairo.Surface
getImageSurface obj = liftIO $ getObjectPropertyBoxed obj "surface" Cairo.Surface
setImageSurface :: (MonadIO m, ImageK o) => o -> Cairo.Surface -> m ()
setImageSurface obj val = liftIO $ setObjectPropertyBoxed obj "surface" val
constructImageSurface :: Cairo.Surface -> IO ([Char], GValue)
constructImageSurface val = constructObjectPropertyBoxed "surface" val
data ImageSurfacePropertyInfo
instance AttrInfo ImageSurfacePropertyInfo where
type AttrAllowedOps ImageSurfacePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ImageSurfacePropertyInfo = (~) Cairo.Surface
type AttrBaseTypeConstraint ImageSurfacePropertyInfo = ImageK
type AttrGetType ImageSurfacePropertyInfo = Cairo.Surface
type AttrLabel ImageSurfacePropertyInfo = "Image::surface"
attrGet _ = getImageSurface
attrSet _ = setImageSurface
attrConstruct _ = constructImageSurface
getImageUseFallback :: (MonadIO m, ImageK o) => o -> m Bool
getImageUseFallback obj = liftIO $ getObjectPropertyBool obj "use-fallback"
setImageUseFallback :: (MonadIO m, ImageK o) => o -> Bool -> m ()
setImageUseFallback obj val = liftIO $ setObjectPropertyBool obj "use-fallback" val
constructImageUseFallback :: Bool -> IO ([Char], GValue)
constructImageUseFallback val = constructObjectPropertyBool "use-fallback" val
data ImageUseFallbackPropertyInfo
instance AttrInfo ImageUseFallbackPropertyInfo where
type AttrAllowedOps ImageUseFallbackPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ImageUseFallbackPropertyInfo = (~) Bool
type AttrBaseTypeConstraint ImageUseFallbackPropertyInfo = ImageK
type AttrGetType ImageUseFallbackPropertyInfo = Bool
type AttrLabel ImageUseFallbackPropertyInfo = "Image::use-fallback"
attrGet _ = getImageUseFallback
attrSet _ = setImageUseFallback
attrConstruct _ = constructImageUseFallback
type instance AttributeList Image = ImageAttributeList
type ImageAttributeList = ('[ '("app-paintable", WidgetAppPaintablePropertyInfo), '("can-default", WidgetCanDefaultPropertyInfo), '("can-focus", WidgetCanFocusPropertyInfo), '("composite-child", WidgetCompositeChildPropertyInfo), '("double-buffered", WidgetDoubleBufferedPropertyInfo), '("events", WidgetEventsPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("file", ImageFilePropertyInfo), '("gicon", ImageGiconPropertyInfo), '("halign", WidgetHalignPropertyInfo), '("has-default", WidgetHasDefaultPropertyInfo), '("has-focus", WidgetHasFocusPropertyInfo), '("has-tooltip", WidgetHasTooltipPropertyInfo), '("height-request", WidgetHeightRequestPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpand-set", WidgetHexpandSetPropertyInfo), '("icon-name", ImageIconNamePropertyInfo), '("icon-set", ImageIconSetPropertyInfo), '("icon-size", ImageIconSizePropertyInfo), '("is-focus", WidgetIsFocusPropertyInfo), '("margin", WidgetMarginPropertyInfo), '("margin-bottom", WidgetMarginBottomPropertyInfo), '("margin-end", WidgetMarginEndPropertyInfo), '("margin-left", WidgetMarginLeftPropertyInfo), '("margin-right", WidgetMarginRightPropertyInfo), '("margin-start", WidgetMarginStartPropertyInfo), '("margin-top", WidgetMarginTopPropertyInfo), '("name", WidgetNamePropertyInfo), '("no-show-all", WidgetNoShowAllPropertyInfo), '("opacity", WidgetOpacityPropertyInfo), '("parent", WidgetParentPropertyInfo), '("pixbuf", ImagePixbufPropertyInfo), '("pixbuf-animation", ImagePixbufAnimationPropertyInfo), '("pixel-size", ImagePixelSizePropertyInfo), '("receives-default", WidgetReceivesDefaultPropertyInfo), '("resource", ImageResourcePropertyInfo), '("scale-factor", WidgetScaleFactorPropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("stock", ImageStockPropertyInfo), '("storage-type", ImageStorageTypePropertyInfo), '("style", WidgetStylePropertyInfo), '("surface", ImageSurfacePropertyInfo), '("tooltip-markup", WidgetTooltipMarkupPropertyInfo), '("tooltip-text", WidgetTooltipTextPropertyInfo), '("use-fallback", ImageUseFallbackPropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpand-set", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("width-request", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo), '("xalign", MiscXalignPropertyInfo), '("xpad", MiscXpadPropertyInfo), '("yalign", MiscYalignPropertyInfo), '("ypad", MiscYpadPropertyInfo)] :: [(Symbol, *)])
type instance SignalList Image = ImageSignalList
type ImageSignalList = ('[ '("accel-closures-changed", WidgetAccelClosuresChangedSignalInfo), '("button-press-event", WidgetButtonPressEventSignalInfo), '("button-release-event", WidgetButtonReleaseEventSignalInfo), '("can-activate-accel", WidgetCanActivateAccelSignalInfo), '("child-notify", WidgetChildNotifySignalInfo), '("composited-changed", WidgetCompositedChangedSignalInfo), '("configure-event", WidgetConfigureEventSignalInfo), '("damage-event", WidgetDamageEventSignalInfo), '("delete-event", WidgetDeleteEventSignalInfo), '("destroy", WidgetDestroySignalInfo), '("destroy-event", WidgetDestroyEventSignalInfo), '("direction-changed", WidgetDirectionChangedSignalInfo), '("drag-begin", WidgetDragBeginSignalInfo), '("drag-data-delete", WidgetDragDataDeleteSignalInfo), '("drag-data-get", WidgetDragDataGetSignalInfo), '("drag-data-received", WidgetDragDataReceivedSignalInfo), '("drag-drop", WidgetDragDropSignalInfo), '("drag-end", WidgetDragEndSignalInfo), '("drag-failed", WidgetDragFailedSignalInfo), '("drag-leave", WidgetDragLeaveSignalInfo), '("drag-motion", WidgetDragMotionSignalInfo), '("draw", WidgetDrawSignalInfo), '("enter-notify-event", WidgetEnterNotifyEventSignalInfo), '("event", WidgetEventSignalInfo), '("event-after", WidgetEventAfterSignalInfo), '("focus", WidgetFocusSignalInfo), '("focus-in-event", WidgetFocusInEventSignalInfo), '("focus-out-event", WidgetFocusOutEventSignalInfo), '("grab-broken-event", WidgetGrabBrokenEventSignalInfo), '("grab-focus", WidgetGrabFocusSignalInfo), '("grab-notify", WidgetGrabNotifySignalInfo), '("hide", WidgetHideSignalInfo), '("hierarchy-changed", WidgetHierarchyChangedSignalInfo), '("key-press-event", WidgetKeyPressEventSignalInfo), '("key-release-event", WidgetKeyReleaseEventSignalInfo), '("keynav-failed", WidgetKeynavFailedSignalInfo), '("leave-notify-event", WidgetLeaveNotifyEventSignalInfo), '("map", WidgetMapSignalInfo), '("map-event", WidgetMapEventSignalInfo), '("mnemonic-activate", WidgetMnemonicActivateSignalInfo), '("motion-notify-event", WidgetMotionNotifyEventSignalInfo), '("move-focus", WidgetMoveFocusSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("parent-set", WidgetParentSetSignalInfo), '("popup-menu", WidgetPopupMenuSignalInfo), '("property-notify-event", WidgetPropertyNotifyEventSignalInfo), '("proximity-in-event", WidgetProximityInEventSignalInfo), '("proximity-out-event", WidgetProximityOutEventSignalInfo), '("query-tooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("screen-changed", WidgetScreenChangedSignalInfo), '("scroll-event", WidgetScrollEventSignalInfo), '("selection-clear-event", WidgetSelectionClearEventSignalInfo), '("selection-get", WidgetSelectionGetSignalInfo), '("selection-notify-event", WidgetSelectionNotifyEventSignalInfo), '("selection-received", WidgetSelectionReceivedSignalInfo), '("selection-request-event", WidgetSelectionRequestEventSignalInfo), '("show", WidgetShowSignalInfo), '("show-help", WidgetShowHelpSignalInfo), '("size-allocate", WidgetSizeAllocateSignalInfo), '("state-changed", WidgetStateChangedSignalInfo), '("state-flags-changed", WidgetStateFlagsChangedSignalInfo), '("style-set", WidgetStyleSetSignalInfo), '("style-updated", WidgetStyleUpdatedSignalInfo), '("touch-event", WidgetTouchEventSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unmap-event", WidgetUnmapEventSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo), '("visibility-notify-event", WidgetVisibilityNotifyEventSignalInfo), '("window-state-event", WidgetWindowStateEventSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "gtk_image_new" gtk_image_new ::
IO (Ptr Image)
imageNew ::
(MonadIO m) =>
m Image
imageNew = liftIO $ do
result <- gtk_image_new
checkUnexpectedReturnNULL "gtk_image_new" result
result' <- (newObject Image) result
return result'
foreign import ccall "gtk_image_new_from_animation" gtk_image_new_from_animation ::
Ptr GdkPixbuf.PixbufAnimation ->
IO (Ptr Image)
imageNewFromAnimation ::
(MonadIO m, GdkPixbuf.PixbufAnimationK a) =>
a ->
m Image
imageNewFromAnimation animation = liftIO $ do
let animation' = unsafeManagedPtrCastPtr animation
result <- gtk_image_new_from_animation animation'
checkUnexpectedReturnNULL "gtk_image_new_from_animation" result
result' <- (newObject Image) result
touchManagedPtr animation
return result'
foreign import ccall "gtk_image_new_from_file" gtk_image_new_from_file ::
CString ->
IO (Ptr Image)
imageNewFromFile ::
(MonadIO m) =>
[Char] ->
m Image
imageNewFromFile filename = liftIO $ do
filename' <- stringToCString filename
result <- gtk_image_new_from_file filename'
checkUnexpectedReturnNULL "gtk_image_new_from_file" result
result' <- (newObject Image) result
freeMem filename'
return result'
foreign import ccall "gtk_image_new_from_gicon" gtk_image_new_from_gicon ::
Ptr Gio.Icon ->
Int32 ->
IO (Ptr Image)
imageNewFromGicon ::
(MonadIO m, Gio.IconK a) =>
a ->
Int32 ->
m Image
imageNewFromGicon icon size = liftIO $ do
let icon' = unsafeManagedPtrCastPtr icon
result <- gtk_image_new_from_gicon icon' size
checkUnexpectedReturnNULL "gtk_image_new_from_gicon" result
result' <- (newObject Image) result
touchManagedPtr icon
return result'
foreign import ccall "gtk_image_new_from_icon_name" gtk_image_new_from_icon_name ::
CString ->
Int32 ->
IO (Ptr Image)
imageNewFromIconName ::
(MonadIO m) =>
T.Text ->
Int32 ->
m Image
imageNewFromIconName icon_name size = liftIO $ do
icon_name' <- textToCString icon_name
result <- gtk_image_new_from_icon_name icon_name' size
checkUnexpectedReturnNULL "gtk_image_new_from_icon_name" result
result' <- (newObject Image) result
freeMem icon_name'
return result'
foreign import ccall "gtk_image_new_from_icon_set" gtk_image_new_from_icon_set ::
Ptr IconSet ->
Int32 ->
IO (Ptr Image)
imageNewFromIconSet ::
(MonadIO m) =>
IconSet ->
Int32 ->
m Image
imageNewFromIconSet icon_set size = liftIO $ do
let icon_set' = unsafeManagedPtrGetPtr icon_set
result <- gtk_image_new_from_icon_set icon_set' size
checkUnexpectedReturnNULL "gtk_image_new_from_icon_set" result
result' <- (newObject Image) result
touchManagedPtr icon_set
return result'
foreign import ccall "gtk_image_new_from_pixbuf" gtk_image_new_from_pixbuf ::
Ptr GdkPixbuf.Pixbuf ->
IO (Ptr Image)
imageNewFromPixbuf ::
(MonadIO m, GdkPixbuf.PixbufK a) =>
Maybe (a) ->
m Image
imageNewFromPixbuf pixbuf = liftIO $ do
maybePixbuf <- case pixbuf of
Nothing -> return nullPtr
Just jPixbuf -> do
let jPixbuf' = unsafeManagedPtrCastPtr jPixbuf
return jPixbuf'
result <- gtk_image_new_from_pixbuf maybePixbuf
checkUnexpectedReturnNULL "gtk_image_new_from_pixbuf" result
result' <- (newObject Image) result
whenJust pixbuf touchManagedPtr
return result'
foreign import ccall "gtk_image_new_from_resource" gtk_image_new_from_resource ::
CString ->
IO (Ptr Image)
imageNewFromResource ::
(MonadIO m) =>
T.Text ->
m Image
imageNewFromResource resource_path = liftIO $ do
resource_path' <- textToCString resource_path
result <- gtk_image_new_from_resource resource_path'
checkUnexpectedReturnNULL "gtk_image_new_from_resource" result
result' <- (newObject Image) result
freeMem resource_path'
return result'
foreign import ccall "gtk_image_new_from_stock" gtk_image_new_from_stock ::
CString ->
Int32 ->
IO (Ptr Image)
imageNewFromStock ::
(MonadIO m) =>
T.Text ->
Int32 ->
m Image
imageNewFromStock stock_id size = liftIO $ do
stock_id' <- textToCString stock_id
result <- gtk_image_new_from_stock stock_id' size
checkUnexpectedReturnNULL "gtk_image_new_from_stock" result
result' <- (newObject Image) result
freeMem stock_id'
return result'
foreign import ccall "gtk_image_new_from_surface" gtk_image_new_from_surface ::
Ptr Cairo.Surface ->
IO (Ptr Image)
imageNewFromSurface ::
(MonadIO m) =>
Maybe (Cairo.Surface) ->
m Image
imageNewFromSurface surface = liftIO $ do
maybeSurface <- case surface of
Nothing -> return nullPtr
Just jSurface -> do
let jSurface' = unsafeManagedPtrGetPtr jSurface
return jSurface'
result <- gtk_image_new_from_surface maybeSurface
checkUnexpectedReturnNULL "gtk_image_new_from_surface" result
result' <- (newObject Image) result
whenJust surface touchManagedPtr
return result'
foreign import ccall "gtk_image_clear" gtk_image_clear ::
Ptr Image ->
IO ()
imageClear ::
(MonadIO m, ImageK a) =>
a ->
m ()
imageClear _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
gtk_image_clear _obj'
touchManagedPtr _obj
return ()
foreign import ccall "gtk_image_get_animation" gtk_image_get_animation ::
Ptr Image ->
IO (Ptr GdkPixbuf.PixbufAnimation)
imageGetAnimation ::
(MonadIO m, ImageK a) =>
a ->
m GdkPixbuf.PixbufAnimation
imageGetAnimation _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_image_get_animation _obj'
checkUnexpectedReturnNULL "gtk_image_get_animation" result
result' <- (newObject GdkPixbuf.PixbufAnimation) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_image_get_gicon" gtk_image_get_gicon ::
Ptr Image ->
Ptr (Ptr Gio.Icon) ->
Ptr Int32 ->
IO ()
imageGetGicon ::
(MonadIO m, ImageK a) =>
a ->
m (Gio.Icon,Int32)
imageGetGicon _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
gicon <- allocMem :: IO (Ptr (Ptr Gio.Icon))
size <- allocMem :: IO (Ptr Int32)
gtk_image_get_gicon _obj' gicon size
gicon' <- peek gicon
gicon'' <- (newObject Gio.Icon) gicon'
size' <- peek size
touchManagedPtr _obj
freeMem gicon
freeMem size
return (gicon'', size')
foreign import ccall "gtk_image_get_icon_name" gtk_image_get_icon_name ::
Ptr Image ->
Ptr CString ->
Ptr Int32 ->
IO ()
imageGetIconName ::
(MonadIO m, ImageK a) =>
a ->
m (T.Text,Int32)
imageGetIconName _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
icon_name <- allocMem :: IO (Ptr CString)
size <- allocMem :: IO (Ptr Int32)
gtk_image_get_icon_name _obj' icon_name size
icon_name' <- peek icon_name
icon_name'' <- cstringToText icon_name'
size' <- peek size
touchManagedPtr _obj
freeMem icon_name
freeMem size
return (icon_name'', size')
foreign import ccall "gtk_image_get_icon_set" gtk_image_get_icon_set ::
Ptr Image ->
Ptr (Ptr IconSet) ->
Ptr Int32 ->
IO ()
imageGetIconSet ::
(MonadIO m, ImageK a) =>
a ->
m (IconSet,Int32)
imageGetIconSet _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
icon_set <- allocMem :: IO (Ptr (Ptr IconSet))
size <- allocMem :: IO (Ptr Int32)
gtk_image_get_icon_set _obj' icon_set size
icon_set' <- peek icon_set
icon_set'' <- (newBoxed IconSet) icon_set'
size' <- peek size
touchManagedPtr _obj
freeMem icon_set
freeMem size
return (icon_set'', size')
foreign import ccall "gtk_image_get_pixbuf" gtk_image_get_pixbuf ::
Ptr Image ->
IO (Ptr GdkPixbuf.Pixbuf)
imageGetPixbuf ::
(MonadIO m, ImageK a) =>
a ->
m GdkPixbuf.Pixbuf
imageGetPixbuf _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_image_get_pixbuf _obj'
checkUnexpectedReturnNULL "gtk_image_get_pixbuf" result
result' <- (newObject GdkPixbuf.Pixbuf) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_image_get_pixel_size" gtk_image_get_pixel_size ::
Ptr Image ->
IO Int32
imageGetPixelSize ::
(MonadIO m, ImageK a) =>
a ->
m Int32
imageGetPixelSize _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_image_get_pixel_size _obj'
touchManagedPtr _obj
return result
foreign import ccall "gtk_image_get_stock" gtk_image_get_stock ::
Ptr Image ->
Ptr CString ->
Ptr Int32 ->
IO ()
imageGetStock ::
(MonadIO m, ImageK a) =>
a ->
m (T.Text,Int32)
imageGetStock _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
stock_id <- allocMem :: IO (Ptr CString)
size <- allocMem :: IO (Ptr Int32)
gtk_image_get_stock _obj' stock_id size
stock_id' <- peek stock_id
stock_id'' <- cstringToText stock_id'
size' <- peek size
touchManagedPtr _obj
freeMem stock_id
freeMem size
return (stock_id'', size')
foreign import ccall "gtk_image_get_storage_type" gtk_image_get_storage_type ::
Ptr Image ->
IO CUInt
imageGetStorageType ::
(MonadIO m, ImageK a) =>
a ->
m ImageType
imageGetStorageType _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_image_get_storage_type _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_image_set_from_animation" gtk_image_set_from_animation ::
Ptr Image ->
Ptr GdkPixbuf.PixbufAnimation ->
IO ()
imageSetFromAnimation ::
(MonadIO m, ImageK a, GdkPixbuf.PixbufAnimationK b) =>
a ->
b ->
m ()
imageSetFromAnimation _obj animation = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let animation' = unsafeManagedPtrCastPtr animation
gtk_image_set_from_animation _obj' animation'
touchManagedPtr _obj
touchManagedPtr animation
return ()
foreign import ccall "gtk_image_set_from_file" gtk_image_set_from_file ::
Ptr Image ->
CString ->
IO ()
imageSetFromFile ::
(MonadIO m, ImageK a) =>
a ->
Maybe ([Char]) ->
m ()
imageSetFromFile _obj filename = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
maybeFilename <- case filename of
Nothing -> return nullPtr
Just jFilename -> do
jFilename' <- stringToCString jFilename
return jFilename'
gtk_image_set_from_file _obj' maybeFilename
touchManagedPtr _obj
freeMem maybeFilename
return ()
foreign import ccall "gtk_image_set_from_gicon" gtk_image_set_from_gicon ::
Ptr Image ->
Ptr Gio.Icon ->
Int32 ->
IO ()
imageSetFromGicon ::
(MonadIO m, ImageK a, Gio.IconK b) =>
a ->
b ->
Int32 ->
m ()
imageSetFromGicon _obj icon size = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let icon' = unsafeManagedPtrCastPtr icon
gtk_image_set_from_gicon _obj' icon' size
touchManagedPtr _obj
touchManagedPtr icon
return ()
foreign import ccall "gtk_image_set_from_icon_name" gtk_image_set_from_icon_name ::
Ptr Image ->
CString ->
Int32 ->
IO ()
imageSetFromIconName ::
(MonadIO m, ImageK a) =>
a ->
T.Text ->
Int32 ->
m ()
imageSetFromIconName _obj icon_name size = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
icon_name' <- textToCString icon_name
gtk_image_set_from_icon_name _obj' icon_name' size
touchManagedPtr _obj
freeMem icon_name'
return ()
foreign import ccall "gtk_image_set_from_icon_set" gtk_image_set_from_icon_set ::
Ptr Image ->
Ptr IconSet ->
Int32 ->
IO ()
imageSetFromIconSet ::
(MonadIO m, ImageK a) =>
a ->
IconSet ->
Int32 ->
m ()
imageSetFromIconSet _obj icon_set size = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let icon_set' = unsafeManagedPtrGetPtr icon_set
gtk_image_set_from_icon_set _obj' icon_set' size
touchManagedPtr _obj
touchManagedPtr icon_set
return ()
foreign import ccall "gtk_image_set_from_pixbuf" gtk_image_set_from_pixbuf ::
Ptr Image ->
Ptr GdkPixbuf.Pixbuf ->
IO ()
imageSetFromPixbuf ::
(MonadIO m, ImageK a, GdkPixbuf.PixbufK b) =>
a ->
Maybe (b) ->
m ()
imageSetFromPixbuf _obj pixbuf = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
maybePixbuf <- case pixbuf of
Nothing -> return nullPtr
Just jPixbuf -> do
let jPixbuf' = unsafeManagedPtrCastPtr jPixbuf
return jPixbuf'
gtk_image_set_from_pixbuf _obj' maybePixbuf
touchManagedPtr _obj
whenJust pixbuf touchManagedPtr
return ()
foreign import ccall "gtk_image_set_from_resource" gtk_image_set_from_resource ::
Ptr Image ->
CString ->
IO ()
imageSetFromResource ::
(MonadIO m, ImageK a) =>
a ->
Maybe (T.Text) ->
m ()
imageSetFromResource _obj resource_path = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
maybeResource_path <- case resource_path of
Nothing -> return nullPtr
Just jResource_path -> do
jResource_path' <- textToCString jResource_path
return jResource_path'
gtk_image_set_from_resource _obj' maybeResource_path
touchManagedPtr _obj
freeMem maybeResource_path
return ()
foreign import ccall "gtk_image_set_from_stock" gtk_image_set_from_stock ::
Ptr Image ->
CString ->
Int32 ->
IO ()
imageSetFromStock ::
(MonadIO m, ImageK a) =>
a ->
T.Text ->
Int32 ->
m ()
imageSetFromStock _obj stock_id size = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
stock_id' <- textToCString stock_id
gtk_image_set_from_stock _obj' stock_id' size
touchManagedPtr _obj
freeMem stock_id'
return ()
foreign import ccall "gtk_image_set_from_surface" gtk_image_set_from_surface ::
Ptr Image ->
Ptr Cairo.Surface ->
IO ()
imageSetFromSurface ::
(MonadIO m, ImageK a) =>
a ->
Cairo.Surface ->
m ()
imageSetFromSurface _obj surface = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let surface' = unsafeManagedPtrGetPtr surface
gtk_image_set_from_surface _obj' surface'
touchManagedPtr _obj
touchManagedPtr surface
return ()
foreign import ccall "gtk_image_set_pixel_size" gtk_image_set_pixel_size ::
Ptr Image ->
Int32 ->
IO ()
imageSetPixelSize ::
(MonadIO m, ImageK a) =>
a ->
Int32 ->
m ()
imageSetPixelSize _obj pixel_size = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
gtk_image_set_pixel_size _obj' pixel_size
touchManagedPtr _obj
return ()