1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
3 * anjuta-language-provider.h
4 * Copyright (C) Naba Kumar <naba@gnome.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef _ANJUTA_LANGUAGE_PROVIDER_H_
21 #define _ANJUTA_LANGUAGE_PROVIDER_H_
24 #include <glib-object.h>
25 #include <libanjuta/interfaces/ianjuta-editor.h>
26 #include <libanjuta/interfaces/ianjuta-editor-tip.h>
27 #include <libanjuta/interfaces/ianjuta-iterable.h>
28 #include <libanjuta/interfaces/ianjuta-provider.h>
29 #include <libanjuta/interfaces/ianjuta-symbol.h>
33 #define ANJUTA_LANGUAGE_PROPOSAL_DATA(obj) (AnjutaLanguageProposalData*)((obj))
35 typedef struct _AnjutaLanguageProposalData AnjutaLanguageProposalData
;
38 * AnjutaLanguageProposalData:
39 * @name: Name of the object
40 * @info: Info about the object
41 * @is_func: If this is a function
42 * @has_para: If the function has at least one parameters
43 * @type: Type of the object
45 struct _AnjutaLanguageProposalData
51 IAnjutaSymbolType type
;
54 GType
anjuta_language_proposal_data_get_type (void) G_GNUC_CONST
;
55 AnjutaLanguageProposalData
* anjuta_language_proposal_data_new (gchar
* name
);
56 void anjuta_language_proposal_data_free (AnjutaLanguageProposalData
*data
);
58 #define ANJUTA_TYPE_LANGUAGE_PROVIDER (anjuta_language_provider_get_type ())
59 #define ANJUTA_LANGUAGE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ANJUTA_TYPE_LANGUAGE_PROVIDER, AnjutaLanguageProvider))
60 #define ANJUTA_LANGUAGE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ANJUTA_TYPE_LANGUAGE_PROVIDER, AnjutaLanguageProviderClass))
61 #define ANJUTA_IS_LANGUAGE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ANJUTA_TYPE_LANGUAGE_PROVIDER))
62 #define ANJUTA_IS_LANGUAGE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ANJUTA_TYPE_LANGUAGE_PROVIDER))
63 #define ANJUTA_LANGUAGE_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ANJUTA_TYPE_LANGUAGE_PROVIDER, AnjutaLanguageProviderClass))
65 typedef struct _AnjutaLanguageProviderClass AnjutaLanguageProviderClass
;
66 typedef struct _AnjutaLanguageProvider AnjutaLanguageProvider
;
67 typedef struct _AnjutaLanguageProviderPriv AnjutaLanguageProviderPriv
;
69 struct _AnjutaLanguageProviderClass
71 GObjectClass parent_class
;
74 struct _AnjutaLanguageProvider
77 AnjutaLanguageProviderPriv
*priv
;
80 GType
anjuta_language_provider_get_type (void) G_GNUC_CONST
;
83 anjuta_language_provider_install (AnjutaLanguageProvider
* lang_prov
,
84 IAnjutaEditor
*ieditor
,
88 anjuta_language_provider_get_pre_word (AnjutaLanguageProvider
* lang_prov
,
89 IAnjutaEditor
* editor
,
90 IAnjutaIterable
*iter
,
91 IAnjutaIterable
** start_iter
,
92 const gchar
*word_characters
);
95 anjuta_language_provider_get_calltip_context (AnjutaLanguageProvider
* lang_prov
,
96 IAnjutaEditorTip
* itip
,
97 IAnjutaIterable
* iter
,
98 const gchar
* scope_context_ch
);
101 anjuta_language_provider_activate (AnjutaLanguageProvider
* lang_prov
,
102 IAnjutaProvider
* iprov
,
103 IAnjutaIterable
* iter
,
107 anjuta_language_provider_populate (AnjutaLanguageProvider
* lang_prov
,
108 IAnjutaProvider
* iprov
,
109 IAnjutaIterable
* cursor
);
111 anjuta_language_provider_proposals (AnjutaLanguageProvider
* lang_prov
,
112 IAnjutaProvider
* iprov
,
114 const gchar
* pre_word
,
119 anjuta_language_provider_get_start_iter (AnjutaLanguageProvider
* lang_prov
);