<?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="GtkSourceMark">
<refmeta>
<refentrytitle role="top_of_page" id="GtkSourceMark.top_of_page">GtkSourceMark</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTKSOURCEVIEW-2.0 Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkSourceMark</refname>
<refpurpose>mark object for <link linkend="GtkSourceBuffer"><type>GtkSourceBuffer</type></link></refpurpose>
</refnamediv>

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

<synopsis>

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

                    <link linkend="GtkSourceMark-struct">GtkSourceMark</link>;
<link linkend="GtkSourceMark">GtkSourceMark</link> *     <link linkend="gtk-source-mark-new">gtk_source_mark_new</link>                 (const <link linkend="gchar">gchar</link> *name,
                                                         const <link linkend="gchar">gchar</link> *category);
const <link linkend="gchar">gchar</link> *       <link linkend="gtk-source-mark-get-category">gtk_source_mark_get_category</link>        (<link linkend="GtkSourceMark">GtkSourceMark</link> *mark);
<link linkend="GtkSourceMark">GtkSourceMark</link> *     <link linkend="gtk-source-mark-next">gtk_source_mark_next</link>                (<link linkend="GtkSourceMark">GtkSourceMark</link> *mark,
                                                         const <link linkend="gchar">gchar</link> *category);
<link linkend="GtkSourceMark">GtkSourceMark</link> *     <link linkend="gtk-source-mark-prev">gtk_source_mark_prev</link>                (<link linkend="GtkSourceMark">GtkSourceMark</link> *mark,
                                                         const <link linkend="gchar">gchar</link> *category);
</synopsis>
</refsynopsisdiv>

<refsect1 id="GtkSourceMark.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GtkTextMark">GtkTextMark</link>
         +----GtkSourceMark
</synopsis>
</refsect1>





<refsect1 id="GtkSourceMark.properties" role="properties">
<title role="properties.title">Properties</title>
<synopsis>
  &quot;<link linkend="GtkSourceMark--category">category</link>&quot;                 <link linkend="gchar">gchar</link>*                : Read / Write / Construct Only
</synopsis>
</refsect1>



<refsect1 id="GtkSourceMark.description" role="desc">
<title role="desc.title">Description</title>
<para>
A GtkSourceMark preserves a position in the text where you want to display
additional info. It is based on <link linkend="GtkTextMark"><type>GtkTextMark</type></link> and thus is still valid after the
text has changed though it may change it's position.
</para>
<para>
GtkSourceMarks are organised in categories which you have to set when you create
the mark. Each category can have a pixbuf and a priority associated using
<link linkend="gtk-source-view-set-mark-category-pixbuf"><type>gtk_source_view_set_mark_category_pixbuf</type></link> and
<link linkend="gtk-source-view-set-mark-category-priority"><type>gtk_source_view_set_mark_category_priority</type></link>. The pixbuf will be displayed
in the margin at the line where the mark residents if the
<link linkend="GtkSourceView-show-line-marks"><type>"show-line-marks"</type></link> property is set to TRUE. If there are multiple
marks in the same line, the pixbufs
will be drawn on top of each other. The mark with the highest priority will
be drawn on top.
</para>
</refsect1>

<refsect1 id="GtkSourceMark.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GtkSourceMark-struct" role="struct">
<title>GtkSourceMark</title>
<indexterm zone="GtkSourceMark-struct"><primary sortas="GtkSourceMark">GtkSourceMark</primary></indexterm><programlisting>typedef struct _GtkSourceMark GtkSourceMark;</programlisting>
<para>
</para></refsect2>
<refsect2 id="gtk-source-mark-new" role="function" condition="since:2.2">
<title>gtk_source_mark_new ()</title>
<indexterm zone="gtk-source-mark-new" role="2.2"><primary sortas="gtk_source_mark_new">gtk_source_mark_new</primary></indexterm><programlisting><link linkend="GtkSourceMark">GtkSourceMark</link> *     gtk_source_mark_new                 (const <link linkend="gchar">gchar</link> *name,
                                                         const <link linkend="gchar">gchar</link> *category);</programlisting>
<para>
Creates a text mark. Add it to a buffer using <link linkend="gtk-text-buffer-add-mark"><function>gtk_text_buffer_add_mark()</function></link>. 
If name is NULL, the mark is anonymous; otherwise, the mark can be retrieved
by name using <link linkend="gtk-text-buffer-get-mark"><function>gtk_text_buffer_get_mark()</function></link>.
Normally marks are created using the utility function 
<link linkend="gtk-source-buffer-create-mark"><function>gtk_source_buffer_create_mark()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara> Name of the <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link>, can be NULL when not using a name
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter>&#160;:</term>
<listitem><simpara> is used to classify marks according to common characteristics
(e.g. all the marks representing a bookmark could belong to the "bookmark" 
category, or all the marks representing a compilation error could belong to 
"error" category).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link> that can be added using <link linkend="gtk-text-buffer-add-mark"><function>gtk_text_buffer_add_mark()</function></link>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gtk-source-mark-get-category" role="function" condition="since:2.2">
<title>gtk_source_mark_get_category ()</title>
<indexterm zone="gtk-source-mark-get-category" role="2.2"><primary sortas="gtk_source_mark_get_category">gtk_source_mark_get_category</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link> *       gtk_source_mark_get_category        (<link linkend="GtkSourceMark">GtkSourceMark</link> *mark);</programlisting>
<para>
Returns the mark category</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>mark</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the category of the <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gtk-source-mark-next" role="function" condition="since:2.2">
<title>gtk_source_mark_next ()</title>
<indexterm zone="gtk-source-mark-next" role="2.2"><primary sortas="gtk_source_mark_next">gtk_source_mark_next</primary></indexterm><programlisting><link linkend="GtkSourceMark">GtkSourceMark</link> *     gtk_source_mark_next                (<link linkend="GtkSourceMark">GtkSourceMark</link> *mark,
                                                         const <link linkend="gchar">gchar</link> *category);</programlisting>
<para>
Returns the next <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link> in the buffer or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the mark
was not added to a buffer. If there is no next mark, <link linkend="NULL--CAPS"><literal>NULL</literal></link> will be returned.
</para>
<para>
If <parameter>category</parameter> is <link linkend="NULL--CAPS"><literal>NULL</literal></link>, looks for marks of any category</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>mark</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter>&#160;:</term>
<listitem><simpara> a string specifying the mark category or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the next <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gtk-source-mark-prev" role="function" condition="since:2.2">
<title>gtk_source_mark_prev ()</title>
<indexterm zone="gtk-source-mark-prev" role="2.2"><primary sortas="gtk_source_mark_prev">gtk_source_mark_prev</primary></indexterm><programlisting><link linkend="GtkSourceMark">GtkSourceMark</link> *     gtk_source_mark_prev                (<link linkend="GtkSourceMark">GtkSourceMark</link> *mark,
                                                         const <link linkend="gchar">gchar</link> *category);</programlisting>
<para>
Returns the previous <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link> in the buffer or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the mark
was not added to a buffer. If there is no previous mark, <link linkend="NULL--CAPS"><literal>NULL</literal></link> is returned.
</para>
<para>
If <parameter>category</parameter> is <link linkend="NULL--CAPS"><literal>NULL</literal></link>, looks for marks of any category</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>mark</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>category</parameter>&#160;:</term>
<listitem><simpara> a string specifying the mark category or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the previous <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>

</refsect1>
<refsect1 id="GtkSourceMark.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkSourceMark--category" role="property"><title>The <literal>&quot;category&quot;</literal> property</title>
<indexterm zone="GtkSourceMark--category"><primary sortas="GtkSourceMark:category">GtkSourceMark:category</primary></indexterm><programlisting>  &quot;category&quot;                 <link linkend="gchar">gchar</link>*                : Read / Write / Construct Only</programlisting>
<para>
The category of the <link linkend="GtkSourceMark"><type>GtkSourceMark</type></link>, classified the mark and control
what pixbuf is used and with which priority it is drawn.</para>
<para>
</para><para>Default value: NULL</para>
</refsect2>
</refsect1>



<refsect1 id="GtkSourceMark.see-also">
<title>See Also</title>
<para>
<link linkend="gtk-source-buffer-create-mark"><type>gtk_source_buffer_create_mark</type></link>, <link linkend="gtk-source-view-set-mark-category-pixbuf"><type>gtk_source_view_set_mark_category_pixbuf</type></link>
</para>
</refsect1>

</refentry>
