Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
Defines a part of a CSS document. Because sections are nested into
one another, you can use cssSectionGetParent
to get the
containing region.
- newtype CssSection = CssSection (ManagedPtr CssSection)
- noCssSection :: Maybe CssSection
- data CssSectionGetEndLineMethodInfo
- cssSectionGetEndLine :: (HasCallStack, MonadIO m) => CssSection -> m Word32
- data CssSectionGetEndPositionMethodInfo
- cssSectionGetEndPosition :: (HasCallStack, MonadIO m) => CssSection -> m Word32
- data CssSectionGetFileMethodInfo
- cssSectionGetFile :: (HasCallStack, MonadIO m) => CssSection -> m File
- data CssSectionGetParentMethodInfo
- cssSectionGetParent :: (HasCallStack, MonadIO m) => CssSection -> m (Maybe CssSection)
- data CssSectionGetSectionTypeMethodInfo
- cssSectionGetSectionType :: (HasCallStack, MonadIO m) => CssSection -> m CssSectionType
- data CssSectionGetStartLineMethodInfo
- cssSectionGetStartLine :: (HasCallStack, MonadIO m) => CssSection -> m Word32
- data CssSectionGetStartPositionMethodInfo
- cssSectionGetStartPosition :: (HasCallStack, MonadIO m) => CssSection -> m Word32
- data CssSectionRefMethodInfo
- cssSectionRef :: (HasCallStack, MonadIO m) => CssSection -> m CssSection
- data CssSectionUnrefMethodInfo
- cssSectionUnref :: (HasCallStack, MonadIO m) => CssSection -> m ()
Exported types
newtype CssSection Source #
Methods
getEndLine
data CssSectionGetEndLineMethodInfo Source #
((~) * signature (m Word32), MonadIO m) => MethodInfo * CssSectionGetEndLineMethodInfo CssSection signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> CssSection |
|
-> m Word32 | Returns: the line number |
Returns the line in the CSS document where this section end.
The line number is 0-indexed, so the first line of the document
will return 0.
This value may change in future invocations of this function if
section
is not yet parsed completely. This will for example
happen in the GtkCssProvider::parsing-error signal.
The end position and line may be identical to the start
position and line for sections which failed to parse anything
successfully.
Since: 3.2
getEndPosition
data CssSectionGetEndPositionMethodInfo Source #
((~) * signature (m Word32), MonadIO m) => MethodInfo * CssSectionGetEndPositionMethodInfo CssSection signature Source # | |
cssSectionGetEndPosition Source #
:: (HasCallStack, MonadIO m) | |
=> CssSection |
|
-> m Word32 | Returns: the offset in bytes from the start of the line. |
Returns the offset in bytes from the start of the current line
returned via cssSectionGetEndLine
.
This value may change in future invocations of this function if
section
is not yet parsed completely. This will for example
happen in the GtkCssProvider::parsing-error signal.
The end position and line may be identical to the start
position and line for sections which failed to parse anything
successfully.
Since: 3.2
getFile
data CssSectionGetFileMethodInfo Source #
((~) * signature (m File), MonadIO m) => MethodInfo * CssSectionGetFileMethodInfo CssSection signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> CssSection |
|
-> m File | Returns: the |
Gets the file that section
was parsed from. If no such file exists,
for example because the CSS was loaded via
gtkCssProviderLoadFromData
(), then Nothing
is returned.
Since: 3.2
getParent
data CssSectionGetParentMethodInfo Source #
((~) * signature (m (Maybe CssSection)), MonadIO m) => MethodInfo * CssSectionGetParentMethodInfo CssSection signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> CssSection |
|
-> m (Maybe CssSection) | Returns: the parent section or |
Gets the parent section for the given section
. The parent section is
the section that contains this section
. A special case are sections of
type GTK_CSS_SECTION_DOCUMENT
. Their parent will either be Nothing
if they are the original CSS document that was loaded by
cssProviderLoadFromFile
or a section of type
GTK_CSS_SECTION_IMPORT
if it was loaded with an import rule from
a different file.
Since: 3.2
getSectionType
data CssSectionGetSectionTypeMethodInfo Source #
((~) * signature (m CssSectionType), MonadIO m) => MethodInfo * CssSectionGetSectionTypeMethodInfo CssSection signature Source # | |
cssSectionGetSectionType Source #
:: (HasCallStack, MonadIO m) | |
=> CssSection |
|
-> m CssSectionType | Returns: the type of |
Gets the type of information that section
describes.
Since: 3.2
getStartLine
data CssSectionGetStartLineMethodInfo Source #
((~) * signature (m Word32), MonadIO m) => MethodInfo * CssSectionGetStartLineMethodInfo CssSection signature Source # | |
cssSectionGetStartLine Source #
:: (HasCallStack, MonadIO m) | |
=> CssSection |
|
-> m Word32 | Returns: the line number |
Returns the line in the CSS document where this section starts. The line number is 0-indexed, so the first line of the document will return 0.
Since: 3.2
getStartPosition
data CssSectionGetStartPositionMethodInfo Source #
((~) * signature (m Word32), MonadIO m) => MethodInfo * CssSectionGetStartPositionMethodInfo CssSection signature Source # | |
cssSectionGetStartPosition Source #
:: (HasCallStack, MonadIO m) | |
=> CssSection |
|
-> m Word32 | Returns: the offset in bytes from the start of the line. |
Returns the offset in bytes from the start of the current line
returned via cssSectionGetStartLine
.
Since: 3.2
ref
data CssSectionRefMethodInfo Source #
((~) * signature (m CssSection), MonadIO m) => MethodInfo * CssSectionRefMethodInfo CssSection signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> CssSection |
|
-> m CssSection | Returns: |
Increments the reference count on section
.
Since: 3.2
unref
data CssSectionUnrefMethodInfo Source #
((~) * signature (m ()), MonadIO m) => MethodInfo * CssSectionUnrefMethodInfo CssSection signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> CssSection |
|
-> m () |
Decrements the reference count on section
, freeing the
structure if the reference count reaches 0.
Since: 3.2