home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / libgimp / gimpfloatingsel_pdb.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-08-25  |  6.0 KB  |  221 lines

  1. /* LIBGIMP - The GIMP Library
  2.  * Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
  3.  *
  4.  * gimpfloatingsel_pdb.c
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Lesser General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  *
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.  * Lesser General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Lesser General Public
  17.  * License along with this library; if not, write to the
  18.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.  * Boston, MA 02111-1307, USA.
  20.  */
  21.  
  22. /* NOTE: This file is autogenerated by pdbgen.pl */
  23.  
  24. #include "gimp.h"
  25.  
  26. /**
  27.  * gimp_floating_sel_remove:
  28.  * @floating_sel_ID: The floating selection.
  29.  *
  30.  * Remove the specified floating selection from its associated
  31.  * drawable.
  32.  *
  33.  * This procedure removes the floating selection completely, without
  34.  * any side effects. The associated drawable is then set to active.
  35.  *
  36.  * Returns: TRUE on success.
  37.  */
  38. gboolean
  39. gimp_floating_sel_remove (gint32 floating_sel_ID)
  40. {
  41.   GimpParam *return_vals;
  42.   gint nreturn_vals;
  43.   gboolean success = TRUE;
  44.  
  45.   return_vals = gimp_run_procedure ("gimp_floating_sel_remove",
  46.                     &nreturn_vals,
  47.                     GIMP_PDB_LAYER, floating_sel_ID,
  48.                     GIMP_PDB_END);
  49.  
  50.   success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
  51.  
  52.   gimp_destroy_params (return_vals, nreturn_vals);
  53.  
  54.   return success;
  55. }
  56.  
  57. /**
  58.  * gimp_floating_sel_anchor:
  59.  * @floating_sel_ID: The floating selection.
  60.  *
  61.  * Anchor the specified floating selection to its associated drawable.
  62.  *
  63.  * This procedure anchors the floating selection to its associated
  64.  * drawable. This is similar to merging with a merge type of
  65.  * ClipToBottomLayer. The floating selection layer is no longer valid
  66.  * after this operation.
  67.  *
  68.  * Returns: TRUE on success.
  69.  */
  70. gboolean
  71. gimp_floating_sel_anchor (gint32 floating_sel_ID)
  72. {
  73.   GimpParam *return_vals;
  74.   gint nreturn_vals;
  75.   gboolean success = TRUE;
  76.  
  77.   return_vals = gimp_run_procedure ("gimp_floating_sel_anchor",
  78.                     &nreturn_vals,
  79.                     GIMP_PDB_LAYER, floating_sel_ID,
  80.                     GIMP_PDB_END);
  81.  
  82.   success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
  83.  
  84.   gimp_destroy_params (return_vals, nreturn_vals);
  85.  
  86.   return success;
  87. }
  88.  
  89. /**
  90.  * gimp_floating_sel_to_layer:
  91.  * @floating_sel_ID: The floating selection.
  92.  *
  93.  * Transforms the specified floating selection into a layer.
  94.  *
  95.  * This procedure transforms the specified floating selection into a
  96.  * layer with the same offsets and extents. The composited image will
  97.  * look precisely the same, but the floating selection layer will no
  98.  * longer be clipped to the extents of the drawable it was attached to.
  99.  * The floating selection will become the active layer. This procedure
  100.  * will not work if the floating selection has a different base type
  101.  * from the underlying image. This might be the case if the floating
  102.  * selection is above an auxillary channel or a layer mask.
  103.  *
  104.  * Returns: TRUE on success.
  105.  */
  106. gboolean
  107. gimp_floating_sel_to_layer (gint32 floating_sel_ID)
  108. {
  109.   GimpParam *return_vals;
  110.   gint nreturn_vals;
  111.   gboolean success = TRUE;
  112.  
  113.   return_vals = gimp_run_procedure ("gimp_floating_sel_to_layer",
  114.                     &nreturn_vals,
  115.                     GIMP_PDB_LAYER, floating_sel_ID,
  116.                     GIMP_PDB_END);
  117.  
  118.   success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
  119.  
  120.   gimp_destroy_params (return_vals, nreturn_vals);
  121.  
  122.   return success;
  123. }
  124.  
  125. /**
  126.  * gimp_floating_sel_attach:
  127.  * @layer_ID: The layer (is attached as floating selection).
  128.  * @drawable_ID: The drawable (where to attach the floating selection).
  129.  *
  130.  * Attach the specified layer as floating to the specified drawable.
  131.  *
  132.  * This procedure attaches the layer as floating selection to the
  133.  * drawable.
  134.  *
  135.  * Returns: TRUE on success.
  136.  */
  137. gboolean
  138. gimp_floating_sel_attach (gint32 layer_ID,
  139.               gint32 drawable_ID)
  140. {
  141.   GimpParam *return_vals;
  142.   gint nreturn_vals;
  143.   gboolean success = TRUE;
  144.  
  145.   return_vals = gimp_run_procedure ("gimp_floating_sel_attach",
  146.                     &nreturn_vals,
  147.                     GIMP_PDB_LAYER, layer_ID,
  148.                     GIMP_PDB_DRAWABLE, drawable_ID,
  149.                     GIMP_PDB_END);
  150.  
  151.   success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
  152.  
  153.   gimp_destroy_params (return_vals, nreturn_vals);
  154.  
  155.   return success;
  156. }
  157.  
  158. /**
  159.  * gimp_floating_sel_rigor:
  160.  * @floating_sel_ID: The floating selection.
  161.  * @undo: %%desc%%.
  162.  *
  163.  * Rigor the floating selection.
  164.  *
  165.  * This procedure rigors the floating selection.
  166.  *
  167.  * Returns: TRUE on success.
  168.  */
  169. gboolean
  170. gimp_floating_sel_rigor (gint32   floating_sel_ID,
  171.              gboolean undo)
  172. {
  173.   GimpParam *return_vals;
  174.   gint nreturn_vals;
  175.   gboolean success = TRUE;
  176.  
  177.   return_vals = gimp_run_procedure ("gimp_floating_sel_rigor",
  178.                     &nreturn_vals,
  179.                     GIMP_PDB_LAYER, floating_sel_ID,
  180.                     GIMP_PDB_INT32, undo,
  181.                     GIMP_PDB_END);
  182.  
  183.   success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
  184.  
  185.   gimp_destroy_params (return_vals, nreturn_vals);
  186.  
  187.   return success;
  188. }
  189.  
  190. /**
  191.  * gimp_floating_sel_relax:
  192.  * @floating_sel_ID: The floating selection.
  193.  * @undo: %%desc%%.
  194.  *
  195.  * Relax the floating selection.
  196.  *
  197.  * This procedure relaxes the floating selection.
  198.  *
  199.  * Returns: TRUE on success.
  200.  */
  201. gboolean
  202. gimp_floating_sel_relax (gint32   floating_sel_ID,
  203.              gboolean undo)
  204. {
  205.   GimpParam *return_vals;
  206.   gint nreturn_vals;
  207.   gboolean success = TRUE;
  208.  
  209.   return_vals = gimp_run_procedure ("gimp_floating_sel_relax",
  210.                     &nreturn_vals,
  211.                     GIMP_PDB_LAYER, floating_sel_ID,
  212.                     GIMP_PDB_INT32, undo,
  213.                     GIMP_PDB_END);
  214.  
  215.   success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
  216.  
  217.   gimp_destroy_params (return_vals, nreturn_vals);
  218.  
  219.   return success;
  220. }
  221.