## IAnjutaLanguage

IAnjutaLanguage — Interface to manage multiple programming languages

## Stability Level

Unstable, unless otherwise indicated

## Functions

GQuark | ianjuta_language_error_quark ()
IAnjutaLanguageId | ianjuta_language_get_from_editor ()
IAnjutaLanguageId | ianjuta_language_get_from_mime_type ()
IAnjutaLanguageId | ianjuta_language_get_from_string ()
GList * | ianjuta_language_get_languages ()
const gchar * | ianjuta_language_get_make_target ()
GList * | ianjuta_language_get_mime_types ()
const gchar * | ianjuta_language_get_name ()
const gchar * | ianjuta_language_get_name_from_editor ()
GList * | ianjuta_language_get_strings ()

## Types and Values

#define | IANJUTA_LANGUAGE_ERROR
typedef | IAnjutaLanguageId

## Object Hierarchy

        GInterface
        ╰── IAnjutaLanguage

## Includes

    #include <libanjuta/interfaces/ianjuta-language.h>

## Description

## Functions

### ianjuta_language_error_quark ()

    GQuark
    ianjuta_language_error_quark (void);

### ianjuta_language_get_from_editor ()

    IAnjutaLanguageId
    ianjuta_language_get_from_editor (IAnjutaLanguage *obj,
                                      IAnjutaEditorLanguage *editor,
                                      GError **err);

Conviniece method to get the id directly from the editor

#### Parameters

obj | Self |
editor | An object implementing IAnjutaEditorLanguage |
err | Error propagation |

#### Returns

A valid language id or 0

### ianjuta_language_get_from_mime_type ()

    IAnjutaLanguageId
    ianjuta_language_get_from_mime_type (IAnjutaLanguage *obj,
                                         const gchar *mime_type,
                                         GError **err);

### ianjuta_language_get_from_string ()

    IAnjutaLanguageId
    ianjuta_language_get_from_string (IAnjutaLanguage *obj,
                                      const gchar *string,
                                      GError **err);

### ianjuta_language_get_languages ()

    GList *
    ianjuta_language_get_languages (IAnjutaLanguage *obj,
                                    GError **err);

#### Parameters

obj | Self |
err | Error propagation |

#### Returns

a list of ids of the available languages. Use `GPOINTER_TO_INT()` to receive them. The list but not the values should be free'd with `g_list_free()`.

[element-type int][transfer container]

### ianjuta_language_get_make_target ()

    const gchar *
    ianjuta_language_get_make_target (IAnjutaLanguage *obj,
                                      IAnjutaLanguageId id,
                                      GError **err);

#### Parameters

obj | Self |
id | A valid language id |

#### Returns

The suffix for the file thats needs to be passed to make to compile the file, e.g. ".o" for C

### ianjuta_language_get_mime_types ()

    GList *
    ianjuta_language_get_mime_types (IAnjutaLanguage *obj,
                                     IAnjutaLanguageId id,
                                     GError **err);

#### Parameters

obj | Self |
id | A valid language id |

#### Returns

A list of mime-types that represent this language.

[element-type utf8]

### ianjuta_language_get_name ()

    const gchar *
    ianjuta_language_get_name (IAnjutaLanguage *obj,
                               IAnjutaLanguageId id,
                               GError **err);

#### Parameters

obj | Self |
id | A valid language id |

#### Returns

The main name of the language. When you call `ianjuta_language_from_string()` before that method the string you get here might be different to the one you passed because the language might have multiple string representations

### ianjuta_language_get_name_from_editor ()

    const gchar *
    ianjuta_language_get_name_from_editor (IAnjutaLanguage *obj,
                                           IAnjutaEditorLanguage *editor,
                                           GError **err);

Conviniece method to get the name directly from the editor

#### Parameters

obj | Self |
editor | An object implementing IAnjutaEditorLanguage |
err | Error propagation |

#### Returns

A language name or NULL

### ianjuta_language_get_strings ()

    GList *
    ianjuta_language_get_strings (IAnjutaLanguage *obj,
                                  IAnjutaLanguageId id,
                                  GError **err);

#### Parameters

obj | Self |
id | A valid language id |

#### Returns

A list of strings that represent this language.

[element-type utf8]

## Types and Values

### IANJUTA_LANGUAGE_ERROR

    #define IANJUTA_LANGUAGE_ERROR ianjuta_language_error_quark()

### IAnjutaLanguageId

    typedef gint IAnjutaLanguageId;