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