libgimp: add item based API for positions (raise, lower etc.)

and deprecate the resp. functions for layers, channels and vectors.
This commit is contained in:
Michael Natterer 2010-08-27 16:11:06 +02:00
parent ac33ead19d
commit 0d35e8de6d
5 changed files with 1302 additions and 817 deletions

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,7 @@
#include "internal-procs.h"
/* 621 procedures registered total */
/* 626 procedures registered total */
void
internal_procs_init (GimpPDB *pdb)

View File

@ -1042,180 +1042,6 @@ gimp_image_remove_layer (gint32 image_ID,
return success;
}
/**
* gimp_image_get_layer_position:
* @image_ID: The image.
* @layer_ID: The layer.
*
* Returns the position of the layer in the layer stack.
*
* This procedure determines the position of the specified layer in the
* images layer stack. If the layer doesn't exist in the image, an
* error is returned.
*
* Returns: The position of the layer in the layer stack.
*
* Since: GIMP 2.4
*/
gint
gimp_image_get_layer_position (gint32 image_ID,
gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gint position = 0;
return_vals = gimp_run_procedure ("gimp-image-get-layer-position",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
position = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return position;
}
/**
* gimp_image_raise_layer:
* @image_ID: The image.
* @layer_ID: The layer to raise.
*
* Raise the specified layer in the image's layer stack
*
* This procedure raises the specified layer one step in the existing
* layer stack. The procecure call will fail if there is no layer above
* it.
*
* Returns: TRUE on success.
*/
gboolean
gimp_image_raise_layer (gint32 image_ID,
gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-raise-layer",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_lower_layer:
* @image_ID: The image.
* @layer_ID: The layer to lower.
*
* Lower the specified layer in the image's layer stack
*
* This procedure lowers the specified layer one step in the existing
* layer stack. The procecure call will fail if there is no layer below
* it.
*
* Returns: TRUE on success.
*/
gboolean
gimp_image_lower_layer (gint32 image_ID,
gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-lower-layer",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_raise_layer_to_top:
* @image_ID: The image.
* @layer_ID: The layer to raise to top.
*
* Raise the specified layer in the image's layer stack to top of stack
*
* This procedure raises the specified layer to top of the existing
* layer stack. It will not move the layer if there is no layer above
* it.
*
* Returns: TRUE on success.
*/
gboolean
gimp_image_raise_layer_to_top (gint32 image_ID,
gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-raise-layer-to-top",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_lower_layer_to_bottom:
* @image_ID: The image.
* @layer_ID: The layer to lower to bottom.
*
* Lower the specified layer in the image's layer stack to bottom of
* stack
*
* This procedure lowers the specified layer to bottom of the existing
* layer stack. It will not move the layer if there is no layer below
* it.
*
* Returns: TRUE on success.
*/
gboolean
gimp_image_lower_layer_to_bottom (gint32 image_ID,
gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-lower-layer-to-bottom",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_add_channel:
* @image_ID: The image.
@ -1287,111 +1113,6 @@ gimp_image_remove_channel (gint32 image_ID,
return success;
}
/**
* gimp_image_get_channel_position:
* @image_ID: The image.
* @channel_ID: The channel.
*
* Returns the position of the channel in the channel stack.
*
* This procedure determines the position of the specified channel in
* the images channel stack. If the channel doesn't exist in the image,
* an error is returned.
*
* Returns: The position of the channel in the channel stack.
*
* Since: GIMP 2.4
*/
gint
gimp_image_get_channel_position (gint32 image_ID,
gint32 channel_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gint position = 0;
return_vals = gimp_run_procedure ("gimp-image-get-channel-position",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
position = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return position;
}
/**
* gimp_image_raise_channel:
* @image_ID: The image.
* @channel_ID: The channel to raise.
*
* Raise the specified channel in the image's channel stack
*
* This procedure raises the specified channel one step in the existing
* channel stack. The procecure call will fail if there is no channel
* above it.
*
* Returns: TRUE on success.
*/
gboolean
gimp_image_raise_channel (gint32 image_ID,
gint32 channel_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-raise-channel",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_lower_channel:
* @image_ID: The image.
* @channel_ID: The channel to lower.
*
* Lower the specified channel in the image's channel stack
*
* This procedure lowers the specified channel one step in the existing
* channel stack. The procecure call will fail if there is no channel
* below it.
*
* Returns: TRUE on success.
*/
gboolean
gimp_image_lower_channel (gint32 image_ID,
gint32 channel_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-lower-channel",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_add_vectors:
* @image_ID: The image.
@ -1464,17 +1185,437 @@ gimp_image_remove_vectors (gint32 image_ID,
return success;
}
/**
* gimp_image_get_item_position:
* @image_ID: The image.
* @item_ID: The item.
*
* Returns the position of the item in its level of its item tree.
*
* This procedure determines the position of the specified item in its
* level in its item tree in the image. If the item doesn't exist in
* the image, or the item is not part of an item tree, an error is
* returned.
*
* Returns: The position of the item in its level in the item tree.
*
* Since: GIMP 2.8
*/
gint
gimp_image_get_item_position (gint32 image_ID,
gint32 item_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gint position = 0;
return_vals = gimp_run_procedure ("gimp-image-get-item-position",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_ITEM, item_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
position = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return position;
}
/**
* gimp_image_raise_item:
* @image_ID: The image.
* @item_ID: The item to raise.
*
* Raise the specified item in its level in its item tree
*
* This procedure raises the specified item one step in the item tree.
* The procecure call will fail if there is no item above it.
*
* Returns: TRUE on success.
*
* Since: GIMP 2.8
*/
gboolean
gimp_image_raise_item (gint32 image_ID,
gint32 item_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-raise-item",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_ITEM, item_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_lower_item:
* @image_ID: The image.
* @item_ID: The item to lower.
*
* Lower the specified item in its level in its item tree
*
* This procedure lowers the specified item one step in the item tree.
* The procecure call will fail if there is no item below it.
*
* Returns: TRUE on success.
*
* Since: GIMP 2.8
*/
gboolean
gimp_image_lower_item (gint32 image_ID,
gint32 item_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-lower-item",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_ITEM, item_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_raise_item_to_top:
* @image_ID: The image.
* @item_ID: The item to raise to top.
*
* Raise the specified item to the top of its level in its item tree
*
* This procedure raises the specified item to top of its level in the
* item tree. It will not move the item if there is no item above it.
*
* Returns: TRUE on success.
*
* Since: GIMP 2.8
*/
gboolean
gimp_image_raise_item_to_top (gint32 image_ID,
gint32 item_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-raise-item-to-top",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_ITEM, item_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_lower_item_to_bottom:
* @image_ID: The image.
* @item_ID: The item to lower to bottom.
*
* Lower the specified item to the bottom of its level in its item tree
*
* This procedure lowers the specified item to bottom of its level in
* the item tree. It will not move the layer if there is no layer below
* it.
*
* Returns: TRUE on success.
*
* Since: GIMP 2.8
*/
gboolean
gimp_image_lower_item_to_bottom (gint32 image_ID,
gint32 item_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-lower-item-to-bottom",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_ITEM, item_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_get_layer_position:
* @image_ID: The image.
* @layer_ID: The layer.
*
* Deprecated: Use gimp_image_get_item_position() instead.
*
* Returns: The position of the layer in the layer stack.
*
* Since: GIMP 2.4
*/
gint
gimp_image_get_layer_position (gint32 image_ID,
gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gint position = 0;
return_vals = gimp_run_procedure ("gimp-image-get-layer-position",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
position = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return position;
}
/**
* gimp_image_raise_layer:
* @image_ID: The image.
* @layer_ID: The layer to raise.
*
* Deprecated: Use gimp_image_raise_item() instead.
*
* Returns: TRUE on success.
*/
gboolean
gimp_image_raise_layer (gint32 image_ID,
gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-raise-layer",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_lower_layer:
* @image_ID: The image.
* @layer_ID: The layer to lower.
*
* Deprecated: Use gimp_image_lower_item() instead.
*
* Returns: TRUE on success.
*/
gboolean
gimp_image_lower_layer (gint32 image_ID,
gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-lower-layer",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_raise_layer_to_top:
* @image_ID: The image.
* @layer_ID: The layer to raise to top.
*
* Deprecated: Use gimp_image_raise_item_to_top() instead.
*
* Returns: TRUE on success.
*/
gboolean
gimp_image_raise_layer_to_top (gint32 image_ID,
gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-raise-layer-to-top",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_lower_layer_to_bottom:
* @image_ID: The image.
* @layer_ID: The layer to lower to bottom.
*
* Deprecated: Use gimp_image_lower_item_to_bottom() instead.
*
* Returns: TRUE on success.
*/
gboolean
gimp_image_lower_layer_to_bottom (gint32 image_ID,
gint32 layer_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-lower-layer-to-bottom",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_get_channel_position:
* @image_ID: The image.
* @channel_ID: The channel.
*
* Deprecated: Use gimp_image_get_item_position() instead.
*
* Returns: The position of the channel in the channel stack.
*
* Since: GIMP 2.4
*/
gint
gimp_image_get_channel_position (gint32 image_ID,
gint32 channel_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gint position = 0;
return_vals = gimp_run_procedure ("gimp-image-get-channel-position",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
position = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return position;
}
/**
* gimp_image_raise_channel:
* @image_ID: The image.
* @channel_ID: The channel to raise.
*
* Deprecated: Use gimp_image_raise_item() instead.
*
* Returns: TRUE on success.
*/
gboolean
gimp_image_raise_channel (gint32 image_ID,
gint32 channel_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-raise-channel",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_lower_channel:
* @image_ID: The image.
* @channel_ID: The channel to lower.
*
* Deprecated: Use gimp_image_lower_item() instead.
*
* Returns: TRUE on success.
*/
gboolean
gimp_image_lower_channel (gint32 image_ID,
gint32 channel_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-lower-channel",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_get_vectors_position:
* @image_ID: The image.
* @vectors_ID: The vectors object.
*
* Returns the position of the vectors object in the vectors objects
* stack.
*
* This procedure determines the position of the specified vectors
* object in the images vectors object stack. If the vectors object
* doesn't exist in the image, an error is returned.
* Deprecated: Use gimp_image_get_item_position() instead.
*
* Returns: The position of the vectors object in the vectors stack.
*
@ -1507,11 +1648,7 @@ gimp_image_get_vectors_position (gint32 image_ID,
* @image_ID: The image.
* @vectors_ID: The vectors object to raise.
*
* Raise the specified vectors in the image's vectors stack
*
* This procedure raises the specified vectors one step in the existing
* vectors stack. The procecure call will fail if there is no vectors
* above it.
* Deprecated: Use gimp_image_raise_item() instead.
*
* Returns: TRUE on success.
*
@ -1543,11 +1680,7 @@ gimp_image_raise_vectors (gint32 image_ID,
* @image_ID: The image.
* @vectors_ID: The vectors object to lower.
*
* Lower the specified vectors in the image's vectors stack
*
* This procedure lowers the specified vectors one step in the existing
* vectors stack. The procecure call will fail if there is no vectors
* below it.
* Deprecated: Use gimp_image_lower_item() instead.
*
* Returns: TRUE on success.
*
@ -1579,12 +1712,7 @@ gimp_image_lower_vectors (gint32 image_ID,
* @image_ID: The image.
* @vectors_ID: The vectors object to raise to top.
*
* Raise the specified vectors in the image's vectors stack to top of
* stack
*
* This procedure raises the specified vectors to top of the existing
* vectors stack. It will not move the vectors if there is no vectors
* above it.
* Deprecated: Use gimp_image_raise_item_to_top() instead.
*
* Returns: TRUE on success.
*
@ -1616,12 +1744,7 @@ gimp_image_raise_vectors_to_top (gint32 image_ID,
* @image_ID: The image.
* @vectors_ID: The vectors object to lower to bottom.
*
* Lower the specified vectors in the image's vectors stack to bottom
* of stack
*
* This procedure lowers the specified vectors to bottom of the
* existing vectors stack. It will not move the vectors if there is no
* vectors below it.
* Deprecated: Use gimp_image_lower_item_to_bottom() instead.
*
* Returns: TRUE on success.
*

View File

@ -89,6 +89,27 @@ gboolean gimp_image_add_layer (gint32
gint position);
gboolean gimp_image_remove_layer (gint32 image_ID,
gint32 layer_ID);
gboolean gimp_image_add_channel (gint32 image_ID,
gint32 channel_ID,
gint position);
gboolean gimp_image_remove_channel (gint32 image_ID,
gint32 channel_ID);
gboolean gimp_image_add_vectors (gint32 image_ID,
gint32 vectors_ID,
gint position);
gboolean gimp_image_remove_vectors (gint32 image_ID,
gint32 vectors_ID);
gint gimp_image_get_item_position (gint32 image_ID,
gint32 item_ID);
gboolean gimp_image_raise_item (gint32 image_ID,
gint32 item_ID);
gboolean gimp_image_lower_item (gint32 image_ID,
gint32 item_ID);
gboolean gimp_image_raise_item_to_top (gint32 image_ID,
gint32 item_ID);
gboolean gimp_image_lower_item_to_bottom (gint32 image_ID,
gint32 item_ID);
#ifndef GIMP_DISABLE_DEPRECATED
gint gimp_image_get_layer_position (gint32 image_ID,
gint32 layer_ID);
gboolean gimp_image_raise_layer (gint32 image_ID,
@ -99,22 +120,12 @@ gboolean gimp_image_raise_layer_to_top (gint32
gint32 layer_ID);
gboolean gimp_image_lower_layer_to_bottom (gint32 image_ID,
gint32 layer_ID);
gboolean gimp_image_add_channel (gint32 image_ID,
gint32 channel_ID,
gint position);
gboolean gimp_image_remove_channel (gint32 image_ID,
gint32 channel_ID);
gint gimp_image_get_channel_position (gint32 image_ID,
gint32 channel_ID);
gboolean gimp_image_raise_channel (gint32 image_ID,
gint32 channel_ID);
gboolean gimp_image_lower_channel (gint32 image_ID,
gint32 channel_ID);
gboolean gimp_image_add_vectors (gint32 image_ID,
gint32 vectors_ID,
gint position);
gboolean gimp_image_remove_vectors (gint32 image_ID,
gint32 vectors_ID);
gint gimp_image_get_vectors_position (gint32 image_ID,
gint32 vectors_ID);
gboolean gimp_image_raise_vectors (gint32 image_ID,
@ -125,6 +136,7 @@ gboolean gimp_image_raise_vectors_to_top (gint32
gint32 vectors_ID);
gboolean gimp_image_lower_vectors_to_bottom (gint32 image_ID,
gint32 vectors_ID);
#endif /* GIMP_DISABLE_DEPRECATED */
gint32 gimp_image_flatten (gint32 image_ID);
gint32 gimp_image_merge_visible_layers (gint32 image_ID,
GimpMergeType merge_type);

View File

@ -722,15 +722,164 @@ CODE
);
}
sub image_get_layer_position {
$blurb = 'Returns the position of the layer in the layer stack.';
sub image_get_item_position {
$blurb = 'Returns the position of the item in its level of its item tree.';
$help = <<'HELP';
This procedure determines the position of the specified layer in the
images layer stack. If the layer doesn't exist in the image, an error
is returned.
This procedure determines the position of the specified item in its
level in its item tree in the image. If the item doesn't exist in the
image, or the item is not part of an item tree, an error is returned.
HELP
&mitch_pdb_misc('2010', '2.8');
@inargs = (
{ name => 'image', type => 'image',
desc => 'The image' },
{ name => 'item', type => 'item',
desc => 'The item' }
);
@outargs = (
{ name => 'position', type => 'int32',
desc => "The position of the item in its level in the item tree" }
);
%invoke = (
code => <<'CODE'
{
if (gimp_pdb_item_is_in_tree (item, image, FALSE, error))
position = gimp_item_get_index (item);
else
success = FALSE;
}
CODE
);
}
sub image_raise_item {
$blurb = "Raise the specified item in its level in its item tree";
$help = <<'HELP';
This procedure raises the specified item one step in the item tree.
The procecure call will fail if there is no item above it.
HELP
&mitch_pdb_misc('2010', '2.8');
@inargs = (
{ name => 'image', type => 'image',
desc => 'The image' },
{ name => 'item', type => 'item',
desc => 'The item to raise' }
);
%invoke = (
code => <<'CODE'
{
if (gimp_pdb_item_is_in_tree (item, image, FALSE, error))
success = gimp_image_raise_item (image, item, error);
else
success = FALSE;
}
CODE
);
}
sub image_lower_item {
$blurb = "Lower the specified item in its level in its item tree";
$help = <<'HELP';
This procedure lowers the specified item one step in the item tree.
The procecure call will fail if there is no item below it.
HELP
&mitch_pdb_misc('2010', '2.8');
@inargs = (
{ name => 'image', type => 'image',
desc => 'The image' },
{ name => 'item', type => 'item',
desc => 'The item to lower' }
);
%invoke = (
code => <<'CODE'
{
if (gimp_pdb_item_is_in_tree (item, image, FALSE, error))
success = gimp_image_lower_item (image, item, error);
else
success = FALSE;
}
CODE
);
}
sub image_raise_item_to_top {
$blurb = <<'BLURB';
Raise the specified item to the top of its level in its item tree
BLURB
$help = <<'HELP';
This procedure raises the specified item to top of its level in the
item tree. It will not move the item if there is no item above it.
HELP
&mitch_pdb_misc('2010', '2.8');
@inargs = (
{ name => 'image', type => 'image',
desc => 'The image' },
{ name => 'item', type => 'item',
desc => 'The item to raise to top' }
);
%invoke = (
code => <<'CODE'
{
if (gimp_pdb_item_is_in_tree (item, image, FALSE, error))
success = gimp_image_raise_item_to_top (image, item);
else
success = FALSE;
}
CODE
);
}
sub image_lower_item_to_bottom {
$blurb = <<'BLURB';
Lower the specified item to the bottom of its level in its item tree
BLURB
$help = <<'HELP';
This procedure lowers the specified item to bottom of its level in the
item tree. It will not move the layer if there is no layer below it.
HELP
&mitch_pdb_misc('2010', '2.8');
@inargs = (
{ name => 'image', type => 'image',
desc => 'The image' },
{ name => 'item', type => 'item',
desc => 'The item to lower to bottom' }
);
%invoke = (
code => <<'CODE'
{
if (gimp_pdb_item_is_in_tree (item, image, FALSE, error))
success = gimp_image_lower_item_to_bottom (image, item);
else
success = FALSE;
}
CODE
);
}
sub image_get_layer_position {
&std_pdb_deprecated('gimp-image-get-item-position');
&simon_pdb_misc('2006', '2.4');
@inargs = (
@ -761,14 +910,7 @@ CODE
}
sub image_raise_layer {
$blurb = "Raise the specified layer in the image's layer stack";
$help = <<'HELP';
This procedure raises the specified layer one step in the existing layer stack.
The procecure call will fail if there is no layer above it.
HELP
&std_pdb_misc;
&std_pdb_deprecated('gimp-image-raise-item');
@inargs = (
{ name => 'image', type => 'image',
@ -790,14 +932,7 @@ CODE
}
sub image_lower_layer {
$blurb = "Lower the specified layer in the image's layer stack";
$help = <<'HELP';
This procedure lowers the specified layer one step in the existing layer stack.
The procecure call will fail if there is no layer below it.
HELP
&std_pdb_misc;
&std_pdb_deprecated('gimp-image-lower-item');
@inargs = (
{ name => 'image', type => 'image',
@ -819,17 +954,7 @@ CODE
}
sub image_raise_layer_to_top {
$blurb = <<'BLURB';
Raise the specified layer in the image's layer stack to top of stack
BLURB
$help = <<'HELP';
This procedure raises the specified layer to top of the existing layer stack.
It will not move the layer if there is no layer above it.
HELP
&wolfgang_pdb_misc('1998');
$author .= ", Sven Neumann";
&std_pdb_deprecated('gimp-image-raise-item-to-top');
@inargs = (
{ name => 'image', type => 'image',
@ -851,17 +976,7 @@ CODE
}
sub image_lower_layer_to_bottom {
$blurb = <<'BLURB';
Lower the specified layer in the image's layer stack to bottom of stack
BLURB
$help = <<'HELP';
This procedure lowers the specified layer to bottom of the existing layer stack.
It will not move the layer if there is no layer below it.
HELP
&wolfgang_pdb_misc('1998');
$author .= ", Sven Neumann";
&std_pdb_deprecated('gimp-image-lower-item-to-bottom');
@inargs = (
{ name => 'image', type => 'image',
@ -1128,14 +1243,7 @@ CODE
}
sub image_get_channel_position {
$blurb = 'Returns the position of the channel in the channel stack.';
$help = <<'HELP';
This procedure determines the position of the specified channel in
the images channel stack. If the channel doesn't exist in the image,
an error is returned.
HELP
&std_pdb_deprecated('gimp-image-get-item-position');
&simon_pdb_misc('2006', '2.4');
@inargs = (
@ -1166,15 +1274,7 @@ CODE
}
sub image_raise_channel {
$blurb = "Raise the specified channel in the image's channel stack";
$help = <<'HELP';
This procedure raises the specified channel one step in the existing
channel stack. The procecure call will fail if there is no channel
above it.
HELP
&std_pdb_misc;
&std_pdb_deprecated('gimp-image-raise-item');
@inargs = (
{ name => 'image', type => 'image',
@ -1196,15 +1296,7 @@ CODE
}
sub image_lower_channel {
$blurb = "Lower the specified channel in the image's channel stack";
$help = <<'HELP';
This procedure lowers the specified channel one step in the existing
channel stack. The procecure call will fail if there is no channel
below it.
HELP
&std_pdb_misc;
&std_pdb_deprecated('gimp-image-lower-item');
@inargs = (
{ name => 'image', type => 'image',
@ -1358,14 +1450,7 @@ CODE
}
sub image_get_vectors_position {
$blurb = 'Returns the position of the vectors object in the vectors objects stack.';
$help = <<'HELP';
This procedure determines the position of the specified vectors object in the
images vectors object stack. If the vectors object doesn't exist in the image,
an error is returned.
HELP
&std_pdb_deprecated('gimp-image-get-item-position');
&simon_pdb_misc('2006', '2.4');
@inargs = (
@ -1396,14 +1481,7 @@ CODE
}
sub image_raise_vectors {
$blurb = "Raise the specified vectors in the image's vectors stack";
$help = <<'HELP';
This procedure raises the specified vectors one step in the existing
vectors stack. The procecure call will fail if there is no vectors
above it.
HELP
&std_pdb_deprecated('gimp-image-raise-item');
&simon_pdb_misc('2005', '2.4');
@inargs = (
@ -1426,14 +1504,7 @@ CODE
}
sub image_lower_vectors {
$blurb = "Lower the specified vectors in the image's vectors stack";
$help = <<'HELP';
This procedure lowers the specified vectors one step in the existing
vectors stack. The procecure call will fail if there is no vectors
below it.
HELP
&std_pdb_deprecated('gimp-image-lower-item');
&simon_pdb_misc('2005', '2.4');
@inargs = (
@ -1456,16 +1527,7 @@ CODE
}
sub image_raise_vectors_to_top {
$blurb = <<'BLURB';
Raise the specified vectors in the image's vectors stack to top of stack
BLURB
$help = <<'HELP';
This procedure raises the specified vectors to top of the existing
vectors stack. It will not move the vectors if there is no vectors
above it.
HELP
&std_pdb_deprecated('gimp-image-raise-item-to-top');
&simon_pdb_misc('2005', '2.4');
@inargs = (
@ -1488,16 +1550,7 @@ CODE
}
sub image_lower_vectors_to_bottom {
$blurb = <<'BLURB';
Lower the specified vectors in the image's vectors stack to bottom of stack
BLURB
$help = <<'HELP';
This procedure lowers the specified vectors to bottom of the existing
vectors stack. It will not move the vectors if there is no vectors
below it.
HELP
&std_pdb_deprecated('gimp-image-lower-item-to-bottom');
&simon_pdb_misc('2005', '2.4');
@inargs = (
@ -2725,13 +2778,16 @@ CODE
image_pick_color
image_pick_correlate_layer
image_add_layer image_remove_layer
image_add_channel image_remove_channel
image_add_vectors image_remove_vectors
image_get_item_position
image_raise_item image_lower_item
image_raise_item_to_top image_lower_item_to_bottom
image_get_layer_position
image_raise_layer image_lower_layer
image_raise_layer_to_top image_lower_layer_to_bottom
image_add_channel image_remove_channel
image_get_channel_position
image_raise_channel image_lower_channel
image_add_vectors image_remove_vectors
image_get_vectors_position
image_raise_vectors image_lower_vectors
image_raise_vectors_to_top image_lower_vectors_to_bottom
@ -2756,7 +2812,7 @@ CODE
image_get_channel_by_tattoo
image_get_vectors_by_tattoo);
%exports = (app => [@procs], lib => [@procs[0..46,49..77]]);
%exports = (app => [@procs], lib => [@procs[0..51,54..82]]);
$desc = 'Image';
$doc_title = 'gimpimage';