This file is indexed.

/usr/include/d/gtkd-3/gtk/Assistant.d is in libgtkd-3-dev 3.7.5-2build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
/*
 * 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 gtk.Assistant;

private import gdkpixbuf.Pixbuf;
private import glib.ConstructionException;
private import glib.Str;
private import gobject.ObjectG;
private import gobject.Signals;
private import gtk.Widget;
private import gtk.Window;
private import gtk.c.functions;
public  import gtk.c.types;
public  import gtkc.gtktypes;
private import std.algorithm;


/**
 * A #GtkAssistant is a widget used to represent a generally complex
 * operation splitted in several steps, guiding the user through its
 * pages and controlling the page flow to collect the necessary data.
 * 
 * The design of GtkAssistant is that it controls what buttons to show
 * and to make sensitive, based on what it knows about the page sequence
 * and the [type][GtkAssistantPageType] of each page,
 * in addition to state information like the page
 * [completion][gtk-assistant-set-page-complete]
 * and [committed][gtk-assistant-commit] status.
 * 
 * If you have a case that doesn’t quite fit in #GtkAssistants way of
 * handling buttons, you can use the #GTK_ASSISTANT_PAGE_CUSTOM page
 * type and handle buttons yourself.
 * 
 * # GtkAssistant as GtkBuildable
 * 
 * The GtkAssistant implementation of the #GtkBuildable interface
 * exposes the @action_area as internal children with the name
 * “action_area”.
 * 
 * To add pages to an assistant in #GtkBuilder, simply add it as a
 * child to the GtkAssistant object, and set its child properties
 * as necessary.
 * 
 * # CSS nodes
 * 
 * GtkAssistant has a single CSS node with the name assistant.
 */
public class Assistant : Window
{
	/** the main Gtk struct */
	protected GtkAssistant* gtkAssistant;

	/** Get the main Gtk struct */
	public GtkAssistant* getAssistantStruct(bool transferOwnership = false)
	{
		if (transferOwnership)
			ownedRef = false;
		return gtkAssistant;
	}

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

	protected override void setStruct(GObject* obj)
	{
		gtkAssistant = cast(GtkAssistant*)obj;
		super.setStruct(obj);
	}

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


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

	/**
	 * Creates a new #GtkAssistant.
	 *
	 * Returns: a newly created #GtkAssistant
	 *
	 * Since: 2.10
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public this()
	{
		auto p = gtk_assistant_new();

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

		this(cast(GtkAssistant*) p);
	}

	/**
	 * Adds a widget to the action area of a #GtkAssistant.
	 *
	 * Params:
	 *     child = a #GtkWidget
	 *
	 * Since: 2.10
	 */
	public void addActionWidget(Widget child)
	{
		gtk_assistant_add_action_widget(gtkAssistant, (child is null) ? null : child.getWidgetStruct());
	}

	/**
	 * Appends a page to the @assistant.
	 *
	 * Params:
	 *     page = a #GtkWidget
	 *
	 * Returns: the index (starting at 0) of the inserted page
	 *
	 * Since: 2.10
	 */
	public int appendPage(Widget page)
	{
		return gtk_assistant_append_page(gtkAssistant, (page is null) ? null : page.getWidgetStruct());
	}

	/**
	 * Erases the visited page history so the back button is not
	 * shown on the current page, and removes the cancel button
	 * from subsequent pages.
	 *
	 * Use this when the information provided up to the current
	 * page is hereafter deemed permanent and cannot be modified
	 * or undone. For example, showing a progress page to track
	 * a long-running, unreversible operation after the user has
	 * clicked apply on a confirmation page.
	 *
	 * Since: 2.22
	 */
	public void commit()
	{
		gtk_assistant_commit(gtkAssistant);
	}

	/**
	 * Returns the page number of the current page.
	 *
	 * Returns: The index (starting from 0) of the current
	 *     page in the @assistant, or -1 if the @assistant has no pages,
	 *     or no current page.
	 *
	 * Since: 2.10
	 */
	public int getCurrentPage()
	{
		return gtk_assistant_get_current_page(gtkAssistant);
	}

	/**
	 * Returns the number of pages in the @assistant
	 *
	 * Returns: the number of pages in the @assistant
	 *
	 * Since: 2.10
	 */
	public int getNPages()
	{
		return gtk_assistant_get_n_pages(gtkAssistant);
	}

	/**
	 * Returns the child widget contained in page number @page_num.
	 *
	 * Params:
	 *     pageNum = the index of a page in the @assistant,
	 *         or -1 to get the last page
	 *
	 * Returns: the child widget, or %NULL
	 *     if @page_num is out of bounds
	 *
	 * Since: 2.10
	 */
	public Widget getNthPage(int pageNum)
	{
		auto p = gtk_assistant_get_nth_page(gtkAssistant, pageNum);

		if(p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p);
	}

	/**
	 * Gets whether @page is complete.
	 *
	 * Params:
	 *     page = a page of @assistant
	 *
	 * Returns: %TRUE if @page is complete.
	 *
	 * Since: 2.10
	 */
	public bool getPageComplete(Widget page)
	{
		return gtk_assistant_get_page_complete(gtkAssistant, (page is null) ? null : page.getWidgetStruct()) != 0;
	}

	/**
	 * Gets whether page has padding.
	 *
	 * Params:
	 *     page = a page of @assistant
	 *
	 * Returns: %TRUE if @page has padding
	 *
	 * Since: 3.18
	 */
	public bool getPageHasPadding(Widget page)
	{
		return gtk_assistant_get_page_has_padding(gtkAssistant, (page is null) ? null : page.getWidgetStruct()) != 0;
	}

	/**
	 * Gets the header image for @page.
	 *
	 * Deprecated: Since GTK+ 3.2, a header is no longer shown;
	 * add your header decoration to the page content instead.
	 *
	 * Params:
	 *     page = a page of @assistant
	 *
	 * Returns: the header image for @page,
	 *     or %NULL if there’s no header image for the page
	 *
	 * Since: 2.10
	 */
	public Pixbuf getPageHeaderImage(Widget page)
	{
		auto p = gtk_assistant_get_page_header_image(gtkAssistant, (page is null) ? null : page.getWidgetStruct());

		if(p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p);
	}

	/**
	 * Gets the side image for @page.
	 *
	 * Deprecated: Since GTK+ 3.2, sidebar images are not
	 * shown anymore.
	 *
	 * Params:
	 *     page = a page of @assistant
	 *
	 * Returns: the side image for @page,
	 *     or %NULL if there’s no side image for the page
	 *
	 * Since: 2.10
	 */
	public Pixbuf getPageSideImage(Widget page)
	{
		auto p = gtk_assistant_get_page_side_image(gtkAssistant, (page is null) ? null : page.getWidgetStruct());

		if(p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p);
	}

	/**
	 * Gets the title for @page.
	 *
	 * Params:
	 *     page = a page of @assistant
	 *
	 * Returns: the title for @page
	 *
	 * Since: 2.10
	 */
	public string getPageTitle(Widget page)
	{
		return Str.toString(gtk_assistant_get_page_title(gtkAssistant, (page is null) ? null : page.getWidgetStruct()));
	}

	/**
	 * Gets the page type of @page.
	 *
	 * Params:
	 *     page = a page of @assistant
	 *
	 * Returns: the page type of @page
	 *
	 * Since: 2.10
	 */
	public GtkAssistantPageType getPageType(Widget page)
	{
		return gtk_assistant_get_page_type(gtkAssistant, (page is null) ? null : page.getWidgetStruct());
	}

	/**
	 * Inserts a page in the @assistant at a given position.
	 *
	 * Params:
	 *     page = a #GtkWidget
	 *     position = the index (starting at 0) at which to insert the page,
	 *         or -1 to append the page to the @assistant
	 *
	 * Returns: the index (starting from 0) of the inserted page
	 *
	 * Since: 2.10
	 */
	public int insertPage(Widget page, int position)
	{
		return gtk_assistant_insert_page(gtkAssistant, (page is null) ? null : page.getWidgetStruct(), position);
	}

	/**
	 * Navigate to the next page.
	 *
	 * It is a programming error to call this function when
	 * there is no next page.
	 *
	 * This function is for use when creating pages of the
	 * #GTK_ASSISTANT_PAGE_CUSTOM type.
	 *
	 * Since: 3.0
	 */
	public void nextPage()
	{
		gtk_assistant_next_page(gtkAssistant);
	}

	/**
	 * Prepends a page to the @assistant.
	 *
	 * Params:
	 *     page = a #GtkWidget
	 *
	 * Returns: the index (starting at 0) of the inserted page
	 *
	 * Since: 2.10
	 */
	public int prependPage(Widget page)
	{
		return gtk_assistant_prepend_page(gtkAssistant, (page is null) ? null : page.getWidgetStruct());
	}

	/**
	 * Navigate to the previous visited page.
	 *
	 * It is a programming error to call this function when
	 * no previous page is available.
	 *
	 * This function is for use when creating pages of the
	 * #GTK_ASSISTANT_PAGE_CUSTOM type.
	 *
	 * Since: 3.0
	 */
	public void previousPage()
	{
		gtk_assistant_previous_page(gtkAssistant);
	}

	/**
	 * Removes a widget from the action area of a #GtkAssistant.
	 *
	 * Params:
	 *     child = a #GtkWidget
	 *
	 * Since: 2.10
	 */
	public void removeActionWidget(Widget child)
	{
		gtk_assistant_remove_action_widget(gtkAssistant, (child is null) ? null : child.getWidgetStruct());
	}

	/**
	 * Removes the @page_num’s page from @assistant.
	 *
	 * Params:
	 *     pageNum = the index of a page in the @assistant,
	 *         or -1 to remove the last page
	 *
	 * Since: 3.2
	 */
	public void removePage(int pageNum)
	{
		gtk_assistant_remove_page(gtkAssistant, pageNum);
	}

	/**
	 * Switches the page to @page_num.
	 *
	 * Note that this will only be necessary in custom buttons,
	 * as the @assistant flow can be set with
	 * gtk_assistant_set_forward_page_func().
	 *
	 * Params:
	 *     pageNum = index of the page to switch to, starting from 0.
	 *         If negative, the last page will be used. If greater
	 *         than the number of pages in the @assistant, nothing
	 *         will be done.
	 *
	 * Since: 2.10
	 */
	public void setCurrentPage(int pageNum)
	{
		gtk_assistant_set_current_page(gtkAssistant, pageNum);
	}

	/**
	 * Sets the page forwarding function to be @page_func.
	 *
	 * This function will be used to determine what will be
	 * the next page when the user presses the forward button.
	 * Setting @page_func to %NULL will make the assistant to
	 * use the default forward function, which just goes to the
	 * next visible page.
	 *
	 * Params:
	 *     pageFunc = the #GtkAssistantPageFunc, or %NULL
	 *         to use the default one
	 *     data = user data for @page_func
	 *     destroy = destroy notifier for @data
	 *
	 * Since: 2.10
	 */
	public void setForwardPageFunc(GtkAssistantPageFunc pageFunc, void* data, GDestroyNotify destroy)
	{
		gtk_assistant_set_forward_page_func(gtkAssistant, pageFunc, data, destroy);
	}

	/**
	 * Sets whether @page contents are complete.
	 *
	 * This will make @assistant update the buttons state
	 * to be able to continue the task.
	 *
	 * Params:
	 *     page = a page of @assistant
	 *     complete = the completeness status of the page
	 *
	 * Since: 2.10
	 */
	public void setPageComplete(Widget page, bool complete)
	{
		gtk_assistant_set_page_complete(gtkAssistant, (page is null) ? null : page.getWidgetStruct(), complete);
	}

	/**
	 * Sets whether the assistant is adding padding around
	 * the page.
	 *
	 * Params:
	 *     page = a page of @assistant
	 *     hasPadding = whether this page has padding
	 *
	 * Since: 3.18
	 */
	public void setPageHasPadding(Widget page, bool hasPadding)
	{
		gtk_assistant_set_page_has_padding(gtkAssistant, (page is null) ? null : page.getWidgetStruct(), hasPadding);
	}

	/**
	 * Sets a header image for @page.
	 *
	 * Deprecated: Since GTK+ 3.2, a header is no longer shown;
	 * add your header decoration to the page content instead.
	 *
	 * Params:
	 *     page = a page of @assistant
	 *     pixbuf = the new header image @page
	 *
	 * Since: 2.10
	 */
	public void setPageHeaderImage(Widget page, Pixbuf pixbuf)
	{
		gtk_assistant_set_page_header_image(gtkAssistant, (page is null) ? null : page.getWidgetStruct(), (pixbuf is null) ? null : pixbuf.getPixbufStruct());
	}

	/**
	 * Sets a side image for @page.
	 *
	 * This image used to be displayed in the side area of the assistant
	 * when @page is the current page.
	 *
	 * Deprecated: Since GTK+ 3.2, sidebar images are not
	 * shown anymore.
	 *
	 * Params:
	 *     page = a page of @assistant
	 *     pixbuf = the new side image @page
	 *
	 * Since: 2.10
	 */
	public void setPageSideImage(Widget page, Pixbuf pixbuf)
	{
		gtk_assistant_set_page_side_image(gtkAssistant, (page is null) ? null : page.getWidgetStruct(), (pixbuf is null) ? null : pixbuf.getPixbufStruct());
	}

	/**
	 * Sets a title for @page.
	 *
	 * The title is displayed in the header area of the assistant
	 * when @page is the current page.
	 *
	 * Params:
	 *     page = a page of @assistant
	 *     title = the new title for @page
	 *
	 * Since: 2.10
	 */
	public void setPageTitle(Widget page, string title)
	{
		gtk_assistant_set_page_title(gtkAssistant, (page is null) ? null : page.getWidgetStruct(), Str.toStringz(title));
	}

	/**
	 * Sets the page type for @page.
	 *
	 * The page type determines the page behavior in the @assistant.
	 *
	 * Params:
	 *     page = a page of @assistant
	 *     type = the new type for @page
	 *
	 * Since: 2.10
	 */
	public void setPageType(Widget page, GtkAssistantPageType type)
	{
		gtk_assistant_set_page_type(gtkAssistant, (page is null) ? null : page.getWidgetStruct(), type);
	}

	/**
	 * Forces @assistant to recompute the buttons state.
	 *
	 * GTK+ automatically takes care of this in most situations,
	 * e.g. when the user goes to a different page, or when the
	 * visibility or completeness of a page changes.
	 *
	 * One situation where it can be necessary to call this
	 * function is when changing a value on the current page
	 * affects the future page flow of the assistant.
	 *
	 * Since: 2.10
	 */
	public void updateButtonsState()
	{
		gtk_assistant_update_buttons_state(gtkAssistant);
	}

	protected class OnApplyDelegateWrapper
	{
		void delegate(Assistant) dlg;
		gulong handlerId;

		this(void delegate(Assistant) dlg)
		{
			this.dlg = dlg;
			onApplyListeners ~= this;
		}

		void remove(OnApplyDelegateWrapper source)
		{
			foreach(index, wrapper; onApplyListeners)
			{
				if (wrapper.handlerId == source.handlerId)
				{
					onApplyListeners[index] = null;
					onApplyListeners = std.algorithm.remove(onApplyListeners, index);
					break;
				}
			}
		}
	}
	OnApplyDelegateWrapper[] onApplyListeners;

	/**
	 * The ::apply signal is emitted when the apply button is clicked.
	 *
	 * The default behavior of the #GtkAssistant is to switch to the page
	 * after the current page, unless the current page is the last one.
	 *
	 * A handler for the ::apply signal should carry out the actions for
	 * which the wizard has collected data. If the action takes a long time
	 * to complete, you might consider putting a page of type
	 * %GTK_ASSISTANT_PAGE_PROGRESS after the confirmation page and handle
	 * this operation within the #GtkAssistant::prepare signal of the progress
	 * page.
	 *
	 * Since: 2.10
	 */
	gulong addOnApply(void delegate(Assistant) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		auto wrapper = new OnApplyDelegateWrapper(dlg);
		wrapper.handlerId = Signals.connectData(
			this,
			"apply",
			cast(GCallback)&callBackApply,
			cast(void*)wrapper,
			cast(GClosureNotify)&callBackApplyDestroy,
			connectFlags);
		return wrapper.handlerId;
	}

	extern(C) static void callBackApply(GtkAssistant* assistantStruct, OnApplyDelegateWrapper wrapper)
	{
		wrapper.dlg(wrapper.outer);
	}

	extern(C) static void callBackApplyDestroy(OnApplyDelegateWrapper wrapper, GClosure* closure)
	{
		wrapper.remove(wrapper);
	}

	protected class OnCancelDelegateWrapper
	{
		void delegate(Assistant) dlg;
		gulong handlerId;

		this(void delegate(Assistant) dlg)
		{
			this.dlg = dlg;
			onCancelListeners ~= this;
		}

		void remove(OnCancelDelegateWrapper source)
		{
			foreach(index, wrapper; onCancelListeners)
			{
				if (wrapper.handlerId == source.handlerId)
				{
					onCancelListeners[index] = null;
					onCancelListeners = std.algorithm.remove(onCancelListeners, index);
					break;
				}
			}
		}
	}
	OnCancelDelegateWrapper[] onCancelListeners;

	/**
	 * The ::cancel signal is emitted when then the cancel button is clicked.
	 *
	 * Since: 2.10
	 */
	gulong addOnCancel(void delegate(Assistant) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		auto wrapper = new OnCancelDelegateWrapper(dlg);
		wrapper.handlerId = Signals.connectData(
			this,
			"cancel",
			cast(GCallback)&callBackCancel,
			cast(void*)wrapper,
			cast(GClosureNotify)&callBackCancelDestroy,
			connectFlags);
		return wrapper.handlerId;
	}

	extern(C) static void callBackCancel(GtkAssistant* assistantStruct, OnCancelDelegateWrapper wrapper)
	{
		wrapper.dlg(wrapper.outer);
	}

	extern(C) static void callBackCancelDestroy(OnCancelDelegateWrapper wrapper, GClosure* closure)
	{
		wrapper.remove(wrapper);
	}

	protected class OnCloseDelegateWrapper
	{
		void delegate(Assistant) dlg;
		gulong handlerId;

		this(void delegate(Assistant) dlg)
		{
			this.dlg = dlg;
			onCloseListeners ~= this;
		}

		void remove(OnCloseDelegateWrapper source)
		{
			foreach(index, wrapper; onCloseListeners)
			{
				if (wrapper.handlerId == source.handlerId)
				{
					onCloseListeners[index] = null;
					onCloseListeners = std.algorithm.remove(onCloseListeners, index);
					break;
				}
			}
		}
	}
	OnCloseDelegateWrapper[] onCloseListeners;

	/**
	 * The ::close signal is emitted either when the close button of
	 * a summary page is clicked, or when the apply button in the last
	 * page in the flow (of type %GTK_ASSISTANT_PAGE_CONFIRM) is clicked.
	 *
	 * Since: 2.10
	 */
	gulong addOnClose(void delegate(Assistant) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		auto wrapper = new OnCloseDelegateWrapper(dlg);
		wrapper.handlerId = Signals.connectData(
			this,
			"close",
			cast(GCallback)&callBackClose,
			cast(void*)wrapper,
			cast(GClosureNotify)&callBackCloseDestroy,
			connectFlags);
		return wrapper.handlerId;
	}

	extern(C) static void callBackClose(GtkAssistant* assistantStruct, OnCloseDelegateWrapper wrapper)
	{
		wrapper.dlg(wrapper.outer);
	}

	extern(C) static void callBackCloseDestroy(OnCloseDelegateWrapper wrapper, GClosure* closure)
	{
		wrapper.remove(wrapper);
	}

	protected class OnEscapeDelegateWrapper
	{
		void delegate(Assistant) dlg;
		gulong handlerId;

		this(void delegate(Assistant) dlg)
		{
			this.dlg = dlg;
			onEscapeListeners ~= this;
		}

		void remove(OnEscapeDelegateWrapper source)
		{
			foreach(index, wrapper; onEscapeListeners)
			{
				if (wrapper.handlerId == source.handlerId)
				{
					onEscapeListeners[index] = null;
					onEscapeListeners = std.algorithm.remove(onEscapeListeners, index);
					break;
				}
			}
		}
	}
	OnEscapeDelegateWrapper[] onEscapeListeners;

	/** */
	gulong addOnEscape(void delegate(Assistant) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		auto wrapper = new OnEscapeDelegateWrapper(dlg);
		wrapper.handlerId = Signals.connectData(
			this,
			"escape",
			cast(GCallback)&callBackEscape,
			cast(void*)wrapper,
			cast(GClosureNotify)&callBackEscapeDestroy,
			connectFlags);
		return wrapper.handlerId;
	}

	extern(C) static void callBackEscape(GtkAssistant* assistantStruct, OnEscapeDelegateWrapper wrapper)
	{
		wrapper.dlg(wrapper.outer);
	}

	extern(C) static void callBackEscapeDestroy(OnEscapeDelegateWrapper wrapper, GClosure* closure)
	{
		wrapper.remove(wrapper);
	}

	protected class OnPrepareDelegateWrapper
	{
		void delegate(Widget, Assistant) dlg;
		gulong handlerId;

		this(void delegate(Widget, Assistant) dlg)
		{
			this.dlg = dlg;
			onPrepareListeners ~= this;
		}

		void remove(OnPrepareDelegateWrapper source)
		{
			foreach(index, wrapper; onPrepareListeners)
			{
				if (wrapper.handlerId == source.handlerId)
				{
					onPrepareListeners[index] = null;
					onPrepareListeners = std.algorithm.remove(onPrepareListeners, index);
					break;
				}
			}
		}
	}
	OnPrepareDelegateWrapper[] onPrepareListeners;

	/**
	 * The ::prepare signal is emitted when a new page is set as the
	 * assistant's current page, before making the new page visible.
	 *
	 * A handler for this signal can do any preparations which are
	 * necessary before showing @page.
	 *
	 * Params:
	 *     page = the current page
	 *
	 * Since: 2.10
	 */
	gulong addOnPrepare(void delegate(Widget, Assistant) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
	{
		auto wrapper = new OnPrepareDelegateWrapper(dlg);
		wrapper.handlerId = Signals.connectData(
			this,
			"prepare",
			cast(GCallback)&callBackPrepare,
			cast(void*)wrapper,
			cast(GClosureNotify)&callBackPrepareDestroy,
			connectFlags);
		return wrapper.handlerId;
	}

	extern(C) static void callBackPrepare(GtkAssistant* assistantStruct, GtkWidget* page, OnPrepareDelegateWrapper wrapper)
	{
		wrapper.dlg(ObjectG.getDObject!(Widget)(page), wrapper.outer);
	}

	extern(C) static void callBackPrepareDestroy(OnPrepareDelegateWrapper wrapper, GClosure* closure)
	{
		wrapper.remove(wrapper);
	}
}