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