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 module gsv.SourceCompletionProposalIF;
26 
27 private import gdkpixbuf.Pixbuf;
28 private import gio.Icon;
29 private import gio.IconIF;
30 private import glib.Str;
31 private import gobject.ObjectG;
32 private import gobject.Signals;
33 private import gsvc.gsv;
34 public  import gsvc.gsvtypes;
35 public  import gtkc.gdktypes;
36 private import std.algorithm;
37 
38 
39 /** */
40 public interface SourceCompletionProposalIF{
41 	/** Get the main Gtk struct */
42 	public GtkSourceCompletionProposal* getSourceCompletionProposalStruct();
43 
44 	/** the main Gtk struct as a void* */
45 	protected void* getStruct();
46 
47 
48 	/**
49 	 * Emits the "changed" signal on @proposal. This should be called by
50 	 * implementations whenever the name, icon or info of the proposal has
51 	 * changed.
52 	 */
53 	public void changed();
54 
55 	/**
56 	 * Get whether two proposal objects are the same.  This is used to (together
57 	 * with gtk_source_completion_proposal_hash()) to match proposals in the
58 	 * completion model. By default, it uses direct equality (g_direct_equal()).
59 	 *
60 	 * Params:
61 	 *     other = a #GtkSourceCompletionProposal.
62 	 *
63 	 * Return: %TRUE if @proposal and @object are the same proposal
64 	 */
65 	public bool equal(SourceCompletionProposalIF other);
66 
67 	/**
68 	 * Gets the #GIcon for the icon of @proposal.
69 	 *
70 	 * Return: A #GIcon with the icon of @proposal.
71 	 *
72 	 * Since: 3.18
73 	 */
74 	public IconIF getGicon();
75 
76 	/**
77 	 * Gets the #GdkPixbuf for the icon of @proposal.
78 	 *
79 	 * Return: A #GdkPixbuf with the icon of @proposal.
80 	 */
81 	public Pixbuf getIcon();
82 
83 	/**
84 	 * Gets the icon name of @proposal.
85 	 *
86 	 * Return: The icon name of @proposal.
87 	 *
88 	 * Since: 3.18
89 	 */
90 	public string getIconName();
91 
92 	/**
93 	 * Gets extra information associated to the proposal. This information will be
94 	 * used to present the user with extra, detailed information about the
95 	 * selected proposal. The returned string must be freed with g_free().
96 	 *
97 	 * Return: a newly-allocated string containing
98 	 *     extra information of @proposal or %NULL if no extra information is associated
99 	 *     to @proposal.
100 	 */
101 	public string getInfo();
102 
103 	/**
104 	 * Gets the label of @proposal. The label is shown in the list of proposals as
105 	 * plain text. If you need any markup (such as bold or italic text), you have
106 	 * to implement gtk_source_completion_proposal_get_markup(). The returned string
107 	 * must be freed with g_free().
108 	 *
109 	 * Return: a new string containing the label of @proposal.
110 	 */
111 	public string getLabel();
112 
113 	/**
114 	 * Gets the label of @proposal with markup. The label is shown in the list of
115 	 * proposals and may contain markup. This will be used instead of
116 	 * gtk_source_completion_proposal_get_label() if implemented. The returned string
117 	 * must be freed with g_free().
118 	 *
119 	 * Return: a new string containing the label of @proposal with markup.
120 	 */
121 	public string getMarkup();
122 
123 	/**
124 	 * Gets the text of @proposal. The text that is inserted into
125 	 * the text buffer when the proposal is activated by the default activation.
126 	 * You are free to implement a custom activation handler in the provider and
127 	 * not implement this function. For more information, see
128 	 * gtk_source_completion_provider_activate_proposal(). The returned string must
129 	 * be freed with g_free().
130 	 *
131 	 * Return: a new string containing the text of @proposal.
132 	 */
133 	public string getText();
134 
135 	/**
136 	 * Get the hash value of @proposal. This is used to (together with
137 	 * gtk_source_completion_proposal_equal()) to match proposals in the completion
138 	 * model. By default, it uses a direct hash (g_direct_hash()).
139 	 *
140 	 * Return: The hash value of @proposal.
141 	 */
142 	public uint hash();
143 	/**
144 	 * Emitted when the proposal has changed. The completion popup
145 	 * will react to this by updating the shown information.
146 	 */
147 	gulong addOnChanged(void delegate(SourceCompletionProposalIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
148 	;
149 
150 }