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
  
878
  
879
  
880
  
881
  
882
  
883
  
884
  
885
  
886
  
887
  
888
  
889
  
890
  
891
  
892
  
893
  
894
  
895
  
896
  
897
  
898
  
899
  
900
  
901
  
902
  
903
  
904
  
905
  
906
  
907
  
908
  
909
  
910
  
911
  
912
  
913
  
914
  
915
  
916
  
917
  
918
  
919
  
920
  
921
  
922
  
923
  
924
  
925
  
926
  
927
  
928
  
929
  
930
  
931
  
932
  
933
  
934
  
935
  
/* -*- C -*- */ 
class GTK2.TextBuffer; 
inherit G.Object; 
 
//! Properties: 
require gtk210; 
//! int cursor-position 
//! int has-selection 
endrequire; 
//! GTK2.TextTagTable tag_table 
require gtk28; 
//! string text 
endrequire; 
 
signal apply_tag; 
signal begin_user_action; 
signal changed; 
signal delete_range; 
signal end_user_action; 
signal insert_child_anchor; 
signal insert_pixbuf; 
signal insert_text; 
signal mark_deleted; 
signal mark_set; 
signal modified_changed; 
signal remove_tag; 
 
void create(GTK2.TextTagTable|mapping(string:mixed)|void table_or_props) 
//! Creates a new text buffer. 
{ 
  pgtk2_verify_not_inited(); 
  pgtk2_verify_setup(); 
  if (args) { 
    if (TYPEOF(Pike_sp[-args]) == PIKE_T_OBJECT) { 
      struct object *o1; 
      GtkTextBuffer *gt; 
      get_all_args(NULL,args,"%o",&o1); 
      gt=gtk_text_buffer_new(GTK_TEXT_TAG_TABLE(get_gobject(o1))); 
      THIS->obj=G_OBJECT(gt); 
    } else { 
      INIT_WITH_PROPS(GTK_TYPE_TEXT_BUFFER); 
    } 
    pgtk2_pop_n_elems(args); 
  } else { 
    GtkTextBuffer *gt; 
    gt=gtk_text_buffer_new(NULL); 
    THIS->obj=G_OBJECT(gt); 
  } 
  pgtk2__init_this_object(); 
} 
 
int get_line_count(); 
//! Obtains the number of lines in the buffer. 
 
int get_char_count(); 
//! Gets the number of characters in the buffer; note that characters 
//! and bytes are not the same, you can't e.g. expect the contents of 
//! the buffer in string form to be this many bytes long. 
 
+GTK2.TextTagTable get_tag_table(); 
//! Get the W(TextTagTable) associated with this buffer. 
 
void insert(GTK2.TextIter iter, string text, int len) 
//! Insert len bytes of text at position iter.  If len is -1, string 
//! will be inserted in its entirely.  Emits the 'insert-text' signal. 
//! iter is invalidated after insertion, but the default signal handler 
//! revalidates it to point to the end of the inserted text. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1; 
    const gchar *text; 
    INT_TYPE len; 
    get_all_args(NULL,args,"%o%s%i",&o1,&text,&len); 
    gtk_text_buffer_insert(GTK_TEXT_BUFFER(THIS->obj), 
        (GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program),text,len); 
  } 
  RETURN_THIS(); 
} 
 
void insert_at_cursor(string text, int len); 
//! Simply calls insert(), using the current cursor position as the 
//! insertion point. 
 
int insert_interactive(GTK2.TextIter iter, string text, int len, 
                int default_editable) 
//! Like insert(), but the insertion will not occur if iter is at a non- 
//! editable location in the buffer.  Usually you want to prevent insertions 
//! at ineditable locations if the insertion results from a user action 
//! (is interactive). 
//! <p> 
//! default_edtibale indicates the editability of text that doesn't have a 
//! tag affecting editability applied to it.  Typically the result of 
//! get_editable() is appropriate here. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1; 
    const gchar *text; 
    INT_TYPE len,defed; 
    int res; 
    get_all_args(NULL,args,"%o%s%i%i",&o1,&text,&len,&defed); 
    res=gtk_text_buffer_insert_interactive(GTK_TEXT_BUFFER(THIS->obj), 
        (GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program),text,len,defed); 
    pgtk2_pop_n_elems(args); 
    push_int(res); 
  } 
} 
 
int insert_interactive_at_cursor(string text,int len, int default_editable); 
//! Calls insert_interactive() at the cursor position. 
 
void insert_range(GTK2.TextIter iter, GTK2.TextIter start, GTK2.TextIter end) 
//! Copies text, tags, and pixbufs between start and end (the order of 
//! start and end doesn't matter) and inserts the copy at iter.  Used 
//! instead of simply getting/inserting text because it preserves images 
//! and tags.  If start and end are in a different buffer from this buffer, 
//! the two buffers must share the same tag table. 
//! <p> 
//! Implemented via emissions of the insert-text and apply-tag signals, so 
//! expect those. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2,*o3; 
    get_all_args(NULL,args,"%o%o%o",&o1,&o2,&o3); 
    gtk_text_buffer_insert_range(GTK_TEXT_BUFFER(THIS->obj), 
                (GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program), 
                (GtkTextIter *)get_pg2object(o2,pgtk2_text_iter_program), 
                (GtkTextIter *)get_pg2object(o3,pgtk2_text_iter_program)); 
  } 
  RETURN_THIS(); 
} 
 
int insert_range_interactive(GTK2.TextIter iter, GTK2.TextIter start, 
                GTK2.TextIter end, int default_editable) 
//! Same as insert_range(), but does nothing if the insertion point isn't 
//! editable.  The default_editable parameter indicates whether the text is 
//! editable at iter if no tags enclosing iter affect editability. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2,*o3; 
    INT_TYPE defed; 
    int res; 
    get_all_args(NULL,args,"%o%o%o%i",&o1,&o2,&o3,&defed); 
    res=gtk_text_buffer_insert_range_interactive(GTK_TEXT_BUFFER(THIS->obj), 
                (GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program), 
                (GtkTextIter *)get_pg2object(o2,pgtk2_text_iter_program), 
                (GtkTextIter *)get_pg2object(o3,pgtk2_text_iter_program),defed); 
    pgtk2_pop_n_elems(args); 
    push_int(res); 
  } 
} 
 
void insert_with_tags(GTK2.TextIter iter, string text, int len, array tags) 
//! Inserts text into the buffer at iter, applying the list of tags to the 
//! newly-inserted text.  Equivalent to calling insert(), then apply_tag() on 
//! the insert text; insert_with_tags() is just a convenience function. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1; 
    struct array *a; 
    char *text; 
    INT_TYPE len; 
    int start_offset; 
    int i; 
    GtkTextIter *iter,start; 
    GtkTextTag *tag; 
    get_all_args(NULL,args,"%o%s%i%A",&o1,&text,&len,&a); 
    iter=(GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program); 
    start_offset=gtk_text_iter_get_offset(iter); 
    gtk_text_buffer_insert(GTK_TEXT_BUFFER(THIS->obj),iter,text,len); 
    gtk_text_buffer_get_iter_at_offset(GTK_TEXT_BUFFER(THIS->obj),&start,start_offset); 
    if (a==NULL) 
      Pike_error("Invalid array.\n"); 
    for (i=0; i<a->size; i++) { 
      if (TYPEOF(ITEM(a)[i]) == PIKE_T_OBJECT) { 
        GObject *go=get_gobject((ITEM(a)+i)->u.object); 
/*      if (G_OBJECT_TYPE(go)==GTK_TYPE_TEXT_TAG) { */ 
        if (g_type_is_a(GTK_TYPE_TEXT_TAG,G_OBJECT_TYPE(go))) { 
          tag=GTK_TEXT_TAG(go); 
          gtk_text_buffer_apply_tag(GTK_TEXT_BUFFER(THIS->obj), 
                                tag,&start,iter); 
        } 
      } 
    } 
  } 
  RETURN_THIS(); 
} 
 
void insert_with_tags_by_name(GTK2.TextIter iter, string text, int len, 
                              array tag_names) 
//! Same as insert_with_tags(), but allows you to pass in tag names instead of 
//! tag objects. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1; 
    struct array *a; 
    char *text; 
    char *tag_name; 
    INT_TYPE len; 
    int start_offset; 
    int i; 
    GtkTextIter *iter,start; 
    GtkTextTag *tag; 
    GtkTextTagTable *table; 
    get_all_args(NULL,args,"%o%s%i%A",&o1,&text,&len,&a); 
    iter=(GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program); 
    start_offset=gtk_text_iter_get_offset(iter); 
    gtk_text_buffer_insert(GTK_TEXT_BUFFER(THIS->obj),iter,text,len); 
    gtk_text_buffer_get_iter_at_offset(GTK_TEXT_BUFFER(THIS->obj),&start,start_offset); 
    if (a==NULL) 
      Pike_error("Invalid array\n"); 
    table=gtk_text_buffer_get_tag_table(GTK_TEXT_BUFFER(THIS->obj)); 
    for (i=0; i<a->size; i++) { 
      if (TYPEOF(ITEM(a)[i]) == PIKE_T_STRING) { 
        tag_name=(char *)STR0((ITEM(a)+i)->u.string); 
        tag=gtk_text_tag_table_lookup(table,tag_name); 
        if (tag==NULL) { 
          Pike_error("tag %s doesn't exist!\n",tag_name); 
        } 
        gtk_text_buffer_apply_tag(GTK_TEXT_BUFFER(THIS->obj), 
                                tag,&start,iter); 
      } 
    } 
  } 
  RETURN_THIS(); 
} 
 
void delete(GTK2.TextIter start, GTK2.TextIter end) 
//! Deletes text between start and end.  The order of start and end is not 
//! actually relevant; delete() will reorder them.  This function actually 
//! emits the "delete-range" signal, and the default handler of that signal 
//! deletes the text.  Because the buffer is modified, all outstanding 
//! iterators become invalid after calling this function; however, start 
//! and end will be re-initialized to point to the location where text was 
//! deleted. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2; 
    get_all_args(NULL,args,"%o%o",&o1,&o2); 
    gtk_text_buffer_delete(GTK_TEXT_BUFFER(THIS->obj), 
                (GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program), 
                (GtkTextIter *)get_pg2object(o2,pgtk2_text_iter_program)); 
  } 
  RETURN_THIS(); 
} 
 
int delete_interactive(GTK2.TextIter start, GTK2.TextIter end, 
                int default_editable) 
//! Deletes all editable text in the given range.  Calls delete() for each 
//! editable sub-range of [start,end).  start and end are revalidated to 
//! point to the location of the last deleted range, or left untouched if no 
//! text was deleted. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2; 
    INT_TYPE defed; 
    int res; 
    get_all_args(NULL,args,"%o%o%i",&o1,&o2,&defed); 
    res=gtk_text_buffer_delete_interactive(GTK_TEXT_BUFFER(THIS->obj), 
                (GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program), 
                (GtkTextIter *)get_pg2object(o2,pgtk2_text_iter_program),defed); 
    pgtk2_pop_n_elems(args); 
    push_int(res); 
  } 
} 
 
require gtk26; 
int backspace(GTK2.TextIter iter, int interactive, int default_editable) 
//! Performs the appropriate action as if the user hit the delete key with 
//! the cursor at the position specified by iter.  In the normal case a 
//! single character will be deleted, but when combining accents are 
//! involved, more than one character can be deleted, and when precomposed 
//! character and accent combinations are involved, less than one character 
//! will be deleted. 
//! <p> 
//! Because the buffer is modified, all outstanding iterators become invalid 
//! after calling this function;  however, iter will be re-initialized to 
//! point to the location where text was deleted. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1; 
    INT_TYPE inter,defed; 
    int res; 
    get_all_args(NULL,args,"%o%i%i",&o1,&inter,&defed); 
    res=gtk_text_buffer_backspace(GTK_TEXT_BUFFER(THIS->obj), 
        (GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program),inter,defed); 
    pgtk2_pop_n_elems(args); 
    push_int(res); 
  } 
} 
endrequire; 
 
void set_text(sprintf_format text, sprintf_args ... fmt) 
//! Deletes current contents of this buffer, and inserts text instead. 
//! If multiple arguments are supplied, sprintf() is called implicitly. 
{ 
  pgtk2_get_string_arg_with_sprintf(args); 
  pgtk2_verify_inited(); 
  gtk_text_buffer_set_text( GTK_TEXT_BUFFER(THIS->obj),Pike_sp[-1].u.string->str,Pike_sp[-1].u.string->len); 
  pgtk2_return_this(1); 
} 
 
string get_text(GTK2.TextIter start, GTK2.TextIter end, 
        int include_hidden_chars) 
//! Returns the text int the range [start,end).  Excludes undisplayed text 
//! (text marked with tags that set the invisibility attribute) if 
//! include_hidden_chars is false.  Does not include characters representing 
//! embedded images, so byte and character indexes into the returned 
//! string do not correspond to byte and character indexes into the buffer. 
//! Contrast with get_slice(). 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2; 
    INT_TYPE inc; 
    gchar *s; 
    get_all_args(NULL,args,"%o%o%i",&o1,&o2,&inc); 
    s=gtk_text_buffer_get_text(GTK_TEXT_BUFFER(THIS->obj), 
                (GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program), 
                (GtkTextIter *)get_pg2object(o2,pgtk2_text_iter_program),inc); 
    pgtk2_pop_n_elems(args); 
    PGTK_PUSH_GCHAR(s); 
    g_free(s); 
  } 
} 
 
string get_slice(GTK2.TextIter start, GTK2.TextIter end, 
                int include_hidden_chars) 
//! Returns the text in the range [start,end).  Excludes undisplayed text 
//! (text marked with tags that set the invisibility attribute) if 
//! include_hidden_chars is false.  The returned string includes a 0xFFFC 
//! character whenever the buffer contains embedded images, so byte and 
//! character indexes into the returned string do correspond to byte and 
//! character indexes into the buffer.  Contrast with get_text().  Note that 
//! 0xFFFC can occur in normal text as well, so it is not a reliable 
//! indicator that a pixbuf or widget is in the buffer. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2; 
    INT_TYPE inc; 
    gchar *s; 
    get_all_args(NULL,args,"%o%o%i",&o1,&o2,&inc); 
    s=gtk_text_buffer_get_slice(GTK_TEXT_BUFFER(THIS->obj), 
                (GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program), 
                (GtkTextIter *)get_pg2object(o2,pgtk2_text_iter_program),inc); 
    pgtk2_pop_n_elems(args); 
    PGTK_PUSH_GCHAR(s); 
    g_free(s); 
  } 
} 
 
void insert_pixbuf(GTK2.TextIter iter, GDK2.Pixbuf pixbuf) 
//! Inserts an image into the text buffer at iter.  The image will be 
//! counted as one character in character counts, and when obtaining the 
//! contents as a string, will be represented by the Unicode 
//! "object replacement character" 0xFFFC.  Note that the "slice" variants 
//! for obtaining portions of the buffer as a string include this character 
//! for pixbufs, but the "text" variants do not.  e.g. see get_slice() 
//! and get_text(). 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2; 
    get_all_args(NULL,args,"%o%o",&o1,&o2); 
    gtk_text_buffer_insert_pixbuf(GTK_TEXT_BUFFER(THIS->obj), 
                (GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program), 
                GDK_PIXBUF(get_gobject(o2))); 
  } 
  RETURN_THIS(); 
} 
 
void insert_child_anchor(GTK2.TextIter iter, GTK2.TextChildAnchor anchor) 
//! Inserts a child widget anchor into the buffer at iter.  The anchor will 
//! be counted as one character in character counts, and when obtaining 
//! the buffer contents as a string, will be represented by the Unicode 
//! "object replacement character" oxFFFC.  Note that the "slice" variants 
//! for obtaining portions of the buffer as a string include this character 
//! for child anchors, but the "text" variants do not.  e.g. see get_slice() 
//! and get_text().  Consider create_child_anchor() as a more convenient 
//! alternative to this function.  The buffer will add a reference to the 
//! anchor, so you can unref it after insertion. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2; 
    get_all_args(NULL,args,"%o%o",&o1,&o2); 
    gtk_text_buffer_insert_child_anchor(GTK_TEXT_BUFFER(THIS->obj), 
                (GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program), 
                GTK_TEXT_CHILD_ANCHOR(get_gobject(o2))); 
  } 
  RETURN_THIS(); 
} 
 
+GTK2.TextChildAnchor create_child_anchor(GTK2.TextIter iter) 
//! This is a convenience function which simply creates a child anchor with 
//! GTK2.TextChildAnchor->create() and inserts it into the buffer with 
//! insert_child_anchor().  The new anchor is owned by the buffer; no 
//! reference count is returned. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1; 
    GtkTextChildAnchor *gtca; 
    get_all_args(NULL,args,"%o",&o1); 
    gtca=gtk_text_buffer_create_child_anchor(GTK_TEXT_BUFFER(THIS->obj), 
                (GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program)); 
    pgtk2_pop_n_elems(args); 
    push_gobject(gtca); 
  } 
} 
 
+GTK2.TextMark create_mark(GTK2.TextIter where, 
                int left_gravity, ?string mark_name) 
//! Creates a mark at position where.  If mark_name is omitted, the mark is 
//! anonymous; otherwise, the mark can be retrieve by name using get_mark(). 
//!  If a mark has left gravity, and text is inserted at the mark's current 
//! location, the mark will be moved to the left of the newly-inserted text. 
//! If the mark has right gravity, the mark will end up on the right of the 
//! newly-inserted text.  The standard left-to-right cursor is a mark with 
//! right gravity (when you type, the cursor stays on the right side of the 
//! text you're typing). 
//! Emits the "mark-set" signal as notification of the mark's initial 
//! placement. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1; 
    INT_TYPE left; 
    const gchar *mark_name=NULL; 
    GtkTextMark *gtm; 
    get_all_args(NULL,args,"%o%i.%s",&o1,&left,&mark_name); 
    gtm=gtk_text_buffer_create_mark(GTK_TEXT_BUFFER(THIS->obj), 
        mark_name,(GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program),left); 
    pgtk2_pop_n_elems(args); 
    push_gobject(gtm); 
  } 
} 
 
void move_mark(GTK2.TextMark mark, GTK2.TextIter where) 
//! Moves mark to the new location where.  Emits the "mark-set" signal as 
//! notification of the move. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2; 
    get_all_args(NULL,args,"%o%o",&o1,&o2); 
    gtk_text_buffer_move_mark(GTK_TEXT_BUFFER(THIS->obj), 
                GTK_TEXT_MARK(get_gobject(o1)), 
                (GtkTextIter *)get_pg2object(o2,pgtk2_text_iter_program)); 
  } 
  RETURN_THIS(); 
} 
 
void move_mark_by_name(string name, GTK2.TextIter where) 
//! Moves the mark named name (which must exist) to location where. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1; 
    const gchar *name; 
    get_all_args(NULL,args,"%s%o",&name,&o1); 
    gtk_text_buffer_move_mark_by_name(GTK_TEXT_BUFFER(THIS->obj), 
                name,(GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program)); 
  } 
  RETURN_THIS(); 
} 
 
void delete_mark(GTK2.TextMark mark); 
//! Deletes mark, so that it's no longer located anywhere in the buffer. 
//! Removes the reference the buffer holds to the mark.  There is no way 
//! to undelete a mark. 
//! The "mark-deleted" signal will be emitted as notification after the mark 
//! is deleted. 
 
void delete_mark_by_name(string name); 
//! Deletes the mark named name; the mark must exist. 
 
+GTK2.TextMark get_mark(string name); 
//! Returns the mark named name. 
 
+GTK2.TextMark get_insert(); 
//! Returns the mark that represents the cursor (insertion point). 
//! Equivalent to calling get_mark() to get the mark named "insert", but very 
//! slightly more efficient, and involves less typing. 
 
+GTK2.TextMark get_selection_bound(); 
//! Returns the mark that represents the selection bound.  Equivalent to 
//! calling get_mark() to get the mark named "selection_bound", but very 
//! slightly more efficient, and involves less typing. 
//! <p> 
//! The currently-selected text in the buffer is the region between the 
//! "selection_bound" and "insert" marks.  If "selection_bound" and "insert" 
//! are in the same place, then there is no current selection. 
//! get_selection_bounds() is another convenient function for handling the 
//! selection, if you just want to know whether there's a selection and 
//! what its bounds are. 
 
require gtk210; 
int get_has_selection(); 
//! Indicates whether some text is currently selected. 
endrequire; 
 
void place_cursor(GTK2.TextIter where) 
//! This function moves the "insert" and "selection_bound" marks 
//! simultaneously.  If you move them to the same place in two steps with 
//! move_mark(), you will temporarily select a region in between their old 
//! and new locations, which can be pretty inefficient since the  
//! temporarily-selected region will force stuff to be recalculated.  This 
//! function moves them as a unit, which can be optimized. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1; 
    get_all_args(NULL,args,"%o",&o1); 
    gtk_text_buffer_place_cursor(GTK_TEXT_BUFFER(THIS->obj), 
                (GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program)); 
  } 
  RETURN_THIS(); 
} 
 
require gtk24; 
void select_range(GTK2.TextIter ins, GTK2.TextIter bound) 
//! This function removes the "insert" and "selection_bound" marks 
//! simultaneously.  If you move them in two steps with move_mark(), you will 
//! temporarily select a region in between their old and new locations, which 
//! can be pretty inefficient since the temporarily-selected region will 
//! force stuff to be recalculated.  This function moves them as a unit, 
//! which can be optimized. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2; 
    get_all_args(NULL,args,"%o%o",&o1,&o2); 
    gtk_text_buffer_select_range(GTK_TEXT_BUFFER(THIS->obj), 
                (GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program), 
                (GtkTextIter *)get_pg2object(o2,pgtk2_text_iter_program)); 
  } 
  RETURN_THIS(); 
} 
endrequire; 
 
void apply_tag(GTK2.TextTag tag, GTK2.TextIter start, GTK2.TextIter end) 
//! Emits the "apply-tag" signal.  The default handler for the signal 
//! applies tag to the given range, start and end do not have to be in order. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2,*o3; 
    get_all_args(NULL,args,"%o%o%o",&o1,&o2,&o3); 
    gtk_text_buffer_apply_tag(GTK_TEXT_BUFFER(THIS->obj), 
                GTK_TEXT_TAG(get_gobject(o1)), 
                (GtkTextIter *)get_pg2object(o2,pgtk2_text_iter_program), 
                (GtkTextIter *)get_pg2object(o3,pgtk2_text_iter_program)); 
  } 
  RETURN_THIS(); 
} 
 
void remove_tag(GTK2.TextTag tag, GTK2.TextIter start, GTK2.TextIter end) 
//! Emits the "remove-tag" signal.  The default handler for the signal removes 
//! all occurrences of tag from the given range.  start and end do not have to 
//! be in order. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2,*o3; 
    get_all_args(NULL,args,"%o%o%o",&o1,&o2,&o3); 
    gtk_text_buffer_remove_tag(GTK_TEXT_BUFFER(THIS->obj), 
                GTK_TEXT_TAG(get_gobject(o1)), 
                (GtkTextIter *)get_pg2object(o2,pgtk2_text_iter_program), 
                (GtkTextIter *)get_pg2object(o3,pgtk2_text_iter_program)); 
  } 
  RETURN_THIS(); 
} 
 
void apply_tag_by_name(string name, GTK2.TextIter start, GTK2.TextIter end) 
//! Calls GTK2.TextTagTable->lookup() on the buffers tag table to get a 
//! GTK2.TextTag, then calls apply_tag(). 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2; 
    const gchar *name; 
    get_all_args(NULL,args,"%s%o%o",&name,&o1,&o2); 
    gtk_text_buffer_apply_tag_by_name(GTK_TEXT_BUFFER(THIS->obj), 
                name,(GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program), 
                (GtkTextIter *)get_pg2object(o2,pgtk2_text_iter_program)); 
  } 
  RETURN_THIS(); 
} 
 
void remove_tag_by_name(string name, GTK2.TextIter start, GTK2.TextIter end) 
//! Removes a tag.  See apply_tag_by_name(). 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2; 
    const gchar *name; 
    get_all_args(NULL,args,"%s%o%o",&name,&o1,&o2); 
    gtk_text_buffer_remove_tag_by_name(GTK_TEXT_BUFFER(THIS->obj), 
                name,(GtkTextIter  *)get_pg2object(o1,pgtk2_text_iter_program), 
                (GtkTextIter *)get_pg2object(o2,pgtk2_text_iter_program)); 
  } 
  RETURN_THIS(); 
} 
 
void remove_all_tags(GTK2.TextIter start, GTK2.TextIter end) 
//! Removes all tags in the range between start and end.  Be careful with 
//! this function; it could remove tags added in code unrelated to the code 
//! you're currently writing.  That is, using this function is probably a 
//! bad idea if you have two or more unrelated code sections that add tags. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2; 
    get_all_args(NULL,args,"%o%o",&o1,&o2); 
    gtk_text_buffer_remove_all_tags(GTK_TEXT_BUFFER(THIS->obj), 
                (GtkTextIter *)get_pg2object(o1,pgtk2_text_iter_program), 
                (GtkTextIter *)get_pg2object(o2,pgtk2_text_iter_program)); 
  } 
  RETURN_THIS(); 
} 
 
+GTK2.TextTag create_tag(string tag_name, mapping props) 
//! Creates a tag and adds it to the tag table.  Equivalent to calling 
//! GTK2.TextTag->create() and then adding the tag to the tag table.  The 
//! returned tag is owned by the tag table. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct mapping *m; 
    char *name; 
    GtkTextTag *tag; 
    struct keypair *k; 
    int e; 
    get_all_args(NULL,args,"%s%m",&name,&m); 
    tag=gtk_text_tag_new(name); 
    gtk_text_tag_table_add(gtk_text_buffer_get_tag_table(GTK_TEXT_BUFFER(THIS->obj)),tag); 
    NEW_MAPPING_LOOP(m->data) { 
      if (TYPEOF(k->ind) == PIKE_T_STRING) { 
        char *s=PGTK_GETSTR(&k->ind); 
        pgtk2_set_property(G_OBJECT(tag),s,&k->val); 
        PGTK_FREESTR(s); 
      } 
    } 
    pgtk2_pop_n_elems(args); 
    push_gobject(tag); 
  } 
} 
 
+GTK2.TextIter get_iter_at_line_offset(int line_number, int char_offset) 
//! Obtains an iterator pointing to char_offset within the given line.  The 
//! char_offset must exist, offsets off the end of the line are not allowed. 
//! Note characters, not bytes;  UTF-8 may encode one character as multiple 
//! bytes. 
{ 
  pgtk2_verify_inited(); 
  { 
    INT_TYPE line,ch; 
    GtkTextIter *gti; 
    get_all_args(NULL,args,"%i%i",&line,&ch); 
    pgtk2_pop_n_elems(args); 
    gti=g_malloc(sizeof(GtkTextIter)); 
    if (gti==NULL) 
      SIMPLE_OUT_OF_MEMORY_ERROR("get_iter_at_line_offset",sizeof(GtkTextIter)); 
    gtk_text_buffer_get_iter_at_line_offset(GTK_TEXT_BUFFER(THIS->obj), 
                gti,line,ch); 
    push_pgdk2object(gti,pgtk2_text_iter_program,1); 
  } 
} 
 
+GTK2.TextIter get_iter_at_offset(int offset) 
//! Returns an iterator at position offset chars from the start of the 
//! entire buffer.  If offset is -1 or greater than the number of characters 
//! in the buffer, returns the end iterator, the iterator one past the last 
//! valid character in the buffer. 
{ 
  pgtk2_verify_inited(); 
  { 
    INT_TYPE ch; 
    GtkTextIter *gti; 
    get_all_args(NULL,args,"%i",&ch); 
    pgtk2_pop_n_elems(args); 
    gti=g_malloc(sizeof(GtkTextIter)); 
    if (gti==NULL) 
      SIMPLE_OUT_OF_MEMORY_ERROR("get_iter_at_offset",sizeof(GtkTextIter)); 
    gtk_text_buffer_get_iter_at_offset(GTK_TEXT_BUFFER(THIS->obj), 
                gti,ch); 
    push_pgdk2object(gti,pgtk2_text_iter_program,1); 
//    push_gobjectclass(gti,pgtk2_text_iter_program); 
  } 
} 
 
+GTK2.TextIter get_iter_at_line(int line) 
//! Returns a W(TextIter) to the start of the given line. 
{ 
  pgtk2_verify_inited(); 
  { 
    INT_TYPE line; 
    GtkTextIter *gti; 
    get_all_args(NULL,args,"%i",&line); 
    pgtk2_pop_n_elems(args); 
    gti=g_malloc(sizeof(GtkTextIter)); 
    if (gti==NULL) 
      SIMPLE_OUT_OF_MEMORY_ERROR("get_iter_at_line",sizeof(GtkTextIter)); 
    gtk_text_buffer_get_iter_at_line(GTK_TEXT_BUFFER(THIS->obj), 
                gti,line); 
    push_pgdk2object(gti,pgtk2_text_iter_program,1); 
//    push_gobjectclass(gti,pgtk2_text_iter_program); 
  } 
} 
 
+GTK2.TextIter get_iter_at_line_index(int line, int byte_index) 
//! Obtains an iterator point to byte_index with the given line.  byte_index 
//! must be the start of a UTF-8 character, and must not be beyond the end 
//! of the line.  Note bytes, not characters; UTF-8 may encode one character 
//! as multiple bytes. 
{ 
  pgtk2_verify_inited(); 
  { 
    INT_TYPE line,index; 
    GtkTextIter *gti; 
    get_all_args(NULL,args,"%i%i",&line,&index); 
    pgtk2_pop_n_elems(args); 
    gti=g_malloc(sizeof(GtkTextIter)); 
    if (gti==NULL) 
      SIMPLE_OUT_OF_MEMORY_ERROR("get_iter_at_line_index",sizeof(GtkTextIter)); 
    gtk_text_buffer_get_iter_at_line_index(GTK_TEXT_BUFFER(THIS->obj), 
                gti,line,index); 
    push_pgdk2object(gti,pgtk2_text_iter_program,1); 
//    push_gobjectclass(gti,pgtk2_text_iter_program); 
  } 
} 
 
+GTK2.TextIter get_iter_at_mark(GTK2.TextMark mark) 
//! Returns an iterator with the current position of mark. 
{ 
  pgtk2_verify_inited(); 
  { 
    GtkTextIter *gti; 
    struct object *o1; 
    get_all_args(NULL,args,"%o",&o1); 
    gti=g_malloc(sizeof(GtkTextIter)); 
    if (gti==NULL) 
      SIMPLE_OUT_OF_MEMORY_ERROR("get_iter_at_mark",sizeof(GtkTextIter)); 
    gtk_text_buffer_get_iter_at_mark(GTK_TEXT_BUFFER(THIS->obj), 
                gti,GTK_TEXT_MARK(get_gobject(o1))); 
    pgtk2_pop_n_elems(args); 
    push_pgdk2object(gti,pgtk2_text_iter_program,1); 
//    push_gobjectclass(gti,pgtk2_text_iter_program); 
  } 
} 
 
+GTK2.TextIter get_iter_at_child_anchor(GTK2.TextChildAnchor anchor) 
//! Returns the location of anchor. 
{ 
  pgtk2_verify_inited(); 
  { 
    GtkTextIter *gti; 
    struct object *o1; 
    get_all_args(NULL,args,"%o",&o1); 
    gti=g_malloc(sizeof(GtkTextIter)); 
    if (gti==NULL) 
      SIMPLE_OUT_OF_MEMORY_ERROR("get_iter_at_child_anchor",sizeof(GtkTextIter)); 
    gtk_text_buffer_get_iter_at_child_anchor(GTK_TEXT_BUFFER(THIS->obj), 
                gti,GTK_TEXT_CHILD_ANCHOR(get_gobject(o1))); 
    pgtk2_pop_n_elems(args); 
    push_pgdk2object(gti,pgtk2_text_iter_program,1); 
//    push_gobjectclass(gti,pgtk2_text_iter_program); 
  } 
} 
 
+GTK2.TextIter get_start_iter() 
//! Returns an iterator with the first position in the text buffer.  This is 
//! the same as using get_iter_at_offset() to get the iter at character 
//! offset 0. 
{ 
  pgtk2_verify_inited(); 
  { 
    GtkTextIter *gti; 
    pgtk2_pop_n_elems(args); 
    gti=g_malloc(sizeof(GtkTextIter)); 
    if (gti==NULL) 
      SIMPLE_OUT_OF_MEMORY_ERROR("get_start_iter",sizeof(GtkTextIter)); 
    gtk_text_buffer_get_start_iter(GTK_TEXT_BUFFER(THIS->obj),gti); 
    push_pgdk2object(gti,pgtk2_text_iter_program,1); 
//    push_gobjectclass(gti,pgtk2_text_iter_program); 
  } 
} 
 
+GTK2.TextIter get_end_iter() 
//! Returns the "end iterator", one past the last valid character in the 
//! buffer.  If dereferenced with W(TextIter)->get_char(), the end iterator 
//! has a character value of 0.  The entire buffer lies in the range from 
//! the first position in the buffer to the end iterator. 
{ 
  pgtk2_verify_inited(); 
  { 
    GtkTextIter *gti; 
    pgtk2_pop_n_elems(args); 
    gti=g_malloc(sizeof(GtkTextIter)); 
    if (gti==NULL) 
      SIMPLE_OUT_OF_MEMORY_ERROR("get_end_iter",sizeof(GtkTextIter)); 
    gtk_text_buffer_get_end_iter(GTK_TEXT_BUFFER(THIS->obj),gti); 
    push_pgdk2object(gti,pgtk2_text_iter_program,1); 
//    push_gobjectclass(gti,pgtk2_text_iter_program); 
  } 
} 
 
array(GTK2.TextIter) get_bounds() 
//! Retrieves the first and last iterators in the buffer, i.e. the entire 
//! buffer lies within the range [start,end). 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  { 
    GtkTextIter *gti,*gt2; 
    gti=g_malloc(sizeof(GtkTextIter)); 
    if (gti==NULL) 
      SIMPLE_OUT_OF_MEMORY_ERROR("get_bounds",sizeof(GtkTextIter)); 
    gt2=g_malloc(sizeof(GtkTextIter)); 
    if (gt2==NULL) 
      SIMPLE_OUT_OF_MEMORY_ERROR("get_bounds",sizeof(GtkTextIter)); 
    gtk_text_buffer_get_bounds(GTK_TEXT_BUFFER(THIS->obj),gti,gt2); 
    push_pgdk2object(gti,pgtk2_text_iter_program,1); 
    push_pgdk2object(gt2,pgtk2_text_iter_program,1); 
    f_aggregate(2); 
  } 
} 
 
int get_modified(); 
//! Indicates whether the buffer has been modified since the last call to 
//! set_modified() set the modification flag to false.  Used for example to 
//! enable a "save" function in a text editor. 
 
void set_modified(int setting); 
//! Used to keep track of whether the buffer has been modified since the last 
//! time it was saved.  Whenever the buffer is saved to disk, call 
//! set_modified(0).  When the buffer is modified, it will automatically 
//! toggle on the modified bit again.  When the modifed bit flips, the 
//! buffer emits a "modified-changed" signal. 
 
int delete_selection(int interactive, int default_editable); 
//! Deletes the range between the "insert" and "selection_bound" marks, that 
//! is, the currently-selected text.  If interactive is true, the editability 
//! of the selection will be considered (users can't delete uneditable text). 
 
require gtk22; 
void paste_clipboard(GTK2.Clipboard clipboard, ?int default_editable, 
                ?GTK2.TextIter location) 
//! Pastes the contents of a clipboard at the insertion point, or at 
//! override_location. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1,*o2=NULL; 
    INT_TYPE defed=0; 
    get_all_args(NULL,args,"%o.%i%o",&o1,&defed,&o2); 
    gtk_text_buffer_paste_clipboard(GTK_TEXT_BUFFER(THIS->obj), 
                GTK_CLIPBOARD(get_gobject(o1)), 
                (GtkTextIter *)get_pg2object(o2,pgtk2_text_iter_program), 
                defed); 
  } 
  RETURN_THIS(); 
} 
endrequire; 
 
 
require gtk22; 
void copy_clipboard(GTK2.Clipboard clipboard); 
//! Copies the currently-selected text to a clipboard. 
 
void cut_clipboard(GTK2.Clipboard clipboard, int default_editable); 
//! Copies the currently-selected text to a clipboard, then deletes said 
//! text if it's editable. 
endrequire; 
 
array get_selection_bounds() 
//! Returns either an array with start and end W(TextIter) 
//! if some text is selected, or 0 if there's no active selection. 
{ 
  pgtk2_verify_inited(); 
  { 
    GtkTextIter start; 
    GtkTextIter end; 
    gboolean ok = 
      gtk_text_buffer_get_selection_bounds(GTK_TEXT_BUFFER(THIS->obj), 
                                           &start, &end); 
    pgtk2_pop_n_elems(args); 
    if (ok) { 
      push_gobjectclass(gtk_text_iter_copy(&start), pgtk2_text_iter_program); 
      push_gobjectclass(gtk_text_iter_copy(&end), pgtk2_text_iter_program); 
      f_aggregate(2); 
    } else { 
      push_int(0); 
    } 
  } 
} 
 
void begin_user_action(); 
//! Called to indicate that the buffer operations between here and call 
//! end_user_action() are part of a single user-visible operation.  The 
//! operations between begin_user_action() and end_user_action() can then be 
//! grouped when creating an undo stack.  W(TextBuffer) maintains a count of 
//! calls to begin_user_action() that have not been closed with a call to 
//! end_user_action(), and emits the "begin-user-action" and 
//! "end-user-action" signals only for the outermost pair of calls.  This 
//! allows you to build user actions from other user actions. 
//! <p> 
//! The "interactive" buffer mutation functions, such as insert_interactive(), 
//! automatically call begin/end user action around the buffer operations 
//! they perform, so there's no need to add extra calls if your user action 
//! consists solely of a single call to one of those functions. 
 
void end_user_action(); 
//! Should be paired with begin_user_action(); 
 
require gtk22; 
void add_selection_clipboard(GTK2.Clipboard clipboard); 
//! Adds clipboard to the list of clipboards in which the selection contents 
//! of the buffer are available.  In most cases, clipboard will be the 
//! GTK2.Clipboard of GDK2.SELECTION_PRIMARY for a view of this buffer. 
 
void remove_selection_clipboard(GTK2.Clipboard clipboard); 
//! Removes a clipboard that was added with add_selection_clipboard(). 
endrequire;