Class: GtkSource::Language

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#get_metadata(name) ⇒ String

the metadata of language or nil if language does not contain the specified metadata property. The returned string is owned by language and should not be freed or modified.

Parameters:

  • name (String)

    metadata property name.

Returns:

  • (String)

    value of property name stored in

#get_style_fallback(style_id) ⇒ String

Returns the ID of the style to use if the specified style_id is not present in the current style scheme. specified style_id is not present in the current style scheme or nil if the style has no fallback defined. The returned string is owned by the language and must not be modified.

Parameters:

  • style_id (String)

    a style ID.

Returns:

  • (String)

    the ID of the style to use if the

#get_style_name(style_id) ⇒ String

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

Parameters:

  • style_id (String)

    a style ID.

Returns:

  • (String)

    the name of the style with ID style_id

#globsArray<String>

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. a newly-allocated nil terminated array containing the globs or nil if no globs are found. The returned array must be freed with g_strfreev().

Returns:

  • (Array<String>)

#hiddenBoolean

Returns whether the language should be hidden from the user.

Returns:

  • (Boolean)

    true if the language should be hidden, false otherwise.

#hidden=(hidden) ⇒ Boolean

Parameters:

  • hidden (Boolean)

Returns:

  • (Boolean)

    hidden

  • (Boolean)

    hidden

#hidden?Boolean

Returns hidden.

Returns:

  • (Boolean)

    hidden

#idString

Returns id.

Returns:

  • (String)

    id

#id=(id) ⇒ String

Parameters:

  • id (String)

Returns:

  • (String)

    id

  • (String)

    id

#mime_typesArray<String>

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. a newly-allocated nil terminated array containing the mime types or nil if no mime types are found. The returned array must be freed with g_strfreev().

Returns:

  • (Array<String>)

#nameString

Returns name.

Returns:

  • (String)

    name

#name=(name) ⇒ String

Parameters:

  • name (String)

Returns:

  • (String)

    name

  • (String)

    name

#sectionString

Returns section.

Returns:

  • (String)

    section

#section=(section) ⇒ String

Parameters:

  • section (String)

Returns:

  • (String)

    section

  • (String)

    section

#style_idsArray<String>

Returns the ids of the styles defined by this language. a newly-allocated nil terminated array containing ids of the styles defined by this language or nil if no style is defined. The returned array must be freed with g_strfreev().

Returns:

  • (Array<String>)