AnjutaLanguageProvider: Anjuta Developers Reference Manual

## AnjutaLanguageProvider AnjutaLanguageProvider |

## Functions

AnjutaLanguageProposalData * | anjuta_language_proposal_data_new ()
void | anjuta_language_proposal_data_free ()
void | anjuta_language_provider_install ()
gchar * | anjuta_language_provider_get_pre_word ()
gchar * | anjuta_language_provider_get_calltip_context ()
void | anjuta_language_provider_activate ()
void | anjuta_language_provider_populate ()
void | anjuta_language_provider_proposals ()
IAnjutaIterable * | anjuta_language_provider_get_start_iter ()

## Types and Values

struct | AnjutaLanguageProposalData
| AnjutaLanguageProviderPriv

## Object Hierarchy

        GBoxed
        ╰── AnjutaLanguageProposalData
        GObject
        ╰── AnjutaLanguageProvider

## Description

## Functions

### anjuta_language_proposal_data_new ()

    AnjutaLanguageProposalData *
    anjuta_language_proposal_data_new (gchar *name);

#### Parameters

name | Name of the object |

#### Returns

Creates a new AnjutaLanguageProposalData object.

[transfer full]

### anjuta_language_proposal_data_free ()

    void
    anjuta_language_proposal_data_free (AnjutaLanguageProposalData *data);

Free the given proposal data

#### Parameters

data | a AnjutaLanguageProposalData |

### anjuta_language_provider_install ()

    void
    anjuta_language_provider_install (AnjutaLanguageProvider *lang_prov,
                                      IAnjutaEditor *ieditor,
                                      GSettings *settings);

Install the settings for AnjutaLanguageProvider

#### Parameters

lang_prov | Self |
ieditor | IAnjutaEditor object. | [type GObject]
settings | the settings |

### anjuta_language_provider_get_pre_word ()

    gchar *
    anjuta_language_provider_get_pre_word (AnjutaLanguageProvider *lang_prov,
                                           IAnjutaEditor *editor,
                                           IAnjutaIterable *iter,
                                           IAnjutaIterable **start_iter,
                                           const gchar *word_characters);

Search for the current typed word

#### Parameters

lang_prov | Self |
editor | IAnjutaEditor object. | [type GObject]
iter | current cursor position. | [type GObject]
start_iter | return location for the start_iter (if a preword was found). | [type GObject]

#### Returns

The current word (needs to be freed) or `NULL` if no word was found.

[transfer full][allow-none]

### anjuta_language_provider_get_calltip_context ()

    gchar *
    anjuta_language_provider_get_calltip_context
                                   (AnjutaLanguageProvider *lang_prov,
                                    IAnjutaEditorTip *itip,
                                    IAnjutaIterable *iter,
                                    const gchar *scope_context_ch);

Searches for a calltip context

#### Parameters

itip | whether a tooltip is crrently shown. | [type GObject]
iter | current cursor position. | [type GObject]
scope_context_ch | language-specific context characters the end is marked with a '0' character |

#### Returns

name of the method to show a calltip for or `NULL`

### anjuta_language_provider_activate ()

    void
    anjuta_language_provider_activate (AnjutaLanguageProvider *lang_prov,
                                       IAnjutaProvider *iprov,
                                       IAnjutaIterable *iter,
                                       gpointer data);

Complete the function name

#### Parameters

lang_prov | Self |
iprov | IAnjutaProvider object. | [type GObject]
iter | the cursor. | [type GObject]
data | the ProposalData |

### anjuta_language_provider_populate ()

    void
    anjuta_language_provider_populate (AnjutaLanguageProvider *lang_prov,
                                       IAnjutaProvider *iprov,
                                       IAnjutaIterable *cursor);

Show completion for the context at position `iter` . The provider should call anjuta_language_provider_proposals here to add proposals to the list.

#### Parameters

lang_prov | Self |
iprov | IAnjutaProvider object. | [type GObject]
cursor | the text iter where the provider should be populated. | [type GObject]

### anjuta_language_provider_proposals ()

    void
    anjuta_language_provider_proposals (AnjutaLanguageProvider *lang_prov,
                                        IAnjutaProvider *iprov,
                                        GList *proposals,
                                        const gchar *pre_word,
                                        gboolean finished);

Add the list of proposals for the current population. You can add proposals async as long as the last call sets finished to TRUE. That is usually called by the IAnjutaLanguageProvider after it was triggered by `ianjuta_language_provider_populate_completions()`

#### Parameters

lang_prov | Self |
iprov | IAnjutaProvider object. | [type GObject]
proposals | a list of IAnjutaProposals. | [element-type IAnjutaEditorAssistProposal]
pre_word | the word before the cursor |
finished | whether is was the last call in an async operation |

### anjuta_language_provider_get_start_iter ()

    IAnjutaIterable *
    anjuta_language_provider_get_start_iter
                                   (AnjutaLanguageProvider *lang_prov);

#### Parameters

lang_prov | Self |

#### Returns

the start iter.

[transfer full]

## Types and Values

### struct AnjutaLanguageProposalData

    struct AnjutaLanguageProposalData {
    	gchar* name;
    	gchar* info;
    	gboolean is_func;
    	gboolean has_para;
    	IAnjutaSymbolType type;
    };

#### Members

gchar *`name`; | Name of the object |
gchar *`info`; | Info about the object |
gboolean `is_func`; | If this is a function |
gboolean `has_para`; | If the function has at least one parameters |
IAnjutaSymbolType `type`; | Type of the object |

### AnjutaLanguageProviderPriv

    typedef struct _AnjutaLanguageProviderPriv AnjutaLanguageProviderPriv;