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