File: SourceView.d

package info (click to toggle)
gtk-d 3.11.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,040 kB
  • sloc: javascript: 565; sh: 71; makefile: 23
file content (764 lines) | stat: -rw-r--r-- 21,918 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
/*
 * This file is part of gtkD.
 *
 * gtkD is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 3
 * of the License, or (at your option) any later version, with
 * some exceptions, please read the COPYING file.
 *
 * gtkD is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with gtkD; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
 */

// generated automatically - do not change
// find conversion definition on APILookup.txt
// implement new conversion functionalities on the wrap.utils pakage


module gsv.SourceView;

private import gdk.Event;
private import glib.ConstructionException;
private import glib.Str;
private import gobject.ObjectG;
private import gobject.Signals;
private import gsv.SourceBuffer;
private import gsv.SourceCompletion;
private import gsv.SourceGutter;
private import gsv.SourceMarkAttributes;
private import gsv.SpaceDrawer;
private import gsv.c.functions;
public  import gsv.c.types;
public  import gsvc.gsvtypes;
private import gtk.BuildableIF;
private import gtk.BuildableT;
private import gtk.ScrollableIF;
private import gtk.ScrollableT;
private import gtk.TextIter;
private import gtk.TextView;
private import gtk.Widget;
private import std.algorithm;


/** */
public class SourceView : TextView
{
	/** the main Gtk struct */
	protected GtkSourceView* gtkSourceView;

	/** Get the main Gtk struct */
	public GtkSourceView* getSourceViewStruct(bool transferOwnership = false)
	{
		if (transferOwnership)
			ownedRef = false;
		return gtkSourceView;
	}

	/** the main Gtk struct as a void* */
	protected override void* getStruct()
	{
		return cast(void*)gtkSourceView;
	}

	/**
	 * Sets our main struct and passes it to the parent class.
	 */
	public this (GtkSourceView* gtkSourceView, bool ownedRef = false)
	{
		this.gtkSourceView = gtkSourceView;
		super(cast(GtkTextView*)gtkSourceView, ownedRef);
	}

	/**
	 * Returns the GtkSourceBuffer being displayed by this source view.
	 * The reference count on the buffer is not incremented; the caller
	 * of this function won't own a new reference.
	 *
	 * Returns:
	 *  a GtkSourceBuffer
	 */
	public override SourceBuffer getBuffer()
	{
		auto p = gtk_text_view_get_buffer(cast(GtkTextView*)gtkSourceView);

		return ObjectG.getDObject!(SourceBuffer)(cast(GtkSourceBuffer*) p);
	}

	/**
	 */

	/** */
	public static GType getType()
	{
		return gtk_source_view_get_type();
	}

	/**
	 * Creates a new #GtkSourceView.
	 *
	 * By default, an empty #GtkSourceBuffer will be lazily created and can be
	 * retrieved with gtk_text_view_get_buffer().
	 *
	 * If you want to specify your own buffer, either override the
	 * #GtkTextViewClass create_buffer factory method, or use
	 * gtk_source_view_new_with_buffer().
	 *
	 * Returns: a new #GtkSourceView.
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public this()
	{
		auto __p = gtk_source_view_new();

		if(__p is null)
		{
			throw new ConstructionException("null returned by new");
		}

		this(cast(GtkSourceView*) __p);
	}

	/**
	 * Creates a new #GtkSourceView widget displaying the buffer
	 * @buffer. One buffer can be shared among many widgets.
	 *
	 * Params:
	 *     buffer = a #GtkSourceBuffer.
	 *
	 * Returns: a new #GtkSourceView.
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public this(SourceBuffer buffer)
	{
		auto __p = gtk_source_view_new_with_buffer((buffer is null) ? null : buffer.getSourceBufferStruct());

		if(__p is null)
		{
			throw new ConstructionException("null returned by new_with_buffer");
		}

		this(cast(GtkSourceView*) __p);
	}

	/**
	 * Returns whether auto-indentation of text is enabled.
	 *
	 * Returns: %TRUE if auto indentation is enabled.
	 */
	public bool getAutoIndent()
	{
		return gtk_source_view_get_auto_indent(gtkSourceView) != 0;
	}

	/**
	 * Returns the #GtkSourceBackgroundPatternType specifying if and how
	 * the background pattern should be displayed for this @view.
	 *
	 * Returns: the #GtkSourceBackgroundPatternType.
	 *
	 * Since: 3.16
	 */
	public GtkSourceBackgroundPatternType getBackgroundPattern()
	{
		return gtk_source_view_get_background_pattern(gtkSourceView);
	}

	/**
	 * Gets the #GtkSourceCompletion associated with @view. The returned object is
	 * guaranteed to be the same for the lifetime of @view. Each #GtkSourceView
	 * object has a different #GtkSourceCompletion.
	 *
	 * Returns: the #GtkSourceCompletion associated with @view.
	 */
	public SourceCompletion getCompletion()
	{
		auto __p = gtk_source_view_get_completion(gtkSourceView);

		if(__p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(SourceCompletion)(cast(GtkSourceCompletion*) __p);
	}

	/**
	 * Returns the #GtkSourceGutter object associated with @window_type for @view.
	 * Only GTK_TEXT_WINDOW_LEFT and GTK_TEXT_WINDOW_RIGHT are supported,
	 * respectively corresponding to the left and right gutter. The line numbers
	 * and mark category icons are rendered in the left gutter.
	 *
	 * Params:
	 *     windowType = the gutter window type.
	 *
	 * Returns: the #GtkSourceGutter.
	 *
	 * Since: 2.8
	 */
	public SourceGutter getGutter(GtkTextWindowType windowType)
	{
		auto __p = gtk_source_view_get_gutter(gtkSourceView, windowType);

		if(__p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(SourceGutter)(cast(GtkSourceGutter*) __p);
	}

	/**
	 * Returns whether the current line is highlighted.
	 *
	 * Returns: %TRUE if the current line is highlighted.
	 */
	public bool getHighlightCurrentLine()
	{
		return gtk_source_view_get_highlight_current_line(gtkSourceView) != 0;
	}

	/**
	 * Returns whether when the tab key is pressed the current selection
	 * should get indented instead of replaced with the \t character.
	 *
	 * Returns: %TRUE if the selection is indented when tab is pressed.
	 */
	public bool getIndentOnTab()
	{
		return gtk_source_view_get_indent_on_tab(gtkSourceView) != 0;
	}

	/**
	 * Returns the number of spaces to use for each step of indent.
	 * See gtk_source_view_set_indent_width() for details.
	 *
	 * Returns: indent width.
	 */
	public int getIndentWidth()
	{
		return gtk_source_view_get_indent_width(gtkSourceView);
	}

	/**
	 * Returns whether when inserting a tabulator character it should
	 * be replaced by a group of space characters.
	 *
	 * Returns: %TRUE if spaces are inserted instead of tabs.
	 */
	public bool getInsertSpacesInsteadOfTabs()
	{
		return gtk_source_view_get_insert_spaces_instead_of_tabs(gtkSourceView) != 0;
	}

	/**
	 * Gets attributes and priority for the @category.
	 *
	 * Params:
	 *     category = the category.
	 *     priority = place where priority of the category will be stored.
	 *
	 * Returns: #GtkSourceMarkAttributes for the @category.
	 *     The object belongs to @view, so it must not be unreffed.
	 */
	public SourceMarkAttributes getMarkAttributes(string category, int* priority)
	{
		auto __p = gtk_source_view_get_mark_attributes(gtkSourceView, Str.toStringz(category), priority);

		if(__p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(SourceMarkAttributes)(cast(GtkSourceMarkAttributes*) __p);
	}

	/**
	 * Gets the position of the right margin in the given @view.
	 *
	 * Returns: the position of the right margin.
	 */
	public uint getRightMarginPosition()
	{
		return gtk_source_view_get_right_margin_position(gtkSourceView);
	}

	/**
	 * Returns whether line marks are displayed beside the text.
	 *
	 * Returns: %TRUE if the line marks are displayed.
	 *
	 * Since: 2.2
	 */
	public bool getShowLineMarks()
	{
		return gtk_source_view_get_show_line_marks(gtkSourceView) != 0;
	}

	/**
	 * Returns whether line numbers are displayed beside the text.
	 *
	 * Returns: %TRUE if the line numbers are displayed.
	 */
	public bool getShowLineNumbers()
	{
		return gtk_source_view_get_show_line_numbers(gtkSourceView) != 0;
	}

	/**
	 * Returns whether a right margin is displayed.
	 *
	 * Returns: %TRUE if the right margin is shown.
	 */
	public bool getShowRightMargin()
	{
		return gtk_source_view_get_show_right_margin(gtkSourceView) != 0;
	}

	/**
	 * Returns %TRUE if pressing the Backspace key will try to delete spaces
	 * up to the previous tab stop.
	 *
	 * Returns: %TRUE if smart Backspace handling is enabled.
	 *
	 * Since: 3.18
	 */
	public bool getSmartBackspace()
	{
		return gtk_source_view_get_smart_backspace(gtkSourceView) != 0;
	}

	/**
	 * Returns a #GtkSourceSmartHomeEndType end value specifying
	 * how the cursor will move when HOME and END keys are pressed.
	 *
	 * Returns: a #GtkSourceSmartHomeEndType value.
	 */
	public GtkSourceSmartHomeEndType getSmartHomeEnd()
	{
		return gtk_source_view_get_smart_home_end(gtkSourceView);
	}

	/**
	 * Gets the #GtkSourceSpaceDrawer associated with @view. The returned object is
	 * guaranteed to be the same for the lifetime of @view. Each #GtkSourceView
	 * object has a different #GtkSourceSpaceDrawer.
	 *
	 * Returns: the #GtkSourceSpaceDrawer associated with @view.
	 *
	 * Since: 3.24
	 */
	public SpaceDrawer getSpaceDrawer()
	{
		auto __p = gtk_source_view_get_space_drawer(gtkSourceView);

		if(__p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(SpaceDrawer)(cast(GtkSourceSpaceDrawer*) __p);
	}

	/**
	 * Returns the width of tabulation in characters.
	 *
	 * Returns: width of tab.
	 */
	public uint getTabWidth()
	{
		return gtk_source_view_get_tab_width(gtkSourceView);
	}

	/**
	 * Determines the visual column at @iter taking into consideration the
	 * #GtkSourceView:tab-width of @view.
	 *
	 * Params:
	 *     iter = a position in @view.
	 *
	 * Returns: the visual column at @iter.
	 */
	public uint getVisualColumn(TextIter iter)
	{
		return gtk_source_view_get_visual_column(gtkSourceView, (iter is null) ? null : iter.getTextIterStruct());
	}

	/**
	 * Inserts one indentation level at the beginning of the specified lines. The
	 * empty lines are not indented.
	 *
	 * Params:
	 *     start = #GtkTextIter of the first line to indent
	 *     end = #GtkTextIter of the last line to indent
	 *
	 * Since: 3.16
	 */
	public void indentLines(TextIter start, TextIter end)
	{
		gtk_source_view_indent_lines(gtkSourceView, (start is null) ? null : start.getTextIterStruct(), (end is null) ? null : end.getTextIterStruct());
	}

	/**
	 * If %TRUE auto-indentation of text is enabled.
	 *
	 * When Enter is pressed to create a new line, the auto-indentation inserts the
	 * same indentation as the previous line. This is <emphasis>not</emphasis> a
	 * "smart indentation" where an indentation level is added or removed depending
	 * on the context.
	 *
	 * Params:
	 *     enable = whether to enable auto indentation.
	 */
	public void setAutoIndent(bool enable)
	{
		gtk_source_view_set_auto_indent(gtkSourceView, enable);
	}

	/**
	 * Set if and how the background pattern should be displayed.
	 *
	 * Params:
	 *     backgroundPattern = the #GtkSourceBackgroundPatternType.
	 *
	 * Since: 3.16
	 */
	public void setBackgroundPattern(GtkSourceBackgroundPatternType backgroundPattern)
	{
		gtk_source_view_set_background_pattern(gtkSourceView, backgroundPattern);
	}

	/**
	 * If @highlight is %TRUE the current line will be highlighted.
	 *
	 * Params:
	 *     highlight = whether to highlight the current line.
	 */
	public void setHighlightCurrentLine(bool highlight)
	{
		gtk_source_view_set_highlight_current_line(gtkSourceView, highlight);
	}

	/**
	 * If %TRUE, when the tab key is pressed when several lines are selected, the
	 * selected lines are indented of one level instead of being replaced with a \t
	 * character. Shift+Tab unindents the selection.
	 *
	 * If the first or last line is not selected completely, it is also indented or
	 * unindented.
	 *
	 * When the selection doesn't span several lines, the tab key always replaces
	 * the selection with a normal \t character.
	 *
	 * Params:
	 *     enable = whether to indent a block when tab is pressed.
	 */
	public void setIndentOnTab(bool enable)
	{
		gtk_source_view_set_indent_on_tab(gtkSourceView, enable);
	}

	/**
	 * Sets the number of spaces to use for each step of indent when the tab key is
	 * pressed. If @width is -1, the value of the #GtkSourceView:tab-width property
	 * will be used.
	 *
	 * The #GtkSourceView:indent-width interacts with the
	 * #GtkSourceView:insert-spaces-instead-of-tabs property and
	 * #GtkSourceView:tab-width. An example will be clearer: if the
	 * #GtkSourceView:indent-width is 4 and
	 * #GtkSourceView:tab-width is 8 and
	 * #GtkSourceView:insert-spaces-instead-of-tabs is %FALSE, then pressing the tab
	 * key at the beginning of a line will insert 4 spaces. So far so good. Pressing
	 * the tab key a second time will remove the 4 spaces and insert a \t character
	 * instead (since #GtkSourceView:tab-width is 8). On the other hand, if
	 * #GtkSourceView:insert-spaces-instead-of-tabs is %TRUE, the second tab key
	 * pressed will insert 4 more spaces for a total of 8 spaces in the
	 * #GtkTextBuffer.
	 *
	 * The test-widget program (available in the GtkSourceView repository) may be
	 * useful to better understand the indentation settings (enable the space
	 * drawing!).
	 *
	 * Params:
	 *     width = indent width in characters.
	 */
	public void setIndentWidth(int width)
	{
		gtk_source_view_set_indent_width(gtkSourceView, width);
	}

	/**
	 * If %TRUE a tab key pressed is replaced by a group of space characters. Of
	 * course it is still possible to insert a real \t programmatically with the
	 * #GtkTextBuffer API.
	 *
	 * Params:
	 *     enable = whether to insert spaces instead of tabs.
	 */
	public void setInsertSpacesInsteadOfTabs(bool enable)
	{
		gtk_source_view_set_insert_spaces_instead_of_tabs(gtkSourceView, enable);
	}

	/**
	 * Sets attributes and priority for the @category.
	 *
	 * Params:
	 *     category = the category.
	 *     attributes = mark attributes.
	 *     priority = priority of the category.
	 */
	public void setMarkAttributes(string category, SourceMarkAttributes attributes, int priority)
	{
		gtk_source_view_set_mark_attributes(gtkSourceView, Str.toStringz(category), (attributes is null) ? null : attributes.getSourceMarkAttributesStruct(), priority);
	}

	/**
	 * Sets the position of the right margin in the given @view.
	 *
	 * Params:
	 *     pos = the width in characters where to position the right margin.
	 */
	public void setRightMarginPosition(uint pos)
	{
		gtk_source_view_set_right_margin_position(gtkSourceView, pos);
	}

	/**
	 * If %TRUE line marks will be displayed beside the text.
	 *
	 * Params:
	 *     show = whether line marks should be displayed.
	 *
	 * Since: 2.2
	 */
	public void setShowLineMarks(bool show)
	{
		gtk_source_view_set_show_line_marks(gtkSourceView, show);
	}

	/**
	 * If %TRUE line numbers will be displayed beside the text.
	 *
	 * Params:
	 *     show = whether line numbers should be displayed.
	 */
	public void setShowLineNumbers(bool show)
	{
		gtk_source_view_set_show_line_numbers(gtkSourceView, show);
	}

	/**
	 * If %TRUE a right margin is displayed.
	 *
	 * Params:
	 *     show = whether to show a right margin.
	 */
	public void setShowRightMargin(bool show)
	{
		gtk_source_view_set_show_right_margin(gtkSourceView, show);
	}

	/**
	 * When set to %TRUE, pressing the Backspace key will try to delete spaces
	 * up to the previous tab stop.
	 *
	 * Params:
	 *     smartBackspace = whether to enable smart Backspace handling.
	 *
	 * Since: 3.18
	 */
	public void setSmartBackspace(bool smartBackspace)
	{
		gtk_source_view_set_smart_backspace(gtkSourceView, smartBackspace);
	}

	/**
	 * Set the desired movement of the cursor when HOME and END keys
	 * are pressed.
	 *
	 * Params:
	 *     smartHomeEnd = the desired behavior among #GtkSourceSmartHomeEndType.
	 */
	public void setSmartHomeEnd(GtkSourceSmartHomeEndType smartHomeEnd)
	{
		gtk_source_view_set_smart_home_end(gtkSourceView, smartHomeEnd);
	}

	/**
	 * Sets the width of tabulation in characters. The #GtkTextBuffer still contains
	 * \t characters, but they can take a different visual width in a #GtkSourceView
	 * widget.
	 *
	 * Params:
	 *     width = width of tab in characters.
	 */
	public void setTabWidth(uint width)
	{
		gtk_source_view_set_tab_width(gtkSourceView, width);
	}

	/**
	 * Removes one indentation level at the beginning of the
	 * specified lines.
	 *
	 * Params:
	 *     start = #GtkTextIter of the first line to indent
	 *     end = #GtkTextIter of the last line to indent
	 *
	 * Since: 3.16
	 */
	public void unindentLines(TextIter start, TextIter end)
	{
		gtk_source_view_unindent_lines(gtkSourceView, (start is null) ? null : start.getTextIterStruct(), (end is null) ? null : end.getTextIterStruct());
	}

	/**
	 * Keybinding signal to change case of the text at the current cursor position.
	 *
	 * Params:
	 *     caseType = the case to use
	 *
	 * Since: 3.16
	 */
	gulong addOnChangeCase(void delegate(GtkSourceChangeCaseType, SourceView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		return Signals.connect(this, "change-case", dlg, connectFlags ^ ConnectFlags.SWAPPED);
	}

	/**
	 * Keybinding signal to edit a number at the current cursor position.
	 *
	 * Params:
	 *     count = the number to add to the number at the current position
	 *
	 * Since: 3.16
	 */
	gulong addOnChangeNumber(void delegate(int, SourceView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		return Signals.connect(this, "change-number", dlg, connectFlags ^ ConnectFlags.SWAPPED);
	}

	/**
	 * Keybinding signal to join the lines currently selected.
	 *
	 * Since: 3.16
	 */
	gulong addOnJoinLines(void delegate(SourceView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		return Signals.connect(this, "join-lines", dlg, connectFlags ^ ConnectFlags.SWAPPED);
	}

	/**
	 * Emitted when a line mark has been activated (for instance when there
	 * was a button press in the line marks gutter). You can use @iter to
	 * determine on which line the activation took place.
	 *
	 * Params:
	 *     iter = a #GtkTextIter
	 *     event = the #GdkEvent that activated the event
	 */
	gulong addOnLineMarkActivated(void delegate(TextIter, Event, SourceView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		return Signals.connect(this, "line-mark-activated", dlg, connectFlags ^ ConnectFlags.SWAPPED);
	}

	/**
	 * The ::move-lines signal is a keybinding which gets emitted
	 * when the user initiates moving a line. The default binding key
	 * is Alt+Up/Down arrow. And moves the currently selected lines,
	 * or the current line up or down by one line.
	 *
	 * Params:
	 *     down = %TRUE to move down, %FALSE to move up.
	 */
	gulong addOnMoveLines(void delegate(bool, SourceView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		return Signals.connect(this, "move-lines", dlg, connectFlags ^ ConnectFlags.SWAPPED);
	}

	/**
	 * Keybinding signal to move the cursor to the matching bracket.
	 *
	 * Params:
	 *     extendSelection = %TRUE if the move should extend the selection
	 *
	 * Since: 3.16
	 */
	gulong addOnMoveToMatchingBracket(void delegate(bool, SourceView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		return Signals.connect(this, "move-to-matching-bracket", dlg, connectFlags ^ ConnectFlags.SWAPPED);
	}

	/**
	 * The ::move-words signal is a keybinding which gets emitted
	 * when the user initiates moving a word. The default binding key
	 * is Alt+Left/Right Arrow and moves the current selection, or the current
	 * word by one word.
	 *
	 * Params:
	 *     count = the number of words to move over
	 *
	 * Since: 3.0
	 */
	gulong addOnMoveWords(void delegate(int, SourceView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		return Signals.connect(this, "move-words", dlg, connectFlags ^ ConnectFlags.SWAPPED);
	}

	/** */
	gulong addOnRedo(void delegate(SourceView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		return Signals.connect(this, "redo", dlg, connectFlags ^ ConnectFlags.SWAPPED);
	}

	/**
	 * The ::show-completion signal is a key binding signal which gets
	 * emitted when the user requests a completion, by pressing
	 * <keycombo><keycap>Control</keycap><keycap>space</keycap></keycombo>.
	 *
	 * This will create a #GtkSourceCompletionContext with the activation
	 * type as %GTK_SOURCE_COMPLETION_ACTIVATION_USER_REQUESTED.
	 *
	 * Applications should not connect to it, but may emit it with
	 * g_signal_emit_by_name() if they need to activate the completion by
	 * another means, for example with another key binding or a menu entry.
	 */
	gulong addOnShowCompletion(void delegate(SourceView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		return Signals.connect(this, "show-completion", dlg, connectFlags ^ ConnectFlags.SWAPPED);
	}

	/**
	 * Emitted when a the cursor was moved according to the smart home
	 * end setting. The signal is emitted after the cursor is moved, but
	 * during the GtkTextView::move-cursor action. This can be used to find
	 * out whether the cursor was moved by a normal home/end or by a smart
	 * home/end.
	 *
	 * Params:
	 *     iter = a #GtkTextIter
	 *     count = the count
	 *
	 * Since: 3.0
	 */
	gulong addOnSmartHomeEnd(void delegate(TextIter, int, SourceView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		return Signals.connect(this, "smart-home-end", dlg, connectFlags ^ ConnectFlags.SWAPPED);
	}

	/** */
	gulong addOnUndo(void delegate(SourceView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		return Signals.connect(this, "undo", dlg, connectFlags ^ ConnectFlags.SWAPPED);
	}
}