gtksourceview2-0.13.3.0: Binding to the GtkSourceView library.

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

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 Source #

Arguments

:: (SourceLanguageClass sl, GlibString string) 
=> 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 Source #

Arguments

:: (SourceLanguageClass sl, GlibString string) 
=> 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 Source #

Arguments

:: (SourceLanguageClass sl, GlibString string) 
=> 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 Source #

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 Source #

Arguments

:: (SourceLanguageClass sl, GlibString string) 
=> 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 Source #

Arguments

:: (SourceLanguageClass sl, GlibString string) 
=> 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 Source #

Arguments

:: (SourceLanguageClass sl, GlibString string) 
=> 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 Source #

Arguments

:: (SourceLanguageClass sl, GlibString string) 
=> 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 Source #

Arguments

:: (SourceLanguageClass sl, GlibString string) 
=> 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 Source #

Whether the language should be hidden from the user.

Default value: False

sourceLanguageId :: (SourceLanguageClass sl, GlibString string) => ReadAttr sl string Source #

Language id.

Default value: ""

sourceLanguageName :: (SourceLanguageClass sl, GlibString string) => ReadAttr sl string Source #

Language name.

Default value: ""

sourceLanguageSection :: (SourceLanguageClass sl, GlibString string) => ReadAttr sl string Source #

Language section.

Default value: ""