{- | 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.ThemingEngine ( -- * Exported types ThemingEngine(..) , ThemingEngineK , toThemingEngine , noThemingEngine , -- * Methods -- ** themingEngineGetBackgroundColor themingEngineGetBackgroundColor , -- ** themingEngineGetBorder themingEngineGetBorder , -- ** themingEngineGetBorderColor themingEngineGetBorderColor , -- ** themingEngineGetColor themingEngineGetColor , -- ** themingEngineGetDirection themingEngineGetDirection , -- ** themingEngineGetFont themingEngineGetFont , -- ** themingEngineGetJunctionSides themingEngineGetJunctionSides , -- ** themingEngineGetMargin themingEngineGetMargin , -- ** themingEngineGetPadding themingEngineGetPadding , -- ** themingEngineGetPath themingEngineGetPath , -- ** themingEngineGetProperty themingEngineGetProperty , -- ** themingEngineGetScreen themingEngineGetScreen , -- ** themingEngineGetState themingEngineGetState , -- ** themingEngineGetStyleProperty themingEngineGetStyleProperty , -- ** themingEngineHasClass themingEngineHasClass , -- ** themingEngineHasRegion themingEngineHasRegion , -- ** themingEngineLoad themingEngineLoad , -- ** themingEngineLookupColor themingEngineLookupColor , -- ** themingEngineStateIsRunning themingEngineStateIsRunning , -- * Properties -- ** Name ThemingEngineNamePropertyInfo , constructThemingEngineName , getThemingEngineName , ) 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.Pango as Pango newtype ThemingEngine = ThemingEngine (ForeignPtr ThemingEngine) foreign import ccall "gtk_theming_engine_get_type" c_gtk_theming_engine_get_type :: IO GType type instance ParentTypes ThemingEngine = ThemingEngineParentTypes type ThemingEngineParentTypes = '[GObject.Object] instance GObject ThemingEngine where gobjectIsInitiallyUnowned _ = False gobjectType _ = c_gtk_theming_engine_get_type class GObject o => ThemingEngineK o instance (GObject o, IsDescendantOf ThemingEngine o) => ThemingEngineK o toThemingEngine :: ThemingEngineK o => o -> IO ThemingEngine toThemingEngine = unsafeCastTo ThemingEngine noThemingEngine :: Maybe ThemingEngine noThemingEngine = Nothing -- VVV Prop "name" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly] getThemingEngineName :: (MonadIO m, ThemingEngineK o) => o -> m T.Text getThemingEngineName obj = liftIO $ getObjectPropertyString obj "name" constructThemingEngineName :: T.Text -> IO ([Char], GValue) constructThemingEngineName val = constructObjectPropertyString "name" val data ThemingEngineNamePropertyInfo instance AttrInfo ThemingEngineNamePropertyInfo where type AttrAllowedOps ThemingEngineNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint ThemingEngineNamePropertyInfo = (~) T.Text type AttrBaseTypeConstraint ThemingEngineNamePropertyInfo = ThemingEngineK type AttrGetType ThemingEngineNamePropertyInfo = T.Text type AttrLabel ThemingEngineNamePropertyInfo = "ThemingEngine::name" attrGet _ = getThemingEngineName attrSet _ = undefined attrConstruct _ = constructThemingEngineName type instance AttributeList ThemingEngine = ThemingEngineAttributeList type ThemingEngineAttributeList = ('[ '("name", ThemingEngineNamePropertyInfo)] :: [(Symbol, *)]) type instance SignalList ThemingEngine = ThemingEngineSignalList type ThemingEngineSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)]) -- method ThemingEngine::get_background_color -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_get_background_color" gtk_theming_engine_get_background_color :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" CUInt -> -- state : TInterface "Gtk" "StateFlags" Ptr Gdk.RGBA -> -- color : TInterface "Gdk" "RGBA" IO () {-# DEPRECATED themingEngineGetBackgroundColor ["(Since version 3.14)"]#-} themingEngineGetBackgroundColor :: (MonadIO m, ThemingEngineK a) => a -> -- _obj [StateFlags] -> -- state m (Gdk.RGBA) themingEngineGetBackgroundColor _obj state = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let state' = gflagsToWord state color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA) gtk_theming_engine_get_background_color _obj' state' color color' <- (wrapBoxed Gdk.RGBA) color touchManagedPtr _obj return color' -- method ThemingEngine::get_border -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "border", argType = TInterface "Gtk" "Border", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_get_border" gtk_theming_engine_get_border :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" CUInt -> -- state : TInterface "Gtk" "StateFlags" Ptr Border -> -- border : TInterface "Gtk" "Border" IO () {-# DEPRECATED themingEngineGetBorder ["(Since version 3.14)"]#-} themingEngineGetBorder :: (MonadIO m, ThemingEngineK a) => a -> -- _obj [StateFlags] -> -- state m (Border) themingEngineGetBorder _obj state = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let state' = gflagsToWord state border <- callocBoxedBytes 8 :: IO (Ptr Border) gtk_theming_engine_get_border _obj' state' border border' <- (wrapBoxed Border) border touchManagedPtr _obj return border' -- method ThemingEngine::get_border_color -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_get_border_color" gtk_theming_engine_get_border_color :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" CUInt -> -- state : TInterface "Gtk" "StateFlags" Ptr Gdk.RGBA -> -- color : TInterface "Gdk" "RGBA" IO () {-# DEPRECATED themingEngineGetBorderColor ["(Since version 3.14)"]#-} themingEngineGetBorderColor :: (MonadIO m, ThemingEngineK a) => a -> -- _obj [StateFlags] -> -- state m (Gdk.RGBA) themingEngineGetBorderColor _obj state = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let state' = gflagsToWord state color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA) gtk_theming_engine_get_border_color _obj' state' color color' <- (wrapBoxed Gdk.RGBA) color touchManagedPtr _obj return color' -- method ThemingEngine::get_color -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_get_color" gtk_theming_engine_get_color :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" CUInt -> -- state : TInterface "Gtk" "StateFlags" Ptr Gdk.RGBA -> -- color : TInterface "Gdk" "RGBA" IO () {-# DEPRECATED themingEngineGetColor ["(Since version 3.14)"]#-} themingEngineGetColor :: (MonadIO m, ThemingEngineK a) => a -> -- _obj [StateFlags] -> -- state m (Gdk.RGBA) themingEngineGetColor _obj state = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let state' = gflagsToWord state color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA) gtk_theming_engine_get_color _obj' state' color color' <- (wrapBoxed Gdk.RGBA) color touchManagedPtr _obj return color' -- method ThemingEngine::get_direction -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "TextDirection" -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_get_direction" gtk_theming_engine_get_direction :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" IO CUInt {-# DEPRECATED themingEngineGetDirection ["(Since version 3.8)","Use gtk_theming_engine_get_state() and"," check for #GTK_STATE_FLAG_DIR_LTR and"," #GTK_STATE_FLAG_DIR_RTL instead."]#-} themingEngineGetDirection :: (MonadIO m, ThemingEngineK a) => a -> -- _obj m TextDirection themingEngineGetDirection _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_theming_engine_get_direction _obj' let result' = (toEnum . fromIntegral) result touchManagedPtr _obj return result' -- method ThemingEngine::get_font -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Pango" "FontDescription" -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_get_font" gtk_theming_engine_get_font :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" CUInt -> -- state : TInterface "Gtk" "StateFlags" IO (Ptr Pango.FontDescription) {-# DEPRECATED themingEngineGetFont ["(Since version 3.8)","Use gtk_theming_engine_get()"]#-} themingEngineGetFont :: (MonadIO m, ThemingEngineK a) => a -> -- _obj [StateFlags] -> -- state m Pango.FontDescription themingEngineGetFont _obj state = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let state' = gflagsToWord state result <- gtk_theming_engine_get_font _obj' state' checkUnexpectedReturnNULL "gtk_theming_engine_get_font" result result' <- (newBoxed Pango.FontDescription) result touchManagedPtr _obj return result' -- method ThemingEngine::get_junction_sides -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "JunctionSides" -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_get_junction_sides" gtk_theming_engine_get_junction_sides :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" IO CUInt {-# DEPRECATED themingEngineGetJunctionSides ["(Since version 3.14)"]#-} themingEngineGetJunctionSides :: (MonadIO m, ThemingEngineK a) => a -> -- _obj m [JunctionSides] themingEngineGetJunctionSides _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_theming_engine_get_junction_sides _obj' let result' = wordToGFlags result touchManagedPtr _obj return result' -- method ThemingEngine::get_margin -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "margin", argType = TInterface "Gtk" "Border", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_get_margin" gtk_theming_engine_get_margin :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" CUInt -> -- state : TInterface "Gtk" "StateFlags" Ptr Border -> -- margin : TInterface "Gtk" "Border" IO () {-# DEPRECATED themingEngineGetMargin ["(Since version 3.14)"]#-} themingEngineGetMargin :: (MonadIO m, ThemingEngineK a) => a -> -- _obj [StateFlags] -> -- state m (Border) themingEngineGetMargin _obj state = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let state' = gflagsToWord state margin <- callocBoxedBytes 8 :: IO (Ptr Border) gtk_theming_engine_get_margin _obj' state' margin margin' <- (wrapBoxed Border) margin touchManagedPtr _obj return margin' -- method ThemingEngine::get_padding -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "padding", argType = TInterface "Gtk" "Border", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_get_padding" gtk_theming_engine_get_padding :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" CUInt -> -- state : TInterface "Gtk" "StateFlags" Ptr Border -> -- padding : TInterface "Gtk" "Border" IO () {-# DEPRECATED themingEngineGetPadding ["(Since version 3.14)"]#-} themingEngineGetPadding :: (MonadIO m, ThemingEngineK a) => a -> -- _obj [StateFlags] -> -- state m (Border) themingEngineGetPadding _obj state = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let state' = gflagsToWord state padding <- callocBoxedBytes 8 :: IO (Ptr Border) gtk_theming_engine_get_padding _obj' state' padding padding' <- (wrapBoxed Border) padding touchManagedPtr _obj return padding' -- method ThemingEngine::get_path -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "WidgetPath" -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_get_path" gtk_theming_engine_get_path :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" IO (Ptr WidgetPath) {-# DEPRECATED themingEngineGetPath ["(Since version 3.14)"]#-} themingEngineGetPath :: (MonadIO m, ThemingEngineK a) => a -> -- _obj m WidgetPath themingEngineGetPath _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_theming_engine_get_path _obj' checkUnexpectedReturnNULL "gtk_theming_engine_get_path" result result' <- (newBoxed WidgetPath) result touchManagedPtr _obj return result' -- method ThemingEngine::get_property -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TInterface "Gtk" "StateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_get_property" gtk_theming_engine_get_property :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" CString -> -- property : TBasicType TUTF8 CUInt -> -- state : TInterface "Gtk" "StateFlags" Ptr GValue -> -- value : TInterface "GObject" "Value" IO () {-# DEPRECATED themingEngineGetProperty ["(Since version 3.14)"]#-} themingEngineGetProperty :: (MonadIO m, ThemingEngineK a) => a -> -- _obj T.Text -> -- property [StateFlags] -> -- state m (GValue) themingEngineGetProperty _obj property state = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj property' <- textToCString property let state' = gflagsToWord state value <- callocBoxedBytes 24 :: IO (Ptr GValue) gtk_theming_engine_get_property _obj' property' state' value value' <- (wrapBoxed GValue) value touchManagedPtr _obj freeMem property' return value' -- method ThemingEngine::get_screen -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gdk" "Screen" -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_get_screen" gtk_theming_engine_get_screen :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" IO (Ptr Gdk.Screen) {-# DEPRECATED themingEngineGetScreen ["(Since version 3.14)"]#-} themingEngineGetScreen :: (MonadIO m, ThemingEngineK a) => a -> -- _obj m Gdk.Screen themingEngineGetScreen _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_theming_engine_get_screen _obj' checkUnexpectedReturnNULL "gtk_theming_engine_get_screen" result result' <- (newObject Gdk.Screen) result touchManagedPtr _obj return result' -- method ThemingEngine::get_state -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "StateFlags" -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_get_state" gtk_theming_engine_get_state :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" IO CUInt {-# DEPRECATED themingEngineGetState ["(Since version 3.14)"]#-} themingEngineGetState :: (MonadIO m, ThemingEngineK a) => a -> -- _obj m [StateFlags] themingEngineGetState _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_theming_engine_get_state _obj' let result' = wordToGFlags result touchManagedPtr _obj return result' -- method ThemingEngine::get_style_property -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TInterface "GObject" "Value", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_get_style_property" gtk_theming_engine_get_style_property :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" CString -> -- property_name : TBasicType TUTF8 Ptr GValue -> -- value : TInterface "GObject" "Value" IO () {-# DEPRECATED themingEngineGetStyleProperty ["(Since version 3.14)"]#-} themingEngineGetStyleProperty :: (MonadIO m, ThemingEngineK a) => a -> -- _obj T.Text -> -- property_name m (GValue) themingEngineGetStyleProperty _obj property_name = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj property_name' <- textToCString property_name value <- callocBoxedBytes 24 :: IO (Ptr GValue) gtk_theming_engine_get_style_property _obj' property_name' value value' <- (wrapBoxed GValue) value touchManagedPtr _obj freeMem property_name' return value' -- method ThemingEngine::has_class -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style_class", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style_class", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_has_class" gtk_theming_engine_has_class :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" CString -> -- style_class : TBasicType TUTF8 IO CInt {-# DEPRECATED themingEngineHasClass ["(Since version 3.14)"]#-} themingEngineHasClass :: (MonadIO m, ThemingEngineK a) => a -> -- _obj T.Text -> -- style_class m Bool themingEngineHasClass _obj style_class = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj style_class' <- textToCString style_class result <- gtk_theming_engine_has_class _obj' style_class' let result' = (/= 0) result touchManagedPtr _obj freeMem style_class' return result' -- method ThemingEngine::has_region -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style_region", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gtk" "RegionFlags", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "style_region", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_has_region" gtk_theming_engine_has_region :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" CString -> -- style_region : TBasicType TUTF8 Ptr CUInt -> -- flags : TInterface "Gtk" "RegionFlags" IO CInt {-# DEPRECATED themingEngineHasRegion ["(Since version 3.14)"]#-} themingEngineHasRegion :: (MonadIO m, ThemingEngineK a) => a -> -- _obj T.Text -> -- style_region m (Bool,[RegionFlags]) themingEngineHasRegion _obj style_region = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj style_region' <- textToCString style_region flags <- allocMem :: IO (Ptr CUInt) result <- gtk_theming_engine_has_region _obj' style_region' flags let result' = (/= 0) result flags' <- peek flags let flags'' = wordToGFlags flags' touchManagedPtr _obj freeMem style_region' freeMem flags return (result', flags'') -- method ThemingEngine::lookup_color -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_lookup_color" gtk_theming_engine_lookup_color :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" CString -> -- color_name : TBasicType TUTF8 Ptr Gdk.RGBA -> -- color : TInterface "Gdk" "RGBA" IO CInt {-# DEPRECATED themingEngineLookupColor ["(Since version 3.14)"]#-} themingEngineLookupColor :: (MonadIO m, ThemingEngineK a) => a -> -- _obj T.Text -> -- color_name m (Bool,Gdk.RGBA) themingEngineLookupColor _obj color_name = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj color_name' <- textToCString color_name color <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA) result <- gtk_theming_engine_lookup_color _obj' color_name' color let result' = (/= 0) result color' <- (wrapBoxed Gdk.RGBA) color touchManagedPtr _obj freeMem color_name' return (result', color') -- method ThemingEngine::state_is_running -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", 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 = "progress", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ThemingEngine", 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 : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_state_is_running" gtk_theming_engine_state_is_running :: Ptr ThemingEngine -> -- _obj : TInterface "Gtk" "ThemingEngine" CUInt -> -- state : TInterface "Gtk" "StateType" Ptr CDouble -> -- progress : TBasicType TDouble IO CInt {-# DEPRECATED themingEngineStateIsRunning ["(Since version 3.6)","Always returns %FALSE"]#-} themingEngineStateIsRunning :: (MonadIO m, ThemingEngineK a) => a -> -- _obj StateType -> -- state m (Bool,Double) themingEngineStateIsRunning _obj state = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let state' = (fromIntegral . fromEnum) state progress <- allocMem :: IO (Ptr CDouble) result <- gtk_theming_engine_state_is_running _obj' state' progress let result' = (/= 0) result progress' <- peek progress let progress'' = realToFrac progress' touchManagedPtr _obj freeMem progress return (result', progress'') -- method ThemingEngine::load -- method type : MemberFunction -- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "ThemingEngine" -- throws : False -- Skip return : False foreign import ccall "gtk_theming_engine_load" gtk_theming_engine_load :: CString -> -- name : TBasicType TUTF8 IO (Ptr ThemingEngine) {-# DEPRECATED themingEngineLoad ["(Since version 3.14)"]#-} themingEngineLoad :: (MonadIO m) => T.Text -> -- name m ThemingEngine themingEngineLoad name = liftIO $ do name' <- textToCString name result <- gtk_theming_engine_load name' checkUnexpectedReturnNULL "gtk_theming_engine_load" result result' <- (newObject ThemingEngine) result freeMem name' return result'