File: GtkSourceBuffer.html

package info (click to toggle)
gtksourceview2 2.2.2-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 8,856 kB
  • ctags: 1,896
  • sloc: ansic: 18,630; sh: 9,199; xml: 4,509; python: 424; makefile: 272
file content (1156 lines) | stat: -rw-r--r-- 59,522 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
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
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkSourceBuffer</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="GtkSourceView 2 Reference Manual">
<link rel="up" href="rn01.html" title="API reference">
<link rel="prev" href="rn01.html" title="API reference">
<link rel="next" href="gtksourceview-20-Searching-in-a-GtkSourceBuffer.html" title="Searching in a GtkSourceBuffer">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="reference" href="rn01.html" title="API reference">
<link rel="reference" href="rn02.html" title="Syntax highlighting reference">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="rn01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="rn01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GtkSourceView 2 Reference Manual</th>
<td><a accesskey="n" href="gtksourceview-20-Searching-in-a-GtkSourceBuffer.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GtkSourceBuffer.synopsis" class="shortcut">Top</a>
                 | 
                <a href="#GtkSourceBuffer.description" class="shortcut">Description</a>
                 | 
                <a href="#GtkSourceBuffer.object-hierarchy" class="shortcut">Object Hierarchy</a>
                 | 
                <a href="#GtkSourceBuffer.properties" class="shortcut">Properties</a>
                 | 
                <a href="#GtkSourceBuffer.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry" lang="en">
<a name="GtkSourceBuffer"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkSourceBuffer.top_of_page"></a>GtkSourceBuffer</span></h2>
<p>GtkSourceBuffer — Text buffer object for <a class="link" href="GtkSourceView.html" title="GtkSourceView"><span class="type">GtkSourceView</span></a></p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GtkSourceBuffer.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;gtksourceview/gtksourcebuffer.h&gt;

                    <a class="link" href="GtkSourceBuffer.html#GtkSourceBuffer-struct" title="GtkSourceBuffer">GtkSourceBuffer</a>;
                    <a class="link" href="GtkSourceBuffer.html#GtkSourceBufferClass" title="GtkSourceBufferClass">GtkSourceBufferClass</a>;
<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a>*    <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-new" title="gtk_source_buffer_new ()">gtk_source_buffer_new</a>               (GtkTextTagTable *table);
<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a>*    <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-new-with-language" title="gtk_source_buffer_new_with_language ()">gtk_source_buffer_new_with_language</a> (<a class="link" href="GtkSourceLanguage.html" title="GtkSourceLanguage">GtkSourceLanguage</a> *language);
void                <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-set-highlight-syntax" title="gtk_source_buffer_set_highlight_syntax ()">gtk_source_buffer_set_highlight_syntax</a>
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         gboolean highlight);
gboolean            <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-get-highlight-syntax" title="gtk_source_buffer_get_highlight_syntax ()">gtk_source_buffer_get_highlight_syntax</a>
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);
void                <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-set-language" title="gtk_source_buffer_set_language ()">gtk_source_buffer_set_language</a>      (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         <a class="link" href="GtkSourceLanguage.html" title="GtkSourceLanguage">GtkSourceLanguage</a> *language);
<a class="link" href="GtkSourceLanguage.html" title="GtkSourceLanguage">GtkSourceLanguage</a>*  <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-get-language" title="gtk_source_buffer_get_language ()">gtk_source_buffer_get_language</a>      (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);
void                <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-set-highlight-matching-brackets" title="gtk_source_buffer_set_highlight_matching_brackets ()">gtk_source_buffer_set_highlight_matching_brackets</a>
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         gboolean highlight);
gboolean            <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-get-highlight-matching-brackets" title="gtk_source_buffer_get_highlight_matching_brackets ()">gtk_source_buffer_get_highlight_matching_brackets</a>
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);
void                <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-set-style-scheme" title="gtk_source_buffer_set_style_scheme ()">gtk_source_buffer_set_style_scheme</a>  (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         <a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme">GtkSourceStyleScheme</a> *scheme);
<a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme">GtkSourceStyleScheme</a>* <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-get-style-scheme" title="gtk_source_buffer_get_style_scheme ()">gtk_source_buffer_get_style_scheme</a>
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);
gint                <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-get-max-undo-levels" title="gtk_source_buffer_get_max_undo_levels ()">gtk_source_buffer_get_max_undo_levels</a>
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);
void                <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-set-max-undo-levels" title="gtk_source_buffer_set_max_undo_levels ()">gtk_source_buffer_set_max_undo_levels</a>
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         gint max_undo_levels);
void                <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-redo" title="gtk_source_buffer_redo ()">gtk_source_buffer_redo</a>              (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);
void                <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-undo" title="gtk_source_buffer_undo ()">gtk_source_buffer_undo</a>              (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);
gboolean            <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-can-redo" title="gtk_source_buffer_can_redo ()">gtk_source_buffer_can_redo</a>          (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);
gboolean            <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-can-undo" title="gtk_source_buffer_can_undo ()">gtk_source_buffer_can_undo</a>          (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);
void                <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-begin-not-undoable-action" title="gtk_source_buffer_begin_not_undoable_action ()">gtk_source_buffer_begin_not_undoable_action</a>
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);
void                <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-end-not-undoable-action" title="gtk_source_buffer_end_not_undoable_action ()">gtk_source_buffer_end_not_undoable_action</a>
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);
<a class="link" href="GtkSourceMark.html" title="GtkSourceMark">GtkSourceMark</a>*      <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-create-source-mark" title="gtk_source_buffer_create_source_mark ()">gtk_source_buffer_create_source_mark</a>
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         const gchar *name,
                                                         const gchar *category,
                                                         const GtkTextIter *where);
GSList*             <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-get-source-marks-at-line" title="gtk_source_buffer_get_source_marks_at_line ()">gtk_source_buffer_get_source_marks_at_line</a>
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         gint line,
                                                         const gchar *category);
GSList*             <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-get-source-marks-at-iter" title="gtk_source_buffer_get_source_marks_at_iter ()">gtk_source_buffer_get_source_marks_at_iter</a>
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         GtkTextIter *iter,
                                                         const gchar *category);
void                <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-remove-source-marks" title="gtk_source_buffer_remove_source_marks ()">gtk_source_buffer_remove_source_marks</a>
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         const GtkTextIter *start,
                                                         const GtkTextIter *end,
                                                         const gchar *category);
gboolean            <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-forward-iter-to-source-mark" title="gtk_source_buffer_forward_iter_to_source_mark ()">gtk_source_buffer_forward_iter_to_source_mark</a>
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         GtkTextIter *iter,
                                                         const gchar *category);
gboolean            <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-backward-iter-to-source-mark" title="gtk_source_buffer_backward_iter_to_source_mark ()">gtk_source_buffer_backward_iter_to_source_mark</a>
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         GtkTextIter *iter,
                                                         const gchar *category);
void                <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-ensure-highlight" title="gtk_source_buffer_ensure_highlight ()">gtk_source_buffer_ensure_highlight</a>  (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         const GtkTextIter *start,
                                                         const GtkTextIter *end);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="GtkSourceBuffer.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  GObject
   +----GtkTextBuffer
         +----GtkSourceBuffer
</pre>
</div>
<div class="refsect1" lang="en">
<a name="GtkSourceBuffer.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GtkSourceBuffer.html#GtkSourceBuffer--can-redo" title='The "can-redo" property'>can-redo</a>"                 gboolean              : Read
  "<a class="link" href="GtkSourceBuffer.html#GtkSourceBuffer--can-undo" title='The "can-undo" property'>can-undo</a>"                 gboolean              : Read
  "<a class="link" href="GtkSourceBuffer.html#GtkSourceBuffer--highlight-matching-brackets" title='The "highlight-matching-brackets" property'>highlight-matching-brackets</a>" gboolean              : Read / Write
  "<a class="link" href="GtkSourceBuffer.html#GtkSourceBuffer--highlight-syntax" title='The "highlight-syntax" property'>highlight-syntax</a>"         gboolean              : Read / Write
  "<a class="link" href="GtkSourceBuffer.html#GtkSourceBuffer--language" title='The "language" property'>language</a>"                 <a class="link" href="GtkSourceLanguage.html" title="GtkSourceLanguage">GtkSourceLanguage</a>*    : Read / Write
  "<a class="link" href="GtkSourceBuffer.html#GtkSourceBuffer--max-undo-levels" title='The "max-undo-levels" property'>max-undo-levels</a>"          gint                  : Read / Write
  "<a class="link" href="GtkSourceBuffer.html#GtkSourceBuffer--style-scheme" title='The "style-scheme" property'>style-scheme</a>"             <a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme">GtkSourceStyleScheme</a>*  : Read / Write
</pre>
</div>
<div class="refsect1" lang="en">
<a name="GtkSourceBuffer.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="GtkSourceBuffer.html#GtkSourceBuffer-highlight-updated" title='The "highlight-updated" signal'>highlight-updated</a>"                              : Run Last
  "<a class="link" href="GtkSourceBuffer.html#GtkSourceBuffer-source-mark-updated" title='The "source-mark-updated" signal'>source-mark-updated</a>"                            : Run Last
</pre>
</div>
<div class="refsect1" lang="en">
<a name="GtkSourceBuffer.description"></a><h2>Description</h2>
<p>
The <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a> object is the model for <a class="link" href="GtkSourceView.html" title="GtkSourceView"><span class="type">GtkSourceView</span></a> widgets.
It extends the <span class="type">GtkTextBuffer</span> object by adding features necessary to
display and edit source code: syntax highlighting, bracket matching
and markers.  It also implements support for undo/redo operations.
</p>
<p>
To create a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a> use <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-new" title="gtk_source_buffer_new ()"><code class="function">gtk_source_buffer_new()</code></a> or
<a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-new-with-language" title="gtk_source_buffer_new_with_language ()"><code class="function">gtk_source_buffer_new_with_language()</code></a>.  The second form is just a
convenience function which allows you to initially set a
<a class="link" href="GtkSourceLanguage.html" title="GtkSourceLanguage"><span class="type">GtkSourceLanguage</span></a>.
</p>
<p>
By default highlighting is enabled, but you can disable it with
<a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-set-highlight-syntax" title="gtk_source_buffer_set_highlight_syntax ()"><code class="function">gtk_source_buffer_set_highlight_syntax()</code></a>.
</p>
</div>
<div class="refsect1" lang="en">
<a name="GtkSourceBuffer.details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="GtkSourceBuffer-struct"></a><h3>GtkSourceBuffer</h3>
<pre class="programlisting">typedef struct _GtkSourceBuffer GtkSourceBuffer;</pre>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkSourceBufferClass"></a><h3>GtkSourceBufferClass</h3>
<pre class="programlisting">typedef struct {
	GtkTextBufferClass parent_class;

	/* Padding for future expansion */
	void (*_gtk_source_reserved1) (void);
	void (*_gtk_source_reserved2) (void);
	void (*_gtk_source_reserved3) (void);
	void (*_gtk_source_reserved4) (void);
	void (*_gtk_source_reserved5) (void);
	void (*_gtk_source_reserved6) (void);
} GtkSourceBufferClass;
</pre>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-new"></a><h3>gtk_source_buffer_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a>*    gtk_source_buffer_new               (GtkTextTagTable *table);</pre>
<p>
Creates a new source buffer.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>table</code></em> :</span></p></td>
<td> a <span class="type">GtkTextTagTable</span>, or <code class="literal">NULL</code> to create a new one.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a new source buffer.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-new-with-language"></a><h3>gtk_source_buffer_new_with_language ()</h3>
<pre class="programlisting"><a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a>*    gtk_source_buffer_new_with_language (<a class="link" href="GtkSourceLanguage.html" title="GtkSourceLanguage">GtkSourceLanguage</a> *language);</pre>
<p>
Creates a new source buffer using the highlighting patterns in
<em class="parameter"><code>language</code></em>.  This is equivalent to creating a new source buffer with
a new tag table and then calling <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-set-language" title="gtk_source_buffer_set_language ()"><code class="function">gtk_source_buffer_set_language()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>language</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceLanguage.html" title="GtkSourceLanguage"><span class="type">GtkSourceLanguage</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a new source buffer which will highlight text
according to the highlighting patterns in <em class="parameter"><code>language</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-set-highlight-syntax"></a><h3>gtk_source_buffer_set_highlight_syntax ()</h3>
<pre class="programlisting">void                gtk_source_buffer_set_highlight_syntax
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         gboolean highlight);</pre>
<p>
Controls whether syntax is highlighted in the buffer. If <em class="parameter"><code>highlight</code></em>
is <code class="literal">TRUE</code>, the text will be highlighted according to the syntax
patterns specified in the language set with
<a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-set-language" title="gtk_source_buffer_set_language ()"><code class="function">gtk_source_buffer_set_language()</code></a>. If <em class="parameter"><code>highlight</code></em> is <code class="literal">FALSE</code>, syntax highlighting
is disabled and all the GtkTextTag objects that have been added by the 
syntax highlighting engine are removed from the buffer.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>highlight</code></em> :</span></p></td>
<td> <code class="literal">TRUE</code> to enable syntax highlighting, <code class="literal">FALSE</code> to disable it.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-get-highlight-syntax"></a><h3>gtk_source_buffer_get_highlight_syntax ()</h3>
<pre class="programlisting">gboolean            gtk_source_buffer_get_highlight_syntax
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);</pre>
<p>
Determines whether syntax highlighting is activated in the source
buffer.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <code class="literal">TRUE</code> if syntax highlighting is enabled, <code class="literal">FALSE</code> otherwise.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-set-language"></a><h3>gtk_source_buffer_set_language ()</h3>
<pre class="programlisting">void                gtk_source_buffer_set_language      (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         <a class="link" href="GtkSourceLanguage.html" title="GtkSourceLanguage">GtkSourceLanguage</a> *language);</pre>
<p>
Associate a <a class="link" href="GtkSourceLanguage.html" title="GtkSourceLanguage"><span class="type">GtkSourceLanguage</span></a> with the source buffer. If <em class="parameter"><code>language</code></em> is 
not-<code class="literal">NULL</code> and syntax highlighting is enabled (see <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-set-highlight-syntax" title="gtk_source_buffer_set_highlight_syntax ()"><code class="function">gtk_source_buffer_set_highlight_syntax()</code></a>),
the syntax patterns defined in <em class="parameter"><code>language</code></em> will be used to highlight the text
contained in the buffer. If <em class="parameter"><code>language</code></em> is <code class="literal">NULL</code>, the text contained in the 
buffer is not highlighted.
</p>
<p>
The buffer holds a reference to <em class="parameter"><code>language</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>language</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceLanguage.html" title="GtkSourceLanguage"><span class="type">GtkSourceLanguage</span></a> to set, or <code class="literal">NULL</code>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-get-language"></a><h3>gtk_source_buffer_get_language ()</h3>
<pre class="programlisting"><a class="link" href="GtkSourceLanguage.html" title="GtkSourceLanguage">GtkSourceLanguage</a>*  gtk_source_buffer_get_language      (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);</pre>
<p>
Returns the <a class="link" href="GtkSourceLanguage.html" title="GtkSourceLanguage"><span class="type">GtkSourceLanguage</span></a> associated with the buffer, 
see <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-set-language" title="gtk_source_buffer_set_language ()"><code class="function">gtk_source_buffer_set_language()</code></a>.  The returned object should not be
unreferenced by the user.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="GtkSourceLanguage.html" title="GtkSourceLanguage"><span class="type">GtkSourceLanguage</span></a> associated with the buffer, or <code class="literal">NULL</code>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-set-highlight-matching-brackets"></a><h3>gtk_source_buffer_set_highlight_matching_brackets ()</h3>
<pre class="programlisting">void                gtk_source_buffer_set_highlight_matching_brackets
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         gboolean highlight);</pre>
<p>
Controls the bracket match highlighting function in the buffer.  If
activated, when you position your cursor over a bracket character
(a parenthesis, a square bracket, etc.) the matching opening or
closing bracket character will be highlighted.  You can specify the
style with the <code class="function">gtk_source_buffer_set_bracket_match_style()</code>
function.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>highlight</code></em> :</span></p></td>
<td> <code class="literal">TRUE</code> if you want matching brackets highlighted.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-get-highlight-matching-brackets"></a><h3>gtk_source_buffer_get_highlight_matching_brackets ()</h3>
<pre class="programlisting">gboolean            gtk_source_buffer_get_highlight_matching_brackets
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);</pre>
<p>
Determines whether bracket match highlighting is activated for the
source buffer.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <code class="literal">TRUE</code> if the source buffer will highlight matching
brackets.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-set-style-scheme"></a><h3>gtk_source_buffer_set_style_scheme ()</h3>
<pre class="programlisting">void                gtk_source_buffer_set_style_scheme  (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         <a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme">GtkSourceStyleScheme</a> *scheme);</pre>
<p>
Sets style scheme used by the buffer.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>scheme</code></em> :</span></p></td>
<td> style scheme.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-get-style-scheme"></a><h3>gtk_source_buffer_get_style_scheme ()</h3>
<pre class="programlisting"><a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme">GtkSourceStyleScheme</a>* gtk_source_buffer_get_style_scheme
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);</pre>
<p>
Returns the <a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme"><span class="type">GtkSourceStyleScheme</span></a> currently used in <em class="parameter"><code>buffer</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the <a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme"><span class="type">GtkSourceStyleScheme</span></a> set by
<a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-set-style-scheme" title="gtk_source_buffer_set_style_scheme ()"><code class="function">gtk_source_buffer_set_style_scheme()</code></a>, or <code class="literal">NULL</code>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-get-max-undo-levels"></a><h3>gtk_source_buffer_get_max_undo_levels ()</h3>
<pre class="programlisting">gint                gtk_source_buffer_get_max_undo_levels
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);</pre>
<p>
Determines the number of undo levels the buffer will track for
buffer edits.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the maximum number of possible undo levels or
              -1 if no limit is set.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-set-max-undo-levels"></a><h3>gtk_source_buffer_set_max_undo_levels ()</h3>
<pre class="programlisting">void                gtk_source_buffer_set_max_undo_levels
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         gint max_undo_levels);</pre>
<p>
Sets the number of undo levels for user actions the buffer will
track.  If the number of user actions exceeds the limit set by this
function, older actions will be discarded.
</p>
<p>
If <em class="parameter"><code>max_undo_levels</code></em> is -1, no limit is set.
</p>
<p>
A new action is started whenever the function
<code class="function">gtk_text_buffer_begin_user_action()</code> is called.  In general, this
happens whenever the user presses any key which modifies the
buffer, but the undo manager will try to merge similar consecutive
actions, such as multiple character insertions into one action.
But, inserting a newline does start a new action.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>max_undo_levels</code></em> :</span></p></td>
<td> the desired maximum number of undo levels.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-redo"></a><h3>gtk_source_buffer_redo ()</h3>
<pre class="programlisting">void                gtk_source_buffer_redo              (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);</pre>
<p>
Redoes the last undo operation.  Use <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-can-redo" title="gtk_source_buffer_can_redo ()"><code class="function">gtk_source_buffer_can_redo()</code></a>
to check whether a call to this function will have any effect.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-undo"></a><h3>gtk_source_buffer_undo ()</h3>
<pre class="programlisting">void                gtk_source_buffer_undo              (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);</pre>
<p>
Undoes the last user action which modified the buffer.  Use
<a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-can-undo" title="gtk_source_buffer_can_undo ()"><code class="function">gtk_source_buffer_can_undo()</code></a> to check whether a call to this
function will have any effect.
</p>
<p>
Actions are defined as groups of operations between a call to
<code class="function">gtk_text_buffer_begin_user_action()</code> and
<code class="function">gtk_text_buffer_end_user_action()</code>, or sequences of similar edits
(inserts or deletes) on the same line.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-can-redo"></a><h3>gtk_source_buffer_can_redo ()</h3>
<pre class="programlisting">gboolean            gtk_source_buffer_can_redo          (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);</pre>
<p>
Determines whether a source buffer can redo the last action
(i.e. if the last operation was an undo).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <code class="literal">TRUE</code> if a redo is possible.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-can-undo"></a><h3>gtk_source_buffer_can_undo ()</h3>
<pre class="programlisting">gboolean            gtk_source_buffer_can_undo          (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);</pre>
<p>
Determines whether a source buffer can undo the last action.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <code class="literal">TRUE</code> if it's possible to undo the last action.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-begin-not-undoable-action"></a><h3>gtk_source_buffer_begin_not_undoable_action ()</h3>
<pre class="programlisting">void                gtk_source_buffer_begin_not_undoable_action
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);</pre>
<p>
Marks the beginning of a not undoable action on the buffer,
disabling the undo manager.  Typically you would call this function
before initially setting the contents of the buffer (e.g. when
loading a file in a text editor).
</p>
<p>
You may nest <a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-begin-not-undoable-action" title="gtk_source_buffer_begin_not_undoable_action ()"><code class="function">gtk_source_buffer_begin_not_undoable_action()</code></a> /
<a class="link" href="GtkSourceBuffer.html#gtk-source-buffer-end-not-undoable-action" title="gtk_source_buffer_end_not_undoable_action ()"><code class="function">gtk_source_buffer_end_not_undoable_action()</code></a> blocks.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-end-not-undoable-action"></a><h3>gtk_source_buffer_end_not_undoable_action ()</h3>
<pre class="programlisting">void                gtk_source_buffer_end_not_undoable_action
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer);</pre>
<p>
Marks the end of a not undoable action on the buffer.  When the
last not undoable block is closed through the call to this
function, the list of undo actions is cleared and the undo manager
is re-enabled.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-create-source-mark"></a><h3>gtk_source_buffer_create_source_mark ()</h3>
<pre class="programlisting"><a class="link" href="GtkSourceMark.html" title="GtkSourceMark">GtkSourceMark</a>*      gtk_source_buffer_create_source_mark
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         const gchar *name,
                                                         const gchar *category,
                                                         const GtkTextIter *where);</pre>
<p>
Creates a source mark in the <em class="parameter"><code>buffer</code></em> of category <em class="parameter"><code>category</code></em>.  A source mark is
a <span class="type">GtkTextMark</span> but organised into categories. Depending on the category
a pixbuf can be specified that will be displayed along the line of the mark.
</p>
<p>
Like a <span class="type">GtkTextMark</span>, a <a class="link" href="GtkSourceMark.html" title="GtkSourceMark"><span class="type">GtkSourceMark</span></a> can be anonymous if the
passed <em class="parameter"><code>name</code></em> is <code class="literal">NULL</code>.  Also, the buffer owns the marks so you
shouldn't unreference it.
</p>
<p>
Marks always have left gravity and are moved to the beginning of
the line when the user deletes the line they were in.
</p>
<p>
Typical uses for a source mark are bookmarks, breakpoints, current
executing instruction indication in a source file, etc..</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td> the name of the mark, or <code class="literal">NULL</code>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>category</code></em> :</span></p></td>
<td> a string defining the mark category.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>where</code></em> :</span></p></td>
<td> location to place the mark.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a new <a class="link" href="GtkSourceMark.html" title="GtkSourceMark"><span class="type">GtkSourceMark</span></a>, owned by the buffer.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-get-source-marks-at-line"></a><h3>gtk_source_buffer_get_source_marks_at_line ()</h3>
<pre class="programlisting">GSList*             gtk_source_buffer_get_source_marks_at_line
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         gint line,
                                                         const gchar *category);</pre>
<p>
Returns the list of marks of the given category at <em class="parameter"><code>line</code></em>.
If <em class="parameter"><code>category</code></em> is NULL, all marks at <em class="parameter"><code>line</code></em> are returned.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>line</code></em> :</span></p></td>
<td> a line number.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>category</code></em> :</span></p></td>
<td> category to search for or <code class="literal">NULL</code>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated <span class="type">GSList</span>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-get-source-marks-at-iter"></a><h3>gtk_source_buffer_get_source_marks_at_iter ()</h3>
<pre class="programlisting">GSList*             gtk_source_buffer_get_source_marks_at_iter
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         GtkTextIter *iter,
                                                         const gchar *category);</pre>
<p>
Returns the list of marks of the given category at <em class="parameter"><code>iter</code></em>. If <em class="parameter"><code>category</code></em>
is <code class="literal">NULL</code> it returns all marks at <em class="parameter"><code>iter</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td> an iterator.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>category</code></em> :</span></p></td>
<td> category to search for or <code class="literal">NULL</code>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated <span class="type">GSList</span>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-remove-source-marks"></a><h3>gtk_source_buffer_remove_source_marks ()</h3>
<pre class="programlisting">void                gtk_source_buffer_remove_source_marks
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         const GtkTextIter *start,
                                                         const GtkTextIter *end,
                                                         const gchar *category);</pre>
<p>
Remove all marks of <em class="parameter"><code>category</code></em> between <em class="parameter"><code>start</code></em> and <em class="parameter"><code>end</code></em> from the buffer.
If <em class="parameter"><code>category</code></em> is NULL, all marks in the range will be removed.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start</code></em> :</span></p></td>
<td> a <span class="type">GtkTextIter</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
<td> a <span class="type">GtkTextIter</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>category</code></em> :</span></p></td>
<td> category to search for or NULL
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-forward-iter-to-source-mark"></a><h3>gtk_source_buffer_forward_iter_to_source_mark ()</h3>
<pre class="programlisting">gboolean            gtk_source_buffer_forward_iter_to_source_mark
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         GtkTextIter *iter,
                                                         const gchar *category);</pre>
<p>
Moves <em class="parameter"><code>iter</code></em> to the position of the next <a class="link" href="GtkSourceMark.html" title="GtkSourceMark"><span class="type">GtkSourceMark</span></a> of the given
<em class="parameter"><code>category</code></em>. Returns <span class="type">TRUE</span> if <em class="parameter"><code>iter</code></em> was moved. If <em class="parameter"><code>category</code></em> is NULL, the
next source mark can be of any category.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td> an iterator.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>category</code></em> :</span></p></td>
<td> category to search for or <code class="literal">NULL</code>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> whether iter moved.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-backward-iter-to-source-mark"></a><h3>gtk_source_buffer_backward_iter_to_source_mark ()</h3>
<pre class="programlisting">gboolean            gtk_source_buffer_backward_iter_to_source_mark
                                                        (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         GtkTextIter *iter,
                                                         const gchar *category);</pre>
<p>
Moves <em class="parameter"><code>iter</code></em> to the position of the previous <a class="link" href="GtkSourceMark.html" title="GtkSourceMark"><span class="type">GtkSourceMark</span></a> of the given
category. Returns <span class="type">TRUE</span> if <em class="parameter"><code>iter</code></em> was moved. If <em class="parameter"><code>category</code></em> is NULL, the
previous source mark can be of any category.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td> an iterator.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>category</code></em> :</span></p></td>
<td> category to search for or <code class="literal">NULL</code>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> whether iter moved.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-source-buffer-ensure-highlight"></a><h3>gtk_source_buffer_ensure_highlight ()</h3>
<pre class="programlisting">void                gtk_source_buffer_ensure_highlight  (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                         const GtkTextIter *start,
                                                         const GtkTextIter *end);</pre>
<p>
Forces buffer to analyze and highlight the given area synchronously.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
    This is a potentially slow operation and should be used only
    when you need to make sure that some text not currently
    visible is highlighted, for instance before printing.
  </p>
</div>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> a <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start</code></em> :</span></p></td>
<td> start of the area to highlight.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
<td> end of the area to highlight.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="GtkSourceBuffer.property-details"></a><h2>Property Details</h2>
<div class="refsect2" lang="en">
<a name="GtkSourceBuffer--can-redo"></a><h3>The <code class="literal">"can-redo"</code> property</h3>
<pre class="programlisting">  "can-redo"                 gboolean              : Read</pre>
<p>Whether Redo operation is possible.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkSourceBuffer--can-undo"></a><h3>The <code class="literal">"can-undo"</code> property</h3>
<pre class="programlisting">  "can-undo"                 gboolean              : Read</pre>
<p>Whether Undo operation is possible.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkSourceBuffer--highlight-matching-brackets"></a><h3>The <code class="literal">"highlight-matching-brackets"</code> property</h3>
<pre class="programlisting">  "highlight-matching-brackets" gboolean              : Read / Write</pre>
<p>
Whether to highlight matching brackets in the buffer.</p>
<p>

</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkSourceBuffer--highlight-syntax"></a><h3>The <code class="literal">"highlight-syntax"</code> property</h3>
<pre class="programlisting">  "highlight-syntax"         gboolean              : Read / Write</pre>
<p>
Whether to highlight syntax in the buffer.</p>
<p>

</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkSourceBuffer--language"></a><h3>The <code class="literal">"language"</code> property</h3>
<pre class="programlisting">  "language"                 <a class="link" href="GtkSourceLanguage.html" title="GtkSourceLanguage">GtkSourceLanguage</a>*    : Read / Write</pre>
<p>Language object to get highlighting patterns from.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkSourceBuffer--max-undo-levels"></a><h3>The <code class="literal">"max-undo-levels"</code> property</h3>
<pre class="programlisting">  "max-undo-levels"          gint                  : Read / Write</pre>
<p>
Number of undo levels for the buffer. -1 means no limit.</p>
<p>

</p>
<p>Allowed values: &gt;= -1</p>
<p>Default value: 1000</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkSourceBuffer--style-scheme"></a><h3>The <code class="literal">"style-scheme"</code> property</h3>
<pre class="programlisting">  "style-scheme"             <a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme">GtkSourceStyleScheme</a>*  : Read / Write</pre>
<p>
Style scheme. It contains styles for syntax highlighting, optionally
foreground, background, cursor color, current line color, and matching
brackets style.</p>
<p>

</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="GtkSourceBuffer.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2" lang="en">
<a name="GtkSourceBuffer-highlight-updated"></a><h3>The <code class="literal">"highlight-updated"</code> signal</h3>
<pre class="programlisting">void                user_function                      (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *sourcebuffer,
                                                        GtkTextIter     *arg1,
                                                        GtkTextIter     *arg2,
                                                        gpointer         user_data)         : Run Last</pre>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sourcebuffer</code></em> :</span></p></td>
<td>the object which received the signal.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg1</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg2</code></em> :</span></p></td>
<td>

</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkSourceBuffer-source-mark-updated"></a><h3>The <code class="literal">"source-mark-updated"</code> signal</h3>
<pre class="programlisting">void                user_function                      (<a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer">GtkSourceBuffer</a> *buffer,
                                                        GtkTextMark     *arg1,
                                                        gpointer         user_data)      : Run Last</pre>
<p>
The ::source_mark_updated signal is emitted each time 
a mark is added to, moved or removed from the <em class="parameter"><code>buffer</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td> the buffer that received the signal
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="GtkSourceBuffer.see-also"></a><h2>See Also</h2>
<p>
There is an introduction document
describing the basic concepts of the buffer/view interactions.
</p>
<p>
Check <span class="type">GtkTextBuffer</span> for information about the base buffer; and
<a class="link" href="GtkSourceView.html" title="GtkSourceView"><span class="type">GtkSourceView</span></a> for examples on setting up the buffer to be displayed
in a view widget.
</p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.11</div>
</body>
</html>