<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
<!ENTITY tutorial SYSTEM "lang-tutorial.sgml">
<!ENTITY reference SYSTEM "lang-reference.sgml">
]>
<refentry id="GtkSourceView">
<refmeta>
<refentrytitle role="top_of_page" id="GtkSourceView.top_of_page">GtkSourceView</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTKSOURCEVIEW-2.0 Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkSourceView</refname>
<refpurpose>The view object</refpurpose>
</refnamediv>

<refsynopsisdiv id="GtkSourceView.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>

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

                    <link linkend="GtkSourceView-struct">GtkSourceView</link>;
                    <link linkend="GtkSourceViewClass">GtkSourceViewClass</link>;
<link linkend="gchar">gchar</link> *             (<link linkend="GtkSourceViewMarkTooltipFunc">*GtkSourceViewMarkTooltipFunc</link>)     (<link linkend="GtkSourceMark">GtkSourceMark</link> *mark,
                                                         <link linkend="gpointer">gpointer</link> user_data);
enum                <link linkend="GtkSourceSmartHomeEndType">GtkSourceSmartHomeEndType</link>;
enum                <link linkend="GtkSourceDrawSpacesFlags">GtkSourceDrawSpacesFlags</link>;
enum                <link linkend="GtkSourceViewGutterPosition">GtkSourceViewGutterPosition</link>;
<link linkend="GtkWidget">GtkWidget</link> *         <link linkend="gtk-source-view-new">gtk_source_view_new</link>                 (void);
<link linkend="GtkWidget">GtkWidget</link> *         <link linkend="gtk-source-view-new-with-buffer">gtk_source_view_new_with_buffer</link>     (<link linkend="GtkSourceBuffer">GtkSourceBuffer</link> *buffer);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-auto-indent">gtk_source_view_set_auto_indent</link>     (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gboolean">gboolean</link> enable);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-source-view-get-auto-indent">gtk_source_view_get_auto_indent</link>     (<link linkend="GtkSourceView">GtkSourceView</link> *view);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-indent-on-tab">gtk_source_view_set_indent_on_tab</link>   (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gboolean">gboolean</link> enable);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-source-view-get-indent-on-tab">gtk_source_view_get_indent_on_tab</link>   (<link linkend="GtkSourceView">GtkSourceView</link> *view);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-indent-width">gtk_source_view_set_indent_width</link>    (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gint">gint</link> width);
<link linkend="gint">gint</link>                <link linkend="gtk-source-view-get-indent-width">gtk_source_view_get_indent_width</link>    (<link linkend="GtkSourceView">GtkSourceView</link> *view);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-insert-spaces-instead-of-tabs">gtk_source_view_set_insert_spaces_instead_of_tabs</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gboolean">gboolean</link> enable);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-source-view-get-insert-spaces-instead-of-tabs">gtk_source_view_get_insert_spaces_instead_of_tabs</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-smart-home-end">gtk_source_view_set_smart_home_end</link>  (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="GtkSourceSmartHomeEndType">GtkSourceSmartHomeEndType</link> smart_he);
<link linkend="GtkSourceSmartHomeEndType">GtkSourceSmartHomeEndType</link>  <link linkend="gtk-source-view-get-smart-home-end">gtk_source_view_get_smart_home_end</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-mark-category-priority">gtk_source_view_set_mark_category_priority</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         <link linkend="gint">gint</link> priority);
<link linkend="gint">gint</link>                <link linkend="gtk-source-view-get-mark-category-priority">gtk_source_view_get_mark_category_priority</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-mark-category-pixbuf">gtk_source_view_set_mark_category_pixbuf</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);
<link linkend="GdkPixbuf">GdkPixbuf</link> *         <link linkend="gtk-source-view-get-mark-category-pixbuf">gtk_source_view_get_mark_category_pixbuf</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-mark-category-icon-from-pixbuf">gtk_source_view_set_mark_category_icon_from_pixbuf</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-mark-category-icon-from-stock">gtk_source_view_set_mark_category_icon_from_stock</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         const <link linkend="gchar">gchar</link> *stock_id);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-mark-category-icon-from-icon-name">gtk_source_view_set_mark_category_icon_from_icon_name</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         const <link linkend="gchar">gchar</link> *name);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-source-view-get-mark-category-background">gtk_source_view_get_mark_category_background</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         <link linkend="GdkColor">GdkColor</link> *dest);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-mark-category-background">gtk_source_view_set_mark_category_background</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         const <link linkend="GdkColor">GdkColor</link> *color);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-mark-category-tooltip-func">gtk_source_view_set_mark_category_tooltip_func</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         <link linkend="GtkSourceViewMarkTooltipFunc">GtkSourceViewMarkTooltipFunc</link> func,
                                                         <link linkend="gpointer">gpointer</link> user_data,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> user_data_notify);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-mark-category-tooltip-markup-func">gtk_source_view_set_mark_category_tooltip_markup_func</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         <link linkend="GtkSourceViewMarkTooltipFunc">GtkSourceViewMarkTooltipFunc</link> markup_func,
                                                         <link linkend="gpointer">gpointer</link> user_data,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> user_data_notify);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-highlight-current-line">gtk_source_view_set_highlight_current_line</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gboolean">gboolean</link> show);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-source-view-get-highlight-current-line">gtk_source_view_get_highlight_current_line</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-show-line-marks">gtk_source_view_set_show_line_marks</link> (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gboolean">gboolean</link> show);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-source-view-get-show-line-marks">gtk_source_view_get_show_line_marks</link> (<link linkend="GtkSourceView">GtkSourceView</link> *view);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-show-line-numbers">gtk_source_view_set_show_line_numbers</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gboolean">gboolean</link> show);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-source-view-get-show-line-numbers">gtk_source_view_get_show_line_numbers</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-show-right-margin">gtk_source_view_set_show_right_margin</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gboolean">gboolean</link> show);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-source-view-get-show-right-margin">gtk_source_view_get_show_right_margin</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-right-margin-position">gtk_source_view_set_right_margin_position</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="guint">guint</link> pos);
<link linkend="guint">guint</link>               <link linkend="gtk-source-view-get-right-margin-position">gtk_source_view_get_right_margin_position</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-tab-width">gtk_source_view_set_tab_width</link>       (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="guint">guint</link> width);
<link linkend="guint">guint</link>               <link linkend="gtk-source-view-get-tab-width">gtk_source_view_get_tab_width</link>       (<link linkend="GtkSourceView">GtkSourceView</link> *view);
<link linkend="void">void</link>                <link linkend="gtk-source-view-set-draw-spaces">gtk_source_view_set_draw_spaces</link>     (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="GtkSourceDrawSpacesFlags">GtkSourceDrawSpacesFlags</link> flags);
<link linkend="GtkSourceDrawSpacesFlags">GtkSourceDrawSpacesFlags</link>  <link linkend="gtk-source-view-get-draw-spaces">gtk_source_view_get_draw_spaces</link>
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view);
<link linkend="GtkSourceGutter">GtkSourceGutter</link> *   <link linkend="gtk-source-view-get-gutter">gtk_source_view_get_gutter</link>          (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="GtkTextWindowType">GtkTextWindowType</link> window_type);
</synopsis>
</refsynopsisdiv>

<refsect1 id="GtkSourceView.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
         +----<link linkend="GtkObject">GtkObject</link>
               +----<link linkend="GtkWidget">GtkWidget</link>
                     +----<link linkend="GtkContainer">GtkContainer</link>
                           +----<link linkend="GtkTextView">GtkTextView</link>
                                 +----GtkSourceView
</synopsis>
</refsect1>



<refsect1 id="GtkSourceView.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkSourceView implements
 <link linkend="GtkBuildable">GtkBuildable</link> and  <link linkend="AtkImplementorIface">AtkImplementorIface</link>.</para>
</refsect1>


<refsect1 id="GtkSourceView.properties" role="properties">
<title role="properties.title">Properties</title>
<synopsis>
  &quot;<link linkend="GtkSourceView--auto-indent">auto-indent</link>&quot;              <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkSourceView--draw-spaces">draw-spaces</link>&quot;              <link linkend="GtkSourceDrawSpacesFlags">GtkSourceDrawSpacesFlags</link>  : Read / Write
  &quot;<link linkend="GtkSourceView--highlight-current-line">highlight-current-line</link>&quot;   <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkSourceView--indent-on-tab">indent-on-tab</link>&quot;            <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkSourceView--indent-width">indent-width</link>&quot;             <link linkend="gint">gint</link>                  : Read / Write
  &quot;<link linkend="GtkSourceView--insert-spaces-instead-of-tabs">insert-spaces-instead-of-tabs</link>&quot; <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkSourceView--right-margin-position">right-margin-position</link>&quot;    <link linkend="guint">guint</link>                 : Read / Write
  &quot;<link linkend="GtkSourceView--show-line-marks">show-line-marks</link>&quot;          <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkSourceView--show-line-numbers">show-line-numbers</link>&quot;        <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkSourceView--show-right-margin">show-right-margin</link>&quot;        <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkSourceView--smart-home-end">smart-home-end</link>&quot;           <link linkend="GtkSourceSmartHomeEndType">GtkSourceSmartHomeEndType</link>  : Read / Write
  &quot;<link linkend="GtkSourceView--tab-width">tab-width</link>&quot;                <link linkend="guint">guint</link>                 : Read / Write
</synopsis>
</refsect1>

<refsect1 id="GtkSourceView.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<synopsis>
  &quot;<link linkend="GtkSourceView-line-mark-activated">line-mark-activated</link>&quot;                            : Run Last
  &quot;<link linkend="GtkSourceView-redo">redo</link>&quot;                                           : Run Last / Action
  &quot;<link linkend="GtkSourceView-undo">undo</link>&quot;                                           : Run Last / Action
</synopsis>
</refsect1>


<refsect1 id="GtkSourceView.description" role="desc">
<title role="desc.title">Description</title>
<para>
GtkSourceView is the main object of the gtksourceview library. It provides
a text view which syntax highlighting, undo/redo and text marks. Use a
<link linkend="GtkSourceBuffer"><type>GtkSourceBuffer</type></link> to display text with a GtkSourceView.
</para>
</refsect1>

<refsect1 id="GtkSourceView.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GtkSourceView-struct" role="struct">
<title>GtkSourceView</title>
<indexterm zone="GtkSourceView-struct"><primary sortas="GtkSourceView">GtkSourceView</primary></indexterm><programlisting>typedef struct _GtkSourceView GtkSourceView;</programlisting>
<para>
</para></refsect2>
<refsect2 id="GtkSourceViewClass" role="struct">
<title>GtkSourceViewClass</title>
<indexterm zone="GtkSourceViewClass"><primary sortas="GtkSourceViewClass">GtkSourceViewClass</primary></indexterm><programlisting>typedef struct {
	GtkTextViewClass parent_class;

	void (*undo) (GtkSourceView *view);
	void (*redo) (GtkSourceView *view);
	void (*line_mark_activated) (GtkSourceView *view, 
	                             GtkTextIter   *iter,
	                             GdkEvent      *event);

	/* Padding for future expansion */
	void (*_gtk_source_reserved1) (void);
	void (*_gtk_source_reserved2) (void);
	void (*_gtk_source_reserved3) (void);
} GtkSourceViewClass;
</programlisting>
<para>
</para></refsect2>
<refsect2 id="GtkSourceViewMarkTooltipFunc" role="function">
<title>GtkSourceViewMarkTooltipFunc ()</title>
<indexterm zone="GtkSourceViewMarkTooltipFunc"><primary sortas="GtkSourceViewMarkTooltipFunc">GtkSourceViewMarkTooltipFunc</primary></indexterm><programlisting><link linkend="gchar">gchar</link> *             (*GtkSourceViewMarkTooltipFunc)     (<link linkend="GtkSourceMark">GtkSourceMark</link> *mark,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Function type for setting up a tooltip for <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>mark</parameter>&#160;:</term>
<listitem><simpara>the <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data pointer which was passed to <link linkend="gtk-source-view-set-mark-category-tooltip-func"><function>gtk_source_view_set_mark_category_tooltip_func()</function></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>a new-allocated text that is going to be shown as tooltip text.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GtkSourceSmartHomeEndType" role="enum">
<title>enum GtkSourceSmartHomeEndType</title>
<indexterm zone="GtkSourceSmartHomeEndType"><primary sortas="GtkSourceSmartHomeEndType">GtkSourceSmartHomeEndType</primary></indexterm><programlisting>typedef enum
{
	GTK_SOURCE_SMART_HOME_END_DISABLED,
	GTK_SOURCE_SMART_HOME_END_BEFORE,
	GTK_SOURCE_SMART_HOME_END_AFTER,
	GTK_SOURCE_SMART_HOME_END_ALWAYS
} GtkSourceSmartHomeEndType;
</programlisting>
<para>
</para>
<para>
</para><variablelist role="enum">
<varlistentry id="GTK-SOURCE-SMART-HOME-END-DISABLED--CAPS" role="constant">
<term><literal>GTK_SOURCE_SMART_HOME_END_DISABLED</literal></term>
<listitem><simpara> smart-home-end disabled.
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-SOURCE-SMART-HOME-END-BEFORE--CAPS" role="constant">
<term><literal>GTK_SOURCE_SMART_HOME_END_BEFORE</literal></term>
<listitem><simpara> move to the first/last
non-whitespace character on the first press of the HOME/END keys and
to the beginning/end of the line on the second press.
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-SOURCE-SMART-HOME-END-AFTER--CAPS" role="constant">
<term><literal>GTK_SOURCE_SMART_HOME_END_AFTER</literal></term>
<listitem><simpara> move to the beginning/end of the
line on the first press of the HOME/END keys and to the first/last
non-whitespace character on the second press.
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-SOURCE-SMART-HOME-END-ALWAYS--CAPS" role="constant">
<term><literal>GTK_SOURCE_SMART_HOME_END_ALWAYS</literal></term>
<listitem><simpara> always move to the first/last
non-whitespace character when the HOME/END keys are pressed.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GtkSourceDrawSpacesFlags" role="enum">
<title>enum GtkSourceDrawSpacesFlags</title>
<indexterm zone="GtkSourceDrawSpacesFlags"><primary sortas="GtkSourceDrawSpacesFlags">GtkSourceDrawSpacesFlags</primary></indexterm><programlisting>typedef enum
{
	GTK_SOURCE_DRAW_SPACES_SPACE      = 1 &lt;&lt; 0,
	GTK_SOURCE_DRAW_SPACES_TAB        = 1 &lt;&lt; 1,
	GTK_SOURCE_DRAW_SPACES_NEWLINE    = 1 &lt;&lt; 2,
	GTK_SOURCE_DRAW_SPACES_NBSP       = 1 &lt;&lt; 3,
	GTK_SOURCE_DRAW_SPACES_ALL        = (GTK_SOURCE_DRAW_SPACES_SPACE   | \
	                                     GTK_SOURCE_DRAW_SPACES_TAB     | \
	                                     GTK_SOURCE_DRAW_SPACES_NEWLINE | \
	                                     GTK_SOURCE_DRAW_SPACES_NBSP)
} GtkSourceDrawSpacesFlags;
</programlisting>
<para>
GtkSourceDrawSpacesFlags determine what kind of spaces whould be drawn.</para>
<para>
</para><variablelist role="enum">
<varlistentry id="GTK-SOURCE-DRAW-SPACES-SPACE--CAPS" role="constant">
<term><literal>GTK_SOURCE_DRAW_SPACES_SPACE</literal></term>
<listitem><simpara> whether the space character should be drawn.
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-SOURCE-DRAW-SPACES-TAB--CAPS" role="constant">
<term><literal>GTK_SOURCE_DRAW_SPACES_TAB</literal></term>
<listitem><simpara> whether the tab character should be drawn.
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-SOURCE-DRAW-SPACES-NEWLINE--CAPS" role="constant">
<term><literal>GTK_SOURCE_DRAW_SPACES_NEWLINE</literal></term>
<listitem><simpara> whether the line breaks should be drawn.
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-SOURCE-DRAW-SPACES-NBSP--CAPS" role="constant">
<term><literal>GTK_SOURCE_DRAW_SPACES_NBSP</literal></term>
<listitem><simpara> whether the non-breaking whitespaces should be drawn.
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-SOURCE-DRAW-SPACES-ALL--CAPS" role="constant">
<term><literal>GTK_SOURCE_DRAW_SPACES_ALL</literal></term>
<listitem><simpara> wheter all kind of spaces should be drawn.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GtkSourceViewGutterPosition" role="enum">
<title>enum GtkSourceViewGutterPosition</title>
<indexterm zone="GtkSourceViewGutterPosition"><primary sortas="GtkSourceViewGutterPosition">GtkSourceViewGutterPosition</primary></indexterm><programlisting>typedef enum
{
	GTK_SOURCE_VIEW_GUTTER_POSITION_LINES = -30,
	GTK_SOURCE_VIEW_GUTTER_POSITION_MARKS = -20
} GtkSourceViewGutterPosition;
</programlisting>
<para>
</para></refsect2>
<refsect2 id="gtk-source-view-new" role="function">
<title>gtk_source_view_new ()</title>
<indexterm zone="gtk-source-view-new"><primary sortas="gtk_source_view_new">gtk_source_view_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link> *         gtk_source_view_new                 (void);</programlisting>
<para>
Creates a new <link linkend="GtkSourceView"><type>GtkSourceView</type></link>. An empty default buffer will be
created for you. If you want to specify your own buffer, consider
<link linkend="gtk-source-view-new-with-buffer"><function>gtk_source_view_new_with_buffer()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GtkSourceView"><type>GtkSourceView</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-new-with-buffer" role="function">
<title>gtk_source_view_new_with_buffer ()</title>
<indexterm zone="gtk-source-view-new-with-buffer"><primary sortas="gtk_source_view_new_with_buffer">gtk_source_view_new_with_buffer</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link> *         gtk_source_view_new_with_buffer     (<link linkend="GtkSourceBuffer">GtkSourceBuffer</link> *buffer);</programlisting>
<para>
Creates a new <link linkend="GtkSourceView"><type>GtkSourceView</type></link> widget displaying the buffer
<parameter>buffer</parameter>. One buffer can be shared among many widgets.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>buffer</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceBuffer"><type>GtkSourceBuffer</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GtkTextView"><type>GtkTextView</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-set-auto-indent" role="function">
<title>gtk_source_view_set_auto_indent ()</title>
<indexterm zone="gtk-source-view-set-auto-indent"><primary sortas="gtk_source_view_set_auto_indent">gtk_source_view_set_auto_indent</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_auto_indent     (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gboolean">gboolean</link> enable);</programlisting>
<para>
If <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> auto indentation of text is enabled.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>enable</parameter>&#160;:</term>
<listitem><simpara> whether to enable auto indentation.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-get-auto-indent" role="function">
<title>gtk_source_view_get_auto_indent ()</title>
<indexterm zone="gtk-source-view-get-auto-indent"><primary sortas="gtk_source_view_get_auto_indent">gtk_source_view_get_auto_indent</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_source_view_get_auto_indent     (<link linkend="GtkSourceView">GtkSourceView</link> *view);</programlisting>
<para>
Returns whether auto indentation of text is enabled.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if auto indentation is enabled.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-set-indent-on-tab" role="function" condition="since:1.8">
<title>gtk_source_view_set_indent_on_tab ()</title>
<indexterm zone="gtk-source-view-set-indent-on-tab" role="1.8"><primary sortas="gtk_source_view_set_indent_on_tab">gtk_source_view_set_indent_on_tab</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_indent_on_tab   (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gboolean">gboolean</link> enable);</programlisting>
<para>
If <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, when the tab key is pressed and there is a selection, the
selected text is indented of one level instead of being replaced with
the \t characters. Shift+Tab unindents the selection.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>enable</parameter>&#160;:</term>
<listitem><simpara> whether to indent a block when tab is pressed.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.8</para></refsect2>
<refsect2 id="gtk-source-view-get-indent-on-tab" role="function" condition="since:1.8">
<title>gtk_source_view_get_indent_on_tab ()</title>
<indexterm zone="gtk-source-view-get-indent-on-tab" role="1.8"><primary sortas="gtk_source_view_get_indent_on_tab">gtk_source_view_get_indent_on_tab</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_source_view_get_indent_on_tab   (<link linkend="GtkSourceView">GtkSourceView</link> *view);</programlisting>
<para>
Returns whether when the tab key is pressed the current selection
should get indented instead of replaced with the \t character.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the selection is indented when tab is pressed.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.8</para></refsect2>
<refsect2 id="gtk-source-view-set-indent-width" role="function">
<title>gtk_source_view_set_indent_width ()</title>
<indexterm zone="gtk-source-view-set-indent-width"><primary sortas="gtk_source_view_set_indent_width">gtk_source_view_set_indent_width</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_indent_width    (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gint">gint</link> width);</programlisting>
<para>
Sets the number of spaces to use for each step of indent.
If <parameter>width</parameter> is -1, the value of the GtkSourceView::tab-width property
will be used.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&#160;:</term>
<listitem><simpara> indent width in characters.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-get-indent-width" role="function">
<title>gtk_source_view_get_indent_width ()</title>
<indexterm zone="gtk-source-view-get-indent-width"><primary sortas="gtk_source_view_get_indent_width">gtk_source_view_get_indent_width</primary></indexterm><programlisting><link linkend="gint">gint</link>                gtk_source_view_get_indent_width    (<link linkend="GtkSourceView">GtkSourceView</link> *view);</programlisting>
<para>
Returns the number of spaces to use for each step of indent.
See <link linkend="gtk-source-view-set-indent-width"><function>gtk_source_view_set_indent_width()</function></link> for details.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> indent width.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-set-insert-spaces-instead-of-tabs" role="function">
<title>gtk_source_view_set_insert_spaces_instead_of_tabs ()</title>
<indexterm zone="gtk-source-view-set-insert-spaces-instead-of-tabs"><primary sortas="gtk_source_view_set_insert_spaces_instead_of_tabs">gtk_source_view_set_insert_spaces_instead_of_tabs</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_insert_spaces_instead_of_tabs
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gboolean">gboolean</link> enable);</programlisting>
<para>
If <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> any tabulator character inserted is replaced by a group
of space characters.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>enable</parameter>&#160;:</term>
<listitem><simpara> whether to insert spaces instead of tabs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-get-insert-spaces-instead-of-tabs" role="function">
<title>gtk_source_view_get_insert_spaces_instead_of_tabs ()</title>
<indexterm zone="gtk-source-view-get-insert-spaces-instead-of-tabs"><primary sortas="gtk_source_view_get_insert_spaces_instead_of_tabs">gtk_source_view_get_insert_spaces_instead_of_tabs</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_source_view_get_insert_spaces_instead_of_tabs
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view);</programlisting>
<para>
Returns whether when inserting a tabulator character it should
be replaced by a group of space characters.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if spaces are inserted instead of tabs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-set-smart-home-end" role="function">
<title>gtk_source_view_set_smart_home_end ()</title>
<indexterm zone="gtk-source-view-set-smart-home-end"><primary sortas="gtk_source_view_set_smart_home_end">gtk_source_view_set_smart_home_end</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_smart_home_end  (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="GtkSourceSmartHomeEndType">GtkSourceSmartHomeEndType</link> smart_he);</programlisting>
<para>
Set the desired movement of the cursor when HOME and END keys
are pressed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>smart_he</parameter>&#160;:</term>
<listitem><simpara> the desired behavior among <link linkend="GtkSourceSmartHomeEndType"><type>GtkSourceSmartHomeEndType</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-get-smart-home-end" role="function">
<title>gtk_source_view_get_smart_home_end ()</title>
<indexterm zone="gtk-source-view-get-smart-home-end"><primary sortas="gtk_source_view_get_smart_home_end">gtk_source_view_get_smart_home_end</primary></indexterm><programlisting><link linkend="GtkSourceSmartHomeEndType">GtkSourceSmartHomeEndType</link>  gtk_source_view_get_smart_home_end
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view);</programlisting>
<para>
Returns a <link linkend="GtkSourceSmartHomeEndType"><type>GtkSourceSmartHomeEndType</type></link> end value specifying
how the cursor will move when HOME and END keys are pressed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GtkSourceSmartHomeEndTypeend"><type>GtkSourceSmartHomeEndTypeend</type></link> value.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-set-mark-category-priority" role="function" condition="since:2.2">
<title>gtk_source_view_set_mark_category_priority ()</title>
<indexterm zone="gtk-source-view-set-mark-category-priority" role="2.2"><primary sortas="gtk_source_view_set_mark_category_priority">gtk_source_view_set_mark_category_priority</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_mark_category_priority
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         <link linkend="gint">gint</link> priority);</programlisting>
<para>
Set the <parameter>priority</parameter> for the given mark <parameter>category</parameter>. When there are
multiple marks on the same line, marks of categories with
higher priorities will be drawn on top.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter>&#160;:</term>
<listitem><simpara> a mark category.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>priority</parameter>&#160;:</term>
<listitem><simpara> the priority for the category
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gtk-source-view-get-mark-category-priority" role="function" condition="since:2.2">
<title>gtk_source_view_get_mark_category_priority ()</title>
<indexterm zone="gtk-source-view-get-mark-category-priority" role="2.2"><primary sortas="gtk_source_view_get_mark_category_priority">gtk_source_view_get_mark_category_priority</primary></indexterm><programlisting><link linkend="gint">gint</link>                gtk_source_view_get_mark_category_priority
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category);</programlisting>
<para>
Gets the priority which is associated with the given <parameter>category</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter>&#160;:</term>
<listitem><simpara> a mark category.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the priority or if <parameter>category</parameter>
exists but no priority was set, it defaults to 0.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gtk-source-view-set-mark-category-pixbuf" role="function" condition="deprecated:Use #gtk_source_view_set_mark_category_icon_from_pixbuf instead|since:2.2">
<title>gtk_source_view_set_mark_category_pixbuf ()</title>
<indexterm zone="gtk-source-view-set-mark-category-pixbuf" role="deprecated"><primary sortas="gtk_source_view_set_mark_category_pixbuf">gtk_source_view_set_mark_category_pixbuf</primary></indexterm><indexterm zone="gtk-source-view-set-mark-category-pixbuf" role="2.2"><primary sortas="gtk_source_view_set_mark_category_pixbuf">gtk_source_view_set_mark_category_pixbuf</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_mark_category_pixbuf
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);</programlisting>
<warning><para><literal>gtk_source_view_set_mark_category_pixbuf</literal> is deprecated and should not be used in newly-written code. Use <link linkend="gtk-source-view-set-mark-category-icon-from-pixbuf"><type>gtk_source_view_set_mark_category_icon_from_pixbuf</type></link> instead</para></warning>
<para>
Associates a given <parameter>pixbuf</parameter> with a given mark <parameter>category</parameter>.
If <parameter>pixbuf</parameter> is <link linkend="NULL--CAPS"><type>NULL</type></link>, the pixbuf is unset.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter>&#160;:</term>
<listitem><simpara> a mark category.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pixbuf</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> or <link linkend="NULL--CAPS"><type>NULL</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gtk-source-view-get-mark-category-pixbuf" role="function" condition="deprecated:|since:2.2">
<title>gtk_source_view_get_mark_category_pixbuf ()</title>
<indexterm zone="gtk-source-view-get-mark-category-pixbuf" role="deprecated"><primary sortas="gtk_source_view_get_mark_category_pixbuf">gtk_source_view_get_mark_category_pixbuf</primary></indexterm><indexterm zone="gtk-source-view-get-mark-category-pixbuf" role="2.2"><primary sortas="gtk_source_view_get_mark_category_pixbuf">gtk_source_view_get_mark_category_pixbuf</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link> *         gtk_source_view_get_mark_category_pixbuf
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category);</programlisting>
<warning><para><literal>gtk_source_view_get_mark_category_pixbuf</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Gets the pixbuf which is associated with the given mark <parameter>category</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter>&#160;:</term>
<listitem><simpara> a mark category.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the associated <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if not found.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gtk-source-view-set-mark-category-icon-from-pixbuf" role="function" condition="since:2.8">
<title>gtk_source_view_set_mark_category_icon_from_pixbuf ()</title>
<indexterm zone="gtk-source-view-set-mark-category-icon-from-pixbuf" role="2.8"><primary sortas="gtk_source_view_set_mark_category_icon_from_pixbuf">gtk_source_view_set_mark_category_icon_from_pixbuf</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_mark_category_icon_from_pixbuf
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);</programlisting>
<para>
Sets the icon to be used for <parameter>category</parameter> to <parameter>pixbuf</parameter>.
If <parameter>pixbuf</parameter> is <link linkend="NULL--CAPS"><type>NULL</type></link>, the icon is unset.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter>&#160;:</term>
<listitem><simpara> a mark category.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pixbuf</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> or <link linkend="NULL--CAPS"><type>NULL</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.8</para></refsect2>
<refsect2 id="gtk-source-view-set-mark-category-icon-from-stock" role="function" condition="since:2.8">
<title>gtk_source_view_set_mark_category_icon_from_stock ()</title>
<indexterm zone="gtk-source-view-set-mark-category-icon-from-stock" role="2.8"><primary sortas="gtk_source_view_set_mark_category_icon_from_stock">gtk_source_view_set_mark_category_icon_from_stock</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_mark_category_icon_from_stock
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         const <link linkend="gchar">gchar</link> *stock_id);</programlisting>
<para>
Sets the icon to be used for <parameter>category</parameter> to the stock item <parameter>stock_id</parameter>.
If <parameter>stock_id</parameter> is <link linkend="NULL--CAPS"><type>NULL</type></link>, the icon is unset.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter>&#160;:</term>
<listitem><simpara> a mark category.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>stock_id</parameter>&#160;:</term>
<listitem><simpara> the stock id or <link linkend="NULL--CAPS"><type>NULL</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.8</para></refsect2>
<refsect2 id="gtk-source-view-set-mark-category-icon-from-icon-name" role="function" condition="since:2.8">
<title>gtk_source_view_set_mark_category_icon_from_icon_name ()</title>
<indexterm zone="gtk-source-view-set-mark-category-icon-from-icon-name" role="2.8"><primary sortas="gtk_source_view_set_mark_category_icon_from_icon_name">gtk_source_view_set_mark_category_icon_from_icon_name</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_mark_category_icon_from_icon_name
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Sets the icon to be used for <parameter>category</parameter> to the named theme item <parameter>name</parameter>.
If <parameter>name</parameter> is <link linkend="NULL--CAPS"><type>NULL</type></link>, the icon is unset.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter>&#160;:</term>
<listitem><simpara> a mark category.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara> the themed icon name or <link linkend="NULL--CAPS"><type>NULL</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.8</para></refsect2>
<refsect2 id="gtk-source-view-get-mark-category-background" role="function" condition="since:2.4">
<title>gtk_source_view_get_mark_category_background ()</title>
<indexterm zone="gtk-source-view-get-mark-category-background" role="2.4"><primary sortas="gtk_source_view_get_mark_category_background">gtk_source_view_get_mark_category_background</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_source_view_get_mark_category_background
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         <link linkend="GdkColor">GdkColor</link> *dest);</programlisting>
<para>
Gets the background color associated with given <parameter>category</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter>&#160;:</term>
<listitem><simpara> a mark category.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dest</parameter>&#160;:</term>
<listitem><simpara> destination <link linkend="GdkColor"><type>GdkColor</type></link> structure to fill in.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if background color for <parameter>category</parameter> was set
and <parameter>dest</parameter> is set to a valid color, or <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-source-view-set-mark-category-background" role="function" condition="since:2.4">
<title>gtk_source_view_set_mark_category_background ()</title>
<indexterm zone="gtk-source-view-set-mark-category-background" role="2.4"><primary sortas="gtk_source_view_set_mark_category_background">gtk_source_view_set_mark_category_background</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_mark_category_background
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         const <link linkend="GdkColor">GdkColor</link> *color);</programlisting>
<para>
Sets given background <parameter>color</parameter> for mark <parameter>category</parameter>.
If <parameter>color</parameter> is <link linkend="NULL--CAPS"><type>NULL</type></link>, the background color is unset.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter>&#160;:</term>
<listitem><simpara> a mark category.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color</parameter>&#160;:</term>
<listitem><simpara> background color or <link linkend="NULL--CAPS"><literal>NULL</literal></link> to unset it.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-source-view-set-mark-category-tooltip-func" role="function" condition="since:2.8">
<title>gtk_source_view_set_mark_category_tooltip_func ()</title>
<indexterm zone="gtk-source-view-set-mark-category-tooltip-func" role="2.8"><primary sortas="gtk_source_view_set_mark_category_tooltip_func">gtk_source_view_set_mark_category_tooltip_func</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_mark_category_tooltip_func
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         <link linkend="GtkSourceViewMarkTooltipFunc">GtkSourceViewMarkTooltipFunc</link> func,
                                                         <link linkend="gpointer">gpointer</link> user_data,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> user_data_notify);</programlisting>
<para>
Set a <link linkend="GtkSourceViewMarkTooltipFunc"><type>GtkSourceViewMarkTooltipFunc</type></link> used to set tooltip on marks from the
given mark <parameter>category</parameter>.
If you also specified a function with
<link linkend="gtk-source-view-set-mark-category-tooltip-markup-func"><function>gtk_source_view_set_mark_category_tooltip_markup_func()</function></link>  the markup 
variant takes precedence.
</para>
<para>
<informalexample><programlisting><![CDATA[
static gchar *
tooltip_func (GtkSourceMark *mark,
              gpointer       user_data)
{
  gchar *text;

  text = get_tooltip_for_mark (mark, user_data);

  return text;
}

...

GtkSourceView *view;

gtk_source_view_set_mark_category_tooltip_func (view, "other-mark",
                                                tooltip_func,
                                                NULL, NULL);
]]></programlisting></informalexample></para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter>&#160;:</term>
<listitem><simpara> a mark category.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceViewMarkTooltipFunc"><type>GtkSourceViewMarkTooltipFunc</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> user data which will be passed to <parameter>func</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data_notify</parameter>&#160;:</term>
<listitem><simpara>a function to free the memory allocated for <parameter>user_data</parameter> 
or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if you do not want to supply such a function.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.8</para></refsect2>
<refsect2 id="gtk-source-view-set-mark-category-tooltip-markup-func" role="function" condition="since:2.8">
<title>gtk_source_view_set_mark_category_tooltip_markup_func ()</title>
<indexterm zone="gtk-source-view-set-mark-category-tooltip-markup-func" role="2.8"><primary sortas="gtk_source_view_set_mark_category_tooltip_markup_func">gtk_source_view_set_mark_category_tooltip_markup_func</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_mark_category_tooltip_markup_func
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         const <link linkend="gchar">gchar</link> *category,
                                                         <link linkend="GtkSourceViewMarkTooltipFunc">GtkSourceViewMarkTooltipFunc</link> markup_func,
                                                         <link linkend="gpointer">gpointer</link> user_data,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> user_data_notify);</programlisting>
<para>
See <link linkend="gtk-source-view-set-mark-category-tooltip-func"><function>gtk_source_view_set_mark_category_tooltip_func()</function></link> for more information.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter>&#160;:</term>
<listitem><simpara> a mark category.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>markup_func</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceViewMarkTooltipFunc"><type>GtkSourceViewMarkTooltipFunc</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara> user data which will be passed to <parameter>func</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data_notify</parameter>&#160;:</term>
<listitem><simpara>a function to free the memory allocated for <parameter>user_data</parameter> 
or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if you do not want to supply such a function.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.8</para></refsect2>
<refsect2 id="gtk-source-view-set-highlight-current-line" role="function">
<title>gtk_source_view_set_highlight_current_line ()</title>
<indexterm zone="gtk-source-view-set-highlight-current-line"><primary sortas="gtk_source_view_set_highlight_current_line">gtk_source_view_set_highlight_current_line</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_highlight_current_line
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gboolean">gboolean</link> show);</programlisting>
<para>
If <parameter>show</parameter> is <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> the current line is highlighted.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>show</parameter>&#160;:</term>
<listitem><simpara> whether to highlight the current line
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-get-highlight-current-line" role="function">
<title>gtk_source_view_get_highlight_current_line ()</title>
<indexterm zone="gtk-source-view-get-highlight-current-line"><primary sortas="gtk_source_view_get_highlight_current_line">gtk_source_view_get_highlight_current_line</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_source_view_get_highlight_current_line
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view);</programlisting>
<para>
Returns whether the current line is highlighted</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the current line is highlighted.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-set-show-line-marks" role="function" condition="since:2.2">
<title>gtk_source_view_set_show_line_marks ()</title>
<indexterm zone="gtk-source-view-set-show-line-marks" role="2.2"><primary sortas="gtk_source_view_set_show_line_marks">gtk_source_view_set_show_line_marks</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_show_line_marks (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gboolean">gboolean</link> show);</programlisting>
<para>
If <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> line marks will be displayed beside the text.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>show</parameter>&#160;:</term>
<listitem><simpara> whether line marks should be displayed.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gtk-source-view-get-show-line-marks" role="function" condition="since:2.2">
<title>gtk_source_view_get_show_line_marks ()</title>
<indexterm zone="gtk-source-view-get-show-line-marks" role="2.2"><primary sortas="gtk_source_view_get_show_line_marks">gtk_source_view_get_show_line_marks</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_source_view_get_show_line_marks (<link linkend="GtkSourceView">GtkSourceView</link> *view);</programlisting>
<para>
Returns whether line marks are displayed beside the text.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the line marks are displayed.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gtk-source-view-set-show-line-numbers" role="function">
<title>gtk_source_view_set_show_line_numbers ()</title>
<indexterm zone="gtk-source-view-set-show-line-numbers"><primary sortas="gtk_source_view_set_show_line_numbers">gtk_source_view_set_show_line_numbers</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_show_line_numbers
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gboolean">gboolean</link> show);</programlisting>
<para>
If <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> line numbers will be displayed beside the text.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>show</parameter>&#160;:</term>
<listitem><simpara> whether line numbers should be displayed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-get-show-line-numbers" role="function">
<title>gtk_source_view_get_show_line_numbers ()</title>
<indexterm zone="gtk-source-view-get-show-line-numbers"><primary sortas="gtk_source_view_get_show_line_numbers">gtk_source_view_get_show_line_numbers</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_source_view_get_show_line_numbers
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view);</programlisting>
<para>
Returns whether line numbers are displayed beside the text.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the line numbers are displayed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-set-show-right-margin" role="function">
<title>gtk_source_view_set_show_right_margin ()</title>
<indexterm zone="gtk-source-view-set-show-right-margin"><primary sortas="gtk_source_view_set_show_right_margin">gtk_source_view_set_show_right_margin</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_show_right_margin
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="gboolean">gboolean</link> show);</programlisting>
<para>
If <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> a right margin is displayed</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>show</parameter>&#160;:</term>
<listitem><simpara> whether to show a right margin.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-get-show-right-margin" role="function">
<title>gtk_source_view_get_show_right_margin ()</title>
<indexterm zone="gtk-source-view-get-show-right-margin"><primary sortas="gtk_source_view_get_show_right_margin">gtk_source_view_get_show_right_margin</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_source_view_get_show_right_margin
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view);</programlisting>
<para>
Returns whether a right margin is displayed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the right margin is shown.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-set-right-margin-position" role="function">
<title>gtk_source_view_set_right_margin_position ()</title>
<indexterm zone="gtk-source-view-set-right-margin-position"><primary sortas="gtk_source_view_set_right_margin_position">gtk_source_view_set_right_margin_position</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_right_margin_position
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="guint">guint</link> pos);</programlisting>
<para>
Sets the position of the right margin in the given <parameter>view</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pos</parameter>&#160;:</term>
<listitem><simpara> the width in characters where to position the right margin.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-get-right-margin-position" role="function">
<title>gtk_source_view_get_right_margin_position ()</title>
<indexterm zone="gtk-source-view-get-right-margin-position"><primary sortas="gtk_source_view_get_right_margin_position">gtk_source_view_get_right_margin_position</primary></indexterm><programlisting><link linkend="guint">guint</link>               gtk_source_view_get_right_margin_position
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view);</programlisting>
<para>
Gets the position of the right margin in the given <parameter>view</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the position of the right margin.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-set-tab-width" role="function">
<title>gtk_source_view_set_tab_width ()</title>
<indexterm zone="gtk-source-view-set-tab-width"><primary sortas="gtk_source_view_set_tab_width">gtk_source_view_set_tab_width</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_tab_width       (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="guint">guint</link> width);</programlisting>
<para>
Sets the width of tabulation in characters.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&#160;:</term>
<listitem><simpara> width of tab in characters.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-get-tab-width" role="function">
<title>gtk_source_view_get_tab_width ()</title>
<indexterm zone="gtk-source-view-get-tab-width"><primary sortas="gtk_source_view_get_tab_width">gtk_source_view_get_tab_width</primary></indexterm><programlisting><link linkend="guint">guint</link>               gtk_source_view_get_tab_width       (<link linkend="GtkSourceView">GtkSourceView</link> *view);</programlisting>
<para>
Returns the width of tabulation in characters.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> width of tab.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-set-draw-spaces" role="function">
<title>gtk_source_view_set_draw_spaces ()</title>
<indexterm zone="gtk-source-view-set-draw-spaces"><primary sortas="gtk_source_view_set_draw_spaces">gtk_source_view_set_draw_spaces</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_source_view_set_draw_spaces     (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="GtkSourceDrawSpacesFlags">GtkSourceDrawSpacesFlags</link> flags);</programlisting>
<para>
Set if and how the spaces should be visualized. Specifying <parameter>flags</parameter> as 0 will
disable display of spaces.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> <link linkend="GtkSourceDrawSpacesFlags"><type>GtkSourceDrawSpacesFlags</type></link> specifing how white spaces should
be displayed
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-get-draw-spaces" role="function">
<title>gtk_source_view_get_draw_spaces ()</title>
<indexterm zone="gtk-source-view-get-draw-spaces"><primary sortas="gtk_source_view_get_draw_spaces">gtk_source_view_get_draw_spaces</primary></indexterm><programlisting><link linkend="GtkSourceDrawSpacesFlags">GtkSourceDrawSpacesFlags</link>  gtk_source_view_get_draw_spaces
                                                        (<link linkend="GtkSourceView">GtkSourceView</link> *view);</programlisting>
<para>
Returns the <link linkend="GtkSourceDrawSpacesFlags"><type>GtkSourceDrawSpacesFlags</type></link> specifying if and how spaces
should be displayed for this <parameter>view</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GtkSourceDrawSpacesFlags"><type>GtkSourceDrawSpacesFlags</type></link>, 0 if no spaces should be drawn.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-source-view-get-gutter" role="function" condition="since:2.8">
<title>gtk_source_view_get_gutter ()</title>
<indexterm zone="gtk-source-view-get-gutter" role="2.8"><primary sortas="gtk_source_view_get_gutter">gtk_source_view_get_gutter</primary></indexterm><programlisting><link linkend="GtkSourceGutter">GtkSourceGutter</link> *   gtk_source_view_get_gutter          (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                         <link linkend="GtkTextWindowType">GtkTextWindowType</link> window_type);</programlisting>
<para>
Returns the <link linkend="GtkSourceGutter"><type>GtkSourceGutter</type></link> object associated with <parameter>window_type</parameter> for <parameter>view</parameter>.
Only GTK_TEXT_WINDOW_LEFT and GTK_TEXT_WINDOW_RIGHT are supported, 
respectively corresponding to the left and right gutter. The line numbers
and mark category icons are rendered in the gutter corresponding to
GTK_TEXT_WINDOW_LEFT.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceView"><type>GtkSourceView</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>window_type</parameter>&#160;:</term>
<listitem><simpara> the gutter window type
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GtkSourceGutter"><type>GtkSourceGutter</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.8</para></refsect2>

</refsect1>
<refsect1 id="GtkSourceView.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkSourceView--auto-indent" role="property"><title>The <literal>&quot;auto-indent&quot;</literal> property</title>
<indexterm zone="GtkSourceView--auto-indent"><primary sortas="GtkSourceView:auto-indent">GtkSourceView:auto-indent</primary></indexterm><programlisting>  &quot;auto-indent&quot;              <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>Whether to enable auto indentation.</para><para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkSourceView--draw-spaces" role="property"><title>The <literal>&quot;draw-spaces&quot;</literal> property</title>
<indexterm zone="GtkSourceView--draw-spaces" role="2.4"><primary sortas="GtkSourceView:draw-spaces">GtkSourceView:draw-spaces</primary></indexterm><programlisting>  &quot;draw-spaces&quot;              <link linkend="GtkSourceDrawSpacesFlags">GtkSourceDrawSpacesFlags</link>  : Read / Write</programlisting>
<para>
Set if and how the spaces should be visualized.</para>
<para>
</para><para>Since 2.4</para>
</refsect2>
<refsect2 id="GtkSourceView--highlight-current-line" role="property"><title>The <literal>&quot;highlight-current-line&quot;</literal> property</title>
<indexterm zone="GtkSourceView--highlight-current-line"><primary sortas="GtkSourceView:highlight-current-line">GtkSourceView:highlight-current-line</primary></indexterm><programlisting>  &quot;highlight-current-line&quot;   <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>Whether to highlight the current line.</para><para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkSourceView--indent-on-tab" role="property"><title>The <literal>&quot;indent-on-tab&quot;</literal> property</title>
<indexterm zone="GtkSourceView--indent-on-tab"><primary sortas="GtkSourceView:indent-on-tab">GtkSourceView:indent-on-tab</primary></indexterm><programlisting>  &quot;indent-on-tab&quot;            <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>Whether to indent the selected text when the tab key is pressed.</para><para>Default value: TRUE</para>
</refsect2>
<refsect2 id="GtkSourceView--indent-width" role="property"><title>The <literal>&quot;indent-width&quot;</literal> property</title>
<indexterm zone="GtkSourceView--indent-width"><primary sortas="GtkSourceView:indent-width">GtkSourceView:indent-width</primary></indexterm><programlisting>  &quot;indent-width&quot;             <link linkend="gint">gint</link>                  : Read / Write</programlisting>
<para>
Width of an indentation step expressed in number of spaces.</para>
<para>
</para><para>Allowed values: [-1,32]</para>
<para>Default value: -1</para>
</refsect2>
<refsect2 id="GtkSourceView--insert-spaces-instead-of-tabs" role="property"><title>The <literal>&quot;insert-spaces-instead-of-tabs&quot;</literal> property</title>
<indexterm zone="GtkSourceView--insert-spaces-instead-of-tabs"><primary sortas="GtkSourceView:insert-spaces-instead-of-tabs">GtkSourceView:insert-spaces-instead-of-tabs</primary></indexterm><programlisting>  &quot;insert-spaces-instead-of-tabs&quot; <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>Whether to insert spaces instead of tabs.</para><para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkSourceView--right-margin-position" role="property"><title>The <literal>&quot;right-margin-position&quot;</literal> property</title>
<indexterm zone="GtkSourceView--right-margin-position"><primary sortas="GtkSourceView:right-margin-position">GtkSourceView:right-margin-position</primary></indexterm><programlisting>  &quot;right-margin-position&quot;    <link linkend="guint">guint</link>                 : Read / Write</programlisting>
<para>
Position of the right margin.</para>
<para>
</para><para>Allowed values: [1,200]</para>
<para>Default value: 80</para>
</refsect2>
<refsect2 id="GtkSourceView--show-line-marks" role="property"><title>The <literal>&quot;show-line-marks&quot;</literal> property</title>
<indexterm zone="GtkSourceView--show-line-marks"><primary sortas="GtkSourceView:show-line-marks">GtkSourceView:show-line-marks</primary></indexterm><programlisting>  &quot;show-line-marks&quot;          <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>
Whether to display line mark pixbufs</para>
<para>
</para><para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkSourceView--show-line-numbers" role="property"><title>The <literal>&quot;show-line-numbers&quot;</literal> property</title>
<indexterm zone="GtkSourceView--show-line-numbers"><primary sortas="GtkSourceView:show-line-numbers">GtkSourceView:show-line-numbers</primary></indexterm><programlisting>  &quot;show-line-numbers&quot;        <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>
Whether to display line numbers</para>
<para>
</para><para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkSourceView--show-right-margin" role="property"><title>The <literal>&quot;show-right-margin&quot;</literal> property</title>
<indexterm zone="GtkSourceView--show-right-margin"><primary sortas="GtkSourceView:show-right-margin">GtkSourceView:show-right-margin</primary></indexterm><programlisting>  &quot;show-right-margin&quot;        <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>
Whether to display the right margin.</para>
<para>
</para><para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkSourceView--smart-home-end" role="property"><title>The <literal>&quot;smart-home-end&quot;</literal> property</title>
<indexterm zone="GtkSourceView--smart-home-end" role="2.0"><primary sortas="GtkSourceView:smart-home-end">GtkSourceView:smart-home-end</primary></indexterm><programlisting>  &quot;smart-home-end&quot;           <link linkend="GtkSourceSmartHomeEndType">GtkSourceSmartHomeEndType</link>  : Read / Write</programlisting>
<para>
Set the behavior of the HOME and END keys.</para>
<para>
</para><para>Default value: GTK_SOURCE_SMART_HOME_END_DISABLED</para>
<para>Since 2.0</para>
</refsect2>
<refsect2 id="GtkSourceView--tab-width" role="property"><title>The <literal>&quot;tab-width&quot;</literal> property</title>
<indexterm zone="GtkSourceView--tab-width"><primary sortas="GtkSourceView:tab-width">GtkSourceView:tab-width</primary></indexterm><programlisting>  &quot;tab-width&quot;                <link linkend="guint">guint</link>                 : Read / Write</programlisting>
<para>
Width of an tab character expressed in number of spaces.</para>
<para>
</para><para>Allowed values: [1,32]</para>
<para>Default value: 8</para>
</refsect2>
</refsect1>

<refsect1 id="GtkSourceView.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkSourceView-line-mark-activated" role="signal"><title>The <literal>&quot;line-mark-activated&quot;</literal> signal</title>
<indexterm zone="GtkSourceView-line-mark-activated"><primary sortas="GtkSourceView::line-mark-activated">GtkSourceView::line-mark-activated</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkSourceView">GtkSourceView</link> *view,
                                                        <link linkend="GtkTextIter">GtkTextIter</link>   *iter,
                                                        <link linkend="gpointer">gpointer</link>       event,
                                                        <link linkend="gpointer">gpointer</link>       user_data)      : Run Last</programlisting>
<para>
Emitted when a line mark has been activated (for instance when there
was a button press in the line marks gutter). You can use <parameter>iter</parameter> to
determine on which line the activation took place.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>view</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="GtkSourceView"><type>GtkSourceView</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>iter</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkTextIter"><type>GtkTextIter</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>event</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="GdkEvent"><type>GdkEvent</type></link> that activated the event
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GtkSourceView-redo" role="signal"><title>The <literal>&quot;redo&quot;</literal> signal</title>
<indexterm zone="GtkSourceView-redo"><primary sortas="GtkSourceView::redo">GtkSourceView::redo</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkSourceView">GtkSourceView</link> *sourceview,
                                                        <link linkend="gpointer">gpointer</link>       user_data)       : Run Last / Action</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>sourceview</parameter>&#160;:</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GtkSourceView-undo" role="signal"><title>The <literal>&quot;undo&quot;</literal> signal</title>
<indexterm zone="GtkSourceView-undo"><primary sortas="GtkSourceView::undo">GtkSourceView::undo</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkSourceView">GtkSourceView</link> *sourceview,
                                                        <link linkend="gpointer">gpointer</link>       user_data)       : Run Last / Action</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>sourceview</parameter>&#160;:</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>



</refentry>
