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_TYPE_LANGUAGE_PROPOSAL_DATA (anjuta_language_proposal_data_get_type ())
34 #define ANJUTA_LANGUAGE_PROPOSAL_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ANJUTA_TYPE_LANGUAGE_PROPOSAL_DATA, AnjutaLanguageProposalData))
36 typedef struct _AnjutaLanguageProposalData AnjutaLanguageProposalData
;
39 * AnjutaLanguageProposalData:
40 * @name: Name of the object
41 * @info: Info about the object
42 * @is_func: If this is a function
43 * @has_para: If the function has at least one parameters
44 * @type: Type of the object
46 struct _AnjutaLanguageProposalData
52 IAnjutaSymbolType type
;
55 GType
anjuta_language_proposal_data_get_type (void) G_GNUC_CONST
;
56 AnjutaLanguageProposalData
* anjuta_language_proposal_data_new (gchar
* name
);
57 void anjuta_language_proposal_data_free (AnjutaLanguageProposalData
*data
);
59 #define ANJUTA_TYPE_LANGUAGE_PROVIDER (anjuta_language_provider_get_type ())
60 #define ANJUTA_LANGUAGE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ANJUTA_TYPE_LANGUAGE_PROVIDER, AnjutaLanguageProvider))
61 #define ANJUTA_LANGUAGE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ANJUTA_TYPE_LANGUAGE_PROVIDER, AnjutaLanguageProviderClass))
62 #define ANJUTA_IS_LANGUAGE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ANJUTA_TYPE_LANGUAGE_PROVIDER))
63 #define ANJUTA_IS_LANGUAGE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ANJUTA_TYPE_LANGUAGE_PROVIDER))
64 #define ANJUTA_LANGUAGE_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ANJUTA_TYPE_LANGUAGE_PROVIDER, AnjutaLanguageProviderClass))
66 typedef struct _AnjutaLanguageProviderClass AnjutaLanguageProviderClass
;
67 typedef struct _AnjutaLanguageProvider AnjutaLanguageProvider
;
68 typedef struct _AnjutaLanguageProviderPriv AnjutaLanguageProviderPriv
;
70 struct _AnjutaLanguageProviderClass
72 GObjectClass parent_class
;
75 struct _AnjutaLanguageProvider
78 AnjutaLanguageProviderPriv
*priv
;
81 GType
anjuta_language_provider_get_type (void) G_GNUC_CONST
;
84 anjuta_language_provider_install (AnjutaLanguageProvider
* lang_prov
,
85 IAnjutaEditor
*ieditor
,
89 anjuta_language_provider_get_pre_word (AnjutaLanguageProvider
* lang_prov
,
90 IAnjutaEditor
* editor
,
91 IAnjutaIterable
*iter
,
92 IAnjutaIterable
** start_iter
,
93 const gchar
*word_characters
);
96 anjuta_language_provider_get_calltip_context (AnjutaLanguageProvider
* lang_prov
,
97 IAnjutaEditorTip
* itip
,
98 IAnjutaIterable
* iter
,
99 const gchar
* scope_context_ch
);
102 anjuta_language_provider_activate (AnjutaLanguageProvider
* lang_prov
,
103 IAnjutaProvider
* iprov
,
104 IAnjutaIterable
* iter
,
108 anjuta_language_provider_populate (AnjutaLanguageProvider
* lang_prov
,
109 IAnjutaProvider
* iprov
,
110 IAnjutaIterable
* cursor
);
113 anjuta_language_provider_get_start_iter (AnjutaLanguageProvider
* lang_prov
);