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 gtk.Range;
26 
27 private import gobject.ObjectG;
28 private import gobject.Signals;
29 private import gtk.Adjustment;
30 private import gtk.OrientableIF;
31 private import gtk.OrientableT;
32 private import gtk.Widget;
33 private import gtkc.gtk;
34 public  import gtkc.gtktypes;
35 private import std.algorithm;
36 
37 
38 /**
39  * #GtkRange is the common base class for widgets which visualize an
40  * adjustment, e.g #GtkScale or #GtkScrollbar.
41  * 
42  * Apart from signals for monitoring the parameters of the adjustment,
43  * #GtkRange provides properties and methods for influencing the sensitivity
44  * of the “steppers”. It also provides properties and methods for setting a
45  * “fill level” on range widgets. See gtk_range_set_fill_level().
46  */
47 public class Range : Widget, OrientableIF
48 {
49 	/** the main Gtk struct */
50 	protected GtkRange* gtkRange;
51 
52 	/** Get the main Gtk struct */
53 	public GtkRange* getRangeStruct()
54 	{
55 		return gtkRange;
56 	}
57 
58 	/** the main Gtk struct as a void* */
59 	protected override void* getStruct()
60 	{
61 		return cast(void*)gtkRange;
62 	}
63 
64 	protected override void setStruct(GObject* obj)
65 	{
66 		gtkRange = cast(GtkRange*)obj;
67 		super.setStruct(obj);
68 	}
69 
70 	/**
71 	 * Sets our main struct and passes it to the parent class.
72 	 */
73 	public this (GtkRange* gtkRange, bool ownedRef = false)
74 	{
75 		this.gtkRange = gtkRange;
76 		super(cast(GtkWidget*)gtkRange, ownedRef);
77 	}
78 
79 	// add the Orientable capabilities
80 	mixin OrientableT!(GtkRange);
81 
82 
83 	/** */
84 	public static GType getType()
85 	{
86 		return gtk_range_get_type();
87 	}
88 
89 	/**
90 	 * Get the #GtkAdjustment which is the “model” object for #GtkRange.
91 	 * See gtk_range_set_adjustment() for details.
92 	 * The return value does not have a reference added, so should not
93 	 * be unreferenced.
94 	 *
95 	 * Returns: a #GtkAdjustment
96 	 */
97 	public Adjustment getAdjustment()
98 	{
99 		auto p = gtk_range_get_adjustment(gtkRange);
100 		
101 		if(p is null)
102 		{
103 			return null;
104 		}
105 		
106 		return ObjectG.getDObject!(Adjustment)(cast(GtkAdjustment*) p);
107 	}
108 
109 	/**
110 	 * Gets the current position of the fill level indicator.
111 	 *
112 	 * Returns: The current fill level
113 	 *
114 	 * Since: 2.12
115 	 */
116 	public double getFillLevel()
117 	{
118 		return gtk_range_get_fill_level(gtkRange);
119 	}
120 
121 	/**
122 	 * Gets the value set by gtk_range_set_flippable().
123 	 *
124 	 * Returns: %TRUE if the range is flippable
125 	 *
126 	 * Since: 2.18
127 	 */
128 	public bool getFlippable()
129 	{
130 		return gtk_range_get_flippable(gtkRange) != 0;
131 	}
132 
133 	/**
134 	 * Gets the value set by gtk_range_set_inverted().
135 	 *
136 	 * Returns: %TRUE if the range is inverted
137 	 */
138 	public bool getInverted()
139 	{
140 		return gtk_range_get_inverted(gtkRange) != 0;
141 	}
142 
143 	/**
144 	 * Gets the sensitivity policy for the stepper that points to the
145 	 * 'lower' end of the GtkRange’s adjustment.
146 	 *
147 	 * Returns: The lower stepper’s sensitivity policy.
148 	 *
149 	 * Since: 2.10
150 	 */
151 	public GtkSensitivityType getLowerStepperSensitivity()
152 	{
153 		return gtk_range_get_lower_stepper_sensitivity(gtkRange);
154 	}
155 
156 	/**
157 	 * This function is useful mainly for #GtkRange subclasses.
158 	 *
159 	 * See gtk_range_set_min_slider_size().
160 	 *
161 	 * Deprecated: Use the min-height/min-width CSS properties on the slider
162 	 * node.
163 	 *
164 	 * Returns: The minimum size of the range’s slider.
165 	 *
166 	 * Since: 2.20
167 	 */
168 	public int getMinSliderSize()
169 	{
170 		return gtk_range_get_min_slider_size(gtkRange);
171 	}
172 
173 	/**
174 	 * This function returns the area that contains the range’s trough
175 	 * and its steppers, in widget->window coordinates.
176 	 *
177 	 * This function is useful mainly for #GtkRange subclasses.
178 	 *
179 	 * Params:
180 	 *     rangeRect = return location for the range rectangle
181 	 *
182 	 * Since: 2.20
183 	 */
184 	public void getRangeRect(out GdkRectangle rangeRect)
185 	{
186 		gtk_range_get_range_rect(gtkRange, &rangeRect);
187 	}
188 
189 	/**
190 	 * Gets whether the range is restricted to the fill level.
191 	 *
192 	 * Returns: %TRUE if @range is restricted to the fill level.
193 	 *
194 	 * Since: 2.12
195 	 */
196 	public bool getRestrictToFillLevel()
197 	{
198 		return gtk_range_get_restrict_to_fill_level(gtkRange) != 0;
199 	}
200 
201 	/**
202 	 * Gets the number of digits to round the value to when
203 	 * it changes. See #GtkRange::change-value.
204 	 *
205 	 * Returns: the number of digits to round to
206 	 *
207 	 * Since: 2.24
208 	 */
209 	public int getRoundDigits()
210 	{
211 		return gtk_range_get_round_digits(gtkRange);
212 	}
213 
214 	/**
215 	 * Gets whether the range displays the fill level graphically.
216 	 *
217 	 * Returns: %TRUE if @range shows the fill level.
218 	 *
219 	 * Since: 2.12
220 	 */
221 	public bool getShowFillLevel()
222 	{
223 		return gtk_range_get_show_fill_level(gtkRange) != 0;
224 	}
225 
226 	/**
227 	 * This function returns sliders range along the long dimension,
228 	 * in widget->window coordinates.
229 	 *
230 	 * This function is useful mainly for #GtkRange subclasses.
231 	 *
232 	 * Params:
233 	 *     sliderStart = return location for the slider's
234 	 *         start, or %NULL
235 	 *     sliderEnd = return location for the slider's
236 	 *         end, or %NULL
237 	 *
238 	 * Since: 2.20
239 	 */
240 	public void getSliderRange(out int sliderStart, out int sliderEnd)
241 	{
242 		gtk_range_get_slider_range(gtkRange, &sliderStart, &sliderEnd);
243 	}
244 
245 	/**
246 	 * This function is useful mainly for #GtkRange subclasses.
247 	 *
248 	 * See gtk_range_set_slider_size_fixed().
249 	 *
250 	 * Returns: whether the range’s slider has a fixed size.
251 	 *
252 	 * Since: 2.20
253 	 */
254 	public bool getSliderSizeFixed()
255 	{
256 		return gtk_range_get_slider_size_fixed(gtkRange) != 0;
257 	}
258 
259 	/**
260 	 * Gets the sensitivity policy for the stepper that points to the
261 	 * 'upper' end of the GtkRange’s adjustment.
262 	 *
263 	 * Returns: The upper stepper’s sensitivity policy.
264 	 *
265 	 * Since: 2.10
266 	 */
267 	public GtkSensitivityType getUpperStepperSensitivity()
268 	{
269 		return gtk_range_get_upper_stepper_sensitivity(gtkRange);
270 	}
271 
272 	/**
273 	 * Gets the current value of the range.
274 	 *
275 	 * Returns: current value of the range.
276 	 */
277 	public double getValue()
278 	{
279 		return gtk_range_get_value(gtkRange);
280 	}
281 
282 	/**
283 	 * Sets the adjustment to be used as the “model” object for this range
284 	 * widget. The adjustment indicates the current range value, the
285 	 * minimum and maximum range values, the step/page increments used
286 	 * for keybindings and scrolling, and the page size. The page size
287 	 * is normally 0 for #GtkScale and nonzero for #GtkScrollbar, and
288 	 * indicates the size of the visible area of the widget being scrolled.
289 	 * The page size affects the size of the scrollbar slider.
290 	 *
291 	 * Params:
292 	 *     adjustment = a #GtkAdjustment
293 	 */
294 	public void setAdjustment(Adjustment adjustment)
295 	{
296 		gtk_range_set_adjustment(gtkRange, (adjustment is null) ? null : adjustment.getAdjustmentStruct());
297 	}
298 
299 	/**
300 	 * Set the new position of the fill level indicator.
301 	 *
302 	 * The “fill level” is probably best described by its most prominent
303 	 * use case, which is an indicator for the amount of pre-buffering in
304 	 * a streaming media player. In that use case, the value of the range
305 	 * would indicate the current play position, and the fill level would
306 	 * be the position up to which the file/stream has been downloaded.
307 	 *
308 	 * This amount of prebuffering can be displayed on the range’s trough
309 	 * and is themeable separately from the trough. To enable fill level
310 	 * display, use gtk_range_set_show_fill_level(). The range defaults
311 	 * to not showing the fill level.
312 	 *
313 	 * Additionally, it’s possible to restrict the range’s slider position
314 	 * to values which are smaller than the fill level. This is controller
315 	 * by gtk_range_set_restrict_to_fill_level() and is by default
316 	 * enabled.
317 	 *
318 	 * Params:
319 	 *     fillLevel = the new position of the fill level indicator
320 	 *
321 	 * Since: 2.12
322 	 */
323 	public void setFillLevel(double fillLevel)
324 	{
325 		gtk_range_set_fill_level(gtkRange, fillLevel);
326 	}
327 
328 	/**
329 	 * If a range is flippable, it will switch its direction if it is
330 	 * horizontal and its direction is %GTK_TEXT_DIR_RTL.
331 	 *
332 	 * See gtk_widget_get_direction().
333 	 *
334 	 * Params:
335 	 *     flippable = %TRUE to make the range flippable
336 	 *
337 	 * Since: 2.18
338 	 */
339 	public void setFlippable(bool flippable)
340 	{
341 		gtk_range_set_flippable(gtkRange, flippable);
342 	}
343 
344 	/**
345 	 * Sets the step and page sizes for the range.
346 	 * The step size is used when the user clicks the #GtkScrollbar
347 	 * arrows or moves #GtkScale via arrow keys. The page size
348 	 * is used for example when moving via Page Up or Page Down keys.
349 	 *
350 	 * Params:
351 	 *     step = step size
352 	 *     page = page size
353 	 */
354 	public void setIncrements(double step, double page)
355 	{
356 		gtk_range_set_increments(gtkRange, step, page);
357 	}
358 
359 	/**
360 	 * Ranges normally move from lower to higher values as the
361 	 * slider moves from top to bottom or left to right. Inverted
362 	 * ranges have higher values at the top or on the right rather than
363 	 * on the bottom or left.
364 	 *
365 	 * Params:
366 	 *     setting = %TRUE to invert the range
367 	 */
368 	public void setInverted(bool setting)
369 	{
370 		gtk_range_set_inverted(gtkRange, setting);
371 	}
372 
373 	/**
374 	 * Sets the sensitivity policy for the stepper that points to the
375 	 * 'lower' end of the GtkRange’s adjustment.
376 	 *
377 	 * Params:
378 	 *     sensitivity = the lower stepper’s sensitivity policy.
379 	 *
380 	 * Since: 2.10
381 	 */
382 	public void setLowerStepperSensitivity(GtkSensitivityType sensitivity)
383 	{
384 		gtk_range_set_lower_stepper_sensitivity(gtkRange, sensitivity);
385 	}
386 
387 	/**
388 	 * Sets the minimum size of the range’s slider.
389 	 *
390 	 * This function is useful mainly for #GtkRange subclasses.
391 	 *
392 	 * Deprecated: Use the min-height/min-width CSS properties on the slider
393 	 * node.
394 	 *
395 	 * Params:
396 	 *     minSize = The slider’s minimum size
397 	 *
398 	 * Since: 2.20
399 	 */
400 	public void setMinSliderSize(int minSize)
401 	{
402 		gtk_range_set_min_slider_size(gtkRange, minSize);
403 	}
404 
405 	/**
406 	 * Sets the allowable values in the #GtkRange, and clamps the range
407 	 * value to be between @min and @max. (If the range has a non-zero
408 	 * page size, it is clamped between @min and @max - page-size.)
409 	 *
410 	 * Params:
411 	 *     min = minimum range value
412 	 *     max = maximum range value
413 	 */
414 	public void setRange(double min, double max)
415 	{
416 		gtk_range_set_range(gtkRange, min, max);
417 	}
418 
419 	/**
420 	 * Sets whether the slider is restricted to the fill level. See
421 	 * gtk_range_set_fill_level() for a general description of the fill
422 	 * level concept.
423 	 *
424 	 * Params:
425 	 *     restrictToFillLevel = Whether the fill level restricts slider movement.
426 	 *
427 	 * Since: 2.12
428 	 */
429 	public void setRestrictToFillLevel(bool restrictToFillLevel)
430 	{
431 		gtk_range_set_restrict_to_fill_level(gtkRange, restrictToFillLevel);
432 	}
433 
434 	/**
435 	 * Sets the number of digits to round the value to when
436 	 * it changes. See #GtkRange::change-value.
437 	 *
438 	 * Params:
439 	 *     roundDigits = the precision in digits, or -1
440 	 *
441 	 * Since: 2.24
442 	 */
443 	public void setRoundDigits(int roundDigits)
444 	{
445 		gtk_range_set_round_digits(gtkRange, roundDigits);
446 	}
447 
448 	/**
449 	 * Sets whether a graphical fill level is show on the trough. See
450 	 * gtk_range_set_fill_level() for a general description of the fill
451 	 * level concept.
452 	 *
453 	 * Params:
454 	 *     showFillLevel = Whether a fill level indicator graphics is shown.
455 	 *
456 	 * Since: 2.12
457 	 */
458 	public void setShowFillLevel(bool showFillLevel)
459 	{
460 		gtk_range_set_show_fill_level(gtkRange, showFillLevel);
461 	}
462 
463 	/**
464 	 * Sets whether the range’s slider has a fixed size, or a size that
465 	 * depends on its adjustment’s page size.
466 	 *
467 	 * This function is useful mainly for #GtkRange subclasses.
468 	 *
469 	 * Params:
470 	 *     sizeFixed = %TRUE to make the slider size constant
471 	 *
472 	 * Since: 2.20
473 	 */
474 	public void setSliderSizeFixed(bool sizeFixed)
475 	{
476 		gtk_range_set_slider_size_fixed(gtkRange, sizeFixed);
477 	}
478 
479 	/**
480 	 * Sets the sensitivity policy for the stepper that points to the
481 	 * 'upper' end of the GtkRange’s adjustment.
482 	 *
483 	 * Params:
484 	 *     sensitivity = the upper stepper’s sensitivity policy.
485 	 *
486 	 * Since: 2.10
487 	 */
488 	public void setUpperStepperSensitivity(GtkSensitivityType sensitivity)
489 	{
490 		gtk_range_set_upper_stepper_sensitivity(gtkRange, sensitivity);
491 	}
492 
493 	/**
494 	 * Sets the current value of the range; if the value is outside the
495 	 * minimum or maximum range values, it will be clamped to fit inside
496 	 * them. The range emits the #GtkRange::value-changed signal if the
497 	 * value changes.
498 	 *
499 	 * Params:
500 	 *     value = new value of the range
501 	 */
502 	public void setValue(double value)
503 	{
504 		gtk_range_set_value(gtkRange, value);
505 	}
506 
507 	protected class OnAdjustBoundsDelegateWrapper
508 	{
509 		static OnAdjustBoundsDelegateWrapper[] listeners;
510 		void delegate(double, Range) dlg;
511 		gulong handlerId;
512 		
513 		this(void delegate(double, Range) dlg)
514 		{
515 			this.dlg = dlg;
516 			this.listeners ~= this;
517 		}
518 		
519 		void remove(OnAdjustBoundsDelegateWrapper source)
520 		{
521 			foreach(index, wrapper; listeners)
522 			{
523 				if (wrapper.handlerId == source.handlerId)
524 				{
525 					listeners[index] = null;
526 					listeners = std.algorithm.remove(listeners, index);
527 					break;
528 				}
529 			}
530 		}
531 	}
532 
533 	/**
534 	 * Emitted before clamping a value, to give the application a
535 	 * chance to adjust the bounds.
536 	 *
537 	 * Params:
538 	 *     value = the value before we clamp
539 	 */
540 	gulong addOnAdjustBounds(void delegate(double, Range) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
541 	{
542 		auto wrapper = new OnAdjustBoundsDelegateWrapper(dlg);
543 		wrapper.handlerId = Signals.connectData(
544 			this,
545 			"adjust-bounds",
546 			cast(GCallback)&callBackAdjustBounds,
547 			cast(void*)wrapper,
548 			cast(GClosureNotify)&callBackAdjustBoundsDestroy,
549 			connectFlags);
550 		return wrapper.handlerId;
551 	}
552 	
553 	extern(C) static void callBackAdjustBounds(GtkRange* rangeStruct, double value, OnAdjustBoundsDelegateWrapper wrapper)
554 	{
555 		wrapper.dlg(value, wrapper.outer);
556 	}
557 	
558 	extern(C) static void callBackAdjustBoundsDestroy(OnAdjustBoundsDelegateWrapper wrapper, GClosure* closure)
559 	{
560 		wrapper.remove(wrapper);
561 	}
562 
563 	protected class OnChangeValueDelegateWrapper
564 	{
565 		static OnChangeValueDelegateWrapper[] listeners;
566 		bool delegate(GtkScrollType, double, Range) dlg;
567 		gulong handlerId;
568 		
569 		this(bool delegate(GtkScrollType, double, Range) dlg)
570 		{
571 			this.dlg = dlg;
572 			this.listeners ~= this;
573 		}
574 		
575 		void remove(OnChangeValueDelegateWrapper source)
576 		{
577 			foreach(index, wrapper; listeners)
578 			{
579 				if (wrapper.handlerId == source.handlerId)
580 				{
581 					listeners[index] = null;
582 					listeners = std.algorithm.remove(listeners, index);
583 					break;
584 				}
585 			}
586 		}
587 	}
588 
589 	/**
590 	 * The #GtkRange::change-value signal is emitted when a scroll action is
591 	 * performed on a range.  It allows an application to determine the
592 	 * type of scroll event that occurred and the resultant new value.
593 	 * The application can handle the event itself and return %TRUE to
594 	 * prevent further processing.  Or, by returning %FALSE, it can pass
595 	 * the event to other handlers until the default GTK+ handler is
596 	 * reached.
597 	 *
598 	 * The value parameter is unrounded.  An application that overrides
599 	 * the GtkRange::change-value signal is responsible for clamping the
600 	 * value to the desired number of decimal digits; the default GTK+
601 	 * handler clamps the value based on #GtkRange:round-digits.
602 	 *
603 	 * Params:
604 	 *     scroll = the type of scroll action that was performed
605 	 *     value = the new value resulting from the scroll action
606 	 *
607 	 * Returns: %TRUE to prevent other handlers from being invoked for
608 	 *     the signal, %FALSE to propagate the signal further
609 	 *
610 	 * Since: 2.6
611 	 */
612 	gulong addOnChangeValue(bool delegate(GtkScrollType, double, Range) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
613 	{
614 		auto wrapper = new OnChangeValueDelegateWrapper(dlg);
615 		wrapper.handlerId = Signals.connectData(
616 			this,
617 			"change-value",
618 			cast(GCallback)&callBackChangeValue,
619 			cast(void*)wrapper,
620 			cast(GClosureNotify)&callBackChangeValueDestroy,
621 			connectFlags);
622 		return wrapper.handlerId;
623 	}
624 	
625 	extern(C) static int callBackChangeValue(GtkRange* rangeStruct, GtkScrollType scroll, double value, OnChangeValueDelegateWrapper wrapper)
626 	{
627 		return wrapper.dlg(scroll, value, wrapper.outer);
628 	}
629 	
630 	extern(C) static void callBackChangeValueDestroy(OnChangeValueDelegateWrapper wrapper, GClosure* closure)
631 	{
632 		wrapper.remove(wrapper);
633 	}
634 
635 	protected class OnMoveSliderDelegateWrapper
636 	{
637 		static OnMoveSliderDelegateWrapper[] listeners;
638 		void delegate(GtkScrollType, Range) dlg;
639 		gulong handlerId;
640 		
641 		this(void delegate(GtkScrollType, Range) dlg)
642 		{
643 			this.dlg = dlg;
644 			this.listeners ~= this;
645 		}
646 		
647 		void remove(OnMoveSliderDelegateWrapper source)
648 		{
649 			foreach(index, wrapper; listeners)
650 			{
651 				if (wrapper.handlerId == source.handlerId)
652 				{
653 					listeners[index] = null;
654 					listeners = std.algorithm.remove(listeners, index);
655 					break;
656 				}
657 			}
658 		}
659 	}
660 
661 	/**
662 	 * Virtual function that moves the slider. Used for keybindings.
663 	 *
664 	 * Params:
665 	 *     step = how to move the slider
666 	 */
667 	gulong addOnMoveSlider(void delegate(GtkScrollType, Range) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
668 	{
669 		auto wrapper = new OnMoveSliderDelegateWrapper(dlg);
670 		wrapper.handlerId = Signals.connectData(
671 			this,
672 			"move-slider",
673 			cast(GCallback)&callBackMoveSlider,
674 			cast(void*)wrapper,
675 			cast(GClosureNotify)&callBackMoveSliderDestroy,
676 			connectFlags);
677 		return wrapper.handlerId;
678 	}
679 	
680 	extern(C) static void callBackMoveSlider(GtkRange* rangeStruct, GtkScrollType step, OnMoveSliderDelegateWrapper wrapper)
681 	{
682 		wrapper.dlg(step, wrapper.outer);
683 	}
684 	
685 	extern(C) static void callBackMoveSliderDestroy(OnMoveSliderDelegateWrapper wrapper, GClosure* closure)
686 	{
687 		wrapper.remove(wrapper);
688 	}
689 
690 	protected class OnValueChangedDelegateWrapper
691 	{
692 		static OnValueChangedDelegateWrapper[] listeners;
693 		void delegate(Range) dlg;
694 		gulong handlerId;
695 		
696 		this(void delegate(Range) dlg)
697 		{
698 			this.dlg = dlg;
699 			this.listeners ~= this;
700 		}
701 		
702 		void remove(OnValueChangedDelegateWrapper source)
703 		{
704 			foreach(index, wrapper; listeners)
705 			{
706 				if (wrapper.handlerId == source.handlerId)
707 				{
708 					listeners[index] = null;
709 					listeners = std.algorithm.remove(listeners, index);
710 					break;
711 				}
712 			}
713 		}
714 	}
715 
716 	/**
717 	 * Emitted when the range value changes.
718 	 */
719 	gulong addOnValueChanged(void delegate(Range) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
720 	{
721 		auto wrapper = new OnValueChangedDelegateWrapper(dlg);
722 		wrapper.handlerId = Signals.connectData(
723 			this,
724 			"value-changed",
725 			cast(GCallback)&callBackValueChanged,
726 			cast(void*)wrapper,
727 			cast(GClosureNotify)&callBackValueChangedDestroy,
728 			connectFlags);
729 		return wrapper.handlerId;
730 	}
731 	
732 	extern(C) static void callBackValueChanged(GtkRange* rangeStruct, OnValueChangedDelegateWrapper wrapper)
733 	{
734 		wrapper.dlg(wrapper.outer);
735 	}
736 	
737 	extern(C) static void callBackValueChangedDestroy(OnValueChangedDelegateWrapper wrapper, GClosure* closure)
738 	{
739 		wrapper.remove(wrapper);
740 	}
741 }