| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
GI.Gtk.Structs.CssSection
Description
Defines a part of a CSS document. Because sections are nested into
one another, you can use cssSectionGetParent to get the
containing region.
Synopsis
- newtype CssSection = CssSection (ManagedPtr CssSection)
- cssSectionGetEndLocation :: (HasCallStack, MonadIO m) => CssSection -> m CssLocation
- cssSectionGetFile :: (HasCallStack, MonadIO m) => CssSection -> m File
- cssSectionGetParent :: (HasCallStack, MonadIO m) => CssSection -> m (Maybe CssSection)
- cssSectionGetStartLocation :: (HasCallStack, MonadIO m) => CssSection -> m CssLocation
- cssSectionNew :: (HasCallStack, MonadIO m, IsFile a) => Maybe a -> CssLocation -> CssLocation -> m CssSection
- cssSectionPrint :: (HasCallStack, MonadIO m) => CssSection -> String -> m ()
- cssSectionRef :: (HasCallStack, MonadIO m) => CssSection -> m CssSection
- cssSectionToString :: (HasCallStack, MonadIO m) => CssSection -> m Text
- cssSectionUnref :: (HasCallStack, MonadIO m) => CssSection -> m ()
Exported types
newtype CssSection Source #
Memory-managed wrapper type.
Constructors
| CssSection (ManagedPtr CssSection) |
Instances
| Eq CssSection Source # | |
Defined in GI.Gtk.Structs.CssSection | |
| GBoxed CssSection Source # | |
Defined in GI.Gtk.Structs.CssSection | |
| ManagedPtrNewtype CssSection Source # | |
Defined in GI.Gtk.Structs.CssSection Methods toManagedPtr :: CssSection -> ManagedPtr CssSection | |
| TypedObject CssSection Source # | |
Defined in GI.Gtk.Structs.CssSection | |
| HasParentTypes CssSection Source # | |
Defined in GI.Gtk.Structs.CssSection | |
| IsGValue (Maybe CssSection) Source # | Convert |
Defined in GI.Gtk.Structs.CssSection Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe CssSection -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe CssSection) | |
| type ParentTypes CssSection Source # | |
Defined in GI.Gtk.Structs.CssSection | |
Methods
Click to display all available methods, including inherited ones
getEndLocation
cssSectionGetEndLocation Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => CssSection |
|
| -> m CssLocation | Returns: The end location of this section |
Returns the location in the CSS document where this section ends.
getFile
Arguments
| :: (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.
getParent
Arguments
| :: (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.
getStartLocation
cssSectionGetStartLocation Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => CssSection |
|
| -> m CssLocation | Returns: The start location of this section |
Returns the location in the CSS document where this section starts.
new
Arguments
| :: (HasCallStack, MonadIO m, IsFile a) | |
| => Maybe a |
|
| -> CssLocation |
|
| -> CssLocation |
|
| -> m CssSection | Returns: a new |
Creates a new CssSection referring to the section
in the given file from the start location to the
end location.
Arguments
| :: (HasCallStack, MonadIO m) | |
| => CssSection |
|
| -> String |
|
| -> m () |
Prints the section into string in a human-readable form. This
is a form like gtk.css:32:1-23 to denote line 32, characters
1 to 23 in the file gtk.css.
ref
Arguments
| :: (HasCallStack, MonadIO m) | |
| => CssSection |
|
| -> m CssSection | Returns: |
Increments the reference count on section.
toString
Arguments
| :: (HasCallStack, MonadIO m) | |
| => CssSection |
|
| -> m Text | Returns: A new string. |
Prints the section into a human-readable text form using
cssSectionPrint.
unref
Arguments
| :: (HasCallStack, MonadIO m) | |
| => CssSection |
|
| -> m () |
Decrements the reference count on section, freeing the
structure if the reference count reaches 0.