| Portability | portable (depends on GHC) |
|---|---|
| Stability | provisional |
| Maintainer | gtk2hs-users@lists.sourceforge.net |
| Safe Haskell | Safe-Infered |
Graphics.UI.Gtk.SourceView.SourceLanguage
Contents
Description
- data SourceLanguage
- class GObjectClass o => SourceLanguageClass o
- castToSourceLanguage :: GObjectClass obj => obj -> SourceLanguage
- sourceLanguageGetId :: SourceLanguageClass sl => sl -> IO String
- sourceLanguageGetName :: SourceLanguageClass sl => sl -> IO String
- sourceLanguageGetSection :: SourceLanguageClass sl => sl -> IO String
- sourceLanguageGetHidden :: SourceLanguageClass sl => sl -> IO Bool
- sourceLanguageGetMetadata :: SourceLanguageClass sl => sl -> String -> IO String
- sourceLanguageGetMimeTypes :: SourceLanguageClass sl => sl -> IO [String]
- sourceLanguageGetGlobs :: SourceLanguageClass sl => sl -> IO [String]
- sourceLanguageGetStyleName :: SourceLanguageClass sl => sl -> String -> IO String
- sourceLanguageGetStyleIds :: SourceLanguageClass sl => sl -> IO [String]
- sourceLanguageHidden :: SourceLanguageClass sl => ReadAttr sl Bool
- sourceLanguageId :: SourceLanguageClass sl => ReadAttr sl String
- sourceLanguageName :: SourceLanguageClass sl => ReadAttr sl String
- sourceLanguageSection :: SourceLanguageClass sl => ReadAttr sl String
Description
SourceLanguage encapsulates syntax and highlighting styles for a particular language. Use
SourceLanguageManager to obtain a SourceLanguage instance, and
sourceBufferSetLanguage to apply it to a SourceBuffer.
Types
data SourceLanguage Source
class GObjectClass o => SourceLanguageClass o Source
Instances
Methods
castToSourceLanguage :: GObjectClass obj => obj -> SourceLanguageSource
Arguments
| :: SourceLanguageClass sl | |
| => sl | |
| -> IO String | returns the ID of language. The returned string is owned by language and should not be freed or modified. |
Returns the ID of the language. The ID is not locale-dependent.
Arguments
| :: SourceLanguageClass sl | |
| => sl | |
| -> IO String | returns the name of language. The returned string is owned by language and should not be freed or modified. |
Returns the localized name of the language.
sourceLanguageGetSectionSource
Arguments
| :: SourceLanguageClass sl | |
| => sl | |
| -> IO String | returns the section of language. The returned string is owned by language and should not be freed or modified. |
Returns the localized section of the language. Each language belong to a section (ex. HTML belogs to the Markup section).
Arguments
| :: SourceLanguageClass sl | |
| => sl | |
| -> IO Bool | returns |
Returns whether the language should be hidden from the user.
sourceLanguageGetMetadataSource
Arguments
| :: SourceLanguageClass sl | |
| => sl | |
| -> String |
|
| -> IO String | returns value of property name stored in the metadata of language or empty if language doesn't contain that metadata |
sourceLanguageGetMimeTypesSource
Arguments
| :: SourceLanguageClass sl | |
| => sl | |
| -> IO [String] | returns an array containing the mime types or empty if no mime types are found. The |
Returns the mime types associated to this language. This is just an utility wrapper around 'sourceLanguageGetMetadata ' to retrieve the mimetypes metadata property and split it into an array.
Arguments
| :: SourceLanguageClass sl | |
| => sl | |
| -> IO [String] | returns an array containing the globs or empty if no globs are found. |
Returns the globs associated to this language. This is just an utility wrapper around
sourceLanguageGetMetadata to retrieve the globs metadata property and split it into an
array.
sourceLanguageGetStyleNameSource
Arguments
| :: SourceLanguageClass sl | |
| => sl | |
| -> String |
|
| -> IO String | returns the name of the style with ID |
Returns the name of the style with ID styleId defined by this language.
sourceLanguageGetStyleIdsSource
Arguments
| :: SourceLanguageClass sl | |
| => sl | |
| -> IO [String] | returns an array containing ids of the styles defined by this language or empty if no style is defined. |
Returns the ids of the styles defined by this language.
Attributes
sourceLanguageHidden :: SourceLanguageClass sl => ReadAttr sl BoolSource
Whether the language should be hidden from the user.
Default value: False
sourceLanguageId :: SourceLanguageClass sl => ReadAttr sl StringSource
Language id.
Default value: ""
sourceLanguageName :: SourceLanguageClass sl => ReadAttr sl StringSource
Language name.
Default value: ""
sourceLanguageSection :: SourceLanguageClass sl => ReadAttr sl StringSource
Language section.
Default value: ""