Another change for the GAP plug-in.

--Sven
This commit is contained in:
Sven Neumann 1998-11-16 18:07:34 +00:00
parent 286b4477c0
commit 44b1e35036
4 changed files with 81 additions and 1 deletions

View File

@ -1,3 +1,9 @@
Mon Nov 16 19:04:54 MET 1998 Sven Neumann <sven@gimp.org>
* app/gimage_cmds.[ch]
* app/internal_procs.c: new function to get the drawable a
floating selection is attached to (for the gap plug-in)
Sun Nov 15 19:36:02 MET 1998 Sven Neumann <sven@gimp.org>
* app/floating_sel_cmds.[ch]

View File

@ -3622,6 +3622,78 @@ ProcRecord gimage_floating_sel_proc =
{ { gimage_floating_sel_invoker } },
};
/*************************************/
/* GIMAGE_FLOATING_SEL_ATTACHED_TO */
static Argument *
gimage_floating_sel_attached_to_invoker (Argument *args)
{
GImage *gimage;
Layer *floating_sel;
Argument *return_args;
floating_sel = NULL;
success = TRUE;
if (success)
{
int_value = args[0].value.pdb_int;
if ((gimage = gimage_get_ID (int_value)))
floating_sel = gimage_floating_sel (gimage);
else
success = FALSE;
}
return_args = procedural_db_return_args (&gimage_floating_sel_attached_to_proc, success);
if (success)
return_args[1].value.pdb_int = (floating_sel)
? drawable_ID (GIMP_DRAWABLE( GIMP_LAYER(floating_sel)->fs.drawable ))
: -1;
return return_args;
}
/* The procedure definition */
ProcArg gimage_floating_sel_attached_to_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
}
};
ProcArg gimage_floating_sel_attached_to_out_args[] =
{
{ PDB_DRAWABLE,
"drawable",
"the drawable the floating selection is attached to"
}
};
ProcRecord gimage_floating_sel_attached_to_proc =
{
"gimp_image_floating_sel_attached_to",
"Return the drawable the floating selection is attached to",
"This procedure returns the drawable the image's floating selection is attached to, if it exists. If it doesn't exist, -1 is returned as the drawable ID.",
"Wolfgang Hofer",
"Wolfgang Hofer",
"1998",
PDB_INTERNAL,
/* Input arguments */
1,
gimage_floating_sel_attached_to_args,
/* Output arguments */
1,
gimage_floating_sel_attached_to_out_args,
/* Exec method */
{ { gimage_floating_sel_attached_to_invoker } },
};
static GImage *
duplicate (GImage *gimage)
{

View File

@ -70,6 +70,7 @@ extern ProcRecord gimage_enable_undo_proc;
extern ProcRecord gimage_disable_undo_proc;
extern ProcRecord gimage_clean_all_proc;
extern ProcRecord gimage_floating_sel_proc;
extern ProcRecord gimage_floating_sel_attached_to_proc;
extern ProcRecord channel_ops_duplicate_proc;
extern ProcRecord gimp_image_add_hguide_proc;

View File

@ -80,7 +80,7 @@ internal_procs_init ()
{
gfloat pcount = 0;
/* grep -c procedural_db_register internal_procs.c */
gfloat total_pcount = 256;
gfloat total_pcount = 257;
app_init_update_status("Internal Procedures", "Tool procedures",
pcount/total_pcount);
@ -186,6 +186,7 @@ internal_procs_init ()
procedural_db_register (&gimage_disable_undo_proc); pcount++;
procedural_db_register (&gimage_clean_all_proc); pcount++;
procedural_db_register (&gimage_floating_sel_proc); pcount++;
procedural_db_register (&gimage_floating_sel_attached_to_proc); pcount++;
procedural_db_register (&gimp_image_add_hguide_proc); pcount++;
procedural_db_register (&gimp_image_add_vguide_proc); pcount++;
procedural_db_register (&gimp_image_delete_guide_proc); pcount++;