{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) Defines a part of a CSS document. Because sections are nested into one another, you can use gtk_css_section_get_parent() to get the containing region. -} module GI.Gtk.Structs.CssSection ( -- * Exported types CssSection(..) , noCssSection , -- * Methods -- ** cssSectionGetEndLine cssSectionGetEndLine , -- ** cssSectionGetEndPosition cssSectionGetEndPosition , -- ** cssSectionGetFile cssSectionGetFile , -- ** cssSectionGetParent cssSectionGetParent , -- ** cssSectionGetSectionType cssSectionGetSectionType , -- ** cssSectionGetStartLine cssSectionGetStartLine , -- ** cssSectionGetStartPosition cssSectionGetStartPosition , -- ** cssSectionRef cssSectionRef , -- ** cssSectionUnref cssSectionUnref , ) 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.Gio as Gio newtype CssSection = CssSection (ForeignPtr CssSection) foreign import ccall "gtk_css_section_get_type" c_gtk_css_section_get_type :: IO GType instance BoxedObject CssSection where boxedType _ = c_gtk_css_section_get_type noCssSection :: Maybe CssSection noCssSection = Nothing -- method CssSection::get_end_line -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUInt32 -- throws : False -- Skip return : False foreign import ccall "gtk_css_section_get_end_line" gtk_css_section_get_end_line :: Ptr CssSection -> -- _obj : TInterface "Gtk" "CssSection" IO Word32 cssSectionGetEndLine :: (MonadIO m) => CssSection -> -- _obj m Word32 cssSectionGetEndLine _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- gtk_css_section_get_end_line _obj' touchManagedPtr _obj return result -- method CssSection::get_end_position -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUInt32 -- throws : False -- Skip return : False foreign import ccall "gtk_css_section_get_end_position" gtk_css_section_get_end_position :: Ptr CssSection -> -- _obj : TInterface "Gtk" "CssSection" IO Word32 cssSectionGetEndPosition :: (MonadIO m) => CssSection -> -- _obj m Word32 cssSectionGetEndPosition _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- gtk_css_section_get_end_position _obj' touchManagedPtr _obj return result -- method CssSection::get_file -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gio" "File" -- throws : False -- Skip return : False foreign import ccall "gtk_css_section_get_file" gtk_css_section_get_file :: Ptr CssSection -> -- _obj : TInterface "Gtk" "CssSection" IO (Ptr Gio.File) cssSectionGetFile :: (MonadIO m) => CssSection -> -- _obj m Gio.File cssSectionGetFile _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- gtk_css_section_get_file _obj' checkUnexpectedReturnNULL "gtk_css_section_get_file" result result' <- (newObject Gio.File) result touchManagedPtr _obj return result' -- method CssSection::get_parent -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "CssSection" -- throws : False -- Skip return : False foreign import ccall "gtk_css_section_get_parent" gtk_css_section_get_parent :: Ptr CssSection -> -- _obj : TInterface "Gtk" "CssSection" IO (Ptr CssSection) cssSectionGetParent :: (MonadIO m) => CssSection -> -- _obj m CssSection cssSectionGetParent _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- gtk_css_section_get_parent _obj' checkUnexpectedReturnNULL "gtk_css_section_get_parent" result result' <- (newBoxed CssSection) result touchManagedPtr _obj return result' -- method CssSection::get_section_type -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "CssSectionType" -- throws : False -- Skip return : False foreign import ccall "gtk_css_section_get_section_type" gtk_css_section_get_section_type :: Ptr CssSection -> -- _obj : TInterface "Gtk" "CssSection" IO CUInt cssSectionGetSectionType :: (MonadIO m) => CssSection -> -- _obj m CssSectionType cssSectionGetSectionType _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- gtk_css_section_get_section_type _obj' let result' = (toEnum . fromIntegral) result touchManagedPtr _obj return result' -- method CssSection::get_start_line -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUInt32 -- throws : False -- Skip return : False foreign import ccall "gtk_css_section_get_start_line" gtk_css_section_get_start_line :: Ptr CssSection -> -- _obj : TInterface "Gtk" "CssSection" IO Word32 cssSectionGetStartLine :: (MonadIO m) => CssSection -> -- _obj m Word32 cssSectionGetStartLine _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- gtk_css_section_get_start_line _obj' touchManagedPtr _obj return result -- method CssSection::get_start_position -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUInt32 -- throws : False -- Skip return : False foreign import ccall "gtk_css_section_get_start_position" gtk_css_section_get_start_position :: Ptr CssSection -> -- _obj : TInterface "Gtk" "CssSection" IO Word32 cssSectionGetStartPosition :: (MonadIO m) => CssSection -> -- _obj m Word32 cssSectionGetStartPosition _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- gtk_css_section_get_start_position _obj' touchManagedPtr _obj return result -- method CssSection::ref -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "CssSection" -- throws : False -- Skip return : False foreign import ccall "gtk_css_section_ref" gtk_css_section_ref :: Ptr CssSection -> -- _obj : TInterface "Gtk" "CssSection" IO (Ptr CssSection) cssSectionRef :: (MonadIO m) => CssSection -> -- _obj m CssSection cssSectionRef _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- gtk_css_section_ref _obj' checkUnexpectedReturnNULL "gtk_css_section_ref" result result' <- (wrapBoxed CssSection) result touchManagedPtr _obj return result' -- method CssSection::unref -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CssSection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_css_section_unref" gtk_css_section_unref :: Ptr CssSection -> -- _obj : TInterface "Gtk" "CssSection" IO () cssSectionUnref :: (MonadIO m) => CssSection -> -- _obj m () cssSectionUnref _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj gtk_css_section_unref _obj' touchManagedPtr _obj return ()