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 vte.Terminal; 26 27 private import gdk.Cursor; 28 private import gdk.Event; 29 private import gdk.RGBA; 30 private import gio.Cancellable; 31 private import gio.OutputStream; 32 private import glib.ArrayG; 33 private import glib.ConstructionException; 34 private import glib.ErrorG; 35 private import glib.GException; 36 private import glib.Regex; 37 private import glib.Str; 38 private import gobject.ObjectG; 39 private import gobject.Signals; 40 private import gtk.BuildableIF; 41 private import gtk.BuildableT; 42 private import gtk.ScrollableIF; 43 private import gtk.ScrollableT; 44 private import gtk.Widget; 45 private import gtk.Window; 46 public import gtkc.gdktypes; 47 private import pango.PgFontDescription; 48 private import vte.Pty; 49 private import vtec.vte; 50 public import vtec.vtetypes; 51 52 53 public class Terminal : Widget, ScrollableIF 54 { 55 /** the main Gtk struct */ 56 protected VteTerminal* vteTerminal; 57 58 /** Get the main Gtk struct */ 59 public VteTerminal* getTerminalStruct() 60 { 61 return vteTerminal; 62 } 63 64 /** the main Gtk struct as a void* */ 65 protected override void* getStruct() 66 { 67 return cast(void*)vteTerminal; 68 } 69 70 protected override void setStruct(GObject* obj) 71 { 72 vteTerminal = cast(VteTerminal*)obj; 73 super.setStruct(obj); 74 } 75 76 /** 77 * Sets our main struct and passes it to the parent class. 78 */ 79 public this (VteTerminal* vteTerminal, bool ownedRef = false) 80 { 81 this.vteTerminal = vteTerminal; 82 super(cast(GtkWidget*)vteTerminal, ownedRef); 83 } 84 85 // add the Scrollable capabilities 86 mixin ScrollableT!(VteTerminal); 87 88 /** 89 */ 90 91 public static GType getType() 92 { 93 return vte_terminal_get_type(); 94 } 95 96 /** 97 * Creates a new terminal widget. 98 * 99 * Return: a new #VteTerminal object 100 * 101 * Throws: ConstructionException GTK+ fails to create the object. 102 */ 103 public this() 104 { 105 auto p = vte_terminal_new(); 106 107 if(p is null) 108 { 109 throw new ConstructionException("null returned by new"); 110 } 111 112 this(cast(VteTerminal*) p); 113 } 114 115 /** 116 * Places the selected text in the terminal in the #GDK_SELECTION_CLIPBOARD 117 * selection. 118 */ 119 public void copyClipboard() 120 { 121 vte_terminal_copy_clipboard(vteTerminal); 122 } 123 124 /** 125 * Places the selected text in the terminal in the #GDK_SELECTION_PRIMARY 126 * selection. 127 */ 128 public void copyPrimary() 129 { 130 vte_terminal_copy_primary(vteTerminal); 131 } 132 133 /** 134 * Interprets @data as if it were data received from a child process. This 135 * can either be used to drive the terminal without a child process, or just 136 * to mess with your users. 137 * 138 * Params: 139 * data = a string in the terminal's current encoding 140 * length = the length of the string, or -1 to use the full length or a nul-terminated string 141 */ 142 public void feed(string data) 143 { 144 vte_terminal_feed(vteTerminal, Str.toStringz(data), cast(ptrdiff_t)data.length); 145 } 146 147 /** 148 * Sends a block of UTF-8 text to the child as if it were entered by the user 149 * at the keyboard. 150 * 151 * Params: 152 * text = data to send to the child 153 * length = length of @text in bytes, or -1 if @text is NUL-terminated 154 */ 155 public void feedChild(string text, ptrdiff_t length) 156 { 157 vte_terminal_feed_child(vteTerminal, Str.toStringz(text), length); 158 } 159 160 /** 161 * Sends a block of binary data to the child. 162 * 163 * Params: 164 * data = data to send to the child 165 * length = length of @data 166 */ 167 public void feedChildBinary(ubyte* data, size_t length) 168 { 169 vte_terminal_feed_child_binary(vteTerminal, data, length); 170 } 171 172 /** 173 * Checks whether or not the terminal will attempt to draw bold text by 174 * repainting text with a one-pixel offset. 175 * 176 * Return: %TRUE if bolding is enabled, %FALSE if not 177 */ 178 public bool getAllowBold() 179 { 180 return vte_terminal_get_allow_bold(vteTerminal) != 0; 181 } 182 183 /** 184 * Checks whether or not the terminal will beep when the child outputs the 185 * "bl" sequence. 186 * 187 * Return: %TRUE if audible bell is enabled, %FALSE if not 188 */ 189 public bool getAudibleBell() 190 { 191 return vte_terminal_get_audible_bell(vteTerminal) != 0; 192 } 193 194 /** 195 * Return: the height of a character cell 196 */ 197 public glong getCharHeight() 198 { 199 return vte_terminal_get_char_height(vteTerminal); 200 } 201 202 /** 203 * Return: the width of a character cell 204 */ 205 public glong getCharWidth() 206 { 207 return vte_terminal_get_char_width(vteTerminal); 208 } 209 210 /** 211 * Returns whether ambiguous-width characters are narrow or wide when using 212 * the UTF-8 encoding (vte_terminal_set_encoding()). 213 * 214 * Return: 1 if ambiguous-width characters are narrow, or 2 if they are wide 215 */ 216 public int getCjkAmbiguousWidth() 217 { 218 return vte_terminal_get_cjk_ambiguous_width(vteTerminal); 219 } 220 221 /** 222 * Return: the number of columns 223 */ 224 public glong getColumnCount() 225 { 226 return vte_terminal_get_column_count(vteTerminal); 227 } 228 229 /** 230 * Return: the URI of the current directory of the 231 * process running in the terminal, or %NULL 232 */ 233 public string getCurrentDirectoryUri() 234 { 235 return Str.toString(vte_terminal_get_current_directory_uri(vteTerminal)); 236 } 237 238 /** 239 * Return: the URI of the current file the 240 * process running in the terminal is operating on, or %NULL if 241 * not set 242 */ 243 public string getCurrentFileUri() 244 { 245 return Str.toString(vte_terminal_get_current_file_uri(vteTerminal)); 246 } 247 248 /** 249 * Returns the currently set cursor blink mode. 250 * 251 * Return: cursor blink mode. 252 */ 253 public VteCursorBlinkMode getCursorBlinkMode() 254 { 255 return vte_terminal_get_cursor_blink_mode(vteTerminal); 256 } 257 258 /** 259 * Reads the location of the insertion cursor and returns it. The row 260 * coordinate is absolute. 261 * 262 * Params: 263 * column = a location to store the column, or %NULL 264 * row = a location to store the row, or %NULL 265 */ 266 public void getCursorPosition(out glong column, out glong row) 267 { 268 vte_terminal_get_cursor_position(vteTerminal, &column, &row); 269 } 270 271 /** 272 * Returns the currently set cursor shape. 273 * 274 * Return: cursor shape. 275 */ 276 public VteCursorShape getCursorShape() 277 { 278 return vte_terminal_get_cursor_shape(vteTerminal); 279 } 280 281 /** 282 * Determines the name of the encoding in which the terminal expects data to be 283 * encoded. 284 * 285 * Return: the current encoding for the terminal 286 */ 287 public string getEncoding() 288 { 289 return Str.toString(vte_terminal_get_encoding(vteTerminal)); 290 } 291 292 /** 293 * Queries the terminal for information about the fonts which will be 294 * used to draw text in the terminal. The actual font takes the font scale 295 * into account, this is not reflected in the return value, the unscaled 296 * font is returned. 297 * 298 * Return: a #PangoFontDescription describing the font the 299 * terminal uses to render text at the default font scale of 1.0. 300 */ 301 public PgFontDescription getFont() 302 { 303 auto p = vte_terminal_get_font(vteTerminal); 304 305 if(p is null) 306 { 307 return null; 308 } 309 310 return ObjectG.getDObject!(PgFontDescription)(cast(PangoFontDescription*) p); 311 } 312 313 /** 314 * Return: the terminal's font scale 315 */ 316 public double getFontScale() 317 { 318 return vte_terminal_get_font_scale(vteTerminal); 319 } 320 321 /** 322 * Fills in some @hints from @terminal's geometry. The hints 323 * filled are those covered by the %GDK_HINT_RESIZE_INC, 324 * %GDK_HINT_MIN_SIZE and %GDK_HINT_BASE_SIZE flags. 325 * 326 * See gtk_window_set_geometry_hints() for more information. 327 * 328 * @terminal must be realized (see gtk_widget_get_realized()). 329 * 330 * Params: 331 * hints = a #GdkGeometry to fill in 332 * minRows = the minimum number of rows to request 333 * minColumns = the minimum number of columns to request 334 */ 335 public void getGeometryHints(out GdkGeometry hints, int minRows, int minColumns) 336 { 337 vte_terminal_get_geometry_hints(vteTerminal, &hints, minRows, minColumns); 338 } 339 340 /** 341 * Checks if the terminal currently contains selected text. Note that this 342 * is different from determining if the terminal is the owner of any 343 * #GtkClipboard items. 344 * 345 * Return: %TRUE if part of the text in the terminal is selected. 346 */ 347 public bool getHasSelection() 348 { 349 return vte_terminal_get_has_selection(vteTerminal) != 0; 350 } 351 352 /** 353 * Return: the icon title 354 */ 355 public string getIconTitle() 356 { 357 return Str.toString(vte_terminal_get_icon_title(vteTerminal)); 358 } 359 360 /** 361 * Returns whether the terminal allow user input. 362 */ 363 public bool getInputEnabled() 364 { 365 return vte_terminal_get_input_enabled(vteTerminal) != 0; 366 } 367 368 /** 369 * Determines the value of the terminal's mouse autohide setting. When 370 * autohiding is enabled, the mouse cursor will be hidden when the user presses 371 * a key and shown when the user moves the mouse. This setting can be changed 372 * using vte_terminal_set_mouse_autohide(). 373 * 374 * Return: %TRUE if autohiding is enabled, %FALSE if not 375 */ 376 public bool getMouseAutohide() 377 { 378 return vte_terminal_get_mouse_autohide(vteTerminal) != 0; 379 } 380 381 /** 382 * Returns the #VtePty of @terminal. 383 * 384 * Return: a #VtePty, or %NULL 385 */ 386 public Pty getPty() 387 { 388 auto p = vte_terminal_get_pty(vteTerminal); 389 390 if(p is null) 391 { 392 return null; 393 } 394 395 return ObjectG.getDObject!(Pty)(cast(VtePty*) p); 396 } 397 398 /** 399 * Checks whether or not the terminal will rewrap its contents upon resize. 400 * 401 * Return: %TRUE if rewrapping is enabled, %FALSE if not 402 */ 403 public bool getRewrapOnResize() 404 { 405 return vte_terminal_get_rewrap_on_resize(vteTerminal) != 0; 406 } 407 408 /** 409 * Return: the number of rows 410 */ 411 public glong getRowCount() 412 { 413 return vte_terminal_get_row_count(vteTerminal); 414 } 415 416 /** 417 * Extracts a view of the visible part of the terminal. If @is_selected is not 418 * %NULL, characters will only be read if @is_selected returns %TRUE after being 419 * passed the column and row, respectively. A #VteCharAttributes structure 420 * is added to @attributes for each byte added to the returned string detailing 421 * the character's position, colors, and other characteristics. 422 * 423 * Params: 424 * isSelected = a #VteSelectionFunc callback 425 * userData = user data to be passed to the callback 426 * attributes = location for storing text attributes 427 * 428 * Return: a newly allocated text string, or %NULL. 429 */ 430 public string getText(VteSelectionFunc isSelected, void* userData, out ArrayG attributes) 431 { 432 GArray* outattributes = new GArray; 433 434 auto p = vte_terminal_get_text(vteTerminal, isSelected, userData, outattributes); 435 436 attributes = new ArrayG(outattributes); 437 438 return Str.toString(p); 439 } 440 441 /** 442 * Extracts a view of the visible part of the terminal. If @is_selected is not 443 * %NULL, characters will only be read if @is_selected returns %TRUE after being 444 * passed the column and row, respectively. A #VteCharAttributes structure 445 * is added to @attributes for each byte added to the returned string detailing 446 * the character's position, colors, and other characteristics. This function 447 * differs from vte_terminal_get_text() in that trailing spaces at the end of 448 * lines are included. 449 * 450 * Params: 451 * isSelected = a #VteSelectionFunc callback 452 * userData = user data to be passed to the callback 453 * attributes = location for storing text attributes 454 * 455 * Return: a newly allocated text string, or %NULL. 456 */ 457 public string getTextIncludeTrailingSpaces(VteSelectionFunc isSelected, void* userData, out ArrayG attributes) 458 { 459 GArray* outattributes = new GArray; 460 461 auto p = vte_terminal_get_text_include_trailing_spaces(vteTerminal, isSelected, userData, outattributes); 462 463 attributes = new ArrayG(outattributes); 464 465 return Str.toString(p); 466 } 467 468 /** 469 * Extracts a view of the visible part of the terminal. If @is_selected is not 470 * %NULL, characters will only be read if @is_selected returns %TRUE after being 471 * passed the column and row, respectively. A #VteCharAttributes structure 472 * is added to @attributes for each byte added to the returned string detailing 473 * the character's position, colors, and other characteristics. The 474 * entire scrollback buffer is scanned, so it is possible to read the entire 475 * contents of the buffer using this function. 476 * 477 * Params: 478 * startRow = first row to search for data 479 * startCol = first column to search for data 480 * endRow = last row to search for data 481 * endCol = last column to search for data 482 * isSelected = a #VteSelectionFunc callback 483 * userData = user data to be passed to the callback 484 * attributes = location for storing text attributes 485 * 486 * Return: a newly allocated text string, or %NULL. 487 */ 488 public string getTextRange(glong startRow, glong startCol, glong endRow, glong endCol, VteSelectionFunc isSelected, void* userData, out ArrayG attributes) 489 { 490 GArray* outattributes = new GArray; 491 492 auto p = vte_terminal_get_text_range(vteTerminal, startRow, startCol, endRow, endCol, isSelected, userData, outattributes); 493 494 attributes = new ArrayG(outattributes); 495 496 return Str.toString(p); 497 } 498 499 /** 500 * Return: the window title 501 */ 502 public string getWindowTitle() 503 { 504 return Str.toString(vte_terminal_get_window_title(vteTerminal)); 505 } 506 507 /** 508 * Returns the set of characters which will be considered parts of a word 509 * when doing word-wise selection, in addition to the default which only 510 * considers alphanumeric characters part of a word. 511 * 512 * If %NULL, a built-in set is used. 513 * 514 * Return: a string, or %NULL 515 * 516 * Since: 0.40 517 */ 518 public string getWordCharExceptions() 519 { 520 return Str.toString(vte_terminal_get_word_char_exceptions(vteTerminal)); 521 } 522 523 /** 524 * Adds the regular expression @regex to the list of matching expressions. When the 525 * user moves the mouse cursor over a section of displayed text which matches 526 * this expression, the text will be highlighted. 527 * 528 * Params: 529 * regex = a #GRegex 530 * flags = the #GRegexMatchFlags to use when matching the regex 531 * 532 * Return: an integer associated with this expression 533 */ 534 public int matchAddGregex(Regex regex, GRegexMatchFlags flags) 535 { 536 return vte_terminal_match_add_gregex(vteTerminal, (regex is null) ? null : regex.getRegexStruct(), flags); 537 } 538 539 /** 540 * Checks if the text in and around the specified position matches any of the 541 * regular expressions previously set using vte_terminal_match_add(). If a 542 * match exists, the text string is returned and if @tag is not %NULL, the number 543 * associated with the matched regular expression will be stored in @tag. 544 * 545 * If more than one regular expression has been set with 546 * vte_terminal_match_add(), then expressions are checked in the order in 547 * which they were added. 548 * 549 * Params: 550 * column = the text column 551 * row = the text row 552 * tag = a location to store the tag, or %NULL 553 * 554 * Return: a newly allocated string which matches one of the previously 555 * set regular expressions 556 */ 557 public string matchCheck(glong column, glong row, out int tag) 558 { 559 return Str.toString(vte_terminal_match_check(vteTerminal, column, row, &tag)); 560 } 561 562 /** 563 * Checks if the text in and around the position of the event matches any of the 564 * regular expressions previously set using vte_terminal_match_add(). If a 565 * match exists, the text string is returned and if @tag is not %NULL, the number 566 * associated with the matched regular expression will be stored in @tag. 567 * 568 * If more than one regular expression has been set with 569 * vte_terminal_match_add(), then expressions are checked in the order in 570 * which they were added. 571 * 572 * Params: 573 * event = a #GdkEvent 574 * tag = a location to store the tag, or %NULL 575 * 576 * Return: a newly allocated string which matches one of the previously 577 * set regular expressions 578 */ 579 public string matchCheckEvent(Event event, out int tag) 580 { 581 return Str.toString(vte_terminal_match_check_event(vteTerminal, (event is null) ? null : event.getEventStruct(), &tag)); 582 } 583 584 /** 585 * Removes the regular expression which is associated with the given @tag from 586 * the list of expressions which the terminal will highlight when the user 587 * moves the mouse cursor over matching text. 588 * 589 * Params: 590 * tag = the tag of the regex to remove 591 */ 592 public void matchRemove(int tag) 593 { 594 vte_terminal_match_remove(vteTerminal, tag); 595 } 596 597 /** 598 * Clears the list of regular expressions the terminal uses to highlight text 599 * when the user moves the mouse cursor. 600 */ 601 public void matchRemoveAll() 602 { 603 vte_terminal_match_remove_all(vteTerminal); 604 } 605 606 /** 607 * Sets which cursor the terminal will use if the pointer is over the pattern 608 * specified by @tag. The terminal keeps a reference to @cursor. 609 * 610 * Deprecated: Use vte_terminal_match_set_cursor_type() or vte_terminal_match_set_cursor_named() instead. 611 * 612 * Params: 613 * tag = the tag of the regex which should use the specified cursor 614 * cursor = the #GdkCursor which the terminal should use when the pattern is 615 * highlighted, or %NULL to use the standard cursor 616 */ 617 public void matchSetCursor(int tag, Cursor cursor) 618 { 619 vte_terminal_match_set_cursor(vteTerminal, tag, (cursor is null) ? null : cursor.getCursorStruct()); 620 } 621 622 /** 623 * Sets which cursor the terminal will use if the pointer is over the pattern 624 * specified by @tag. 625 * 626 * Params: 627 * tag = the tag of the regex which should use the specified cursor 628 * cursorName = the name of the cursor 629 */ 630 public void matchSetCursorName(int tag, string cursorName) 631 { 632 vte_terminal_match_set_cursor_name(vteTerminal, tag, Str.toStringz(cursorName)); 633 } 634 635 /** 636 * Sets which cursor the terminal will use if the pointer is over the pattern 637 * specified by @tag. 638 * 639 * Params: 640 * tag = the tag of the regex which should use the specified cursor 641 * cursorType = a #GdkCursorType 642 */ 643 public void matchSetCursorType(int tag, GdkCursorType cursorType) 644 { 645 vte_terminal_match_set_cursor_type(vteTerminal, tag, cursorType); 646 } 647 648 /** 649 * Sends the contents of the #GDK_SELECTION_CLIPBOARD selection to the 650 * terminal's child. If necessary, the data is converted from UTF-8 to the 651 * terminal's current encoding. It's called on paste menu item, or when 652 * user presses Shift+Insert. 653 */ 654 public void pasteClipboard() 655 { 656 vte_terminal_paste_clipboard(vteTerminal); 657 } 658 659 /** 660 * Sends the contents of the #GDK_SELECTION_PRIMARY selection to the terminal's 661 * child. If necessary, the data is converted from UTF-8 to the terminal's 662 * current encoding. The terminal will call also paste the 663 * #GDK_SELECTION_PRIMARY selection when the user clicks with the the second 664 * mouse button. 665 */ 666 public void pastePrimary() 667 { 668 vte_terminal_paste_primary(vteTerminal); 669 } 670 671 /** 672 * Creates a new #VtePty, and sets the emulation property 673 * from #VteTerminal:emulation. 674 * 675 * See vte_pty_new() for more information. 676 * 677 * Params: 678 * flags = flags from #VtePtyFlags 679 * cancellable = a #GCancellable, or %NULL 680 * 681 * Return: a new #VtePty 682 * 683 * Throws: GException on failure. 684 */ 685 public Pty ptyNewSync(VtePtyFlags flags, Cancellable cancellable) 686 { 687 GError* err = null; 688 689 auto p = vte_terminal_pty_new_sync(vteTerminal, flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); 690 691 if (err !is null) 692 { 693 throw new GException( new ErrorG(err) ); 694 } 695 696 if(p is null) 697 { 698 return null; 699 } 700 701 return ObjectG.getDObject!(Pty)(cast(VtePty*) p, true); 702 } 703 704 /** 705 * Resets as much of the terminal's internal state as possible, discarding any 706 * unprocessed input data, resetting character attributes, cursor state, 707 * national character set state, status line, terminal modes (insert/delete), 708 * selection state, and encoding. 709 * 710 * Params: 711 * clearTabstops = whether to reset tabstops 712 * clearHistory = whether to empty the terminal's scrollback buffer 713 */ 714 public void reset(bool clearTabstops, bool clearHistory) 715 { 716 vte_terminal_reset(vteTerminal, clearTabstops, clearHistory); 717 } 718 719 /** 720 * Searches the next string matching the search regex set with 721 * vte_terminal_search_set_gregex(). 722 * 723 * Return: %TRUE if a match was found 724 */ 725 public bool searchFindNext() 726 { 727 return vte_terminal_search_find_next(vteTerminal) != 0; 728 } 729 730 /** 731 * Searches the previous string matching the search regex set with 732 * vte_terminal_search_set_gregex(). 733 * 734 * Return: %TRUE if a match was found 735 */ 736 public bool searchFindPrevious() 737 { 738 return vte_terminal_search_find_previous(vteTerminal) != 0; 739 } 740 741 /** 742 * Return: the search #GRegex regex set in @terminal, or %NULL 743 */ 744 public Regex searchGetGregex() 745 { 746 auto p = vte_terminal_search_get_gregex(vteTerminal); 747 748 if(p is null) 749 { 750 return null; 751 } 752 753 return new Regex(cast(GRegex*) p); 754 } 755 756 /** 757 * Return: whether searching will wrap around 758 */ 759 public bool searchGetWrapAround() 760 { 761 return vte_terminal_search_get_wrap_around(vteTerminal) != 0; 762 } 763 764 /** 765 * Sets the #GRegex regex to search for. Unsets the search regex when passed %NULL. 766 * 767 * Params: 768 * regex = a #GRegex, or %NULL 769 * flags = flags from #GRegexMatchFlags 770 */ 771 public void searchSetGregex(Regex regex, GRegexMatchFlags flags) 772 { 773 vte_terminal_search_set_gregex(vteTerminal, (regex is null) ? null : regex.getRegexStruct(), flags); 774 } 775 776 /** 777 * Sets whether search should wrap around to the beginning of the 778 * terminal content when reaching its end. 779 * 780 * Params: 781 * wrapAround = whether search should wrap 782 */ 783 public void searchSetWrapAround(bool wrapAround) 784 { 785 vte_terminal_search_set_wrap_around(vteTerminal, wrapAround); 786 } 787 788 /** 789 * Selects all text within the terminal (including the scrollback buffer). 790 */ 791 public void selectAll() 792 { 793 vte_terminal_select_all(vteTerminal); 794 } 795 796 /** 797 * Controls whether or not the terminal will attempt to draw bold text, 798 * either by using a bold font variant or by repainting text with a different 799 * offset. 800 * 801 * Params: 802 * allowBold = %TRUE if the terminal should attempt to draw bold text 803 */ 804 public void setAllowBold(bool allowBold) 805 { 806 vte_terminal_set_allow_bold(vteTerminal, allowBold); 807 } 808 809 /** 810 * Controls whether or not the terminal will beep when the child outputs the 811 * "bl" sequence. 812 * 813 * Params: 814 * isAudible = %TRUE if the terminal should beep 815 */ 816 public void setAudibleBell(bool isAudible) 817 { 818 vte_terminal_set_audible_bell(vteTerminal, isAudible); 819 } 820 821 /** 822 * Modifies the terminal's backspace key binding, which controls what 823 * string or control sequence the terminal sends to its child when the user 824 * presses the backspace key. 825 * 826 * Params: 827 * binding = a #VteEraseBinding for the backspace key 828 */ 829 public void setBackspaceBinding(VteEraseBinding binding) 830 { 831 vte_terminal_set_backspace_binding(vteTerminal, binding); 832 } 833 834 /** 835 * This setting controls whether ambiguous-width characters are narrow or wide 836 * when using the UTF-8 encoding (vte_terminal_set_encoding()). In all other encodings, 837 * the width of ambiguous-width characters is fixed. 838 * 839 * Params: 840 * width = either 1 (narrow) or 2 (wide) 841 */ 842 public void setCjkAmbiguousWidth(int width) 843 { 844 vte_terminal_set_cjk_ambiguous_width(vteTerminal, width); 845 } 846 847 /** 848 * Sets the background color for text which does not have a specific background 849 * color assigned. Only has effect when no background image is set and when 850 * the terminal is not transparent. 851 * 852 * Params: 853 * background = the new background color 854 */ 855 public void setColorBackground(RGBA background) 856 { 857 vte_terminal_set_color_background(vteTerminal, (background is null) ? null : background.getRGBAStruct()); 858 } 859 860 /** 861 * Sets the color used to draw bold text in the default foreground color. 862 * If @bold is %NULL then the default color is used. 863 * 864 * Params: 865 * bold = the new bold color or %NULL 866 */ 867 public void setColorBold(RGBA bold) 868 { 869 vte_terminal_set_color_bold(vteTerminal, (bold is null) ? null : bold.getRGBAStruct()); 870 } 871 872 /** 873 * Sets the background color for text which is under the cursor. If %NULL, text 874 * under the cursor will be drawn with foreground and background colors 875 * reversed. 876 * 877 * Params: 878 * cursorBackground = the new color to use for the text cursor, or %NULL 879 */ 880 public void setColorCursor(RGBA cursorBackground) 881 { 882 vte_terminal_set_color_cursor(vteTerminal, (cursorBackground is null) ? null : cursorBackground.getRGBAStruct()); 883 } 884 885 /** 886 * Sets the foreground color used to draw normal text. 887 * 888 * Params: 889 * foreground = the new foreground color 890 */ 891 public void setColorForeground(RGBA foreground) 892 { 893 vte_terminal_set_color_foreground(vteTerminal, (foreground is null) ? null : foreground.getRGBAStruct()); 894 } 895 896 /** 897 * Sets the background color for text which is highlighted. If %NULL, 898 * it is unset. If neither highlight background nor highlight foreground are set, 899 * highlighted text (which is usually highlighted because it is selected) will 900 * be drawn with foreground and background colors reversed. 901 * 902 * Params: 903 * highlightBackground = the new color to use for highlighted text, or %NULL 904 */ 905 public void setColorHighlight(RGBA highlightBackground) 906 { 907 vte_terminal_set_color_highlight(vteTerminal, (highlightBackground is null) ? null : highlightBackground.getRGBAStruct()); 908 } 909 910 /** 911 * Sets the foreground color for text which is highlighted. If %NULL, 912 * it is unset. If neither highlight background nor highlight foreground are set, 913 * highlighted text (which is usually highlighted because it is selected) will 914 * be drawn with foreground and background colors reversed. 915 * 916 * Params: 917 * highlightForeground = the new color to use for highlighted text, or %NULL 918 */ 919 public void setColorHighlightForeground(RGBA highlightForeground) 920 { 921 vte_terminal_set_color_highlight_foreground(vteTerminal, (highlightForeground is null) ? null : highlightForeground.getRGBAStruct()); 922 } 923 924 /** 925 * @palette specifies the new values for the 256 palette colors: 8 standard colors, 926 * their 8 bright counterparts, 6x6x6 color cube, and 24 grayscale colors. 927 * Omitted entries will default to a hardcoded value. 928 * 929 * @palette_size must be 0, 8, 16, 232 or 256. 930 * 931 * If @foreground is %NULL and @palette_size is greater than 0, the new foreground 932 * color is taken from @palette[7]. If @background is %NULL and @palette_size is 933 * greater than 0, the new background color is taken from @palette[0]. 934 * 935 * Params: 936 * foreground = the new foreground color, or %NULL 937 * background = the new background color, or %NULL 938 * palette = the color palette 939 * paletteSize = the number of entries in @palette 940 */ 941 public void setColors(RGBA foreground, RGBA background, RGBA[] palette) 942 { 943 GdkRGBA[] paletteArray = new GdkRGBA[palette.length]; 944 for ( int i = 0; i < palette.length; i++ ) 945 { 946 paletteArray[i] = *(palette[i].getRGBAStruct()); 947 } 948 949 vte_terminal_set_colors(vteTerminal, (foreground is null) ? null : foreground.getRGBAStruct(), (background is null) ? null : background.getRGBAStruct(), paletteArray.ptr, cast(size_t)palette.length); 950 } 951 952 /** 953 * Sets whether or not the cursor will blink. Using %VTE_CURSOR_BLINK_SYSTEM 954 * will use the #GtkSettings::gtk-cursor-blink setting. 955 * 956 * Params: 957 * mode = the #VteCursorBlinkMode to use 958 */ 959 public void setCursorBlinkMode(VteCursorBlinkMode mode) 960 { 961 vte_terminal_set_cursor_blink_mode(vteTerminal, mode); 962 } 963 964 /** 965 * Sets the shape of the cursor drawn. 966 * 967 * Params: 968 * shape = the #VteCursorShape to use 969 */ 970 public void setCursorShape(VteCursorShape shape) 971 { 972 vte_terminal_set_cursor_shape(vteTerminal, shape); 973 } 974 975 /** 976 * Reset the terminal palette to reasonable compiled-in default color. 977 */ 978 public void setDefaultColors() 979 { 980 vte_terminal_set_default_colors(vteTerminal); 981 } 982 983 /** 984 * Modifies the terminal's delete key binding, which controls what 985 * string or control sequence the terminal sends to its child when the user 986 * presses the delete key. 987 * 988 * Params: 989 * binding = a #VteEraseBinding for the delete key 990 */ 991 public void setDeleteBinding(VteEraseBinding binding) 992 { 993 vte_terminal_set_delete_binding(vteTerminal, binding); 994 } 995 996 /** 997 * Changes the encoding the terminal will expect data from the child to 998 * be encoded with. For certain terminal types, applications executing in the 999 * terminal can change the encoding. If @codeset is %NULL, it uses "UTF-8". 1000 * 1001 * Params: 1002 * codeset = a valid #GIConv target, or %NULL to use UTF-8 1003 * 1004 * Return: %TRUE if the encoding could be changed to the specified one, 1005 * or %FALSE with @error set to %G_CONVERT_ERROR_NO_CONVERSION. 1006 * 1007 * Throws: GException on failure. 1008 */ 1009 public bool setEncoding(string codeset) 1010 { 1011 GError* err = null; 1012 1013 auto p = vte_terminal_set_encoding(vteTerminal, Str.toStringz(codeset), &err) != 0; 1014 1015 if (err !is null) 1016 { 1017 throw new GException( new ErrorG(err) ); 1018 } 1019 1020 return p; 1021 } 1022 1023 /** 1024 * Sets the font used for rendering all text displayed by the terminal, 1025 * overriding any fonts set using gtk_widget_modify_font(). The terminal 1026 * will immediately attempt to load the desired font, retrieve its 1027 * metrics, and attempt to resize itself to keep the same number of rows 1028 * and columns. The font scale is applied to the specified font. 1029 * 1030 * Params: 1031 * fontDesc = a #PangoFontDescription for the desired font, or %NULL 1032 */ 1033 public void setFont(PgFontDescription fontDesc) 1034 { 1035 vte_terminal_set_font(vteTerminal, (fontDesc is null) ? null : fontDesc.getPgFontDescriptionStruct()); 1036 } 1037 1038 /** 1039 * Sets the terminal's font scale to @scale. 1040 * 1041 * Params: 1042 * scale = the font scale 1043 */ 1044 public void setFontScale(double scale) 1045 { 1046 vte_terminal_set_font_scale(vteTerminal, scale); 1047 } 1048 1049 /** 1050 * Sets @terminal as @window's geometry widget. See 1051 * gtk_window_set_geometry_hints() for more information. 1052 * 1053 * @terminal must be realized (see gtk_widget_get_realized()). 1054 * 1055 * Params: 1056 * window = a #GtkWindow 1057 */ 1058 public void setGeometryHintsForWindow(Window window) 1059 { 1060 vte_terminal_set_geometry_hints_for_window(vteTerminal, (window is null) ? null : window.getWindowStruct()); 1061 } 1062 1063 /** 1064 * Enables or disables user input. When user input is disabled, 1065 * the terminal's child will not receive any key press, or mouse button 1066 * press or motion events sent to it. 1067 * 1068 * Params: 1069 * enabled = whether to enable user input 1070 */ 1071 public void setInputEnabled(bool enabled) 1072 { 1073 vte_terminal_set_input_enabled(vteTerminal, enabled); 1074 } 1075 1076 /** 1077 * Changes the value of the terminal's mouse autohide setting. When autohiding 1078 * is enabled, the mouse cursor will be hidden when the user presses a key and 1079 * shown when the user moves the mouse. This setting can be read using 1080 * vte_terminal_get_mouse_autohide(). 1081 * 1082 * Params: 1083 * setting = whether the mouse pointer should autohide 1084 */ 1085 public void setMouseAutohide(bool setting) 1086 { 1087 vte_terminal_set_mouse_autohide(vteTerminal, setting); 1088 } 1089 1090 /** 1091 * Sets @pty as the PTY to use in @terminal. 1092 * Use %NULL to unset the PTY. 1093 * 1094 * Params: 1095 * pty = a #VtePty, or %NULL 1096 */ 1097 public void setPty(Pty pty) 1098 { 1099 vte_terminal_set_pty(vteTerminal, (pty is null) ? null : pty.getPtyStruct()); 1100 } 1101 1102 /** 1103 * Controls whether or not the terminal will rewrap its contents, including 1104 * the scrollback history, whenever the terminal's width changes. 1105 * 1106 * Params: 1107 * rewrap = %TRUE if the terminal should rewrap on resize 1108 */ 1109 public void setRewrapOnResize(bool rewrap) 1110 { 1111 vte_terminal_set_rewrap_on_resize(vteTerminal, rewrap); 1112 } 1113 1114 /** 1115 * Controls whether or not the terminal will forcibly scroll to the bottom of 1116 * the viewable history when the user presses a key. Modifier keys do not 1117 * trigger this behavior. 1118 * 1119 * Params: 1120 * scroll = whether the terminal should scroll on keystrokes 1121 */ 1122 public void setScrollOnKeystroke(bool scroll) 1123 { 1124 vte_terminal_set_scroll_on_keystroke(vteTerminal, scroll); 1125 } 1126 1127 /** 1128 * Controls whether or not the terminal will forcibly scroll to the bottom of 1129 * the viewable history when the new data is received from the child. 1130 * 1131 * Params: 1132 * scroll = whether the terminal should scroll on output 1133 */ 1134 public void setScrollOnOutput(bool scroll) 1135 { 1136 vte_terminal_set_scroll_on_output(vteTerminal, scroll); 1137 } 1138 1139 /** 1140 * Sets the length of the scrollback buffer used by the terminal. The size of 1141 * the scrollback buffer will be set to the larger of this value and the number 1142 * of visible rows the widget can display, so 0 can safely be used to disable 1143 * scrollback. 1144 * 1145 * A negative value means "infinite scrollback". 1146 * 1147 * Note that this setting only affects the normal screen buffer. 1148 * For terminal types which have an alternate screen buffer, no scrollback is 1149 * allowed on the alternate screen buffer. 1150 * 1151 * Params: 1152 * lines = the length of the history buffer 1153 */ 1154 public void setScrollbackLines(glong lines) 1155 { 1156 vte_terminal_set_scrollback_lines(vteTerminal, lines); 1157 } 1158 1159 /** 1160 * Attempts to change the terminal's size in terms of rows and columns. If 1161 * the attempt succeeds, the widget will resize itself to the proper size. 1162 * 1163 * Params: 1164 * columns = the desired number of columns 1165 * rows = the desired number of rows 1166 */ 1167 public void setSize(glong columns, glong rows) 1168 { 1169 vte_terminal_set_size(vteTerminal, columns, rows); 1170 } 1171 1172 /** 1173 * With this function you can provide a set of characters which will 1174 * be considered parts of a word when doing word-wise selection, in 1175 * addition to the default which only considers alphanumeric characters 1176 * part of a word. 1177 * 1178 * The characters in @exceptions must be non-alphanumeric, each character 1179 * must occur only once, and if @exceptions contains the character 1180 * U+002D HYPHEN-MINUS, it must be at the start of the string. 1181 * 1182 * Use %NULL to reset the set of exception characters to the default. 1183 * 1184 * Params: 1185 * exceptions = a string of ASCII punctuation characters, or %NULL 1186 * 1187 * Since: 0.40 1188 */ 1189 public void setWordCharExceptions(string exceptions) 1190 { 1191 vte_terminal_set_word_char_exceptions(vteTerminal, Str.toStringz(exceptions)); 1192 } 1193 1194 /** 1195 * Starts the specified command under a newly-allocated controlling 1196 * pseudo-terminal. The @argv and @envv lists should be %NULL-terminated. 1197 * The "TERM" environment variable is automatically set to a default value, 1198 * but can be overridden from @envv. 1199 * @pty_flags controls logging the session to the specified system log files. 1200 * 1201 * Note that %G_SPAWN_DO_NOT_REAP_CHILD will always be added to @spawn_flags. 1202 * 1203 * Note that unless @spawn_flags contains %G_SPAWN_LEAVE_DESCRIPTORS_OPEN, all file 1204 * descriptors except stdin/stdout/stderr will be closed before calling exec() 1205 * in the child. 1206 * 1207 * See vte_pty_new(), g_spawn_async() and vte_terminal_watch_child() for more information. 1208 * 1209 * Params: 1210 * ptyFlags = flags from #VtePtyFlags 1211 * workingDirectory = the name of a directory the command should start 1212 * in, or %NULL to use the current working directory 1213 * argv = child's argument vector 1214 * envv = a list of environment 1215 * variables to be added to the environment before starting the process, or %NULL 1216 * spawnFlags = flags from #GSpawnFlags 1217 * childSetup = an extra child setup function to run in the child just before exec(), or %NULL 1218 * childSetupData = user data for @child_setup 1219 * childPid = a location to store the child PID, or %NULL 1220 * cancellable = a #GCancellable, or %NULL 1221 * 1222 * Return: %TRUE on success, or %FALSE on error with @error filled in 1223 * 1224 * Throws: GException on failure. 1225 */ 1226 public bool spawnSync(VtePtyFlags ptyFlags, string workingDirectory, string[] argv, string[] envv, GSpawnFlags spawnFlags, GSpawnChildSetupFunc childSetup, void* childSetupData, out GPid childPid, Cancellable cancellable) 1227 { 1228 GError* err = null; 1229 1230 auto p = vte_terminal_spawn_sync(vteTerminal, ptyFlags, Str.toStringz(workingDirectory), Str.toStringzArray(argv), Str.toStringzArray(envv), spawnFlags, childSetup, childSetupData, &childPid, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; 1231 1232 if (err !is null) 1233 { 1234 throw new GException( new ErrorG(err) ); 1235 } 1236 1237 return p; 1238 } 1239 1240 /** 1241 * Clears the current selection. 1242 */ 1243 public void unselectAll() 1244 { 1245 vte_terminal_unselect_all(vteTerminal); 1246 } 1247 1248 /** 1249 * Watches @child_pid. When the process exists, the #VteTerminal::child-exited 1250 * signal will be called with the child's exit status. 1251 * 1252 * Prior to calling this function, a #VtePty must have been set in @terminal 1253 * using vte_terminal_set_pty(). 1254 * When the child exits, the terminal's #VtePty will be set to %NULL. 1255 * 1256 * Note: g_child_watch_add() or g_child_watch_add_full() must not have 1257 * been called for @child_pid, nor a #GSource for it been created with 1258 * g_child_watch_source_new(). 1259 * 1260 * Note: when using the g_spawn_async() family of functions, 1261 * the %G_SPAWN_DO_NOT_REAP_CHILD flag MUST have been passed. 1262 * 1263 * Params: 1264 * childPid = a #GPid 1265 */ 1266 public void watchChild(GPid childPid) 1267 { 1268 vte_terminal_watch_child(vteTerminal, childPid); 1269 } 1270 1271 /** 1272 * Write contents of the current contents of @terminal (including any 1273 * scrollback history) to @stream according to @flags. 1274 * 1275 * If @cancellable is not %NULL, then the operation can be cancelled by triggering 1276 * the cancellable object from another thread. If the operation was cancelled, 1277 * the error %G_IO_ERROR_CANCELLED will be returned in @error. 1278 * 1279 * This is a synchronous operation and will make the widget (and input 1280 * processing) during the write operation, which may take a long time 1281 * depending on scrollback history and @stream availability for writing. 1282 * 1283 * Params: 1284 * stream = a #GOutputStream to write to 1285 * flags = a set of #VteWriteFlags 1286 * cancellable = a #GCancellable object, or %NULL 1287 * 1288 * Return: %TRUE on success, %FALSE if there was an error 1289 * 1290 * Throws: GException on failure. 1291 */ 1292 public bool writeContentsSync(OutputStream stream, VteWriteFlags flags, Cancellable cancellable) 1293 { 1294 GError* err = null; 1295 1296 auto p = vte_terminal_write_contents_sync(vteTerminal, (stream is null) ? null : stream.getOutputStreamStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; 1297 1298 if (err !is null) 1299 { 1300 throw new GException( new ErrorG(err) ); 1301 } 1302 1303 return p; 1304 } 1305 1306 int[string] connectedSignals; 1307 1308 void delegate(Terminal)[] onBellListeners; 1309 /** 1310 * This signal is emitted when the a child sends a bell request to the 1311 * terminal. 1312 */ 1313 void addOnBell(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1314 { 1315 if ( "bell" !in connectedSignals ) 1316 { 1317 Signals.connectData( 1318 this, 1319 "bell", 1320 cast(GCallback)&callBackBell, 1321 cast(void*)this, 1322 null, 1323 connectFlags); 1324 connectedSignals["bell"] = 1; 1325 } 1326 onBellListeners ~= dlg; 1327 } 1328 extern(C) static void callBackBell(VteTerminal* terminalStruct, Terminal _terminal) 1329 { 1330 foreach ( void delegate(Terminal) dlg; _terminal.onBellListeners ) 1331 { 1332 dlg(_terminal); 1333 } 1334 } 1335 1336 void delegate(uint, uint, Terminal)[] onCharSizeChangedListeners; 1337 /** 1338 * Emitted whenever selection of a new font causes the values of the 1339 * %char_width or %char_height fields to change. 1340 * 1341 * Params: 1342 * width = the new character cell width 1343 * height = the new character cell height 1344 */ 1345 void addOnCharSizeChanged(void delegate(uint, uint, Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1346 { 1347 if ( "char-size-changed" !in connectedSignals ) 1348 { 1349 Signals.connectData( 1350 this, 1351 "char-size-changed", 1352 cast(GCallback)&callBackCharSizeChanged, 1353 cast(void*)this, 1354 null, 1355 connectFlags); 1356 connectedSignals["char-size-changed"] = 1; 1357 } 1358 onCharSizeChangedListeners ~= dlg; 1359 } 1360 extern(C) static void callBackCharSizeChanged(VteTerminal* terminalStruct, uint width, uint height, Terminal _terminal) 1361 { 1362 foreach ( void delegate(uint, uint, Terminal) dlg; _terminal.onCharSizeChangedListeners ) 1363 { 1364 dlg(width, height, _terminal); 1365 } 1366 } 1367 1368 void delegate(int, Terminal)[] onChildExitedListeners; 1369 /** 1370 * This signal is emitted when the terminal detects that a child 1371 * watched using vte_terminal_watch_child() has exited. 1372 * 1373 * Params: 1374 * status = the child's exit status 1375 */ 1376 void addOnChildExited(void delegate(int, Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1377 { 1378 if ( "child-exited" !in connectedSignals ) 1379 { 1380 Signals.connectData( 1381 this, 1382 "child-exited", 1383 cast(GCallback)&callBackChildExited, 1384 cast(void*)this, 1385 null, 1386 connectFlags); 1387 connectedSignals["child-exited"] = 1; 1388 } 1389 onChildExitedListeners ~= dlg; 1390 } 1391 extern(C) static void callBackChildExited(VteTerminal* terminalStruct, int status, Terminal _terminal) 1392 { 1393 foreach ( void delegate(int, Terminal) dlg; _terminal.onChildExitedListeners ) 1394 { 1395 dlg(status, _terminal); 1396 } 1397 } 1398 1399 void delegate(string, uint, Terminal)[] onCommitListeners; 1400 /** 1401 * Emitted whenever the terminal receives input from the user and 1402 * prepares to send it to the child process. The signal is emitted even 1403 * when there is no child process. 1404 * 1405 * Params: 1406 * text = a string of text 1407 * size = the length of that string of text 1408 */ 1409 void addOnCommit(void delegate(string, uint, Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1410 { 1411 if ( "commit" !in connectedSignals ) 1412 { 1413 Signals.connectData( 1414 this, 1415 "commit", 1416 cast(GCallback)&callBackCommit, 1417 cast(void*)this, 1418 null, 1419 connectFlags); 1420 connectedSignals["commit"] = 1; 1421 } 1422 onCommitListeners ~= dlg; 1423 } 1424 extern(C) static void callBackCommit(VteTerminal* terminalStruct, char* text, uint size, Terminal _terminal) 1425 { 1426 foreach ( void delegate(string, uint, Terminal) dlg; _terminal.onCommitListeners ) 1427 { 1428 dlg(Str.toString(text), size, _terminal); 1429 } 1430 } 1431 1432 void delegate(Terminal)[] onContentsChangedListeners; 1433 /** 1434 * Emitted whenever the visible appearance of the terminal has changed. 1435 * Used primarily by #VteTerminalAccessible. 1436 */ 1437 void addOnContentsChanged(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1438 { 1439 if ( "contents-changed" !in connectedSignals ) 1440 { 1441 Signals.connectData( 1442 this, 1443 "contents-changed", 1444 cast(GCallback)&callBackContentsChanged, 1445 cast(void*)this, 1446 null, 1447 connectFlags); 1448 connectedSignals["contents-changed"] = 1; 1449 } 1450 onContentsChangedListeners ~= dlg; 1451 } 1452 extern(C) static void callBackContentsChanged(VteTerminal* terminalStruct, Terminal _terminal) 1453 { 1454 foreach ( void delegate(Terminal) dlg; _terminal.onContentsChangedListeners ) 1455 { 1456 dlg(_terminal); 1457 } 1458 } 1459 1460 void delegate(Terminal)[] onCopyClipboardListeners; 1461 /** 1462 * Emitted whenever vte_terminal_copy_clipboard() is called. 1463 */ 1464 void addOnCopyClipboard(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1465 { 1466 if ( "copy-clipboard" !in connectedSignals ) 1467 { 1468 Signals.connectData( 1469 this, 1470 "copy-clipboard", 1471 cast(GCallback)&callBackCopyClipboard, 1472 cast(void*)this, 1473 null, 1474 connectFlags); 1475 connectedSignals["copy-clipboard"] = 1; 1476 } 1477 onCopyClipboardListeners ~= dlg; 1478 } 1479 extern(C) static void callBackCopyClipboard(VteTerminal* terminalStruct, Terminal _terminal) 1480 { 1481 foreach ( void delegate(Terminal) dlg; _terminal.onCopyClipboardListeners ) 1482 { 1483 dlg(_terminal); 1484 } 1485 } 1486 1487 void delegate(Terminal)[] onCurrentDirectoryUriChangedListeners; 1488 /** 1489 * Emitted when the current directory URI is modified. 1490 */ 1491 void addOnCurrentDirectoryUriChanged(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1492 { 1493 if ( "current-directory-uri-changed" !in connectedSignals ) 1494 { 1495 Signals.connectData( 1496 this, 1497 "current-directory-uri-changed", 1498 cast(GCallback)&callBackCurrentDirectoryUriChanged, 1499 cast(void*)this, 1500 null, 1501 connectFlags); 1502 connectedSignals["current-directory-uri-changed"] = 1; 1503 } 1504 onCurrentDirectoryUriChangedListeners ~= dlg; 1505 } 1506 extern(C) static void callBackCurrentDirectoryUriChanged(VteTerminal* terminalStruct, Terminal _terminal) 1507 { 1508 foreach ( void delegate(Terminal) dlg; _terminal.onCurrentDirectoryUriChangedListeners ) 1509 { 1510 dlg(_terminal); 1511 } 1512 } 1513 1514 void delegate(Terminal)[] onCurrentFileUriChangedListeners; 1515 /** 1516 * Emitted when the current file URI is modified. 1517 */ 1518 void addOnCurrentFileUriChanged(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1519 { 1520 if ( "current-file-uri-changed" !in connectedSignals ) 1521 { 1522 Signals.connectData( 1523 this, 1524 "current-file-uri-changed", 1525 cast(GCallback)&callBackCurrentFileUriChanged, 1526 cast(void*)this, 1527 null, 1528 connectFlags); 1529 connectedSignals["current-file-uri-changed"] = 1; 1530 } 1531 onCurrentFileUriChangedListeners ~= dlg; 1532 } 1533 extern(C) static void callBackCurrentFileUriChanged(VteTerminal* terminalStruct, Terminal _terminal) 1534 { 1535 foreach ( void delegate(Terminal) dlg; _terminal.onCurrentFileUriChangedListeners ) 1536 { 1537 dlg(_terminal); 1538 } 1539 } 1540 1541 void delegate(Terminal)[] onCursorMovedListeners; 1542 /** 1543 * Emitted whenever the cursor moves to a new character cell. Used 1544 * primarily by #VteTerminalAccessible. 1545 */ 1546 void addOnCursorMoved(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1547 { 1548 if ( "cursor-moved" !in connectedSignals ) 1549 { 1550 Signals.connectData( 1551 this, 1552 "cursor-moved", 1553 cast(GCallback)&callBackCursorMoved, 1554 cast(void*)this, 1555 null, 1556 connectFlags); 1557 connectedSignals["cursor-moved"] = 1; 1558 } 1559 onCursorMovedListeners ~= dlg; 1560 } 1561 extern(C) static void callBackCursorMoved(VteTerminal* terminalStruct, Terminal _terminal) 1562 { 1563 foreach ( void delegate(Terminal) dlg; _terminal.onCursorMovedListeners ) 1564 { 1565 dlg(_terminal); 1566 } 1567 } 1568 1569 void delegate(Terminal)[] onDecreaseFontSizeListeners; 1570 /** 1571 * Emitted when the user hits the '-' key while holding the Control key. 1572 */ 1573 void addOnDecreaseFontSize(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1574 { 1575 if ( "decrease-font-size" !in connectedSignals ) 1576 { 1577 Signals.connectData( 1578 this, 1579 "decrease-font-size", 1580 cast(GCallback)&callBackDecreaseFontSize, 1581 cast(void*)this, 1582 null, 1583 connectFlags); 1584 connectedSignals["decrease-font-size"] = 1; 1585 } 1586 onDecreaseFontSizeListeners ~= dlg; 1587 } 1588 extern(C) static void callBackDecreaseFontSize(VteTerminal* terminalStruct, Terminal _terminal) 1589 { 1590 foreach ( void delegate(Terminal) dlg; _terminal.onDecreaseFontSizeListeners ) 1591 { 1592 dlg(_terminal); 1593 } 1594 } 1595 1596 void delegate(Terminal)[] onDeiconifyWindowListeners; 1597 /** 1598 * Emitted at the child application's request. 1599 */ 1600 void addOnDeiconifyWindow(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1601 { 1602 if ( "deiconify-window" !in connectedSignals ) 1603 { 1604 Signals.connectData( 1605 this, 1606 "deiconify-window", 1607 cast(GCallback)&callBackDeiconifyWindow, 1608 cast(void*)this, 1609 null, 1610 connectFlags); 1611 connectedSignals["deiconify-window"] = 1; 1612 } 1613 onDeiconifyWindowListeners ~= dlg; 1614 } 1615 extern(C) static void callBackDeiconifyWindow(VteTerminal* terminalStruct, Terminal _terminal) 1616 { 1617 foreach ( void delegate(Terminal) dlg; _terminal.onDeiconifyWindowListeners ) 1618 { 1619 dlg(_terminal); 1620 } 1621 } 1622 1623 void delegate(Terminal)[] onEncodingChangedListeners; 1624 /** 1625 * Emitted whenever the terminal's current encoding has changed, either 1626 * as a result of receiving a control sequence which toggled between the 1627 * local and UTF-8 encodings, or at the parent application's request. 1628 */ 1629 void addOnEncodingChanged(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1630 { 1631 if ( "encoding-changed" !in connectedSignals ) 1632 { 1633 Signals.connectData( 1634 this, 1635 "encoding-changed", 1636 cast(GCallback)&callBackEncodingChanged, 1637 cast(void*)this, 1638 null, 1639 connectFlags); 1640 connectedSignals["encoding-changed"] = 1; 1641 } 1642 onEncodingChangedListeners ~= dlg; 1643 } 1644 extern(C) static void callBackEncodingChanged(VteTerminal* terminalStruct, Terminal _terminal) 1645 { 1646 foreach ( void delegate(Terminal) dlg; _terminal.onEncodingChangedListeners ) 1647 { 1648 dlg(_terminal); 1649 } 1650 } 1651 1652 void delegate(Terminal)[] onEofListeners; 1653 /** 1654 * Emitted when the terminal receives an end-of-file from a child which 1655 * is running in the terminal. This signal is frequently (but not 1656 * always) emitted with a #VteTerminal::child-exited signal. 1657 */ 1658 void addOnEof(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1659 { 1660 if ( "eof" !in connectedSignals ) 1661 { 1662 Signals.connectData( 1663 this, 1664 "eof", 1665 cast(GCallback)&callBackEof, 1666 cast(void*)this, 1667 null, 1668 connectFlags); 1669 connectedSignals["eof"] = 1; 1670 } 1671 onEofListeners ~= dlg; 1672 } 1673 extern(C) static void callBackEof(VteTerminal* terminalStruct, Terminal _terminal) 1674 { 1675 foreach ( void delegate(Terminal) dlg; _terminal.onEofListeners ) 1676 { 1677 dlg(_terminal); 1678 } 1679 } 1680 1681 void delegate(Terminal)[] onIconTitleChangedListeners; 1682 /** 1683 * Emitted when the terminal's %icon_title field is modified. 1684 */ 1685 void addOnIconTitleChanged(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1686 { 1687 if ( "icon-title-changed" !in connectedSignals ) 1688 { 1689 Signals.connectData( 1690 this, 1691 "icon-title-changed", 1692 cast(GCallback)&callBackIconTitleChanged, 1693 cast(void*)this, 1694 null, 1695 connectFlags); 1696 connectedSignals["icon-title-changed"] = 1; 1697 } 1698 onIconTitleChangedListeners ~= dlg; 1699 } 1700 extern(C) static void callBackIconTitleChanged(VteTerminal* terminalStruct, Terminal _terminal) 1701 { 1702 foreach ( void delegate(Terminal) dlg; _terminal.onIconTitleChangedListeners ) 1703 { 1704 dlg(_terminal); 1705 } 1706 } 1707 1708 void delegate(Terminal)[] onIconifyWindowListeners; 1709 /** 1710 * Emitted at the child application's request. 1711 */ 1712 void addOnIconifyWindow(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1713 { 1714 if ( "iconify-window" !in connectedSignals ) 1715 { 1716 Signals.connectData( 1717 this, 1718 "iconify-window", 1719 cast(GCallback)&callBackIconifyWindow, 1720 cast(void*)this, 1721 null, 1722 connectFlags); 1723 connectedSignals["iconify-window"] = 1; 1724 } 1725 onIconifyWindowListeners ~= dlg; 1726 } 1727 extern(C) static void callBackIconifyWindow(VteTerminal* terminalStruct, Terminal _terminal) 1728 { 1729 foreach ( void delegate(Terminal) dlg; _terminal.onIconifyWindowListeners ) 1730 { 1731 dlg(_terminal); 1732 } 1733 } 1734 1735 void delegate(Terminal)[] onIncreaseFontSizeListeners; 1736 /** 1737 * Emitted when the user hits the '+' key while holding the Control key. 1738 */ 1739 void addOnIncreaseFontSize(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1740 { 1741 if ( "increase-font-size" !in connectedSignals ) 1742 { 1743 Signals.connectData( 1744 this, 1745 "increase-font-size", 1746 cast(GCallback)&callBackIncreaseFontSize, 1747 cast(void*)this, 1748 null, 1749 connectFlags); 1750 connectedSignals["increase-font-size"] = 1; 1751 } 1752 onIncreaseFontSizeListeners ~= dlg; 1753 } 1754 extern(C) static void callBackIncreaseFontSize(VteTerminal* terminalStruct, Terminal _terminal) 1755 { 1756 foreach ( void delegate(Terminal) dlg; _terminal.onIncreaseFontSizeListeners ) 1757 { 1758 dlg(_terminal); 1759 } 1760 } 1761 1762 void delegate(Terminal)[] onLowerWindowListeners; 1763 /** 1764 * Emitted at the child application's request. 1765 */ 1766 void addOnLowerWindow(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1767 { 1768 if ( "lower-window" !in connectedSignals ) 1769 { 1770 Signals.connectData( 1771 this, 1772 "lower-window", 1773 cast(GCallback)&callBackLowerWindow, 1774 cast(void*)this, 1775 null, 1776 connectFlags); 1777 connectedSignals["lower-window"] = 1; 1778 } 1779 onLowerWindowListeners ~= dlg; 1780 } 1781 extern(C) static void callBackLowerWindow(VteTerminal* terminalStruct, Terminal _terminal) 1782 { 1783 foreach ( void delegate(Terminal) dlg; _terminal.onLowerWindowListeners ) 1784 { 1785 dlg(_terminal); 1786 } 1787 } 1788 1789 void delegate(Terminal)[] onMaximizeWindowListeners; 1790 /** 1791 * Emitted at the child application's request. 1792 */ 1793 void addOnMaximizeWindow(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1794 { 1795 if ( "maximize-window" !in connectedSignals ) 1796 { 1797 Signals.connectData( 1798 this, 1799 "maximize-window", 1800 cast(GCallback)&callBackMaximizeWindow, 1801 cast(void*)this, 1802 null, 1803 connectFlags); 1804 connectedSignals["maximize-window"] = 1; 1805 } 1806 onMaximizeWindowListeners ~= dlg; 1807 } 1808 extern(C) static void callBackMaximizeWindow(VteTerminal* terminalStruct, Terminal _terminal) 1809 { 1810 foreach ( void delegate(Terminal) dlg; _terminal.onMaximizeWindowListeners ) 1811 { 1812 dlg(_terminal); 1813 } 1814 } 1815 1816 void delegate(uint, uint, Terminal)[] onMoveWindowListeners; 1817 /** 1818 * Emitted at the child application's request. 1819 * 1820 * Params: 1821 * x = the terminal's desired location, X coordinate 1822 * y = the terminal's desired location, Y coordinate 1823 */ 1824 void addOnMoveWindow(void delegate(uint, uint, Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1825 { 1826 if ( "move-window" !in connectedSignals ) 1827 { 1828 Signals.connectData( 1829 this, 1830 "move-window", 1831 cast(GCallback)&callBackMoveWindow, 1832 cast(void*)this, 1833 null, 1834 connectFlags); 1835 connectedSignals["move-window"] = 1; 1836 } 1837 onMoveWindowListeners ~= dlg; 1838 } 1839 extern(C) static void callBackMoveWindow(VteTerminal* terminalStruct, uint x, uint y, Terminal _terminal) 1840 { 1841 foreach ( void delegate(uint, uint, Terminal) dlg; _terminal.onMoveWindowListeners ) 1842 { 1843 dlg(x, y, _terminal); 1844 } 1845 } 1846 1847 void delegate(Terminal)[] onPasteClipboardListeners; 1848 /** 1849 * Emitted whenever vte_terminal_paste_clipboard() is called. 1850 */ 1851 void addOnPasteClipboard(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1852 { 1853 if ( "paste-clipboard" !in connectedSignals ) 1854 { 1855 Signals.connectData( 1856 this, 1857 "paste-clipboard", 1858 cast(GCallback)&callBackPasteClipboard, 1859 cast(void*)this, 1860 null, 1861 connectFlags); 1862 connectedSignals["paste-clipboard"] = 1; 1863 } 1864 onPasteClipboardListeners ~= dlg; 1865 } 1866 extern(C) static void callBackPasteClipboard(VteTerminal* terminalStruct, Terminal _terminal) 1867 { 1868 foreach ( void delegate(Terminal) dlg; _terminal.onPasteClipboardListeners ) 1869 { 1870 dlg(_terminal); 1871 } 1872 } 1873 1874 void delegate(Terminal)[] onRaiseWindowListeners; 1875 /** 1876 * Emitted at the child application's request. 1877 */ 1878 void addOnRaiseWindow(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1879 { 1880 if ( "raise-window" !in connectedSignals ) 1881 { 1882 Signals.connectData( 1883 this, 1884 "raise-window", 1885 cast(GCallback)&callBackRaiseWindow, 1886 cast(void*)this, 1887 null, 1888 connectFlags); 1889 connectedSignals["raise-window"] = 1; 1890 } 1891 onRaiseWindowListeners ~= dlg; 1892 } 1893 extern(C) static void callBackRaiseWindow(VteTerminal* terminalStruct, Terminal _terminal) 1894 { 1895 foreach ( void delegate(Terminal) dlg; _terminal.onRaiseWindowListeners ) 1896 { 1897 dlg(_terminal); 1898 } 1899 } 1900 1901 void delegate(Terminal)[] onRefreshWindowListeners; 1902 /** 1903 * Emitted at the child application's request. 1904 */ 1905 void addOnRefreshWindow(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1906 { 1907 if ( "refresh-window" !in connectedSignals ) 1908 { 1909 Signals.connectData( 1910 this, 1911 "refresh-window", 1912 cast(GCallback)&callBackRefreshWindow, 1913 cast(void*)this, 1914 null, 1915 connectFlags); 1916 connectedSignals["refresh-window"] = 1; 1917 } 1918 onRefreshWindowListeners ~= dlg; 1919 } 1920 extern(C) static void callBackRefreshWindow(VteTerminal* terminalStruct, Terminal _terminal) 1921 { 1922 foreach ( void delegate(Terminal) dlg; _terminal.onRefreshWindowListeners ) 1923 { 1924 dlg(_terminal); 1925 } 1926 } 1927 1928 void delegate(uint, uint, Terminal)[] onResizeWindowListeners; 1929 /** 1930 * Emitted at the child application's request. 1931 * 1932 * Params: 1933 * width = the desired number of columns 1934 * height = the desired number of rows 1935 */ 1936 void addOnResizeWindow(void delegate(uint, uint, Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1937 { 1938 if ( "resize-window" !in connectedSignals ) 1939 { 1940 Signals.connectData( 1941 this, 1942 "resize-window", 1943 cast(GCallback)&callBackResizeWindow, 1944 cast(void*)this, 1945 null, 1946 connectFlags); 1947 connectedSignals["resize-window"] = 1; 1948 } 1949 onResizeWindowListeners ~= dlg; 1950 } 1951 extern(C) static void callBackResizeWindow(VteTerminal* terminalStruct, uint width, uint height, Terminal _terminal) 1952 { 1953 foreach ( void delegate(uint, uint, Terminal) dlg; _terminal.onResizeWindowListeners ) 1954 { 1955 dlg(width, height, _terminal); 1956 } 1957 } 1958 1959 void delegate(Terminal)[] onRestoreWindowListeners; 1960 /** 1961 * Emitted at the child application's request. 1962 */ 1963 void addOnRestoreWindow(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1964 { 1965 if ( "restore-window" !in connectedSignals ) 1966 { 1967 Signals.connectData( 1968 this, 1969 "restore-window", 1970 cast(GCallback)&callBackRestoreWindow, 1971 cast(void*)this, 1972 null, 1973 connectFlags); 1974 connectedSignals["restore-window"] = 1; 1975 } 1976 onRestoreWindowListeners ~= dlg; 1977 } 1978 extern(C) static void callBackRestoreWindow(VteTerminal* terminalStruct, Terminal _terminal) 1979 { 1980 foreach ( void delegate(Terminal) dlg; _terminal.onRestoreWindowListeners ) 1981 { 1982 dlg(_terminal); 1983 } 1984 } 1985 1986 void delegate(Terminal)[] onSelectionChangedListeners; 1987 /** 1988 * Emitted whenever the contents of terminal's selection changes. 1989 */ 1990 void addOnSelectionChanged(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1991 { 1992 if ( "selection-changed" !in connectedSignals ) 1993 { 1994 Signals.connectData( 1995 this, 1996 "selection-changed", 1997 cast(GCallback)&callBackSelectionChanged, 1998 cast(void*)this, 1999 null, 2000 connectFlags); 2001 connectedSignals["selection-changed"] = 1; 2002 } 2003 onSelectionChangedListeners ~= dlg; 2004 } 2005 extern(C) static void callBackSelectionChanged(VteTerminal* terminalStruct, Terminal _terminal) 2006 { 2007 foreach ( void delegate(Terminal) dlg; _terminal.onSelectionChangedListeners ) 2008 { 2009 dlg(_terminal); 2010 } 2011 } 2012 2013 void delegate(Terminal)[] onTextDeletedListeners; 2014 /** 2015 * An internal signal used for communication between the terminal and 2016 * its accessibility peer. May not be emitted under certain 2017 * circumstances. 2018 */ 2019 void addOnTextDeleted(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 2020 { 2021 if ( "text-deleted" !in connectedSignals ) 2022 { 2023 Signals.connectData( 2024 this, 2025 "text-deleted", 2026 cast(GCallback)&callBackTextDeleted, 2027 cast(void*)this, 2028 null, 2029 connectFlags); 2030 connectedSignals["text-deleted"] = 1; 2031 } 2032 onTextDeletedListeners ~= dlg; 2033 } 2034 extern(C) static void callBackTextDeleted(VteTerminal* terminalStruct, Terminal _terminal) 2035 { 2036 foreach ( void delegate(Terminal) dlg; _terminal.onTextDeletedListeners ) 2037 { 2038 dlg(_terminal); 2039 } 2040 } 2041 2042 void delegate(Terminal)[] onTextInsertedListeners; 2043 /** 2044 * An internal signal used for communication between the terminal and 2045 * its accessibility peer. May not be emitted under certain 2046 * circumstances. 2047 */ 2048 void addOnTextInserted(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 2049 { 2050 if ( "text-inserted" !in connectedSignals ) 2051 { 2052 Signals.connectData( 2053 this, 2054 "text-inserted", 2055 cast(GCallback)&callBackTextInserted, 2056 cast(void*)this, 2057 null, 2058 connectFlags); 2059 connectedSignals["text-inserted"] = 1; 2060 } 2061 onTextInsertedListeners ~= dlg; 2062 } 2063 extern(C) static void callBackTextInserted(VteTerminal* terminalStruct, Terminal _terminal) 2064 { 2065 foreach ( void delegate(Terminal) dlg; _terminal.onTextInsertedListeners ) 2066 { 2067 dlg(_terminal); 2068 } 2069 } 2070 2071 void delegate(Terminal)[] onTextModifiedListeners; 2072 /** 2073 * An internal signal used for communication between the terminal and 2074 * its accessibility peer. May not be emitted under certain 2075 * circumstances. 2076 */ 2077 void addOnTextModified(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 2078 { 2079 if ( "text-modified" !in connectedSignals ) 2080 { 2081 Signals.connectData( 2082 this, 2083 "text-modified", 2084 cast(GCallback)&callBackTextModified, 2085 cast(void*)this, 2086 null, 2087 connectFlags); 2088 connectedSignals["text-modified"] = 1; 2089 } 2090 onTextModifiedListeners ~= dlg; 2091 } 2092 extern(C) static void callBackTextModified(VteTerminal* terminalStruct, Terminal _terminal) 2093 { 2094 foreach ( void delegate(Terminal) dlg; _terminal.onTextModifiedListeners ) 2095 { 2096 dlg(_terminal); 2097 } 2098 } 2099 2100 void delegate(int, Terminal)[] onTextScrolledListeners; 2101 /** 2102 * An internal signal used for communication between the terminal and 2103 * its accessibility peer. May not be emitted under certain 2104 * circumstances. 2105 * 2106 * Params: 2107 * delta = the number of lines scrolled 2108 */ 2109 void addOnTextScrolled(void delegate(int, Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 2110 { 2111 if ( "text-scrolled" !in connectedSignals ) 2112 { 2113 Signals.connectData( 2114 this, 2115 "text-scrolled", 2116 cast(GCallback)&callBackTextScrolled, 2117 cast(void*)this, 2118 null, 2119 connectFlags); 2120 connectedSignals["text-scrolled"] = 1; 2121 } 2122 onTextScrolledListeners ~= dlg; 2123 } 2124 extern(C) static void callBackTextScrolled(VteTerminal* terminalStruct, int delta, Terminal _terminal) 2125 { 2126 foreach ( void delegate(int, Terminal) dlg; _terminal.onTextScrolledListeners ) 2127 { 2128 dlg(delta, _terminal); 2129 } 2130 } 2131 2132 void delegate(Terminal)[] onWindowTitleChangedListeners; 2133 /** 2134 * Emitted when the terminal's %window_title field is modified. 2135 */ 2136 void addOnWindowTitleChanged(void delegate(Terminal) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 2137 { 2138 if ( "window-title-changed" !in connectedSignals ) 2139 { 2140 Signals.connectData( 2141 this, 2142 "window-title-changed", 2143 cast(GCallback)&callBackWindowTitleChanged, 2144 cast(void*)this, 2145 null, 2146 connectFlags); 2147 connectedSignals["window-title-changed"] = 1; 2148 } 2149 onWindowTitleChangedListeners ~= dlg; 2150 } 2151 extern(C) static void callBackWindowTitleChanged(VteTerminal* terminalStruct, Terminal _terminal) 2152 { 2153 foreach ( void delegate(Terminal) dlg; _terminal.onWindowTitleChangedListeners ) 2154 { 2155 dlg(_terminal); 2156 } 2157 } 2158 2159 /** 2160 * Gets the user's shell, or %NULL. In the latter case, the 2161 * system default (usually "/bin/sh") should be used. 2162 * 2163 * Return: a newly allocated string with the 2164 * user's shell, or %NULL 2165 */ 2166 public static string getUserShell() 2167 { 2168 return Str.toString(vte_get_user_shell()); 2169 } 2170 }