gtksourceview2-0.12.2: Binding to the GtkSourceView library.

Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net

Graphics.UI.Gtk.SourceView.SourceLanguage

Contents

Description

 

Synopsis

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

Methods

sourceLanguageGetId

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.

sourceLanguageGetName

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.

sourceLanguageGetSection

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).

sourceLanguageGetHidden

Arguments

:: SourceLanguageClass sl 
=> sl 
-> IO Bool

returns True if the language should be hidden, False otherwise.

Returns whether the language should be hidden from the user.

sourceLanguageGetMetadata

Arguments

:: SourceLanguageClass sl 
=> sl 
-> String

name metadata property name.

-> IO String

returns value of property name stored in the metadata of language or empty if language doesn't contain that metadata

sourceLanguageGetMimeTypes

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.

sourceLanguageGetGlobs

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.

sourceLanguageGetStyleName

Arguments

:: SourceLanguageClass sl 
=> sl 
-> String

styleId a style ID

-> IO String

returns the name of the style with ID styleId defined by this language or empty if the style has no name or there is no style with ID styleId defined by this language. The returned string is owned by the language and must not be modified.

Returns the name of the style with ID styleId defined by this language.

sourceLanguageGetStyleIds

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 Bool

Whether the language should be hidden from the user.

Default value: False

sourceLanguageId :: SourceLanguageClass sl => ReadAttr sl String

Language id.

Default value: ""

sourceLanguageName :: SourceLanguageClass sl => ReadAttr sl String

Language name.

Default value: ""

sourceLanguageSection :: SourceLanguageClass sl => ReadAttr sl String

Language section.

Default value: ""