1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 /*
25  * Conversion parameters:
26  * inFile  = GtkSourceCompletionProvider.html
27  * outPack = gsv
28  * outFile = SourceCompletionProviderIF
29  * strct   = GtkSourceCompletionProvider
30  * realStrct=
31  * ctorStrct=
32  * clss    = SourceCompletionProviderT
33  * interf  = SourceCompletionProviderIF
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_source_completion_proposal_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- glib.Str
47  * 	- gdk.Pixbuf
48  * 	- gtk.TextIter
49  * 	- gtk.Widget
50  * 	- gsv.SourceCompletionContext
51  * 	- gsv.SourceCompletionInfo
52  * 	- gsv.SourceCompletionProposalIF
53  * structWrap:
54  * 	- GdkPixbuf* -> Pixbuf
55  * 	- GtkSourceCompletionContext* -> SourceCompletionContext
56  * 	- GtkSourceCompletionInfo* -> SourceCompletionInfo
57  * 	- GtkSourceCompletionProposal* -> SourceCompletionProposalIF
58  * 	- GtkTextIter* -> TextIter
59  * 	- GtkWidget* -> Widget
60  * module aliases:
61  * local aliases:
62  * overrides:
63  */
64 
65 module gsv.SourceCompletionProviderIF;
66 
67 public  import gsvc.gsvtypes;
68 
69 private import gsvc.gsv;
70 private import glib.ConstructionException;
71 private import gobject.ObjectG;
72 
73 
74 private import glib.Str;
75 private import gdk.Pixbuf;
76 private import gtk.TextIter;
77 private import gtk.Widget;
78 private import gsv.SourceCompletionContext;
79 private import gsv.SourceCompletionInfo;
80 private import gsv.SourceCompletionProposalIF;
81 
82 
83 
84 
85 /**
86  * Description
87  * You must implement this interface to provide proposals to GtkSourceCompletion
88  */
89 public interface SourceCompletionProviderIF
90 {
91 	
92 	
93 	public GtkSourceCompletionProvider* getSourceCompletionProviderTStruct();
94 	
95 	/** the main Gtk struct as a void* */
96 	protected void* getStruct();
97 	
98 	
99 	/**
100 	 */
101 	
102 	/**
103 	 * Get the name of the provider. This should be a translatable name for
104 	 * display to the user. For example: _("Document word completion provider"). The
105 	 * returned string must be freed with g_free().
106 	 * Returns: A new string containing the name of the provider.
107 	 */
108 	public string gtkSourceCompletionProviderGetName();
109 	
110 	/**
111 	 * Get the icon of the provider.
112 	 * Returns: The icon to be used for the provider, or NULL if the provider does not have a special icon.
113 	 */
114 	public Pixbuf gtkSourceCompletionProviderGetIcon();
115 	
116 	/**
117 	 * Populate context with proposals from provider
118 	 * Params:
119 	 * context = The GtkSourceCompletionContext
120 	 */
121 	public void gtkSourceCompletionProviderPopulate(SourceCompletionContext context);
122 	
123 	/**
124 	 */
125 	public GtkSourceCompletionActivation gtkSourceCompletionProviderGetActivation();
126 	
127 	/**
128 	 * Get whether the provider match the context of completion detailed in
129 	 * context.
130 	 * Params:
131 	 * context = The GtkSourceCompletionContext
132 	 * Returns: TRUE if provider matches the completion context, FALSE otherwise
133 	 */
134 	public int gtkSourceCompletionProviderMatch(SourceCompletionContext context);
135 	
136 	/**
137 	 * Get a customized info widget to show extra information of a proposal.
138 	 * This allows for customized widgets on a proposal basis, although in general
139 	 * providers will have the same custom widget for all their proposals and
140 	 * proposal can be ignored. The implementation of this function is optional.
141 	 * If implemented, gtk_source_completion_provider_update_info MUST also be
142 	 * implemented. If not implemented, the default
143 	 * gtk_source_completion_proposal_get_info will be used to display extra
144 	 * information about a GtkSourceCompletionProposal.
145 	 * Params:
146 	 * proposal = The currently selected GtkSourceCompletionProposal
147 	 * Returns: a custom GtkWidget to show extra information about proposal.
148 	 */
149 	public Widget gtkSourceCompletionProviderGetInfoWidget(SourceCompletionProposalIF proposal);
150 	
151 	/**
152 	 * Update extra information shown in info for proposal. This should be
153 	 * implemented if your provider sets a custom info widget for proposal.
154 	 * This function MUST be implemented when
155 	 * gtk_source_completion_provider_get_info_widget is implemented.
156 	 * Params:
157 	 * proposal = A GtkSourceCompletionProposal
158 	 * info = A GtkSourceCompletionInfo
159 	 */
160 	public void gtkSourceCompletionProviderUpdateInfo(SourceCompletionProposalIF proposal, SourceCompletionInfo info);
161 	
162 	/**
163 	 * Get the GtkTextIter at which the completion for proposal starts. When
164 	 * implemented, the completion can use this information to position the
165 	 * completion window accordingly when a proposal is selected in the completion
166 	 * window.
167 	 * Params:
168 	 * context = A GtkSourceCompletionContext
169 	 * proposal = A GtkSourceCompletionProposal
170 	 * iter = A GtkTextIter
171 	 * Returns: TRUE if iter was set for proposal, FALSE otherwise
172 	 */
173 	public int gtkSourceCompletionProviderGetStartIter(SourceCompletionContext context, SourceCompletionProposalIF proposal, TextIter iter);
174 	
175 	/**
176 	 * Activate proposal at iter. When this functions returns FALSE, the default
177 	 * activation of proposal will take place which replaces the word at iter
178 	 * with the label of proposal.
179 	 * Params:
180 	 * proposal = A GtkSourceCompletionProposal
181 	 * iter = A GtkTextIter
182 	 * Returns: TRUE to indicate that the proposal activation has been handled, FALSE otherwise.
183 	 */
184 	public int gtkSourceCompletionProviderActivateProposal(SourceCompletionProposalIF proposal, TextIter iter);
185 	
186 	/**
187 	 */
188 	public int gtkSourceCompletionProviderGetInteractiveDelay();
189 	
190 	/**
191 	 */
192 	public int gtkSourceCompletionProviderGetPriority();
193 }