Imported Upstream version 2.2.4

This commit is contained in:
Ari Pollak
2010-08-11 01:13:56 -04:00
parent 3154facabf
commit c5acc8ae10
5446 changed files with 2386086 additions and 390981 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="GimpAspectPreview">
<refmeta>
<refentrytitle>GimpAspectPreview</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GimpAspectPreview</refname><refpurpose>A widget providing a preview with fixed aspect ratio.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="GimpAspectPreview-struct">GimpAspectPreview</link>;
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-aspect-preview-new">gimp_aspect_preview_new</link> (<link linkend="GimpDrawable">GimpDrawable</link> *drawable,
<link linkend="gboolean">gboolean</link> *toggle);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Object Hierarchy</title>
<synopsis>
<link linkend="GObject">GObject</link>
+----<link linkend="GtkObject">GtkObject</link>
+----<link linkend="GtkWidget">GtkWidget</link>
+----<link linkend="GtkContainer">GtkContainer</link>
+----<link linkend="GtkBox">GtkBox</link>
+----<link linkend="GtkVBox">GtkVBox</link>
+----<link linkend="GimpPreview">GimpPreview</link>
+----GimpAspectPreview
</synopsis>
</refsect1>
<refsect1>
<title>Implemented Interfaces</title>
<para>
GimpAspectPreview implements
<link linkend="AtkImplementorIface">AtkImplementorIface</link>.</para>
</refsect1>
<refsect1>
<title>Description</title>
<para>
A widget providing a preview with fixed aspect ratio.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpAspectPreview-struct"/>GimpAspectPreview</title>
<indexterm><primary>GimpAspectPreview</primary></indexterm><programlisting>typedef struct _GimpAspectPreview GimpAspectPreview;</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="gimp-aspect-preview-new"/>gimp_aspect_preview_new ()</title>
<indexterm><primary>gimp_aspect_preview_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_aspect_preview_new (<link linkend="GimpDrawable">GimpDrawable</link> *drawable,
<link linkend="gboolean">gboolean</link> *toggle);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>toggle</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,288 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpbrush">
<refmeta>
<refentrytitle>gimpbrush</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpbrush</refname><refpurpose>Functions operating on a single brush.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gchar">gchar</link>* <link linkend="gimp-brush-new">gimp_brush_new</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gchar">gchar</link>* <link linkend="gimp-brush-duplicate">gimp_brush_duplicate</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gchar">gchar</link>* <link linkend="gimp-brush-rename">gimp_brush_rename</link> (const <link linkend="gchar">gchar</link> *name,
const <link linkend="gchar">gchar</link> *new_name);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-brush-delete">gimp_brush_delete</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-brush-get-info">gimp_brush_get_info</link> (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *mask_bpp,
<link linkend="gint">gint</link> *color_bpp);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-brush-get-pixels">gimp_brush_get_pixels</link> (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *mask_bpp,
<link linkend="gint">gint</link> *num_mask_bytes,
<link linkend="guint8">guint8</link> **mask_bytes,
<link linkend="gint">gint</link> *color_bpp,
<link linkend="gint">gint</link> *num_color_bytes,
<link linkend="guint8">guint8</link> **color_bytes);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-brush-get-spacing">gimp_brush_get_spacing</link> (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *spacing);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-brush-set-spacing">gimp_brush_set_spacing</link> (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> spacing);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions operating on a single brush.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-brush-new"/>gimp_brush_new ()</title>
<indexterm role="GIMP"><primary>gimp_brush_new</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_brush_new (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Creates a new brush
</para>
<para>
This procedure creates a new, uninitialized brush</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The requested name of the new brush.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The actual new brush name.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-brush-duplicate"/>gimp_brush_duplicate ()</title>
<indexterm role="GIMP"><primary>gimp_brush_duplicate</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_brush_duplicate (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Duplicates a brush
</para>
<para>
This procedure creates an identical brush by a different name</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The brush name.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The name of the brush's copy.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-brush-rename"/>gimp_brush_rename ()</title>
<indexterm role="GIMP"><primary>gimp_brush_rename</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_brush_rename (const <link linkend="gchar">gchar</link> *name,
const <link linkend="gchar">gchar</link> *new_name);</programlisting>
<para>
Rename a brush
</para>
<para>
This procedure renames a brush</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The brush name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new_name</parameter>&nbsp;:</term>
<listitem><simpara> The new name of the brush.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The actual new name of the brush.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-brush-delete"/>gimp_brush_delete ()</title>
<indexterm role="GIMP"><primary>gimp_brush_delete</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_brush_delete (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Deletes a brush
</para>
<para>
This procedure deletes a brush</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The brush name.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-brush-get-info"/>gimp_brush_get_info ()</title>
<indexterm role="GIMP"><primary>gimp_brush_get_info</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_brush_get_info (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *mask_bpp,
<link linkend="gint">gint</link> *color_bpp);</programlisting>
<para>
Retrieve information about the specified brush.
</para>
<para>
This procedure retrieves information about the specified brush. This
includes the brush name, and the brush extents (width and height).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The brush name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> The brush width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> The brush height.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mask_bpp</parameter>&nbsp;:</term>
<listitem><simpara> The brush mask bpp.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color_bpp</parameter>&nbsp;:</term>
<listitem><simpara> The brush color bpp.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-brush-get-pixels"/>gimp_brush_get_pixels ()</title>
<indexterm role="GIMP"><primary>gimp_brush_get_pixels</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_brush_get_pixels (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *mask_bpp,
<link linkend="gint">gint</link> *num_mask_bytes,
<link linkend="guint8">guint8</link> **mask_bytes,
<link linkend="gint">gint</link> *color_bpp,
<link linkend="gint">gint</link> *num_color_bytes,
<link linkend="guint8">guint8</link> **color_bytes);</programlisting>
<para>
Retrieve information about the specified brush.
</para>
<para>
This procedure retrieves information about the specified brush. This
includes the brush extents (width and height) and its pixels data.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The brush name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> The brush width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> The brush height.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mask_bpp</parameter>&nbsp;:</term>
<listitem><simpara> The brush mask bpp.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_mask_bytes</parameter>&nbsp;:</term>
<listitem><simpara> Length of brush mask data.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mask_bytes</parameter>&nbsp;:</term>
<listitem><simpara> The brush mask data.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color_bpp</parameter>&nbsp;:</term>
<listitem><simpara> The brush color bpp.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_color_bytes</parameter>&nbsp;:</term>
<listitem><simpara> Length of brush color data.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color_bytes</parameter>&nbsp;:</term>
<listitem><simpara> The brush color data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-brush-get-spacing"/>gimp_brush_get_spacing ()</title>
<indexterm role="GIMP"><primary>gimp_brush_get_spacing</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_brush_get_spacing (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *spacing);</programlisting>
<para>
Get the brush spacing.
</para>
<para>
This procedure returns the spacing setting for the specified brush.
The return value is an integer between 0 and 1000 which represents
percentage of the maximum of the width and height of the mask.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The brush name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>spacing</parameter>&nbsp;:</term>
<listitem><simpara> The brush spacing.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-brush-set-spacing"/>gimp_brush_set_spacing ()</title>
<indexterm role="GIMP"><primary>gimp_brush_set_spacing</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_brush_set_spacing (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> spacing);</programlisting>
<para>
Set the brush spacing.
</para>
<para>
This procedure modifies the spacing setting for the specified brush.
The value should be a integer between 0 and 1000.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The brush name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>spacing</parameter>&nbsp;:</term>
<listitem><simpara> The brush spacing.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,271 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpbrushes">
<refmeta>
<refentrytitle>gimpbrushes</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpbrushes</refname><refpurpose>Functions for manipulating brushes.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-brushes-refresh">gimp_brushes_refresh</link> (void);
<link linkend="gchar">gchar</link>** <link linkend="gimp-brushes-get-list">gimp_brushes_get_list</link> (const <link linkend="gchar">gchar</link> *filter,
<link linkend="gint">gint</link> *num_brushes);
<link linkend="gchar">gchar</link>* <link linkend="gimp-brushes-get-brush">gimp_brushes_get_brush</link> (<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *spacing);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-brushes-set-brush">gimp_brushes_set_brush</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gdouble">gdouble</link> <link linkend="gimp-brushes-get-opacity">gimp_brushes_get_opacity</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-brushes-set-opacity">gimp_brushes_set_opacity</link> (<link linkend="gdouble">gdouble</link> opacity);
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> <link linkend="gimp-brushes-get-paint-mode">gimp_brushes_get_paint_mode</link>
(void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-brushes-set-paint-mode">gimp_brushes_set_paint_mode</link> (<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode);
<link linkend="gint">gint</link> <link linkend="gimp-brushes-get-spacing">gimp_brushes_get_spacing</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-brushes-set-spacing">gimp_brushes_set_spacing</link> (<link linkend="gint">gint</link> spacing);
<link linkend="gchar">gchar</link>* <link linkend="gimp-brushes-get-brush-data">gimp_brushes_get_brush_data</link> (const <link linkend="gchar">gchar</link> *name,
<link linkend="gdouble">gdouble</link> *opacity,
<link linkend="gint">gint</link> *spacing,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> *paint_mode,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *length,
<link linkend="guint8">guint8</link> **mask_data);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions related to getting and setting brushes.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-brushes-refresh"/>gimp_brushes_refresh ()</title>
<indexterm><primary>gimp_brushes_refresh</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_brushes_refresh (void);</programlisting>
<para>
Refresh current brushes. This function always succeeds.
</para>
<para>
This procedure retrieves all brushes currently in the user's brush
path and updates the brush dialogs accordingly.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brushes-get-list"/>gimp_brushes_get_list ()</title>
<indexterm><primary>gimp_brushes_get_list</primary></indexterm><programlisting><link linkend="gchar">gchar</link>** gimp_brushes_get_list (const <link linkend="gchar">gchar</link> *filter,
<link linkend="gint">gint</link> *num_brushes);</programlisting>
<para>
Retrieve a complete listing of the available brushes.
</para>
<para>
This procedure returns a complete listing of available GIMP brushes.
Each name returned can be used as input to the
'gimp_context_set_brush' procedure.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>filter</parameter>&nbsp;:</term>
<listitem><simpara> An optional regular expression used to filter the list.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_brushes</parameter>&nbsp;:</term>
<listitem><simpara> The number of brushes in the brush list.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The list of brush names.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brushes-get-brush"/>gimp_brushes_get_brush ()</title>
<indexterm role="deprecated"><primary>gimp_brushes_get_brush</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_brushes_get_brush (<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *spacing);</programlisting>
<warning><para><literal>gimp_brushes_get_brush</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-context-get-brush"><function>gimp_context_get_brush()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> The brush width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> The brush height.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>spacing</parameter>&nbsp;:</term>
<listitem><simpara> The brush spacing.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The brush name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brushes-set-brush"/>gimp_brushes_set_brush ()</title>
<indexterm role="deprecated"><primary>gimp_brushes_set_brush</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_brushes_set_brush (const <link linkend="gchar">gchar</link> *name);</programlisting>
<warning><para><literal>gimp_brushes_set_brush</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-context-set-brush"><function>gimp_context_set_brush()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The brush name.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brushes-get-opacity"/>gimp_brushes_get_opacity ()</title>
<indexterm role="deprecated"><primary>gimp_brushes_get_opacity</primary></indexterm><programlisting><link linkend="gdouble">gdouble</link> gimp_brushes_get_opacity (void);</programlisting>
<warning><para><literal>gimp_brushes_get_opacity</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-context-get-opacity"><function>gimp_context_get_opacity()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The brush opacity.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brushes-set-opacity"/>gimp_brushes_set_opacity ()</title>
<indexterm role="deprecated"><primary>gimp_brushes_set_opacity</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_brushes_set_opacity (<link linkend="gdouble">gdouble</link> opacity);</programlisting>
<warning><para><literal>gimp_brushes_set_opacity</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-context-set-opacity"><function>gimp_context_set_opacity()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>opacity</parameter>&nbsp;:</term>
<listitem><simpara> The brush opacity.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brushes-get-paint-mode"/>gimp_brushes_get_paint_mode ()</title>
<indexterm role="deprecated"><primary>gimp_brushes_get_paint_mode</primary></indexterm><programlisting><link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> gimp_brushes_get_paint_mode
(void);</programlisting>
<warning><para><literal>gimp_brushes_get_paint_mode</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure isdeprecated! Use <link linkend="gimp-context-get-paint-mode"><function>gimp_context_get_paint_mode()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The paint mode.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brushes-set-paint-mode"/>gimp_brushes_set_paint_mode ()</title>
<indexterm role="deprecated"><primary>gimp_brushes_set_paint_mode</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_brushes_set_paint_mode (<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode);</programlisting>
<warning><para><literal>gimp_brushes_set_paint_mode</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-context-set-paint-mode"><function>gimp_context_set_paint_mode()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>paint_mode</parameter>&nbsp;:</term>
<listitem><simpara> The paint mode.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brushes-get-spacing"/>gimp_brushes_get_spacing ()</title>
<indexterm role="deprecated"><primary>gimp_brushes_get_spacing</primary></indexterm><programlisting><link linkend="gint">gint</link> gimp_brushes_get_spacing (void);</programlisting>
<warning><para><literal>gimp_brushes_get_spacing</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-brush-get-spacing"><function>gimp_brush_get_spacing()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The brush spacing.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brushes-set-spacing"/>gimp_brushes_set_spacing ()</title>
<indexterm role="deprecated"><primary>gimp_brushes_set_spacing</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_brushes_set_spacing (<link linkend="gint">gint</link> spacing);</programlisting>
<warning><para><literal>gimp_brushes_set_spacing</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-brush-set-spacing"><function>gimp_brush_set_spacing()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spacing</parameter>&nbsp;:</term>
<listitem><simpara> The brush spacing.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brushes-get-brush-data"/>gimp_brushes_get_brush_data ()</title>
<indexterm role="deprecated"><primary>gimp_brushes_get_brush_data</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_brushes_get_brush_data (const <link linkend="gchar">gchar</link> *name,
<link linkend="gdouble">gdouble</link> *opacity,
<link linkend="gint">gint</link> *spacing,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> *paint_mode,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *length,
<link linkend="guint8">guint8</link> **mask_data);</programlisting>
<warning><para><literal>gimp_brushes_get_brush_data</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-brush-get-pixels"><function>gimp_brush_get_pixels()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The brush name (\"\" means current active brush).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opacity</parameter>&nbsp;:</term>
<listitem><simpara> The brush opacity.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>spacing</parameter>&nbsp;:</term>
<listitem><simpara> The brush spacing.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>paint_mode</parameter>&nbsp;:</term>
<listitem><simpara> The paint mode.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> The brush width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> The brush height.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>length</parameter>&nbsp;:</term>
<listitem><simpara> Length of brush mask data.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mask_data</parameter>&nbsp;:</term>
<listitem><simpara> The brush mask data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The brush name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpbrushmenu">
<refmeta>
<refentrytitle>gimpbrushmenu</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpbrushmenu</refname><refpurpose>A widget for selecting brushes.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-brush-select-widget-new">gimp_brush_select_widget_new</link> (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *brush_name,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gint">gint</link> spacing,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
<link linkend="GimpRunBrushCallback">GimpRunBrushCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> <link linkend="gimp-brush-select-widget-close">gimp_brush_select_widget_close</link> (<link linkend="GtkWidget">GtkWidget</link> *widget);
<link linkend="void">void</link> <link linkend="gimp-brush-select-widget-set">gimp_brush_select_widget_set</link> (<link linkend="GtkWidget">GtkWidget</link> *widget,
const <link linkend="gchar">gchar</link> *brush_name,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gint">gint</link> spacing,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
A widget for selecting brushes.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-brush-select-widget-new"/>gimp_brush_select_widget_new ()</title>
<indexterm><primary>gimp_brush_select_widget_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_brush_select_widget_new (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *brush_name,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gint">gint</link> spacing,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
<link linkend="GimpRunBrushCallback">GimpRunBrushCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Creates a new <link linkend="GtkWidget"><type>GtkWidget</type></link> that completely controls the selection of
a <link linkend="GimpBrush"><type>GimpBrush</type></link>. This widget is suitable for placement in a table in
a plug-in dialog.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>title</parameter>&nbsp;:</term>
<listitem><simpara> Title of the dialog to use or <literal>NULL</literal> to use the default title.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>brush_name</parameter>&nbsp;:</term>
<listitem><simpara> Initial brush name or <literal>NULL</literal> to use current selection.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opacity</parameter>&nbsp;:</term>
<listitem><simpara> Initial opacity. -1 means to use current opacity.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>spacing</parameter>&nbsp;:</term>
<listitem><simpara> Initial spacing. -1 means to use current spacing.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>paint_mode</parameter>&nbsp;:</term>
<listitem><simpara> Initial paint mode. -1 means to use current paint mode.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara> A function to call when the selected brush changes.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> A pointer to arbitary data to be used in the call to <parameter>callback</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> A <link linkend="GtkWidget"><type>GtkWidget</type></link> that you can use in your UI.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brush-select-widget-close"/>gimp_brush_select_widget_close ()</title>
<indexterm><primary>gimp_brush_select_widget_close</primary></indexterm><programlisting><link linkend="void">void</link> gimp_brush_select_widget_close (<link linkend="GtkWidget">GtkWidget</link> *widget);</programlisting>
<para>
Closes the popup window associated with <parameter>widget</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>widget</parameter>&nbsp;:</term>
<listitem><simpara> A brush select widget.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brush-select-widget-set"/>gimp_brush_select_widget_set ()</title>
<indexterm><primary>gimp_brush_select_widget_set</primary></indexterm><programlisting><link linkend="void">void</link> gimp_brush_select_widget_set (<link linkend="GtkWidget">GtkWidget</link> *widget,
const <link linkend="gchar">gchar</link> *brush_name,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gint">gint</link> spacing,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode);</programlisting>
<para>
Sets the current brush and other values for the brush select
widget. Calls the callback function if one was supplied in the
call to <link linkend="gimp-brush-select-widget-new"><function>gimp_brush_select_widget_new()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>widget</parameter>&nbsp;:</term>
<listitem><simpara> A brush select widget.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>brush_name</parameter>&nbsp;:</term>
<listitem><simpara> Brush name to set; <literal>NULL</literal> means no change.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opacity</parameter>&nbsp;:</term>
<listitem><simpara> Opacity to set. -1 means no change.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>spacing</parameter>&nbsp;:</term>
<listitem><simpara> Spacing to set. -1 means no change.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>paint_mode</parameter>&nbsp;:</term>
<listitem><simpara> Paint mode to set. -1 means no change.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,258 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpbrushselect">
<refmeta>
<refentrytitle>gimpbrushselect</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpbrushselect</refname><refpurpose>Functions providing a brush selection dialog.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="void">void</link> (<link linkend="GimpRunBrushCallback">*GimpRunBrushCallback</link>) (const <link linkend="gchar">gchar</link> *brush_name,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gint">gint</link> spacing,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height,
const <link linkend="guchar">guchar</link> *mask_data,
<link linkend="gboolean">gboolean</link> dialog_closing,
<link linkend="gpointer">gpointer</link> user_data);
const <link linkend="gchar">gchar</link>* <link linkend="gimp-brush-select-new">gimp_brush_select_new</link> (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *brush_name,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gint">gint</link> spacing,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
<link linkend="GimpRunBrushCallback">GimpRunBrushCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> <link linkend="gimp-brush-select-destroy">gimp_brush_select_destroy</link> (const <link linkend="gchar">gchar</link> *brush_callback);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-brushes-popup">gimp_brushes_popup</link> (const <link linkend="gchar">gchar</link> *brush_callback,
const <link linkend="gchar">gchar</link> *popup_title,
const <link linkend="gchar">gchar</link> *initial_brush,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gint">gint</link> spacing,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-brushes-close-popup">gimp_brushes_close_popup</link> (const <link linkend="gchar">gchar</link> *brush_callback);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-brushes-set-popup">gimp_brushes_set_popup</link> (const <link linkend="gchar">gchar</link> *brush_callback,
const <link linkend="gchar">gchar</link> *brush_name,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gint">gint</link> spacing,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions providing a brush selection dialog.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpRunBrushCallback"/>GimpRunBrushCallback ()</title>
<indexterm><primary>GimpRunBrushCallback</primary></indexterm><programlisting><link linkend="void">void</link> (*GimpRunBrushCallback) (const <link linkend="gchar">gchar</link> *brush_name,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gint">gint</link> spacing,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height,
const <link linkend="guchar">guchar</link> *mask_data,
<link linkend="gboolean">gboolean</link> dialog_closing,
<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>brush_name</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opacity</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>spacing</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>paint_mode</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mask_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dialog_closing</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brush-select-new"/>gimp_brush_select_new ()</title>
<indexterm><primary>gimp_brush_select_new</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gimp_brush_select_new (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *brush_name,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gint">gint</link> spacing,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
<link linkend="GimpRunBrushCallback">GimpRunBrushCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>title</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>brush_name</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opacity</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>spacing</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>paint_mode</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brush-select-destroy"/>gimp_brush_select_destroy ()</title>
<indexterm><primary>gimp_brush_select_destroy</primary></indexterm><programlisting><link linkend="void">void</link> gimp_brush_select_destroy (const <link linkend="gchar">gchar</link> *brush_callback);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>brush_callback</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brushes-popup"/>gimp_brushes_popup ()</title>
<indexterm><primary>gimp_brushes_popup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_brushes_popup (const <link linkend="gchar">gchar</link> *brush_callback,
const <link linkend="gchar">gchar</link> *popup_title,
const <link linkend="gchar">gchar</link> *initial_brush,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gint">gint</link> spacing,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode);</programlisting>
<para>
Invokes the Gimp brush selection.
</para>
<para>
This procedure popups the brush selection dialog.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>brush_callback</parameter>&nbsp;:</term>
<listitem><simpara> The callback PDB proc to call when brush selection is made.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>popup_title</parameter>&nbsp;:</term>
<listitem><simpara> Title to give the brush popup window.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>initial_brush</parameter>&nbsp;:</term>
<listitem><simpara> The name of the brush to set as the first selected.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opacity</parameter>&nbsp;:</term>
<listitem><simpara> The initial opacity of the brush.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>spacing</parameter>&nbsp;:</term>
<listitem><simpara> The initial spacing of the brush (if &lt; 0 then use brush default spacing).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>paint_mode</parameter>&nbsp;:</term>
<listitem><simpara> The initial paint mode.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brushes-close-popup"/>gimp_brushes_close_popup ()</title>
<indexterm><primary>gimp_brushes_close_popup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_brushes_close_popup (const <link linkend="gchar">gchar</link> *brush_callback);</programlisting>
<para>
Popdown the Gimp brush selection.
</para>
<para>
This procedure closes an opened brush selection dialog.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>brush_callback</parameter>&nbsp;:</term>
<listitem><simpara> The name of the callback registered for this popup.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-brushes-set-popup"/>gimp_brushes_set_popup ()</title>
<indexterm><primary>gimp_brushes_set_popup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_brushes_set_popup (const <link linkend="gchar">gchar</link> *brush_callback,
const <link linkend="gchar">gchar</link> *brush_name,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gint">gint</link> spacing,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode);</programlisting>
<para>
Sets the current brush selection in a popup.
</para>
<para>
Sets the current brush selection in a popup.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>brush_callback</parameter>&nbsp;:</term>
<listitem><simpara> The name of the callback registered for this popup.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>brush_name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the brush to set as selected.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opacity</parameter>&nbsp;:</term>
<listitem><simpara> The initial opacity of the brush.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>spacing</parameter>&nbsp;:</term>
<listitem><simpara> The initial spacing of the brush (if &lt; 0 then use brush default spacing).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>paint_mode</parameter>&nbsp;:</term>
<listitem><simpara> The initial paint mode.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,287 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpchannel">
<refmeta>
<refentrytitle>gimpchannel</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpchannel</refname><refpurpose>Functions for manipulating channels.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gint32">gint32</link> <link linkend="gimp-channel-new">gimp_channel_new</link> (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name,
<link linkend="guint">guint</link> width,
<link linkend="guint">guint</link> height,
<link linkend="gdouble">gdouble</link> opacity,
const <link linkend="GimpRGB">GimpRGB</link> *color);
<link linkend="gint32">gint32</link> <link linkend="gimp-channel-copy">gimp_channel_copy</link> (<link linkend="gint32">gint32</link> channel_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-channel-get-show-masked">gimp_channel_get_show_masked</link> (<link linkend="gint32">gint32</link> channel_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-channel-set-show-masked">gimp_channel_set_show_masked</link> (<link linkend="gint32">gint32</link> channel_ID,
<link linkend="gboolean">gboolean</link> show_masked);
<link linkend="gdouble">gdouble</link> <link linkend="gimp-channel-get-opacity">gimp_channel_get_opacity</link> (<link linkend="gint32">gint32</link> channel_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-channel-set-opacity">gimp_channel_set_opacity</link> (<link linkend="gint32">gint32</link> channel_ID,
<link linkend="gdouble">gdouble</link> opacity);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-channel-get-color">gimp_channel_get_color</link> (<link linkend="gint32">gint32</link> channel_ID,
<link linkend="GimpRGB">GimpRGB</link> *color);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-channel-set-color">gimp_channel_set_color</link> (<link linkend="gint32">gint32</link> channel_ID,
const <link linkend="GimpRGB">GimpRGB</link> *color);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-channel-combine-masks">gimp_channel_combine_masks</link> (<link linkend="gint32">gint32</link> channel1_ID,
<link linkend="gint32">gint32</link> channel2_ID,
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
<link linkend="gint">gint</link> offx,
<link linkend="gint">gint</link> offy);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions for manipulating channels.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-channel-new"/>gimp_channel_new ()</title>
<indexterm><primary>gimp_channel_new</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_channel_new (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name,
<link linkend="guint">guint</link> width,
<link linkend="guint">guint</link> height,
<link linkend="gdouble">gdouble</link> opacity,
const <link linkend="GimpRGB">GimpRGB</link> *color);</programlisting>
<para>
Create a new channel.
</para>
<para>
This procedure creates a new channel with the specified width and
height. Name, opacity, and color are also supplied parameters. The
new channel still needs to be added to the image, as this is not
automatic. Add the new channel with the 'gimp_image_add_channel'
command. Other attributes such as channel show masked, should be set
with explicit procedure calls. The channel's contents are undefined
initially.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image to which to add the channel.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The channel name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> The channel width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> The channel height.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opacity</parameter>&nbsp;:</term>
<listitem><simpara> The channel opacity.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
<listitem><simpara> The channel compositing color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The newly created channel.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-channel-copy"/>gimp_channel_copy ()</title>
<indexterm><primary>gimp_channel_copy</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_channel_copy (<link linkend="gint32">gint32</link> channel_ID);</programlisting>
<para>
Copy a channel.
</para>
<para>
This procedure copies the specified channel and returns the copy.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>channel_ID</parameter>&nbsp;:</term>
<listitem><simpara> The channel to copy.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The newly copied channel.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-channel-get-show-masked"/>gimp_channel_get_show_masked ()</title>
<indexterm><primary>gimp_channel_get_show_masked</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_channel_get_show_masked (<link linkend="gint32">gint32</link> channel_ID);</programlisting>
<para>
Get the composite method of the specified channel.
</para>
<para>
This procedure returns the specified channel's composite method. If
it is non-zero, then the channel is composited with the image so
that masked regions are shown. Otherwise, selected regions are
shown.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>channel_ID</parameter>&nbsp;:</term>
<listitem><simpara> The channel.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The channel composite method.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-channel-set-show-masked"/>gimp_channel_set_show_masked ()</title>
<indexterm><primary>gimp_channel_set_show_masked</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_channel_set_show_masked (<link linkend="gint32">gint32</link> channel_ID,
<link linkend="gboolean">gboolean</link> show_masked);</programlisting>
<para>
Set the composite method of the specified channel.
</para>
<para>
This procedure sets the specified channel's composite method. If it
is non-zero, then the channel is composited with the image so that
masked regions are shown. Otherwise, selected regions are shown.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>channel_ID</parameter>&nbsp;:</term>
<listitem><simpara> The channel.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>show_masked</parameter>&nbsp;:</term>
<listitem><simpara> The new channel composite method.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-channel-get-opacity"/>gimp_channel_get_opacity ()</title>
<indexterm><primary>gimp_channel_get_opacity</primary></indexterm><programlisting><link linkend="gdouble">gdouble</link> gimp_channel_get_opacity (<link linkend="gint32">gint32</link> channel_ID);</programlisting>
<para>
Get the opacity of the specified channel.
</para>
<para>
This procedure returns the specified channel's opacity.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>channel_ID</parameter>&nbsp;:</term>
<listitem><simpara> The channel.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The channel opacity.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-channel-set-opacity"/>gimp_channel_set_opacity ()</title>
<indexterm><primary>gimp_channel_set_opacity</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_channel_set_opacity (<link linkend="gint32">gint32</link> channel_ID,
<link linkend="gdouble">gdouble</link> opacity);</programlisting>
<para>
Set the opacity of the specified channel.
</para>
<para>
This procedure sets the specified channel's opacity.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>channel_ID</parameter>&nbsp;:</term>
<listitem><simpara> The channel.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opacity</parameter>&nbsp;:</term>
<listitem><simpara> The new channel opacity.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-channel-get-color"/>gimp_channel_get_color ()</title>
<indexterm><primary>gimp_channel_get_color</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_channel_get_color (<link linkend="gint32">gint32</link> channel_ID,
<link linkend="GimpRGB">GimpRGB</link> *color);</programlisting>
<para>
Get the compositing color of the specified channel.
</para>
<para>
This procedure returns the specified channel's compositing color.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>channel_ID</parameter>&nbsp;:</term>
<listitem><simpara> The channel.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
<listitem><simpara> The channel compositing color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-channel-set-color"/>gimp_channel_set_color ()</title>
<indexterm><primary>gimp_channel_set_color</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_channel_set_color (<link linkend="gint32">gint32</link> channel_ID,
const <link linkend="GimpRGB">GimpRGB</link> *color);</programlisting>
<para>
Set the compositing color of the specified channel.
</para>
<para>
This procedure sets the specified channel's compositing color.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>channel_ID</parameter>&nbsp;:</term>
<listitem><simpara> The channel.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
<listitem><simpara> The new channel compositing color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-channel-combine-masks"/>gimp_channel_combine_masks ()</title>
<indexterm><primary>gimp_channel_combine_masks</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_channel_combine_masks (<link linkend="gint32">gint32</link> channel1_ID,
<link linkend="gint32">gint32</link> channel2_ID,
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
<link linkend="gint">gint</link> offx,
<link linkend="gint">gint</link> offy);</programlisting>
<para>
Combine two channel masks.
</para>
<para>
This procedure combines two channel masks. The result is stored in
the first channel.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>channel1_ID</parameter>&nbsp;:</term>
<listitem><simpara> The channel1.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>channel2_ID</parameter>&nbsp;:</term>
<listitem><simpara> The channel2.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>operation</parameter>&nbsp;:</term>
<listitem><simpara> The selection operation.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offx</parameter>&nbsp;:</term>
<listitem><simpara> x offset between upper left corner of channels: (second - first).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offy</parameter>&nbsp;:</term>
<listitem><simpara> y offset between upper left corner of channels: (second - first).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,583 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpcolor">
<refmeta>
<refentrytitle>gimpcolor</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpcolor</refname><refpurpose>Functions for manipulating color.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-brightness-contrast">gimp_brightness_contrast</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gint">gint</link> brightness,
<link linkend="gint">gint</link> contrast);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-levels">gimp_levels</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpHistogramChannel">GimpHistogramChannel</link> channel,
<link linkend="gint">gint</link> low_input,
<link linkend="gint">gint</link> high_input,
<link linkend="gdouble">gdouble</link> gamma,
<link linkend="gint">gint</link> low_output,
<link linkend="gint">gint</link> high_output);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-levels-auto">gimp_levels_auto</link> (<link linkend="gint32">gint32</link> drawable_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-levels-stretch">gimp_levels_stretch</link> (<link linkend="gint32">gint32</link> drawable_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-posterize">gimp_posterize</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gint">gint</link> levels);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-desaturate">gimp_desaturate</link> (<link linkend="gint32">gint32</link> drawable_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-equalize">gimp_equalize</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gboolean">gboolean</link> mask_only);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-invert">gimp_invert</link> (<link linkend="gint32">gint32</link> drawable_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-curves-spline">gimp_curves_spline</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpHistogramChannel">GimpHistogramChannel</link> channel,
<link linkend="gint">gint</link> num_points,
const <link linkend="guint8">guint8</link> *control_pts);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-curves-explicit">gimp_curves_explicit</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpHistogramChannel">GimpHistogramChannel</link> channel,
<link linkend="gint">gint</link> num_bytes,
const <link linkend="guint8">guint8</link> *curve);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-color-balance">gimp_color_balance</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpTransferMode">GimpTransferMode</link> transfer_mode,
<link linkend="gboolean">gboolean</link> preserve_lum,
<link linkend="gdouble">gdouble</link> cyan_red,
<link linkend="gdouble">gdouble</link> magenta_green,
<link linkend="gdouble">gdouble</link> yellow_blue);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-colorize">gimp_colorize</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gdouble">gdouble</link> hue,
<link linkend="gdouble">gdouble</link> saturation,
<link linkend="gdouble">gdouble</link> lightness);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-histogram">gimp_histogram</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpHistogramChannel">GimpHistogramChannel</link> channel,
<link linkend="gint">gint</link> start_range,
<link linkend="gint">gint</link> end_range,
<link linkend="gdouble">gdouble</link> *mean,
<link linkend="gdouble">gdouble</link> *std_dev,
<link linkend="gdouble">gdouble</link> *median,
<link linkend="gdouble">gdouble</link> *pixels,
<link linkend="gdouble">gdouble</link> *count,
<link linkend="gdouble">gdouble</link> *percentile);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-hue-saturation">gimp_hue_saturation</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpHueRange">GimpHueRange</link> hue_range,
<link linkend="gdouble">gdouble</link> hue_offset,
<link linkend="gdouble">gdouble</link> lightness,
<link linkend="gdouble">gdouble</link> saturation);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-threshold">gimp_threshold</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gint">gint</link> low_threshold,
<link linkend="gint">gint</link> high_threshold);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions for manipulating color, including curves and histograms.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-brightness-contrast"/>gimp_brightness_contrast ()</title>
<indexterm><primary>gimp_brightness_contrast</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_brightness_contrast (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gint">gint</link> brightness,
<link linkend="gint">gint</link> contrast);</programlisting>
<para>
Modify brightness/contrast in the specified drawable.
</para>
<para>
This procedures allows the brightness and contrast of the specified
drawable to be modified. Both 'brightness' and 'contrast' parameters
are defined between -127 and 127.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>brightness</parameter>&nbsp;:</term>
<listitem><simpara> Brightness adjustment.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>contrast</parameter>&nbsp;:</term>
<listitem><simpara> Contrast adjustment.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-levels"/>gimp_levels ()</title>
<indexterm><primary>gimp_levels</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_levels (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpHistogramChannel">GimpHistogramChannel</link> channel,
<link linkend="gint">gint</link> low_input,
<link linkend="gint">gint</link> high_input,
<link linkend="gdouble">gdouble</link> gamma,
<link linkend="gint">gint</link> low_output,
<link linkend="gint">gint</link> high_output);</programlisting>
<para>
Modifies intensity levels in the specified drawable.
</para>
<para>
This tool allows intensity levels in the specified drawable to be
remapped according to a set of parameters. The low/high input levels
specify an initial mapping from the source intensities. The gamma
value determines how intensities between the low and high input
intensities are interpolated. A gamma value of 1.0 results in a
linear interpolation. Higher gamma values result in more high-level
intensities. Lower gamma values result in more low-level
intensities. The low/high output levels constrain the final
intensity mapping--that is, no final intensity will be lower than
the low output level and no final intensity will be higher than the
high output level. This tool is only valid on RGB color and
grayscale images. It will not operate on indexed drawables.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>channel</parameter>&nbsp;:</term>
<listitem><simpara> The channel to modify.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>low_input</parameter>&nbsp;:</term>
<listitem><simpara> Intensity of lowest input.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>high_input</parameter>&nbsp;:</term>
<listitem><simpara> Intensity of highest input.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gamma</parameter>&nbsp;:</term>
<listitem><simpara> Gamma correction factor.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>low_output</parameter>&nbsp;:</term>
<listitem><simpara> Intensity of lowest output.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>high_output</parameter>&nbsp;:</term>
<listitem><simpara> Intensity of highest output.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-levels-auto"/>gimp_levels_auto ()</title>
<indexterm role="deprecated"><primary>gimp_levels_auto</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_levels_auto (<link linkend="gint32">gint32</link> drawable_ID);</programlisting>
<warning><para><literal>gimp_levels_auto</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-levels-stretch"><function>gimp_levels_stretch()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-levels-stretch"/>gimp_levels_stretch ()</title>
<indexterm><primary>gimp_levels_stretch</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_levels_stretch (<link linkend="gint32">gint32</link> drawable_ID);</programlisting>
<para>
Automatically modifies intensity levels in the specified drawable.
</para>
<para>
This procedure allows intensity levels in the specified drawable to
be remapped according to a set of guessed parameters. It is
equivalent to clicking the \"Auto\" button in the Levels tool. This
procedure is only valid on RGB color and grayscale images. It will
not operate on indexed drawables.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-posterize"/>gimp_posterize ()</title>
<indexterm><primary>gimp_posterize</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_posterize (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gint">gint</link> levels);</programlisting>
<para>
Posterize the specified drawable.
</para>
<para>
This procedures reduces the number of shades allows in each
intensity channel to the specified 'levels' parameter.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>levels</parameter>&nbsp;:</term>
<listitem><simpara> Levels of posterization.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-desaturate"/>gimp_desaturate ()</title>
<indexterm><primary>gimp_desaturate</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_desaturate (<link linkend="gint32">gint32</link> drawable_ID);</programlisting>
<para>
Desaturate the contents of the specified drawable.
</para>
<para>
This procedure desaturates the contents of the specified drawable.
This procedure only works on drawables of type RGB color.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-equalize"/>gimp_equalize ()</title>
<indexterm><primary>gimp_equalize</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_equalize (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gboolean">gboolean</link> mask_only);</programlisting>
<para>
Equalize the contents of the specified drawable.
</para>
<para>
This procedure equalizes the contents of the specified drawable.
Each intensity channel is equalizeed independently. The equalized
intensity is given as inten' = (255 - inten). Indexed color
drawables are not valid for this operation. The 'mask_only' option
specifies whether to adjust only the area of the image within the
selection bounds, or the entire image based on the histogram of the
selected area. If there is no selection, the entire image is
adjusted based on the histogram for the entire image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mask_only</parameter>&nbsp;:</term>
<listitem><simpara> Equalization option.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-invert"/>gimp_invert ()</title>
<indexterm><primary>gimp_invert</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_invert (<link linkend="gint32">gint32</link> drawable_ID);</programlisting>
<para>
Invert the contents of the specified drawable.
</para>
<para>
This procedure inverts the contents of the specified drawable. Each
intensity channel is inverted independently. The inverted intensity
is given as inten' = (255 - inten). Indexed color drawables are not
valid for this operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-curves-spline"/>gimp_curves_spline ()</title>
<indexterm><primary>gimp_curves_spline</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_curves_spline (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpHistogramChannel">GimpHistogramChannel</link> channel,
<link linkend="gint">gint</link> num_points,
const <link linkend="guint8">guint8</link> *control_pts);</programlisting>
<para>
Modifies the intensity curve(s) for specified drawable.
</para>
<para>
Modifies the intensity mapping for one channel in the specified
drawable. The drawable must be either grayscale or RGB, and the
channel can be either an intensity component, or the value. The
'control_pts' parameter is an array of integers which define a set
of control points which describe a Catmull Rom spline which yields
the final intensity curve. Use the 'gimp_curves_explicit' function
to explicitly modify intensity levels.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>channel</parameter>&nbsp;:</term>
<listitem><simpara> The channel to modify.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_points</parameter>&nbsp;:</term>
<listitem><simpara> The number of values in the control point array.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>control_pts</parameter>&nbsp;:</term>
<listitem><simpara> The spline control points: { cp1.x, cp1.y, cp2.x, cp2.y, ... }.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-curves-explicit"/>gimp_curves_explicit ()</title>
<indexterm><primary>gimp_curves_explicit</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_curves_explicit (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpHistogramChannel">GimpHistogramChannel</link> channel,
<link linkend="gint">gint</link> num_bytes,
const <link linkend="guint8">guint8</link> *curve);</programlisting>
<para>
Modifies the intensity curve(s) for specified drawable.
</para>
<para>
Modifies the intensity mapping for one channel in the specified
drawable. The drawable must be either grayscale or RGB, and the
channel can be either an intensity component, or the value. The
'curve' parameter is an array of bytes which explicitly defines how
each pixel value in the drawable will be modified. Use the
'gimp_curves_spline' function to modify intensity levels with
Catmull Rom splines.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>channel</parameter>&nbsp;:</term>
<listitem><simpara> The channel to modify.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_bytes</parameter>&nbsp;:</term>
<listitem><simpara> The number of bytes in the new curve (always 256).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>curve</parameter>&nbsp;:</term>
<listitem><simpara> The explicit curve.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-color-balance"/>gimp_color_balance ()</title>
<indexterm><primary>gimp_color_balance</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_color_balance (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpTransferMode">GimpTransferMode</link> transfer_mode,
<link linkend="gboolean">gboolean</link> preserve_lum,
<link linkend="gdouble">gdouble</link> cyan_red,
<link linkend="gdouble">gdouble</link> magenta_green,
<link linkend="gdouble">gdouble</link> yellow_blue);</programlisting>
<para>
Modify the color balance of the specified drawable.
</para>
<para>
Modify the color balance of the specified drawable. There are three
axis which can be modified: cyan-red, magenta-green, and
yellow-blue. Negative values increase the amount of the former,
positive values increase the amount of the latter. Color balance can
be controlled with the 'transfer_mode' setting, which allows
shadows, midtones, and highlights in an image to be affected
differently. The 'preserve_lum' parameter, if non-zero, ensures that
the luminosity of each pixel remains fixed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>transfer_mode</parameter>&nbsp;:</term>
<listitem><simpara> Transfer mode.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>preserve_lum</parameter>&nbsp;:</term>
<listitem><simpara> Preserve luminosity values at each pixel.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cyan_red</parameter>&nbsp;:</term>
<listitem><simpara> Cyan-Red color balance.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>magenta_green</parameter>&nbsp;:</term>
<listitem><simpara> Magenta-Green color balance.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>yellow_blue</parameter>&nbsp;:</term>
<listitem><simpara> Yellow-Blue color balance.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-colorize"/>gimp_colorize ()</title>
<indexterm role="GIMP"><primary>gimp_colorize</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_colorize (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gdouble">gdouble</link> hue,
<link linkend="gdouble">gdouble</link> saturation,
<link linkend="gdouble">gdouble</link> lightness);</programlisting>
<para>
Render the drawable as a grayscale image seen through a colored
glass.
</para>
<para>
Desatures the drawable, then tints it with the specified color. This
tool is only valid on RGB color images. It will not operate on
grayscale or indexed drawables.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>hue</parameter>&nbsp;:</term>
<listitem><simpara> Hue in degrees.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>saturation</parameter>&nbsp;:</term>
<listitem><simpara> Saturation in percent.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>lightness</parameter>&nbsp;:</term>
<listitem><simpara> Lightness in percent.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-histogram"/>gimp_histogram ()</title>
<indexterm><primary>gimp_histogram</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_histogram (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpHistogramChannel">GimpHistogramChannel</link> channel,
<link linkend="gint">gint</link> start_range,
<link linkend="gint">gint</link> end_range,
<link linkend="gdouble">gdouble</link> *mean,
<link linkend="gdouble">gdouble</link> *std_dev,
<link linkend="gdouble">gdouble</link> *median,
<link linkend="gdouble">gdouble</link> *pixels,
<link linkend="gdouble">gdouble</link> *count,
<link linkend="gdouble">gdouble</link> *percentile);</programlisting>
<para>
Returns information on the intensity histogram for the specified
drawable.
</para>
<para>
This tool makes it possible to gather information about the
intensity histogram of a drawable. A channel to examine is first
specified. This can be either value, red, green, or blue, depending
on whether the drawable is of type color or grayscale. The drawable
may not be indexed. Second, a range of intensities are specified.
The gimp_histogram function returns statistics based on the pixels
in the drawable that fall under this range of values. Mean, standard
deviation, median, number of pixels, and percentile are all
returned. Additionally, the total count of pixels in the image is
returned. Counts of pixels are weighted by any associated alpha
values and by the current selection mask. That is, pixels that lie
outside an active selection mask will not be counted. Similarly,
pixels with transparent alpha values will not be counted.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>channel</parameter>&nbsp;:</term>
<listitem><simpara> The channel to modify.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start_range</parameter>&nbsp;:</term>
<listitem><simpara> Start of the intensity measurement range.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end_range</parameter>&nbsp;:</term>
<listitem><simpara> End of the intensity measurement range.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mean</parameter>&nbsp;:</term>
<listitem><simpara> Mean intensity value.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>std_dev</parameter>&nbsp;:</term>
<listitem><simpara> Standard deviation of intensity values.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>median</parameter>&nbsp;:</term>
<listitem><simpara> Median intensity value.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pixels</parameter>&nbsp;:</term>
<listitem><simpara> Alpha-weighted pixel count for entire image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>count</parameter>&nbsp;:</term>
<listitem><simpara> Alpha-weighted pixel count for range.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>percentile</parameter>&nbsp;:</term>
<listitem><simpara> Percentile that range falls under.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-hue-saturation"/>gimp_hue_saturation ()</title>
<indexterm><primary>gimp_hue_saturation</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_hue_saturation (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpHueRange">GimpHueRange</link> hue_range,
<link linkend="gdouble">gdouble</link> hue_offset,
<link linkend="gdouble">gdouble</link> lightness,
<link linkend="gdouble">gdouble</link> saturation);</programlisting>
<para>
Modify hue, lightness, and saturation in the specified drawable.
</para>
<para>
This procedures allows the hue, lightness, and saturation in the
specified drawable to be modified. The 'hue_range' parameter
provides the capability to limit range of affected hues.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>hue_range</parameter>&nbsp;:</term>
<listitem><simpara> Range of affected hues.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>hue_offset</parameter>&nbsp;:</term>
<listitem><simpara> Hue offset in degrees.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>lightness</parameter>&nbsp;:</term>
<listitem><simpara> lightness modification.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>saturation</parameter>&nbsp;:</term>
<listitem><simpara> saturation modification.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-threshold"/>gimp_threshold ()</title>
<indexterm><primary>gimp_threshold</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_threshold (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gint">gint</link> low_threshold,
<link linkend="gint">gint</link> high_threshold);</programlisting>
<para>
Threshold the specified drawable.
</para>
<para>
This procedures generates a threshold map of the specified drawable.
All pixels between the values of 'low_threshold' and
'high_threshold' are replaced with white, and all other pixels with
black.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>low_threshold</parameter>&nbsp;:</term>
<listitem><simpara> The low threshold value.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>high_threshold</parameter>&nbsp;:</term>
<listitem><simpara> The high threshold value.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,504 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpcontext">
<refmeta>
<refentrytitle>gimpcontext</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpcontext</refname><refpurpose>Functions to manipulate a plug-in's context.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-push">gimp_context_push</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-pop">gimp_context_pop</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-get-foreground">gimp_context_get_foreground</link> (<link linkend="GimpRGB">GimpRGB</link> *foreground);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-foreground">gimp_context_set_foreground</link> (const <link linkend="GimpRGB">GimpRGB</link> *foreground);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-get-background">gimp_context_get_background</link> (<link linkend="GimpRGB">GimpRGB</link> *background);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-background">gimp_context_set_background</link> (const <link linkend="GimpRGB">GimpRGB</link> *background);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-default-colors">gimp_context_set_default_colors</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-swap-colors">gimp_context_swap_colors</link> (void);
<link linkend="gdouble">gdouble</link> <link linkend="gimp-context-get-opacity">gimp_context_get_opacity</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-opacity">gimp_context_set_opacity</link> (<link linkend="gdouble">gdouble</link> opacity);
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> <link linkend="gimp-context-get-paint-mode">gimp_context_get_paint_mode</link>
(void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-paint-mode">gimp_context_set_paint_mode</link> (<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode);
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-brush">gimp_context_get_brush</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-brush">gimp_context_set_brush</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-pattern">gimp_context_get_pattern</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-pattern">gimp_context_set_pattern</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-gradient">gimp_context_get_gradient</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-gradient">gimp_context_set_gradient</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-palette">gimp_context_get_palette</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-palette">gimp_context_set_palette</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gchar">gchar</link>* <link linkend="gimp-context-get-font">gimp_context_get_font</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-context-set-font">gimp_context_set_font</link> (const <link linkend="gchar">gchar</link> *name);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions to manipulate a plug-in's context.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-context-push"/>gimp_context_push ()</title>
<indexterm role="GIMP"><primary>gimp_context_push</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_push (void);</programlisting>
<para>
Pushes a context to the top of the plug-in's context stack.
</para>
<para>
This procedure creates a new context by copying the current context.
This copy becomes the new current context for the calling plug-in
until it is popped again.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-pop"/>gimp_context_pop ()</title>
<indexterm role="GIMP"><primary>gimp_context_pop</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_pop (void);</programlisting>
<para>
Pops the topmost context from the plug-in's context stack.
</para>
<para>
This procedure creates a new context and makes it the current
context for the calling plug-in.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-foreground"/>gimp_context_get_foreground ()</title>
<indexterm role="GIMP"><primary>gimp_context_get_foreground</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_get_foreground (<link linkend="GimpRGB">GimpRGB</link> *foreground);</programlisting>
<para>
Get the current GIMP foreground color.
</para>
<para>
This procedure returns the current GIMP foreground color. The
foreground color is used in a variety of tools such as paint tools,
blending, and bucket fill.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>foreground</parameter>&nbsp;:</term>
<listitem><simpara> The foreground color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-foreground"/>gimp_context_set_foreground ()</title>
<indexterm role="GIMP"><primary>gimp_context_set_foreground</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_foreground (const <link linkend="GimpRGB">GimpRGB</link> *foreground);</programlisting>
<para>
Set the current GIMP foreground color.
</para>
<para>
This procedure sets the current GIMP foreground color. After this is
set, operations which use foreground such as paint tools, blending,
and bucket fill will use the new value.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>foreground</parameter>&nbsp;:</term>
<listitem><simpara> The foreground color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-background"/>gimp_context_get_background ()</title>
<indexterm role="GIMP"><primary>gimp_context_get_background</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_get_background (<link linkend="GimpRGB">GimpRGB</link> *background);</programlisting>
<para>
Get the current GIMP background color.
</para>
<para>
This procedure returns the current GIMP background color. The
background color is used in a variety of tools such as blending,
erasing (with non-alpha images), and image filling.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>background</parameter>&nbsp;:</term>
<listitem><simpara> The background color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-background"/>gimp_context_set_background ()</title>
<indexterm role="GIMP"><primary>gimp_context_set_background</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_background (const <link linkend="GimpRGB">GimpRGB</link> *background);</programlisting>
<para>
Set the current GIMP background color.
</para>
<para>
This procedure sets the current GIMP background color. After this is
set, operations which use background such as blending, filling
images, clearing, and erasing (in non-alpha images) will use the new
value.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>background</parameter>&nbsp;:</term>
<listitem><simpara> The background color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-default-colors"/>gimp_context_set_default_colors ()</title>
<indexterm role="GIMP"><primary>gimp_context_set_default_colors</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_default_colors (void);</programlisting>
<para>
Set the current GIMP foreground and background colors to black and
white.
</para>
<para>
This procedure sets the current GIMP foreground and background
colors to their initial default values, black and white.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-swap-colors"/>gimp_context_swap_colors ()</title>
<indexterm role="GIMP"><primary>gimp_context_swap_colors</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_swap_colors (void);</programlisting>
<para>
Swap the current GIMP foreground and background colors.
</para>
<para>
This procedure swaps the current GIMP foreground and background
colors, so that the new foreground color becomes the old background
color and vice versa.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-opacity"/>gimp_context_get_opacity ()</title>
<indexterm role="GIMP"><primary>gimp_context_get_opacity</primary></indexterm><programlisting><link linkend="gdouble">gdouble</link> gimp_context_get_opacity (void);</programlisting>
<para>
Get the opacity.
</para>
<para>
This procedure returns the opacity setting. The return value is a
floating point number between 0 and 100.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The opacity.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-opacity"/>gimp_context_set_opacity ()</title>
<indexterm role="GIMP"><primary>gimp_context_set_opacity</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_opacity (<link linkend="gdouble">gdouble</link> opacity);</programlisting>
<para>
Set the opacity.
</para>
<para>
This procedure modifies the opacity setting. The value should be a
floating point number between 0 and 100.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>opacity</parameter>&nbsp;:</term>
<listitem><simpara> The opacity.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-paint-mode"/>gimp_context_get_paint_mode ()</title>
<indexterm role="GIMP"><primary>gimp_context_get_paint_mode</primary></indexterm><programlisting><link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> gimp_context_get_paint_mode
(void);</programlisting>
<para>
Get the paint mode.
</para>
<para>
This procedure returns the paint-mode setting. The return value is
an integer which corresponds to the values listed in the argument
description.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The paint mode.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-paint-mode"/>gimp_context_set_paint_mode ()</title>
<indexterm role="GIMP"><primary>gimp_context_set_paint_mode</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_paint_mode (<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode);</programlisting>
<para>
Set the paint mode.
</para>
<para>
This procedure modifies the paint_mode setting.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>paint_mode</parameter>&nbsp;:</term>
<listitem><simpara> The paint mode.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-brush"/>gimp_context_get_brush ()</title>
<indexterm role="GIMP"><primary>gimp_context_get_brush</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_brush (void);</programlisting>
<para>
Retrieve the currently active brush.
</para>
<para>
This procedure returns the nme of the currently active brush. All
paint operations and stroke operations use this brush to control the
application of paint to the image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The name of the active brush.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-brush"/>gimp_context_set_brush ()</title>
<indexterm role="GIMP"><primary>gimp_context_set_brush</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_brush (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Set the specified brush as the active brush.
</para>
<para>
This procedure allows the active brush to be set by specifying its
name. The name is simply a string which corresponds to one of the
names of the installed brushes. If there is no matching brush found,
this procedure will return an error. Otherwise, the specified brush
becomes active and will be used in all subsequent paint operations.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The name o the brush.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-pattern"/>gimp_context_get_pattern ()</title>
<indexterm role="GIMP"><primary>gimp_context_get_pattern</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_pattern (void);</programlisting>
<para>
Retrieve the currently active pattern.
</para>
<para>
This procedure returns name of the the currently active pattern. All
clone and bucket-fill operations with patterns will use this pattern
to control the application of paint to the image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The name of the active pattern.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-pattern"/>gimp_context_set_pattern ()</title>
<indexterm role="GIMP"><primary>gimp_context_set_pattern</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_pattern (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Set the specified pattern as the active pattern.
</para>
<para>
This procedure allows the active pattern to be set by specifying its
name. The name is simply a string which corresponds to one of the
names of the installed patterns. If there is no matching pattern
found, this procedure will return an error. Otherwise, the specified
pattern becomes active and will be used in all subsequent paint
operations.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the pattern.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-gradient"/>gimp_context_get_gradient ()</title>
<indexterm role="GIMP"><primary>gimp_context_get_gradient</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_gradient (void);</programlisting>
<para>
Retrieve the currently active gradient.
</para>
<para>
This procedure returns the name of the currently active gradient.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The name of the active gradient.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-gradient"/>gimp_context_set_gradient ()</title>
<indexterm role="GIMP"><primary>gimp_context_set_gradient</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_gradient (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Sets the specified gradient as the active gradient.
</para>
<para>
This procedure lets you set the specified gradient as the active or
\"current\" one. The name is simply a string which corresponds to
one of the loaded gradients. If no matching gradient is found, this
procedure will return an error. Otherwise, the specified gradient
will become active and will be used for subsequent custom gradient
operations.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the gradient.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-palette"/>gimp_context_get_palette ()</title>
<indexterm role="GIMP"><primary>gimp_context_get_palette</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_palette (void);</programlisting>
<para>
Retrieve the currently active palette.
</para>
<para>
This procedure returns the name of the the currently active palette.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The name of the active palette.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-palette"/>gimp_context_set_palette ()</title>
<indexterm role="GIMP"><primary>gimp_context_set_palette</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_palette (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Set the specified palette as the active palette.
</para>
<para>
This procedure allows the active palette to be set by specifying its
name. The name is simply a string which corresponds to one of the
names of the installed palettes. If no matching palette is found,
this procedure will return an error. Otherwise, the specified
palette becomes active and will be used in all subsequent palette
operations.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the palette.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-get-font"/>gimp_context_get_font ()</title>
<indexterm role="GIMP"><primary>gimp_context_get_font</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_context_get_font (void);</programlisting>
<para>
Retrieve the currently active font.
</para>
<para>
This procedure returns the name of the currently active font.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The name of the active font.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-context-set-font"/>gimp_context_set_font ()</title>
<indexterm role="GIMP"><primary>gimp_context_set_font</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_context_set_font (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Set the specified font as the active font.
</para>
<para>
This procedure allows the active font to be set by specifying its
name. The name is simply a string which corresponds to one of the
names of the installed fonts. If no matching font is found, this
procedure will return an error. Otherwise, the specified font
becomes active and will be used in all subsequent font operations.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the font.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpconvert">
<refmeta>
<refentrytitle>gimpconvert</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpconvert</refname><refpurpose>Conversions between RGB, indexed, and grayscale modes.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-convert-rgb">gimp_image_convert_rgb</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-convert-grayscale">gimp_image_convert_grayscale</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-convert-indexed">gimp_image_convert_indexed</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="GimpConvertDitherType">GimpConvertDitherType</link> dither_type,
<link linkend="GimpConvertPaletteType">GimpConvertPaletteType</link> palette_type,
<link linkend="gint">gint</link> num_cols,
<link linkend="gboolean">gboolean</link> alpha_dither,
<link linkend="gboolean">gboolean</link> remove_unused,
const <link linkend="gchar">gchar</link> *palette);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Conversions between RGB, indexed, and grayscale modes.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-image-convert-rgb"/>gimp_image_convert_rgb ()</title>
<indexterm><primary>gimp_image_convert_rgb</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_convert_rgb (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Convert specified image to RGB color
</para>
<para>
This procedure converts the specified image to RGB color. This
process requires an image of type GIMP_GRAY or GIMP_INDEXED. No
image content is lost in this process aside from the colormap for an
indexed image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-convert-grayscale"/>gimp_image_convert_grayscale ()</title>
<indexterm><primary>gimp_image_convert_grayscale</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_convert_grayscale (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Convert specified image to grayscale (256 intensity levels)
</para>
<para>
This procedure converts the specified image to grayscale with 8 bits
per pixel (256 intensity levels). This process requires an image of
type GIMP_RGB or GIMP_INDEXED.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-convert-indexed"/>gimp_image_convert_indexed ()</title>
<indexterm><primary>gimp_image_convert_indexed</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_convert_indexed (<link linkend="gint32">gint32</link> image_ID,
<link linkend="GimpConvertDitherType">GimpConvertDitherType</link> dither_type,
<link linkend="GimpConvertPaletteType">GimpConvertPaletteType</link> palette_type,
<link linkend="gint">gint</link> num_cols,
<link linkend="gboolean">gboolean</link> alpha_dither,
<link linkend="gboolean">gboolean</link> remove_unused,
const <link linkend="gchar">gchar</link> *palette);</programlisting>
<para>
Convert specified image to and Indexed image
</para>
<para>
This procedure converts the specified image to 'indexed' color. This
process requires an image of type GIMP_GRAY or GIMP_RGB. The
'palette_type' specifies what kind of palette to use, A type of '0'
means to use an optimal palette of 'num_cols' generated from the
colors in the image. A type of '1' means to re-use the previous
palette (not currently implemented). A type of '2' means to use the
so-called WWW-optimized palette. Type '3' means to use only black
and white colors. A type of '4' means to use a palette from the gimp
palettes directories. The 'dither type' specifies what kind of
dithering to use. '0' means no dithering, '1' means standard
Floyd-Steinberg error diffusion, '2' means Floyd-Steinberg error
diffusion with reduced bleeding, '3' means dithering based on pixel
location ('Fixed' dithering).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dither_type</parameter>&nbsp;:</term>
<listitem><simpara> The dither type to use.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>palette_type</parameter>&nbsp;:</term>
<listitem><simpara> The type of palette to use.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_cols</parameter>&nbsp;:</term>
<listitem><simpara> The number of colors to quantize to, ignored unless (palette_type == GIMP_MAKE_PALETTE).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>alpha_dither</parameter>&nbsp;:</term>
<listitem><simpara> Dither transparency to fake partial opacity.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>remove_unused</parameter>&nbsp;:</term>
<listitem><simpara> Remove unused or duplicate colour entries from final palette, ignored if (palette_type == GIMP_MAKE_PALETTE).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>palette</parameter>&nbsp;:</term>
<listitem><simpara> The name of the custom palette to use, ignored unless (palette_type == GIMP_CUSTOM_PALETTE).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpdisplay">
<refmeta>
<refentrytitle>gimpdisplay</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpdisplay</refname><refpurpose>Functions to create, delete and flush new displays (views) on an image.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gint32">gint32</link> <link linkend="gimp-display-new">gimp_display_new</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-display-delete">gimp_display_delete</link> (<link linkend="gint32">gint32</link> display_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-displays-flush">gimp_displays_flush</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-displays-reconnect">gimp_displays_reconnect</link> (<link linkend="gint32">gint32</link> old_image_ID,
<link linkend="gint32">gint32</link> new_image_ID);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions to create, delete and flush new displays (views) on an image.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-display-new"/>gimp_display_new ()</title>
<indexterm><primary>gimp_display_new</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_display_new (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Create a new display for the specified image.
</para>
<para>
Creates a new display for the specified image. If the image already
has a display, another is added. Multiple displays are handled
transparently by the GIMP. The newly created display is returned and
can be subsequently destroyed with a call to 'gimp-display-delete'.
This procedure only makes sense for use with the GIMP UI.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The new display.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-display-delete"/>gimp_display_delete ()</title>
<indexterm><primary>gimp_display_delete</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_display_delete (<link linkend="gint32">gint32</link> display_ID);</programlisting>
<para>
Delete the specified display.
</para>
<para>
This procedure removes the specified display. If this is the last
remaining display for the underlying image, then the image is
deleted also.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>display_ID</parameter>&nbsp;:</term>
<listitem><simpara> The display to delete.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-displays-flush"/>gimp_displays_flush ()</title>
<indexterm><primary>gimp_displays_flush</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_displays_flush (void);</programlisting>
<para>
Flush all internal changes to the user interface
</para>
<para>
This procedure takes no arguments and returns nothing except a
success status. Its purpose is to flush all pending updates of image
manipulations to the user interface. It should be called whenever
appropriate.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-displays-reconnect"/>gimp_displays_reconnect ()</title>
<indexterm><primary>gimp_displays_reconnect</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_displays_reconnect (<link linkend="gint32">gint32</link> old_image_ID,
<link linkend="gint32">gint32</link> new_image_ID);</programlisting>
<para>
Reconnect displays from one image to another image.
</para>
<para>
This procedure connects all displays of the old_image to the
new_image. If the old_image has no display or new_image already has
a display the reconnect is not performed and the procedure returns
without success. You should rarely need to use this function.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>old_image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The old image (must have at least one display).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new_image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The new image (must not have a display).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpdrawablecombobox">
<refmeta>
<refentrytitle>gimpdrawablecombobox</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpdrawablecombobox</refname><refpurpose>A widget providing a popup menu of drawables.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> (<link linkend="GimpDrawableConstraintFunc">*GimpDrawableConstraintFunc</link>) (<link linkend="gint32">gint32</link> image_id,
<link linkend="gint32">gint32</link> drawable_id,
<link linkend="gpointer">gpointer</link> data);
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-drawable-combo-box-new">gimp_drawable_combo_box_new</link> (<link linkend="GimpDrawableConstraintFunc">GimpDrawableConstraintFunc</link> constraint,
<link linkend="gpointer">gpointer</link> data);
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-channel-combo-box-new">gimp_channel_combo_box_new</link> (<link linkend="GimpDrawableConstraintFunc">GimpDrawableConstraintFunc</link> constraint,
<link linkend="gpointer">gpointer</link> data);
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-layer-combo-box-new">gimp_layer_combo_box_new</link> (<link linkend="GimpDrawableConstraintFunc">GimpDrawableConstraintFunc</link> constraint,
<link linkend="gpointer">gpointer</link> data);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
A widget providing a popup menu of drawables.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpDrawableConstraintFunc"/>GimpDrawableConstraintFunc ()</title>
<indexterm><primary>GimpDrawableConstraintFunc</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> (*GimpDrawableConstraintFunc) (<link linkend="gint32">gint32</link> image_id,
<link linkend="gint32">gint32</link> drawable_id,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_id</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>drawable_id</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-drawable-combo-box-new"/>gimp_drawable_combo_box_new ()</title>
<indexterm role="GIMP"><primary>gimp_drawable_combo_box_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_drawable_combo_box_new (<link linkend="GimpDrawableConstraintFunc">GimpDrawableConstraintFunc</link> constraint,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Creates a new <link linkend="GimpIntComboBox"><type>GimpIntComboBox</type></link> filled with all currently opened
drawables. If a <parameter>constraint</parameter> function is specified, it is called for
each drawable and only if the function returns <literal>TRUE</literal>, the drawable
is added to the combobox.
</para>
<para>
You should use <link linkend="gimp-int-combo-box-connect"><function>gimp_int_combo_box_connect()</function></link> to initialize and connect
the combo. Use <link linkend="gimp-int-combo-box-set-active"><function>gimp_int_combo_box_set_active()</function></link> to get the active
drawable ID and <link linkend="gimp-int-combo-box-get-active"><function>gimp_int_combo_box_get_active()</function></link> to retrieve the ID
of the selected drawable.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>constraint</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GimpDrawableConstraintFunc"><type>GimpDrawableConstraintFunc</type></link> or <literal>NULL</literal>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> a pointer that is passed to <parameter>constraint</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="GimpIntComboBox"><type>GimpIntComboBox</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-channel-combo-box-new"/>gimp_channel_combo_box_new ()</title>
<indexterm role="GIMP"><primary>gimp_channel_combo_box_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_channel_combo_box_new (<link linkend="GimpDrawableConstraintFunc">GimpDrawableConstraintFunc</link> constraint,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Creates a new <link linkend="GimpIntComboBox"><type>GimpIntComboBox</type></link> filled with all currently opened
channels. See <link linkend="gimp-drawable-combo-box"><function>gimp_drawable_combo_box()</function></link> for more info.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>constraint</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GimpDrawableConstraintFunc"><type>GimpDrawableConstraintFunc</type></link> or <literal>NULL</literal>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> a pointer that is passed to <parameter>constraint</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="GimpIntComboBox"><type>GimpIntComboBox</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-layer-combo-box-new"/>gimp_layer_combo_box_new ()</title>
<indexterm role="GIMP"><primary>gimp_layer_combo_box_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_layer_combo_box_new (<link linkend="GimpDrawableConstraintFunc">GimpDrawableConstraintFunc</link> constraint,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Creates a new <link linkend="GimpIntComboBox"><type>GimpIntComboBox</type></link> filled with all currently opened
layers. See <link linkend="gimp-drawable-combo-box"><function>gimp_drawable_combo_box()</function></link> for more info.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>constraint</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GimpDrawableConstraintFunc"><type>GimpDrawableConstraintFunc</type></link> or <literal>NULL</literal>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> a pointer that is passed to <parameter>constraint</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="GimpIntComboBox"><type>GimpIntComboBox</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="GimpDrawablePreview">
<refmeta>
<refentrytitle>GimpDrawablePreview</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GimpDrawablePreview</refname><refpurpose>A widget providing a preview of a <link linkend="GimpDrawable"><type>GimpDrawable</type></link>.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="GimpDrawablePreview-struct">GimpDrawablePreview</link>;
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-drawable-preview-new">gimp_drawable_preview_new</link> (<link linkend="GimpDrawable">GimpDrawable</link> *drawable,
<link linkend="gboolean">gboolean</link> *toggle);
<link linkend="GimpDrawable">GimpDrawable</link>* <link linkend="gimp-drawable-preview-get-drawable">gimp_drawable_preview_get_drawable</link>
(<link linkend="GimpDrawablePreview">GimpDrawablePreview</link> *preview);
<link linkend="void">void</link> <link linkend="gimp-drawable-preview-draw-region">gimp_drawable_preview_draw_region</link>
(<link linkend="GimpDrawablePreview">GimpDrawablePreview</link> *preview,
const <link linkend="GimpPixelRgn">GimpPixelRgn</link> *region);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Object Hierarchy</title>
<synopsis>
<link linkend="GObject">GObject</link>
+----<link linkend="GtkObject">GtkObject</link>
+----<link linkend="GtkWidget">GtkWidget</link>
+----<link linkend="GtkContainer">GtkContainer</link>
+----<link linkend="GtkBox">GtkBox</link>
+----<link linkend="GtkVBox">GtkVBox</link>
+----<link linkend="GimpPreview">GimpPreview</link>
+----<link linkend="GimpScrolledPreview">GimpScrolledPreview</link>
+----GimpDrawablePreview
</synopsis>
</refsect1>
<refsect1>
<title>Implemented Interfaces</title>
<para>
GimpDrawablePreview implements
<link linkend="AtkImplementorIface">AtkImplementorIface</link>.</para>
</refsect1>
<refsect1>
<title>Description</title>
<para>
A widget providing a preview of a <link linkend="GimpDrawable"><type>GimpDrawable</type></link>.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpDrawablePreview-struct"/>GimpDrawablePreview</title>
<indexterm><primary>GimpDrawablePreview</primary></indexterm><programlisting>typedef struct _GimpDrawablePreview GimpDrawablePreview;</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="gimp-drawable-preview-new"/>gimp_drawable_preview_new ()</title>
<indexterm role="GIMP"><primary>gimp_drawable_preview_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_drawable_preview_new (<link linkend="GimpDrawable">GimpDrawable</link> *drawable,
<link linkend="gboolean">gboolean</link> *toggle);</programlisting>
<para>
Creates a new <link linkend="GimpDrawablePreview"><type>GimpDrawablePreview</type></link> widget for <parameter>drawable</parameter>. If
updating the preview takes considerable time, you will want to
store the state of the "Preview" check-button in the plug-in
data. For convenience you can pass a pointer to the <link linkend="gboolean"><type>gboolean</type></link> as
<parameter>toggle</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GimpDrawable"><type>GimpDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>toggle</parameter>&nbsp;:</term>
<listitem><simpara> pointer to a <link linkend="gboolean"><type>gboolean</type></link> variable to sync with the "Preview"
check-button or <literal>NULL</literal>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> A pointer to the new <link linkend="GimpDrawablePreview"><type>GimpDrawablePreview</type></link> widget.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-drawable-preview-get-drawable"/>gimp_drawable_preview_get_drawable ()</title>
<indexterm role="GIMP"><primary>gimp_drawable_preview_get_drawable</primary></indexterm><programlisting><link linkend="GimpDrawable">GimpDrawable</link>* gimp_drawable_preview_get_drawable
(<link linkend="GimpDrawablePreview">GimpDrawablePreview</link> *preview);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>preview</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GimpDrawablePreview"><type>GimpDrawablePreview</type></link> widget
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="GimpDrawable"><type>GimpDrawable</type></link> that has been passed to
<link linkend="gimp-drawable-preview-new"><function>gimp_drawable_preview_new()</function></link>.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-drawable-preview-draw-region"/>gimp_drawable_preview_draw_region ()</title>
<indexterm role="GIMP"><primary>gimp_drawable_preview_draw_region</primary></indexterm><programlisting><link linkend="void">void</link> gimp_drawable_preview_draw_region
(<link linkend="GimpDrawablePreview">GimpDrawablePreview</link> *preview,
const <link linkend="GimpPixelRgn">GimpPixelRgn</link> *region);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>preview</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GimpDrawablePreview"><type>GimpDrawablePreview</type></link> widget
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>region</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GimpPixelRgn"><type>GimpPixelRgn</type></link>
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
</refsect1>
</refentry>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,391 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpedit">
<refmeta>
<refentrytitle>gimpedit</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpedit</refname><refpurpose>Edit menu functions (cut, copy, paste, clear, etc.)</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-cut">gimp_edit_cut</link> (<link linkend="gint32">gint32</link> drawable_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-copy">gimp_edit_copy</link> (<link linkend="gint32">gint32</link> drawable_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-copy-visible">gimp_edit_copy_visible</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gint32">gint32</link> <link linkend="gimp-edit-paste">gimp_edit_paste</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gboolean">gboolean</link> paste_into);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-clear">gimp_edit_clear</link> (<link linkend="gint32">gint32</link> drawable_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-fill">gimp_edit_fill</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpFillType">GimpFillType</link> fill_type);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-bucket-fill">gimp_edit_bucket_fill</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpBucketFillMode">GimpBucketFillMode</link> fill_mode,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gdouble">gdouble</link> threshold,
<link linkend="gboolean">gboolean</link> sample_merged,
<link linkend="gdouble">gdouble</link> x,
<link linkend="gdouble">gdouble</link> y);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-blend">gimp_edit_blend</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpBlendMode">GimpBlendMode</link> blend_mode,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
<link linkend="GimpGradientType">GimpGradientType</link> gradient_type,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gdouble">gdouble</link> offset,
<link linkend="GimpRepeatMode">GimpRepeatMode</link> repeat,
<link linkend="gboolean">gboolean</link> reverse,
<link linkend="gboolean">gboolean</link> supersample,
<link linkend="gint">gint</link> max_depth,
<link linkend="gdouble">gdouble</link> threshold,
<link linkend="gboolean">gboolean</link> dither,
<link linkend="gdouble">gdouble</link> x1,
<link linkend="gdouble">gdouble</link> y1,
<link linkend="gdouble">gdouble</link> x2,
<link linkend="gdouble">gdouble</link> y2);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-stroke">gimp_edit_stroke</link> (<link linkend="gint32">gint32</link> drawable_ID);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Edit menu functions (cut, copy, paste, clear, etc.)
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-edit-cut"/>gimp_edit_cut ()</title>
<indexterm><primary>gimp_edit_cut</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_cut (<link linkend="gint32">gint32</link> drawable_ID);</programlisting>
<para>
Cut from the specified drawable.
</para>
<para>
If there is a selection in the image, then the area specified by the
selection is cut from the specified drawable and placed in an
internal GIMP edit buffer. It can subsequently be retrieved using
the 'gimp-edit-paste' command. If there is no selection, then the
specified drawable will be removed and its contents stored in the
internal GIMP edit buffer.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable to cut from.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the cut was successful, FALSE if the selection contained only transparent pixels.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-edit-copy"/>gimp_edit_copy ()</title>
<indexterm><primary>gimp_edit_copy</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_copy (<link linkend="gint32">gint32</link> drawable_ID);</programlisting>
<para>
Copy from the specified drawable.
</para>
<para>
If there is a selection in the image, then the area specified by the
selection is copied from the specified drawable and placed in an
internal GIMP edit buffer. It can subsequently be retrieved using
the 'gimp-edit-paste' command. If there is no selection, then the
specified drawable's contents will be stored in the internal GIMP
edit buffer.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable to copy from.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the copy was successful, FALSE if the selection contained only transparent pixels.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-edit-copy-visible"/>gimp_edit_copy_visible ()</title>
<indexterm role="GIMP"><primary>gimp_edit_copy_visible</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_copy_visible (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Copy from the projection.
</para>
<para>
If there is a selection in the image, then the area specified by the
selection is copied from the projection and placed in an internal
GIMP edit buffer. It can subsequently be retrieved using the
'gimp-edit-paste' command. If there is no selection, then the
projection's contents will be stored in the internal GIMP edit
buffer.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image to copy from.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the copy was successful, FALSE if the selection contained only transparent pixels.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-edit-paste"/>gimp_edit_paste ()</title>
<indexterm><primary>gimp_edit_paste</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_edit_paste (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gboolean">gboolean</link> paste_into);</programlisting>
<para>
Paste buffer to the specified drawable.
</para>
<para>
This procedure pastes a copy of the internal GIMP edit buffer to the
specified drawable. The GIMP edit buffer will be empty unless a call
was previously made to either 'gimp-edit-cut' or 'gimp-edit-copy'.
The \"paste_into\" option specifies whether to clear the current
image selection, or to paste the buffer \"behind\" the selection.
This allows the selection to act as a mask for the pasted buffer.
Anywhere that the selection mask is non-zero, the pasted buffer will
show through. The pasted buffer will be a new layer in the image
which is designated as the image floating selection. If the image
has a floating selection at the time of pasting, the old floating
selection will be anchored to it's drawable before the new floating
selection is added. This procedure returns the new floating layer.
The resulting floating selection will already be attached to the
specified drawable, and a subsequent call to floating_sel_attach is
not needed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable to paste to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>paste_into</parameter>&nbsp;:</term>
<listitem><simpara> Clear selection, or paste behind it?
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The new floating selection.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-edit-clear"/>gimp_edit_clear ()</title>
<indexterm><primary>gimp_edit_clear</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_clear (<link linkend="gint32">gint32</link> drawable_ID);</programlisting>
<para>
Clear selected area of drawable.
</para>
<para>
This procedure clears the specified drawable. If the drawable has an
alpha channel, the cleared pixels will become transparent. If the
drawable does not have an alpha channel, cleared pixels will be set
to the background color. This procedure only affects regions within
a selection if there is a selection active.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable to clear from.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-edit-fill"/>gimp_edit_fill ()</title>
<indexterm><primary>gimp_edit_fill</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_fill (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpFillType">GimpFillType</link> fill_type);</programlisting>
<para>
Fill selected area of drawable.
</para>
<para>
This procedure fills the specified drawable with the fill mode. If
the fill mode is foreground, the current foreground color is used.
If the fill mode is background, the current background color is
used. Other fill modes should not be used. This procedure only
affects regions within a selection if there is a selection active.
If you want to fill the whole drawable, regardless of the selection,
use <link linkend="gimp-drawable-fill"><function>gimp_drawable_fill()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable to fill to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fill_type</parameter>&nbsp;:</term>
<listitem><simpara> The type of fill.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-edit-bucket-fill"/>gimp_edit_bucket_fill ()</title>
<indexterm><primary>gimp_edit_bucket_fill</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_bucket_fill (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpBucketFillMode">GimpBucketFillMode</link> fill_mode,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gdouble">gdouble</link> threshold,
<link linkend="gboolean">gboolean</link> sample_merged,
<link linkend="gdouble">gdouble</link> x,
<link linkend="gdouble">gdouble</link> y);</programlisting>
<para>
Fill the area specified either by the current selection if there is
one, or by a seed fill starting at the specified coordinates.
</para>
<para>
This tool requires information on the paint application mode, and
the fill mode, which can either be in the foreground color, or in
the currently active pattern. If there is no selection, a seed fill
is executed at the specified coordinates and extends outward in
keeping with the threshold parameter. If there is a selection in the
target image, the threshold, sample merged, x, and y arguments are
unused. If the sample_merged parameter is non-zero, the data of the
composite image will be used instead of that for the specified
drawable. This is equivalent to sampling for colors after merging
all visible layers. In the case of merged sampling, the x and y
coordinates are relative to the image's origin; otherwise, they are
relative to the drawable's origin.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The affected drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fill_mode</parameter>&nbsp;:</term>
<listitem><simpara> The type of fill.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>paint_mode</parameter>&nbsp;:</term>
<listitem><simpara> The paint application mode.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opacity</parameter>&nbsp;:</term>
<listitem><simpara> The opacity of the final bucket fill.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>threshold</parameter>&nbsp;:</term>
<listitem><simpara> The threshold determines how extensive the seed fill will be. It's value is specified in terms of intensity levels . This parameter is only valid when there is no selection in the specified image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>sample_merged</parameter>&nbsp;:</term>
<listitem><simpara> Use the composite image, not the drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> The x coordinate of this bucket fill's application. This parameter is only valid when there is no selection in the specified image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> The y coordinate of this bucket fill's application. This parameter is only valid when there is no selection in the specified image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-edit-blend"/>gimp_edit_blend ()</title>
<indexterm><primary>gimp_edit_blend</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_blend (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="GimpBlendMode">GimpBlendMode</link> blend_mode,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
<link linkend="GimpGradientType">GimpGradientType</link> gradient_type,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="gdouble">gdouble</link> offset,
<link linkend="GimpRepeatMode">GimpRepeatMode</link> repeat,
<link linkend="gboolean">gboolean</link> reverse,
<link linkend="gboolean">gboolean</link> supersample,
<link linkend="gint">gint</link> max_depth,
<link linkend="gdouble">gdouble</link> threshold,
<link linkend="gboolean">gboolean</link> dither,
<link linkend="gdouble">gdouble</link> x1,
<link linkend="gdouble">gdouble</link> y1,
<link linkend="gdouble">gdouble</link> x2,
<link linkend="gdouble">gdouble</link> y2);</programlisting>
<para>
Blend between the starting and ending coordinates with the specified
blend mode and gradient type.
</para>
<para>
This tool requires information on the paint application mode, the
blend mode, and the gradient type. It creates the specified variety
of blend using the starting and ending coordinates as defined for
each gradient type.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The affected drawable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>blend_mode</parameter>&nbsp;:</term>
<listitem><simpara> The type of blend.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>paint_mode</parameter>&nbsp;:</term>
<listitem><simpara> The paint application mode.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gradient_type</parameter>&nbsp;:</term>
<listitem><simpara> The type of gradient.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opacity</parameter>&nbsp;:</term>
<listitem><simpara> The opacity of the final blend.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offset</parameter>&nbsp;:</term>
<listitem><simpara> Offset relates to the starting and ending coordinates specified for the blend. This parameter is mode dependent.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>repeat</parameter>&nbsp;:</term>
<listitem><simpara> Repeat mode.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>reverse</parameter>&nbsp;:</term>
<listitem><simpara> Use the reverse gradient.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>supersample</parameter>&nbsp;:</term>
<listitem><simpara> Do adaptive supersampling.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>max_depth</parameter>&nbsp;:</term>
<listitem><simpara> Maximum recursion levels for supersampling.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>threshold</parameter>&nbsp;:</term>
<listitem><simpara> Supersampling threshold.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dither</parameter>&nbsp;:</term>
<listitem><simpara> Use dithering to reduce banding.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x1</parameter>&nbsp;:</term>
<listitem><simpara> The x coordinate of this blend's starting point.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y1</parameter>&nbsp;:</term>
<listitem><simpara> The y coordinate of this blend's starting point.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x2</parameter>&nbsp;:</term>
<listitem><simpara> The x coordinate of this blend's ending point.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y2</parameter>&nbsp;:</term>
<listitem><simpara> The y coordinate of this blend's ending point.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-edit-stroke"/>gimp_edit_stroke ()</title>
<indexterm><primary>gimp_edit_stroke</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_stroke (<link linkend="gint32">gint32</link> drawable_ID);</programlisting>
<para>
Stroke the current selection
</para>
<para>
This procedure strokes the current selection, painting along the
selection boundary with the active brush and foreground color. The
paint is applied to the specified drawable regardless of the active
selection.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable to stroke to.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,525 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpenums">
<refmeta>
<refentrytitle>gimpenums</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpenums</refname><refpurpose>Enums and definitions.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
enum <link linkend="GimpAddMaskType">GimpAddMaskType</link>;
enum <link linkend="GimpBlendMode">GimpBlendMode</link>;
enum <link linkend="GimpBrushApplicationMode">GimpBrushApplicationMode</link>;
enum <link linkend="GimpBucketFillMode">GimpBucketFillMode</link>;
enum <link linkend="GimpChannelOps">GimpChannelOps</link>;
enum <link linkend="GimpChannelType">GimpChannelType</link>;
enum <link linkend="GimpCloneType">GimpCloneType</link>;
enum <link linkend="GimpConvertDitherType">GimpConvertDitherType</link>;
enum <link linkend="GimpConvertPaletteType">GimpConvertPaletteType</link>;
enum <link linkend="GimpConvolutionType">GimpConvolutionType</link>;
enum <link linkend="GimpConvolveType">GimpConvolveType</link>;
enum <link linkend="GimpDodgeBurnType">GimpDodgeBurnType</link>;
enum <link linkend="GimpFillType">GimpFillType</link>;
enum <link linkend="GimpGradientSegmentColor">GimpGradientSegmentColor</link>;
enum <link linkend="GimpGradientSegmentType">GimpGradientSegmentType</link>;
enum <link linkend="GimpGradientType">GimpGradientType</link>;
enum <link linkend="GimpHistogramChannel">GimpHistogramChannel</link>;
enum <link linkend="GimpHueRange">GimpHueRange</link>;
enum <link linkend="GimpIconType">GimpIconType</link>;
enum <link linkend="GimpInterpolationType">GimpInterpolationType</link>;
enum <link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link>;
enum <link linkend="GimpMaskApplyMode">GimpMaskApplyMode</link>;
enum <link linkend="GimpMergeType">GimpMergeType</link>;
enum <link linkend="GimpOffsetType">GimpOffsetType</link>;
enum <link linkend="GimpOrientationType">GimpOrientationType</link>;
enum <link linkend="GimpPaintApplicationMode">GimpPaintApplicationMode</link>;
enum <link linkend="GimpRepeatMode">GimpRepeatMode</link>;
enum <link linkend="GimpRotationType">GimpRotationType</link>;
enum <link linkend="GimpRunMode">GimpRunMode</link>;
enum <link linkend="GimpSizeType">GimpSizeType</link>;
enum <link linkend="GimpTransferMode">GimpTransferMode</link>;
enum <link linkend="GimpTransformDirection">GimpTransformDirection</link>;
const <link linkend="gchar">gchar</link>** <link linkend="gimp-enums-get-type-names">gimp_enums_get_type_names</link> (<link linkend="gint">gint</link> *n_type_names);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Enums and definitions.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpAddMaskType"/>enum GimpAddMaskType</title>
<indexterm><primary>GimpAddMaskType</primary></indexterm><programlisting>typedef enum
{
GIMP_ADD_WHITE_MASK,
GIMP_ADD_BLACK_MASK,
GIMP_ADD_ALPHA_MASK,
GIMP_ADD_ALPHA_TRANSFER_MASK,
GIMP_ADD_SELECTION_MASK,
GIMP_ADD_COPY_MASK
} GimpAddMaskType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpBlendMode"/>enum GimpBlendMode</title>
<indexterm><primary>GimpBlendMode</primary></indexterm><programlisting>typedef enum
{
GIMP_FG_BG_RGB_MODE,
GIMP_FG_BG_HSV_MODE,
GIMP_FG_TRANSPARENT_MODE,
GIMP_CUSTOM_MODE
} GimpBlendMode;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpBrushApplicationMode"/>enum GimpBrushApplicationMode</title>
<indexterm><primary>GimpBrushApplicationMode</primary></indexterm><programlisting>typedef enum
{
GIMP_BRUSH_HARD,
GIMP_BRUSH_SOFT
} GimpBrushApplicationMode;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpBucketFillMode"/>enum GimpBucketFillMode</title>
<indexterm><primary>GimpBucketFillMode</primary></indexterm><programlisting>typedef enum
{
GIMP_FG_BUCKET_FILL,
GIMP_BG_BUCKET_FILL,
GIMP_PATTERN_BUCKET_FILL
} GimpBucketFillMode;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpChannelOps"/>enum GimpChannelOps</title>
<indexterm><primary>GimpChannelOps</primary></indexterm><programlisting>typedef enum
{
GIMP_CHANNEL_OP_ADD,
GIMP_CHANNEL_OP_SUBTRACT,
GIMP_CHANNEL_OP_REPLACE,
GIMP_CHANNEL_OP_INTERSECT
} GimpChannelOps;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpChannelType"/>enum GimpChannelType</title>
<indexterm><primary>GimpChannelType</primary></indexterm><programlisting>typedef enum
{
GIMP_RED_CHANNEL,
GIMP_GREEN_CHANNEL,
GIMP_BLUE_CHANNEL,
GIMP_GRAY_CHANNEL,
GIMP_INDEXED_CHANNEL,
GIMP_ALPHA_CHANNEL
} GimpChannelType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpCloneType"/>enum GimpCloneType</title>
<indexterm><primary>GimpCloneType</primary></indexterm><programlisting>typedef enum
{
GIMP_IMAGE_CLONE,
GIMP_PATTERN_CLONE
} GimpCloneType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpConvertDitherType"/>enum GimpConvertDitherType</title>
<indexterm><primary>GimpConvertDitherType</primary></indexterm><programlisting>typedef enum
{
GIMP_NO_DITHER,
GIMP_FS_DITHER,
GIMP_FSLOWBLEED_DITHER,
GIMP_FIXED_DITHER
} GimpConvertDitherType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpConvertPaletteType"/>enum GimpConvertPaletteType</title>
<indexterm><primary>GimpConvertPaletteType</primary></indexterm><programlisting>typedef enum
{
GIMP_MAKE_PALETTE,
GIMP_REUSE_PALETTE,
GIMP_WEB_PALETTE,
GIMP_MONO_PALETTE,
GIMP_CUSTOM_PALETTE
} GimpConvertPaletteType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpConvolutionType"/>enum GimpConvolutionType</title>
<indexterm><primary>GimpConvolutionType</primary></indexterm><programlisting>typedef enum
{
GIMP_NORMAL_CONVOL,
GIMP_ABSOLUTE_CONVOL,
GIMP_NEGATIVE_CONVOL
} GimpConvolutionType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpConvolveType"/>enum GimpConvolveType</title>
<indexterm><primary>GimpConvolveType</primary></indexterm><programlisting>typedef enum
{
GIMP_BLUR_CONVOLVE,
GIMP_SHARPEN_CONVOLVE
} GimpConvolveType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpDodgeBurnType"/>enum GimpDodgeBurnType</title>
<indexterm><primary>GimpDodgeBurnType</primary></indexterm><programlisting>typedef enum
{
GIMP_DODGE,
GIMP_BURN
} GimpDodgeBurnType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpFillType"/>enum GimpFillType</title>
<indexterm><primary>GimpFillType</primary></indexterm><programlisting>typedef enum
{
GIMP_FOREGROUND_FILL,
GIMP_BACKGROUND_FILL,
GIMP_WHITE_FILL,
GIMP_TRANSPARENT_FILL,
GIMP_PATTERN_FILL
} GimpFillType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpGradientSegmentColor"/>enum GimpGradientSegmentColor</title>
<indexterm><primary>GimpGradientSegmentColor</primary></indexterm><programlisting>typedef enum
{
GIMP_GRADIENT_SEGMENT_RGB,
GIMP_GRADIENT_SEGMENT_HSV_CCW,
GIMP_GRADIENT_SEGMENT_HSV_CW
} GimpGradientSegmentColor;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpGradientSegmentType"/>enum GimpGradientSegmentType</title>
<indexterm><primary>GimpGradientSegmentType</primary></indexterm><programlisting>typedef enum
{
GIMP_GRADIENT_SEGMENT_LINEAR,
GIMP_GRADIENT_SEGMENT_CURVED,
GIMP_GRADIENT_SEGMENT_SINE,
GIMP_GRADIENT_SEGMENT_SPHERE_INCREASING,
GIMP_GRADIENT_SEGMENT_SPHERE_DECREASING
} GimpGradientSegmentType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpGradientType"/>enum GimpGradientType</title>
<indexterm><primary>GimpGradientType</primary></indexterm><programlisting>typedef enum
{
GIMP_GRADIENT_LINEAR,
GIMP_GRADIENT_BILINEAR,
GIMP_GRADIENT_RADIAL,
GIMP_GRADIENT_SQUARE,
GIMP_GRADIENT_CONICAL_SYMMETRIC,
GIMP_GRADIENT_CONICAL_ASYMMETRIC,
GIMP_GRADIENT_SHAPEBURST_ANGULAR,
GIMP_GRADIENT_SHAPEBURST_SPHERICAL,
GIMP_GRADIENT_SHAPEBURST_DIMPLED,
GIMP_GRADIENT_SPIRAL_CLOCKWISE,
GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE
} GimpGradientType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpHistogramChannel"/>enum GimpHistogramChannel</title>
<indexterm><primary>GimpHistogramChannel</primary></indexterm><programlisting>typedef enum
{
GIMP_HISTOGRAM_VALUE,
GIMP_HISTOGRAM_RED,
GIMP_HISTOGRAM_GREEN,
GIMP_HISTOGRAM_BLUE,
GIMP_HISTOGRAM_ALPHA
} GimpHistogramChannel;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpHueRange"/>enum GimpHueRange</title>
<indexterm><primary>GimpHueRange</primary></indexterm><programlisting>typedef enum
{
GIMP_ALL_HUES,
GIMP_RED_HUES,
GIMP_YELLOW_HUES,
GIMP_GREEN_HUES,
GIMP_CYAN_HUES,
GIMP_BLUE_HUES,
GIMP_MAGENTA_HUES
} GimpHueRange;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpIconType"/>enum GimpIconType</title>
<indexterm><primary>GimpIconType</primary></indexterm><programlisting>typedef enum
{
GIMP_ICON_TYPE_STOCK_ID,
GIMP_ICON_TYPE_INLINE_PIXBUF,
GIMP_ICON_TYPE_IMAGE_FILE
} GimpIconType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpInterpolationType"/>enum GimpInterpolationType</title>
<indexterm><primary>GimpInterpolationType</primary></indexterm><programlisting>typedef enum
{
GIMP_INTERPOLATION_NONE,
GIMP_INTERPOLATION_LINEAR,
GIMP_INTERPOLATION_CUBIC
} GimpInterpolationType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpLayerModeEffects"/>enum GimpLayerModeEffects</title>
<indexterm><primary>GimpLayerModeEffects</primary></indexterm><programlisting>typedef enum
{
GIMP_NORMAL_MODE,
GIMP_DISSOLVE_MODE,
GIMP_BEHIND_MODE,
GIMP_MULTIPLY_MODE,
GIMP_SCREEN_MODE,
GIMP_OVERLAY_MODE,
GIMP_DIFFERENCE_MODE,
GIMP_ADDITION_MODE,
GIMP_SUBTRACT_MODE,
GIMP_DARKEN_ONLY_MODE,
GIMP_LIGHTEN_ONLY_MODE,
GIMP_HUE_MODE,
GIMP_SATURATION_MODE,
GIMP_COLOR_MODE,
GIMP_VALUE_MODE,
GIMP_DIVIDE_MODE,
GIMP_DODGE_MODE,
GIMP_BURN_MODE,
GIMP_HARDLIGHT_MODE,
GIMP_SOFTLIGHT_MODE,
GIMP_GRAIN_EXTRACT_MODE,
GIMP_GRAIN_MERGE_MODE,
GIMP_COLOR_ERASE_MODE
} GimpLayerModeEffects;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpMaskApplyMode"/>enum GimpMaskApplyMode</title>
<indexterm><primary>GimpMaskApplyMode</primary></indexterm><programlisting>typedef enum
{
GIMP_MASK_APPLY,
GIMP_MASK_DISCARD
} GimpMaskApplyMode;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpMergeType"/>enum GimpMergeType</title>
<indexterm><primary>GimpMergeType</primary></indexterm><programlisting>typedef enum
{
GIMP_EXPAND_AS_NECESSARY,
GIMP_CLIP_TO_IMAGE,
GIMP_CLIP_TO_BOTTOM_LAYER,
GIMP_FLATTEN_IMAGE
} GimpMergeType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpOffsetType"/>enum GimpOffsetType</title>
<indexterm><primary>GimpOffsetType</primary></indexterm><programlisting>typedef enum
{
GIMP_OFFSET_BACKGROUND,
GIMP_OFFSET_TRANSPARENT
} GimpOffsetType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpOrientationType"/>enum GimpOrientationType</title>
<indexterm><primary>GimpOrientationType</primary></indexterm><programlisting>typedef enum
{
GIMP_ORIENTATION_HORIZONTAL,
GIMP_ORIENTATION_VERTICAL,
GIMP_ORIENTATION_UNKNOWN
} GimpOrientationType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpPaintApplicationMode"/>enum GimpPaintApplicationMode</title>
<indexterm><primary>GimpPaintApplicationMode</primary></indexterm><programlisting>typedef enum
{
GIMP_PAINT_CONSTANT,
GIMP_PAINT_INCREMENTAL
} GimpPaintApplicationMode;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpRepeatMode"/>enum GimpRepeatMode</title>
<indexterm><primary>GimpRepeatMode</primary></indexterm><programlisting>typedef enum
{
GIMP_REPEAT_NONE,
GIMP_REPEAT_SAWTOOTH,
GIMP_REPEAT_TRIANGULAR
} GimpRepeatMode;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpRotationType"/>enum GimpRotationType</title>
<indexterm><primary>GimpRotationType</primary></indexterm><programlisting>typedef enum
{
GIMP_ROTATE_90,
GIMP_ROTATE_180,
GIMP_ROTATE_270
} GimpRotationType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpRunMode"/>enum GimpRunMode</title>
<indexterm><primary>GimpRunMode</primary></indexterm><programlisting>typedef enum
{
GIMP_RUN_INTERACTIVE,
GIMP_RUN_NONINTERACTIVE,
GIMP_RUN_WITH_LAST_VALS
} GimpRunMode;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpSizeType"/>enum GimpSizeType</title>
<indexterm><primary>GimpSizeType</primary></indexterm><programlisting>typedef enum
{
GIMP_PIXELS,
GIMP_POINTS
} GimpSizeType;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpTransferMode"/>enum GimpTransferMode</title>
<indexterm><primary>GimpTransferMode</primary></indexterm><programlisting>typedef enum
{
GIMP_SHADOWS,
GIMP_MIDTONES,
GIMP_HIGHLIGHTS
} GimpTransferMode;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpTransformDirection"/>enum GimpTransformDirection</title>
<indexterm><primary>GimpTransformDirection</primary></indexterm><programlisting>typedef enum
{
GIMP_TRANSFORM_FORWARD,
GIMP_TRANSFORM_BACKWARD
} GimpTransformDirection;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="gimp-enums-get-type-names"/>gimp_enums_get_type_names ()</title>
<indexterm role="GIMP"><primary>gimp_enums_get_type_names</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>** gimp_enums_get_type_names (<link linkend="gint">gint</link> *n_type_names);</programlisting>
<para>
This function gives access to the list of enums registered by libgimp.
The returned array is static and must not be modified.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>n_type_names</parameter>&nbsp;:</term>
<listitem><simpara> return location for the number of names
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an array with type names
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpexport">
<refmeta>
<refentrytitle>gimpexport</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpexport</refname><refpurpose>Export an image before it is saved.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
enum <link linkend="GimpExportCapabilities">GimpExportCapabilities</link>;
enum <link linkend="GimpExportReturn">GimpExportReturn</link>;
<link linkend="GimpExportReturn">GimpExportReturn</link> <link linkend="gimp-export-image">gimp_export_image</link> (<link linkend="gint32">gint32</link> *image_ID,
<link linkend="gint32">gint32</link> *drawable_ID,
const <link linkend="gchar">gchar</link> *format_name,
<link linkend="GimpExportCapabilities">GimpExportCapabilities</link> capabilities);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
This function should be called by all save_plugins unless they are
able to save all image formats the GIMP knows about. It takes care
of asking the user if she wishes to export the image to a format the
save_plugin can handle. It then performs the necessary conversions
(e.g. Flatten) on a copy of the image so that the image can be saved
without changing the original image.
The capabilities of the save_plugin are specified by combining
<link linkend="GimpExportCapabilities"><type>GimpExportCapabilities</type></link> using a bitwise OR.
Make sure you have initialized GTK+ before you call this function
as it will most probably have to open a dialog.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpExportCapabilities"/>enum GimpExportCapabilities</title>
<indexterm><primary>GimpExportCapabilities</primary></indexterm><programlisting>typedef enum
{
GIMP_EXPORT_CAN_HANDLE_RGB = 1 &lt;&lt; 0,
GIMP_EXPORT_CAN_HANDLE_GRAY = 1 &lt;&lt; 1,
GIMP_EXPORT_CAN_HANDLE_INDEXED = 1 &lt;&lt; 2,
GIMP_EXPORT_CAN_HANDLE_BITMAP = 1 &lt;&lt; 3,
GIMP_EXPORT_CAN_HANDLE_ALPHA = 1 &lt;&lt; 4,
GIMP_EXPORT_CAN_HANDLE_LAYERS = 1 &lt;&lt; 5,
GIMP_EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION = 1 &lt;&lt; 6,
GIMP_EXPORT_CAN_HANDLE_LAYER_MASKS = 1 &lt;&lt; 7,
GIMP_EXPORT_NEEDS_ALPHA = 1 &lt;&lt; 8
} GimpExportCapabilities;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpExportReturn"/>enum GimpExportReturn</title>
<indexterm><primary>GimpExportReturn</primary></indexterm><programlisting>typedef enum
{
GIMP_EXPORT_CANCEL,
GIMP_EXPORT_IGNORE,
GIMP_EXPORT_EXPORT
} GimpExportReturn;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="gimp-export-image"/>gimp_export_image ()</title>
<indexterm><primary>gimp_export_image</primary></indexterm><programlisting><link linkend="GimpExportReturn">GimpExportReturn</link> gimp_export_image (<link linkend="gint32">gint32</link> *image_ID,
<link linkend="gint32">gint32</link> *drawable_ID,
const <link linkend="gchar">gchar</link> *format_name,
<link linkend="GimpExportCapabilities">GimpExportCapabilities</link> capabilities);</programlisting>
<para>
Takes an image and a drawable to be saved together with a
description of the capabilities of the image_format. If the
type of image doesn't match the capabilities of the format
a dialog is opened that informs the user that the image has
to be exported and offers to do the necessary conversions.
</para>
<para>
If the user chooses to export the image, a copy is created.
This copy is then converted, the image_ID and drawable_ID
are changed to point to the new image and the procedure returns
GIMP_EXPORT_EXPORT. The save_plugin has to take care of deleting the
created image using <link linkend="gimp-image-delete"><function>gimp_image_delete()</function></link> when it has saved it.
</para>
<para>
If the user chooses to Ignore the export problem, the image_ID
and drawable_ID is not altered, GIMP_EXPORT_IGNORE is returned and
the save_plugin should try to save the original image. If the
user chooses Cancel, GIMP_EXPORT_CANCEL is returned and the
save_plugin should quit itself with status <link linkend="GIMP-PDB-CANCEL:CAPS"><type>GIMP_PDB_CANCEL</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to the image_ID.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to the drawable_ID.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>format_name</parameter>&nbsp;:</term>
<listitem><simpara> The (short) name of the image_format (e.g. JPEG or GIF).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>capabilities</parameter>&nbsp;:</term>
<listitem><simpara> What can the image_format do?
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> An enum of <link linkend="GimpExportReturn"><type>GimpExportReturn</type></link> describing the user_action.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,296 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpfileops">
<refmeta>
<refentrytitle>gimpfileops</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpfileops</refname><refpurpose>File operations (load, save, etc.)</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gchar">gchar</link>* <link linkend="gimp-temp-name">gimp_temp_name</link> (const <link linkend="gchar">gchar</link> *extension);
<link linkend="gint32">gint32</link> <link linkend="gimp-file-load">gimp_file_load</link> (<link linkend="GimpRunMode">GimpRunMode</link> run_mode,
const <link linkend="gchar">gchar</link> *filename,
const <link linkend="gchar">gchar</link> *raw_filename);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-file-save">gimp_file_save</link> (<link linkend="GimpRunMode">GimpRunMode</link> run_mode,
<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> drawable_ID,
const <link linkend="gchar">gchar</link> *filename,
const <link linkend="gchar">gchar</link> *raw_filename);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-register-magic-load-handler">gimp_register_magic_load_handler</link>
(const <link linkend="gchar">gchar</link> *procedure_name,
const <link linkend="gchar">gchar</link> *extensions,
const <link linkend="gchar">gchar</link> *prefixes,
const <link linkend="gchar">gchar</link> *magics);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-register-load-handler">gimp_register_load_handler</link> (const <link linkend="gchar">gchar</link> *procedure_name,
const <link linkend="gchar">gchar</link> *extensions,
const <link linkend="gchar">gchar</link> *prefixes);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-register-save-handler">gimp_register_save_handler</link> (const <link linkend="gchar">gchar</link> *procedure_name,
const <link linkend="gchar">gchar</link> *extensions,
const <link linkend="gchar">gchar</link> *prefixes);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-register-file-handler-mime">gimp_register_file_handler_mime</link> (const <link linkend="gchar">gchar</link> *procedure_name,
const <link linkend="gchar">gchar</link> *mime_type);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-register-thumbnail-loader">gimp_register_thumbnail_loader</link> (const <link linkend="gchar">gchar</link> *load_proc,
const <link linkend="gchar">gchar</link> *thumb_proc);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
File operations (load, save, etc.)
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-temp-name"/>gimp_temp_name ()</title>
<indexterm><primary>gimp_temp_name</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_temp_name (const <link linkend="gchar">gchar</link> *extension);</programlisting>
<para>
Generates a unique filename.
</para>
<para>
Generates a unique filename using the temp path supplied in the
user's gimprc.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>extension</parameter>&nbsp;:</term>
<listitem><simpara> The extension the file will have.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The new temp filename.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-file-load"/>gimp_file_load ()</title>
<indexterm><primary>gimp_file_load</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_file_load (<link linkend="GimpRunMode">GimpRunMode</link> run_mode,
const <link linkend="gchar">gchar</link> *filename,
const <link linkend="gchar">gchar</link> *raw_filename);</programlisting>
<para>
Loads a file by invoking the right load handler.
</para>
<para>
This procedure invokes the correct file load handler using magic if
possible, and falling back on the file's extension and/or prefix if
not. The name of the file to load is typically a full pathname, and
the name entered is what the user actually typed before prepending a
directory path. The reason for this is that if the user types
http://www.xcf/~gimp/ he wants to fetch a URL, and the full pathname
will not look like a URL.\"</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>run_mode</parameter>&nbsp;:</term>
<listitem><simpara> The run mode.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
<listitem><simpara> The name of the file to load.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>raw_filename</parameter>&nbsp;:</term>
<listitem><simpara> The name as entered by the user.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The output image.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-file-save"/>gimp_file_save ()</title>
<indexterm><primary>gimp_file_save</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_file_save (<link linkend="GimpRunMode">GimpRunMode</link> run_mode,
<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> drawable_ID,
const <link linkend="gchar">gchar</link> *filename,
const <link linkend="gchar">gchar</link> *raw_filename);</programlisting>
<para>
Saves a file by extension.
</para>
<para>
This procedure invokes the correct file save handler according to
the file's extension and/or prefix. The name of the file to save is
typically a full pathname, and the name entered is what the user
actually typed before prepending a directory path. The reason for
this is that if the user types http://www.xcf/~gimp/ she wants to
fetch a URL, and the full pathname will not look like a URL.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>run_mode</parameter>&nbsp;:</term>
<listitem><simpara> The run mode.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> Input image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> Drawable to save.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
<listitem><simpara> The name of the file to save the image in.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>raw_filename</parameter>&nbsp;:</term>
<listitem><simpara> The name as entered by the user.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-register-magic-load-handler"/>gimp_register_magic_load_handler ()</title>
<indexterm><primary>gimp_register_magic_load_handler</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_register_magic_load_handler
(const <link linkend="gchar">gchar</link> *procedure_name,
const <link linkend="gchar">gchar</link> *extensions,
const <link linkend="gchar">gchar</link> *prefixes,
const <link linkend="gchar">gchar</link> *magics);</programlisting>
<para>
Registers a file load handler procedure.
</para>
<para>
Registers a procedural database procedure to be called to load files
of a particular file format using magic file information.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>procedure_name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the procedure to be used for loading.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>extensions</parameter>&nbsp;:</term>
<listitem><simpara> comma separated list of extensions this handler can load (i.e. \"jpg,jpeg\").
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>prefixes</parameter>&nbsp;:</term>
<listitem><simpara> comma separated list of prefixes this handler can load (i.e. \"http:,ftp:\").
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>magics</parameter>&nbsp;:</term>
<listitem><simpara> comma separated list of magic file information this handler can load (i.e. \"0,string,GIF\").
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-register-load-handler"/>gimp_register_load_handler ()</title>
<indexterm><primary>gimp_register_load_handler</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_register_load_handler (const <link linkend="gchar">gchar</link> *procedure_name,
const <link linkend="gchar">gchar</link> *extensions,
const <link linkend="gchar">gchar</link> *prefixes);</programlisting>
<para>
Registers a file load handler procedure.
</para>
<para>
Registers a procedural database procedure to be called to load files
of a particular file format.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>procedure_name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the procedure to be used for loading.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>extensions</parameter>&nbsp;:</term>
<listitem><simpara> comma separated list of extensions this handler can load (i.e. \"jpg,jpeg\").
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>prefixes</parameter>&nbsp;:</term>
<listitem><simpara> comma separated list of prefixes this handler can load (i.e. \"http:,ftp:\").
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-register-save-handler"/>gimp_register_save_handler ()</title>
<indexterm><primary>gimp_register_save_handler</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_register_save_handler (const <link linkend="gchar">gchar</link> *procedure_name,
const <link linkend="gchar">gchar</link> *extensions,
const <link linkend="gchar">gchar</link> *prefixes);</programlisting>
<para>
Registers a file save handler procedure.
</para>
<para>
Registers a procedural database procedure to be called to save files
in a particular file format.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>procedure_name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the procedure to be used for saving.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>extensions</parameter>&nbsp;:</term>
<listitem><simpara> comma separated list of extensions this handler can save (i.e. \"jpg,jpeg\").
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>prefixes</parameter>&nbsp;:</term>
<listitem><simpara> comma separated list of prefixes this handler can save (i.e. \"http:,ftp:\").
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-register-file-handler-mime"/>gimp_register_file_handler_mime ()</title>
<indexterm role="GIMP"><primary>gimp_register_file_handler_mime</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_register_file_handler_mime (const <link linkend="gchar">gchar</link> *procedure_name,
const <link linkend="gchar">gchar</link> *mime_type);</programlisting>
<para>
Associates a MIME type with a file handler procedure.
</para>
<para>
Registers a MIME type for a file handler procedure. This allows GIMP
to determine the MIME type of the file opened or saved using this
procedure.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>procedure_name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the procedure to associate a MIME type with.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mime_type</parameter>&nbsp;:</term>
<listitem><simpara> A single MIME type, like for example \"image/jpeg\".
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-register-thumbnail-loader"/>gimp_register_thumbnail_loader ()</title>
<indexterm role="GIMP"><primary>gimp_register_thumbnail_loader</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_register_thumbnail_loader (const <link linkend="gchar">gchar</link> *load_proc,
const <link linkend="gchar">gchar</link> *thumb_proc);</programlisting>
<para>
Associates a thumbnail loader with a file load procedure.
</para>
<para>
Some file formats allow for embedded thumbnails, other file formats
contain a scalable image or provide the image data in different
resolutions. A file plug-in for such a format may register a special
procedure that allows GIMP to load a thumbnail preview of the image.
This procedure is then associated with the standard load procedure
using this function.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>load_proc</parameter>&nbsp;:</term>
<listitem><simpara> The name of the procedure the thumbnail loader with.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>thumb_proc</parameter>&nbsp;:</term>
<listitem><simpara> The name of the thumbnail load procedure.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,185 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpfloatingsel">
<refmeta>
<refentrytitle>gimpfloatingsel</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpfloatingsel</refname><refpurpose>Functions for removing or attaching floating selections.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-floating-sel-remove">gimp_floating_sel_remove</link> (<link linkend="gint32">gint32</link> floating_sel_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-floating-sel-anchor">gimp_floating_sel_anchor</link> (<link linkend="gint32">gint32</link> floating_sel_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-floating-sel-to-layer">gimp_floating_sel_to_layer</link> (<link linkend="gint32">gint32</link> floating_sel_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-floating-sel-attach">gimp_floating_sel_attach</link> (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gint32">gint32</link> drawable_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-floating-sel-rigor">gimp_floating_sel_rigor</link> (<link linkend="gint32">gint32</link> floating_sel_ID,
<link linkend="gboolean">gboolean</link> undo);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-floating-sel-relax">gimp_floating_sel_relax</link> (<link linkend="gint32">gint32</link> floating_sel_ID,
<link linkend="gboolean">gboolean</link> undo);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions for removing or attaching floating selections.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-floating-sel-remove"/>gimp_floating_sel_remove ()</title>
<indexterm><primary>gimp_floating_sel_remove</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_floating_sel_remove (<link linkend="gint32">gint32</link> floating_sel_ID);</programlisting>
<para>
Remove the specified floating selection from its associated
drawable.
</para>
<para>
This procedure removes the floating selection completely, without
any side effects. The associated drawable is then set to active.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>floating_sel_ID</parameter>&nbsp;:</term>
<listitem><simpara> The floating selection.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-floating-sel-anchor"/>gimp_floating_sel_anchor ()</title>
<indexterm><primary>gimp_floating_sel_anchor</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_floating_sel_anchor (<link linkend="gint32">gint32</link> floating_sel_ID);</programlisting>
<para>
Anchor the specified floating selection to its associated drawable.
</para>
<para>
This procedure anchors the floating selection to its associated
drawable. This is similar to merging with a merge type of
ClipToBottomLayer. The floating selection layer is no longer valid
after this operation.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>floating_sel_ID</parameter>&nbsp;:</term>
<listitem><simpara> The floating selection.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-floating-sel-to-layer"/>gimp_floating_sel_to_layer ()</title>
<indexterm><primary>gimp_floating_sel_to_layer</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_floating_sel_to_layer (<link linkend="gint32">gint32</link> floating_sel_ID);</programlisting>
<para>
Transforms the specified floating selection into a layer.
</para>
<para>
This procedure transforms the specified floating selection into a
layer with the same offsets and extents. The composited image will
look precisely the same, but the floating selection layer will no
longer be clipped to the extents of the drawable it was attached to.
The floating selection will become the active layer. This procedure
will not work if the floating selection has a different base type
from the underlying image. This might be the case if the floating
selection is above an auxillary channel or a layer mask.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>floating_sel_ID</parameter>&nbsp;:</term>
<listitem><simpara> The floating selection.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-floating-sel-attach"/>gimp_floating_sel_attach ()</title>
<indexterm><primary>gimp_floating_sel_attach</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_floating_sel_attach (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gint32">gint32</link> drawable_ID);</programlisting>
<para>
Attach the specified layer as floating to the specified drawable.
</para>
<para>
This procedure attaches the layer as floating selection to the
drawable.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer (is attached as floating selection).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable (where to attach the floating selection).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-floating-sel-rigor"/>gimp_floating_sel_rigor ()</title>
<indexterm><primary>gimp_floating_sel_rigor</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_floating_sel_rigor (<link linkend="gint32">gint32</link> floating_sel_ID,
<link linkend="gboolean">gboolean</link> undo);</programlisting>
<para>
Rigor the floating selection.
</para>
<para>
This procedure rigors the floating selection.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>floating_sel_ID</parameter>&nbsp;:</term>
<listitem><simpara> The floating selection.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>undo</parameter>&nbsp;:</term>
<listitem><simpara> %<literal>desc</literal>%%.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-floating-sel-relax"/>gimp_floating_sel_relax ()</title>
<indexterm><primary>gimp_floating_sel_relax</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_floating_sel_relax (<link linkend="gint32">gint32</link> floating_sel_ID,
<link linkend="gboolean">gboolean</link> undo);</programlisting>
<para>
Relax the floating selection.
</para>
<para>
This procedure relaxes the floating selection.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>floating_sel_ID</parameter>&nbsp;:</term>
<listitem><simpara> The floating selection.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>undo</parameter>&nbsp;:</term>
<listitem><simpara> %<literal>desc</literal>%%.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpfontmenu">
<refmeta>
<refentrytitle>gimpfontmenu</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpfontmenu</refname><refpurpose>A widget for selecting fonts.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-font-select-widget-new">gimp_font_select_widget_new</link> (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *font_name,
<link linkend="GimpRunFontCallback">GimpRunFontCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> <link linkend="gimp-font-select-widget-close">gimp_font_select_widget_close</link> (<link linkend="GtkWidget">GtkWidget</link> *widget);
<link linkend="void">void</link> <link linkend="gimp-font-select-widget-set">gimp_font_select_widget_set</link> (<link linkend="GtkWidget">GtkWidget</link> *widget,
const <link linkend="gchar">gchar</link> *font_name);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
A widget for selecting fonts.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-font-select-widget-new"/>gimp_font_select_widget_new ()</title>
<indexterm><primary>gimp_font_select_widget_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_font_select_widget_new (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *font_name,
<link linkend="GimpRunFontCallback">GimpRunFontCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Creates a new <link linkend="GtkWidget"><type>GtkWidget</type></link> that completely controls the selection of
a font. This widget is suitable for placement in a table in a
plug-in dialog.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>title</parameter>&nbsp;:</term>
<listitem><simpara> Title of the dialog to use or <literal>NULL</literal> means to use the default
title.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>font_name</parameter>&nbsp;:</term>
<listitem><simpara> Initial font name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara> A function to call when the selected font changes.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> A pointer to arbitary data to be used in the call to <parameter>callback</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> A <link linkend="GtkWidget"><type>GtkWidget</type></link> that you can use in your UI.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-font-select-widget-close"/>gimp_font_select_widget_close ()</title>
<indexterm><primary>gimp_font_select_widget_close</primary></indexterm><programlisting><link linkend="void">void</link> gimp_font_select_widget_close (<link linkend="GtkWidget">GtkWidget</link> *widget);</programlisting>
<para>
Closes the popup window associated with <parameter>widget</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>widget</parameter>&nbsp;:</term>
<listitem><simpara> A font select widget.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-font-select-widget-set"/>gimp_font_select_widget_set ()</title>
<indexterm><primary>gimp_font_select_widget_set</primary></indexterm><programlisting><link linkend="void">void</link> gimp_font_select_widget_set (<link linkend="GtkWidget">GtkWidget</link> *widget,
const <link linkend="gchar">gchar</link> *font_name);</programlisting>
<para>
Sets the current font for the font select widget. Calls the
callback function if one was supplied in the call to
<link linkend="gimp-font-select-widget-new"><function>gimp_font_select_widget_new()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>widget</parameter>&nbsp;:</term>
<listitem><simpara> A font select widget.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>font_name</parameter>&nbsp;:</term>
<listitem><simpara> Font name to set; <literal>NULL</literal> means no change.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpfonts">
<refmeta>
<refentrytitle>gimpfonts</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpfonts</refname><refpurpose>Operations related to fonts.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-fonts-refresh">gimp_fonts_refresh</link> (void);
<link linkend="gchar">gchar</link>** <link linkend="gimp-fonts-get-list">gimp_fonts_get_list</link> (const <link linkend="gchar">gchar</link> *filter,
<link linkend="gint">gint</link> *num_fonts);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-fonts-refresh"/>gimp_fonts_refresh ()</title>
<indexterm><primary>gimp_fonts_refresh</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_fonts_refresh (void);</programlisting>
<para>
Refresh current fonts. This function always succeeds.
</para>
<para>
This procedure retrieves all fonts currently in the user's font path
and updates the font dialogs accordingly.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-fonts-get-list"/>gimp_fonts_get_list ()</title>
<indexterm><primary>gimp_fonts_get_list</primary></indexterm><programlisting><link linkend="gchar">gchar</link>** gimp_fonts_get_list (const <link linkend="gchar">gchar</link> *filter,
<link linkend="gint">gint</link> *num_fonts);</programlisting>
<para>
Retrieve the list of loaded fonts.
</para>
<para>
This procedure returns a list of the fonts that are currently
available.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>filter</parameter>&nbsp;:</term>
<listitem><simpara> An optional regular expression used to filter the list.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_fonts</parameter>&nbsp;:</term>
<listitem><simpara> The number of available fonts.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The list of font names.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,183 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpfontselect">
<refmeta>
<refentrytitle>gimpfontselect</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpfontselect</refname><refpurpose>Functions providing a font selection dialog.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="void">void</link> (<link linkend="GimpRunFontCallback">*GimpRunFontCallback</link>) (const <link linkend="gchar">gchar</link> *font_name,
<link linkend="gboolean">gboolean</link> dialog_closing,
<link linkend="gpointer">gpointer</link> user_data);
const <link linkend="gchar">gchar</link>* <link linkend="gimp-font-select-new">gimp_font_select_new</link> (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *font_name,
<link linkend="GimpRunFontCallback">GimpRunFontCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> <link linkend="gimp-font-select-destroy">gimp_font_select_destroy</link> (const <link linkend="gchar">gchar</link> *font_callback);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-fonts-popup">gimp_fonts_popup</link> (const <link linkend="gchar">gchar</link> *font_callback,
const <link linkend="gchar">gchar</link> *popup_title,
const <link linkend="gchar">gchar</link> *initial_font);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-fonts-close-popup">gimp_fonts_close_popup</link> (const <link linkend="gchar">gchar</link> *font_callback);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-fonts-set-popup">gimp_fonts_set_popup</link> (const <link linkend="gchar">gchar</link> *font_callback,
const <link linkend="gchar">gchar</link> *font_name);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions providing a font selection dialog.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpRunFontCallback"/>GimpRunFontCallback ()</title>
<indexterm><primary>GimpRunFontCallback</primary></indexterm><programlisting><link linkend="void">void</link> (*GimpRunFontCallback) (const <link linkend="gchar">gchar</link> *font_name,
<link linkend="gboolean">gboolean</link> dialog_closing,
<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>font_name</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dialog_closing</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-font-select-new"/>gimp_font_select_new ()</title>
<indexterm><primary>gimp_font_select_new</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gimp_font_select_new (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *font_name,
<link linkend="GimpRunFontCallback">GimpRunFontCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>title</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>font_name</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-font-select-destroy"/>gimp_font_select_destroy ()</title>
<indexterm><primary>gimp_font_select_destroy</primary></indexterm><programlisting><link linkend="void">void</link> gimp_font_select_destroy (const <link linkend="gchar">gchar</link> *font_callback);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>font_callback</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-fonts-popup"/>gimp_fonts_popup ()</title>
<indexterm><primary>gimp_fonts_popup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_fonts_popup (const <link linkend="gchar">gchar</link> *font_callback,
const <link linkend="gchar">gchar</link> *popup_title,
const <link linkend="gchar">gchar</link> *initial_font);</programlisting>
<para>
Invokes the Gimp font selection.
</para>
<para>
This procedure popups the font selection dialog.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>font_callback</parameter>&nbsp;:</term>
<listitem><simpara> The callback PDB proc to call when font selection is made.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>popup_title</parameter>&nbsp;:</term>
<listitem><simpara> Title to give the font popup window.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>initial_font</parameter>&nbsp;:</term>
<listitem><simpara> The name of the font to set as the first selected.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-fonts-close-popup"/>gimp_fonts_close_popup ()</title>
<indexterm><primary>gimp_fonts_close_popup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_fonts_close_popup (const <link linkend="gchar">gchar</link> *font_callback);</programlisting>
<para>
Popdown the Gimp font selection.
</para>
<para>
This procedure closes an opened font selection dialog.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>font_callback</parameter>&nbsp;:</term>
<listitem><simpara> The name of the callback registered for this popup.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-fonts-set-popup"/>gimp_fonts_set_popup ()</title>
<indexterm><primary>gimp_fonts_set_popup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_fonts_set_popup (const <link linkend="gchar">gchar</link> *font_callback,
const <link linkend="gchar">gchar</link> *font_name);</programlisting>
<para>
Sets the current font selection in a popup.
</para>
<para>
Sets the current font selection in a popup.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>font_callback</parameter>&nbsp;:</term>
<listitem><simpara> The name of the callback registered for this popup.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>font_name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the font to set as selected.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,173 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpgimprc">
<refmeta>
<refentrytitle>gimpgimprc</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpgimprc</refname><refpurpose>Interactions with settings from .gimprc.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gchar">gchar</link>* <link linkend="gimp-gimprc-query">gimp_gimprc_query</link> (const <link linkend="gchar">gchar</link> *token);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-gimprc-set">gimp_gimprc_set</link> (const <link linkend="gchar">gchar</link> *token,
const <link linkend="gchar">gchar</link> *value);
<link linkend="gchar">gchar</link>* <link linkend="gimp-get-default-comment">gimp_get_default_comment</link> (void);
<link linkend="gchar">gchar</link>* <link linkend="gimp-get-module-load-inhibit">gimp_get_module_load_inhibit</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-get-monitor-resolution">gimp_get_monitor_resolution</link> (<link linkend="gdouble">gdouble</link> *xres,
<link linkend="gdouble">gdouble</link> *yres);
<link linkend="gchar">gchar</link>* <link linkend="gimp-get-theme-dir">gimp_get_theme_dir</link> (void);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Interactions with settings from .gimprc.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-gimprc-query"/>gimp_gimprc_query ()</title>
<indexterm><primary>gimp_gimprc_query</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_gimprc_query (const <link linkend="gchar">gchar</link> *token);</programlisting>
<para>
Queries the gimprc file parser for information on a specified token.
</para>
<para>
This procedure is used to locate additional information contained in
the gimprc file considered extraneous to the operation of the GIMP.
Plug-ins that need configuration information can expect it will be
stored in the user gimprc file and can use this procedure to
retrieve it. This query procedure will return the value associated
with the specified token. This corresponds _only_ to entries with
the format: (&lt;token&gt; &lt;value&gt;). The value must be a
string. Entries not corresponding to this format will cause warnings
to be issued on gimprc parsing and will not be queryable.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>token</parameter>&nbsp;:</term>
<listitem><simpara> The token to query for.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The value associated with the queried token.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-gimprc-set"/>gimp_gimprc_set ()</title>
<indexterm><primary>gimp_gimprc_set</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_gimprc_set (const <link linkend="gchar">gchar</link> *token,
const <link linkend="gchar">gchar</link> *value);</programlisting>
<para>
Sets a gimprc token to a value and saves it in the gimprc.
</para>
<para>
This procedure is used to add or change additional information in
the gimprc file that is considered extraneous to the operation of
the GIMP. Plug-ins that need configuration information can use this
function to store it, and gimp_gimprc_query to retrieve it. This
will accept _only_ string values in UTF-8 encoding.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>token</parameter>&nbsp;:</term>
<listitem><simpara> The token to add or modify.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> The value to set the token to.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-get-default-comment"/>gimp_get_default_comment ()</title>
<indexterm><primary>gimp_get_default_comment</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_get_default_comment (void);</programlisting>
<para>
Get the default image comment as specified in the Preferences.
</para>
<para>
Returns a copy of the default image comment.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> Default Image Comment.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-get-module-load-inhibit"/>gimp_get_module_load_inhibit ()</title>
<indexterm><primary>gimp_get_module_load_inhibit</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_get_module_load_inhibit (void);</programlisting>
<para>
Get the list of modules which should not be loaded.
</para>
<para>
Returns a copy of the list of modules which should not be loaded.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The list of modules.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-get-monitor-resolution"/>gimp_get_monitor_resolution ()</title>
<indexterm><primary>gimp_get_monitor_resolution</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_get_monitor_resolution (<link linkend="gdouble">gdouble</link> *xres,
<link linkend="gdouble">gdouble</link> *yres);</programlisting>
<para>
Get the monitor resolution as specified in the Preferences.
</para>
<para>
Returns the resolution of the monitor in pixels/inch. This value is
taken from the Preferences (or the windowing system if this is set
in the Preferences) and there's no guarantee for the value to be
reasonable.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>xres</parameter>&nbsp;:</term>
<listitem><simpara> X resolution.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>yres</parameter>&nbsp;:</term>
<listitem><simpara> Y resolution.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-get-theme-dir"/>gimp_get_theme_dir ()</title>
<indexterm><primary>gimp_get_theme_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_get_theme_dir (void);</programlisting>
<para>
Get the directory of the current GUI theme.
</para>
<para>
Returns a copy of the current GUI theme dir.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The GUI theme dir.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpgradientmenu">
<refmeta>
<refentrytitle>gimpgradientmenu</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpgradientmenu</refname><refpurpose>A widget for selecting gradients.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-gradient-select-widget-new">gimp_gradient_select_widget_new</link> (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *gradient_name,
<link linkend="GimpRunGradientCallback">GimpRunGradientCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> <link linkend="gimp-gradient-select-widget-close">gimp_gradient_select_widget_close</link>
(<link linkend="GtkWidget">GtkWidget</link> *widget);
<link linkend="void">void</link> <link linkend="gimp-gradient-select-widget-set">gimp_gradient_select_widget_set</link> (<link linkend="GtkWidget">GtkWidget</link> *widget,
const <link linkend="gchar">gchar</link> *gradient_name);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
A widget for selecting gradients.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-gradient-select-widget-new"/>gimp_gradient_select_widget_new ()</title>
<indexterm><primary>gimp_gradient_select_widget_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_gradient_select_widget_new (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *gradient_name,
<link linkend="GimpRunGradientCallback">GimpRunGradientCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Creates a new <link linkend="GtkWidget"><type>GtkWidget</type></link> that completely controls the selection of
a gradient. This widget is suitable for placement in a table in a
plug-in dialog.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>title</parameter>&nbsp;:</term>
<listitem><simpara> Title of the dialog to use or <literal>NULL</literal> to use the default title.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gradient_name</parameter>&nbsp;:</term>
<listitem><simpara> Initial gradient name or <literal>NULL</literal> to use current selection.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara> A function to call when the selected gradient changes.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> A pointer to arbitary data to be used in the call to
<parameter>callback</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> A <link linkend="GtkWidget"><type>GtkWidget</type></link> that you can use in your UI.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-gradient-select-widget-close"/>gimp_gradient_select_widget_close ()</title>
<indexterm><primary>gimp_gradient_select_widget_close</primary></indexterm><programlisting><link linkend="void">void</link> gimp_gradient_select_widget_close
(<link linkend="GtkWidget">GtkWidget</link> *widget);</programlisting>
<para>
Closes the popup window associated with <parameter>widget</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>widget</parameter>&nbsp;:</term>
<listitem><simpara> A gradient select widget.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-gradient-select-widget-set"/>gimp_gradient_select_widget_set ()</title>
<indexterm><primary>gimp_gradient_select_widget_set</primary></indexterm><programlisting><link linkend="void">void</link> gimp_gradient_select_widget_set (<link linkend="GtkWidget">GtkWidget</link> *widget,
const <link linkend="gchar">gchar</link> *gradient_name);</programlisting>
<para>
Sets the current gradient for the gradient select widget. Calls
the callback function if one was supplied in the call to
<link linkend="gimp-gradient-select-widget-new"><function>gimp_gradient_select_widget_new()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>widget</parameter>&nbsp;:</term>
<listitem><simpara> A gradient select widget.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gradient_name</parameter>&nbsp;:</term>
<listitem><simpara> Gradient name to set.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,207 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpgradients">
<refmeta>
<refentrytitle>gimpgradients</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpgradients</refname><refpurpose>Operations related to gradients.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-gradients-refresh">gimp_gradients_refresh</link> (void);
<link linkend="gchar">gchar</link>** <link linkend="gimp-gradients-get-list">gimp_gradients_get_list</link> (const <link linkend="gchar">gchar</link> *filter,
<link linkend="gint">gint</link> *num_gradients);
<link linkend="gchar">gchar</link>* <link linkend="gimp-gradients-get-gradient">gimp_gradients_get_gradient</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-gradients-set-gradient">gimp_gradients_set_gradient</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gdouble">gdouble</link>* <link linkend="gimp-gradients-sample-uniform">gimp_gradients_sample_uniform</link> (<link linkend="gint">gint</link> num_samples,
<link linkend="gboolean">gboolean</link> reverse);
<link linkend="gdouble">gdouble</link>* <link linkend="gimp-gradients-sample-custom">gimp_gradients_sample_custom</link> (<link linkend="gint">gint</link> num_samples,
const <link linkend="gdouble">gdouble</link> *positions,
<link linkend="gboolean">gboolean</link> reverse);
<link linkend="gchar">gchar</link>* <link linkend="gimp-gradients-get-gradient-data">gimp_gradients_get_gradient_data</link>
(const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> sample_size,
<link linkend="gboolean">gboolean</link> reverse,
<link linkend="gint">gint</link> *width,
<link linkend="gdouble">gdouble</link> **grad_data);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Operations related to gradients.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-gradients-refresh"/>gimp_gradients_refresh ()</title>
<indexterm><primary>gimp_gradients_refresh</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_gradients_refresh (void);</programlisting>
<para>
Refresh current gradients. This function always succeeds.
</para>
<para>
This procedure retrieves all gradients currently in the user's
gradient path and updates the gradient dialogs accordingly.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-gradients-get-list"/>gimp_gradients_get_list ()</title>
<indexterm><primary>gimp_gradients_get_list</primary></indexterm><programlisting><link linkend="gchar">gchar</link>** gimp_gradients_get_list (const <link linkend="gchar">gchar</link> *filter,
<link linkend="gint">gint</link> *num_gradients);</programlisting>
<para>
Retrieve the list of loaded gradients.
</para>
<para>
This procedure returns a list of the gradients that are currently
loaded. You can later use the 'gimp_context_set_gradient' function
to set the active gradient.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>filter</parameter>&nbsp;:</term>
<listitem><simpara> An optional regular expression used to filter the list.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_gradients</parameter>&nbsp;:</term>
<listitem><simpara> The number of loaded gradients.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The list of gradient names.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-gradients-get-gradient"/>gimp_gradients_get_gradient ()</title>
<indexterm role="deprecated"><primary>gimp_gradients_get_gradient</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_gradients_get_gradient (void);</programlisting>
<warning><para><literal>gimp_gradients_get_gradient</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-context-get-gradient"><function>gimp_context_get_gradient()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The name of the active gradient.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-gradients-set-gradient"/>gimp_gradients_set_gradient ()</title>
<indexterm role="deprecated"><primary>gimp_gradients_set_gradient</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_gradients_set_gradient (const <link linkend="gchar">gchar</link> *name);</programlisting>
<warning><para><literal>gimp_gradients_set_gradient</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-context-set-gradient"><function>gimp_context_set_gradient()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the gradient to set.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-gradients-sample-uniform"/>gimp_gradients_sample_uniform ()</title>
<indexterm role="deprecated"><primary>gimp_gradients_sample_uniform</primary></indexterm><programlisting><link linkend="gdouble">gdouble</link>* gimp_gradients_sample_uniform (<link linkend="gint">gint</link> num_samples,
<link linkend="gboolean">gboolean</link> reverse);</programlisting>
<warning><para><literal>gimp_gradients_sample_uniform</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use
<link linkend="gimp-gradient-get-uniform-samples"><function>gimp_gradient_get_uniform_samples()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>num_samples</parameter>&nbsp;:</term>
<listitem><simpara> The number of samples to take.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>reverse</parameter>&nbsp;:</term>
<listitem><simpara> Use the reverse gradient.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> Color samples: { R1, G1, B1, A1, ..., Rn, Gn, Bn, An }.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-gradients-sample-custom"/>gimp_gradients_sample_custom ()</title>
<indexterm role="deprecated"><primary>gimp_gradients_sample_custom</primary></indexterm><programlisting><link linkend="gdouble">gdouble</link>* gimp_gradients_sample_custom (<link linkend="gint">gint</link> num_samples,
const <link linkend="gdouble">gdouble</link> *positions,
<link linkend="gboolean">gboolean</link> reverse);</programlisting>
<warning><para><literal>gimp_gradients_sample_custom</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-gradient-get-custom-samples"><function>gimp_gradient_get_custom_samples()</function></link>
instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>num_samples</parameter>&nbsp;:</term>
<listitem><simpara> The number of samples to take.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>positions</parameter>&nbsp;:</term>
<listitem><simpara> The list of positions to sample along the gradient.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>reverse</parameter>&nbsp;:</term>
<listitem><simpara> Use the reverse gradient.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> Color samples: { R1, G1, B1, A1, ..., Rn, Gn, Bn, An }.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-gradients-get-gradient-data"/>gimp_gradients_get_gradient_data ()</title>
<indexterm role="deprecated"><primary>gimp_gradients_get_gradient_data</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_gradients_get_gradient_data
(const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> sample_size,
<link linkend="gboolean">gboolean</link> reverse,
<link linkend="gint">gint</link> *width,
<link linkend="gdouble">gdouble</link> **grad_data);</programlisting>
<warning><para><literal>gimp_gradients_get_gradient_data</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use
<link linkend="gimp-gradient-get-uniform-samples"><function>gimp_gradient_get_uniform_samples()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The gradient name (\"\" means current active gradient).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>sample_size</parameter>&nbsp;:</term>
<listitem><simpara> Size of the sample to return when the gradient is changed.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>reverse</parameter>&nbsp;:</term>
<listitem><simpara> Use the reverse gradient.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> The gradient sample width (r,g,b,a).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>grad_data</parameter>&nbsp;:</term>
<listitem><simpara> The gradient sample data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The gradient name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,203 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpgradientselect">
<refmeta>
<refentrytitle>gimpgradientselect</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpgradientselect</refname><refpurpose>Functions providing a gradient selection dialog.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="void">void</link> (<link linkend="GimpRunGradientCallback">*GimpRunGradientCallback</link>) (const <link linkend="gchar">gchar</link> *gradient_name,
<link linkend="gint">gint</link> width,
const <link linkend="gdouble">gdouble</link> *grad_data,
<link linkend="gboolean">gboolean</link> dialog_closing,
<link linkend="gpointer">gpointer</link> user_data);
const <link linkend="gchar">gchar</link>* <link linkend="gimp-gradient-select-new">gimp_gradient_select_new</link> (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *gradient_name,
<link linkend="gint">gint</link> sample_size,
<link linkend="GimpRunGradientCallback">GimpRunGradientCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> <link linkend="gimp-gradient-select-destroy">gimp_gradient_select_destroy</link> (const <link linkend="gchar">gchar</link> *gradient_callback);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-gradients-popup">gimp_gradients_popup</link> (const <link linkend="gchar">gchar</link> *gradient_callback,
const <link linkend="gchar">gchar</link> *popup_title,
const <link linkend="gchar">gchar</link> *initial_gradient,
<link linkend="gint">gint</link> sample_size);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-gradients-close-popup">gimp_gradients_close_popup</link> (const <link linkend="gchar">gchar</link> *gradient_callback);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-gradients-set-popup">gimp_gradients_set_popup</link> (const <link linkend="gchar">gchar</link> *gradient_callback,
const <link linkend="gchar">gchar</link> *gradient_name);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions providing a gradient selection dialog.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpRunGradientCallback"/>GimpRunGradientCallback ()</title>
<indexterm><primary>GimpRunGradientCallback</primary></indexterm><programlisting><link linkend="void">void</link> (*GimpRunGradientCallback) (const <link linkend="gchar">gchar</link> *gradient_name,
<link linkend="gint">gint</link> width,
const <link linkend="gdouble">gdouble</link> *grad_data,
<link linkend="gboolean">gboolean</link> dialog_closing,
<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>gradient_name</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>grad_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dialog_closing</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-gradient-select-new"/>gimp_gradient_select_new ()</title>
<indexterm><primary>gimp_gradient_select_new</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gimp_gradient_select_new (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *gradient_name,
<link linkend="gint">gint</link> sample_size,
<link linkend="GimpRunGradientCallback">GimpRunGradientCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>title</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gradient_name</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>sample_size</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-gradient-select-destroy"/>gimp_gradient_select_destroy ()</title>
<indexterm><primary>gimp_gradient_select_destroy</primary></indexterm><programlisting><link linkend="void">void</link> gimp_gradient_select_destroy (const <link linkend="gchar">gchar</link> *gradient_callback);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>gradient_callback</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-gradients-popup"/>gimp_gradients_popup ()</title>
<indexterm><primary>gimp_gradients_popup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_gradients_popup (const <link linkend="gchar">gchar</link> *gradient_callback,
const <link linkend="gchar">gchar</link> *popup_title,
const <link linkend="gchar">gchar</link> *initial_gradient,
<link linkend="gint">gint</link> sample_size);</programlisting>
<para>
Invokes the Gimp gradients selection.
</para>
<para>
This procedure popups the gradients selection dialog.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>gradient_callback</parameter>&nbsp;:</term>
<listitem><simpara> The callback PDB proc to call when gradient selection is made.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>popup_title</parameter>&nbsp;:</term>
<listitem><simpara> Title to give the gradient popup window.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>initial_gradient</parameter>&nbsp;:</term>
<listitem><simpara> The name of the pattern to set as the first selected.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>sample_size</parameter>&nbsp;:</term>
<listitem><simpara> Size of the sample to return when the gradient is changed.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-gradients-close-popup"/>gimp_gradients_close_popup ()</title>
<indexterm><primary>gimp_gradients_close_popup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_gradients_close_popup (const <link linkend="gchar">gchar</link> *gradient_callback);</programlisting>
<para>
Popdown the Gimp gradient selection.
</para>
<para>
This procedure closes an opened gradient selection dialog.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>gradient_callback</parameter>&nbsp;:</term>
<listitem><simpara> The name of the callback registered for this popup.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-gradients-set-popup"/>gimp_gradients_set_popup ()</title>
<indexterm><primary>gimp_gradients_set_popup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_gradients_set_popup (const <link linkend="gchar">gchar</link> *gradient_callback,
const <link linkend="gchar">gchar</link> *gradient_name);</programlisting>
<para>
Sets the current gradient selection in a popup.
</para>
<para>
Sets the current gradient selection in a popup.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>gradient_callback</parameter>&nbsp;:</term>
<listitem><simpara> The name of the callback registered for this popup.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>gradient_name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the gradient to set as selected.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,200 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpguides">
<refmeta>
<refentrytitle>gimpguides</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpguides</refname><refpurpose>Functions for manipulating guides.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gint32">gint32</link> <link linkend="gimp-image-add-hguide">gimp_image_add_hguide</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> yposition);
<link linkend="gint32">gint32</link> <link linkend="gimp-image-add-vguide">gimp_image_add_vguide</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> xposition);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-delete-guide">gimp_image_delete_guide</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> guide_ID);
<link linkend="gint32">gint32</link> <link linkend="gimp-image-find-next-guide">gimp_image_find_next_guide</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> guide_ID);
<link linkend="GimpOrientationType">GimpOrientationType</link> <link linkend="gimp-image-get-guide-orientation">gimp_image_get_guide_orientation</link>
(<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> guide_ID);
<link linkend="gint">gint</link> <link linkend="gimp-image-get-guide-position">gimp_image_get_guide_position</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> guide_ID);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions for manipulating guides.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-image-add-hguide"/>gimp_image_add_hguide ()</title>
<indexterm><primary>gimp_image_add_hguide</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_image_add_hguide (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> yposition);</programlisting>
<para>
Add a horizontal guide to an image.
</para>
<para>
This procedure adds a horizontal guide to an image. It takes the
input image and the y-position of the new guide as parameters. It
returns the guide ID of the new guide.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>yposition</parameter>&nbsp;:</term>
<listitem><simpara> The guide's y-offset from top of image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The new guide.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-add-vguide"/>gimp_image_add_vguide ()</title>
<indexterm><primary>gimp_image_add_vguide</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_image_add_vguide (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> xposition);</programlisting>
<para>
Add a vertical guide to an image.
</para>
<para>
This procedure adds a vertical guide to an image. It takes the input
image and the x-position of the new guide as parameters. It returns
the guide ID of the new guide.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>xposition</parameter>&nbsp;:</term>
<listitem><simpara> The guide's x-offset from left of image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The new guide.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-delete-guide"/>gimp_image_delete_guide ()</title>
<indexterm><primary>gimp_image_delete_guide</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_delete_guide (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> guide_ID);</programlisting>
<para>
Deletes a guide from an image.
</para>
<para>
This procedure takes an image and a guide ID as input and removes
the specified guide from the specified image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>guide_ID</parameter>&nbsp;:</term>
<listitem><simpara> The ID of the guide to be removed.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-find-next-guide"/>gimp_image_find_next_guide ()</title>
<indexterm><primary>gimp_image_find_next_guide</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_image_find_next_guide (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> guide_ID);</programlisting>
<para>
Find next guide on an image.
</para>
<para>
This procedure takes an image and a guide ID as input and finds the
guide ID of the successor of the given guide ID in the image's guide
list. If the supplied guide ID is 0, the procedure will return the
first Guide. The procedure will return 0 if given the final guide ID
as an argument or the image has no guides.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>guide_ID</parameter>&nbsp;:</term>
<listitem><simpara> The ID of the current guide (0 if first invocation).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The next guide's ID.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-get-guide-orientation"/>gimp_image_get_guide_orientation ()</title>
<indexterm><primary>gimp_image_get_guide_orientation</primary></indexterm><programlisting><link linkend="GimpOrientationType">GimpOrientationType</link> gimp_image_get_guide_orientation
(<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> guide_ID);</programlisting>
<para>
Get orientation of a guide on an image.
</para>
<para>
This procedure takes an image and a guide ID as input and returns
the orientations of the guide.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>guide_ID</parameter>&nbsp;:</term>
<listitem><simpara> The guide.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The guide's orientation.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-get-guide-position"/>gimp_image_get_guide_position ()</title>
<indexterm><primary>gimp_image_get_guide_position</primary></indexterm><programlisting><link linkend="gint">gint</link> gimp_image_get_guide_position (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> guide_ID);</programlisting>
<para>
Get position of a guide on an image.
</para>
<para>
This procedure takes an image and a guide ID as input and returns
the position of the guide relative to the top or left of the image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>guide_ID</parameter>&nbsp;:</term>
<listitem><simpara> The guide.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The guide's position relative to top or left of image.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimphelp">
<refmeta>
<refentrytitle>gimphelp</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimphelp</refname><refpurpose>Loading help pages using gimp_help.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-help">gimp_help</link> (const <link linkend="gchar">gchar</link> *help_domain,
const <link linkend="gchar">gchar</link> *help_id);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Loading help pages using gimp_help.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-help"/>gimp_help ()</title>
<indexterm><primary>gimp_help</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_help (const <link linkend="gchar">gchar</link> *help_domain,
const <link linkend="gchar">gchar</link> *help_id);</programlisting>
<para>
Load a help page.
</para>
<para>
This procedure loads the specified help page into the helpbrowser or
what ever is configured as help viewer. The help page is identified
by its domain and ID: if help_domain is NULL, we use the help_domain
which was registered using the gimp-plugin-help-register procedure.
If help_domain is NULL and no help domain was registered, the help
domain of the main GIMP installation is used.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>help_domain</parameter>&nbsp;:</term>
<listitem><simpara> The help domain in which help_id is registered.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>help_id</parameter>&nbsp;:</term>
<listitem><simpara> The help page's ID.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpimagecombobox">
<refmeta>
<refentrytitle>gimpimagecombobox</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpimagecombobox</refname><refpurpose>A widget providing a popup menu of images.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> (<link linkend="GimpImageConstraintFunc">*GimpImageConstraintFunc</link>) (<link linkend="gint32">gint32</link> image_id,
<link linkend="gpointer">gpointer</link> data);
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-image-combo-box-new">gimp_image_combo_box_new</link> (<link linkend="GimpImageConstraintFunc">GimpImageConstraintFunc</link> constraint,
<link linkend="gpointer">gpointer</link> data);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
A widget providing a popup menu of images.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpImageConstraintFunc"/>GimpImageConstraintFunc ()</title>
<indexterm><primary>GimpImageConstraintFunc</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> (*GimpImageConstraintFunc) (<link linkend="gint32">gint32</link> image_id,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_id</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-combo-box-new"/>gimp_image_combo_box_new ()</title>
<indexterm role="GIMP"><primary>gimp_image_combo_box_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_image_combo_box_new (<link linkend="GimpImageConstraintFunc">GimpImageConstraintFunc</link> constraint,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Creates a new <link linkend="GimpIntComboBox"><type>GimpIntComboBox</type></link> filled with all currently opened
images. If a <parameter>constraint</parameter> function is specified, it is called for
each image and only if the function returns <literal>TRUE</literal>, the image is
added to the combobox.
</para>
<para>
You should use <link linkend="gimp-int-combo-connect"><function>gimp_int_combo_connect()</function></link> to initialize and connect
the combo. Use <link linkend="gimp-int-combo-box-set-active"><function>gimp_int_combo_box_set_active()</function></link> to get the active
image ID and <link linkend="gimp-int-combo-box-get-active"><function>gimp_int_combo_box_get_active()</function></link> to retrieve the ID of
the selected image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>constraint</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GimpImageConstraintFunc"><type>GimpImageConstraintFunc</type></link> or <literal>NULL</literal>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> a pointer that is passed to <parameter>constraint</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="GimpIntComboBox"><type>GimpIntComboBox</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,740 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimplayer">
<refmeta>
<refentrytitle>gimplayer</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimplayer</refname><refpurpose>Operations on a single layer.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gint32">gint32</link> <link linkend="gimp-layer-new">gimp_layer_new</link> (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height,
<link linkend="GimpImageType">GimpImageType</link> type,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> mode);
<link linkend="gint32">gint32</link> <link linkend="gimp-layer-copy">gimp_layer_copy</link> (<link linkend="gint32">gint32</link> layer_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-scale">gimp_layer_scale</link> (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gint">gint</link> new_width,
<link linkend="gint">gint</link> new_height,
<link linkend="gboolean">gboolean</link> local_origin);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-resize">gimp_layer_resize</link> (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gint">gint</link> new_width,
<link linkend="gint">gint</link> new_height,
<link linkend="gint">gint</link> offx,
<link linkend="gint">gint</link> offy);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-resize-to-image-size">gimp_layer_resize_to_image_size</link> (<link linkend="gint32">gint32</link> layer_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-translate">gimp_layer_translate</link> (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gint">gint</link> offx,
<link linkend="gint">gint</link> offy);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-add-alpha">gimp_layer_add_alpha</link> (<link linkend="gint32">gint32</link> layer_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-set-offsets">gimp_layer_set_offsets</link> (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gint">gint</link> offx,
<link linkend="gint">gint</link> offy);
<link linkend="gint32">gint32</link> <link linkend="gimp-layer-create-mask">gimp_layer_create_mask</link> (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="GimpAddMaskType">GimpAddMaskType</link> mask_type);
<link linkend="gint32">gint32</link> <link linkend="gimp-layer-from-mask">gimp_layer_from_mask</link> (<link linkend="gint32">gint32</link> mask_ID);
<link linkend="gint32">gint32</link> <link linkend="gimp-layer-get-mask">gimp_layer_get_mask</link> (<link linkend="gint32">gint32</link> layer_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-add-mask">gimp_layer_add_mask</link> (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gint32">gint32</link> mask_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-remove-mask">gimp_layer_remove_mask</link> (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="GimpMaskApplyMode">GimpMaskApplyMode</link> mode);
<link linkend="gint32">gint32</link> <link linkend="gimp-layer-new-from-drawable">gimp_layer_new_from_drawable</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gint32">gint32</link> dest_image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-get-preserve-trans">gimp_layer_get_preserve_trans</link> (<link linkend="gint32">gint32</link> layer_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-set-preserve-trans">gimp_layer_set_preserve_trans</link> (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gboolean">gboolean</link> preserve_trans);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-get-apply-mask">gimp_layer_get_apply_mask</link> (<link linkend="gint32">gint32</link> layer_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-set-apply-mask">gimp_layer_set_apply_mask</link> (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gboolean">gboolean</link> apply_mask);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-get-show-mask">gimp_layer_get_show_mask</link> (<link linkend="gint32">gint32</link> layer_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-set-show-mask">gimp_layer_set_show_mask</link> (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gboolean">gboolean</link> show_mask);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-get-edit-mask">gimp_layer_get_edit_mask</link> (<link linkend="gint32">gint32</link> layer_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-set-edit-mask">gimp_layer_set_edit_mask</link> (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gboolean">gboolean</link> edit_mask);
<link linkend="gdouble">gdouble</link> <link linkend="gimp-layer-get-opacity">gimp_layer_get_opacity</link> (<link linkend="gint32">gint32</link> layer_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-set-opacity">gimp_layer_set_opacity</link> (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gdouble">gdouble</link> opacity);
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> <link linkend="gimp-layer-get-mode">gimp_layer_get_mode</link> (<link linkend="gint32">gint32</link> layer_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-set-mode">gimp_layer_set_mode</link> (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> mode);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-layer-is-floating-sel">gimp_layer_is_floating_sel</link> (<link linkend="gint32">gint32</link> layer_ID);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Operations on a single layer.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-layer-new"/>gimp_layer_new ()</title>
<indexterm><primary>gimp_layer_new</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_layer_new (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height,
<link linkend="GimpImageType">GimpImageType</link> type,
<link linkend="gdouble">gdouble</link> opacity,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> mode);</programlisting>
<para>
Create a new layer.
</para>
<para>
This procedure creates a new layer with the specified width, height,
and type. Name, opacity, and mode are also supplied parameters. The
new layer still needs to be added to the image, as this is not
automatic. Add the new layer with the 'gimp_image_add_layer'
command. Other attributes such as layer mask modes, and offsets
should be set with explicit procedure calls.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image to which to add the layer.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The layer name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> The layer width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> The layer height.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> The layer type.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opacity</parameter>&nbsp;:</term>
<listitem><simpara> The layer opacity.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mode</parameter>&nbsp;:</term>
<listitem><simpara> The layer combination mode.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The newly created layer.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-copy"/>gimp_layer_copy ()</title>
<indexterm><primary>gimp_layer_copy</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_layer_copy (<link linkend="gint32">gint32</link> layer_ID);</programlisting>
<para>
Copy a layer.
</para>
<para>
This procedure copies the specified layer and returns the copy. The
newly copied layer is for use within the original layer's image. It
should not be subsequently added to any other image. If you create
a copy of the background layer, remember to add an alpha channel
before you add the new layer to the image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer to copy.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The newly copied layer.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-scale"/>gimp_layer_scale ()</title>
<indexterm><primary>gimp_layer_scale</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_scale (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gint">gint</link> new_width,
<link linkend="gint">gint</link> new_height,
<link linkend="gboolean">gboolean</link> local_origin);</programlisting>
<para>
Scale the layer to the specified extents.
</para>
<para>
This procedure scales the layer so that it's new width and height
are equal to the supplied parameters. The \"local_origin\" parameter
specifies whether to scale from the center of the layer, or from the
image origin. This operation only works if the layer has been added
to an image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new_width</parameter>&nbsp;:</term>
<listitem><simpara> New layer width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new_height</parameter>&nbsp;:</term>
<listitem><simpara> New layer height.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>local_origin</parameter>&nbsp;:</term>
<listitem><simpara> Use a local origin (as opposed to the image origin).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-resize"/>gimp_layer_resize ()</title>
<indexterm><primary>gimp_layer_resize</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_resize (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gint">gint</link> new_width,
<link linkend="gint">gint</link> new_height,
<link linkend="gint">gint</link> offx,
<link linkend="gint">gint</link> offy);</programlisting>
<para>
Resize the layer to the specified extents.
</para>
<para>
This procedure resizes the layer so that it's new width and height
are equal to the supplied parameters. Offsets are also provided
which describe the position of the previous layer's content. This
operation only works if the layer has been added to an image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new_width</parameter>&nbsp;:</term>
<listitem><simpara> New layer width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new_height</parameter>&nbsp;:</term>
<listitem><simpara> New layer height.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offx</parameter>&nbsp;:</term>
<listitem><simpara> x offset between upper left corner of old and new layers: (old - new).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offy</parameter>&nbsp;:</term>
<listitem><simpara> y offset between upper left corner of old and new layers: (old - new).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-resize-to-image-size"/>gimp_layer_resize_to_image_size ()</title>
<indexterm><primary>gimp_layer_resize_to_image_size</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_resize_to_image_size (<link linkend="gint32">gint32</link> layer_ID);</programlisting>
<para>
Resize a layer to the image size.
</para>
<para>
This procedure resizes the layer so that it's new width and height
are equal to the width and height of its image container.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer to resize.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-translate"/>gimp_layer_translate ()</title>
<indexterm><primary>gimp_layer_translate</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_translate (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gint">gint</link> offx,
<link linkend="gint">gint</link> offy);</programlisting>
<para>
Translate the layer by the specified offsets.
</para>
<para>
This procedure translates the layer by the amounts specified in the
x and y arguments. These can be negative, and are considered offsets
from the current position. This command only works if the layer has
been added to an image. All additional layers contained in the image
which have the linked flag set to TRUE w ill also be translated by
the specified offsets.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offx</parameter>&nbsp;:</term>
<listitem><simpara> Offset in x direction.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offy</parameter>&nbsp;:</term>
<listitem><simpara> Offset in y direction.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-add-alpha"/>gimp_layer_add_alpha ()</title>
<indexterm><primary>gimp_layer_add_alpha</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_add_alpha (<link linkend="gint32">gint32</link> layer_ID);</programlisting>
<para>
Add an alpha channel to the layer if it doesn't already have one.
</para>
<para>
This procedure adds an additional component to the specified layer
if it does not already possess an alpha channel. An alpha channel
makes it possible to move a layer from the bottom of the layer stack
and to clear and erase to transparency, instead of the background
color. This transforms images of type RGB to RGBA, GRAY to GRAYA,
and INDEXED to INDEXEDA.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-set-offsets"/>gimp_layer_set_offsets ()</title>
<indexterm><primary>gimp_layer_set_offsets</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_set_offsets (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gint">gint</link> offx,
<link linkend="gint">gint</link> offy);</programlisting>
<para>
Set the layer offsets.
</para>
<para>
This procedure sets the offsets for the specified layer. The offsets
are relative to the image origin and can be any values. This
operation is valid only on layers which have been added to an image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offx</parameter>&nbsp;:</term>
<listitem><simpara> Offset in x direction.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offy</parameter>&nbsp;:</term>
<listitem><simpara> Offset in y direction.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-create-mask"/>gimp_layer_create_mask ()</title>
<indexterm><primary>gimp_layer_create_mask</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_layer_create_mask (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="GimpAddMaskType">GimpAddMaskType</link> mask_type);</programlisting>
<para>
Create a layer mask for the specified specified layer.
</para>
<para>
This procedure creates a layer mask for the specified layer. Layer
masks serve as an additional alpha channel for a layer. A number of
ifferent types of masks are allowed for initialisation: completely
white masks (which will leave the layer fully visible), completely
black masks (which will give the layer complete transparency, the
layer's already existing alpha channel (which will leave the layer
fully visible, but which may be more useful than a white mask), the
current selection or a grayscale copy of the layer. The layer mask
still needs to be added to the layer. This can be done with a call
to 'gimp_layer_add_mask'.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer to which to add the mask.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mask_type</parameter>&nbsp;:</term>
<listitem><simpara> The type of mask.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The newly created mask.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-from-mask"/>gimp_layer_from_mask ()</title>
<indexterm role="GIMP"><primary>gimp_layer_from_mask</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_layer_from_mask (<link linkend="gint32">gint32</link> mask_ID);</programlisting>
<para>
Get the specified mask's layer.
</para>
<para>
This procedure returns the specified mask's layer , or -1 if none
exists.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>mask_ID</parameter>&nbsp;:</term>
<listitem><simpara> Mask for which to return the layer.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The mask's layer.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-layer-get-mask"/>gimp_layer_get_mask ()</title>
<indexterm><primary>gimp_layer_get_mask</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_layer_get_mask (<link linkend="gint32">gint32</link> layer_ID);</programlisting>
<para>
Get the specified layer's mask if it exists.
</para>
<para>
This procedure returns the specified layer's mask, or -1 if none
exists.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The layer mask.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-add-mask"/>gimp_layer_add_mask ()</title>
<indexterm><primary>gimp_layer_add_mask</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_add_mask (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gint32">gint32</link> mask_ID);</programlisting>
<para>
Add a layer mask to the specified layer.
</para>
<para>
This procedure adds a layer mask to the specified layer. Layer masks
serve as an additional alpha channel for a layer. This procedure
will fail if a number of prerequisites aren't met. The layer cannot
already have a layer mask. The specified mask must exist and have
the same dimensions as the layer. Both the mask and the layer must
have been created for use with the specified image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer to receive the mask.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mask_ID</parameter>&nbsp;:</term>
<listitem><simpara> The mask to add to the layer.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-remove-mask"/>gimp_layer_remove_mask ()</title>
<indexterm><primary>gimp_layer_remove_mask</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_remove_mask (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="GimpMaskApplyMode">GimpMaskApplyMode</link> mode);</programlisting>
<para>
Remove the specified layer mask from the layer.
</para>
<para>
This procedure removes the specified layer mask from the layer. If
the mask doesn't exist, an error is returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer from which to remove mask.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mode</parameter>&nbsp;:</term>
<listitem><simpara> Removal mode.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-new-from-drawable"/>gimp_layer_new_from_drawable ()</title>
<indexterm><primary>gimp_layer_new_from_drawable</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_layer_new_from_drawable (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gint32">gint32</link> dest_image_ID);</programlisting>
<para>
Create a new layer by copying an existing drawable.
</para>
<para>
This procedure creates a new layer as a copy of the specified
drawable. The new layer still needs to be added to the image, as
this is not automatic. Add the new layer with the
'gimp_image_add_layer' command. Other attributes such as layer mask
modes, and offsets should be set with explicit procedure calls.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The source drawable from where the new layer is copied.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dest_image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The destination image to which to add the layer.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The newly copied layer.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-get-preserve-trans"/>gimp_layer_get_preserve_trans ()</title>
<indexterm><primary>gimp_layer_get_preserve_trans</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_get_preserve_trans (<link linkend="gint32">gint32</link> layer_ID);</programlisting>
<para>
Get the preserve transperancy setting of the specified layer.
</para>
<para>
This procedure returns the specified layer's preserve transperancy
setting.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The layer's preserve transperancy setting.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-set-preserve-trans"/>gimp_layer_set_preserve_trans ()</title>
<indexterm><primary>gimp_layer_set_preserve_trans</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_set_preserve_trans (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gboolean">gboolean</link> preserve_trans);</programlisting>
<para>
Set the preserve transperancy setting of the specified layer.
</para>
<para>
This procedure sets the specified layer's preserve transperancy
setting.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>preserve_trans</parameter>&nbsp;:</term>
<listitem><simpara> The new layer's preserve transperancy setting.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-get-apply-mask"/>gimp_layer_get_apply_mask ()</title>
<indexterm><primary>gimp_layer_get_apply_mask</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_get_apply_mask (<link linkend="gint32">gint32</link> layer_ID);</programlisting>
<para>
Get the apply mask of the specified layer.
</para>
<para>
This procedure returns the specified layer's apply mask. If the
value is non-zero, then the layer mask for this layer is currently
being composited with the layer's alpha channel.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The layer apply mask.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-set-apply-mask"/>gimp_layer_set_apply_mask ()</title>
<indexterm><primary>gimp_layer_set_apply_mask</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_set_apply_mask (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gboolean">gboolean</link> apply_mask);</programlisting>
<para>
Set the apply mask of the specified layer.
</para>
<para>
This procedure sets the specified layer's apply mask. This controls
whether the layer's mask is currently affecting the alpha channel.
If there is no layer mask, this function will return an error.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>apply_mask</parameter>&nbsp;:</term>
<listitem><simpara> The new layer apply mask.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-get-show-mask"/>gimp_layer_get_show_mask ()</title>
<indexterm><primary>gimp_layer_get_show_mask</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_get_show_mask (<link linkend="gint32">gint32</link> layer_ID);</programlisting>
<para>
Get the show mask of the specified layer.
</para>
<para>
This procedure returns the specified layer's show mask. If the value
is non-zero, then the layer mask for this layer is currently being
shown instead of the layer.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The layer show mask.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-set-show-mask"/>gimp_layer_set_show_mask ()</title>
<indexterm><primary>gimp_layer_set_show_mask</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_set_show_mask (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gboolean">gboolean</link> show_mask);</programlisting>
<para>
Set the show mask of the specified layer.
</para>
<para>
This procedure sets the specified layer's show mask. This controls
whether the layer or it's mask is visible. Non-zero values indicate
that the mask should be visible. If the layer has no mask, then this
function returns an error.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>show_mask</parameter>&nbsp;:</term>
<listitem><simpara> The new layer show mask.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-get-edit-mask"/>gimp_layer_get_edit_mask ()</title>
<indexterm><primary>gimp_layer_get_edit_mask</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_get_edit_mask (<link linkend="gint32">gint32</link> layer_ID);</programlisting>
<para>
Get the show mask of the specified layer.
</para>
<para>
This procedure returns the specified layer's show mask. If the value
is non-zero, then the layer mask for this layer is currently active,
and not the layer.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The layer show mask.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-set-edit-mask"/>gimp_layer_set_edit_mask ()</title>
<indexterm><primary>gimp_layer_set_edit_mask</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_set_edit_mask (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gboolean">gboolean</link> edit_mask);</programlisting>
<para>
Set the show mask of the specified layer.
</para>
<para>
This procedure sets the specified layer's show mask. This controls
whether the layer or it's mask is currently active for editing. If
the specified layer has no layer mask, then this procedure will
return an error.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>edit_mask</parameter>&nbsp;:</term>
<listitem><simpara> The new layer show mask.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-get-opacity"/>gimp_layer_get_opacity ()</title>
<indexterm><primary>gimp_layer_get_opacity</primary></indexterm><programlisting><link linkend="gdouble">gdouble</link> gimp_layer_get_opacity (<link linkend="gint32">gint32</link> layer_ID);</programlisting>
<para>
Get the opacity of the specified layer.
</para>
<para>
This procedure returns the specified layer's opacity.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The layer opacity.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-set-opacity"/>gimp_layer_set_opacity ()</title>
<indexterm><primary>gimp_layer_set_opacity</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_set_opacity (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="gdouble">gdouble</link> opacity);</programlisting>
<para>
Set the opacity of the specified layer.
</para>
<para>
This procedure sets the specified layer's opacity.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opacity</parameter>&nbsp;:</term>
<listitem><simpara> The new layer opacity.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-get-mode"/>gimp_layer_get_mode ()</title>
<indexterm><primary>gimp_layer_get_mode</primary></indexterm><programlisting><link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> gimp_layer_get_mode (<link linkend="gint32">gint32</link> layer_ID);</programlisting>
<para>
Get the combination mode of the specified layer.
</para>
<para>
This procedure returns the specified layer's combination mode.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The layer combination mode.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-set-mode"/>gimp_layer_set_mode ()</title>
<indexterm><primary>gimp_layer_set_mode</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_set_mode (<link linkend="gint32">gint32</link> layer_ID,
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> mode);</programlisting>
<para>
Set the combination mode of the specified layer.
</para>
<para>
This procedure sets the specified layer's combination mode.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mode</parameter>&nbsp;:</term>
<listitem><simpara> The new layer combination mode.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-is-floating-sel"/>gimp_layer_is_floating_sel ()</title>
<indexterm><primary>gimp_layer_is_floating_sel</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_layer_is_floating_sel (<link linkend="gint32">gint32</link> layer_ID);</programlisting>
<para>
Is the specified layer a floating selection?
</para>
<para>
This procedure returns whether the layer is a floating selection.
Floating selections are special cases of layers which are attached
to a specific drawable.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> The layer.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> Non-zero if the layer is a floating selection.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,217 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpmenu">
<refmeta>
<refentrytitle>gimpmenu</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpmenu</refname><refpurpose>Menus for selecting images, layers, channels and drawables</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> (<link linkend="GimpConstraintFunc">*GimpConstraintFunc</link>) (<link linkend="gint32">gint32</link> image_id,
<link linkend="gint32">gint32</link> drawable_id,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> (<link linkend="GimpMenuCallback">*GimpMenuCallback</link>) (<link linkend="gint32">gint32</link> any_id,
<link linkend="gpointer">gpointer</link> data);
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-image-menu-new">gimp_image_menu_new</link> (<link linkend="GimpConstraintFunc">GimpConstraintFunc</link> constraint,
<link linkend="GimpMenuCallback">GimpMenuCallback</link> callback,
<link linkend="gpointer">gpointer</link> data,
<link linkend="gint32">gint32</link> active_image);
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-layer-menu-new">gimp_layer_menu_new</link> (<link linkend="GimpConstraintFunc">GimpConstraintFunc</link> constraint,
<link linkend="GimpMenuCallback">GimpMenuCallback</link> callback,
<link linkend="gpointer">gpointer</link> data,
<link linkend="gint32">gint32</link> active_layer);
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-channel-menu-new">gimp_channel_menu_new</link> (<link linkend="GimpConstraintFunc">GimpConstraintFunc</link> constraint,
<link linkend="GimpMenuCallback">GimpMenuCallback</link> callback,
<link linkend="gpointer">gpointer</link> data,
<link linkend="gint32">gint32</link> active_channel);
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-drawable-menu-new">gimp_drawable_menu_new</link> (<link linkend="GimpConstraintFunc">GimpConstraintFunc</link> constraint,
<link linkend="GimpMenuCallback">GimpMenuCallback</link> callback,
<link linkend="gpointer">gpointer</link> data,
<link linkend="gint32">gint32</link> active_drawable);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpConstraintFunc"/>GimpConstraintFunc ()</title>
<indexterm role="deprecated"><primary>GimpConstraintFunc</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> (*GimpConstraintFunc) (<link linkend="gint32">gint32</link> image_id,
<link linkend="gint32">gint32</link> drawable_id,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<warning><para><literal>GimpConstraintFunc</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_id</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>drawable_id</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="GimpMenuCallback"/>GimpMenuCallback ()</title>
<indexterm role="deprecated"><primary>GimpMenuCallback</primary></indexterm><programlisting><link linkend="void">void</link> (*GimpMenuCallback) (<link linkend="gint32">gint32</link> any_id,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<warning><para><literal>GimpMenuCallback</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>any_id</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-menu-new"/>gimp_image_menu_new ()</title>
<indexterm role="deprecated"><primary>gimp_image_menu_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_image_menu_new (<link linkend="GimpConstraintFunc">GimpConstraintFunc</link> constraint,
<link linkend="GimpMenuCallback">GimpMenuCallback</link> callback,
<link linkend="gpointer">gpointer</link> data,
<link linkend="gint32">gint32</link> active_image);</programlisting>
<warning><para><literal>gimp_image_menu_new</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>constraint</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>active_image</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-layer-menu-new"/>gimp_layer_menu_new ()</title>
<indexterm role="deprecated"><primary>gimp_layer_menu_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_layer_menu_new (<link linkend="GimpConstraintFunc">GimpConstraintFunc</link> constraint,
<link linkend="GimpMenuCallback">GimpMenuCallback</link> callback,
<link linkend="gpointer">gpointer</link> data,
<link linkend="gint32">gint32</link> active_layer);</programlisting>
<warning><para><literal>gimp_layer_menu_new</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>constraint</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>active_layer</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-channel-menu-new"/>gimp_channel_menu_new ()</title>
<indexterm role="deprecated"><primary>gimp_channel_menu_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_channel_menu_new (<link linkend="GimpConstraintFunc">GimpConstraintFunc</link> constraint,
<link linkend="GimpMenuCallback">GimpMenuCallback</link> callback,
<link linkend="gpointer">gpointer</link> data,
<link linkend="gint32">gint32</link> active_channel);</programlisting>
<warning><para><literal>gimp_channel_menu_new</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>constraint</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>active_channel</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-drawable-menu-new"/>gimp_drawable_menu_new ()</title>
<indexterm role="deprecated"><primary>gimp_drawable_menu_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_drawable_menu_new (<link linkend="GimpConstraintFunc">GimpConstraintFunc</link> constraint,
<link linkend="GimpMenuCallback">GimpMenuCallback</link> callback,
<link linkend="gpointer">gpointer</link> data,
<link linkend="gint32">gint32</link> active_drawable);</programlisting>
<warning><para><literal>gimp_drawable_menu_new</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>constraint</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>active_drawable</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpmessage">
<refmeta>
<refentrytitle>gimpmessage</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpmessage</refname><refpurpose>Display a dialog box with a message.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-message">gimp_message</link> (const <link linkend="gchar">gchar</link> *message);
<link linkend="GimpMessageHandlerType">GimpMessageHandlerType</link> <link linkend="gimp-message-get-handler">gimp_message_get_handler</link>
(void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-message-set-handler">gimp_message_set_handler</link> (<link linkend="GimpMessageHandlerType">GimpMessageHandlerType</link> handler);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Display a dialog box with a message.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-message"/>gimp_message ()</title>
<indexterm><primary>gimp_message</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_message (const <link linkend="gchar">gchar</link> *message);</programlisting>
<para>
Displays a dialog box with a message.
</para>
<para>
Displays a dialog box with a message. Useful for status or error
reporting. The message must be in UTF-8 encoding.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>message</parameter>&nbsp;:</term>
<listitem><simpara> Message to display in the dialog.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-message-get-handler"/>gimp_message_get_handler ()</title>
<indexterm><primary>gimp_message_get_handler</primary></indexterm><programlisting><link linkend="GimpMessageHandlerType">GimpMessageHandlerType</link> gimp_message_get_handler
(void);</programlisting>
<para>
Returns the current state of where warning messages are displayed.
</para>
<para>
This procedure returns the way g_message warnings are displayed.
They can be shown in a dialog box or printed on the console where
gimp was started.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The current handler type.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-message-set-handler"/>gimp_message_set_handler ()</title>
<indexterm><primary>gimp_message_set_handler</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_message_set_handler (<link linkend="GimpMessageHandlerType">GimpMessageHandlerType</link> handler);</programlisting>
<para>
Controls where warning messages are displayed.
</para>
<para>
This procedure controls how g_message warnings are displayed. They
can be shown in a dialog box or printed on the console where gimp
was started.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>handler</parameter>&nbsp;:</term>
<listitem><simpara> The new handler type.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,470 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimppalette">
<refmeta>
<refentrytitle>gimppalette</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimppalette</refname><refpurpose>Functions operating on a single palette.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gchar">gchar</link>* <link linkend="gimp-palette-new">gimp_palette_new</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gchar">gchar</link>* <link linkend="gimp-palette-duplicate">gimp_palette_duplicate</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gchar">gchar</link>* <link linkend="gimp-palette-rename">gimp_palette_rename</link> (const <link linkend="gchar">gchar</link> *name,
const <link linkend="gchar">gchar</link> *new_name);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-delete">gimp_palette_delete</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-get-info">gimp_palette_get_info</link> (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *num_colors);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-add-entry">gimp_palette_add_entry</link> (const <link linkend="gchar">gchar</link> *name,
const <link linkend="gchar">gchar</link> *entry_name,
const <link linkend="GimpRGB">GimpRGB</link> *color,
<link linkend="gint">gint</link> *entry_num);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-delete-entry">gimp_palette_delete_entry</link> (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> entry_num);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-entry-get-color">gimp_palette_entry_get_color</link> (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> entry_num,
<link linkend="GimpRGB">GimpRGB</link> *color);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-entry-set-color">gimp_palette_entry_set_color</link> (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> entry_num,
const <link linkend="GimpRGB">GimpRGB</link> *color);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-entry-get-name">gimp_palette_entry_get_name</link> (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> entry_num,
<link linkend="gchar">gchar</link> **entry_name);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-entry-set-name">gimp_palette_entry_set_name</link> (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> entry_num,
const <link linkend="gchar">gchar</link> *entry_name);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-get-foreground">gimp_palette_get_foreground</link> (<link linkend="GimpRGB">GimpRGB</link> *foreground);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-get-background">gimp_palette_get_background</link> (<link linkend="GimpRGB">GimpRGB</link> *background);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-set-foreground">gimp_palette_set_foreground</link> (const <link linkend="GimpRGB">GimpRGB</link> *foreground);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-set-background">gimp_palette_set_background</link> (const <link linkend="GimpRGB">GimpRGB</link> *background);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-set-default-colors">gimp_palette_set_default_colors</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-swap-colors">gimp_palette_swap_colors</link> (void);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions operating on a single palette.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-palette-new"/>gimp_palette_new ()</title>
<indexterm role="GIMP"><primary>gimp_palette_new</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_palette_new (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Creates a new palette
</para>
<para>
This procedure creates a new, uninitialized palette</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The requested name of the new palette.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The actual new palette name.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-palette-duplicate"/>gimp_palette_duplicate ()</title>
<indexterm role="GIMP"><primary>gimp_palette_duplicate</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_palette_duplicate (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Duplicates a palette
</para>
<para>
This procedure creates an identical palette by a different name</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The palette name.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The name of the palette's copy.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-palette-rename"/>gimp_palette_rename ()</title>
<indexterm role="GIMP"><primary>gimp_palette_rename</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_palette_rename (const <link linkend="gchar">gchar</link> *name,
const <link linkend="gchar">gchar</link> *new_name);</programlisting>
<para>
Rename a palette
</para>
<para>
This procedure renames a palette</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The palette name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new_name</parameter>&nbsp;:</term>
<listitem><simpara> The new name of the palette.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The actual new name of the palette.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-palette-delete"/>gimp_palette_delete ()</title>
<indexterm role="GIMP"><primary>gimp_palette_delete</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_delete (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Deletes a palette
</para>
<para>
This procedure deletes a palette</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The palette name.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-palette-get-info"/>gimp_palette_get_info ()</title>
<indexterm role="GIMP"><primary>gimp_palette_get_info</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_get_info (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *num_colors);</programlisting>
<para>
Retrieve information about the specified palette.
</para>
<para>
This procedure retrieves information about the specified palette.
This includes the name, and the number of colors.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The palette name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_colors</parameter>&nbsp;:</term>
<listitem><simpara> The number of colors in the palette.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-palette-add-entry"/>gimp_palette_add_entry ()</title>
<indexterm role="GIMP"><primary>gimp_palette_add_entry</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_add_entry (const <link linkend="gchar">gchar</link> *name,
const <link linkend="gchar">gchar</link> *entry_name,
const <link linkend="GimpRGB">GimpRGB</link> *color,
<link linkend="gint">gint</link> *entry_num);</programlisting>
<para>
Adds a palette entry to the specified palette.
</para>
<para>
This procedure adds an entry to the specifed palette. It returns an
error if the entry palette does not exist.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The palette name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>entry_name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the entry.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
<listitem><simpara> The new entry's color color.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>entry_num</parameter>&nbsp;:</term>
<listitem><simpara> The index of the added entry.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-palette-delete-entry"/>gimp_palette_delete_entry ()</title>
<indexterm role="GIMP"><primary>gimp_palette_delete_entry</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_delete_entry (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> entry_num);</programlisting>
<para>
Deletes a palette entry from the specified palette.
</para>
<para>
This procedure deletes an entry from the specifed palette. It
returns an error if the entry palette does not exist.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The palette name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>entry_num</parameter>&nbsp;:</term>
<listitem><simpara> The index of the added entry.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-palette-entry-get-color"/>gimp_palette_entry_get_color ()</title>
<indexterm role="GIMP"><primary>gimp_palette_entry_get_color</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_entry_get_color (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> entry_num,
<link linkend="GimpRGB">GimpRGB</link> *color);</programlisting>
<para>
Gets the specified palette entry from the specified palette.
</para>
<para>
This procedure retrieves the color of the zero-based entry specifed
for the specified palette. It returns an error if the entry does not
exist.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The palette name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>entry_num</parameter>&nbsp;:</term>
<listitem><simpara> The entry to retrieve.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
<listitem><simpara> The color requested.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-palette-entry-set-color"/>gimp_palette_entry_set_color ()</title>
<indexterm role="GIMP"><primary>gimp_palette_entry_set_color</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_entry_set_color (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> entry_num,
const <link linkend="GimpRGB">GimpRGB</link> *color);</programlisting>
<para>
Sets the specified palette entry in the specified palette.
</para>
<para>
This procedure sets the color of the zero-based entry specifed for
the specified palette. It returns an error if the entry does not
exist.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The palette name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>entry_num</parameter>&nbsp;:</term>
<listitem><simpara> The entry to retrieve.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
<listitem><simpara> The new color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-palette-entry-get-name"/>gimp_palette_entry_get_name ()</title>
<indexterm role="GIMP"><primary>gimp_palette_entry_get_name</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_entry_get_name (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> entry_num,
<link linkend="gchar">gchar</link> **entry_name);</programlisting>
<para>
Gets the specified palette entry from the specified palette.
</para>
<para>
This procedure retrieves the name of the zero-based entry specifed
for the specified palette. It returns an error if the entry does not
exist.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The palette name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>entry_num</parameter>&nbsp;:</term>
<listitem><simpara> The entry to retrieve.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>entry_name</parameter>&nbsp;:</term>
<listitem><simpara> The name requested.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-palette-entry-set-name"/>gimp_palette_entry_set_name ()</title>
<indexterm role="GIMP"><primary>gimp_palette_entry_set_name</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_entry_set_name (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> entry_num,
const <link linkend="gchar">gchar</link> *entry_name);</programlisting>
<para>
Sets the specified palette entry in the specified palette.
</para>
<para>
This procedure sets the name of the zero-based entry specifed for
the specified palette. It returns an error if the entry does not
exist.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The palette name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>entry_num</parameter>&nbsp;:</term>
<listitem><simpara> The entry to retrieve.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>entry_name</parameter>&nbsp;:</term>
<listitem><simpara> The new name.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-palette-get-foreground"/>gimp_palette_get_foreground ()</title>
<indexterm role="deprecated"><primary>gimp_palette_get_foreground</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_get_foreground (<link linkend="GimpRGB">GimpRGB</link> *foreground);</programlisting>
<warning><para><literal>gimp_palette_get_foreground</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Get the current GIMP foreground color.
</para>
<para>
This procedure retrieves the current GIMP foreground color. The
foreground color is used in a variety of tools such as paint tools,
blending, and bucket fill.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>foreground</parameter>&nbsp;:</term>
<listitem><simpara> The foreground color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-palette-get-background"/>gimp_palette_get_background ()</title>
<indexterm role="deprecated"><primary>gimp_palette_get_background</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_get_background (<link linkend="GimpRGB">GimpRGB</link> *background);</programlisting>
<warning><para><literal>gimp_palette_get_background</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Get the current GIMP background color.
</para>
<para>
This procedure retrieves the current GIMP background color. The
background color is used in a variety of tools such as blending,
erasing (with non-alpha images), and image filling.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>background</parameter>&nbsp;:</term>
<listitem><simpara> The background color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-palette-set-foreground"/>gimp_palette_set_foreground ()</title>
<indexterm role="deprecated"><primary>gimp_palette_set_foreground</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_set_foreground (const <link linkend="GimpRGB">GimpRGB</link> *foreground);</programlisting>
<warning><para><literal>gimp_palette_set_foreground</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Set the current GIMP foreground color.
</para>
<para>
This procedure sets the current GIMP foreground color. After this is
set, operations which use foreground such as paint tools, blending,
and bucket fill will use the new value.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>foreground</parameter>&nbsp;:</term>
<listitem><simpara> The foreground color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-palette-set-background"/>gimp_palette_set_background ()</title>
<indexterm role="deprecated"><primary>gimp_palette_set_background</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_set_background (const <link linkend="GimpRGB">GimpRGB</link> *background);</programlisting>
<warning><para><literal>gimp_palette_set_background</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Set the current GIMP background color.
</para>
<para>
This procedure sets the current GIMP background color. After this is
set, operations which use background such as blending, filling
images, clearing, and erasing (in non-alpha images) will use the new
value.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>background</parameter>&nbsp;:</term>
<listitem><simpara> The background color.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-palette-set-default-colors"/>gimp_palette_set_default_colors ()</title>
<indexterm role="deprecated"><primary>gimp_palette_set_default_colors</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_set_default_colors (void);</programlisting>
<warning><para><literal>gimp_palette_set_default_colors</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Set the current GIMP foreground and background colors to black and
white.
</para>
<para>
This procedure sets the current GIMP foreground and background
colors to their initial default values, black and white.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-palette-swap-colors"/>gimp_palette_swap_colors ()</title>
<indexterm role="deprecated"><primary>gimp_palette_swap_colors</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_swap_colors (void);</programlisting>
<warning><para><literal>gimp_palette_swap_colors</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Swap the current GIMP foreground and background colors.
</para>
<para>
This procedure swaps the current GIMP foreground and background
colors, so that the new foreground color becomes the old background
color and vice versa.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimppalettemenu">
<refmeta>
<refentrytitle>gimppalettemenu</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimppalettemenu</refname><refpurpose>A widget for selecting palettes.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-palette-select-widget-new">gimp_palette_select_widget_new</link> (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *palette_name,
<link linkend="GimpRunPaletteCallback">GimpRunPaletteCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> <link linkend="gimp-palette-select-widget-close">gimp_palette_select_widget_close</link>
(<link linkend="GtkWidget">GtkWidget</link> *widget);
<link linkend="void">void</link> <link linkend="gimp-palette-select-widget-set">gimp_palette_select_widget_set</link> (<link linkend="GtkWidget">GtkWidget</link> *widget,
const <link linkend="gchar">gchar</link> *palette_name);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
A widget for selecting palettes.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-palette-select-widget-new"/>gimp_palette_select_widget_new ()</title>
<indexterm role="GIMP"><primary>gimp_palette_select_widget_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_palette_select_widget_new (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *palette_name,
<link linkend="GimpRunPaletteCallback">GimpRunPaletteCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Creates a new <link linkend="GtkWidget"><type>GtkWidget</type></link> that completely controls the selection of
a palette. This widget is suitable for placement in a table in a
plug-in dialog.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>title</parameter>&nbsp;:</term>
<listitem><simpara> Title of the dialog to use or <literal>NULL</literal> means to use the default
title.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>palette_name</parameter>&nbsp;:</term>
<listitem><simpara> Initial palette name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara> A function to call when the selected palette changes.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> A pointer to arbitary data to be used in the call to <parameter>callback</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> A <link linkend="GtkWidget"><type>GtkWidget</type></link> that you can use in your UI.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-palette-select-widget-close"/>gimp_palette_select_widget_close ()</title>
<indexterm role="GIMP"><primary>gimp_palette_select_widget_close</primary></indexterm><programlisting><link linkend="void">void</link> gimp_palette_select_widget_close
(<link linkend="GtkWidget">GtkWidget</link> *widget);</programlisting>
<para>
Closes the popup window associated with <parameter>widget</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>widget</parameter>&nbsp;:</term>
<listitem><simpara> A palette select widget.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-palette-select-widget-set"/>gimp_palette_select_widget_set ()</title>
<indexterm role="GIMP"><primary>gimp_palette_select_widget_set</primary></indexterm><programlisting><link linkend="void">void</link> gimp_palette_select_widget_set (<link linkend="GtkWidget">GtkWidget</link> *widget,
const <link linkend="gchar">gchar</link> *palette_name);</programlisting>
<para>
Sets the current palette for the palette select widget. Calls the
callback function if one was supplied in the call to
<link linkend="gimp-palette-select-widget-new"><function>gimp_palette_select_widget_new()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>widget</parameter>&nbsp;:</term>
<listitem><simpara> A palette select widget.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>palette_name</parameter>&nbsp;:</term>
<listitem><simpara> Palette name to set; <literal>NULL</literal> means no change.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimppalettes">
<refmeta>
<refentrytitle>gimppalettes</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimppalettes</refname><refpurpose>Operations related to palettes.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palettes-refresh">gimp_palettes_refresh</link> (void);
<link linkend="gchar">gchar</link>** <link linkend="gimp-palettes-get-list">gimp_palettes_get_list</link> (const <link linkend="gchar">gchar</link> *filter,
<link linkend="gint">gint</link> *num_palettes);
<link linkend="gchar">gchar</link>* <link linkend="gimp-palettes-get-palette">gimp_palettes_get_palette</link> (<link linkend="gint">gint</link> *num_colors);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palettes-set-palette">gimp_palettes_set_palette</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gchar">gchar</link>* <link linkend="gimp-palettes-get-palette-entry">gimp_palettes_get_palette_entry</link> (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> entry_num,
<link linkend="gint">gint</link> *num_colors,
<link linkend="GimpRGB">GimpRGB</link> *color);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Operations related to palettes.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-palettes-refresh"/>gimp_palettes_refresh ()</title>
<indexterm><primary>gimp_palettes_refresh</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palettes_refresh (void);</programlisting>
<para>
Refreshes current palettes. This function always succeeds.
</para>
<para>
This procedure retrieves all palettes currently in the user's
palette path and updates the palette dialogs accordingly.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-palettes-get-list"/>gimp_palettes_get_list ()</title>
<indexterm><primary>gimp_palettes_get_list</primary></indexterm><programlisting><link linkend="gchar">gchar</link>** gimp_palettes_get_list (const <link linkend="gchar">gchar</link> *filter,
<link linkend="gint">gint</link> *num_palettes);</programlisting>
<para>
Retrieves a list of all of the available palettes
</para>
<para>
This procedure returns a complete listing of available palettes.
Each name returned can be used as input to the command
'gimp_context_set_palette'.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>filter</parameter>&nbsp;:</term>
<listitem><simpara> An optional regular expression used to filter the list.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_palettes</parameter>&nbsp;:</term>
<listitem><simpara> The number of palettes in the list.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The list of palette names.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-palettes-get-palette"/>gimp_palettes_get_palette ()</title>
<indexterm role="deprecated"><primary>gimp_palettes_get_palette</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_palettes_get_palette (<link linkend="gint">gint</link> *num_colors);</programlisting>
<warning><para><literal>gimp_palettes_get_palette</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-context-get-palette"><function>gimp_context_get_palette()</function></link>
instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>num_colors</parameter>&nbsp;:</term>
<listitem><simpara> The palette num_colors.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The palette name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-palettes-set-palette"/>gimp_palettes_set_palette ()</title>
<indexterm role="deprecated"><primary>gimp_palettes_set_palette</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palettes_set_palette (const <link linkend="gchar">gchar</link> *name);</programlisting>
<warning><para><literal>gimp_palettes_set_palette</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-context-set-palette"><function>gimp_context_set_palette()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The palette name.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-palettes-get-palette-entry"/>gimp_palettes_get_palette_entry ()</title>
<indexterm role="deprecated"><primary>gimp_palettes_get_palette_entry</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_palettes_get_palette_entry (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> entry_num,
<link linkend="gint">gint</link> *num_colors,
<link linkend="GimpRGB">GimpRGB</link> *color);</programlisting>
<warning><para><literal>gimp_palettes_get_palette_entry</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-palette-entry-get-color"><function>gimp_palette_entry_get_color()</function></link>
instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The palette name (\"\" means currently active palette).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>entry_num</parameter>&nbsp;:</term>
<listitem><simpara> The entry to retrieve.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_colors</parameter>&nbsp;:</term>
<listitem><simpara> The palette num_colors.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
<listitem><simpara> The color requested.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The palette name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,183 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimppaletteselect">
<refmeta>
<refentrytitle>gimppaletteselect</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimppaletteselect</refname><refpurpose>Functions providing a palette selection dialog.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="void">void</link> (<link linkend="GimpRunPaletteCallback">*GimpRunPaletteCallback</link>) (const <link linkend="gchar">gchar</link> *palette_name,
<link linkend="gboolean">gboolean</link> dialog_closing,
<link linkend="gpointer">gpointer</link> user_data);
const <link linkend="gchar">gchar</link>* <link linkend="gimp-palette-select-new">gimp_palette_select_new</link> (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *palette_name,
<link linkend="GimpRunPaletteCallback">GimpRunPaletteCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> <link linkend="gimp-palette-select-destroy">gimp_palette_select_destroy</link> (const <link linkend="gchar">gchar</link> *palette_callback);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palettes-popup">gimp_palettes_popup</link> (const <link linkend="gchar">gchar</link> *palette_callback,
const <link linkend="gchar">gchar</link> *popup_title,
const <link linkend="gchar">gchar</link> *initial_palette);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palettes-close-popup">gimp_palettes_close_popup</link> (const <link linkend="gchar">gchar</link> *palette_callback);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palettes-set-popup">gimp_palettes_set_popup</link> (const <link linkend="gchar">gchar</link> *palette_callback,
const <link linkend="gchar">gchar</link> *palette_name);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions providing a palette selection dialog.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpRunPaletteCallback"/>GimpRunPaletteCallback ()</title>
<indexterm><primary>GimpRunPaletteCallback</primary></indexterm><programlisting><link linkend="void">void</link> (*GimpRunPaletteCallback) (const <link linkend="gchar">gchar</link> *palette_name,
<link linkend="gboolean">gboolean</link> dialog_closing,
<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>palette_name</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dialog_closing</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-palette-select-new"/>gimp_palette_select_new ()</title>
<indexterm><primary>gimp_palette_select_new</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gimp_palette_select_new (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *palette_name,
<link linkend="GimpRunPaletteCallback">GimpRunPaletteCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>title</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>palette_name</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-palette-select-destroy"/>gimp_palette_select_destroy ()</title>
<indexterm><primary>gimp_palette_select_destroy</primary></indexterm><programlisting><link linkend="void">void</link> gimp_palette_select_destroy (const <link linkend="gchar">gchar</link> *palette_callback);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>palette_callback</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-palettes-popup"/>gimp_palettes_popup ()</title>
<indexterm><primary>gimp_palettes_popup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palettes_popup (const <link linkend="gchar">gchar</link> *palette_callback,
const <link linkend="gchar">gchar</link> *popup_title,
const <link linkend="gchar">gchar</link> *initial_palette);</programlisting>
<para>
Invokes the Gimp palette selection.
</para>
<para>
This procedure popups the palette selection dialog.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>palette_callback</parameter>&nbsp;:</term>
<listitem><simpara> The callback PDB proc to call when palette selection is made.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>popup_title</parameter>&nbsp;:</term>
<listitem><simpara> Title to give the palette popup window.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>initial_palette</parameter>&nbsp;:</term>
<listitem><simpara> The name of the palette to set as the first selected.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-palettes-close-popup"/>gimp_palettes_close_popup ()</title>
<indexterm><primary>gimp_palettes_close_popup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palettes_close_popup (const <link linkend="gchar">gchar</link> *palette_callback);</programlisting>
<para>
Popdown the Gimp palette selection.
</para>
<para>
This procedure closes an opened palette selection dialog.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>palette_callback</parameter>&nbsp;:</term>
<listitem><simpara> The name of the callback registered for this popup.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-palettes-set-popup"/>gimp_palettes_set_popup ()</title>
<indexterm><primary>gimp_palettes_set_popup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palettes_set_popup (const <link linkend="gchar">gchar</link> *palette_callback,
const <link linkend="gchar">gchar</link> *palette_name);</programlisting>
<para>
Sets the current palette selection in a popup.
</para>
<para>
Sets the current palette selection in a popup.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>palette_callback</parameter>&nbsp;:</term>
<listitem><simpara> The name of the callback registered for this popup.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>palette_name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the palette to set as selected.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,490 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimppaths">
<refmeta>
<refentrytitle>gimppaths</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimppaths</refname><refpurpose>Operations related to paths.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gchar">gchar</link>** <link linkend="gimp-path-list">gimp_path_list</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> *num_paths);
<link linkend="gint">gint</link> <link linkend="gimp-path-get-points">gimp_path_get_points</link> (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *path_closed,
<link linkend="gint">gint</link> *num_path_point_details,
<link linkend="gdouble">gdouble</link> **points_pairs);
<link linkend="gchar">gchar</link>* <link linkend="gimp-path-get-current">gimp_path_get_current</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-path-set-current">gimp_path_set_current</link> (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-path-set-points">gimp_path_set_points</link> (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> ptype,
<link linkend="gint">gint</link> num_path_points,
const <link linkend="gdouble">gdouble</link> *points_pairs);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-path-stroke-current">gimp_path_stroke_current</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gint">gint</link> <link linkend="gimp-path-get-point-at-dist">gimp_path_get_point_at_dist</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gdouble">gdouble</link> distance,
<link linkend="gint">gint</link> *y_point,
<link linkend="gdouble">gdouble</link> *slope);
<link linkend="gint">gint</link> <link linkend="gimp-path-get-tattoo">gimp_path_get_tattoo</link> (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name);
<link linkend="gchar">gchar</link>* <link linkend="gimp-get-path-by-tattoo">gimp_get_path_by_tattoo</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> tattoo);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-path-delete">gimp_path_delete</link> (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name);
<link linkend="gint">gint</link> <link linkend="gimp-path-get-locked">gimp_path_get_locked</link> (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-path-set-locked">gimp_path_set_locked</link> (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> lockstatus);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-path-set-tattoo">gimp_path_set_tattoo</link> (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> tattovalue);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-path-to-selection">gimp_path_to_selection</link> (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name,
<link linkend="GimpChannelOps">GimpChannelOps</link> op,
<link linkend="gboolean">gboolean</link> antialias,
<link linkend="gboolean">gboolean</link> feather,
<link linkend="gdouble">gdouble</link> feather_radius_x,
<link linkend="gdouble">gdouble</link> feather_radius_y);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-path-import">gimp_path_import</link> (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *filename,
<link linkend="gboolean">gboolean</link> merge,
<link linkend="gboolean">gboolean</link> scale);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Operations related to paths.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-path-list"/>gimp_path_list ()</title>
<indexterm><primary>gimp_path_list</primary></indexterm><programlisting><link linkend="gchar">gchar</link>** gimp_path_list (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> *num_paths);</programlisting>
<para>
List the paths associated with the passed image.
</para>
<para>
List the paths associated with the passed image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The ID of the image to list the paths from.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_paths</parameter>&nbsp;:</term>
<listitem><simpara> The number of paths returned.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> List of the paths belonging to this image.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-path-get-points"/>gimp_path_get_points ()</title>
<indexterm><primary>gimp_path_get_points</primary></indexterm><programlisting><link linkend="gint">gint</link> gimp_path_get_points (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *path_closed,
<link linkend="gint">gint</link> *num_path_point_details,
<link linkend="gdouble">gdouble</link> **points_pairs);</programlisting>
<para>
List the points associated with the named path.
</para>
<para>
List the points associated with the named path.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The ID of the image to list the paths from.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the path whose points should be listed.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>path_closed</parameter>&nbsp;:</term>
<listitem><simpara> Return if the path is closed. (0 = path open, 1 = path closed).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_path_point_details</parameter>&nbsp;:</term>
<listitem><simpara> The number of points returned. Each point is made up of (x, y, pnt_type) of floats.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>points_pairs</parameter>&nbsp;:</term>
<listitem><simpara> The points in the path represented as 3 floats. The first is the x pos, next is the y pos, last is the type of the pnt. The type field is dependant on the path type. For beziers (type 1 paths) the type can either be (1.0 = BEZIER_ANCHOR, 2.0 = BEZIER_CONTROL, 3.0 = BEZIER_MOVE). Note all points are returned in pixel resolution.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The type of the path. Currently only one type (1 = Bezier) is supported.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-path-get-current"/>gimp_path_get_current ()</title>
<indexterm><primary>gimp_path_get_current</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_path_get_current (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
The name of the current path. Error if no paths.
</para>
<para>
The name of the current path. Error if no paths.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The ID of the image to get the current path from.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The name of the current path.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-path-set-current"/>gimp_path_set_current ()</title>
<indexterm><primary>gimp_path_set_current</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_path_set_current (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Sets the current path associated with the passed image.
</para>
<para>
Sets a named path as the current path.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The ID of the image in which a path will become current.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the path to make current.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-path-set-points"/>gimp_path_set_points ()</title>
<indexterm><primary>gimp_path_set_points</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_path_set_points (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> ptype,
<link linkend="gint">gint</link> num_path_points,
const <link linkend="gdouble">gdouble</link> *points_pairs);</programlisting>
<para>
Set the points associated with the named path.
</para>
<para>
Set the points associated with the named path.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The ID of the image to set the paths in.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the path to create. If it exists then a unique name will be created - query the list of paths if you want to make sure that the name of the path you create is unique. This will be set as the current path.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ptype</parameter>&nbsp;:</term>
<listitem><simpara> The type of the path. Currently only one type (1 = Bezier) is supported.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_path_points</parameter>&nbsp;:</term>
<listitem><simpara> The number of elements in the array, i.e. the number of points in the path * 3. Each point is made up of (x, y, type) of floats. Currently only the creation of bezier curves is allowed. The type parameter must be set to (1) to indicate a BEZIER type curve. Note that for BEZIER curves, points must be given in the following order: ACCACCAC... If the path is not closed the last control point is missed off. Points consist of three control points (control/anchor/control) so for a curve that is not closed there must be at least two points passed (2 x,y pairs). If (num_path_points/3) % 3 = 0 then the path is assumed to be closed and the points are ACCACCACCACC.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>points_pairs</parameter>&nbsp;:</term>
<listitem><simpara> The points in the path represented as 3 floats. The first is the x pos, next is the y pos, last is the type of the pnt. The type field is dependant on the path type. For beziers (type 1 paths) the type can either be (1.0 = BEZIER_ANCHOR, 2.0 = BEZIER_CONTROL, 3.0= BEZIER_MOVE). Note all points are returned in pixel resolution.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-path-stroke-current"/>gimp_path_stroke_current ()</title>
<indexterm><primary>gimp_path_stroke_current</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_path_stroke_current (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Stroke the current path in the passed image.
</para>
<para>
Stroke the current path in the passed image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The ID of the image which contains the path to stroke.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-path-get-point-at-dist"/>gimp_path_get_point_at_dist ()</title>
<indexterm><primary>gimp_path_get_point_at_dist</primary></indexterm><programlisting><link linkend="gint">gint</link> gimp_path_get_point_at_dist (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gdouble">gdouble</link> distance,
<link linkend="gint">gint</link> *y_point,
<link linkend="gdouble">gdouble</link> *slope);</programlisting>
<para>
Get point on a path at a specified distance along the path.
</para>
<para>
This will return the x,y position of a point at a given distance
along the bezier curve. The distance will be obtained by first
digitizing the curve internally and then walking along the curve.
For a closed curve the start of the path is the first point on the
path that was created. This might not be obvious. Note the current
path is used.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The ID of the image the paths belongs to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>distance</parameter>&nbsp;:</term>
<listitem><simpara> The distance along the path.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y_point</parameter>&nbsp;:</term>
<listitem><simpara> The y position of the point.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>slope</parameter>&nbsp;:</term>
<listitem><simpara> The slope (dy / dx) at the specified point.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The x position of the point.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-path-get-tattoo"/>gimp_path_get_tattoo ()</title>
<indexterm><primary>gimp_path_get_tattoo</primary></indexterm><programlisting><link linkend="gint">gint</link> gimp_path_get_tattoo (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Returns the tattoo associated with the name path.
</para>
<para>
This procedure returns the tattoo associated with the specified
path. A tattoo is a unique and permanent identifier attached to a
path that can be used to uniquely identify a path within an image
even between sessions.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the path whose tattoo should be obtained.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The tattoo associated with the named path.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-get-path-by-tattoo"/>gimp_get_path_by_tattoo ()</title>
<indexterm><primary>gimp_get_path_by_tattoo</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_get_path_by_tattoo (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> tattoo);</programlisting>
<para>
Return the name of the path with the given tattoo.
</para>
<para>
The procedure returns the name of the path in the specified image
which has the passed tattoo. The tattoos are unique within the image
and will be preserved across sessions and through renaming of the
path. An error is returned if no path with the specified tattoo can
be found.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>tattoo</parameter>&nbsp;:</term>
<listitem><simpara> The tattoo of the required path.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The name of the path with the specified tattoo.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-path-delete"/>gimp_path_delete ()</title>
<indexterm><primary>gimp_path_delete</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_path_delete (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Delete the named path associated with the passed image.
</para>
<para>
Delete the named path.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The ID of the image to delete the path from.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the path to delete.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-path-get-locked"/>gimp_path_get_locked ()</title>
<indexterm><primary>gimp_path_get_locked</primary></indexterm><programlisting><link linkend="gint">gint</link> gimp_path_get_locked (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Returns the locked status associated with the named path.
</para>
<para>
This procedure returns the lock status associated with the specified
path. A path can be \"locked\" which means that the transformation
tool operations will also apply to the path.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the path whose locked status should be obtained.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The lock status associated with the name path. 0 is returned if the path is not locked. 1 is returned if the path is locked.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-path-set-locked"/>gimp_path_set_locked ()</title>
<indexterm><primary>gimp_path_set_locked</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_path_set_locked (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> lockstatus);</programlisting>
<para>
Set the locked status associated with the named path.
</para>
<para>
This procedure sets the lock status associated with the specified
path. A path can be \"locked\" which means that the transformation
tool operations will also apply to the path.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> the name of the path whose locked status should be set.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>lockstatus</parameter>&nbsp;:</term>
<listitem><simpara> The lock status associated with the name path. 0 if the path is not locked. 1 if the path is to be locked.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-path-set-tattoo"/>gimp_path_set_tattoo ()</title>
<indexterm><primary>gimp_path_set_tattoo</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_path_set_tattoo (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> tattovalue);</programlisting>
<para>
Sets the tattoo associated with the named path.
</para>
<para>
This procedure sets the tattoo associated with the specified path. A
tattoo is a unique and permenant identifier attached to a path that
can be used to uniquely identify a path within an image even between
sessions. Note that the value passed to this function must have been
obtained from a previous call to path_get_tattoo.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> the name of the path whose tattoo should be set.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>tattovalue</parameter>&nbsp;:</term>
<listitem><simpara> The tattoo associated with the name path. Only values returned from 'path_get_tattoo' should be used here.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-path-to-selection"/>gimp_path_to_selection ()</title>
<indexterm><primary>gimp_path_to_selection</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_path_to_selection (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *name,
<link linkend="GimpChannelOps">GimpChannelOps</link> op,
<link linkend="gboolean">gboolean</link> antialias,
<link linkend="gboolean">gboolean</link> feather,
<link linkend="gdouble">gdouble</link> feather_radius_x,
<link linkend="gdouble">gdouble</link> feather_radius_y);</programlisting>
<para>
Transforms the active path into a selection
</para>
<para>
This procedure renders the desired path into the current selection.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the path which should be made into selection.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>op</parameter>&nbsp;:</term>
<listitem><simpara> The desired operation with current selection.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>antialias</parameter>&nbsp;:</term>
<listitem><simpara> Antialias selection.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>feather</parameter>&nbsp;:</term>
<listitem><simpara> Feather selection.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>feather_radius_x</parameter>&nbsp;:</term>
<listitem><simpara> Feather radius x.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>feather_radius_y</parameter>&nbsp;:</term>
<listitem><simpara> Feather radius y.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-path-import"/>gimp_path_import ()</title>
<indexterm><primary>gimp_path_import</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_path_import (<link linkend="gint32">gint32</link> image_ID,
const <link linkend="gchar">gchar</link> *filename,
<link linkend="gboolean">gboolean</link> merge,
<link linkend="gboolean">gboolean</link> scale);</programlisting>
<para>
Import paths from an SVG file.
</para>
<para>
This procedure imports paths from an SVG file. This is a temporary
solution until the new vectors PDB API is in place. Don't rely on
this function being available in future GIMP releases.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
<listitem><simpara> The name of the SVG file to import.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>merge</parameter>&nbsp;:</term>
<listitem><simpara> Merge paths into a single vectors object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>scale</parameter>&nbsp;:</term>
<listitem><simpara> Scale the SVG to image dimensions.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimppattern">
<refmeta>
<refentrytitle>gimppattern</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimppattern</refname><refpurpose>Functions operating on a single pattern.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-pattern-get-info">gimp_pattern_get_info</link> (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *bpp);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-pattern-get-pixels">gimp_pattern_get_pixels</link> (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *bpp,
<link linkend="gint">gint</link> *num_color_bytes,
<link linkend="guint8">guint8</link> **color_bytes);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions operating on a single pattern.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-pattern-get-info"/>gimp_pattern_get_info ()</title>
<indexterm role="GIMP"><primary>gimp_pattern_get_info</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_pattern_get_info (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *bpp);</programlisting>
<para>
Retrieve information about the specified pattern.
</para>
<para>
This procedure retrieves information about the specified pattern.
This includes the pattern extents (width and height).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The pattern name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> The pattern width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> The pattern height.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>bpp</parameter>&nbsp;:</term>
<listitem><simpara> The pattern bpp.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-pattern-get-pixels"/>gimp_pattern_get_pixels ()</title>
<indexterm role="GIMP"><primary>gimp_pattern_get_pixels</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_pattern_get_pixels (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *bpp,
<link linkend="gint">gint</link> *num_color_bytes,
<link linkend="guint8">guint8</link> **color_bytes);</programlisting>
<para>
Retrieve information about the specified pattern (including pixels).
</para>
<para>
This procedure retrieves information about the specified. This
includes the pattern extents (width and height), its bpp and its
pixel data.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The pattern name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> The pattern width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> The pattern height.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>bpp</parameter>&nbsp;:</term>
<listitem><simpara> The pattern bpp.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_color_bytes</parameter>&nbsp;:</term>
<listitem><simpara> Number of pattern bytes.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color_bytes</parameter>&nbsp;:</term>
<listitem><simpara> The pattern data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimppatternmenu">
<refmeta>
<refentrytitle>gimppatternmenu</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimppatternmenu</refname><refpurpose>A widget for selecting patterns.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-pattern-select-widget-new">gimp_pattern_select_widget_new</link> (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *pattern_name,
<link linkend="GimpRunPatternCallback">GimpRunPatternCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> <link linkend="gimp-pattern-select-widget-close">gimp_pattern_select_widget_close</link>
(<link linkend="GtkWidget">GtkWidget</link> *widget);
<link linkend="void">void</link> <link linkend="gimp-pattern-select-widget-set">gimp_pattern_select_widget_set</link> (<link linkend="GtkWidget">GtkWidget</link> *widget,
const <link linkend="gchar">gchar</link> *pattern_name);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
A widget for selecting patterns.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-pattern-select-widget-new"/>gimp_pattern_select_widget_new ()</title>
<indexterm><primary>gimp_pattern_select_widget_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_pattern_select_widget_new (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *pattern_name,
<link linkend="GimpRunPatternCallback">GimpRunPatternCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Creates a new <link linkend="GtkWidget"><type>GtkWidget</type></link> that completely controls the selection of
a pattern. This widget is suitable for placement in a table in a
plug-in dialog.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>title</parameter>&nbsp;:</term>
<listitem><simpara> Title of the dialog to use or <literal>NULL</literal> to use the default title.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pattern_name</parameter>&nbsp;:</term>
<listitem><simpara> Initial pattern name or <literal>NULL</literal> to use current selection.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara> A function to call when the selected pattern changes.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> A pointer to arbitary data to be used in the call to <parameter>callback</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> A <link linkend="GtkWidget"><type>GtkWidget</type></link> that you can use in your UI.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pattern-select-widget-close"/>gimp_pattern_select_widget_close ()</title>
<indexterm><primary>gimp_pattern_select_widget_close</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pattern_select_widget_close
(<link linkend="GtkWidget">GtkWidget</link> *widget);</programlisting>
<para>
Closes the popup window associated with <parameter>widget</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>widget</parameter>&nbsp;:</term>
<listitem><simpara> A pattern select widget.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pattern-select-widget-set"/>gimp_pattern_select_widget_set ()</title>
<indexterm><primary>gimp_pattern_select_widget_set</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pattern_select_widget_set (<link linkend="GtkWidget">GtkWidget</link> *widget,
const <link linkend="gchar">gchar</link> *pattern_name);</programlisting>
<para>
Sets the current pattern for the pattern select widget. Calls the
callback function if one was supplied in the call to
<link linkend="gimp-pattern-select-widget-new"><function>gimp_pattern_select_widget_new()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>widget</parameter>&nbsp;:</term>
<listitem><simpara> A pattern select widget.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pattern_name</parameter>&nbsp;:</term>
<listitem><simpara> Pattern name to set. NULL means no change.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,169 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimppatterns">
<refmeta>
<refentrytitle>gimppatterns</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimppatterns</refname><refpurpose>Functions relating to patterns.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-patterns-refresh">gimp_patterns_refresh</link> (void);
<link linkend="gchar">gchar</link>** <link linkend="gimp-patterns-get-list">gimp_patterns_get_list</link> (const <link linkend="gchar">gchar</link> *filter,
<link linkend="gint">gint</link> *num_patterns);
<link linkend="gchar">gchar</link>* <link linkend="gimp-patterns-get-pattern">gimp_patterns_get_pattern</link> (<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-patterns-set-pattern">gimp_patterns_set_pattern</link> (const <link linkend="gchar">gchar</link> *name);
<link linkend="gchar">gchar</link>* <link linkend="gimp-patterns-get-pattern-data">gimp_patterns_get_pattern_data</link> (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *mask_bpp,
<link linkend="gint">gint</link> *length,
<link linkend="guint8">guint8</link> **mask_data);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions relating to patterns.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-patterns-refresh"/>gimp_patterns_refresh ()</title>
<indexterm><primary>gimp_patterns_refresh</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_patterns_refresh (void);</programlisting>
<para>
Refresh current patterns. This function always succeeds.
</para>
<para>
This procedure retrieves all patterns currently in the user's
pattern path and updates all pattern dialogs accordingly.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-patterns-get-list"/>gimp_patterns_get_list ()</title>
<indexterm><primary>gimp_patterns_get_list</primary></indexterm><programlisting><link linkend="gchar">gchar</link>** gimp_patterns_get_list (const <link linkend="gchar">gchar</link> *filter,
<link linkend="gint">gint</link> *num_patterns);</programlisting>
<para>
Retrieve a complete listing of the available patterns.
</para>
<para>
This procedure returns a complete listing of available GIMP
patterns. Each name returned can be used as input to the
'gimp_context_set_pattern'.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>filter</parameter>&nbsp;:</term>
<listitem><simpara> An optional regular expression used to filter the list.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_patterns</parameter>&nbsp;:</term>
<listitem><simpara> The number of patterns in the pattern list.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The list of pattern names.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-patterns-get-pattern"/>gimp_patterns_get_pattern ()</title>
<indexterm role="deprecated"><primary>gimp_patterns_get_pattern</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_patterns_get_pattern (<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height);</programlisting>
<warning><para><literal>gimp_patterns_get_pattern</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-context-get-pattern"><function>gimp_context_get_pattern()</function></link>
instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> The pattern width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> The pattern height.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The pattern name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-patterns-set-pattern"/>gimp_patterns_set_pattern ()</title>
<indexterm role="deprecated"><primary>gimp_patterns_set_pattern</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_patterns_set_pattern (const <link linkend="gchar">gchar</link> *name);</programlisting>
<warning><para><literal>gimp_patterns_set_pattern</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-context-set-pattern"><function>gimp_context_set_pattern()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The pattern name.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-patterns-get-pattern-data"/>gimp_patterns_get_pattern_data ()</title>
<indexterm role="deprecated"><primary>gimp_patterns_get_pattern_data</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_patterns_get_pattern_data (const <link linkend="gchar">gchar</link> *name,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *mask_bpp,
<link linkend="gint">gint</link> *length,
<link linkend="guint8">guint8</link> **mask_data);</programlisting>
<warning><para><literal>gimp_patterns_get_pattern_data</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-pattern-get-pixels"><function>gimp_pattern_get_pixels()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The pattern name (\"\" means currently active pattern).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> The pattern width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> The pattern height.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mask_bpp</parameter>&nbsp;:</term>
<listitem><simpara> Pattern bytes per pixel.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>length</parameter>&nbsp;:</term>
<listitem><simpara> Length of pattern mask data.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mask_data</parameter>&nbsp;:</term>
<listitem><simpara> The pattern mask data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The pattern name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,203 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimppatternselect">
<refmeta>
<refentrytitle>gimppatternselect</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimppatternselect</refname><refpurpose>Functions providing a pattern selection dialog.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="void">void</link> (<link linkend="GimpRunPatternCallback">*GimpRunPatternCallback</link>) (const <link linkend="gchar">gchar</link> *pattern_name,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height,
<link linkend="gint">gint</link> bpp,
const <link linkend="guchar">guchar</link> *mask_data,
<link linkend="gboolean">gboolean</link> dialog_closing,
<link linkend="gpointer">gpointer</link> user_data);
const <link linkend="gchar">gchar</link>* <link linkend="gimp-pattern-select-new">gimp_pattern_select_new</link> (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *pattern_name,
<link linkend="GimpRunPatternCallback">GimpRunPatternCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> <link linkend="gimp-pattern-select-destroy">gimp_pattern_select_destroy</link> (const <link linkend="gchar">gchar</link> *pattern_callback);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-patterns-popup">gimp_patterns_popup</link> (const <link linkend="gchar">gchar</link> *pattern_callback,
const <link linkend="gchar">gchar</link> *popup_title,
const <link linkend="gchar">gchar</link> *initial_pattern);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-patterns-close-popup">gimp_patterns_close_popup</link> (const <link linkend="gchar">gchar</link> *pattern_callback);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-patterns-set-popup">gimp_patterns_set_popup</link> (const <link linkend="gchar">gchar</link> *pattern_callback,
const <link linkend="gchar">gchar</link> *pattern_name);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions providing a pattern selection dialog.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpRunPatternCallback"/>GimpRunPatternCallback ()</title>
<indexterm><primary>GimpRunPatternCallback</primary></indexterm><programlisting><link linkend="void">void</link> (*GimpRunPatternCallback) (const <link linkend="gchar">gchar</link> *pattern_name,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height,
<link linkend="gint">gint</link> bpp,
const <link linkend="guchar">guchar</link> *mask_data,
<link linkend="gboolean">gboolean</link> dialog_closing,
<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pattern_name</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>bpp</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mask_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dialog_closing</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pattern-select-new"/>gimp_pattern_select_new ()</title>
<indexterm><primary>gimp_pattern_select_new</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gimp_pattern_select_new (const <link linkend="gchar">gchar</link> *title,
const <link linkend="gchar">gchar</link> *pattern_name,
<link linkend="GimpRunPatternCallback">GimpRunPatternCallback</link> callback,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>title</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pattern_name</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pattern-select-destroy"/>gimp_pattern_select_destroy ()</title>
<indexterm><primary>gimp_pattern_select_destroy</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pattern_select_destroy (const <link linkend="gchar">gchar</link> *pattern_callback);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pattern_callback</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-patterns-popup"/>gimp_patterns_popup ()</title>
<indexterm><primary>gimp_patterns_popup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_patterns_popup (const <link linkend="gchar">gchar</link> *pattern_callback,
const <link linkend="gchar">gchar</link> *popup_title,
const <link linkend="gchar">gchar</link> *initial_pattern);</programlisting>
<para>
Invokes the Gimp pattern selection.
</para>
<para>
This procedure popups the pattern selection dialog.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pattern_callback</parameter>&nbsp;:</term>
<listitem><simpara> The callback PDB proc to call when pattern selection is made.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>popup_title</parameter>&nbsp;:</term>
<listitem><simpara> Title to give the pattern popup window.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>initial_pattern</parameter>&nbsp;:</term>
<listitem><simpara> The name of the pattern to set as the first selected.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-patterns-close-popup"/>gimp_patterns_close_popup ()</title>
<indexterm><primary>gimp_patterns_close_popup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_patterns_close_popup (const <link linkend="gchar">gchar</link> *pattern_callback);</programlisting>
<para>
Popdown the Gimp pattern selection.
</para>
<para>
This procedure closes an opened pattern selection dialog.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pattern_callback</parameter>&nbsp;:</term>
<listitem><simpara> The name of the callback registered for this popup.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-patterns-set-popup"/>gimp_patterns_set_popup ()</title>
<indexterm><primary>gimp_patterns_set_popup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_patterns_set_popup (const <link linkend="gchar">gchar</link> *pattern_callback,
const <link linkend="gchar">gchar</link> *pattern_name);</programlisting>
<para>
Sets the current pattern selection in a popup.
</para>
<para>
Sets the current pattern selection in a popup.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pattern_callback</parameter>&nbsp;:</term>
<listitem><simpara> The name of the callback registered for this popup.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pattern_name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the pattern to set as selected.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,182 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimppixbuf">
<refmeta>
<refentrytitle>gimppixbuf</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimppixbuf</refname><refpurpose>Get a thumbnail pixbuf for a drawable or image.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
enum <link linkend="GimpPixbufTransparency">GimpPixbufTransparency</link>;
<link linkend="GdkPixbuf">GdkPixbuf</link>* <link linkend="gimp-image-get-thumbnail">gimp_image_get_thumbnail</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height,
<link linkend="GimpPixbufTransparency">GimpPixbufTransparency</link> alpha);
<link linkend="GdkPixbuf">GdkPixbuf</link>* <link linkend="gimp-drawable-get-thumbnail">gimp_drawable_get_thumbnail</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height,
<link linkend="GimpPixbufTransparency">GimpPixbufTransparency</link> alpha);
<link linkend="GdkPixbuf">GdkPixbuf</link>* <link linkend="gimp-drawable-get-sub-thumbnail">gimp_drawable_get_sub_thumbnail</link> (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gint">gint</link> src_x,
<link linkend="gint">gint</link> src_y,
<link linkend="gint">gint</link> src_width,
<link linkend="gint">gint</link> src_height,
<link linkend="gint">gint</link> dest_width,
<link linkend="gint">gint</link> dest_height,
<link linkend="GimpPixbufTransparency">GimpPixbufTransparency</link> alpha);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Get a thumbnail pixbuf for a drawable or image.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpPixbufTransparency"/>enum GimpPixbufTransparency</title>
<indexterm><primary>GimpPixbufTransparency</primary></indexterm><programlisting>typedef enum
{
GIMP_PIXBUF_KEEP_ALPHA,
GIMP_PIXBUF_SMALL_CHECKS,
GIMP_PIXBUF_LARGE_CHECKS
} GimpPixbufTransparency;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="gimp-image-get-thumbnail"/>gimp_image_get_thumbnail ()</title>
<indexterm role="GIMP"><primary>gimp_image_get_thumbnail</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link>* gimp_image_get_thumbnail (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height,
<link linkend="GimpPixbufTransparency">GimpPixbufTransparency</link> alpha);</programlisting>
<para>
Retrieves a thumbnail pixbuf for the image identified by <parameter>image_ID</parameter>.
The thumbnail will be not larger than the requested size.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> the image ID
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> the requested thumbnail width (&lt;= 512 pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> the requested thumbnail height (&lt;= 512 pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>alpha</parameter>&nbsp;:</term>
<listitem><simpara> how to handle an alpha channel
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-drawable-get-thumbnail"/>gimp_drawable_get_thumbnail ()</title>
<indexterm role="GIMP"><primary>gimp_drawable_get_thumbnail</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link>* gimp_drawable_get_thumbnail (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height,
<link linkend="GimpPixbufTransparency">GimpPixbufTransparency</link> alpha);</programlisting>
<para>
Retrieves a thumbnail pixbuf for the drawable identified by
<parameter>drawable_ID</parameter>. The thumbnail will be not larger than the requested
size.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> the drawable ID
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> the requested thumbnail width (&lt;= 512 pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> the requested thumbnail height (&lt;= 512 pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>alpha</parameter>&nbsp;:</term>
<listitem><simpara> how to handle an alpha channel
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-drawable-get-sub-thumbnail"/>gimp_drawable_get_sub_thumbnail ()</title>
<indexterm role="GIMP"><primary>gimp_drawable_get_sub_thumbnail</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link>* gimp_drawable_get_sub_thumbnail (<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gint">gint</link> src_x,
<link linkend="gint">gint</link> src_y,
<link linkend="gint">gint</link> src_width,
<link linkend="gint">gint</link> src_height,
<link linkend="gint">gint</link> dest_width,
<link linkend="gint">gint</link> dest_height,
<link linkend="GimpPixbufTransparency">GimpPixbufTransparency</link> alpha);</programlisting>
<para>
Retrieves a thumbnail pixbuf for the drawable identified by
<parameter>drawable_ID</parameter>. The thumbnail will be not larger than the requested
size.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> the drawable ID
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>src_x</parameter>&nbsp;:</term>
<listitem><simpara> the x coordinate of the area
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>src_y</parameter>&nbsp;:</term>
<listitem><simpara> the y coordinate of the area
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>src_width</parameter>&nbsp;:</term>
<listitem><simpara> the width of the area
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>src_height</parameter>&nbsp;:</term>
<listitem><simpara> the height of the area
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dest_width</parameter>&nbsp;:</term>
<listitem><simpara> the requested thumbnail width (&lt;= 512 pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dest_height</parameter>&nbsp;:</term>
<listitem><simpara> the requested thumbnail height (&lt;= 512 pixels)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>alpha</parameter>&nbsp;:</term>
<listitem><simpara> how to handle an alpha channel
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,202 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimppixelfetcher">
<refmeta>
<refentrytitle>gimppixelfetcher</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimppixelfetcher</refname><refpurpose>Functions for operating on pixel regions.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
enum <link linkend="GimpPixelFetcherEdgeMode">GimpPixelFetcherEdgeMode</link>;
<link linkend="GimpPixelFetcher">GimpPixelFetcher</link>;
<link linkend="GimpPixelFetcher">GimpPixelFetcher</link>* <link linkend="gimp-pixel-fetcher-new">gimp_pixel_fetcher_new</link> (<link linkend="GimpDrawable">GimpDrawable</link> *drawable,
<link linkend="gboolean">gboolean</link> shadow);
<link linkend="void">void</link> <link linkend="gimp-pixel-fetcher-set-edge-mode">gimp_pixel_fetcher_set_edge_mode</link>
(<link linkend="GimpPixelFetcher">GimpPixelFetcher</link> *pf,
<link linkend="GimpPixelFetcherEdgeMode">GimpPixelFetcherEdgeMode</link> mode);
<link linkend="void">void</link> <link linkend="gimp-pixel-fetcher-set-bg-color">gimp_pixel_fetcher_set_bg_color</link> (<link linkend="GimpPixelFetcher">GimpPixelFetcher</link> *pf,
const <link linkend="GimpRGB">GimpRGB</link> *color);
<link linkend="void">void</link> <link linkend="gimp-pixel-fetcher-get-pixel">gimp_pixel_fetcher_get_pixel</link> (<link linkend="GimpPixelFetcher">GimpPixelFetcher</link> *pf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="guchar">guchar</link> *pixel);
<link linkend="void">void</link> <link linkend="gimp-pixel-fetcher-put-pixel">gimp_pixel_fetcher_put_pixel</link> (<link linkend="GimpPixelFetcher">GimpPixelFetcher</link> *pf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
const <link linkend="guchar">guchar</link> *pixel);
<link linkend="void">void</link> <link linkend="gimp-pixel-fetcher-destroy">gimp_pixel_fetcher_destroy</link> (<link linkend="GimpPixelFetcher">GimpPixelFetcher</link> *pf);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
These functions provide neighbourhood-based algorithms which get
dramatically slower on region boundaries, to the point where a special
treatment for neighbourhoods which are completely inside a tile is
called for. It hides the special treatment of tile borders, making
plug-in code more readable and shorter.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpPixelFetcherEdgeMode"/>enum GimpPixelFetcherEdgeMode</title>
<indexterm><primary>GimpPixelFetcherEdgeMode</primary></indexterm><programlisting>typedef enum
{
GIMP_PIXEL_FETCHER_EDGE_NONE,
GIMP_PIXEL_FETCHER_EDGE_WRAP,
GIMP_PIXEL_FETCHER_EDGE_SMEAR,
GIMP_PIXEL_FETCHER_EDGE_BLACK,
GIMP_PIXEL_FETCHER_EDGE_BACKGROUND
} GimpPixelFetcherEdgeMode;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpPixelFetcher"/>GimpPixelFetcher</title>
<indexterm><primary>GimpPixelFetcher</primary></indexterm><programlisting>typedef struct _GimpPixelFetcher GimpPixelFetcher;</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-fetcher-new"/>gimp_pixel_fetcher_new ()</title>
<indexterm><primary>gimp_pixel_fetcher_new</primary></indexterm><programlisting><link linkend="GimpPixelFetcher">GimpPixelFetcher</link>* gimp_pixel_fetcher_new (<link linkend="GimpDrawable">GimpDrawable</link> *drawable,
<link linkend="gboolean">gboolean</link> shadow);</programlisting>
<para>
Initialize a pixel region from the drawable.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="GimpDrawable"><type>GimpDrawable</type></link> the new region will be attached to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>shadow</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="gboolean"><type>gboolean</type></link> indicating whether the region is attached to
the shadow tiles or the real <literal>drawable</literal> tiles.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to a <link linkend="GimpPixelRgn"><type>GimpPixelRgn</type></link> structure (or NULL).
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-fetcher-set-edge-mode"/>gimp_pixel_fetcher_set_edge_mode ()</title>
<indexterm><primary>gimp_pixel_fetcher_set_edge_mode</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pixel_fetcher_set_edge_mode
(<link linkend="GimpPixelFetcher">GimpPixelFetcher</link> *pf,
<link linkend="GimpPixelFetcherEdgeMode">GimpPixelFetcherEdgeMode</link> mode);</programlisting>
<para>
Change the edage mode of a previously initialized pixel region.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pf</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a previously initialized <link linkend="GimpPixelFetcher"><type>GimpPixelFetcher</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mode</parameter>&nbsp;:</term>
<listitem><simpara> the new edge mode from <link linkend="GimpPixelFetcherEdgeMode"><type>GimpPixelFetcherEdgeMode</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-fetcher-set-bg-color"/>gimp_pixel_fetcher_set_bg_color ()</title>
<indexterm><primary>gimp_pixel_fetcher_set_bg_color</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pixel_fetcher_set_bg_color (<link linkend="GimpPixelFetcher">GimpPixelFetcher</link> *pf,
const <link linkend="GimpRGB">GimpRGB</link> *color);</programlisting>
<para>
Change the background color of a previously initialized pixel region.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pf</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a previously initialized <link linkend="GimpPixelFetcher"><type>GimpPixelFetcher</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
<listitem><simpara> the color to be used as bg color.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-fetcher-get-pixel"/>gimp_pixel_fetcher_get_pixel ()</title>
<indexterm><primary>gimp_pixel_fetcher_get_pixel</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pixel_fetcher_get_pixel (<link linkend="GimpPixelFetcher">GimpPixelFetcher</link> *pf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="guchar">guchar</link> *pixel);</programlisting>
<para>
Get a pixel from the pixel region.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pf</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a previously initialized <link linkend="GimpPixelFetcher"><type>GimpPixelFetcher</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> the x coordinate of the pixel to get.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> the y coordinate of the pixel to get.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pixel</parameter>&nbsp;:</term>
<listitem><simpara> the memory location where to return the pixel.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-fetcher-put-pixel"/>gimp_pixel_fetcher_put_pixel ()</title>
<indexterm><primary>gimp_pixel_fetcher_put_pixel</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pixel_fetcher_put_pixel (<link linkend="GimpPixelFetcher">GimpPixelFetcher</link> *pf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
const <link linkend="guchar">guchar</link> *pixel);</programlisting>
<para>
Set a pixel in the pixel region.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pf</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a previously initialized <link linkend="GimpPixelFetcher"><type>GimpPixelFetcher</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> the x coordinate of the pixel to set.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> the y coordinate of the pixel to set.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pixel</parameter>&nbsp;:</term>
<listitem><simpara> the pixel to set.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-fetcher-destroy"/>gimp_pixel_fetcher_destroy ()</title>
<indexterm><primary>gimp_pixel_fetcher_destroy</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pixel_fetcher_destroy (<link linkend="GimpPixelFetcher">GimpPixelFetcher</link> *pf);</programlisting>
<para>
Close a previously initializd pixel region.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pf</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a previously initialized <link linkend="GimpPixelFetcher"><type>GimpPixelFetcher</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,543 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimppixelrgn">
<refmeta>
<refentrytitle>gimppixelrgn</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimppixelrgn</refname><refpurpose>Functions for operating on pixel regions.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="GimpPixelRgn">GimpPixelRgn</link>;
<link linkend="void">void</link> <link linkend="gimp-pixel-rgn-init">gimp_pixel_rgn_init</link> (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
<link linkend="GimpDrawable">GimpDrawable</link> *drawable,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height,
<link linkend="gint">gint</link> dirty,
<link linkend="gint">gint</link> shadow);
<link linkend="void">void</link> <link linkend="gimp-pixel-rgn-resize">gimp_pixel_rgn_resize</link> (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height);
<link linkend="void">void</link> <link linkend="gimp-pixel-rgn-get-pixel">gimp_pixel_rgn_get_pixel</link> (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
<link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y);
<link linkend="void">void</link> <link linkend="gimp-pixel-rgn-get-row">gimp_pixel_rgn_get_row</link> (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
<link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> width);
<link linkend="void">void</link> <link linkend="gimp-pixel-rgn-get-col">gimp_pixel_rgn_get_col</link> (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
<link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> height);
<link linkend="void">void</link> <link linkend="gimp-pixel-rgn-get-rect">gimp_pixel_rgn_get_rect</link> (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
<link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height);
<link linkend="void">void</link> <link linkend="gimp-pixel-rgn-set-pixel">gimp_pixel_rgn_set_pixel</link> (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
const <link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y);
<link linkend="void">void</link> <link linkend="gimp-pixel-rgn-set-row">gimp_pixel_rgn_set_row</link> (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
const <link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> width);
<link linkend="void">void</link> <link linkend="gimp-pixel-rgn-set-col">gimp_pixel_rgn_set_col</link> (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
const <link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> height);
<link linkend="void">void</link> <link linkend="gimp-pixel-rgn-set-rect">gimp_pixel_rgn_set_rect</link> (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
const <link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height);
<link linkend="gpointer">gpointer</link> <link linkend="gimp-pixel-rgns-register">gimp_pixel_rgns_register</link> (<link linkend="gint">gint</link> nrgns,
...);
<link linkend="gpointer">gpointer</link> <link linkend="gimp-pixel-rgns-register2">gimp_pixel_rgns_register2</link> (<link linkend="gint">gint</link> nrgns,
<link linkend="GimpPixelRgn">GimpPixelRgn</link> **prs);
<link linkend="gpointer">gpointer</link> <link linkend="gimp-pixel-rgns-process">gimp_pixel_rgns_process</link> (<link linkend="gpointer">gpointer</link> pri_ptr);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions for operating on pixel regions. These functions provide
fast ways of accessing and modifying portions of a drawable.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpPixelRgn"/>GimpPixelRgn</title>
<indexterm><primary>GimpPixelRgn</primary></indexterm><programlisting>typedef struct {
guchar *data; /* pointer to region data */
GimpDrawable *drawable; /* pointer to drawable */
guint bpp; /* bytes per pixel */
guint rowstride; /* bytes per pixel row */
guint x, y; /* origin */
guint w, h; /* width and height of region */
guint dirty : 1; /* will this region be dirtied? */
guint shadow : 1; /* will this region use the shadow or normal tiles */
guint process_count; /* used internally */
} GimpPixelRgn;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-rgn-init"/>gimp_pixel_rgn_init ()</title>
<indexterm><primary>gimp_pixel_rgn_init</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pixel_rgn_init (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
<link linkend="GimpDrawable">GimpDrawable</link> *drawable,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height,
<link linkend="gint">gint</link> dirty,
<link linkend="gint">gint</link> shadow);</programlisting>
<para>
Initialize the pixel region pointed by <parameter>pr</parameter> with the specified parameters.
</para>
<para>
The <parameter>dirty</parameter> and <parameter>shadow</parameter> flags can be used as follows:
</para>
<para>
- <parameter>dirty</parameter> = FALSE, <parameter>shadow</parameter> = FALSE: the region will be used to read
the actual drawable datas. This
is useful for save plug-ins or for
filters.
</para>
<para>
- <parameter>dirty</parameter> = FALSE, <parameter>shadow</parameter> = TRUE: the region will be used to read the
shadow tiles. This is used in
some filter plug-ins which operate
in two passes such as gaussian
blur. The first pass reads the
actual drawable data and writes to
the shadow tiles, and the second
one reads from and writes to the
shadow tiles.
</para>
<para>
- <parameter>dirty</parameter> = TRUE, <parameter>shadow</parameter> = TRUE: the region will be used to write to
the shadow tiles. It is common
practice to write to the shadow
tiles and then use
#<link linkend="gimp-drawable-merge-shadow"><function>gimp_drawable_merge_shadow()</function></link> to
merge the changes from the shadow
tiles using the current selection
as a mask.
</para>
<para>
- <parameter>dirty</parameter> = TRUE, <parameter>shadow</parameter> = FALSE: the region will be used to directly
change the drawable content. Don't
do this, since this could prevent
the Undo-System from working as
expected.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pr</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a <link linkend="GimpPixelRgn"><type>GimpPixelRgn</type></link> variable.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>drawable</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="GimpDrawable"><type>GimpDrawable</type></link> the new region will be attached to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> the x coordinate of the top-left pixel of the region in the
<parameter>drawable</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> the y coordinate of the top-left pixel of the region in the
<parameter>drawable</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> the width of the region.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> the height of the region.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dirty</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="gboolean"><type>gboolean</type></link> indicating whether the <parameter>drawable</parameter> should be marked
as "dirty".
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>shadow</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="gboolean"><type>gboolean</type></link> indicating whether the region is attached to the
shadow tiles or the real <parameter>drawable</parameter> tiles.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-rgn-resize"/>gimp_pixel_rgn_resize ()</title>
<indexterm><primary>gimp_pixel_rgn_resize</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pixel_rgn_resize (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height);</programlisting>
<para>
Change the position and size of a previously initialized pixel region.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pr</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a previously initialized <link linkend="GimpPixelRgn"><type>GimpPixelRgn</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> the x coordinate of the new position of the region's
top-left corner.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> the y coordinate of the new position of the region's
top-left corner.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> the new width of the region.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> the new height of the region.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-rgn-get-pixel"/>gimp_pixel_rgn_get_pixel ()</title>
<indexterm><primary>gimp_pixel_rgn_get_pixel</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pixel_rgn_get_pixel (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
<link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y);</programlisting>
<para>
Fill the buffer pointed by <parameter>buf</parameter> with the value of the pixel at (<parameter>x</parameter>, <parameter>y</parameter>)
in the region <parameter>pr</parameter>. <parameter>buf</parameter> should be large enough to hold the pixel value
(1 <link linkend="guchar"><type>guchar</type></link> for an indexed or grayscale drawable, 2 <link linkend="guchar"><type>guchar</type></link> for
indexed with alpha or grayscale with alpha drawable, 3 <link linkend="guchar"><type>guchar</type></link> for
rgb drawable and 4 <link linkend="guchar"><type>guchar</type></link> for rgb with alpha drawable.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pr</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a previously initialized <link linkend="GimpPixelRgn"><type>GimpPixelRgn</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>buf</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to an array of <link linkend="guchar"><type>guchar</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> the x coordinate of the wanted pixel (relative to the drawable)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> the y coordinate of the wanted pixel (relative to the drawable)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-rgn-get-row"/>gimp_pixel_rgn_get_row ()</title>
<indexterm><primary>gimp_pixel_rgn_get_row</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pixel_rgn_get_row (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
<link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> width);</programlisting>
<para>
Get several pixels of a region in a row. This function fills the buffer
<parameter>buf</parameter> with the values of the pixels from (<parameter>x</parameter>, <parameter>y</parameter>) to (<parameter>x</parameter>+<parameter>width</parameter>-1, <parameter>y</parameter>).
<parameter>buf</parameter> should be large enough to hold all these values.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pr</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a previously initialized <link linkend="GimpPixelRgn"><type>GimpPixelRgn</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>buf</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to an array of <link linkend="guchar"><type>guchar</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> the x coordinate of the first pixel (relative to the drawable).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> the y coordinate of the first pixel (relative to the drawable).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> the number of pixels to get.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-rgn-get-col"/>gimp_pixel_rgn_get_col ()</title>
<indexterm><primary>gimp_pixel_rgn_get_col</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pixel_rgn_get_col (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
<link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> height);</programlisting>
<para>
Get several pixels of a region's column. This function fills the buffer
<parameter>buf</parameter> with the values of the pixels from (<parameter>x</parameter>, <parameter>y</parameter>) to (<parameter>x</parameter>, <parameter>y</parameter>+<parameter>height</parameter>-1).
<parameter>buf</parameter> should be large enough to hold all these values.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pr</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a previously initialized <link linkend="GimpPixelRgn"><type>GimpPixelRgn</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>buf</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to an array of <link linkend="guchar"><type>guchar</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> the x coordinate of the first pixel (relative to the drawable).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> the y coordinate of the first pixel (relative to the drawable).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> the number of pixels to get.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-rgn-get-rect"/>gimp_pixel_rgn_get_rect ()</title>
<indexterm><primary>gimp_pixel_rgn_get_rect</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pixel_rgn_get_rect (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
<link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height);</programlisting>
<para>
Get all the pixel values from the rectangle defined by <parameter>x</parameter>, <parameter>y</parameter>, <parameter>width</parameter> and
<parameter>height</parameter>. This function fills the buffer <parameter>buf</parameter> with the values of the pixels
from (<parameter>x</parameter>, <parameter>y</parameter>) to (<parameter>x</parameter>+<parameter>width</parameter>-1, <parameter>y</parameter>+<parameter>height</parameter>-1).
<parameter>buf</parameter> should be large enough to hold all these values (<parameter>width</parameter>*<parameter>height</parameter>*bpp).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pr</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a previously initialized <link linkend="GimpPixelRgn"><type>GimpPixelRgn</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>buf</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to an array of <link linkend="guchar"><type>guchar</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> the x coordinate of the first pixel (relative to the drawable).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> the y coordinate of the first pixel (relative to the drawable).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> the width of the rectangle.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> the height of the rectangle.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-rgn-set-pixel"/>gimp_pixel_rgn_set_pixel ()</title>
<indexterm><primary>gimp_pixel_rgn_set_pixel</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pixel_rgn_set_pixel (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
const <link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y);</programlisting>
<para>
Set the pixel at (<parameter>x</parameter>, <parameter>y</parameter>) to the values from <parameter>buf</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pr</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a previously initialized <link linkend="GimpPixelRgn"><type>GimpPixelRgn</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>buf</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to an array of <link linkend="guchar"><type>guchar</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> the x coordinate of the pixel (relative to the drawable).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> the y coordinate of the pixel (relative to the drawable).
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-rgn-set-row"/>gimp_pixel_rgn_set_row ()</title>
<indexterm><primary>gimp_pixel_rgn_set_row</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pixel_rgn_set_row (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
const <link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> width);</programlisting>
<para>
Set several pixels of a region in a row. This function draws the pixels
from (<parameter>x</parameter>, <parameter>y</parameter>) to (<parameter>x</parameter>+<parameter>width</parameter>-1, <parameter>y</parameter>) using the values of the buffer <parameter>buf</parameter>.
<parameter>buf</parameter> should be large enough to hold all these values.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pr</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a previously initialized <link linkend="GimpPixelRgn"><type>GimpPixelRgn</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>buf</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to an array of <link linkend="guchar"><type>guchar</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> the x coordinate of the first pixel (relative to the drawable).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> the y coordinate of the first pixel (relative to the drawable).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> the number of pixels to set.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-rgn-set-col"/>gimp_pixel_rgn_set_col ()</title>
<indexterm><primary>gimp_pixel_rgn_set_col</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pixel_rgn_set_col (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
const <link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> height);</programlisting>
<para>
Set several pixels of a region's column. This function draws the pixels
from (<parameter>x</parameter>, <parameter>y</parameter>) to (<parameter>x</parameter>, <parameter>y</parameter>+<parameter>height</parameter>-1) using the values from the buffer <parameter>buf</parameter>.
<parameter>buf</parameter> should be large enough to hold all these values.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pr</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a previously initialized <link linkend="GimpPixelRgn"><type>GimpPixelRgn</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>buf</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to an array of <link linkend="guchar"><type>guchar</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> the x coordinate of the first pixel (relative to the drawable).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> the y coordinate of the first pixel (relative to the drawable).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> the number of pixels to set.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-rgn-set-rect"/>gimp_pixel_rgn_set_rect ()</title>
<indexterm><primary>gimp_pixel_rgn_set_rect</primary></indexterm><programlisting><link linkend="void">void</link> gimp_pixel_rgn_set_rect (<link linkend="GimpPixelRgn">GimpPixelRgn</link> *pr,
const <link linkend="guchar">guchar</link> *buf,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="gint">gint</link> width,
<link linkend="gint">gint</link> height);</programlisting>
<para>
Set all the pixel of the rectangle defined by <parameter>x</parameter>, <parameter>y</parameter>, <parameter>width</parameter> and
<parameter>height</parameter>. This function draws the rectangle from (<parameter>x</parameter>, <parameter>y</parameter>) to
(<parameter>x</parameter>+<parameter>width</parameter>-1, <parameter>y</parameter>+<parameter>height</parameter>-1), using the pixel values from the buffer <parameter>buf</parameter>.
<parameter>buf</parameter> should be large enough to hold all these values (<parameter>width</parameter>*<parameter>height</parameter>*bpp).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pr</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a previously initialized <link linkend="GimpPixelRgn"><type>GimpPixelRgn</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>buf</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to an array of <link linkend="guchar"><type>guchar</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> the x coordinate of the first pixel (relative to the drawable).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> the y coordinate of the first pixel (relative to the drawable).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> the width of the rectangle.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> the height of the rectangle.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-rgns-register"/>gimp_pixel_rgns_register ()</title>
<indexterm><primary>gimp_pixel_rgns_register</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link> gimp_pixel_rgns_register (<link linkend="gint">gint</link> nrgns,
...);</programlisting>
<para>
This is the varargs version of <link linkend="gimp-pixel-rgns-register2"><type>gimp_pixel_rgns_register2</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>nrgns</parameter>&nbsp;:</term>
<listitem><simpara> the number of regions to register.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>...</parameter>&nbsp;:</term>
<listitem><simpara> <parameter>nrgns</parameter> pointers to <link linkend="GimpPixelRgn"><type>GimpPixelRgn</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="gpointer"><type>gpointer</type></link> to a regions iterator.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-rgns-register2"/>gimp_pixel_rgns_register2 ()</title>
<indexterm><primary>gimp_pixel_rgns_register2</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link> gimp_pixel_rgns_register2 (<link linkend="gint">gint</link> nrgns,
<link linkend="GimpPixelRgn">GimpPixelRgn</link> **prs);</programlisting>
<para>
It takes a number of initialized regions of the same size and provides a
pixel region iterator the iterator can be used to iterate over the
registered pixel regions. While iterating the registered pixel regions will
cover subsets of the original pixel regions, chosen for optimized access to
the image data.
</para>
<para>
Note that the given regions themselves are changed by this function, so
they are resized to the first subsets.
</para>
<para>
This function has to be used together with gimp_pixel_rgns_process in a loop.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>nrgns</parameter>&nbsp;:</term>
<listitem><simpara> the number of regions to register.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>prs</parameter>&nbsp;:</term>
<listitem><simpara> an array of <parameter>nrgns</parameter> pointers to initialized <link linkend="GimpPixelRgn"><type>GimpPixelRgn</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="gpointer"><type>gpointer</type></link> to a regions iterator.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-pixel-rgns-process"/>gimp_pixel_rgns_process ()</title>
<indexterm><primary>gimp_pixel_rgns_process</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link> gimp_pixel_rgns_process (<link linkend="gpointer">gpointer</link> pri_ptr);</programlisting>
<para>
This function update the regions registered previously with one of the
<link linkend="gimp-pixel-rgns-register"><type>gimp_pixel_rgns_register</type></link>* functions to their next tile.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pri_ptr</parameter>&nbsp;:</term>
<listitem><simpara> a regions iterator returned by <link linkend="gimp-pixel-rgns-register"><type>gimp_pixel_rgns_register</type></link>,
<link linkend="gimp-pixel-rgns-register2"><type>gimp_pixel_rgns_register2</type></link> or <link linkend="gimp-pixel-rgns-process"><type>gimp_pixel_rgns_process</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="gpointer"><type>gpointer</type></link> to a new regions iterator or <link linkend="NULL:CAPS"><type>NULL</type></link> if there isn't
any tiles left.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpplugin">
<refmeta>
<refentrytitle>gimpplugin</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpplugin</refname><refpurpose>Functions useful for plugins, e.g. registration and progress indicators.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-plugin-domain-register">gimp_plugin_domain_register</link> (const <link linkend="gchar">gchar</link> *domain_name,
const <link linkend="gchar">gchar</link> *domain_path);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-plugin-help-register">gimp_plugin_help_register</link> (const <link linkend="gchar">gchar</link> *domain_name,
const <link linkend="gchar">gchar</link> *domain_uri);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-plugin-icon-register">gimp_plugin_icon_register</link> (const <link linkend="gchar">gchar</link> *procedure_name,
<link linkend="GimpIconType">GimpIconType</link> icon_type,
const <link linkend="guint8">guint8</link> *icon_data);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-plugin-menu-register">gimp_plugin_menu_register</link> (const <link linkend="gchar">gchar</link> *procedure_name,
const <link linkend="gchar">gchar</link> *menu_path);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions useful for plugins, e.g. registration and progress indicators.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-plugin-domain-register"/>gimp_plugin_domain_register ()</title>
<indexterm><primary>gimp_plugin_domain_register</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_plugin_domain_register (const <link linkend="gchar">gchar</link> *domain_name,
const <link linkend="gchar">gchar</link> *domain_path);</programlisting>
<para>
Registers a textdomain for localisation.
</para>
<para>
This procedure adds a textdomain to the list of domains Gimp
searches for strings when translating its menu entries. There is no
need to call this function for plug-ins that have their strings
included in the gimp-std-plugins domain as that is used by default.
If the compiled message catalog is not in the standard location, you
may specify an absolute path to another location. This procedure can
only be called in the query function of a plug-in and it has to be
called before any procedure is installed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>domain_name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the textdomain (must be unique).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>domain_path</parameter>&nbsp;:</term>
<listitem><simpara> The absolute path to the compiled message catalog (may be NULL).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-plugin-help-register"/>gimp_plugin_help_register ()</title>
<indexterm><primary>gimp_plugin_help_register</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_plugin_help_register (const <link linkend="gchar">gchar</link> *domain_name,
const <link linkend="gchar">gchar</link> *domain_uri);</programlisting>
<para>
Register a help path for a plug-in.
</para>
<para>
This procedure changes the help rootdir for the plug-in which calls
it. All subsequent calls of gimp_help from this plug-in will be
interpreted relative to this rootdir.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>domain_name</parameter>&nbsp;:</term>
<listitem><simpara> The XML namespace of the plug-in's help pages.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>domain_uri</parameter>&nbsp;:</term>
<listitem><simpara> The root URI of the plug-in's help pages.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-plugin-icon-register"/>gimp_plugin_icon_register ()</title>
<indexterm><primary>gimp_plugin_icon_register</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_plugin_icon_register (const <link linkend="gchar">gchar</link> *procedure_name,
<link linkend="GimpIconType">GimpIconType</link> icon_type,
const <link linkend="guint8">guint8</link> *icon_data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>procedure_name</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>icon_type</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>icon_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-plugin-menu-register"/>gimp_plugin_menu_register ()</title>
<indexterm role="GIMP"><primary>gimp_plugin_menu_register</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_plugin_menu_register (const <link linkend="gchar">gchar</link> *procedure_name,
const <link linkend="gchar">gchar</link> *menu_path);</programlisting>
<para>
Register an additional menu path for a plug-in procedure.
</para>
<para>
This procedure installs an additional menu entry for the given
procedure.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>procedure_name</parameter>&nbsp;:</term>
<listitem><simpara> The procedure for which to install the menu path.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>menu_path</parameter>&nbsp;:</term>
<listitem><simpara> The procedure's additional menu path.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,390 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpproceduraldb">
<refmeta>
<refentrytitle>gimpproceduraldb</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpproceduraldb</refname><refpurpose>Functions for querying and changing procedural database (PDB) entries.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gchar">gchar</link>* <link linkend="gimp-procedural-db-temp-name">gimp_procedural_db_temp_name</link> (void);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-procedural-db-proc-info">gimp_procedural_db_proc_info</link> (const <link linkend="gchar">gchar</link> *procedure,
<link linkend="gchar">gchar</link> **blurb,
<link linkend="gchar">gchar</link> **help,
<link linkend="gchar">gchar</link> **author,
<link linkend="gchar">gchar</link> **copyright,
<link linkend="gchar">gchar</link> **date,
<link linkend="GimpPDBProcType">GimpPDBProcType</link> *proc_type,
<link linkend="gint">gint</link> *num_args,
<link linkend="gint">gint</link> *num_values,
<link linkend="GimpParamDef">GimpParamDef</link> **args,
<link linkend="GimpParamDef">GimpParamDef</link> **return_vals);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-procedural-db-get-data">gimp_procedural_db_get_data</link> (const <link linkend="gchar">gchar</link> *identifier,
<link linkend="gpointer">gpointer</link> data);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-procedural-db-set-data">gimp_procedural_db_set_data</link> (const <link linkend="gchar">gchar</link> *identifier,
<link linkend="gpointer">gpointer</link> data,
<link linkend="guint32">guint32</link> bytes);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-procedural-db-dump">gimp_procedural_db_dump</link> (const <link linkend="gchar">gchar</link> *filename);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-procedural-db-query">gimp_procedural_db_query</link> (const <link linkend="gchar">gchar</link> *name,
const <link linkend="gchar">gchar</link> *blurb,
const <link linkend="gchar">gchar</link> *help,
const <link linkend="gchar">gchar</link> *author,
const <link linkend="gchar">gchar</link> *copyright,
const <link linkend="gchar">gchar</link> *date,
const <link linkend="gchar">gchar</link> *proc_type,
<link linkend="gint">gint</link> *num_matches,
<link linkend="gchar">gchar</link> ***procedure_names);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-procedural-db-proc-arg">gimp_procedural_db_proc_arg</link> (const <link linkend="gchar">gchar</link> *procedure,
<link linkend="gint">gint</link> arg_num,
<link linkend="GimpPDBArgType">GimpPDBArgType</link> *arg_type,
<link linkend="gchar">gchar</link> **arg_name,
<link linkend="gchar">gchar</link> **arg_desc);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-procedural-db-proc-val">gimp_procedural_db_proc_val</link> (const <link linkend="gchar">gchar</link> *procedure,
<link linkend="gint">gint</link> val_num,
<link linkend="GimpPDBArgType">GimpPDBArgType</link> *val_type,
<link linkend="gchar">gchar</link> **val_name,
<link linkend="gchar">gchar</link> **val_desc);
<link linkend="gint">gint</link> <link linkend="gimp-procedural-db-get-data-size">gimp_procedural_db_get_data_size</link>
(const <link linkend="gchar">gchar</link> *identifier);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions for querying and changing procedural database (PDB) entries.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-procedural-db-temp-name"/>gimp_procedural_db_temp_name ()</title>
<indexterm><primary>gimp_procedural_db_temp_name</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_procedural_db_temp_name (void);</programlisting>
<para>
Generates a unique temporary PDB name.
</para>
<para>
This procedure generates a temporary PDB entry name that is
guaranteed to be unique. It is many used by the interactive popup
dialogs to generate a PDB entry name.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> A unique temporary name for a temporary PDB entry.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-procedural-db-proc-info"/>gimp_procedural_db_proc_info ()</title>
<indexterm><primary>gimp_procedural_db_proc_info</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_procedural_db_proc_info (const <link linkend="gchar">gchar</link> *procedure,
<link linkend="gchar">gchar</link> **blurb,
<link linkend="gchar">gchar</link> **help,
<link linkend="gchar">gchar</link> **author,
<link linkend="gchar">gchar</link> **copyright,
<link linkend="gchar">gchar</link> **date,
<link linkend="GimpPDBProcType">GimpPDBProcType</link> *proc_type,
<link linkend="gint">gint</link> *num_args,
<link linkend="gint">gint</link> *num_values,
<link linkend="GimpParamDef">GimpParamDef</link> **args,
<link linkend="GimpParamDef">GimpParamDef</link> **return_vals);</programlisting>
<para>
Queries the procedural database for information on the specified
procedure.
</para>
<para>
This procedure returns information on the specified procedure. A
short blurb, detailed help, author(s), copyright information,
procedure type, number of input, and number of return values are
returned. Additionally this function returns specific information
about each input argument and return value.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>procedure</parameter>&nbsp;:</term>
<listitem><simpara> The procedure name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>blurb</parameter>&nbsp;:</term>
<listitem><simpara> A short blurb.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>help</parameter>&nbsp;:</term>
<listitem><simpara> Detailed procedure help.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>author</parameter>&nbsp;:</term>
<listitem><simpara> Author(s) of the procedure.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>copyright</parameter>&nbsp;:</term>
<listitem><simpara> The copyright.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>date</parameter>&nbsp;:</term>
<listitem><simpara> Copyright date.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>proc_type</parameter>&nbsp;:</term>
<listitem><simpara> The procedure type.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_args</parameter>&nbsp;:</term>
<listitem><simpara> The number of input arguments.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_values</parameter>&nbsp;:</term>
<listitem><simpara> The number of return values.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>args</parameter>&nbsp;:</term>
<listitem><simpara> The input arguments.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>return_vals</parameter>&nbsp;:</term>
<listitem><simpara> The return values.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-procedural-db-get-data"/>gimp_procedural_db_get_data ()</title>
<indexterm><primary>gimp_procedural_db_get_data</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_procedural_db_get_data (const <link linkend="gchar">gchar</link> *identifier,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Returns data associated with the specified identifier.
</para>
<para>
This procedure returns any data which may have been associated with
the specified identifier. The data is copied into the given memory
location.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>identifier</parameter>&nbsp;:</term>
<listitem><simpara> The identifier associated with data.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> A byte array containing data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE if no data has been associated with
the identifier
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-procedural-db-set-data"/>gimp_procedural_db_set_data ()</title>
<indexterm><primary>gimp_procedural_db_set_data</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_procedural_db_set_data (const <link linkend="gchar">gchar</link> *identifier,
<link linkend="gpointer">gpointer</link> data,
<link linkend="guint32">guint32</link> bytes);</programlisting>
<para>
Associates the specified identifier with the supplied data.
</para>
<para>
This procedure associates the supplied data with the provided
identifier. The data may be subsequently retrieved by a call to
'procedural-db-get-data'.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>identifier</parameter>&nbsp;:</term>
<listitem><simpara> The identifier associated with data.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> A byte array containing data.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>bytes</parameter>&nbsp;:</term>
<listitem><simpara> The number of bytes in the data
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-procedural-db-dump"/>gimp_procedural_db_dump ()</title>
<indexterm><primary>gimp_procedural_db_dump</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_procedural_db_dump (const <link linkend="gchar">gchar</link> *filename);</programlisting>
<para>
Dumps the current contents of the procedural database
</para>
<para>
This procedure dumps the contents of the procedural database to the
specified file. The file will contain all of the information
provided for each registered procedure. This file is in a format
appropriate for use with the supplied \"pdb_self_doc.el\" Elisp
script, which generates a texinfo document.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
<listitem><simpara> The dump filename.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-procedural-db-query"/>gimp_procedural_db_query ()</title>
<indexterm><primary>gimp_procedural_db_query</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_procedural_db_query (const <link linkend="gchar">gchar</link> *name,
const <link linkend="gchar">gchar</link> *blurb,
const <link linkend="gchar">gchar</link> *help,
const <link linkend="gchar">gchar</link> *author,
const <link linkend="gchar">gchar</link> *copyright,
const <link linkend="gchar">gchar</link> *date,
const <link linkend="gchar">gchar</link> *proc_type,
<link linkend="gint">gint</link> *num_matches,
<link linkend="gchar">gchar</link> ***procedure_names);</programlisting>
<para>
Queries the procedural database for its contents using regular
expression matching.
</para>
<para>
This procedure queries the contents of the procedural database. It
is supplied with seven arguments matching procedures on { name,
blurb, help, author, copyright, date, procedure type}. This is
accomplished using regular expression matching. For instance, to
find all procedures with \"jpeg\" listed in the blurb, all seven
arguments can be supplied as \".*\", except for the second, which
can be supplied as \".*jpeg.*\". There are two return arguments for
this procedure. The first is the number of procedures matching the
query. The second is a concatenated list of procedure names
corresponding to those matching the query. If no matching entries
are found, then the returned string is NULL and the number of
entries is 0.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> The regex for procedure name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>blurb</parameter>&nbsp;:</term>
<listitem><simpara> The regex for procedure blurb.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>help</parameter>&nbsp;:</term>
<listitem><simpara> The regex for procedure help.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>author</parameter>&nbsp;:</term>
<listitem><simpara> The regex for procedure author.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>copyright</parameter>&nbsp;:</term>
<listitem><simpara> The regex for procedure copyright.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>date</parameter>&nbsp;:</term>
<listitem><simpara> The regex for procedure date.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>proc_type</parameter>&nbsp;:</term>
<listitem><simpara> The regex for procedure type: { 'Internal GIMP procedure', 'GIMP Plug-in', 'GIMP Extension' }.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_matches</parameter>&nbsp;:</term>
<listitem><simpara> The number of matching procedures.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>procedure_names</parameter>&nbsp;:</term>
<listitem><simpara> The list of procedure names.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-procedural-db-proc-arg"/>gimp_procedural_db_proc_arg ()</title>
<indexterm><primary>gimp_procedural_db_proc_arg</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_procedural_db_proc_arg (const <link linkend="gchar">gchar</link> *procedure,
<link linkend="gint">gint</link> arg_num,
<link linkend="GimpPDBArgType">GimpPDBArgType</link> *arg_type,
<link linkend="gchar">gchar</link> **arg_name,
<link linkend="gchar">gchar</link> **arg_desc);</programlisting>
<para>
Queries the procedural database for information on the specified
procedure's argument.
</para>
<para>
This procedure returns information on the specified procedure's
argument. The argument type, name, and a description are retrieved.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>procedure</parameter>&nbsp;:</term>
<listitem><simpara> The procedure name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg_num</parameter>&nbsp;:</term>
<listitem><simpara> The argument number.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg_type</parameter>&nbsp;:</term>
<listitem><simpara> The type of argument.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg_name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the argument.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg_desc</parameter>&nbsp;:</term>
<listitem><simpara> A description of the argument.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-procedural-db-proc-val"/>gimp_procedural_db_proc_val ()</title>
<indexterm><primary>gimp_procedural_db_proc_val</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_procedural_db_proc_val (const <link linkend="gchar">gchar</link> *procedure,
<link linkend="gint">gint</link> val_num,
<link linkend="GimpPDBArgType">GimpPDBArgType</link> *val_type,
<link linkend="gchar">gchar</link> **val_name,
<link linkend="gchar">gchar</link> **val_desc);</programlisting>
<para>
Queries the procedural database for information on the specified
procedure's return value.
</para>
<para>
This procedure returns information on the specified procedure's
return value. The return value type, name, and a description are
retrieved.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>procedure</parameter>&nbsp;:</term>
<listitem><simpara> The procedure name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>val_num</parameter>&nbsp;:</term>
<listitem><simpara> The return value number.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>val_type</parameter>&nbsp;:</term>
<listitem><simpara> The type of return value.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>val_name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the return value.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>val_desc</parameter>&nbsp;:</term>
<listitem><simpara> A description of the return value.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-procedural-db-get-data-size"/>gimp_procedural_db_get_data_size ()</title>
<indexterm><primary>gimp_procedural_db_get_data_size</primary></indexterm><programlisting><link linkend="gint">gint</link> gimp_procedural_db_get_data_size
(const <link linkend="gchar">gchar</link> *identifier);</programlisting>
<para>
Returns size of data associated with the specified identifier.
</para>
<para>
This procedure returns the size of any data which may have been
associated with the specified identifier. If no data has been
associated with the identifier, an error is returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>identifier</parameter>&nbsp;:</term>
<listitem><simpara> The identifier associated with data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The number of bytes in the data.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,233 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpprogress">
<refmeta>
<refentrytitle>gimpprogress</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpprogress</refname><refpurpose>Functions for embedding the progress bar into a plug-in's GUI.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="void">void</link> (<link linkend="GimpProgressStartCallback">*GimpProgressStartCallback</link>) (const <link linkend="gchar">gchar</link> *message,
<link linkend="gboolean">gboolean</link> cancelable,
<link linkend="gpointer">gpointer</link> user_data);
<link linkend="void">void</link> (<link linkend="GimpProgressEndCallback">*GimpProgressEndCallback</link>) (<link linkend="gpointer">gpointer</link> user_data);
<link linkend="void">void</link> (<link linkend="GimpProgressTextCallback">*GimpProgressTextCallback</link>) (const <link linkend="gchar">gchar</link> *message,
<link linkend="gpointer">gpointer</link> user_data);
<link linkend="void">void</link> (<link linkend="GimpProgressValueCallback">*GimpProgressValueCallback</link>) (<link linkend="gdouble">gdouble</link> percentage,
<link linkend="gpointer">gpointer</link> user_data);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-progress-init">gimp_progress_init</link> (const <link linkend="gchar">gchar</link> *message);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-progress-update">gimp_progress_update</link> (<link linkend="gdouble">gdouble</link> percentage);
const <link linkend="gchar">gchar</link>* <link linkend="gimp-progress-install">gimp_progress_install</link> (<link linkend="GimpProgressStartCallback">GimpProgressStartCallback</link> start_callback,
<link linkend="GimpProgressEndCallback">GimpProgressEndCallback</link> end_callback,
<link linkend="GimpProgressTextCallback">GimpProgressTextCallback</link> text_callback,
<link linkend="GimpProgressValueCallback">GimpProgressValueCallback</link> value_callback,
<link linkend="gpointer">gpointer</link> user_data);
<link linkend="gpointer">gpointer</link> <link linkend="gimp-progress-uninstall">gimp_progress_uninstall</link> (const <link linkend="gchar">gchar</link> *progress_callback);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-progress-cancel">gimp_progress_cancel</link> (const <link linkend="gchar">gchar</link> *progress_callback);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions for embedding the progress bar into a plug-in's GUI.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpProgressStartCallback"/>GimpProgressStartCallback ()</title>
<indexterm><primary>GimpProgressStartCallback</primary></indexterm><programlisting><link linkend="void">void</link> (*GimpProgressStartCallback) (const <link linkend="gchar">gchar</link> *message,
<link linkend="gboolean">gboolean</link> cancelable,
<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>message</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cancelable</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="GimpProgressEndCallback"/>GimpProgressEndCallback ()</title>
<indexterm><primary>GimpProgressEndCallback</primary></indexterm><programlisting><link linkend="void">void</link> (*GimpProgressEndCallback) (<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="GimpProgressTextCallback"/>GimpProgressTextCallback ()</title>
<indexterm><primary>GimpProgressTextCallback</primary></indexterm><programlisting><link linkend="void">void</link> (*GimpProgressTextCallback) (const <link linkend="gchar">gchar</link> *message,
<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>message</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="GimpProgressValueCallback"/>GimpProgressValueCallback ()</title>
<indexterm><primary>GimpProgressValueCallback</primary></indexterm><programlisting><link linkend="void">void</link> (*GimpProgressValueCallback) (<link linkend="gdouble">gdouble</link> percentage,
<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>percentage</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-progress-init"/>gimp_progress_init ()</title>
<indexterm><primary>gimp_progress_init</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_progress_init (const <link linkend="gchar">gchar</link> *message);</programlisting>
<para>
Initializes the progress bar for the current plug-in.
</para>
<para>
Initializes the progress bar for the current plug-in. It is only
valid to call this procedure from a plug-in.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>message</parameter>&nbsp;:</term>
<listitem><simpara> Message to use in the progress dialog.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-progress-update"/>gimp_progress_update ()</title>
<indexterm><primary>gimp_progress_update</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_progress_update (<link linkend="gdouble">gdouble</link> percentage);</programlisting>
<para>
Updates the progress bar for the current plug-in.
</para>
<para>
Updates the progress bar for the current plug-in. It is only valid
to call this procedure from a plug-in.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>percentage</parameter>&nbsp;:</term>
<listitem><simpara> Percentage of progress completed which must be between 0.0 and 1.0.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-progress-install"/>gimp_progress_install ()</title>
<indexterm role="GIMP"><primary>gimp_progress_install</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gimp_progress_install (<link linkend="GimpProgressStartCallback">GimpProgressStartCallback</link> start_callback,
<link linkend="GimpProgressEndCallback">GimpProgressEndCallback</link> end_callback,
<link linkend="GimpProgressTextCallback">GimpProgressTextCallback</link> text_callback,
<link linkend="GimpProgressValueCallback">GimpProgressValueCallback</link> value_callback,
<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>start_callback</parameter>&nbsp;:</term>
<listitem><simpara> the function to call when progress starts
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end_callback</parameter>&nbsp;:</term>
<listitem><simpara> the function to call when progress finishes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text_callback</parameter>&nbsp;:</term>
<listitem><simpara> the function to call to change the text
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value_callback</parameter>&nbsp;:</term>
<listitem><simpara> the function to call to change the value
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> a pointer that is returned when uninstalling the progress
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the name of the temporary procedure that's been installed
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-progress-uninstall"/>gimp_progress_uninstall ()</title>
<indexterm role="GIMP"><primary>gimp_progress_uninstall</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link> gimp_progress_uninstall (const <link linkend="gchar">gchar</link> *progress_callback);</programlisting>
<para>
Uninstalls a temporary progress procedure that was installed using
<link linkend="gimp-progress-install"><function>gimp_progress_install()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>progress_callback</parameter>&nbsp;:</term>
<listitem><simpara> the name of the temporary procedure to uninstall
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <parameter>user_data</parameter> that was passed to <link linkend="gimp-progress-install"><function>gimp_progress_install()</function></link>.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
<refsect2>
<title><anchor id="gimp-progress-cancel"/>gimp_progress_cancel ()</title>
<indexterm role="GIMP"><primary>gimp_progress_cancel</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_progress_cancel (const <link linkend="gchar">gchar</link> *progress_callback);</programlisting>
<para>
Cancels a running progress.
</para>
<para>
This function cancels the currently running progress.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>progress_callback</parameter>&nbsp;:</term>
<listitem><simpara> The name of the callback registered for this progress.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="GimpProgressBar">
<refmeta>
<refentrytitle>GimpProgressBar</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GimpProgressBar</refname><refpurpose>A widget providing a progress bar.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="GimpProgressBar-struct">GimpProgressBar</link>;
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gimp-progress-bar-new">gimp_progress_bar_new</link> (void);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Object Hierarchy</title>
<synopsis>
<link linkend="GObject">GObject</link>
+----<link linkend="GtkObject">GtkObject</link>
+----<link linkend="GtkWidget">GtkWidget</link>
+----<link linkend="GtkProgress">GtkProgress</link>
+----<link linkend="GtkProgressBar">GtkProgressBar</link>
+----GimpProgressBar
</synopsis>
</refsect1>
<refsect1>
<title>Implemented Interfaces</title>
<para>
GimpProgressBar implements
<link linkend="AtkImplementorIface">AtkImplementorIface</link>.</para>
</refsect1>
<refsect1>
<title>Description</title>
<para>
A widget providing a progress bar that automatically redirects any progress
calls to itself.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpProgressBar-struct"/>GimpProgressBar</title>
<indexterm><primary>GimpProgressBar</primary></indexterm><programlisting>typedef struct _GimpProgressBar GimpProgressBar;</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="gimp-progress-bar-new"/>gimp_progress_bar_new ()</title>
<indexterm role="GIMP"><primary>gimp_progress_bar_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gimp_progress_bar_new (void);</programlisting>
<para>
Creates a new <link linkend="GimpProgressBar"><type>GimpProgressBar</type></link> widget.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the new widget.
</simpara></listitem></varlistentry>
</variablelist><para>Since GIMP 2.2
</para></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,371 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpregioniterator">
<refmeta>
<refentrytitle>gimpregioniterator</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpregioniterator</refname><refpurpose>Functions to traverse a pixel regions.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="GimpRgnIterator">GimpRgnIterator</link>;
<link linkend="void">void</link> (<link linkend="GimpRgnFunc1">*GimpRgnFunc1</link>) (const <link linkend="guchar">guchar</link> *src,
<link linkend="gint">gint</link> bpp,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> (<link linkend="GimpRgnFunc2">*GimpRgnFunc2</link>) (const <link linkend="guchar">guchar</link> *src,
<link linkend="guchar">guchar</link> *dest,
<link linkend="gint">gint</link> bpp,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> (<link linkend="GimpRgnFuncSrc">*GimpRgnFuncSrc</link>) (<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
const <link linkend="guchar">guchar</link> *src,
<link linkend="gint">gint</link> bpp,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> (<link linkend="GimpRgnFuncDest">*GimpRgnFuncDest</link>) (<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="guchar">guchar</link> *dest,
<link linkend="gint">gint</link> bpp,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> (<link linkend="GimpRgnFuncSrcDest">*GimpRgnFuncSrcDest</link>) (<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
const <link linkend="guchar">guchar</link> *src,
<link linkend="guchar">guchar</link> *dest,
<link linkend="gint">gint</link> bpp,
<link linkend="gpointer">gpointer</link> data);
<link linkend="GimpRgnIterator">GimpRgnIterator</link>* <link linkend="gimp-rgn-iterator-new">gimp_rgn_iterator_new</link> (<link linkend="GimpDrawable">GimpDrawable</link> *drawable,
<link linkend="GimpRunMode">GimpRunMode</link> unused);
<link linkend="void">void</link> <link linkend="gimp-rgn-iterator-free">gimp_rgn_iterator_free</link> (<link linkend="GimpRgnIterator">GimpRgnIterator</link> *iter);
<link linkend="void">void</link> <link linkend="gimp-rgn-iterator-src">gimp_rgn_iterator_src</link> (<link linkend="GimpRgnIterator">GimpRgnIterator</link> *iter,
<link linkend="GimpRgnFuncSrc">GimpRgnFuncSrc</link> func,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> <link linkend="gimp-rgn-iterator-dest">gimp_rgn_iterator_dest</link> (<link linkend="GimpRgnIterator">GimpRgnIterator</link> *iter,
<link linkend="GimpRgnFuncDest">GimpRgnFuncDest</link> func,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> <link linkend="gimp-rgn-iterator-src-dest">gimp_rgn_iterator_src_dest</link> (<link linkend="GimpRgnIterator">GimpRgnIterator</link> *iter,
<link linkend="GimpRgnFuncSrcDest">GimpRgnFuncSrcDest</link> func,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> <link linkend="gimp-rgn-iterate1">gimp_rgn_iterate1</link> (<link linkend="GimpDrawable">GimpDrawable</link> *drawable,
<link linkend="GimpRunMode">GimpRunMode</link> unused,
<link linkend="GimpRgnFunc1">GimpRgnFunc1</link> func,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> <link linkend="gimp-rgn-iterate2">gimp_rgn_iterate2</link> (<link linkend="GimpDrawable">GimpDrawable</link> *drawable,
<link linkend="GimpRunMode">GimpRunMode</link> unused,
<link linkend="GimpRgnFunc2">GimpRgnFunc2</link> func,
<link linkend="gpointer">gpointer</link> data);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
The GimpRgnIterator functions provide a variety
of common ways to traverse a PixelRegion,
using a pre-defined function pointer per pixel.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpRgnIterator"/>GimpRgnIterator</title>
<indexterm><primary>GimpRgnIterator</primary></indexterm><programlisting>typedef struct _GimpRgnIterator GimpRgnIterator;</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GimpRgnFunc1"/>GimpRgnFunc1 ()</title>
<indexterm><primary>GimpRgnFunc1</primary></indexterm><programlisting><link linkend="void">void</link> (*GimpRgnFunc1) (const <link linkend="guchar">guchar</link> *src,
<link linkend="gint">gint</link> bpp,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>src</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>bpp</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="GimpRgnFunc2"/>GimpRgnFunc2 ()</title>
<indexterm><primary>GimpRgnFunc2</primary></indexterm><programlisting><link linkend="void">void</link> (*GimpRgnFunc2) (const <link linkend="guchar">guchar</link> *src,
<link linkend="guchar">guchar</link> *dest,
<link linkend="gint">gint</link> bpp,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>src</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dest</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>bpp</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="GimpRgnFuncSrc"/>GimpRgnFuncSrc ()</title>
<indexterm><primary>GimpRgnFuncSrc</primary></indexterm><programlisting><link linkend="void">void</link> (*GimpRgnFuncSrc) (<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
const <link linkend="guchar">guchar</link> *src,
<link linkend="gint">gint</link> bpp,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>src</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>bpp</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="GimpRgnFuncDest"/>GimpRgnFuncDest ()</title>
<indexterm><primary>GimpRgnFuncDest</primary></indexterm><programlisting><link linkend="void">void</link> (*GimpRgnFuncDest) (<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="guchar">guchar</link> *dest,
<link linkend="gint">gint</link> bpp,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dest</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>bpp</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="GimpRgnFuncSrcDest"/>GimpRgnFuncSrcDest ()</title>
<indexterm><primary>GimpRgnFuncSrcDest</primary></indexterm><programlisting><link linkend="void">void</link> (*GimpRgnFuncSrcDest) (<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
const <link linkend="guchar">guchar</link> *src,
<link linkend="guchar">guchar</link> *dest,
<link linkend="gint">gint</link> bpp,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>src</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dest</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>bpp</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-rgn-iterator-new"/>gimp_rgn_iterator_new ()</title>
<indexterm><primary>gimp_rgn_iterator_new</primary></indexterm><programlisting><link linkend="GimpRgnIterator">GimpRgnIterator</link>* gimp_rgn_iterator_new (<link linkend="GimpDrawable">GimpDrawable</link> *drawable,
<link linkend="GimpRunMode">GimpRunMode</link> unused);</programlisting>
<para>
Creates a new <link linkend="GimpRgnIterator"><type>GimpRgnIterator</type></link> for <parameter>drawable</parameter>. The <link linkend="GimpRunMode"><type>GimpRunMode</type></link>
parameter is ignored.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GimpDrawable"><type>GimpDrawable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>unused</parameter>&nbsp;:</term>
<listitem><simpara> ignored
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="GimpRgnIterator"><type>GimpRgnIterator</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-rgn-iterator-free"/>gimp_rgn_iterator_free ()</title>
<indexterm><primary>gimp_rgn_iterator_free</primary></indexterm><programlisting><link linkend="void">void</link> gimp_rgn_iterator_free (<link linkend="GimpRgnIterator">GimpRgnIterator</link> *iter);</programlisting>
<para>
Frees the resources allocated for <parameter>iter</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>iter</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GimpRgnIterator"><type>GimpRgnIterator</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-rgn-iterator-src"/>gimp_rgn_iterator_src ()</title>
<indexterm><primary>gimp_rgn_iterator_src</primary></indexterm><programlisting><link linkend="void">void</link> gimp_rgn_iterator_src (<link linkend="GimpRgnIterator">GimpRgnIterator</link> *iter,
<link linkend="GimpRgnFuncSrc">GimpRgnFuncSrc</link> func,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>iter</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-rgn-iterator-dest"/>gimp_rgn_iterator_dest ()</title>
<indexterm><primary>gimp_rgn_iterator_dest</primary></indexterm><programlisting><link linkend="void">void</link> gimp_rgn_iterator_dest (<link linkend="GimpRgnIterator">GimpRgnIterator</link> *iter,
<link linkend="GimpRgnFuncDest">GimpRgnFuncDest</link> func,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>iter</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-rgn-iterator-src-dest"/>gimp_rgn_iterator_src_dest ()</title>
<indexterm><primary>gimp_rgn_iterator_src_dest</primary></indexterm><programlisting><link linkend="void">void</link> gimp_rgn_iterator_src_dest (<link linkend="GimpRgnIterator">GimpRgnIterator</link> *iter,
<link linkend="GimpRgnFuncSrcDest">GimpRgnFuncSrcDest</link> func,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>iter</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-rgn-iterate1"/>gimp_rgn_iterate1 ()</title>
<indexterm><primary>gimp_rgn_iterate1</primary></indexterm><programlisting><link linkend="void">void</link> gimp_rgn_iterate1 (<link linkend="GimpDrawable">GimpDrawable</link> *drawable,
<link linkend="GimpRunMode">GimpRunMode</link> unused,
<link linkend="GimpRgnFunc1">GimpRgnFunc1</link> func,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>unused</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-rgn-iterate2"/>gimp_rgn_iterate2 ()</title>
<indexterm><primary>gimp_rgn_iterate2</primary></indexterm><programlisting><link linkend="void">void</link> gimp_rgn_iterate2 (<link linkend="GimpDrawable">GimpDrawable</link> *drawable,
<link linkend="GimpRunMode">GimpRunMode</link> unused,
<link linkend="GimpRgnFunc2">GimpRgnFunc2</link> func,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>drawable</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>unused</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,494 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpselection">
<refmeta>
<refentrytitle>gimpselection</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpselection</refname><refpurpose>Functions for manipulating selections.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-selection-bounds">gimp_selection_bounds</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gboolean">gboolean</link> *non_empty,
<link linkend="gint">gint</link> *x1,
<link linkend="gint">gint</link> *y1,
<link linkend="gint">gint</link> *x2,
<link linkend="gint">gint</link> *y2);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-selection-all">gimp_selection_all</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-selection-none">gimp_selection_none</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-selection-clear">gimp_selection_clear</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-selection-is-empty">gimp_selection_is_empty</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gint32">gint32</link> <link linkend="gimp-selection-float">gimp_selection_float</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gint">gint</link> offx,
<link linkend="gint">gint</link> offy);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-selection-load">gimp_selection_load</link> (<link linkend="gint32">gint32</link> channel_ID);
<link linkend="gint32">gint32</link> <link linkend="gimp-selection-save">gimp_selection_save</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gint">gint</link> <link linkend="gimp-selection-value">gimp_selection_value</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-selection-grow">gimp_selection_grow</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> steps);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-selection-shrink">gimp_selection_shrink</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> radius);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-selection-invert">gimp_selection_invert</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-selection-feather">gimp_selection_feather</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gdouble">gdouble</link> radius);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-selection-sharpen">gimp_selection_sharpen</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-selection-border">gimp_selection_border</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> radius);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-selection-translate">gimp_selection_translate</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> offx,
<link linkend="gint">gint</link> offy);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-selection-layer-alpha">gimp_selection_layer_alpha</link> (<link linkend="gint32">gint32</link> layer_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-selection-combine">gimp_selection_combine</link> (<link linkend="gint32">gint32</link> channel_ID,
<link linkend="GimpChannelOps">GimpChannelOps</link> operation);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions for manipulating selections.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-selection-bounds"/>gimp_selection_bounds ()</title>
<indexterm><primary>gimp_selection_bounds</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_selection_bounds (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gboolean">gboolean</link> *non_empty,
<link linkend="gint">gint</link> *x1,
<link linkend="gint">gint</link> *y1,
<link linkend="gint">gint</link> *x2,
<link linkend="gint">gint</link> *y2);</programlisting>
<para>
Find the bounding box of the current selection.
</para>
<para>
This procedure returns whether there is a selection for the
specified image. If there is one, the upper left and lower right
corners of the bounding box are returned. These coordinates are
relative to the image. Please note that the pixel specified by the
lower righthand coordinate of the bounding box is not part of the
selection. The selection ends at the upper left corner of this
pixel. This means the width of the selection can be calculated as
(x2 - x1), its height as (y2 - y1).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>non_empty</parameter>&nbsp;:</term>
<listitem><simpara> True if there is a selection.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x1</parameter>&nbsp;:</term>
<listitem><simpara> x coordinate of upper left corner of selection bounds.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y1</parameter>&nbsp;:</term>
<listitem><simpara> y coordinate of upper left corner of selection bounds.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x2</parameter>&nbsp;:</term>
<listitem><simpara> x coordinate of lower right corner of selection bounds.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y2</parameter>&nbsp;:</term>
<listitem><simpara> y coordinate of lower right corner of selection bounds.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-all"/>gimp_selection_all ()</title>
<indexterm><primary>gimp_selection_all</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_selection_all (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Select all of the image.
</para>
<para>
This procedure sets the selection mask to completely encompass the
image. Every pixel in the selection channel is set to 255.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-none"/>gimp_selection_none ()</title>
<indexterm><primary>gimp_selection_none</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_selection_none (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Deselect the entire image.
</para>
<para>
This procedure deselects the entire image. Every pixel in the
selection channel is set to 0.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-clear"/>gimp_selection_clear ()</title>
<indexterm role="deprecated"><primary>gimp_selection_clear</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_selection_clear (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<warning><para><literal>gimp_selection_clear</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-selection-none"><function>gimp_selection_none()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-is-empty"/>gimp_selection_is_empty ()</title>
<indexterm><primary>gimp_selection_is_empty</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_selection_is_empty (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Determine whether the selection is empty.
</para>
<para>
This procedure returns non-zero if the selection for the specified
image is not empty.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> Is the selection empty?
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-float"/>gimp_selection_float ()</title>
<indexterm><primary>gimp_selection_float</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_selection_float (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gint">gint</link> offx,
<link linkend="gint">gint</link> offy);</programlisting>
<para>
Float the selection from the specified drawable with initial offsets
as specified.
</para>
<para>
This procedure determines the region of the specified drawable that
lies beneath the current selection. The region is then cut from the
drawable and the resulting data is made into a new layer which is
instantiated as a floating selection. The offsets allow initial
positioning of the new floating selection.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> ignored
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The drawable from which to float selection.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offx</parameter>&nbsp;:</term>
<listitem><simpara> x offset for translation.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offy</parameter>&nbsp;:</term>
<listitem><simpara> y offset for translation.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The floated layer.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-load"/>gimp_selection_load ()</title>
<indexterm><primary>gimp_selection_load</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_selection_load (<link linkend="gint32">gint32</link> channel_ID);</programlisting>
<para>
Transfer the specified channel to the selection mask.
</para>
<para>
This procedure loads the specified channel into the selection mask.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>channel_ID</parameter>&nbsp;:</term>
<listitem><simpara> The channel.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-save"/>gimp_selection_save ()</title>
<indexterm><primary>gimp_selection_save</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_selection_save (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Copy the selection mask to a new channel.
</para>
<para>
This procedure copies the selection mask and stores the content in a
new channel. The new channel is automatically inserted into the
image's list of channels.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The new channel.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-value"/>gimp_selection_value ()</title>
<indexterm><primary>gimp_selection_value</primary></indexterm><programlisting><link linkend="gint">gint</link> gimp_selection_value (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y);</programlisting>
<para>
Find the value of the selection at the specified coordinates.
</para>
<para>
This procedure returns the value of the selection at the specified
coordinates. If the coordinates lie out of bounds, 0 is returned.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> x coordinate of value.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> y coordinate of value.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> Value of the selection.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-grow"/>gimp_selection_grow ()</title>
<indexterm><primary>gimp_selection_grow</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_selection_grow (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> steps);</programlisting>
<para>
Grow the image's selection
</para>
<para>
This procedure grows the selection. Growing involves expanding the
boundary in all directions by the specified pixel amount.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>steps</parameter>&nbsp;:</term>
<listitem><simpara> Steps of grow (in pixels).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-shrink"/>gimp_selection_shrink ()</title>
<indexterm><primary>gimp_selection_shrink</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_selection_shrink (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> radius);</programlisting>
<para>
Shrink the image's selection
</para>
<para>
This procedure shrinks the selection. Shrinking invovles trimming
the existing selection boundary on all sides by the specified number
of pixels.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>radius</parameter>&nbsp;:</term>
<listitem><simpara> Radius of shrink (in pixels).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-invert"/>gimp_selection_invert ()</title>
<indexterm><primary>gimp_selection_invert</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_selection_invert (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Invert the selection mask.
</para>
<para>
This procedure inverts the selection mask. For every pixel in the
selection channel, its new value is calculated as (255 - old_value).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-feather"/>gimp_selection_feather ()</title>
<indexterm><primary>gimp_selection_feather</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_selection_feather (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gdouble">gdouble</link> radius);</programlisting>
<para>
Feather the image's selection
</para>
<para>
This procedure feathers the selection. Feathering is implemented
using a gaussian blur.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>radius</parameter>&nbsp;:</term>
<listitem><simpara> Radius of feather (in pixels).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-sharpen"/>gimp_selection_sharpen ()</title>
<indexterm><primary>gimp_selection_sharpen</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_selection_sharpen (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Sharpen the selection mask.
</para>
<para>
This procedure sharpens the selection mask. For every pixel in the
selection channel, if the value is &gt; 0, the new pixel is assigned
a value of 255. This removes any \"anti-aliasing\" that might exist
in the selection mask's boundary.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-border"/>gimp_selection_border ()</title>
<indexterm><primary>gimp_selection_border</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_selection_border (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> radius);</programlisting>
<para>
Border the image's selection
</para>
<para>
This procedure borders the selection. Bordering creates a new
selection which is defined along the boundary of the previous
selection at every point within the specified radius.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>radius</parameter>&nbsp;:</term>
<listitem><simpara> Radius of border (in pixels).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-translate"/>gimp_selection_translate ()</title>
<indexterm><primary>gimp_selection_translate</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_selection_translate (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint">gint</link> offx,
<link linkend="gint">gint</link> offy);</programlisting>
<para>
Translate the selection by the specified offsets.
</para>
<para>
This procedure actually translates the selection for the specified
image by the specified offsets. Regions that are translated from
beyond the bounds of the image are set to empty. Valid regions of
the selection which are translated beyond the bounds of the image
because of this call are lost.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offx</parameter>&nbsp;:</term>
<listitem><simpara> x offset for translation.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>offy</parameter>&nbsp;:</term>
<listitem><simpara> y offset for translation.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-layer-alpha"/>gimp_selection_layer_alpha ()</title>
<indexterm><primary>gimp_selection_layer_alpha</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_selection_layer_alpha (<link linkend="gint32">gint32</link> layer_ID);</programlisting>
<para>
Transfer the specified layer's alpha channel to the selection mask.
</para>
<para>
This procedure requires a layer with an alpha channel. The alpha
channel information is used to create a selection mask such that for
any pixel in the image defined in the specified layer, that layer
pixel's alpha value is transferred to the selection mask. If the
layer is undefined at a particular image pixel, the associated
selection mask value is set to 0.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
<listitem><simpara> Layer with alpha.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-selection-combine"/>gimp_selection_combine ()</title>
<indexterm><primary>gimp_selection_combine</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_selection_combine (<link linkend="gint32">gint32</link> channel_ID,
<link linkend="GimpChannelOps">GimpChannelOps</link> operation);</programlisting>
<para>
Combines the specified channel with the selection mask.
</para>
<para>
This procedure combines the specified channel into the selection
mask.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>channel_ID</parameter>&nbsp;:</term>
<listitem><simpara> The channel.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>operation</parameter>&nbsp;:</term>
<listitem><simpara> The selection operation.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,360 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimptexttool">
<refmeta>
<refentrytitle>gimptexttool</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimptexttool</refname><refpurpose>Functions for controlling the text tool.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gint32">gint32</link> <link linkend="gimp-text-fontname">gimp_text_fontname</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gdouble">gdouble</link> x,
<link linkend="gdouble">gdouble</link> y,
const <link linkend="gchar">gchar</link> *text,
<link linkend="gint">gint</link> border,
<link linkend="gboolean">gboolean</link> antialias,
<link linkend="gdouble">gdouble</link> size,
<link linkend="GimpSizeType">GimpSizeType</link> size_type,
const <link linkend="gchar">gchar</link> *fontname);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-text-get-extents-fontname">gimp_text_get_extents_fontname</link> (const <link linkend="gchar">gchar</link> *text,
<link linkend="gdouble">gdouble</link> size,
<link linkend="GimpSizeType">GimpSizeType</link> size_type,
const <link linkend="gchar">gchar</link> *fontname,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *ascent,
<link linkend="gint">gint</link> *descent);
<link linkend="gint32">gint32</link> <link linkend="gimp-text">gimp_text</link> (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gdouble">gdouble</link> x,
<link linkend="gdouble">gdouble</link> y,
const <link linkend="gchar">gchar</link> *text,
<link linkend="gint">gint</link> border,
<link linkend="gboolean">gboolean</link> antialias,
<link linkend="gdouble">gdouble</link> size,
<link linkend="GimpSizeType">GimpSizeType</link> size_type,
const <link linkend="gchar">gchar</link> *foundry,
const <link linkend="gchar">gchar</link> *family,
const <link linkend="gchar">gchar</link> *weight,
const <link linkend="gchar">gchar</link> *slant,
const <link linkend="gchar">gchar</link> *set_width,
const <link linkend="gchar">gchar</link> *spacing,
const <link linkend="gchar">gchar</link> *registry,
const <link linkend="gchar">gchar</link> *encoding);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-text-get-extents">gimp_text_get_extents</link> (const <link linkend="gchar">gchar</link> *text,
<link linkend="gdouble">gdouble</link> size,
<link linkend="GimpSizeType">GimpSizeType</link> size_type,
const <link linkend="gchar">gchar</link> *foundry,
const <link linkend="gchar">gchar</link> *family,
const <link linkend="gchar">gchar</link> *weight,
const <link linkend="gchar">gchar</link> *slant,
const <link linkend="gchar">gchar</link> *set_width,
const <link linkend="gchar">gchar</link> *spacing,
const <link linkend="gchar">gchar</link> *registry,
const <link linkend="gchar">gchar</link> *encoding,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *ascent,
<link linkend="gint">gint</link> *descent);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions for controlling the text tool.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-text-fontname"/>gimp_text_fontname ()</title>
<indexterm><primary>gimp_text_fontname</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_text_fontname (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gdouble">gdouble</link> x,
<link linkend="gdouble">gdouble</link> y,
const <link linkend="gchar">gchar</link> *text,
<link linkend="gint">gint</link> border,
<link linkend="gboolean">gboolean</link> antialias,
<link linkend="gdouble">gdouble</link> size,
<link linkend="GimpSizeType">GimpSizeType</link> size_type,
const <link linkend="gchar">gchar</link> *fontname);</programlisting>
<para>
Add text at the specified location as a floating selection or a new
layer.
</para>
<para>
This tool requires a fontname matching an installed PangoFT2 font.
You can specify the fontsize in units of pixels or points, and the
appropriate metric is specified using the size_type argument. The x
and y parameters together control the placement of the new text by
specifying the upper left corner of the text bounding box. If the
specified drawable parameter is valid, the text will be created as a
floating selection attached to the drawable. If the drawable
parameter is not valid (-1), the text will appear as a new layer.
Finally, a border can be specified around the final rendered text.
The border is measured in pixels.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The affected drawable: (-1 for a new text layer).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> The x coordinate for the left of the text bounding box.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> The y coordinate for the top of the text bounding box.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text</parameter>&nbsp;:</term>
<listitem><simpara> The text to generate (in UTF-8 encoding).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>border</parameter>&nbsp;:</term>
<listitem><simpara> The size of the border.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>antialias</parameter>&nbsp;:</term>
<listitem><simpara> Antialiasing.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter>&nbsp;:</term>
<listitem><simpara> The size of text in either pixels or points.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size_type</parameter>&nbsp;:</term>
<listitem><simpara> The units of specified size.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fontname</parameter>&nbsp;:</term>
<listitem><simpara> The name of the font.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The new text layer or -1 if no layer was created.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-text-get-extents-fontname"/>gimp_text_get_extents_fontname ()</title>
<indexterm><primary>gimp_text_get_extents_fontname</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_text_get_extents_fontname (const <link linkend="gchar">gchar</link> *text,
<link linkend="gdouble">gdouble</link> size,
<link linkend="GimpSizeType">GimpSizeType</link> size_type,
const <link linkend="gchar">gchar</link> *fontname,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *ascent,
<link linkend="gint">gint</link> *descent);</programlisting>
<para>
Get extents of the bounding box for the specified text.
</para>
<para>
This tool returns the width and height of a bounding box for the
specified text string with the specified font information. Ascent
and descent for the specified font are returned as well.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>text</parameter>&nbsp;:</term>
<listitem><simpara> The text to generate (in UTF-8 encoding).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter>&nbsp;:</term>
<listitem><simpara> The size of text in either pixels or points.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size_type</parameter>&nbsp;:</term>
<listitem><simpara> The units of specified size.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fontname</parameter>&nbsp;:</term>
<listitem><simpara> The name of the font.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> The width of the specified font.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> The height of the specified font.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ascent</parameter>&nbsp;:</term>
<listitem><simpara> The ascent of the specified font.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>descent</parameter>&nbsp;:</term>
<listitem><simpara> The descent of the specified font.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-text"/>gimp_text ()</title>
<indexterm role="deprecated"><primary>gimp_text</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_text (<link linkend="gint32">gint32</link> image_ID,
<link linkend="gint32">gint32</link> drawable_ID,
<link linkend="gdouble">gdouble</link> x,
<link linkend="gdouble">gdouble</link> y,
const <link linkend="gchar">gchar</link> *text,
<link linkend="gint">gint</link> border,
<link linkend="gboolean">gboolean</link> antialias,
<link linkend="gdouble">gdouble</link> size,
<link linkend="GimpSizeType">GimpSizeType</link> size_type,
const <link linkend="gchar">gchar</link> *foundry,
const <link linkend="gchar">gchar</link> *family,
const <link linkend="gchar">gchar</link> *weight,
const <link linkend="gchar">gchar</link> *slant,
const <link linkend="gchar">gchar</link> *set_width,
const <link linkend="gchar">gchar</link> *spacing,
const <link linkend="gchar">gchar</link> *registry,
const <link linkend="gchar">gchar</link> *encoding);</programlisting>
<warning><para><literal>gimp_text</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-text-fontname"><function>gimp_text_fontname()</function></link> instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
<listitem><simpara> The affected drawable: (-1 for a new text layer).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara> The x coordinate for the left of the text bounding box.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
<listitem><simpara> The y coordinate for the top of the text bounding box.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text</parameter>&nbsp;:</term>
<listitem><simpara> The text to generate (in UTF-8 encoding).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>border</parameter>&nbsp;:</term>
<listitem><simpara> The size of the border.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>antialias</parameter>&nbsp;:</term>
<listitem><simpara> Antialiasing.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter>&nbsp;:</term>
<listitem><simpara> The size of text in either pixels or points.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size_type</parameter>&nbsp;:</term>
<listitem><simpara> The units of specified size.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>foundry</parameter>&nbsp;:</term>
<listitem><simpara> The font foundry.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>family</parameter>&nbsp;:</term>
<listitem><simpara> The font family.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>weight</parameter>&nbsp;:</term>
<listitem><simpara> The font weight.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>slant</parameter>&nbsp;:</term>
<listitem><simpara> The font slant.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>set_width</parameter>&nbsp;:</term>
<listitem><simpara> The font set-width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>spacing</parameter>&nbsp;:</term>
<listitem><simpara> The font spacing.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>registry</parameter>&nbsp;:</term>
<listitem><simpara> The font registry.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>encoding</parameter>&nbsp;:</term>
<listitem><simpara> The font encoding.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The new text layer or -1 if no layer was created.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-text-get-extents"/>gimp_text_get_extents ()</title>
<indexterm role="deprecated"><primary>gimp_text_get_extents</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_text_get_extents (const <link linkend="gchar">gchar</link> *text,
<link linkend="gdouble">gdouble</link> size,
<link linkend="GimpSizeType">GimpSizeType</link> size_type,
const <link linkend="gchar">gchar</link> *foundry,
const <link linkend="gchar">gchar</link> *family,
const <link linkend="gchar">gchar</link> *weight,
const <link linkend="gchar">gchar</link> *slant,
const <link linkend="gchar">gchar</link> *set_width,
const <link linkend="gchar">gchar</link> *spacing,
const <link linkend="gchar">gchar</link> *registry,
const <link linkend="gchar">gchar</link> *encoding,
<link linkend="gint">gint</link> *width,
<link linkend="gint">gint</link> *height,
<link linkend="gint">gint</link> *ascent,
<link linkend="gint">gint</link> *descent);</programlisting>
<warning><para><literal>gimp_text_get_extents</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
This procedure is deprecated! Use <link linkend="gimp-text-get-extents-fontname"><function>gimp_text_get_extents_fontname()</function></link>
instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>text</parameter>&nbsp;:</term>
<listitem><simpara> The text to generate (in UTF-8 encoding).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter>&nbsp;:</term>
<listitem><simpara> The size of text in either pixels or points.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size_type</parameter>&nbsp;:</term>
<listitem><simpara> The units of specified size.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>foundry</parameter>&nbsp;:</term>
<listitem><simpara> The font foundry.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>family</parameter>&nbsp;:</term>
<listitem><simpara> The font family.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>weight</parameter>&nbsp;:</term>
<listitem><simpara> The font weight.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>slant</parameter>&nbsp;:</term>
<listitem><simpara> The font slant.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>set_width</parameter>&nbsp;:</term>
<listitem><simpara> The font set-width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>spacing</parameter>&nbsp;:</term>
<listitem><simpara> The font spacing.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>registry</parameter>&nbsp;:</term>
<listitem><simpara> The font registry.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>encoding</parameter>&nbsp;:</term>
<listitem><simpara> The font encoding.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
<listitem><simpara> The width of the specified font.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
<listitem><simpara> The height of the specified font.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ascent</parameter>&nbsp;:</term>
<listitem><simpara> The ascent of the specified font.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>descent</parameter>&nbsp;:</term>
<listitem><simpara> The descent of the specified font.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,161 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimptile">
<refmeta>
<refentrytitle>gimptile</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimptile</refname><refpurpose>Functions for working with tiles.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="GimpTile">GimpTile</link>;
<link linkend="void">void</link> <link linkend="gimp-tile-ref">gimp_tile_ref</link> (<link linkend="GimpTile">GimpTile</link> *tile);
<link linkend="void">void</link> <link linkend="gimp-tile-ref-zero">gimp_tile_ref_zero</link> (<link linkend="GimpTile">GimpTile</link> *tile);
<link linkend="void">void</link> <link linkend="gimp-tile-unref">gimp_tile_unref</link> (<link linkend="GimpTile">GimpTile</link> *tile,
<link linkend="gboolean">gboolean</link> dirty);
<link linkend="void">void</link> <link linkend="gimp-tile-flush">gimp_tile_flush</link> (<link linkend="GimpTile">GimpTile</link> *tile);
<link linkend="void">void</link> <link linkend="gimp-tile-cache-size">gimp_tile_cache_size</link> (<link linkend="gulong">gulong</link> kilobytes);
<link linkend="void">void</link> <link linkend="gimp-tile-cache-ntiles">gimp_tile_cache_ntiles</link> (<link linkend="gulong">gulong</link> ntiles);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Functions for working with tiles.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GimpTile"/>GimpTile</title>
<indexterm><primary>GimpTile</primary></indexterm><programlisting>typedef struct {
guint ewidth; /* the effective width of the tile */
guint eheight; /* the effective height of the tile */
guint bpp; /* the bytes per pixel (1, 2, 3 or 4 ) */
guint tile_num; /* the number of this tile within the drawable */
guint16 ref_count; /* reference count for the tile */
guint dirty : 1; /* is the tile dirty? has it been modified? */
guint shadow: 1; /* is this a shadow tile */
guchar *data; /* the pixel data for the tile */
GimpDrawable *drawable; /* the drawable this tile came from */
} GimpTile;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="gimp-tile-ref"/>gimp_tile_ref ()</title>
<indexterm><primary>gimp_tile_ref</primary></indexterm><programlisting><link linkend="void">void</link> gimp_tile_ref (<link linkend="GimpTile">GimpTile</link> *tile);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>tile</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-tile-ref-zero"/>gimp_tile_ref_zero ()</title>
<indexterm><primary>gimp_tile_ref_zero</primary></indexterm><programlisting><link linkend="void">void</link> gimp_tile_ref_zero (<link linkend="GimpTile">GimpTile</link> *tile);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>tile</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-tile-unref"/>gimp_tile_unref ()</title>
<indexterm><primary>gimp_tile_unref</primary></indexterm><programlisting><link linkend="void">void</link> gimp_tile_unref (<link linkend="GimpTile">GimpTile</link> *tile,
<link linkend="gboolean">gboolean</link> dirty);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>tile</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dirty</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-tile-flush"/>gimp_tile_flush ()</title>
<indexterm><primary>gimp_tile_flush</primary></indexterm><programlisting><link linkend="void">void</link> gimp_tile_flush (<link linkend="GimpTile">GimpTile</link> *tile);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>tile</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-tile-cache-size"/>gimp_tile_cache_size ()</title>
<indexterm><primary>gimp_tile_cache_size</primary></indexterm><programlisting><link linkend="void">void</link> gimp_tile_cache_size (<link linkend="gulong">gulong</link> kilobytes);</programlisting>
<para>
Sets the size of the tile cache on the plug-in side. The tile cache
is used to reduce the number of tiles exchanged between the GIMP core
and the plug-in. See also <link linkend="gimp-tile-cache-ntiles"><function>gimp_tile_cache_ntiles()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>kilobytes</parameter>&nbsp;:</term>
<listitem><simpara> new cache size in kilobytes
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-tile-cache-ntiles"/>gimp_tile_cache_ntiles ()</title>
<indexterm><primary>gimp_tile_cache_ntiles</primary></indexterm><programlisting><link linkend="void">void</link> gimp_tile_cache_ntiles (<link linkend="gulong">gulong</link> ntiles);</programlisting>
<para>
Sets the size of the tile cache on the plug-in side. This function
is similar to <link linkend="gimp-tile-cache-size"><function>gimp_tile_cache_size()</function></link> but allows to specify the
number of tiles directly.
</para>
<para>
If your plug-in access pixels tile-by-tile, it doesn't need a tile
cache at all. If however the plug-in accesses drawable pixel data
row-by-row, it should set the tile cache large enough to hold the
number of tiles per row. Double this size if your plug-in uses
shadow tiles.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>ntiles</parameter>&nbsp;:</term>
<listitem><simpara> number of tiles that should fit into the cache
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpui">
<refmeta>
<refentrytitle>gimpui</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpui</refname><refpurpose>Common user interface functions. This header includes all other GIMP User
Interface Library headers.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="void">void</link> <link linkend="gimp-ui-init">gimp_ui_init</link> (const <link linkend="gchar">gchar</link> *prog_name,
<link linkend="gboolean">gboolean</link> preview);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Common user interface functions. This header includes all other GIMP User
Interface Library headers.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-ui-init"/>gimp_ui_init ()</title>
<indexterm><primary>gimp_ui_init</primary></indexterm><programlisting><link linkend="void">void</link> gimp_ui_init (const <link linkend="gchar">gchar</link> *prog_name,
<link linkend="gboolean">gboolean</link> preview);</programlisting>
<para>
This function initializes GTK+ with <link linkend="gtk-init"><function>gtk_init()</function></link> and initializes GDK's
image rendering subsystem (GdkRGB) to follow the GIMP main program's
colormap allocation/installation policy.
</para>
<para>
The GIMP's colormap policy can be determinded by the user with the
gimprc variables <parameter>min_colors</parameter> and <parameter>install_cmap</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>prog_name</parameter>&nbsp;:</term>
<listitem><simpara> The name of the plug-in which will be passed as argv[0] to
<link linkend="gtk-init"><function>gtk_init()</function></link>. It's a convention to use the name of the
executable and _not_ the PDB procedure name or something.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>preview</parameter>&nbsp;:</term>
<listitem><simpara> This parameter is unused and exists for historical
reasons only.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<link linkend="gtk-init"><function>gtk_init()</function></link>, <link linkend="gdk-set-use-xshm"><function>gdk_set_use_xshm()</function></link>, <link linkend="gdk-rgb-set-min-colors"><function>gdk_rgb_set_min_colors()</function></link>,
<link linkend="gdk-rgb-set-install"><function>gdk_rgb_set_install()</function></link>, <link linkend="gdk-rgb-get-visual"><function>gdk_rgb_get_visual()</function></link>, <link linkend="gdk-rgb-get-cmap"><function>gdk_rgb_get_cmap()</function></link>,
<link linkend="gtk-widget-set-default-visual"><function>gtk_widget_set_default_visual()</function></link>, <link linkend="gtk-widget-set-default-colormap"><function>gtk_widget_set_default_colormap()</function></link>,
<link linkend="gtk-preview-set-gamma"><function>gtk_preview_set_gamma()</function></link>.
</para>
</refsect1>
</refentry>

View File

@ -0,0 +1,207 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libgimp-gimpundo">
<refmeta>
<refentrytitle>gimpundo</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGIMP Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gimpundo</refname><refpurpose>Control of undo/redo.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-undo-group-start">gimp_image_undo_group_start</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-undo-group-end">gimp_image_undo_group_end</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-undo-is-enabled">gimp_image_undo_is_enabled</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-undo-disable">gimp_image_undo_disable</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-undo-enable">gimp_image_undo_enable</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-undo-freeze">gimp_image_undo_freeze</link> (<link linkend="gint32">gint32</link> image_ID);
<link linkend="gboolean">gboolean</link> <link linkend="gimp-image-undo-thaw">gimp_image_undo_thaw</link> (<link linkend="gint32">gint32</link> image_ID);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Control of undo/redo.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gimp-image-undo-group-start"/>gimp_image_undo_group_start ()</title>
<indexterm><primary>gimp_image_undo_group_start</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_undo_group_start (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Starts a group undo.
</para>
<para>
This function is used to start a group undo--necessary for logically
combining two or more undo operations into a single operation. This
call must be used in conjunction with a 'gimp-image-undo-group-end'
call.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The ID of the image in which to open an undo group.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-undo-group-end"/>gimp_image_undo_group_end ()</title>
<indexterm><primary>gimp_image_undo_group_end</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_undo_group_end (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Finish a group undo.
</para>
<para>
This function must be called once for each
'gimp-image-undo-group-start' call that is made.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The ID of the image in which to close an undo group.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-undo-is-enabled"/>gimp_image_undo_is_enabled ()</title>
<indexterm><primary>gimp_image_undo_is_enabled</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_undo_is_enabled (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Check if the image's undo stack is enabled.
</para>
<para>
This procedure checks if the image's undo stack is currently enabled
or disabled. This is useful when several plugins or scripts call
each other and want to check if their caller has already used
'gimp_image_undo_disable' or 'gimp_image_undo_freeze'.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> True if undo is enabled for this image.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-undo-disable"/>gimp_image_undo_disable ()</title>
<indexterm><primary>gimp_image_undo_disable</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_undo_disable (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Disable the image's undo stack.
</para>
<para>
This procedure disables the image's undo stack, allowing subsequent
operations to ignore their undo steps. This is generally called in
conjunction with 'gimp_image_undo_enable' to temporarily disable an
image undo stack. This is advantageous because saving undo steps can
be time and memory intensive.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> True if the image undo has been disabled.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-undo-enable"/>gimp_image_undo_enable ()</title>
<indexterm><primary>gimp_image_undo_enable</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_undo_enable (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Enable the image's undo stack.
</para>
<para>
This procedure enables the image's undo stack, allowing subsequent
operations to store their undo steps. This is generally called in
conjunction with 'gimp_image_undo_disable' to temporarily disable an
image undo stack.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> True if the image undo has been enabled.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-undo-freeze"/>gimp_image_undo_freeze ()</title>
<indexterm><primary>gimp_image_undo_freeze</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_undo_freeze (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Freeze the image's undo stack.
</para>
<para>
This procedure freezes the image's undo stack, allowing subsequent
operations to ignore their undo steps. This is generally called in
conjunction with 'gimp_image_undo_thaw' to temporarily disable an
image undo stack. This is advantageous because saving undo steps can
be time and memory intensive. 'gimp_image_undo_{freeze,thaw}' and
'gimp_image_undo_{disable,enable}' differ in that the former does
not free up all undo steps when undo is thawed, so is more suited to
interactive in-situ previews. It is important in this case that the
image is back to the same state it was frozen in before thawing,
else 'undo' behaviour is undefined.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> True if the image undo has been frozen.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gimp-image-undo-thaw"/>gimp_image_undo_thaw ()</title>
<indexterm><primary>gimp_image_undo_thaw</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_image_undo_thaw (<link linkend="gint32">gint32</link> image_ID);</programlisting>
<para>
Thaw the image's undo stack.
</para>
<para>
This procedure thaws the image's undo stack, allowing subsequent
operations to store their undo steps. This is generally called in
conjunction with 'gimp_image_undo_freeze' to temporarily freeze an
image undo stack. 'gimp_image_undo_thaw' does NOT free the undo
stack as 'gimp_image_undo_enable' does, so is suited for situations
where one wishes to leave the undo stack in the same state in which
one found it despite non-destructively playing with the image in the
meantime. An example would be in-situ plugin previews. Balancing
freezes and thaws and ensuring image consistancy is the
responsibility of the caller.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
<listitem><simpara> The image.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> True if the image undo has been thawed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>