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  = GtkSourceCompletionProposal.html
27  * outPack = gsv
28  * outFile = SourceCompletionProposalIF
29  * strct   = GtkSourceCompletionProposal
30  * realStrct=
31  * ctorStrct=
32  * clss    = SourceCompletionProposalT
33  * interf  = SourceCompletionProposalIF
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  * structWrap:
49  * 	- GdkPixbuf* -> Pixbuf
50  * 	- GtkSourceCompletionProposal* -> SourceCompletionProposalIF
51  * module aliases:
52  * local aliases:
53  * overrides:
54  */
55 
56 module gsv.SourceCompletionProposalIF;
57 
58 public  import gsvc.gsvtypes;
59 
60 private import gsvc.gsv;
61 private import glib.ConstructionException;
62 private import gobject.ObjectG;
63 
64 private import gobject.Signals;
65 public  import gtkc.gdktypes;
66 
67 private import glib.Str;
68 private import gdk.Pixbuf;
69 
70 
71 
72 
73 /**
74  * The proposal interface represents a completion item in the completion window.
75  * It provides information on how to display the completion item and what action
76  * should be taken when the completion item is activated.
77  */
78 public interface SourceCompletionProposalIF
79 {
80 	
81 	
82 	public GtkSourceCompletionProposal* getSourceCompletionProposalTStruct();
83 	
84 	/** the main Gtk struct as a void* */
85 	protected void* getStruct();
86 	
87 	
88 	/**
89 	 */
90 	
91 	@property void delegate(SourceCompletionProposalIF)[] onChangedListeners();
92 	/**
93 	 * Emitted when the proposal has changed. The completion popup
94 	 * will react to this by updating the shown information.
95 	 */
96 	void addOnChanged(void delegate(SourceCompletionProposalIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
97 	
98 	/**
99 	 * Gets the label of proposal. The label is shown in the list of proposals as
100 	 * plain text. If you need any markup (such as bold or italic text), you have
101 	 * to implement gtk_source_completion_proposal_get_markup(). The returned string
102 	 * must be freed with g_free().
103 	 * Returns: a new string containing the label of proposal.
104 	 */
105 	public string getLabel();
106 	
107 	/**
108 	 * Gets the label of proposal with markup. The label is shown in the list of
109 	 * proposals and may contain markup. This will be used instead of
110 	 * gtk_source_completion_proposal_get_label() if implemented. The returned string
111 	 * must be freed with g_free().
112 	 * Returns: a new string containing the label of proposal with markup.
113 	 */
114 	public string getMarkup();
115 	
116 	/**
117 	 * Gets the text of proposal. The text that is inserted into
118 	 * the text buffer when the proposal is activated by the default activation.
119 	 * You are free to implement a custom activation handler in the provider and
120 	 * not implement this function. For more information, see
121 	 * gtk_source_completion_provider_activate_proposal(). The returned string must
122 	 * be freed with g_free().
123 	 * Returns: a new string containing the text of proposal.
124 	 */
125 	public string getText();
126 	
127 	/**
128 	 * Gets the icon of proposal.
129 	 * Returns: The icon of proposal. [transfer none]
130 	 */
131 	public Pixbuf getIcon();
132 	
133 	/**
134 	 * Gets extra information associated to the proposal. This information will be
135 	 * used to present the user with extra, detailed information about the
136 	 * selected proposal. The returned string must be freed with g_free().
137 	 * Returns: a new string containing extra information of proposal or NULL if no extra information is associated to proposal.
138 	 */
139 	public string getInfo();
140 	
141 	/**
142 	 * Emits the "changed" signal on proposal. This should be called by
143 	 * implementations whenever the name, icon or info of the proposal has
144 	 * changed.
145 	 */
146 	public void changed();
147 	
148 	/**
149 	 * Get the hash value of proposal. This is used to (together with
150 	 * gtk_source_completion_proposal_equal()) to match proposals in the completion
151 	 * model. By default, it uses a direct hash (g_direct_hash()).
152 	 * Returns: The hash value of proposal.
153 	 */
154 	public uint hash();
155 	
156 	/**
157 	 * Get whether two proposal objects are the same. This is used to (together
158 	 * with gtk_source_completion_proposal_hash()) to match proposals in the
159 	 * completion model. By default, it uses direct equality (g_direct_equal()).
160 	 * Params:
161 	 * other = a GtkSourceCompletionProposal.
162 	 * Returns: TRUE if proposal and object are the same proposal Signal Details The "changed" signal void user_function (GtkSourceCompletionProposal *proposal, gpointer user_data) : Action Emitted when the proposal has changed. The completion popup will react to this by updating the shown information.
163 	 */
164 	public int equal(SourceCompletionProposalIF other);
165 }