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 67 private import glib.Str; 68 private import gdk.Pixbuf; 69 70 71 72 73 /** 74 * Description 75 * The proposal interface represents a completion item in the completion window. 76 * It provides information on how to display the completion item and what action 77 * should be taken when the completion item is activated. 78 */ 79 public interface SourceCompletionProposalIF 80 { 81 82 83 public GtkSourceCompletionProposal* getSourceCompletionProposalTStruct(); 84 85 /** the main Gtk struct as a void* */ 86 protected void* getStruct(); 87 88 89 /** 90 */ 91 92 void delegate(SourceCompletionProposalIF)[] onChangedListeners(); 93 /** 94 * Emitted when the proposal has changed. The completion popup 95 * will react to this by updating the shown information. 96 */ 97 void addOnChanged(void delegate(SourceCompletionProposalIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); 98 99 /** 100 * Gets the label of proposal. The label is shown in the list of proposals as 101 * plain text. If you need any markup (such as bold or italic text), you have 102 * to implement gtk_source_completion_proposal_get_markup. The returned string 103 * must be freed with g_free(). 104 * Returns: A new string containing the label of proposal. 105 */ 106 public string getLabel(); 107 108 /** 109 * Gets the label of proposal with markup. The label is shown in the list of 110 * proposals and may contain markup. This will be used instead of 111 * gtk_source_completion_proposal_get_label if implemented. The returned string 112 * must be freed with g_free(). 113 * Returns: A new string containing the label of proposal with markup. 114 */ 115 public string getMarkup(); 116 117 /** 118 * Gets the text of proposal. The text that is inserted into 119 * the text buffer when the proposal is activated by the default activation. 120 * You are free to implement a custom activation handler in the provider and 121 * not implement this function. The returned string must 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. 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) : Run Last / 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 }