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