pygtksourceview r87 - in trunk: . docs/reference
- From: gianmt svn gnome org
- To: svn-commits-list gnome org
- Subject: pygtksourceview r87 - in trunk: . docs/reference
- Date: Sun, 10 Aug 2008 19:06:22 +0000 (UTC)
Author: gianmt
Date: Sun Aug 10 19:06:22 2008
New Revision: 87
URL: http://svn.gnome.org/viewvc/pygtksourceview?rev=87&view=rev
Log:
Wrap new API and update docs
Modified:
trunk/ChangeLog
trunk/docs/reference/gtksourceview2-gtksourcelanguagesmanager.xml
trunk/docs/reference/gtksourceview2-gtksourceview.xml
trunk/gtksourceview2.defs
trunk/gtksourceview2.override
Modified: trunk/docs/reference/gtksourceview2-gtksourcelanguagesmanager.xml
==============================================================================
--- trunk/docs/reference/gtksourceview2-gtksourcelanguagesmanager.xml (original)
+++ trunk/docs/reference/gtksourceview2-gtksourcelanguagesmanager.xml Sun Aug 10 19:06:22 2008
@@ -13,7 +13,7 @@
<refsect1>
<title>Synopsis</title>
-
+
<classsynopsis language="python">
<ooclass><classname>gtksourceview2.LanguageManager</classname></ooclass>
<ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
@@ -21,23 +21,29 @@
<constructorsynopsis language="python">
<methodname><link linkend="constructor-gtksourcelanguagemanager2">gtksourceview2.LanguageManager</link></methodname>
<methodparam></methodparam>
- </constructorsynopsis>
+ </constructorsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourcelanguagemanager2--get-language">get_language</link></methodname>
<methodparam><parameter role="keyword">id</parameter></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourcelanguagemanager2--get-language-ids">get_language_ids</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourcelanguagemanager2--get-search-path">get_search_path</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
-
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtksourcelanguagemanager2--guess-language">guess_language</link></methodname>
+ <methodparam><parameter role="keyword">filename</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">content_type</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourcelanguagemanager2--set-search-path">set_search_path</link></methodname>
<methodparam></methodparam>
@@ -85,13 +91,13 @@
<entry>Read</entry>
<entry>List of the ids of the available languages.</entry>
</row>
-
+
<row valign="top">
<entry>"search-path"</entry>
<entry>Read-Write</entry>
<entry>List of directories where the language specification files (.lang) are located.</entry>
</row>
-
+
</tbody>
</tgroup>
</informaltable>
@@ -123,7 +129,7 @@
<methodname>gtksourceview2.LanguageManager</methodname>
<methodparam><parameter role="keyword"></parameter></methodparam>
</constructorsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
@@ -149,7 +155,7 @@
<methodname>get_language</methodname>
<methodparam><parameter role="keyword">id</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>id</emphasis> :</term>
@@ -176,7 +182,7 @@
<methodname>get_language_ids</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
@@ -197,7 +203,7 @@
<methodname>get_search_path</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
@@ -210,14 +216,49 @@
gets the list directories where @lm looks for language files.
</para>
</refsect2>
-
+
+ <refsect2 id="method-gtksourcelanguagemanager2--guess-language">
+ <title>gtksourceview2.LanguageManager.guess_language</title>
+ <programlisting><methodsynopsis language="python">
+ <methodname>guess_language</methodname>
+ <methodparam><parameter role="keyword">filename</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter role="keyword">content_type</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>filename</emphasis> :</term>
+ <listitem><simpara>a filename in Glib filename encoding, or
+ <literal>None</literal>.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>content_type</emphasis> :</term>
+ <listitem><simpara>a content type (as in GIO API), or
+ <literal>None</literal>.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>a
+ <link linkend="class-gtksourcelanguage2"><classname>gtksourceview2.Language</classname></link>
+ or <literal>None</literal> if there is no suitable language for given filename
+ and/or content_type.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_search_path</methodname>() method sets the list of directories
+ where the lm looks for language files.
+ If dirs is <literal>None</literal>, the search path is reset to default.
+ </para>
+ </refsect2>
+
<refsect2 id="method-gtksourcelanguagemanager2--set-search-path">
<title>gtksourceview2.LanguageManager.set_search_path</title>
<programlisting><methodsynopsis language="python">
<methodname>set_search_path</methodname>
<methodparam><parameter role="keyword">dirs</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>dirs</emphasis> :</term>
@@ -247,7 +288,7 @@
<methodname>gtksourceview2.language_manager_get_default</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
@@ -260,5 +301,5 @@
<link linkend="class-gtksourcelanguagemanager2"><classname>gtksourceview2.LanguageManager</classname></link> instance.
</para>
</refsect2>
-</refsect1>
+</refsect1>
</refentry>
Modified: trunk/docs/reference/gtksourceview2-gtksourceview.xml
==============================================================================
--- trunk/docs/reference/gtksourceview2-gtksourceview.xml (original)
+++ trunk/docs/reference/gtksourceview2-gtksourceview.xml Sun Aug 10 19:06:22 2008
@@ -27,129 +27,150 @@
<methodname><link linkend="method-gtksourceview2--get-auto-indent">get_auto_indent</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
-
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtksourceview2--get-draw-spaces">get_draw_spaces</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--get-highlight-current-line">get_highlight_current_line</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--get-indent-on-tab">get_indent_on_tab</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--get-indent-width">get_indent_width</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--get-insert-spaces-instead-of-tabs">get_insert_spaces_instead_of_tabs</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
-
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtksourceview2--get-mark-category-background">get_mark_category_background</link></methodname>
+ <methodparam><parameter role="keyword">category</parameter></methodparam>
+ </methodsynopsis>
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--get-mark-category-pixbuf">get_mark_category_pixbuf</link></methodname>
<methodparam><parameter role="keyword">category</parameter></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--get-mark-category-priority">get_mark_category_priority</link></methodname>
<methodparam><parameter role="keyword">category</parameter></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--get-right-margin-position">get_right_margin_position</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--get-show-line-marks">get_show_line_marks</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--get-show-line-numbers">get_show_line_numbers</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--get-show-right-margin">get_show_right_margin</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--get-smart-home-end">get_smart_home_end</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--get-tab-width">get_tab_width</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--set-auto-indent">set_auto_indent</link></methodname>
<methodparam><parameter role="keyword">enable</parameter></methodparam>
</methodsynopsis>
-
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtksourceview2--set-draw-spaces">set_draw_spaces</link></methodname>
+ <methodparam><parameter role="keyword">flags</parameter></methodparam>
+ </methodsynopsis>
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--set-highlight-current-line">set_highlight_current_line</link></methodname>
<methodparam><parameter role="keyword">show</parameter></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--set-indent-on-tab">set_indent_on_tab</link></methodname>
<methodparam><parameter role="keyword">enable</parameter></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--set-indent-width">set_indent_width</link></methodname>
<methodparam><parameter role="keyword">width</parameter></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--set-insert-spaces-instead-of-tabs">set_insert_spaces_instead_of_tabs</link></methodname>
<methodparam><parameter role="keyword">enable</parameter></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--set-mark-category-pixbuf">set_mark_category_pixbuf</link></methodname>
<methodparam><parameter role="keyword">category</parameter></methodparam>
<methodparam><parameter role="keyword">pixbuf</parameter></methodparam>
</methodsynopsis>
-
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtksourceview2--set-mark-category-background">set_mark_category_background</link></methodname>
+ <methodparam><parameter role="keyword">category</parameter></methodparam>
+ <methodparam><parameter role="keyword">dest</parameter></methodparam>
+ </methodsynopsis>
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--set-mark-category-priority">set_mark_category_priority</link></methodname>
<methodparam><parameter role="keyword">category</parameter></methodparam>
<methodparam><parameter role="keyword">priority</parameter></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--set-right-margin-position">set_right_margin_position</link></methodname>
<methodparam><parameter role="keyword">pos</parameter></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--set-show-line-marks">set_show_line_marks</link></methodname>
<methodparam><parameter role="keyword">show</parameter></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--set-show-line-numbers">set_show_line_numbers</link></methodname>
<methodparam><parameter role="keyword">show</parameter></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--set-show-right-margin">set_show_right_margin</link></methodname>
<methodparam><parameter role="keyword">show</parameter></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--set-smart-home-end">set_smart_home_end</link></methodname>
<methodparam><parameter role="keyword">smart_he</parameter></methodparam>
</methodsynopsis>
-
+
<methodsynopsis language="python">
<methodname><link linkend="method-gtksourceview2--set-tab-width">set_tab_width</link></methodname>
<methodparam><parameter role="keyword">width</parameter></methodparam>
@@ -187,12 +208,12 @@
<colspec column="1" colwidth="1in"/>
<colspec column="2" colwidth="4in"/>
<tbody>
-
+
<row valign="top">
<entry><methodname>do_redo</methodname></entry>
<entry>Method that can be overridden to implement a custom redo.</entry>
</row>
-
+
<row valign="top">
<entry><methodname>do_undo</methodname></entry>
<entry>Method that can be overridden to implement a custom undo.</entry>
@@ -224,61 +245,61 @@
<entry>Read-Write</entry>
<entry>If <literal>True</literal> enable auto indentation. Default value: False.</entry>
</row>
-
+
<row valign="top">
<entry>"highlight-current-line"</entry>
<entry>Read-Write</entry>
<entry>Whether to highlight the current line. Default value: False.</entry>
</row>
-
+
<row valign="top">
<entry>"indent-on-tab"</entry>
<entry>Read-Write</entry>
<entry>Whether to indent the selected text when the tab key is pressed. Default value: True.</entry>
</row>
-
+
<row valign="top">
<entry>"indent-width"</entry>
<entry>Read-Write</entry>
<entry>Width of an indentation step expressed in number of spaces. Allowed values: [-1,32]. Default value: -1.</entry>
</row>
-
+
<row valign="top">
<entry>"insert-spaces-instead-of-tabs"</entry>
<entry>Read-Write</entry>
<entry>If <literal>True</literal> spaces will be inserted instead of tabs. Default value: False</entry>
</row>
-
+
<row valign="top">
<entry>"right-margin-position"</entry>
<entry>Read-Write</entry>
<entry>Position of the right margin. Allowed values: [1,200]. Default value: 80</entry>
</row>
-
+
<row valign="top">
<entry>"show-line-marks"</entry>
<entry>Read-Write</entry>
<entry>If <literal>True</literal>, the display line marks pixbufs will be shown. Default value: False.</entry>
</row>
-
+
<row valign="top">
<entry>"show-line-numbers"</entry>
<entry>Read-Write</entry>
<entry>If <literal>True</literal>, the line numbers will be shown. Default value: False.</entry>
</row>
-
+
<row valign="top">
<entry>"show-right-margin"</entry>
<entry>Read-Write</entry>
<entry>If <literal>True</literal>, the right margin will be shown. Default value: False.</entry>
</row>
-
+
<row valign="top">
<entry>"smart-home-end"</entry>
<entry>Read-Write</entry>
<entry>Set the behavior of the <keycap>HOME</keycap> and <keycap>END</keycap> keys. Default value: gtksourceview2.SMART_HOME_END_DISABLED.</entry>
</row>
-
+
<row valign="top">
<entry>"tabs-width"</entry>
<entry>Read-Write</entry>
@@ -385,11 +406,11 @@
<methodname>get_auto_indent</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
- <listitem><simpara><literal>True</literal> if auto indentation is enabled,
+ <listitem><simpara><literal>True</literal> if auto indentation is enabled,
<literal>False</literal> otherwise.</simpara></listitem>
</varlistentry>
</variablelist>
@@ -400,6 +421,29 @@
</para>
</refsect2>
+ <refsect2 id="method-gtksourceview2--get-draw-spaces">
+ <title>gtksourceview2.View.get_draw_spaces</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_draw_spaces</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>One of gtksourceview2.DRAW_SPACES_SPACE, gtksourceview2.DRAW_SPACES_TAB
+ gtksourceview2.DRAW_SPACES_NEWLINE or gtksourceview2.DRAW_SPACES_ALL.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_draw_spaces</methodname>() method returns one of the flags
+ specifying if and how spaces should be displayed for this view.
+ </para>
+ </refsect2>
+
+
<refsect2 id="method-gtksourceview2--get-highlight-current-line">
<title>gtksourceview2.View.get_highlight_current_line</title>
@@ -407,11 +451,11 @@
<methodname>get_highlight_current_line</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
- <listitem><simpara><literal>True</literal> if the current line is highlighted,
+ <listitem><simpara><literal>True</literal> if the current line is highlighted,
<literal>False</literal> otherwise.</simpara></listitem>
</varlistentry>
</variablelist>
@@ -429,7 +473,7 @@
<methodname>get_indent_on_tab</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
@@ -452,7 +496,7 @@
<methodname>get_indent_width</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
@@ -475,7 +519,7 @@
<methodname>get_insert_spaces_instead_of_tabs</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
@@ -491,6 +535,32 @@
</para>
</refsect2>
+ <refsect2 id="method-gtksourceview2--get-mark-category-background">
+ <title>gtksourceview2.View.get_mark_category_background</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_mark_category_background</methodname>
+ <methodparam><parameter role="keyword">category</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">category</parameter> :</term>
+ <listitem><simpara>a marker category.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>a <link linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link>
+ if found, or <literal>None</literal> if not found.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_marker_category_pixbuf</methodname>() method gets the pixbuf which
+ is associated with the given category.
+ </para>
+ </refsect2>
+
<refsect2 id="method-gtksourceview2--get-mark-category-pixbuf">
<title>gtksourceview2.View.get_mark_category_pixbuf</title>
@@ -498,7 +568,7 @@
<methodname>get_mark_category_pixbuf</methodname>
<methodparam><parameter role="keyword">category</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><parameter role="keyword">category</parameter> :</term>
@@ -516,7 +586,7 @@
is associated with the given category.
</para>
</refsect2>
-
+
<refsect2 id="method-gtksourceview2--get-mark-category-priority">
<title>gtksourceview2.View.get_mark_category_priority</title>
@@ -524,7 +594,7 @@
<methodname>get_mark_category_priority</methodname>
<methodparam><parameter role="keyword">category</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><parameter role="keyword">category</parameter> :</term>
@@ -550,7 +620,7 @@
<methodname>get_right_margin_position</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
@@ -571,7 +641,7 @@
<methodname>get_show_line_marks</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
@@ -593,7 +663,7 @@
<methodname>get_show_line_numbers</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
@@ -615,7 +685,7 @@
<methodname>get_show_right_margin</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
@@ -637,7 +707,7 @@
<methodname>get_smart_home_end</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
@@ -650,7 +720,7 @@
<para>
The <methodname>get_smart_home_end</methodname>() method returns
a value specifying how the cursor will move when <keycap>HOME</keycap>
- and <keycap>END</keycap> keys are pressed.
+ and <keycap>END</keycap> keys are pressed.
</para>
</refsect2>
@@ -661,7 +731,7 @@
<methodname>get_tab_width</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
@@ -682,7 +752,7 @@
<methodname>set_auto_indent</methodname>
<methodparam><parameter role="keyword">enabled</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><parameter role="keyword">enabled</parameter> :</term>
@@ -695,6 +765,29 @@
</para>
</refsect2>
+ <refsect2 id="method-gtksourceview2--set-draw-spaces">
+ <title>gtksourceview2.View.set_draw_spaces</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_draw_spaces</methodname>
+ <methodparam><parameter role="keyword">flags</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">flags</parameter> :</term>
+ <listitem><simpara>one of gtksourceview2.DRAW_SPACES_SPACE, gtksourceview2.DRAW_SPACES_TAB
+ gtksourceview2.DRAW_SPACES_NEWLINE or gtksourceview2.DRAW_SPACES_ALL,
+ specifing how white spaces should be displayed.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_draw_spaces</methodname>() method set if and how the
+ spaces should be visualized. Specifying flags as 0 will disable display of spaces.
+ </para>
+ </refsect2>
+
<refsect2 id="method-gtksourceview2--set-highlight-current-line">
<title>gtksourceview2.View.set_highlight_current_line</title>
@@ -702,7 +795,7 @@
<methodname>set_highlight_current_line</methodname>
<methodparam><parameter role="keyword">show</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><parameter role="keyword">show</parameter> :</term>
@@ -715,7 +808,7 @@
whether to highlight the current line.
</para>
</refsect2>
-
+
<refsect2 id="method-gtksourceview2--set-indent-on-tab">
<title>gtksourceview2.View.set_indent_on_tab</title>
@@ -723,7 +816,7 @@
<methodname>set_indent_on_tab</methodname>
<methodparam><parameter role="keyword">enabled</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><parameter role="keyword">enabled</parameter> :</term>
@@ -746,7 +839,7 @@
<methodname>set_indent_width</methodname>
<methodparam><parameter role="keyword">width</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><parameter role="keyword">width</parameter> :</term>
@@ -768,7 +861,7 @@
<methodname>set_insert_spaces_instead_of_tabs</methodname>
<methodparam><parameter role="keyword">enabled</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><parameter role="keyword">enabled</parameter> :</term>
@@ -782,6 +875,34 @@
</para>
</refsect2>
+ <refsect2 id="method-gtksourceview2--set-mark-category-background">
+ <title>gtksourceview2.View.set_mark_category_background</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_mark_category_background</methodname>
+ <methodparam><parameter role="keyword">category</parameter></methodparam>
+ <methodparam><parameter role="keyword">color</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">category</parameter> :</term>
+ <listitem><simpara>a marker category.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">color</parameter> :</term>
+ <listitem><simpara>a <link linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link>
+ or <literal>None</literal>.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_mark_category_priority</methodname>() method
+ sets given background color for mark category.
+ If color is <literal>None</literal>, the background color is unset.
+ </para>
+ </refsect2>
+
<refsect2 id="method-gtksourceview2--set-mark-category-pixbuf">
<title>gtksourceview2.View.set_mark_category_pixbuf</title>
@@ -790,7 +911,7 @@
<methodparam><parameter role="keyword">category</parameter></methodparam>
<methodparam><parameter role="keyword">pixbuf</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><parameter role="keyword">category</parameter> :</term>
@@ -819,7 +940,7 @@
<methodparam><parameter role="keyword">category</parameter></methodparam>
<methodparam><parameter role="keyword">priority</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><parameter role="keyword">category</parameter> :</term>
@@ -845,7 +966,7 @@
<methodname>set_right_margin_position</methodname>
<methodparam><parameter role="keyword">pos</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><parameter role="keyword">pos</parameter> :</term>
@@ -866,7 +987,7 @@
<methodname>set_show_line_marks</methodname>
<methodparam><parameter role="keyword">show</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><parameter role="keyword">show</parameter> :</term>
@@ -888,7 +1009,7 @@
<methodname>set_show_line_numbers</methodname>
<methodparam><parameter role="keyword">show</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><parameter role="keyword">show</parameter> :</term>
@@ -910,7 +1031,7 @@
<methodname>set_show_right_margin</methodname>
<methodparam><parameter role="keyword">show</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><parameter role="keyword">show</parameter> :</term>
@@ -932,7 +1053,7 @@
<methodname>set_smart_home_end</methodname>
<methodparam><parameter role="keyword">smart_he</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><parameter role="keyword">smart_he</parameter> :</term>
@@ -953,7 +1074,7 @@
<methodname>set_tab_width</methodname>
<methodparam><parameter role="keyword">width</parameter></methodparam>
</methodsynopsis></programlisting>
-
+
<variablelist>
<varlistentry>
<term><parameter role="keyword">width</parameter> :</term>
@@ -973,8 +1094,8 @@
<!-- ****************************** -->
<!-- BEGIN OF GTKSOURCEVIEW SIGNALS -->
-<!-- ****************************** -->
-
+<!-- ****************************** -->
+
<refsect1>
<title>Signals</title>
Modified: trunk/gtksourceview2.defs
==============================================================================
--- trunk/gtksourceview2.defs (original)
+++ trunk/gtksourceview2.defs Sun Aug 10 19:06:22 2008
@@ -429,8 +429,8 @@
(c-name "gtk_source_language_manager_guess_language")
(return-type "GtkSourceLanguage*")
(parameters
- '("const-gchar*" "filename")
- '("const-gchar*" "content_type")
+ '("const-gchar*" "filename" (null-ok) (default "NULL"))
+ '("const-gchar*" "content_type" (null-ok) (default "NULL"))
)
)
@@ -797,7 +797,7 @@
(return-type "none")
(parameters
'("const-gchar*" "category")
- '("const-GdkColor*" "color")
+ '("const-GdkColor*" "color" (null-ok))
)
)
Modified: trunk/gtksourceview2.override
==============================================================================
--- trunk/gtksourceview2.override (original)
+++ trunk/gtksourceview2.override Sun Aug 10 19:06:22 2008
@@ -345,7 +345,7 @@
py_ret = gslist_to_pylist_objs (ret);
return py_ret;
-}
+}
%%
override gtk_source_iter_backward_search kwargs
@@ -436,3 +436,33 @@
Py_INCREF(Py_None);
return Py_None;
}
+
+%%
+override gtk_source_view_get_mark_category_background kwargs
+static PyObject *
+_wrap_gtk_source_view_get_mark_category_background(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "category", NULL };
+ char *category;
+ int ret;
+ GdkColor dest = { 0, 0, 0, 0 };
+
+ if (!PyArg_ParseTupleAndKeywords(args,
+ kwargs,
+ "s:GtkSourceView.get_mark_category_background",
+ kwlist, &category))
+ return NULL;
+
+ ret = gtk_source_view_get_mark_category_background(
+ GTK_SOURCE_VIEW(self->obj),
+ category, &dest);
+
+ if (ret)
+ return pyg_boxed_new(GDK_TYPE_COLOR, &dest, TRUE, TRUE);
+ else {
+ Py_INCREF(Py_None);
+ return(Py_None);
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]