Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Represents a syntax highlighted language.
A GtkSourceLanguage
represents a programming or markup language, affecting
syntax highlighting and context classes.
Use [classlanguageManager
] to obtain a GtkSourceLanguage
instance, and
[methodbuffer
.set_language] to apply it to a [classbuffer
].
Synopsis
- newtype Language = Language (ManagedPtr Language)
- class (GObject o, IsDescendantOf Language o) => IsLanguage o
- toLanguage :: (MonadIO m, IsLanguage o) => o -> m Language
- languageGetGlobs :: (HasCallStack, MonadIO m, IsLanguage a) => a -> m (Maybe [Text])
- languageGetHidden :: (HasCallStack, MonadIO m, IsLanguage a) => a -> m Bool
- languageGetId :: (HasCallStack, MonadIO m, IsLanguage a) => a -> m Text
- languageGetMetadata :: (HasCallStack, MonadIO m, IsLanguage a) => a -> Text -> m (Maybe Text)
- languageGetMimeTypes :: (HasCallStack, MonadIO m, IsLanguage a) => a -> m (Maybe [Text])
- languageGetName :: (HasCallStack, MonadIO m, IsLanguage a) => a -> m Text
- languageGetSection :: (HasCallStack, MonadIO m, IsLanguage a) => a -> m Text
- languageGetStyleFallback :: (HasCallStack, MonadIO m, IsLanguage a) => a -> Text -> m (Maybe Text)
- languageGetStyleIds :: (HasCallStack, MonadIO m, IsLanguage a) => a -> m (Maybe [Text])
- languageGetStyleName :: (HasCallStack, MonadIO m, IsLanguage a) => a -> Text -> m (Maybe Text)
- getLanguageHidden :: (MonadIO m, IsLanguage o) => o -> m Bool
- getLanguageId :: (MonadIO m, IsLanguage o) => o -> m Text
- getLanguageName :: (MonadIO m, IsLanguage o) => o -> m Text
- getLanguageSection :: (MonadIO m, IsLanguage o) => o -> m Text
Exported types
Memory-managed wrapper type.
Instances
Eq Language Source # | |
GObject Language Source # | |
Defined in GI.GtkSource.Objects.Language | |
ManagedPtrNewtype Language Source # | |
Defined in GI.GtkSource.Objects.Language toManagedPtr :: Language -> ManagedPtr Language | |
TypedObject Language Source # | |
Defined in GI.GtkSource.Objects.Language | |
HasParentTypes Language Source # | |
Defined in GI.GtkSource.Objects.Language | |
IsGValue (Maybe Language) Source # | Convert |
Defined in GI.GtkSource.Objects.Language gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Language -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Language) | |
type ParentTypes Language Source # | |
Defined in GI.GtkSource.Objects.Language type ParentTypes Language = '[Object] |
class (GObject o, IsDescendantOf Language o) => IsLanguage o Source #
Type class for types which can be safely cast to Language
, for instance with toLanguage
.
Instances
(GObject o, IsDescendantOf Language o) => IsLanguage o Source # | |
Defined in GI.GtkSource.Objects.Language |
toLanguage :: (MonadIO m, IsLanguage o) => o -> m Language Source #
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getGlobs, getHidden, getId, getMetadata, getMimeTypes, getName, getProperty, getQdata, getSection, getStyleFallback, getStyleIds, getStyleName.
Setters
getGlobs
:: (HasCallStack, MonadIO m, IsLanguage a) | |
=> a |
|
-> m (Maybe [Text]) | Returns:
a newly-allocated |
Returns the globs associated to this language.
This is just an utility wrapper around [methodlanguage
.get_metadata] to
retrieve the "globs" metadata property and split it into an array.
getHidden
:: (HasCallStack, MonadIO m, IsLanguage a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the language should be hidden from the user.
getId
:: (HasCallStack, MonadIO m, IsLanguage a) | |
=> a |
|
-> m Text | Returns: the ID of |
Returns the ID of the language.
The ID is not locale-dependent.The returned string is owned by language
and should not be freed or modified.
getMetadata
:: (HasCallStack, MonadIO m, IsLanguage a) | |
=> a |
|
-> Text |
|
-> m (Maybe Text) | Returns: value of property |
No description available in the introspection data.
getMimeTypes
:: (HasCallStack, MonadIO m, IsLanguage a) | |
=> a |
|
-> m (Maybe [Text]) | Returns:
a newly-allocated |
Returns the mime types associated to this language.
This is just an utility wrapper around [methodlanguage
.get_metadata] to
retrieve the "mimetypes" metadata property and split it into an
array.
getName
:: (HasCallStack, MonadIO m, IsLanguage a) | |
=> a |
|
-> m Text | Returns: the name of |
Returns the localized name of the language.
The returned string is owned by language
and should not be freed
or modified.
getSection
:: (HasCallStack, MonadIO m, IsLanguage a) | |
=> a |
|
-> m Text | Returns: the section of |
Returns the localized section of the language.
Each language belong to a section (ex. HTML belongs to the
Markup section).
The returned string is owned by language
and should not be freed
or modified.
getStyleFallback
languageGetStyleFallback Source #
:: (HasCallStack, MonadIO m, IsLanguage a) | |
=> a |
|
-> Text |
|
-> m (Maybe Text) | Returns: the ID of the style to use if the
specified |
Returns the ID of the style to use if the specified styleId
is not present in the current style scheme.
getStyleIds
:: (HasCallStack, MonadIO m, IsLanguage a) | |
=> a |
|
-> m (Maybe [Text]) | Returns:
a newly-allocated |
Returns the ids of the styles defined by this language
.
getStyleName
:: (HasCallStack, MonadIO m, IsLanguage a) | |
=> a |
|
-> Text |
|
-> m (Maybe Text) | Returns: the name of the style with ID |
Returns the name of the style with ID styleId
defined by this language
.
Properties
No description available in the introspection data.
getLanguageHidden :: (MonadIO m, IsLanguage o) => o -> m Bool Source #
Get the value of the “hidden
” property.
When overloading is enabled, this is equivalent to
get
language #hidden
id
No description available in the introspection data.
getLanguageId :: (MonadIO m, IsLanguage o) => o -> m Text Source #
Get the value of the “id
” property.
When overloading is enabled, this is equivalent to
get
language #id
name
No description available in the introspection data.
getLanguageName :: (MonadIO m, IsLanguage o) => o -> m Text Source #
Get the value of the “name
” property.
When overloading is enabled, this is equivalent to
get
language #name
section
No description available in the introspection data.
getLanguageSection :: (MonadIO m, IsLanguage o) => o -> m Text Source #
Get the value of the “section
” property.
When overloading is enabled, this is equivalent to
get
language #section