2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
27 * outFile = TextChildAnchor
28 * strct = GtkTextChildAnchor
31 * clss = TextChildAnchor
39 * - gtk_text_child_anchor_
49 module gtk
.TextChildAnchor
;
51 private import gtk
.gtktypes
;
53 private import lib
.gtk
;
55 private import glib
.Str
;
59 * You may wish to begin by reading the text widget
60 * conceptual overview which gives an overview of all the objects and data
61 * types related to the text widget and how they work together.
63 public class TextChildAnchor
66 /** the main Gtk struct */
67 protected GtkTextChildAnchor
* gtkTextChildAnchor
;
70 public GtkTextChildAnchor
* getTextChildAnchorStruct()
72 return gtkTextChildAnchor
;
76 /** the main Gtk struct as a void* */
77 protected void* getStruct()
79 return cast(void*)gtkTextChildAnchor
;
83 * Sets our main struct and passes it to the parent class
85 public this (GtkTextChildAnchor
* gtkTextChildAnchor
)
87 this.gtkTextChildAnchor
= gtkTextChildAnchor
;
93 // imports for the signal processing
94 private import gobject
.Signals
;
95 private import gdk
.gdktypes
;
96 int[char[]] connectedSignals
;
98 void delegate(TextChildAnchor
)[] onBackspaceListeners
;
99 void addOnBackspace(void delegate(TextChildAnchor
) dlg
)
101 if ( !("backspace" in connectedSignals
) )
106 cast(GCallback
)&callBackBackspace
,
109 cast(ConnectFlags
)0);
110 connectedSignals
["backspace"] = 1;
112 onBackspaceListeners
~= dlg
;
114 extern(C
) static void callBackBackspace(GtkTextView
* textviewStruct
, TextChildAnchor textChildAnchor
)
116 bit consumed
= false;
118 foreach ( void delegate(TextChildAnchor
) dlg
; textChildAnchor
.onBackspaceListeners
)
120 dlg(textChildAnchor
);
126 void delegate(TextChildAnchor
)[] onCopyClipboardListeners
;
127 void addOnCopyClipboard(void delegate(TextChildAnchor
) dlg
)
129 if ( !("copy-clipboard" in connectedSignals
) )
134 cast(GCallback
)&callBackCopyClipboard
,
137 cast(ConnectFlags
)0);
138 connectedSignals
["copy-clipboard"] = 1;
140 onCopyClipboardListeners
~= dlg
;
142 extern(C
) static void callBackCopyClipboard(GtkTextView
* textviewStruct
, TextChildAnchor textChildAnchor
)
144 bit consumed
= false;
146 foreach ( void delegate(TextChildAnchor
) dlg
; textChildAnchor
.onCopyClipboardListeners
)
148 dlg(textChildAnchor
);
154 void delegate(TextChildAnchor
)[] onCutClipboardListeners
;
155 void addOnCutClipboard(void delegate(TextChildAnchor
) dlg
)
157 if ( !("cut-clipboard" in connectedSignals
) )
162 cast(GCallback
)&callBackCutClipboard
,
165 cast(ConnectFlags
)0);
166 connectedSignals
["cut-clipboard"] = 1;
168 onCutClipboardListeners
~= dlg
;
170 extern(C
) static void callBackCutClipboard(GtkTextView
* textviewStruct
, TextChildAnchor textChildAnchor
)
172 bit consumed
= false;
174 foreach ( void delegate(TextChildAnchor
) dlg
; textChildAnchor
.onCutClipboardListeners
)
176 dlg(textChildAnchor
);
182 void delegate(GtkDeleteType
, gint
, TextChildAnchor
)[] onDeleteFromCursorListeners
;
183 void addOnDeleteFromCursor(void delegate(GtkDeleteType
, gint
, TextChildAnchor
) dlg
)
185 if ( !("delete-from-cursor" in connectedSignals
) )
189 "delete-from-cursor",
190 cast(GCallback
)&callBackDeleteFromCursor
,
193 cast(ConnectFlags
)0);
194 connectedSignals
["delete-from-cursor"] = 1;
196 onDeleteFromCursorListeners
~= dlg
;
198 extern(C
) static void callBackDeleteFromCursor(GtkTextView
* textviewStruct
, GtkDeleteType arg1
, gint arg2
, TextChildAnchor textChildAnchor
)
200 bit consumed
= false;
202 foreach ( void delegate(GtkDeleteType
, gint
, TextChildAnchor
) dlg
; textChildAnchor
.onDeleteFromCursorListeners
)
204 dlg(arg1
, arg2
, textChildAnchor
);
210 void delegate(char[], TextChildAnchor
)[] onInsertAtCursorListeners
;
211 void addOnInsertAtCursor(void delegate(char[], TextChildAnchor
) dlg
)
213 if ( !("insert-at-cursor" in connectedSignals
) )
218 cast(GCallback
)&callBackInsertAtCursor
,
221 cast(ConnectFlags
)0);
222 connectedSignals
["insert-at-cursor"] = 1;
224 onInsertAtCursorListeners
~= dlg
;
226 extern(C
) static void callBackInsertAtCursor(GtkTextView
* textviewStruct
, gchar
* arg1
, TextChildAnchor textChildAnchor
)
228 bit consumed
= false;
230 foreach ( void delegate(char[], TextChildAnchor
) dlg
; textChildAnchor
.onInsertAtCursorListeners
)
232 dlg(Str
.toString(arg1
), textChildAnchor
);
238 void delegate(GtkMovementStep
, gint
, gboolean
, TextChildAnchor
)[] onMoveCursorListeners
;
239 void addOnMoveCursor(void delegate(GtkMovementStep
, gint
, gboolean
, TextChildAnchor
) dlg
)
241 if ( !("move-cursor" in connectedSignals
) )
246 cast(GCallback
)&callBackMoveCursor
,
249 cast(ConnectFlags
)0);
250 connectedSignals
["move-cursor"] = 1;
252 onMoveCursorListeners
~= dlg
;
254 extern(C
) static void callBackMoveCursor(GtkTextView
* widgetStruct
, GtkMovementStep step
, gint count
, gboolean extendSelection
, TextChildAnchor textChildAnchor
)
256 bit consumed
= false;
258 foreach ( void delegate(GtkMovementStep
, gint
, gboolean
, TextChildAnchor
) dlg
; textChildAnchor
.onMoveCursorListeners
)
260 dlg(step
, count
, extendSelection
, textChildAnchor
);
266 void delegate(GtkDirectionType
, TextChildAnchor
)[] onMoveFocusListeners
;
267 void addOnMoveFocus(void delegate(GtkDirectionType
, TextChildAnchor
) dlg
)
269 if ( !("move-focus" in connectedSignals
) )
274 cast(GCallback
)&callBackMoveFocus
,
277 cast(ConnectFlags
)0);
278 connectedSignals
["move-focus"] = 1;
280 onMoveFocusListeners
~= dlg
;
282 extern(C
) static void callBackMoveFocus(GtkTextView
* textviewStruct
, GtkDirectionType arg1
, TextChildAnchor textChildAnchor
)
284 bit consumed
= false;
286 foreach ( void delegate(GtkDirectionType
, TextChildAnchor
) dlg
; textChildAnchor
.onMoveFocusListeners
)
288 dlg(arg1
, textChildAnchor
);
294 void delegate(GtkScrollStep
, gint
, TextChildAnchor
)[] onMoveViewportListeners
;
295 void addOnMoveViewport(void delegate(GtkScrollStep
, gint
, TextChildAnchor
) dlg
)
297 if ( !("move-viewport" in connectedSignals
) )
302 cast(GCallback
)&callBackMoveViewport
,
305 cast(ConnectFlags
)0);
306 connectedSignals
["move-viewport"] = 1;
308 onMoveViewportListeners
~= dlg
;
310 extern(C
) static void callBackMoveViewport(GtkTextView
* textviewStruct
, GtkScrollStep arg1
, gint arg2
, TextChildAnchor textChildAnchor
)
312 bit consumed
= false;
314 foreach ( void delegate(GtkScrollStep
, gint
, TextChildAnchor
) dlg
; textChildAnchor
.onMoveViewportListeners
)
316 dlg(arg1
, arg2
, textChildAnchor
);
322 void delegate(gint
, gboolean
, TextChildAnchor
)[] onPageHorizontallyListeners
;
323 void addOnPageHorizontally(void delegate(gint
, gboolean
, TextChildAnchor
) dlg
)
325 if ( !("page-horizontally" in connectedSignals
) )
330 cast(GCallback
)&callBackPageHorizontally
,
333 cast(ConnectFlags
)0);
334 connectedSignals
["page-horizontally"] = 1;
336 onPageHorizontallyListeners
~= dlg
;
338 extern(C
) static void callBackPageHorizontally(GtkTextView
* textviewStruct
, gint arg1
, gboolean arg2
, TextChildAnchor textChildAnchor
)
340 bit consumed
= false;
342 foreach ( void delegate(gint
, gboolean
, TextChildAnchor
) dlg
; textChildAnchor
.onPageHorizontallyListeners
)
344 dlg(arg1
, arg2
, textChildAnchor
);
350 void delegate(TextChildAnchor
)[] onPasteClipboardListeners
;
351 void addOnPasteClipboard(void delegate(TextChildAnchor
) dlg
)
353 if ( !("paste-clipboard" in connectedSignals
) )
358 cast(GCallback
)&callBackPasteClipboard
,
361 cast(ConnectFlags
)0);
362 connectedSignals
["paste-clipboard"] = 1;
364 onPasteClipboardListeners
~= dlg
;
366 extern(C
) static void callBackPasteClipboard(GtkTextView
* textviewStruct
, TextChildAnchor textChildAnchor
)
368 bit consumed
= false;
370 foreach ( void delegate(TextChildAnchor
) dlg
; textChildAnchor
.onPasteClipboardListeners
)
372 dlg(textChildAnchor
);
378 void delegate(GtkMenu
*, TextChildAnchor
)[] onPopulatePopupListeners
;
379 void addOnPopulatePopup(void delegate(GtkMenu
*, TextChildAnchor
) dlg
)
381 if ( !("populate-popup" in connectedSignals
) )
386 cast(GCallback
)&callBackPopulatePopup
,
389 cast(ConnectFlags
)0);
390 connectedSignals
["populate-popup"] = 1;
392 onPopulatePopupListeners
~= dlg
;
394 extern(C
) static void callBackPopulatePopup(GtkTextView
* textviewStruct
, GtkMenu
* arg1
, TextChildAnchor textChildAnchor
)
396 bit consumed
= false;
398 foreach ( void delegate(GtkMenu
*, TextChildAnchor
) dlg
; textChildAnchor
.onPopulatePopupListeners
)
400 dlg(arg1
, textChildAnchor
);
406 void delegate(gboolean
, TextChildAnchor
)[] onSelectAllListeners
;
407 void addOnSelectAll(void delegate(gboolean
, TextChildAnchor
) dlg
)
409 if ( !("select-all" in connectedSignals
) )
414 cast(GCallback
)&callBackSelectAll
,
417 cast(ConnectFlags
)0);
418 connectedSignals
["select-all"] = 1;
420 onSelectAllListeners
~= dlg
;
422 extern(C
) static void callBackSelectAll(GtkTextView
* textviewStruct
, gboolean arg1
, TextChildAnchor textChildAnchor
)
424 bit consumed
= false;
426 foreach ( void delegate(gboolean
, TextChildAnchor
) dlg
; textChildAnchor
.onSelectAllListeners
)
428 dlg(arg1
, textChildAnchor
);
434 void delegate(TextChildAnchor
)[] onSetAnchorListeners
;
435 void addOnSetAnchor(void delegate(TextChildAnchor
) dlg
)
437 if ( !("set-anchor" in connectedSignals
) )
442 cast(GCallback
)&callBackSetAnchor
,
445 cast(ConnectFlags
)0);
446 connectedSignals
["set-anchor"] = 1;
448 onSetAnchorListeners
~= dlg
;
450 extern(C
) static void callBackSetAnchor(GtkTextView
* textviewStruct
, TextChildAnchor textChildAnchor
)
452 bit consumed
= false;
454 foreach ( void delegate(TextChildAnchor
) dlg
; textChildAnchor
.onSetAnchorListeners
)
456 dlg(textChildAnchor
);
462 void delegate(GtkAdjustment
*, GtkAdjustment
*, TextChildAnchor
)[] onSetScrollAdjustmentsListeners
;
463 void addOnSetScrollAdjustments(void delegate(GtkAdjustment
*, GtkAdjustment
*, TextChildAnchor
) dlg
)
465 if ( !("set-scroll-adjustments" in connectedSignals
) )
469 "set-scroll-adjustments",
470 cast(GCallback
)&callBackSetScrollAdjustments
,
473 cast(ConnectFlags
)0);
474 connectedSignals
["set-scroll-adjustments"] = 1;
476 onSetScrollAdjustmentsListeners
~= dlg
;
478 extern(C
) static void callBackSetScrollAdjustments(GtkTextView
* textviewStruct
, GtkAdjustment
* arg1
, GtkAdjustment
* arg2
, TextChildAnchor textChildAnchor
)
480 bit consumed
= false;
482 foreach ( void delegate(GtkAdjustment
*, GtkAdjustment
*, TextChildAnchor
) dlg
; textChildAnchor
.onSetScrollAdjustmentsListeners
)
484 dlg(arg1
, arg2
, textChildAnchor
);
490 void delegate(TextChildAnchor
)[] onToggleOverwriteListeners
;
491 void addOnToggleOverwrite(void delegate(TextChildAnchor
) dlg
)
493 if ( !("toggle-overwrite" in connectedSignals
) )
498 cast(GCallback
)&callBackToggleOverwrite
,
501 cast(ConnectFlags
)0);
502 connectedSignals
["toggle-overwrite"] = 1;
504 onToggleOverwriteListeners
~= dlg
;
506 extern(C
) static void callBackToggleOverwrite(GtkTextView
* textviewStruct
, TextChildAnchor textChildAnchor
)
508 bit consumed
= false;
510 foreach ( void delegate(TextChildAnchor
) dlg
; textChildAnchor
.onToggleOverwriteListeners
)
512 dlg(textChildAnchor
);
551 * Creates a new GtkTextChildAnchor. Usually you would then insert
552 * it into a GtkTextBuffer with gtk_text_buffer_insert_child_anchor().
553 * To perform the creation and insertion in one step, use the
554 * convenience function gtk_text_buffer_create_child_anchor().
556 * a new GtkTextChildAnchor
560 // GtkTextChildAnchor* gtk_text_child_anchor_new (void);
561 this(cast(GtkTextChildAnchor
*)gtk_text_child_anchor_new() );
565 * Gets a list of all widgets anchored at this child anchor.
566 * The returned list should be freed with g_list_free().
568 * a GtkTextChildAnchor
570 * list of widgets anchored at anchor
572 public GList
* getWidgets()
574 // GList* gtk_text_child_anchor_get_widgets (GtkTextChildAnchor *anchor);
575 return gtk_text_child_anchor_get_widgets(gtkTextChildAnchor
);
579 * Determines whether a child anchor has been deleted from
580 * the buffer. Keep in mind that the child anchor will be
581 * unreferenced when removed from the buffer, so you need to
582 * hold your own reference (with g_object_ref()) if you plan
583 * to use this function otherwise all deleted child anchors
584 * will also be finalized.
586 * a GtkTextChildAnchor
588 * TRUE if the child anchor has been deleted from its buffer
590 public int getDeleted()
592 // gboolean gtk_text_child_anchor_get_deleted (GtkTextChildAnchor *anchor);
593 return gtk_text_child_anchor_get_deleted(gtkTextChildAnchor
);