1 /* LIBGIMP - The GIMP Library
2 * Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
4 * gimpfloatingsel_pdb.c
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 3 of the License, or (at your option) any later version.
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.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library. If not, see
18 * <https://www.gnu.org/licenses/>.
21 /* NOTE: This file is auto-generated by pdbgen.pl */
29 * SECTION: gimpfloatingsel
30 * @title: gimpfloatingsel
31 * @short_description: Functions for removing or attaching floating selections.
33 * Functions for removing or attaching floating selections.
38 * gimp_floating_sel_remove:
39 * @floating_sel_ID: The floating selection.
41 * Remove the specified floating selection from its associated
44 * This procedure removes the floating selection completely, without
45 * any side effects. The associated drawable is then set to active.
47 * Returns: TRUE on success.
50 gimp_floating_sel_remove (gint32 floating_sel_ID
)
52 GimpParam
*return_vals
;
54 gboolean success
= TRUE
;
56 return_vals
= gimp_run_procedure ("gimp-floating-sel-remove",
58 GIMP_PDB_LAYER
, floating_sel_ID
,
61 success
= return_vals
[0].data
.d_status
== GIMP_PDB_SUCCESS
;
63 gimp_destroy_params (return_vals
, nreturn_vals
);
69 * gimp_floating_sel_anchor:
70 * @floating_sel_ID: The floating selection.
72 * Anchor the specified floating selection to its associated drawable.
74 * This procedure anchors the floating selection to its associated
75 * drawable. This is similar to merging with a merge type of
76 * ClipToBottomLayer. The floating selection layer is no longer valid
77 * after this operation.
79 * Returns: TRUE on success.
82 gimp_floating_sel_anchor (gint32 floating_sel_ID
)
84 GimpParam
*return_vals
;
86 gboolean success
= TRUE
;
88 return_vals
= gimp_run_procedure ("gimp-floating-sel-anchor",
90 GIMP_PDB_LAYER
, floating_sel_ID
,
93 success
= return_vals
[0].data
.d_status
== GIMP_PDB_SUCCESS
;
95 gimp_destroy_params (return_vals
, nreturn_vals
);
101 * gimp_floating_sel_to_layer:
102 * @floating_sel_ID: The floating selection.
104 * Transforms the specified floating selection into a layer.
106 * This procedure transforms the specified floating selection into a
107 * layer with the same offsets and extents. The composited image will
108 * look precisely the same, but the floating selection layer will no
109 * longer be clipped to the extents of the drawable it was attached to.
110 * The floating selection will become the active layer. This procedure
111 * will not work if the floating selection has a different base type
112 * from the underlying image. This might be the case if the floating
113 * selection is above an auxiliary channel or a layer mask.
115 * Returns: TRUE on success.
118 gimp_floating_sel_to_layer (gint32 floating_sel_ID
)
120 GimpParam
*return_vals
;
122 gboolean success
= TRUE
;
124 return_vals
= gimp_run_procedure ("gimp-floating-sel-to-layer",
126 GIMP_PDB_LAYER
, floating_sel_ID
,
129 success
= return_vals
[0].data
.d_status
== GIMP_PDB_SUCCESS
;
131 gimp_destroy_params (return_vals
, nreturn_vals
);
137 * gimp_floating_sel_attach:
138 * @layer_ID: The layer (is attached as floating selection).
139 * @drawable_ID: The drawable (where to attach the floating selection).
141 * Attach the specified layer as floating to the specified drawable.
143 * This procedure attaches the layer as floating selection to the
146 * Returns: TRUE on success.
149 gimp_floating_sel_attach (gint32 layer_ID
,
152 GimpParam
*return_vals
;
154 gboolean success
= TRUE
;
156 return_vals
= gimp_run_procedure ("gimp-floating-sel-attach",
158 GIMP_PDB_LAYER
, layer_ID
,
159 GIMP_PDB_DRAWABLE
, drawable_ID
,
162 success
= return_vals
[0].data
.d_status
== GIMP_PDB_SUCCESS
;
164 gimp_destroy_params (return_vals
, nreturn_vals
);