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 = GtkEntryCompletion.html 27 * outPack = gtk 28 * outFile = EntryCompletion 29 * strct = GtkEntryCompletion 30 * realStrct= 31 * ctorStrct= 32 * clss = EntryCompletion 33 * interf = 34 * class Code: Yes 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * - BuildableIF 40 * - CellLayoutIF 41 * prefixes: 42 * - gtk_entry_completion_ 43 * omit structs: 44 * omit prefixes: 45 * omit code: 46 * omit signals: 47 * imports: 48 * - glib.Str 49 * - gtk.CellArea 50 * - gtk.TreeIter 51 * - gtk.TreeModel 52 * - gtk.TreeModelIF 53 * - gtk.Widget 54 * - gtk.BuildableIF 55 * - gtk.BuildableT 56 * - gtk.CellLayoutIF 57 * - gtk.CellLayoutT 58 * structWrap: 59 * - GtkCellArea* -> CellArea 60 * - GtkTreeIter* -> TreeIter 61 * - GtkTreeModel* -> TreeModelIF 62 * - GtkWidget* -> Widget 63 * module aliases: 64 * local aliases: 65 * overrides: 66 */ 67 68 module gtk.EntryCompletion; 69 70 public import gtkc.gtktypes; 71 72 private import gtkc.gtk; 73 private import glib.ConstructionException; 74 private import gobject.ObjectG; 75 76 private import gobject.Signals; 77 public import gtkc.gdktypes; 78 private import glib.Str; 79 private import gtk.CellArea; 80 private import gtk.TreeIter; 81 private import gtk.TreeModel; 82 private import gtk.TreeModelIF; 83 private import gtk.Widget; 84 private import gtk.BuildableIF; 85 private import gtk.BuildableT; 86 private import gtk.CellLayoutIF; 87 private import gtk.CellLayoutT; 88 89 90 private import gobject.ObjectG; 91 92 /** 93 * GtkEntryCompletion is an auxiliary object to be used in conjunction with 94 * GtkEntry to provide the completion functionality. It implements the 95 * GtkCellLayout interface, to allow the user to add extra cells to the 96 * GtkTreeView with completion matches. 97 * 98 * "Completion functionality" means that when the user modifies the text 99 * in the entry, GtkEntryCompletion checks which rows in the model match 100 * the current content of the entry, and displays a list of matches. 101 * By default, the matching is done by comparing the entry text 102 * case-insensitively against the text column of the model (see 103 * gtk_entry_completion_set_text_column()), but this can be overridden 104 * with a custom match function (see gtk_entry_completion_set_match_func()). 105 * 106 * When the user selects a completion, the content of the entry is 107 * updated. By default, the content of the entry is replaced by the 108 * text column of the model, but this can be overridden by connecting 109 * to the "match-selected" signal and updating the 110 * entry in the signal handler. Note that you should return TRUE from 111 * the signal handler to suppress the default behaviour. 112 * 113 * To add completion functionality to an entry, use gtk_entry_set_completion(). 114 * 115 * In addition to regular completion matches, which will be inserted into the 116 * entry when they are selected, GtkEntryCompletion also allows to display 117 * "actions" in the popup window. Their appearance is similar to menuitems, 118 * to differentiate them clearly from completion strings. When an action is 119 * selected, the "action-activated" signal is emitted. 120 * 121 * GtkEntryCompletion uses a GtkTreeModelFilter model to represent the 122 * subset of the entire model that is currently matching. While the 123 * GtkEntryCompletion signals "match-selected" and 124 * "cursor-on-match" take the original model and an 125 * iter pointing to that model as arguments, other callbacks and signals 126 * (such as GtkCellLayoutDataFuncs or "apply-attributes") 127 * will generally take the filter model as argument. As long as you are 128 * only calling gtk_tree_model_get(), this will make no difference to 129 * you. If for some reason, you need the original model, use 130 * gtk_tree_model_filter_get_model(). Don't forget to use 131 * gtk_tree_model_filter_convert_iter_to_child_iter() to obtain a 132 * matching iter. 133 */ 134 public class EntryCompletion : ObjectG, BuildableIF, CellLayoutIF 135 { 136 137 /** the main Gtk struct */ 138 protected GtkEntryCompletion* gtkEntryCompletion; 139 140 141 /** Get the main Gtk struct */ 142 public GtkEntryCompletion* getEntryCompletionStruct() 143 { 144 return gtkEntryCompletion; 145 } 146 147 148 /** the main Gtk struct as a void* */ 149 protected override void* getStruct() 150 { 151 return cast(void*)gtkEntryCompletion; 152 } 153 154 /** 155 * Sets our main struct and passes it to the parent class 156 */ 157 public this (GtkEntryCompletion* gtkEntryCompletion) 158 { 159 super(cast(GObject*)gtkEntryCompletion); 160 this.gtkEntryCompletion = gtkEntryCompletion; 161 } 162 163 protected override void setStruct(GObject* obj) 164 { 165 super.setStruct(obj); 166 gtkEntryCompletion = cast(GtkEntryCompletion*)obj; 167 } 168 169 // add the Buildable capabilities 170 mixin BuildableT!(GtkEntryCompletion); 171 172 // add the CellLayout capabilities 173 mixin CellLayoutT!(GtkEntryCompletion); 174 175 /** 176 */ 177 int[string] connectedSignals; 178 179 void delegate(gint, EntryCompletion)[] onActionActivatedListeners; 180 /** 181 * Gets emitted when an action is activated. 182 * Since 2.4 183 */ 184 void addOnActionActivated(void delegate(gint, EntryCompletion) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 185 { 186 if ( !("action-activated" in connectedSignals) ) 187 { 188 Signals.connectData( 189 getStruct(), 190 "action-activated", 191 cast(GCallback)&callBackActionActivated, 192 cast(void*)this, 193 null, 194 connectFlags); 195 connectedSignals["action-activated"] = 1; 196 } 197 onActionActivatedListeners ~= dlg; 198 } 199 extern(C) static void callBackActionActivated(GtkEntryCompletion* widgetStruct, gint index, EntryCompletion _entryCompletion) 200 { 201 foreach ( void delegate(gint, EntryCompletion) dlg ; _entryCompletion.onActionActivatedListeners ) 202 { 203 dlg(index, _entryCompletion); 204 } 205 } 206 207 bool delegate(TreeModelIF, TreeIter, EntryCompletion)[] onCursorOnMatchListeners; 208 /** 209 * Gets emitted when a match from the cursor is on a match 210 * of the list. The default behaviour is to replace the contents 211 * of the entry with the contents of the text column in the row 212 * pointed to by iter. 213 * Note that model is the model that was passed to 214 * gtk_entry_completion_set_model(). 215 * TRUE if the signal has been handled 216 * Since 2.12 217 */ 218 void addOnCursorOnMatch(bool delegate(TreeModelIF, TreeIter, EntryCompletion) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 219 { 220 if ( !("cursor-on-match" in connectedSignals) ) 221 { 222 Signals.connectData( 223 getStruct(), 224 "cursor-on-match", 225 cast(GCallback)&callBackCursorOnMatch, 226 cast(void*)this, 227 null, 228 connectFlags); 229 connectedSignals["cursor-on-match"] = 1; 230 } 231 onCursorOnMatchListeners ~= dlg; 232 } 233 extern(C) static gboolean callBackCursorOnMatch(GtkEntryCompletion* widgetStruct, GtkTreeModel* model, GtkTreeIter* iter, EntryCompletion _entryCompletion) 234 { 235 foreach ( bool delegate(TreeModelIF, TreeIter, EntryCompletion) dlg ; _entryCompletion.onCursorOnMatchListeners ) 236 { 237 if ( dlg(ObjectG.getDObject!(TreeModel, TreeModelIF)(model), ObjectG.getDObject!(TreeIter)(iter), _entryCompletion) ) 238 { 239 return 1; 240 } 241 } 242 243 return 0; 244 } 245 246 bool delegate(string, EntryCompletion)[] onInsertPrefixListeners; 247 /** 248 * Gets emitted when the inline autocompletion is triggered. 249 * The default behaviour is to make the entry display the 250 * whole prefix and select the newly inserted part. 251 * Applications may connect to this signal in order to insert only a 252 * smaller part of the prefix into the entry - e.g. the entry used in 253 * the GtkFileChooser inserts only the part of the prefix up to the 254 * next '/'. 255 * TRUE if the signal has been handled 256 * Since 2.6 257 */ 258 void addOnInsertPrefix(bool delegate(string, EntryCompletion) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 259 { 260 if ( !("insert-prefix" in connectedSignals) ) 261 { 262 Signals.connectData( 263 getStruct(), 264 "insert-prefix", 265 cast(GCallback)&callBackInsertPrefix, 266 cast(void*)this, 267 null, 268 connectFlags); 269 connectedSignals["insert-prefix"] = 1; 270 } 271 onInsertPrefixListeners ~= dlg; 272 } 273 extern(C) static gboolean callBackInsertPrefix(GtkEntryCompletion* widgetStruct, gchar* prefix, EntryCompletion _entryCompletion) 274 { 275 foreach ( bool delegate(string, EntryCompletion) dlg ; _entryCompletion.onInsertPrefixListeners ) 276 { 277 if ( dlg(Str.toString(prefix), _entryCompletion) ) 278 { 279 return 1; 280 } 281 } 282 283 return 0; 284 } 285 286 bool delegate(TreeModelIF, TreeIter, EntryCompletion)[] onMatchSelectedListeners; 287 /** 288 * Gets emitted when a match from the list is selected. 289 * The default behaviour is to replace the contents of the 290 * entry with the contents of the text column in the row 291 * pointed to by iter. 292 * Note that model is the model that was passed to 293 * gtk_entry_completion_set_model(). 294 * TRUE if the signal has been handled 295 * Since 2.4 296 */ 297 void addOnMatchSelected(bool delegate(TreeModelIF, TreeIter, EntryCompletion) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 298 { 299 if ( !("match-selected" in connectedSignals) ) 300 { 301 Signals.connectData( 302 getStruct(), 303 "match-selected", 304 cast(GCallback)&callBackMatchSelected, 305 cast(void*)this, 306 null, 307 connectFlags); 308 connectedSignals["match-selected"] = 1; 309 } 310 onMatchSelectedListeners ~= dlg; 311 } 312 extern(C) static gboolean callBackMatchSelected(GtkEntryCompletion* widgetStruct, GtkTreeModel* model, GtkTreeIter* iter, EntryCompletion _entryCompletion) 313 { 314 foreach ( bool delegate(TreeModelIF, TreeIter, EntryCompletion) dlg ; _entryCompletion.onMatchSelectedListeners ) 315 { 316 if ( dlg(ObjectG.getDObject!(TreeModel, TreeModelIF)(model), ObjectG.getDObject!(TreeIter)(iter), _entryCompletion) ) 317 { 318 return 1; 319 } 320 } 321 322 return 0; 323 } 324 325 326 /** 327 * Creates a new GtkEntryCompletion object. 328 * Since 2.4 329 * Throws: ConstructionException GTK+ fails to create the object. 330 */ 331 public this () 332 { 333 // GtkEntryCompletion * gtk_entry_completion_new (void); 334 auto p = gtk_entry_completion_new(); 335 if(p is null) 336 { 337 throw new ConstructionException("null returned by gtk_entry_completion_new()"); 338 } 339 this(cast(GtkEntryCompletion*) p); 340 } 341 342 /** 343 * Creates a new GtkEntryCompletion object using the 344 * specified area to layout cells in the underlying 345 * GtkTreeViewColumn for the drop-down menu. 346 * Params: 347 * area = the GtkCellArea used to layout cells 348 * Throws: ConstructionException GTK+ fails to create the object. 349 */ 350 public this (CellArea area) 351 { 352 // GtkEntryCompletion * gtk_entry_completion_new_with_area (GtkCellArea *area); 353 auto p = gtk_entry_completion_new_with_area((area is null) ? null : area.getCellAreaStruct()); 354 if(p is null) 355 { 356 throw new ConstructionException("null returned by gtk_entry_completion_new_with_area((area is null) ? null : area.getCellAreaStruct())"); 357 } 358 this(cast(GtkEntryCompletion*) p); 359 } 360 361 /** 362 * Gets the entry completion has been attached to. 363 * Since 2.4 364 * Returns: The entry completion has been attached to. [transfer none] 365 */ 366 public Widget getEntry() 367 { 368 // GtkWidget * gtk_entry_completion_get_entry (GtkEntryCompletion *completion); 369 auto p = gtk_entry_completion_get_entry(gtkEntryCompletion); 370 371 if(p is null) 372 { 373 return null; 374 } 375 376 return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); 377 } 378 379 /** 380 * Sets the model for a GtkEntryCompletion. If completion already has 381 * a model set, it will remove it before setting the new model. 382 * If model is NULL, then it will unset the model. 383 * Since 2.4 384 * Params: 385 * model = the GtkTreeModel. [allow-none] 386 */ 387 public void setModel(TreeModelIF model) 388 { 389 // void gtk_entry_completion_set_model (GtkEntryCompletion *completion, GtkTreeModel *model); 390 gtk_entry_completion_set_model(gtkEntryCompletion, (model is null) ? null : model.getTreeModelTStruct()); 391 } 392 393 /** 394 * Returns NULL if the model is unset. 395 * Since 2.4 396 * Returns: A GtkTreeModel, or NULL if none is currently being used. [transfer none] 397 */ 398 public TreeModelIF getModel() 399 { 400 // GtkTreeModel * gtk_entry_completion_get_model (GtkEntryCompletion *completion); 401 auto p = gtk_entry_completion_get_model(gtkEntryCompletion); 402 403 if(p is null) 404 { 405 return null; 406 } 407 408 return ObjectG.getDObject!(TreeModel, TreeModelIF)(cast(GtkTreeModel*) p); 409 } 410 411 /** 412 * Sets the match function for completion to be func. The match function 413 * is used to determine if a row should or should not be in the completion 414 * list. 415 * Since 2.4 416 * Params: 417 * func = the GtkEntryCompletionMatchFunc to use 418 * funcData = user data for func 419 * funcNotify = destroy notify for func_data. 420 */ 421 public void setMatchFunc(GtkEntryCompletionMatchFunc func, void* funcData, GDestroyNotify funcNotify) 422 { 423 // void gtk_entry_completion_set_match_func (GtkEntryCompletion *completion, GtkEntryCompletionMatchFunc func, gpointer func_data, GDestroyNotify func_notify); 424 gtk_entry_completion_set_match_func(gtkEntryCompletion, func, funcData, funcNotify); 425 } 426 427 /** 428 * Requires the length of the search key for completion to be at least 429 * length. This is useful for long lists, where completing using a small 430 * key takes a lot of time and will come up with meaningless results anyway 431 * (ie, a too large dataset). 432 * Since 2.4 433 * Params: 434 * length = the minimum length of the key in order to start completing 435 */ 436 public void setMinimumKeyLength(int length) 437 { 438 // void gtk_entry_completion_set_minimum_key_length (GtkEntryCompletion *completion, gint length); 439 gtk_entry_completion_set_minimum_key_length(gtkEntryCompletion, length); 440 } 441 442 /** 443 * Returns the minimum key length as set for completion. 444 * Since 2.4 445 * Returns: The currently used minimum key length 446 */ 447 public int getMinimumKeyLength() 448 { 449 // gint gtk_entry_completion_get_minimum_key_length (GtkEntryCompletion *completion); 450 return gtk_entry_completion_get_minimum_key_length(gtkEntryCompletion); 451 } 452 453 /** 454 * Computes the common prefix that is shared by all rows in completion 455 * that start with key. If no row matches key, NULL will be returned. 456 * Note that a text column must have been set for this function to work, 457 * see gtk_entry_completion_set_text_column() for details. 458 * Params: 459 * key = The text to complete for 460 * Returns: The common prefix all rows starting with key or NULL if no row matches key. [transfer full] Since 3.4 461 */ 462 public string computePrefix(string key) 463 { 464 // gchar * gtk_entry_completion_compute_prefix (GtkEntryCompletion *completion, const char *key); 465 return Str.toString(gtk_entry_completion_compute_prefix(gtkEntryCompletion, Str.toStringz(key))); 466 } 467 468 /** 469 * Requests a completion operation, or in other words a refiltering of the 470 * current list with completions, using the current key. The completion list 471 * view will be updated accordingly. 472 * Since 2.4 473 */ 474 public void complete() 475 { 476 // void gtk_entry_completion_complete (GtkEntryCompletion *completion); 477 gtk_entry_completion_complete(gtkEntryCompletion); 478 } 479 480 /** 481 * Get the original text entered by the user that triggered 482 * the completion or NULL if there's no completion ongoing. 483 * Since 2.12 484 * Returns: the prefix for the current completion 485 */ 486 public string getCompletionPrefix() 487 { 488 // const gchar * gtk_entry_completion_get_completion_prefix (GtkEntryCompletion *completion); 489 return Str.toString(gtk_entry_completion_get_completion_prefix(gtkEntryCompletion)); 490 } 491 492 /** 493 * Requests a prefix insertion. 494 * Since 2.6 495 */ 496 public void insertPrefix() 497 { 498 // void gtk_entry_completion_insert_prefix (GtkEntryCompletion *completion); 499 gtk_entry_completion_insert_prefix(gtkEntryCompletion); 500 } 501 502 /** 503 * Inserts an action in completion's action item list at position index_ 504 * with text text. If you want the action item to have markup, use 505 * gtk_entry_completion_insert_action_markup(). 506 * Since 2.4 507 * Params: 508 * index = the index of the item to insert 509 * text = text of the item to insert 510 */ 511 public void insertActionText(int index, string text) 512 { 513 // void gtk_entry_completion_insert_action_text (GtkEntryCompletion *completion, gint index_, const gchar *text); 514 gtk_entry_completion_insert_action_text(gtkEntryCompletion, index, Str.toStringz(text)); 515 } 516 517 /** 518 * Inserts an action in completion's action item list at position index_ 519 * with markup markup. 520 * Since 2.4 521 * Params: 522 * index = the index of the item to insert 523 * markup = markup of the item to insert 524 */ 525 public void insertActionMarkup(int index, string markup) 526 { 527 // void gtk_entry_completion_insert_action_markup (GtkEntryCompletion *completion, gint index_, const gchar *markup); 528 gtk_entry_completion_insert_action_markup(gtkEntryCompletion, index, Str.toStringz(markup)); 529 } 530 531 /** 532 * Deletes the action at index_ from completion's action list. 533 * Since 2.4 534 * Params: 535 * index = the index of the item to delete 536 */ 537 public void deleteAction(int index) 538 { 539 // void gtk_entry_completion_delete_action (GtkEntryCompletion *completion, gint index_); 540 gtk_entry_completion_delete_action(gtkEntryCompletion, index); 541 } 542 543 /** 544 * Convenience function for setting up the most used case of this code: a 545 * completion list with just strings. This function will set up completion 546 * to have a list displaying all (and just) strings in the completion list, 547 * and to get those strings from column in the model of completion. 548 * This functions creates and adds a GtkCellRendererText for the selected 549 * column. If you need to set the text column, but don't want the cell 550 * renderer, use g_object_set() to set the "text-column" 551 * property directly. 552 * Since 2.4 553 * Params: 554 * column = the column in the model of completion to get strings from 555 */ 556 public void setTextColumn(int column) 557 { 558 // void gtk_entry_completion_set_text_column (GtkEntryCompletion *completion, gint column); 559 gtk_entry_completion_set_text_column(gtkEntryCompletion, column); 560 } 561 562 /** 563 * Returns the column in the model of completion to get strings from. 564 * Since 2.6 565 * Returns: the column containing the strings 566 */ 567 public int getTextColumn() 568 { 569 // gint gtk_entry_completion_get_text_column (GtkEntryCompletion *completion); 570 return gtk_entry_completion_get_text_column(gtkEntryCompletion); 571 } 572 573 /** 574 * Sets whether the common prefix of the possible completions should 575 * be automatically inserted in the entry. 576 * Since 2.6 577 * Params: 578 * inlineCompletion = TRUE to do inline completion 579 */ 580 public void setInlineCompletion(int inlineCompletion) 581 { 582 // void gtk_entry_completion_set_inline_completion (GtkEntryCompletion *completion, gboolean inline_completion); 583 gtk_entry_completion_set_inline_completion(gtkEntryCompletion, inlineCompletion); 584 } 585 586 /** 587 * Returns whether the common prefix of the possible completions should 588 * be automatically inserted in the entry. 589 * Since 2.6 590 * Returns: TRUE if inline completion is turned on 591 */ 592 public int getInlineCompletion() 593 { 594 // gboolean gtk_entry_completion_get_inline_completion (GtkEntryCompletion *completion); 595 return gtk_entry_completion_get_inline_completion(gtkEntryCompletion); 596 } 597 598 /** 599 * Sets whether it is possible to cycle through the possible completions 600 * inside the entry. 601 * Since 2.12 602 * Params: 603 * inlineSelection = TRUE to do inline selection 604 */ 605 public void setInlineSelection(int inlineSelection) 606 { 607 // void gtk_entry_completion_set_inline_selection (GtkEntryCompletion *completion, gboolean inline_selection); 608 gtk_entry_completion_set_inline_selection(gtkEntryCompletion, inlineSelection); 609 } 610 611 /** 612 * Returns TRUE if inline-selection mode is turned on. 613 * Since 2.12 614 * Returns: TRUE if inline-selection mode is on 615 */ 616 public int getInlineSelection() 617 { 618 // gboolean gtk_entry_completion_get_inline_selection (GtkEntryCompletion *completion); 619 return gtk_entry_completion_get_inline_selection(gtkEntryCompletion); 620 } 621 622 /** 623 * Sets whether the completions should be presented in a popup window. 624 * Since 2.6 625 * Params: 626 * popupCompletion = TRUE to do popup completion 627 */ 628 public void setPopupCompletion(int popupCompletion) 629 { 630 // void gtk_entry_completion_set_popup_completion (GtkEntryCompletion *completion, gboolean popup_completion); 631 gtk_entry_completion_set_popup_completion(gtkEntryCompletion, popupCompletion); 632 } 633 634 /** 635 * Returns whether the completions should be presented in a popup window. 636 * Since 2.6 637 * Returns: TRUE if popup completion is turned on 638 */ 639 public int getPopupCompletion() 640 { 641 // gboolean gtk_entry_completion_get_popup_completion (GtkEntryCompletion *completion); 642 return gtk_entry_completion_get_popup_completion(gtkEntryCompletion); 643 } 644 645 /** 646 * Sets whether the completion popup window will be resized to be the same 647 * width as the entry. 648 * Since 2.8 649 * Params: 650 * popupSetWidth = TRUE to make the width of the popup the same as the entry 651 */ 652 public void setPopupSetWidth(int popupSetWidth) 653 { 654 // void gtk_entry_completion_set_popup_set_width (GtkEntryCompletion *completion, gboolean popup_set_width); 655 gtk_entry_completion_set_popup_set_width(gtkEntryCompletion, popupSetWidth); 656 } 657 658 /** 659 * Returns whether the completion popup window will be resized to the 660 * width of the entry. 661 * Since 2.8 662 * Returns: TRUE if the popup window will be resized to the width of the entry 663 */ 664 public int getPopupSetWidth() 665 { 666 // gboolean gtk_entry_completion_get_popup_set_width (GtkEntryCompletion *completion); 667 return gtk_entry_completion_get_popup_set_width(gtkEntryCompletion); 668 } 669 670 /** 671 * Sets whether the completion popup window will appear even if there is 672 * only a single match. You may want to set this to FALSE if you 673 * are using inline 674 * completion. 675 * Since 2.8 676 * Params: 677 * popupSingleMatch = TRUE if the popup should appear even for a single 678 * match 679 */ 680 public void setPopupSingleMatch(int popupSingleMatch) 681 { 682 // void gtk_entry_completion_set_popup_single_match (GtkEntryCompletion *completion, gboolean popup_single_match); 683 gtk_entry_completion_set_popup_single_match(gtkEntryCompletion, popupSingleMatch); 684 } 685 686 /** 687 * Returns whether the completion popup window will appear even if there is 688 * only a single match. 689 * Since 2.8 690 * Returns: TRUE if the popup window will appear regardless of the number of matches 691 */ 692 public int getPopupSingleMatch() 693 { 694 // gboolean gtk_entry_completion_get_popup_single_match (GtkEntryCompletion *completion); 695 return gtk_entry_completion_get_popup_single_match(gtkEntryCompletion); 696 } 697 }