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