{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) -} module GI.Gtk.Objects.IconInfo ( -- * Exported types IconInfo(..) , IconInfoK , toIconInfo , noIconInfo , -- * Methods -- ** iconInfoGetAttachPoints iconInfoGetAttachPoints , -- ** iconInfoGetBaseScale iconInfoGetBaseScale , -- ** iconInfoGetBaseSize iconInfoGetBaseSize , -- ** iconInfoGetBuiltinPixbuf iconInfoGetBuiltinPixbuf , -- ** iconInfoGetDisplayName iconInfoGetDisplayName , -- ** iconInfoGetEmbeddedRect iconInfoGetEmbeddedRect , -- ** iconInfoGetFilename iconInfoGetFilename , -- ** iconInfoIsSymbolic iconInfoIsSymbolic , -- ** iconInfoLoadIcon iconInfoLoadIcon , -- ** iconInfoLoadIconAsync iconInfoLoadIconAsync , -- ** iconInfoLoadIconFinish iconInfoLoadIconFinish , -- ** iconInfoLoadSurface iconInfoLoadSurface , -- ** iconInfoLoadSymbolic iconInfoLoadSymbolic , -- ** iconInfoLoadSymbolicAsync iconInfoLoadSymbolicAsync , -- ** iconInfoLoadSymbolicFinish iconInfoLoadSymbolicFinish , -- ** iconInfoLoadSymbolicForContext iconInfoLoadSymbolicForContext , -- ** iconInfoLoadSymbolicForContextAsync iconInfoLoadSymbolicForContextAsync , -- ** iconInfoLoadSymbolicForContextFinish iconInfoLoadSymbolicForContextFinish , -- ** iconInfoLoadSymbolicForStyle iconInfoLoadSymbolicForStyle , -- ** iconInfoNewForPixbuf iconInfoNewForPixbuf , -- ** iconInfoSetRawCoordinates iconInfoSetRawCoordinates , ) 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.GObject as GObject import qualified GI.Gdk as Gdk import qualified GI.GdkPixbuf as GdkPixbuf import qualified GI.Gio as Gio import qualified GI.Cairo as Cairo newtype IconInfo = IconInfo (ForeignPtr IconInfo) foreign import ccall "gtk_icon_info_get_type" c_gtk_icon_info_get_type :: IO GType type instance ParentTypes IconInfo = IconInfoParentTypes type IconInfoParentTypes = '[GObject.Object] instance GObject IconInfo where gobjectIsInitiallyUnowned _ = False gobjectType _ = c_gtk_icon_info_get_type class GObject o => IconInfoK o instance (GObject o, IsDescendantOf IconInfo o) => IconInfoK o toIconInfo :: IconInfoK o => o -> IO IconInfo toIconInfo = unsafeCastTo IconInfo noIconInfo :: Maybe IconInfo noIconInfo = Nothing type instance AttributeList IconInfo = IconInfoAttributeList type IconInfoAttributeList = ('[ ] :: [(Symbol, *)]) type instance SignalList IconInfo = IconInfoSignalList type IconInfoSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)]) -- method IconInfo::new_for_pixbuf -- method type : Constructor -- Args : [Arg {argName = "icon_theme", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "icon_theme", argType = TInterface "Gtk" "IconTheme", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "pixbuf", argType = TInterface "GdkPixbuf" "Pixbuf", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "IconInfo" -- throws : False -- Skip return : False foreign import ccall "gtk_icon_info_new_for_pixbuf" gtk_icon_info_new_for_pixbuf :: Ptr IconTheme -> -- icon_theme : TInterface "Gtk" "IconTheme" Ptr GdkPixbuf.Pixbuf -> -- pixbuf : TInterface "GdkPixbuf" "Pixbuf" IO (Ptr IconInfo) iconInfoNewForPixbuf :: (MonadIO m, IconThemeK a, GdkPixbuf.PixbufK b) => a -> -- icon_theme b -> -- pixbuf m IconInfo iconInfoNewForPixbuf icon_theme pixbuf = liftIO $ do let icon_theme' = unsafeManagedPtrCastPtr icon_theme let pixbuf' = unsafeManagedPtrCastPtr pixbuf result <- gtk_icon_info_new_for_pixbuf icon_theme' pixbuf' checkUnexpectedReturnNULL "gtk_icon_info_new_for_pixbuf" result result' <- (wrapObject IconInfo) result touchManagedPtr icon_theme touchManagedPtr pixbuf return result' -- method IconInfo::get_attach_points -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "points", argType = TCArray False (-1) 2 (TInterface "Gdk" "Point"), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "n_points", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [Arg {argName = "n_points", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "gtk_icon_info_get_attach_points" gtk_icon_info_get_attach_points :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" Ptr (Ptr Gdk.Point) -> -- points : TCArray False (-1) 2 (TInterface "Gdk" "Point") Ptr Int32 -> -- n_points : TBasicType TInt32 IO CInt {-# DEPRECATED iconInfoGetAttachPoints ["(Since version 3.14)","Attachment points are deprecated"]#-} iconInfoGetAttachPoints :: (MonadIO m, IconInfoK a) => a -> -- _obj m (Bool,[Gdk.Point]) iconInfoGetAttachPoints _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj points <- allocMem :: IO (Ptr (Ptr Gdk.Point)) n_points <- allocMem :: IO (Ptr Int32) result <- gtk_icon_info_get_attach_points _obj' points n_points n_points' <- peek n_points let result' = (/= 0) result points' <- peek points points'' <- (unpackBlockArrayWithLength 8 n_points') points' points''' <- mapM (wrapPtr Gdk.Point) points'' freeMem points' touchManagedPtr _obj freeMem points freeMem n_points return (result', points''') -- method IconInfo::get_base_scale -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TInt32 -- throws : False -- Skip return : False foreign import ccall "gtk_icon_info_get_base_scale" gtk_icon_info_get_base_scale :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" IO Int32 iconInfoGetBaseScale :: (MonadIO m, IconInfoK a) => a -> -- _obj m Int32 iconInfoGetBaseScale _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_icon_info_get_base_scale _obj' touchManagedPtr _obj return result -- method IconInfo::get_base_size -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TInt32 -- throws : False -- Skip return : False foreign import ccall "gtk_icon_info_get_base_size" gtk_icon_info_get_base_size :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" IO Int32 iconInfoGetBaseSize :: (MonadIO m, IconInfoK a) => a -> -- _obj m Int32 iconInfoGetBaseSize _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_icon_info_get_base_size _obj' touchManagedPtr _obj return result -- method IconInfo::get_builtin_pixbuf -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "GdkPixbuf" "Pixbuf" -- throws : False -- Skip return : False foreign import ccall "gtk_icon_info_get_builtin_pixbuf" gtk_icon_info_get_builtin_pixbuf :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" IO (Ptr GdkPixbuf.Pixbuf) {-# DEPRECATED iconInfoGetBuiltinPixbuf ["(Since version 3.14)","This function is deprecated, use"," gtk_icon_theme_add_resource_path() instead of builtin icons."]#-} iconInfoGetBuiltinPixbuf :: (MonadIO m, IconInfoK a) => a -> -- _obj m GdkPixbuf.Pixbuf iconInfoGetBuiltinPixbuf _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_icon_info_get_builtin_pixbuf _obj' checkUnexpectedReturnNULL "gtk_icon_info_get_builtin_pixbuf" result result' <- (newObject GdkPixbuf.Pixbuf) result touchManagedPtr _obj return result' -- method IconInfo::get_display_name -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUTF8 -- throws : False -- Skip return : False foreign import ccall "gtk_icon_info_get_display_name" gtk_icon_info_get_display_name :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" IO CString {-# DEPRECATED iconInfoGetDisplayName ["(Since version 3.14)","Display names are deprecated"]#-} iconInfoGetDisplayName :: (MonadIO m, IconInfoK a) => a -> -- _obj m T.Text iconInfoGetDisplayName _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_icon_info_get_display_name _obj' checkUnexpectedReturnNULL "gtk_icon_info_get_display_name" result result' <- cstringToText result touchManagedPtr _obj return result' -- method IconInfo::get_embedded_rect -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rectangle", argType = TInterface "Gdk" "Rectangle", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "gtk_icon_info_get_embedded_rect" gtk_icon_info_get_embedded_rect :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" Ptr Gdk.Rectangle -> -- rectangle : TInterface "Gdk" "Rectangle" IO CInt {-# DEPRECATED iconInfoGetEmbeddedRect ["(Since version 3.14)","Embedded rectangles are deprecated"]#-} iconInfoGetEmbeddedRect :: (MonadIO m, IconInfoK a) => a -> -- _obj m (Bool,Gdk.Rectangle) iconInfoGetEmbeddedRect _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj rectangle <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle) result <- gtk_icon_info_get_embedded_rect _obj' rectangle let result' = (/= 0) result rectangle' <- (wrapBoxed Gdk.Rectangle) rectangle touchManagedPtr _obj return (result', rectangle') -- method IconInfo::get_filename -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TFileName -- throws : False -- Skip return : False foreign import ccall "gtk_icon_info_get_filename" gtk_icon_info_get_filename :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" IO CString iconInfoGetFilename :: (MonadIO m, IconInfoK a) => a -> -- _obj m [Char] iconInfoGetFilename _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_icon_info_get_filename _obj' checkUnexpectedReturnNULL "gtk_icon_info_get_filename" result result' <- cstringToString result touchManagedPtr _obj return result' -- method IconInfo::is_symbolic -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "gtk_icon_info_is_symbolic" gtk_icon_info_is_symbolic :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" IO CInt iconInfoIsSymbolic :: (MonadIO m, IconInfoK a) => a -> -- _obj m Bool iconInfoIsSymbolic _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_icon_info_is_symbolic _obj' let result' = (/= 0) result touchManagedPtr _obj return result' -- method IconInfo::load_icon -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "GdkPixbuf" "Pixbuf" -- throws : True -- Skip return : False foreign import ccall "gtk_icon_info_load_icon" gtk_icon_info_load_icon :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" Ptr (Ptr GError) -> -- error IO (Ptr GdkPixbuf.Pixbuf) iconInfoLoadIcon :: (MonadIO m, IconInfoK a) => a -> -- _obj m GdkPixbuf.Pixbuf iconInfoLoadIcon _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj onException (do result <- propagateGError $ gtk_icon_info_load_icon _obj' checkUnexpectedReturnNULL "gtk_icon_info_load_icon" result result' <- (wrapObject GdkPixbuf.Pixbuf) result touchManagedPtr _obj return result' ) (do return () ) -- method IconInfo::load_icon_async -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_icon_info_load_icon_async" gtk_icon_info_load_icon_async :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" Ptr Gio.Cancellable -> -- cancellable : TInterface "Gio" "Cancellable" FunPtr Gio.AsyncReadyCallbackC -> -- callback : TInterface "Gio" "AsyncReadyCallback" Ptr () -> -- user_data : TBasicType TVoid IO () iconInfoLoadIconAsync :: (MonadIO m, IconInfoK a, Gio.CancellableK b) => a -> -- _obj Maybe (b) -> -- cancellable Maybe (Gio.AsyncReadyCallback) -> -- callback m () iconInfoLoadIconAsync _obj cancellable callback = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj maybeCancellable <- case cancellable of Nothing -> return nullPtr Just jCancellable -> do let jCancellable' = unsafeManagedPtrCastPtr jCancellable return jCancellable' ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC)) maybeCallback <- case callback of Nothing -> return (castPtrToFunPtr nullPtr) Just jCallback -> do jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback) poke ptrcallback jCallback' return jCallback' let user_data = nullPtr gtk_icon_info_load_icon_async _obj' maybeCancellable maybeCallback user_data touchManagedPtr _obj whenJust cancellable touchManagedPtr return () -- method IconInfo::load_icon_finish -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "GdkPixbuf" "Pixbuf" -- throws : True -- Skip return : False foreign import ccall "gtk_icon_info_load_icon_finish" gtk_icon_info_load_icon_finish :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" Ptr Gio.AsyncResult -> -- res : TInterface "Gio" "AsyncResult" Ptr (Ptr GError) -> -- error IO (Ptr GdkPixbuf.Pixbuf) iconInfoLoadIconFinish :: (MonadIO m, IconInfoK a, Gio.AsyncResultK b) => a -> -- _obj b -> -- res m GdkPixbuf.Pixbuf iconInfoLoadIconFinish _obj res = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let res' = unsafeManagedPtrCastPtr res onException (do result <- propagateGError $ gtk_icon_info_load_icon_finish _obj' res' checkUnexpectedReturnNULL "gtk_icon_info_load_icon_finish" result result' <- (wrapObject GdkPixbuf.Pixbuf) result touchManagedPtr _obj touchManagedPtr res return result' ) (do return () ) -- method IconInfo::load_surface -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "for_window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "for_window", argType = TInterface "Gdk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "cairo" "Surface" -- throws : True -- Skip return : False foreign import ccall "gtk_icon_info_load_surface" gtk_icon_info_load_surface :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" Ptr Gdk.Window -> -- for_window : TInterface "Gdk" "Window" Ptr (Ptr GError) -> -- error IO (Ptr Cairo.Surface) iconInfoLoadSurface :: (MonadIO m, IconInfoK a, Gdk.WindowK b) => a -> -- _obj Maybe (b) -> -- for_window m Cairo.Surface iconInfoLoadSurface _obj for_window = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj maybeFor_window <- case for_window of Nothing -> return nullPtr Just jFor_window -> do let jFor_window' = unsafeManagedPtrCastPtr jFor_window return jFor_window' onException (do result <- propagateGError $ gtk_icon_info_load_surface _obj' maybeFor_window checkUnexpectedReturnNULL "gtk_icon_info_load_surface" result result' <- (wrapBoxed Cairo.Surface) result touchManagedPtr _obj whenJust for_window touchManagedPtr return result' ) (do return () ) -- method IconInfo::load_symbolic -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fg", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "success_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "warning_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "was_symbolic", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fg", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "success_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "warning_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "GdkPixbuf" "Pixbuf" -- throws : True -- Skip return : False foreign import ccall "gtk_icon_info_load_symbolic" gtk_icon_info_load_symbolic :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" Ptr Gdk.RGBA -> -- fg : TInterface "Gdk" "RGBA" Ptr Gdk.RGBA -> -- success_color : TInterface "Gdk" "RGBA" Ptr Gdk.RGBA -> -- warning_color : TInterface "Gdk" "RGBA" Ptr Gdk.RGBA -> -- error_color : TInterface "Gdk" "RGBA" Ptr CInt -> -- was_symbolic : TBasicType TBoolean Ptr (Ptr GError) -> -- error IO (Ptr GdkPixbuf.Pixbuf) iconInfoLoadSymbolic :: (MonadIO m, IconInfoK a) => a -> -- _obj Gdk.RGBA -> -- fg Maybe (Gdk.RGBA) -> -- success_color Maybe (Gdk.RGBA) -> -- warning_color Maybe (Gdk.RGBA) -> -- error_color m (GdkPixbuf.Pixbuf,Bool) iconInfoLoadSymbolic _obj fg success_color warning_color error_color = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let fg' = unsafeManagedPtrGetPtr fg maybeSuccess_color <- case success_color of Nothing -> return nullPtr Just jSuccess_color -> do let jSuccess_color' = unsafeManagedPtrGetPtr jSuccess_color return jSuccess_color' maybeWarning_color <- case warning_color of Nothing -> return nullPtr Just jWarning_color -> do let jWarning_color' = unsafeManagedPtrGetPtr jWarning_color return jWarning_color' maybeError_color <- case error_color of Nothing -> return nullPtr Just jError_color -> do let jError_color' = unsafeManagedPtrGetPtr jError_color return jError_color' was_symbolic <- allocMem :: IO (Ptr CInt) onException (do result <- propagateGError $ gtk_icon_info_load_symbolic _obj' fg' maybeSuccess_color maybeWarning_color maybeError_color was_symbolic checkUnexpectedReturnNULL "gtk_icon_info_load_symbolic" result result' <- (wrapObject GdkPixbuf.Pixbuf) result was_symbolic' <- peek was_symbolic let was_symbolic'' = (/= 0) was_symbolic' touchManagedPtr _obj touchManagedPtr fg whenJust success_color touchManagedPtr whenJust warning_color touchManagedPtr whenJust error_color touchManagedPtr freeMem was_symbolic return (result', was_symbolic'') ) (do freeMem was_symbolic ) -- method IconInfo::load_symbolic_async -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fg", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "success_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "warning_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 7, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fg", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "success_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "warning_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_color", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 7, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_icon_info_load_symbolic_async" gtk_icon_info_load_symbolic_async :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" Ptr Gdk.RGBA -> -- fg : TInterface "Gdk" "RGBA" Ptr Gdk.RGBA -> -- success_color : TInterface "Gdk" "RGBA" Ptr Gdk.RGBA -> -- warning_color : TInterface "Gdk" "RGBA" Ptr Gdk.RGBA -> -- error_color : TInterface "Gdk" "RGBA" Ptr Gio.Cancellable -> -- cancellable : TInterface "Gio" "Cancellable" FunPtr Gio.AsyncReadyCallbackC -> -- callback : TInterface "Gio" "AsyncReadyCallback" Ptr () -> -- user_data : TBasicType TVoid IO () iconInfoLoadSymbolicAsync :: (MonadIO m, IconInfoK a, Gio.CancellableK b) => a -> -- _obj Gdk.RGBA -> -- fg Maybe (Gdk.RGBA) -> -- success_color Maybe (Gdk.RGBA) -> -- warning_color Maybe (Gdk.RGBA) -> -- error_color Maybe (b) -> -- cancellable Maybe (Gio.AsyncReadyCallback) -> -- callback m () iconInfoLoadSymbolicAsync _obj fg success_color warning_color error_color cancellable callback = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let fg' = unsafeManagedPtrGetPtr fg maybeSuccess_color <- case success_color of Nothing -> return nullPtr Just jSuccess_color -> do let jSuccess_color' = unsafeManagedPtrGetPtr jSuccess_color return jSuccess_color' maybeWarning_color <- case warning_color of Nothing -> return nullPtr Just jWarning_color -> do let jWarning_color' = unsafeManagedPtrGetPtr jWarning_color return jWarning_color' maybeError_color <- case error_color of Nothing -> return nullPtr Just jError_color -> do let jError_color' = unsafeManagedPtrGetPtr jError_color return jError_color' maybeCancellable <- case cancellable of Nothing -> return nullPtr Just jCancellable -> do let jCancellable' = unsafeManagedPtrCastPtr jCancellable return jCancellable' ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC)) maybeCallback <- case callback of Nothing -> return (castPtrToFunPtr nullPtr) Just jCallback -> do jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback) poke ptrcallback jCallback' return jCallback' let user_data = nullPtr gtk_icon_info_load_symbolic_async _obj' fg' maybeSuccess_color maybeWarning_color maybeError_color maybeCancellable maybeCallback user_data touchManagedPtr _obj touchManagedPtr fg whenJust success_color touchManagedPtr whenJust warning_color touchManagedPtr whenJust error_color touchManagedPtr whenJust cancellable touchManagedPtr return () -- method IconInfo::load_symbolic_finish -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "was_symbolic", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "GdkPixbuf" "Pixbuf" -- throws : True -- Skip return : False foreign import ccall "gtk_icon_info_load_symbolic_finish" gtk_icon_info_load_symbolic_finish :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" Ptr Gio.AsyncResult -> -- res : TInterface "Gio" "AsyncResult" Ptr CInt -> -- was_symbolic : TBasicType TBoolean Ptr (Ptr GError) -> -- error IO (Ptr GdkPixbuf.Pixbuf) iconInfoLoadSymbolicFinish :: (MonadIO m, IconInfoK a, Gio.AsyncResultK b) => a -> -- _obj b -> -- res m (GdkPixbuf.Pixbuf,Bool) iconInfoLoadSymbolicFinish _obj res = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let res' = unsafeManagedPtrCastPtr res was_symbolic <- allocMem :: IO (Ptr CInt) onException (do result <- propagateGError $ gtk_icon_info_load_symbolic_finish _obj' res' was_symbolic checkUnexpectedReturnNULL "gtk_icon_info_load_symbolic_finish" result result' <- (wrapObject GdkPixbuf.Pixbuf) result was_symbolic' <- peek was_symbolic let was_symbolic'' = (/= 0) was_symbolic' touchManagedPtr _obj touchManagedPtr res freeMem was_symbolic return (result', was_symbolic'') ) (do freeMem was_symbolic ) -- method IconInfo::load_symbolic_for_context -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "was_symbolic", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "GdkPixbuf" "Pixbuf" -- throws : True -- Skip return : False foreign import ccall "gtk_icon_info_load_symbolic_for_context" gtk_icon_info_load_symbolic_for_context :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" Ptr StyleContext -> -- context : TInterface "Gtk" "StyleContext" Ptr CInt -> -- was_symbolic : TBasicType TBoolean Ptr (Ptr GError) -> -- error IO (Ptr GdkPixbuf.Pixbuf) iconInfoLoadSymbolicForContext :: (MonadIO m, IconInfoK a, StyleContextK b) => a -> -- _obj b -> -- context m (GdkPixbuf.Pixbuf,Bool) iconInfoLoadSymbolicForContext _obj context = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let context' = unsafeManagedPtrCastPtr context was_symbolic <- allocMem :: IO (Ptr CInt) onException (do result <- propagateGError $ gtk_icon_info_load_symbolic_for_context _obj' context' was_symbolic checkUnexpectedReturnNULL "gtk_icon_info_load_symbolic_for_context" result result' <- (wrapObject GdkPixbuf.Pixbuf) result was_symbolic' <- peek was_symbolic let was_symbolic'' = (/= 0) was_symbolic' touchManagedPtr _obj touchManagedPtr context freeMem was_symbolic return (result', was_symbolic'') ) (do freeMem was_symbolic ) -- method IconInfo::load_symbolic_for_context_async -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "context", argType = TInterface "Gtk" "StyleContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_icon_info_load_symbolic_for_context_async" gtk_icon_info_load_symbolic_for_context_async :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" Ptr StyleContext -> -- context : TInterface "Gtk" "StyleContext" Ptr Gio.Cancellable -> -- cancellable : TInterface "Gio" "Cancellable" FunPtr Gio.AsyncReadyCallbackC -> -- callback : TInterface "Gio" "AsyncReadyCallback" Ptr () -> -- user_data : TBasicType TVoid IO () iconInfoLoadSymbolicForContextAsync :: (MonadIO m, IconInfoK a, StyleContextK b, Gio.CancellableK c) => a -> -- _obj b -> -- context Maybe (c) -> -- cancellable Maybe (Gio.AsyncReadyCallback) -> -- callback m () iconInfoLoadSymbolicForContextAsync _obj context cancellable callback = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let context' = unsafeManagedPtrCastPtr context maybeCancellable <- case cancellable of Nothing -> return nullPtr Just jCancellable -> do let jCancellable' = unsafeManagedPtrCastPtr jCancellable return jCancellable' ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC)) maybeCallback <- case callback of Nothing -> return (castPtrToFunPtr nullPtr) Just jCallback -> do jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback) poke ptrcallback jCallback' return jCallback' let user_data = nullPtr gtk_icon_info_load_symbolic_for_context_async _obj' context' maybeCancellable maybeCallback user_data touchManagedPtr _obj touchManagedPtr context whenJust cancellable touchManagedPtr return () -- method IconInfo::load_symbolic_for_context_finish -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "was_symbolic", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "GdkPixbuf" "Pixbuf" -- throws : True -- Skip return : False foreign import ccall "gtk_icon_info_load_symbolic_for_context_finish" gtk_icon_info_load_symbolic_for_context_finish :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" Ptr Gio.AsyncResult -> -- res : TInterface "Gio" "AsyncResult" Ptr CInt -> -- was_symbolic : TBasicType TBoolean Ptr (Ptr GError) -> -- error IO (Ptr GdkPixbuf.Pixbuf) iconInfoLoadSymbolicForContextFinish :: (MonadIO m, IconInfoK a, Gio.AsyncResultK b) => a -> -- _obj b -> -- res m (GdkPixbuf.Pixbuf,Bool) iconInfoLoadSymbolicForContextFinish _obj res = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let res' = unsafeManagedPtrCastPtr res was_symbolic <- allocMem :: IO (Ptr CInt) onException (do result <- propagateGError $ gtk_icon_info_load_symbolic_for_context_finish _obj' res' was_symbolic checkUnexpectedReturnNULL "gtk_icon_info_load_symbolic_for_context_finish" result result' <- (wrapObject GdkPixbuf.Pixbuf) result was_symbolic' <- peek was_symbolic let was_symbolic'' = (/= 0) was_symbolic' touchManagedPtr _obj touchManagedPtr res freeMem was_symbolic return (result', was_symbolic'') ) (do freeMem was_symbolic ) -- method IconInfo::load_symbolic_for_style -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "was_symbolic", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style", argType = TInterface "Gtk" "Style", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "GdkPixbuf" "Pixbuf" -- throws : True -- Skip return : False foreign import ccall "gtk_icon_info_load_symbolic_for_style" gtk_icon_info_load_symbolic_for_style :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" Ptr Style -> -- style : TInterface "Gtk" "Style" CUInt -> -- state : TInterface "Gtk" "StateType" Ptr CInt -> -- was_symbolic : TBasicType TBoolean Ptr (Ptr GError) -> -- error IO (Ptr GdkPixbuf.Pixbuf) {-# DEPRECATED iconInfoLoadSymbolicForStyle ["(Since version 3.0)","Use gtk_icon_info_load_symbolic_for_context() instead"]#-} iconInfoLoadSymbolicForStyle :: (MonadIO m, IconInfoK a, StyleK b) => a -> -- _obj b -> -- style StateType -> -- state m (GdkPixbuf.Pixbuf,Bool) iconInfoLoadSymbolicForStyle _obj style state = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let style' = unsafeManagedPtrCastPtr style let state' = (fromIntegral . fromEnum) state was_symbolic <- allocMem :: IO (Ptr CInt) onException (do result <- propagateGError $ gtk_icon_info_load_symbolic_for_style _obj' style' state' was_symbolic checkUnexpectedReturnNULL "gtk_icon_info_load_symbolic_for_style" result result' <- (wrapObject GdkPixbuf.Pixbuf) result was_symbolic' <- peek was_symbolic let was_symbolic'' = (/= 0) was_symbolic' touchManagedPtr _obj touchManagedPtr style freeMem was_symbolic return (result', was_symbolic'') ) (do freeMem was_symbolic ) -- method IconInfo::set_raw_coordinates -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "raw_coordinates", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "IconInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "raw_coordinates", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_icon_info_set_raw_coordinates" gtk_icon_info_set_raw_coordinates :: Ptr IconInfo -> -- _obj : TInterface "Gtk" "IconInfo" CInt -> -- raw_coordinates : TBasicType TBoolean IO () {-# DEPRECATED iconInfoSetRawCoordinates ["(Since version 3.14)","Embedded rectangles and attachment points are deprecated"]#-} iconInfoSetRawCoordinates :: (MonadIO m, IconInfoK a) => a -> -- _obj Bool -> -- raw_coordinates m () iconInfoSetRawCoordinates _obj raw_coordinates = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let raw_coordinates' = (fromIntegral . fromEnum) raw_coordinates gtk_icon_info_set_raw_coordinates _obj' raw_coordinates' touchManagedPtr _obj return ()