mirror of https://github.com/GNOME/gimp.git
Sven Neumann <sven@gimp.org>
2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Coming closer to our goal of autogenerating the libgimp PDB wrappers... * app/internal_procs.c * app/parasite_cmds.c * tools/pdbgen/pdb/parasite.pdb: removed parasite_new PDB call. * libgimp/gimp.h * libgimp/gimp_pdb.h * libgimp/gimpbrushmenu.c * libgimp/gimpcompat.h * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimpexport.c * libgimp/gimpgradientmenu.c * libgimp/gimpimage_pdb.[ch] * libgimp/gimpmenu.[ch] * libgimp/gimpparasite.[ch] * libgimp/gimpparasite_pdb.[ch] * libgimp/gimppatternmenu.c * libgimp/gimpproceduraldb_pdb.[ch]: changes to incorporate the new files listed below * libgimp/Makefile.am * libgimp/gimpbrushes_pdb.[ch] * libgimp/gimpbrushselect_pdb.[ch] * libgimp/gimpconvert_pdb.[ch] * libgimp/gimpgradientselect_pdb.[ch] * libgimp/gimppatterns_pdb.[ch] * libgimp/gimppatternselect_pdb.[ch]: new files partly generated using pdbgen * tools/pdbgen/lib.pl: some adjustments and fixes to the libgimp pdbgen code * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/pattern_select.pdb: make them generate PDB wrappers for libgimp too.
This commit is contained in:
parent
ba9ec2a2ff
commit
21651c253a
41
ChangeLog
41
ChangeLog
|
@ -1,3 +1,44 @@
|
||||||
|
2000-05-31 Michael Natterer <mitch@gimp.org>
|
||||||
|
Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
Coming closer to our goal of autogenerating the
|
||||||
|
libgimp PDB wrappers...
|
||||||
|
|
||||||
|
* app/internal_procs.c
|
||||||
|
* app/parasite_cmds.c
|
||||||
|
* tools/pdbgen/pdb/parasite.pdb: removed parasite_new PDB call.
|
||||||
|
|
||||||
|
* libgimp/gimp.h
|
||||||
|
* libgimp/gimp_pdb.h
|
||||||
|
* libgimp/gimpbrushmenu.c
|
||||||
|
* libgimp/gimpcompat.h
|
||||||
|
* libgimp/gimpdrawable_pdb.[ch]
|
||||||
|
* libgimp/gimpexport.c
|
||||||
|
* libgimp/gimpgradientmenu.c
|
||||||
|
* libgimp/gimpimage_pdb.[ch]
|
||||||
|
* libgimp/gimpmenu.[ch]
|
||||||
|
* libgimp/gimpparasite.[ch]
|
||||||
|
* libgimp/gimpparasite_pdb.[ch]
|
||||||
|
* libgimp/gimppatternmenu.c
|
||||||
|
* libgimp/gimpproceduraldb_pdb.[ch]: changes to incorporate the new
|
||||||
|
files listed below
|
||||||
|
|
||||||
|
* libgimp/Makefile.am
|
||||||
|
* libgimp/gimpbrushes_pdb.[ch]
|
||||||
|
* libgimp/gimpbrushselect_pdb.[ch]
|
||||||
|
* libgimp/gimpconvert_pdb.[ch]
|
||||||
|
* libgimp/gimpgradientselect_pdb.[ch]
|
||||||
|
* libgimp/gimppatterns_pdb.[ch]
|
||||||
|
* libgimp/gimppatternselect_pdb.[ch]: new files partly generated
|
||||||
|
using pdbgen
|
||||||
|
|
||||||
|
* tools/pdbgen/lib.pl: some adjustments and fixes to the libgimp
|
||||||
|
pdbgen code
|
||||||
|
|
||||||
|
* tools/pdbgen/pdb/help.pdb
|
||||||
|
* tools/pdbgen/pdb/pattern_select.pdb: make them generate PDB
|
||||||
|
wrappers for libgimp too.
|
||||||
|
|
||||||
2000-05-31 Michael Natterer <mitch@gimp.org>
|
2000-05-31 Michael Natterer <mitch@gimp.org>
|
||||||
Sven Neumann <sven@gimp.org>
|
Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ void register_tools_procs (void);
|
||||||
void register_undo_procs (void);
|
void register_undo_procs (void);
|
||||||
void register_unit_procs (void);
|
void register_unit_procs (void);
|
||||||
|
|
||||||
/* 323 procedures registered total */
|
/* 322 procedures registered total */
|
||||||
|
|
||||||
void
|
void
|
||||||
internal_procs_init (void)
|
internal_procs_init (void)
|
||||||
|
@ -80,79 +80,79 @@ internal_procs_init (void)
|
||||||
app_init_update_status (NULL, _("Color"), 0.096);
|
app_init_update_status (NULL, _("Color"), 0.096);
|
||||||
register_color_procs ();
|
register_color_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Convert"), 0.133);
|
app_init_update_status (NULL, _("Convert"), 0.134);
|
||||||
register_convert_procs ();
|
register_convert_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Drawable procedures"), 0.142);
|
app_init_update_status (NULL, _("Drawable procedures"), 0.143);
|
||||||
register_drawable_procs ();
|
register_drawable_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Edit procedures"), 0.211);
|
app_init_update_status (NULL, _("Edit procedures"), 0.211);
|
||||||
register_edit_procs ();
|
register_edit_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("File Operations"), 0.229);
|
app_init_update_status (NULL, _("File Operations"), 0.23);
|
||||||
register_fileops_procs ();
|
register_fileops_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Floating selections"), 0.254);
|
app_init_update_status (NULL, _("Floating selections"), 0.255);
|
||||||
register_floating_sel_procs ();
|
register_floating_sel_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("GDisplay procedures"), 0.272);
|
app_init_update_status (NULL, _("GDisplay procedures"), 0.273);
|
||||||
register_gdisplay_procs ();
|
register_gdisplay_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Image"), 0.282);
|
app_init_update_status (NULL, _("Image"), 0.283);
|
||||||
register_gimage_procs ();
|
register_gimage_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Image mask"), 0.464);
|
app_init_update_status (NULL, _("Image mask"), 0.466);
|
||||||
register_gimage_mask_procs ();
|
register_gimage_mask_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Gimprc procedures"), 0.517);
|
app_init_update_status (NULL, _("Gimprc procedures"), 0.519);
|
||||||
register_gimprc_procs ();
|
register_gimprc_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Gradients"), 0.526);
|
app_init_update_status (NULL, _("Gradients"), 0.528);
|
||||||
register_gradient_procs ();
|
register_gradient_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Gradient UI"), 0.542);
|
app_init_update_status (NULL, _("Gradient UI"), 0.543);
|
||||||
register_gradient_select_procs ();
|
register_gradient_select_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Guide procedures"), 0.554);
|
app_init_update_status (NULL, _("Guide procedures"), 0.556);
|
||||||
register_guides_procs ();
|
register_guides_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Help procedures"), 0.573);
|
app_init_update_status (NULL, _("Help procedures"), 0.575);
|
||||||
register_help_procs ();
|
register_help_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Layer"), 0.576);
|
app_init_update_status (NULL, _("Layer"), 0.578);
|
||||||
register_layer_procs ();
|
register_layer_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Interface"), 0.672);
|
app_init_update_status (NULL, _("Interface"), 0.674);
|
||||||
register_message_procs ();
|
register_message_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Miscellaneous"), 0.681);
|
app_init_update_status (NULL, _("Miscellaneous"), 0.683);
|
||||||
register_misc_procs ();
|
register_misc_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Palette"), 0.687);
|
app_init_update_status (NULL, _("Palette"), 0.689);
|
||||||
register_palette_procs ();
|
register_palette_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Parasite procedures"), 0.709);
|
app_init_update_status (NULL, _("Parasite procedures"), 0.711);
|
||||||
register_parasite_procs ();
|
register_parasite_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Paths"), 0.749);
|
app_init_update_status (NULL, _("Paths"), 0.748);
|
||||||
register_paths_procs ();
|
register_paths_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Pattern UI"), 0.789);
|
app_init_update_status (NULL, _("Pattern UI"), 0.789);
|
||||||
register_pattern_select_procs ();
|
register_pattern_select_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Patterns"), 0.799);
|
app_init_update_status (NULL, _("Patterns"), 0.798);
|
||||||
register_patterns_procs ();
|
register_patterns_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Plug-in"), 0.811);
|
app_init_update_status (NULL, _("Plug-in"), 0.811);
|
||||||
register_plug_in_procs ();
|
register_plug_in_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Procedural database"), 0.83);
|
app_init_update_status (NULL, _("Procedural database"), 0.829);
|
||||||
register_procedural_db_procs ();
|
register_procedural_db_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Text procedures"), 0.854);
|
app_init_update_status (NULL, _("Text procedures"), 0.854);
|
||||||
register_text_tool_procs ();
|
register_text_tool_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Tool procedures"), 0.867);
|
app_init_update_status (NULL, _("Tool procedures"), 0.866);
|
||||||
register_tools_procs ();
|
register_tools_procs ();
|
||||||
|
|
||||||
app_init_update_status (NULL, _("Undo"), 0.96);
|
app_init_update_status (NULL, _("Undo"), 0.96);
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
#include "libgimp/gimpparasite.h"
|
#include "libgimp/gimpparasite.h"
|
||||||
|
|
||||||
static ProcRecord parasite_new_proc;
|
|
||||||
static ProcRecord parasite_find_proc;
|
static ProcRecord parasite_find_proc;
|
||||||
static ProcRecord parasite_attach_proc;
|
static ProcRecord parasite_attach_proc;
|
||||||
static ProcRecord parasite_detach_proc;
|
static ProcRecord parasite_detach_proc;
|
||||||
|
@ -44,7 +43,6 @@ static ProcRecord image_parasite_list_proc;
|
||||||
void
|
void
|
||||||
register_parasite_procs (void)
|
register_parasite_procs (void)
|
||||||
{
|
{
|
||||||
procedural_db_register (¶site_new_proc);
|
|
||||||
procedural_db_register (¶site_find_proc);
|
procedural_db_register (¶site_find_proc);
|
||||||
procedural_db_register (¶site_attach_proc);
|
procedural_db_register (¶site_attach_proc);
|
||||||
procedural_db_register (¶site_detach_proc);
|
procedural_db_register (¶site_detach_proc);
|
||||||
|
@ -59,94 +57,6 @@ register_parasite_procs (void)
|
||||||
procedural_db_register (&image_parasite_list_proc);
|
procedural_db_register (&image_parasite_list_proc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Argument *
|
|
||||||
parasite_new_invoker (Argument *args)
|
|
||||||
{
|
|
||||||
gboolean success = TRUE;
|
|
||||||
Argument *return_args;
|
|
||||||
gchar *name;
|
|
||||||
gint32 flags;
|
|
||||||
gint32 size;
|
|
||||||
gchar *data;
|
|
||||||
GimpParasite *parasite = NULL;
|
|
||||||
|
|
||||||
name = (gchar *) args[0].value.pdb_pointer;
|
|
||||||
if (name == NULL)
|
|
||||||
success = FALSE;
|
|
||||||
|
|
||||||
flags = args[1].value.pdb_int;
|
|
||||||
|
|
||||||
size = args[2].value.pdb_int;
|
|
||||||
if (size < 0)
|
|
||||||
success = FALSE;
|
|
||||||
|
|
||||||
data = (gchar *) args[3].value.pdb_pointer;
|
|
||||||
|
|
||||||
if (success)
|
|
||||||
{
|
|
||||||
if (size > 0 && data == NULL)
|
|
||||||
success = FALSE;
|
|
||||||
else
|
|
||||||
success = (parasite = gimp_parasite_new (name, flags, size, data)) != NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return_args = procedural_db_return_args (¶site_new_proc, success);
|
|
||||||
|
|
||||||
if (success)
|
|
||||||
return_args[1].value.pdb_pointer = parasite;
|
|
||||||
|
|
||||||
return return_args;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ProcArg parasite_new_inargs[] =
|
|
||||||
{
|
|
||||||
{
|
|
||||||
PDB_STRING,
|
|
||||||
"name",
|
|
||||||
"The name of the parasite to create"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
PDB_INT32,
|
|
||||||
"flags",
|
|
||||||
"The flags (1 == persistance)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
PDB_INT32,
|
|
||||||
"size",
|
|
||||||
"The size of the data in bytes"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
PDB_STRING,
|
|
||||||
"data",
|
|
||||||
"The data"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static ProcArg parasite_new_outargs[] =
|
|
||||||
{
|
|
||||||
{
|
|
||||||
PDB_PARASITE,
|
|
||||||
"parasite",
|
|
||||||
"The new parasite"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static ProcRecord parasite_new_proc =
|
|
||||||
{
|
|
||||||
"gimp_parasite_new",
|
|
||||||
"Creates a new parasite.",
|
|
||||||
"Creates a new parasite unatached to to any image or drawable.",
|
|
||||||
"Jay Cox",
|
|
||||||
"Jay Cox",
|
|
||||||
"1998",
|
|
||||||
PDB_INTERNAL,
|
|
||||||
4,
|
|
||||||
parasite_new_inargs,
|
|
||||||
1,
|
|
||||||
parasite_new_outargs,
|
|
||||||
{ { parasite_new_invoker } }
|
|
||||||
};
|
|
||||||
|
|
||||||
static Argument *
|
static Argument *
|
||||||
parasite_find_invoker (Argument *args)
|
parasite_find_invoker (Argument *args)
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,10 +81,16 @@ libgimp_la_SOURCES = \
|
||||||
gimp.c \
|
gimp.c \
|
||||||
gimp.h \
|
gimp.h \
|
||||||
gimp_pdb.h \
|
gimp_pdb.h \
|
||||||
gimpchannel_pdb.h \
|
gimpbrushes_pdb.c \
|
||||||
|
gimpbrushes_pdb.h \
|
||||||
|
gimpbrushselect_pdb.c \
|
||||||
|
gimpbrushselect_pdb.h \
|
||||||
gimpchannel_pdb.c \
|
gimpchannel_pdb.c \
|
||||||
|
gimpchannel_pdb.h \
|
||||||
gimpcolorspace.c \
|
gimpcolorspace.c \
|
||||||
gimpcolorspace.h \
|
gimpcolorspace.h \
|
||||||
|
gimpconvert_pdb.c \
|
||||||
|
gimpconvert_pdb.h \
|
||||||
gimpdisplay_pdb.c \
|
gimpdisplay_pdb.c \
|
||||||
gimpdisplay_pdb.h \
|
gimpdisplay_pdb.h \
|
||||||
gimpdrawable.c \
|
gimpdrawable.c \
|
||||||
|
@ -96,7 +102,11 @@ libgimp_la_SOURCES = \
|
||||||
gimpfileops_pdb.c \
|
gimpfileops_pdb.c \
|
||||||
gimpfileops_pdb.h \
|
gimpfileops_pdb.h \
|
||||||
gimpgradient_pdb.c \
|
gimpgradient_pdb.c \
|
||||||
|
gimpgradient_pdb.h \
|
||||||
|
gimpgradientselect_pdb.c \
|
||||||
|
gimpgradientselect_pdb.h \
|
||||||
gimpguides_pdb.c \
|
gimpguides_pdb.c \
|
||||||
|
gimpguides_pdb.h \
|
||||||
gimphelp.c \
|
gimphelp.c \
|
||||||
gimphelp_pdb.c \
|
gimphelp_pdb.c \
|
||||||
gimphelp_pdb.h \
|
gimphelp_pdb.h \
|
||||||
|
@ -115,6 +125,10 @@ libgimp_la_SOURCES = \
|
||||||
gimpparasiteio.h \
|
gimpparasiteio.h \
|
||||||
gimpparasite_pdb.c \
|
gimpparasite_pdb.c \
|
||||||
gimpparasite_pdb.h \
|
gimpparasite_pdb.h \
|
||||||
|
gimppatterns_pdb.c \
|
||||||
|
gimppatterns_pdb.h \
|
||||||
|
gimppatternselect_pdb.c \
|
||||||
|
gimppatternselect_pdb.h \
|
||||||
gimppixelrgn.c \
|
gimppixelrgn.c \
|
||||||
gimppixelrgn.h \
|
gimppixelrgn.h \
|
||||||
gimpplugin_pdb.c \
|
gimpplugin_pdb.c \
|
||||||
|
@ -165,11 +179,16 @@ libgimpui_la_SOURCES = \
|
||||||
gimpinclude_HEADERS = \
|
gimpinclude_HEADERS = \
|
||||||
gimp.h \
|
gimp.h \
|
||||||
gimp_pdb.h \
|
gimp_pdb.h \
|
||||||
|
gimpbrushes_pdb.h \
|
||||||
|
gimpbrushselect_pdb.h \
|
||||||
gimpchannel_pdb.h \
|
gimpchannel_pdb.h \
|
||||||
|
gimpconvert_pdb.h \
|
||||||
gimpdisplay_pdb.h \
|
gimpdisplay_pdb.h \
|
||||||
gimpdrawable_pdb.h \
|
gimpdrawable_pdb.h \
|
||||||
gimpfileops_pdb.h \
|
gimpfileops_pdb.h \
|
||||||
gimpgradient_pdb.h \
|
gimpgradient_pdb.h \
|
||||||
|
gimpgradientselect_pdb.h \
|
||||||
|
gimpguides_pdb.h \
|
||||||
gimphelp_pdb.h \
|
gimphelp_pdb.h \
|
||||||
gimpimage_pdb.h \
|
gimpimage_pdb.h \
|
||||||
gimplayer_pdb.h \
|
gimplayer_pdb.h \
|
||||||
|
@ -201,6 +220,8 @@ gimpinclude_HEADERS = \
|
||||||
gimpparasite.h \
|
gimpparasite.h \
|
||||||
gimpparasiteio.h \
|
gimpparasiteio.h \
|
||||||
gimppatheditor.h \
|
gimppatheditor.h \
|
||||||
|
gimppatterns_pdb.h \
|
||||||
|
gimppatternselect_pdb.h \
|
||||||
gimppixelrgn.h \
|
gimppixelrgn.h \
|
||||||
gimppixmap.h \
|
gimppixmap.h \
|
||||||
gimpquerybox.h \
|
gimpquerybox.h \
|
||||||
|
|
|
@ -59,11 +59,18 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
|
||||||
/* more convenient names for some pdb functions */
|
/* more convenient names for some pdb functions */
|
||||||
#define gimp_get_data gimp_procedural_db_get_data
|
|
||||||
#define gimp_get_data_size gimp_procedural_db_get_data_size
|
#define gimp_get_data gimp_procedural_db_get_data
|
||||||
#define gimp_set_data gimp_procedural_db_set_data
|
#define gimp_get_data_size gimp_procedural_db_get_data_size
|
||||||
#define gimp_query_procedure gimp_procedural_db_proc_info
|
#define gimp_set_data gimp_procedural_db_set_data
|
||||||
|
#define gimp_query_procedure gimp_procedural_db_proc_info
|
||||||
|
|
||||||
|
#define gimp_image_convert_rgb gimp_convert_rgb
|
||||||
|
#define gimp_image_convert_grayscale gimp_convert_grayscale
|
||||||
|
#define gimp_image_convert_indexed gimp_convert_indexed
|
||||||
|
|
||||||
|
|
||||||
GIMPVAR guint gimp_major_version;
|
GIMPVAR guint gimp_major_version;
|
||||||
GIMPVAR guint gimp_minor_version;
|
GIMPVAR guint gimp_minor_version;
|
||||||
|
@ -140,12 +147,14 @@ union _GimpParamData
|
||||||
gint32 d_display;
|
gint32 d_display;
|
||||||
gint32 d_image;
|
gint32 d_image;
|
||||||
gint32 d_layer;
|
gint32 d_layer;
|
||||||
|
gint32 d_layer_mask;
|
||||||
gint32 d_channel;
|
gint32 d_channel;
|
||||||
gint32 d_drawable;
|
gint32 d_drawable;
|
||||||
gint32 d_selection;
|
gint32 d_selection;
|
||||||
gint32 d_boundary;
|
gint32 d_boundary;
|
||||||
gint32 d_path;
|
gint32 d_path;
|
||||||
GimpParasite d_parasite;
|
GimpParasite d_parasite;
|
||||||
|
gint32 d_tattoo;
|
||||||
gint32 d_status;
|
gint32 d_status;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -22,11 +22,15 @@
|
||||||
#ifndef __GIMP_PDB_H__
|
#ifndef __GIMP_PDB_H__
|
||||||
#define __GIMP_PDB_H__
|
#define __GIMP_PDB_H__
|
||||||
|
|
||||||
|
#include <libgimp/gimpbrushes_pdb.h>
|
||||||
|
#include <libgimp/gimpbrushselect_pdb.h>
|
||||||
#include <libgimp/gimpchannel_pdb.h>
|
#include <libgimp/gimpchannel_pdb.h>
|
||||||
|
#include <libgimp/gimpconvert_pdb.h>
|
||||||
#include <libgimp/gimpdisplay_pdb.h>
|
#include <libgimp/gimpdisplay_pdb.h>
|
||||||
#include <libgimp/gimpdrawable_pdb.h>
|
#include <libgimp/gimpdrawable_pdb.h>
|
||||||
#include <libgimp/gimpfileops_pdb.h>
|
#include <libgimp/gimpfileops_pdb.h>
|
||||||
#include <libgimp/gimpgradient_pdb.h>
|
#include <libgimp/gimpgradient_pdb.h>
|
||||||
|
#include <libgimp/gimpgradientselect_pdb.h>
|
||||||
#include <libgimp/gimpguides_pdb.h>
|
#include <libgimp/gimpguides_pdb.h>
|
||||||
#include <libgimp/gimphelp_pdb.h>
|
#include <libgimp/gimphelp_pdb.h>
|
||||||
#include <libgimp/gimpimage_pdb.h>
|
#include <libgimp/gimpimage_pdb.h>
|
||||||
|
@ -34,6 +38,8 @@
|
||||||
#include <libgimp/gimpmessage_pdb.h>
|
#include <libgimp/gimpmessage_pdb.h>
|
||||||
#include <libgimp/gimppalette_pdb.h>
|
#include <libgimp/gimppalette_pdb.h>
|
||||||
#include <libgimp/gimpparasite_pdb.h>
|
#include <libgimp/gimpparasite_pdb.h>
|
||||||
|
#include <libgimp/gimppatterns_pdb.h>
|
||||||
|
#include <libgimp/gimppatternselect_pdb.h>
|
||||||
#include <libgimp/gimpproceduraldb_pdb.h>
|
#include <libgimp/gimpproceduraldb_pdb.h>
|
||||||
#include <libgimp/gimpplugin_pdb.h>
|
#include <libgimp/gimpplugin_pdb.h>
|
||||||
#include <libgimp/gimpselection_pdb.h>
|
#include <libgimp/gimpselection_pdb.h>
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
/* LIBGIMP - The GIMP Library
|
||||||
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
||||||
|
*
|
||||||
|
* gimpbrushes_pdb.c
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "gimp.h"
|
||||||
|
|
||||||
|
gchar *
|
||||||
|
gimp_brushes_get_brush_data (gchar *brush_name,
|
||||||
|
gdouble *opacity,
|
||||||
|
gint *spacing,
|
||||||
|
GimpLayerModeEffects *paint_mode,
|
||||||
|
gint *width,
|
||||||
|
gint *height,
|
||||||
|
guint8 **mask_data)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
gint num_mask_data;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_brushes_get_brush_data",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_STRING, brush_name,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
brush_name = NULL;
|
||||||
|
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
||||||
|
{
|
||||||
|
brush_name = g_strdup (return_vals[1].data.d_string);
|
||||||
|
*opacity = return_vals[2].data.d_float;
|
||||||
|
*spacing = return_vals[3].data.d_int32;
|
||||||
|
*paint_mode = return_vals[4].data.d_int32;
|
||||||
|
*width = return_vals[5].data.d_int32;
|
||||||
|
*height = return_vals[6].data.d_int32;
|
||||||
|
num_mask_data = return_vals[7].data.d_int32;
|
||||||
|
*mask_data = g_new (guint8, num_mask_data);
|
||||||
|
memcpy (*mask_data, return_vals[8].data.d_int8array,
|
||||||
|
num_mask_data * sizeof (guint8));
|
||||||
|
}
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
|
||||||
|
return brush_name;
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
/* LIBGIMP - The GIMP Library
|
||||||
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
||||||
|
*
|
||||||
|
* gimpbrushes_pdb.h
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* NOTE: This file is autogenerated by pdbgen.pl */
|
||||||
|
|
||||||
|
#ifndef __GIMP_BRUSHES_PDB_H__
|
||||||
|
#define __GIMP_BRUSHES_PDB_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/* For information look into the C source or the html documentation */
|
||||||
|
|
||||||
|
|
||||||
|
gchar* gimp_brushes_get_brush_data (gchar *brush_name,
|
||||||
|
gdouble *opacity,
|
||||||
|
gint *spacing,
|
||||||
|
GimpLayerModeEffects *paint_mode,
|
||||||
|
gint *width,
|
||||||
|
gint *height,
|
||||||
|
guint8 **mask_data);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* __GIMP_BRUSHES_PDB_H__ */
|
|
@ -192,10 +192,10 @@ brush_preview_events (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
brush_pre_update(GtkWidget *brush_preview,
|
brush_pre_update (GtkWidget *brush_preview,
|
||||||
gint brush_width,
|
gint brush_width,
|
||||||
gint brush_height,
|
gint brush_height,
|
||||||
gchar *mask_data)
|
gchar *mask_data)
|
||||||
{
|
{
|
||||||
gint y;
|
gint y;
|
||||||
gint i;
|
gint i;
|
||||||
|
@ -324,9 +324,9 @@ gimp_brush_select_widget (gchar *dname,
|
||||||
gint width;
|
gint width;
|
||||||
gint height;
|
gint height;
|
||||||
gint init_spacing;
|
gint init_spacing;
|
||||||
gint init_paint_mode;
|
GimpLayerModeEffects init_paint_mode;
|
||||||
gdouble init_opacity;
|
gdouble init_opacity;
|
||||||
gchar *mask_data;
|
guint8 *mask_data;
|
||||||
gchar *brush_name;
|
gchar *brush_name;
|
||||||
BSelect *bsel;
|
BSelect *bsel;
|
||||||
|
|
||||||
|
@ -405,37 +405,33 @@ gimp_brush_select_widget (gchar *dname,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gboolean
|
void
|
||||||
gimp_brush_select_widget_close_popup (GtkWidget *widget)
|
gimp_brush_select_widget_close_popup (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
gboolean ret_val = FALSE;
|
|
||||||
BSelect *bsel;
|
BSelect *bsel;
|
||||||
|
|
||||||
bsel = (BSelect *) gtk_object_get_data (GTK_OBJECT (widget), BSEL_DATA_KEY);
|
bsel = (BSelect *) gtk_object_get_data (GTK_OBJECT (widget), BSEL_DATA_KEY);
|
||||||
|
|
||||||
if (bsel && bsel->brush_popup_pnt)
|
if (bsel && bsel->brush_popup_pnt)
|
||||||
{
|
{
|
||||||
ret_val = gimp_brush_close_popup (bsel->brush_popup_pnt);
|
gimp_brushes_close_popup (bsel->brush_popup_pnt);
|
||||||
bsel->brush_popup_pnt = NULL;
|
bsel->brush_popup_pnt = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret_val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
void
|
||||||
gimp_brush_select_widget_set_popup (GtkWidget *widget,
|
gimp_brush_select_widget_set_popup (GtkWidget *widget,
|
||||||
gchar *bname,
|
gchar *bname,
|
||||||
gdouble opacity,
|
gdouble opacity,
|
||||||
gint spacing,
|
gint spacing,
|
||||||
gint paint_mode)
|
gint paint_mode)
|
||||||
{
|
{
|
||||||
gboolean ret_val = FALSE;
|
|
||||||
gint width;
|
gint width;
|
||||||
gint height;
|
gint height;
|
||||||
gint init_spacing;
|
gint init_spacing;
|
||||||
gint init_paint_mode;
|
GimpLayerModeEffects init_paint_mode;
|
||||||
gdouble init_opacity;
|
gdouble init_opacity;
|
||||||
gchar *mask_data;
|
guint8 *mask_data;
|
||||||
gchar *brush_name;
|
gchar *brush_name;
|
||||||
BSelect *bsel;
|
BSelect *bsel;
|
||||||
|
|
||||||
|
@ -451,23 +447,20 @@ gimp_brush_select_widget_set_popup (GtkWidget *widget,
|
||||||
&height,
|
&height,
|
||||||
&mask_data);
|
&mask_data);
|
||||||
|
|
||||||
if(opacity == -1.0)
|
if (opacity == -1.0)
|
||||||
opacity = init_opacity;
|
opacity = init_opacity;
|
||||||
|
|
||||||
if(spacing == -1)
|
if (spacing == -1)
|
||||||
spacing = init_spacing;
|
spacing = init_spacing;
|
||||||
|
|
||||||
if(paint_mode == -1)
|
if (paint_mode == -1)
|
||||||
paint_mode = init_paint_mode;
|
paint_mode = init_paint_mode;
|
||||||
|
|
||||||
brush_select_invoker (bname, opacity, spacing, paint_mode,
|
brush_select_invoker (bname, opacity, spacing, paint_mode,
|
||||||
width, height, mask_data, 0, bsel);
|
width, height, mask_data, 0, bsel);
|
||||||
|
|
||||||
if (bsel->brush_popup_pnt &&
|
if (bsel->brush_popup_pnt)
|
||||||
gimp_brush_set_popup (bsel->brush_popup_pnt,
|
gimp_brushes_set_popup (bsel->brush_popup_pnt,
|
||||||
bname, opacity, spacing, paint_mode))
|
bname, opacity, spacing, paint_mode);
|
||||||
ret_val = TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret_val;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,84 @@
|
||||||
|
/* LIBGIMP - The GIMP Library
|
||||||
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
||||||
|
*
|
||||||
|
* gimpbrushselect_pdb.c
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* NOTE: This file is autogenerated by pdbgen.pl */
|
||||||
|
|
||||||
|
#include "gimp.h"
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_brushes_popup (gchar *brush_callback,
|
||||||
|
gchar *popup_title,
|
||||||
|
gchar *initial_brush,
|
||||||
|
gdouble opacity,
|
||||||
|
gint spacing,
|
||||||
|
GimpLayerModeEffects paint_mode)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_brushes_popup",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_STRING, brush_callback,
|
||||||
|
PARAM_STRING, popup_title,
|
||||||
|
PARAM_STRING, initial_brush,
|
||||||
|
PARAM_FLOAT, opacity,
|
||||||
|
PARAM_INT32, spacing,
|
||||||
|
PARAM_INT32, paint_mode,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_brushes_close_popup (gchar *brush_callback)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_brushes_close_popup",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_STRING, brush_callback,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_brushes_set_popup (gchar *brush_callback,
|
||||||
|
gchar *brush_name,
|
||||||
|
gdouble opacity,
|
||||||
|
gint spacing,
|
||||||
|
GimpLayerModeEffects paint_mode)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_brushes_set_popup",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_STRING, brush_callback,
|
||||||
|
PARAM_STRING, brush_name,
|
||||||
|
PARAM_FLOAT, opacity,
|
||||||
|
PARAM_INT32, spacing,
|
||||||
|
PARAM_INT32, paint_mode,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
/* LIBGIMP - The GIMP Library
|
||||||
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
||||||
|
*
|
||||||
|
* gimpbrushselect_pdb.h
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* NOTE: This file is autogenerated by pdbgen.pl */
|
||||||
|
|
||||||
|
#ifndef __GIMP_BRUSH_SELECT_PDB_H__
|
||||||
|
#define __GIMP_BRUSH_SELECT_PDB_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/* For information look into the C source or the html documentation */
|
||||||
|
|
||||||
|
|
||||||
|
void gimp_brushes_popup (gchar *brush_callback,
|
||||||
|
gchar *popup_title,
|
||||||
|
gchar *initial_brush,
|
||||||
|
gdouble opacity,
|
||||||
|
gint spacing,
|
||||||
|
GimpLayerModeEffects paint_mode);
|
||||||
|
void gimp_brushes_close_popup (gchar *brush_callback);
|
||||||
|
void gimp_brushes_set_popup (gchar *brush_callback,
|
||||||
|
gchar *brush_name,
|
||||||
|
gdouble opacity,
|
||||||
|
gint spacing,
|
||||||
|
GimpLayerModeEffects paint_mode);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* __GIMP_BRUSH_SELECT_PDB_H__ */
|
|
@ -60,6 +60,9 @@ extern "C" {
|
||||||
#define gimp_layer_bpp gimp_drawable_bpp
|
#define gimp_layer_bpp gimp_drawable_bpp
|
||||||
#define gimp_layer_type gimp_drawable_type
|
#define gimp_layer_type gimp_drawable_type
|
||||||
|
|
||||||
|
#define gimp_gradient_get_gradient_data(a,b,c,d) \
|
||||||
|
gimp_gradients_get_gradient_data (a,c,b,d)
|
||||||
|
|
||||||
#define gimp_plugin_help_func gimp_standard_help_func
|
#define gimp_plugin_help_func gimp_standard_help_func
|
||||||
|
|
||||||
#define gimp_query_database gimp_procedural_db_query
|
#define gimp_query_database gimp_procedural_db_query
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
/* LIBGIMP - The GIMP Library
|
||||||
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
||||||
|
*
|
||||||
|
* gimpconvert_pdb.c
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* NOTE: This file is autogenerated by pdbgen.pl */
|
||||||
|
|
||||||
|
#include "gimp.h"
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_convert_rgb (gint32 image_ID)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_convert_rgb",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_IMAGE, image_ID,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_convert_grayscale (gint32 image_ID)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_convert_grayscale",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_IMAGE, image_ID,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_convert_indexed (gint32 image_ID,
|
||||||
|
GimpConvertDitherType dither_type,
|
||||||
|
GimpConvertPaletteType palette_type,
|
||||||
|
gint num_cols,
|
||||||
|
gboolean alpha_dither,
|
||||||
|
gboolean remove_unused,
|
||||||
|
gchar *palette)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_convert_indexed",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_IMAGE, image_ID,
|
||||||
|
PARAM_INT32, dither_type,
|
||||||
|
PARAM_INT32, palette_type,
|
||||||
|
PARAM_INT32, num_cols,
|
||||||
|
PARAM_INT32, alpha_dither,
|
||||||
|
PARAM_INT32, remove_unused,
|
||||||
|
PARAM_STRING, palette,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
/* LIBGIMP - The GIMP Library
|
||||||
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
||||||
|
*
|
||||||
|
* gimpconvert_pdb.h
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* NOTE: This file is autogenerated by pdbgen.pl */
|
||||||
|
|
||||||
|
#ifndef __GIMP_CONVERT_PDB_H__
|
||||||
|
#define __GIMP_CONVERT_PDB_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/* For information look into the C source or the html documentation */
|
||||||
|
|
||||||
|
|
||||||
|
void gimp_convert_rgb (gint32 image_ID);
|
||||||
|
void gimp_convert_grayscale (gint32 image_ID);
|
||||||
|
void gimp_convert_indexed (gint32 image_ID,
|
||||||
|
GimpConvertDitherType dither_type,
|
||||||
|
GimpConvertPaletteType palette_type,
|
||||||
|
gint num_cols,
|
||||||
|
gboolean alpha_dither,
|
||||||
|
gboolean remove_unused,
|
||||||
|
gchar *palette);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* __GIMP_CONVERT_PDB_H__ */
|
|
@ -19,6 +19,8 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "gimp.h"
|
#include "gimp.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -381,87 +383,6 @@ gimp_drawable_fill (gint32 drawable_ID,
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
}
|
}
|
||||||
|
|
||||||
GimpParasite *
|
|
||||||
gimp_drawable_parasite_find (gint32 drawable_ID,
|
|
||||||
const gchar *name)
|
|
||||||
|
|
||||||
{
|
|
||||||
GParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
GimpParasite *parasite;
|
|
||||||
return_vals = gimp_run_procedure ("gimp_drawable_parasite_find",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_DRAWABLE, drawable_ID,
|
|
||||||
PARAM_STRING, name,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
|
||||||
{
|
|
||||||
parasite = gimp_parasite_copy (&return_vals[1].data.d_parasite);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
parasite = NULL;
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
|
|
||||||
return parasite;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gimp_drawable_parasite_attach (gint32 drawable_ID,
|
|
||||||
const GimpParasite *parasite)
|
|
||||||
{
|
|
||||||
GParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_drawable_parasite_attach",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_DRAWABLE, drawable_ID,
|
|
||||||
PARAM_PARASITE, parasite,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
gimp_drawable_attach_new_parasite (gint32 drawable,
|
|
||||||
const gchar *name,
|
|
||||||
gint flags,
|
|
||||||
gint size,
|
|
||||||
const gpointer data)
|
|
||||||
{
|
|
||||||
GParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
GimpParasite *p = gimp_parasite_new (name, flags, size, data);
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_drawable_parasite_attach",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_DRAWABLE, drawable,
|
|
||||||
PARAM_PARASITE, p,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
gimp_parasite_free(p);
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gimp_drawable_parasite_detach (gint32 drawable_ID,
|
|
||||||
const gchar *name)
|
|
||||||
{
|
|
||||||
GParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_drawable_parasite_detach",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_DRAWABLE, drawable_ID,
|
|
||||||
PARAM_STRING, name,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
}
|
|
||||||
|
|
||||||
guchar *
|
guchar *
|
||||||
gimp_drawable_get_thumbnail_data (gint32 drawable_ID,
|
gimp_drawable_get_thumbnail_data (gint32 drawable_ID,
|
||||||
gint *width,
|
gint *width,
|
||||||
|
|
|
@ -60,17 +60,6 @@ void gimp_drawable_fill (gint32 drawable_ID,
|
||||||
GimpFillType fill_type);
|
GimpFillType fill_type);
|
||||||
void gimp_drawable_set_visible (gint32 drawable_ID,
|
void gimp_drawable_set_visible (gint32 drawable_ID,
|
||||||
gint visible);
|
gint visible);
|
||||||
GimpParasite * gimp_drawable_parasite_find (gint32 drawable_ID,
|
|
||||||
const gchar *name);
|
|
||||||
void gimp_drawable_parasite_attach (gint32 drawable_ID,
|
|
||||||
const GimpParasite *parasite);
|
|
||||||
void gimp_drawable_attach_new_parasite (gint32 drawable_ID,
|
|
||||||
const gchar *name,
|
|
||||||
gint flags,
|
|
||||||
gint size,
|
|
||||||
const gpointer data);
|
|
||||||
void gimp_drawable_parasite_detach (gint32 drawable_ID,
|
|
||||||
const gchar *name);
|
|
||||||
guchar * gimp_drawable_get_thumbnail_data (gint32 drawable_ID,
|
guchar * gimp_drawable_get_thumbnail_data (gint32 drawable_ID,
|
||||||
gint *width,
|
gint *width,
|
||||||
gint *height,
|
gint *height,
|
||||||
|
|
|
@ -19,17 +19,17 @@
|
||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#include "gimp.h"
|
#include "gimp.h"
|
||||||
#include "gimpdialog.h"
|
#include "gimpui.h"
|
||||||
#include "gimpenums.h"
|
|
||||||
#include "gimpexport.h"
|
|
||||||
|
|
||||||
#include "libgimp-intl.h"
|
#include "libgimp-intl.h"
|
||||||
|
|
||||||
|
|
||||||
typedef void (* ExportFunc) (gint32 imageID, gint32 *drawable_ID);
|
typedef void (* ExportFunc) (gint32 imageID, gint32 *drawable_ID);
|
||||||
|
|
||||||
/* the export action structure */
|
/* the export action structure */
|
||||||
|
|
|
@ -49,7 +49,7 @@ struct __gradients_sel
|
||||||
GimpRunGradientCallback cback;
|
GimpRunGradientCallback cback;
|
||||||
GtkWidget *gradient_preview;
|
GtkWidget *gradient_preview;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
GtkWidget *gradient_popup_pnt;
|
gchar *gradient_popup_pnt;
|
||||||
gint width;
|
gint width;
|
||||||
gchar *gradient_name; /* Local copy */
|
gchar *gradient_name; /* Local copy */
|
||||||
gdouble *grad_data; /* local copy */
|
gdouble *grad_data; /* local copy */
|
||||||
|
@ -219,7 +219,7 @@ gimp_gradient_select_widget (gchar *dname,
|
||||||
|
|
||||||
/* Do initial gradient setup */
|
/* Do initial gradient setup */
|
||||||
gradient_name =
|
gradient_name =
|
||||||
gimp_gradient_get_gradient_data (igradient, &width, CELL_SIZE_WIDTH, &grad_data);
|
gimp_gradients_get_gradient_data (igradient, CELL_SIZE_WIDTH, &width, &grad_data);
|
||||||
|
|
||||||
if (gradient_name)
|
if (gradient_name)
|
||||||
{
|
{
|
||||||
|
@ -241,28 +241,24 @@ gimp_gradient_select_widget (gchar *dname,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gboolean
|
void
|
||||||
gimp_gradient_select_widget_close_popup (GtkWidget *widget)
|
gimp_gradient_select_widget_close_popup (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
gboolean ret_val = FALSE;
|
|
||||||
GSelect *gsel;
|
GSelect *gsel;
|
||||||
|
|
||||||
gsel = (GSelect*) gtk_object_get_data (GTK_OBJECT (widget), GSEL_DATA_KEY);
|
gsel = (GSelect*) gtk_object_get_data (GTK_OBJECT (widget), GSEL_DATA_KEY);
|
||||||
|
|
||||||
if (gsel && gsel->gradient_popup_pnt)
|
if (gsel && gsel->gradient_popup_pnt)
|
||||||
{
|
{
|
||||||
ret_val = gimp_gradient_close_popup (gsel->gradient_popup_pnt);
|
gimp_gradients_close_popup (gsel->gradient_popup_pnt);
|
||||||
gsel->gradient_popup_pnt = NULL;
|
gsel->gradient_popup_pnt = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret_val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
void
|
||||||
gimp_gradient_select_widget_set_popup (GtkWidget *widget,
|
gimp_gradient_select_widget_set_popup (GtkWidget *widget,
|
||||||
gchar *gname)
|
gchar *gname)
|
||||||
{
|
{
|
||||||
gboolean ret_val = FALSE;
|
|
||||||
gint width;
|
gint width;
|
||||||
gdouble *grad_data;
|
gdouble *grad_data;
|
||||||
gchar *gradient_name;
|
gchar *gradient_name;
|
||||||
|
@ -273,17 +269,14 @@ gimp_gradient_select_widget_set_popup (GtkWidget *widget,
|
||||||
if (gsel)
|
if (gsel)
|
||||||
{
|
{
|
||||||
gradient_name =
|
gradient_name =
|
||||||
gimp_gradient_get_gradient_data (gname, &width, gsel->sample_size, &grad_data);
|
gimp_gradients_get_gradient_data (gname, gsel->sample_size, &width, &grad_data);
|
||||||
|
|
||||||
if (gradient_name)
|
if (gradient_name)
|
||||||
{
|
{
|
||||||
gradient_select_invoker (gname, width, grad_data, 0, gsel);
|
gradient_select_invoker (gname, width, grad_data, 0, gsel);
|
||||||
|
|
||||||
if (gsel->gradient_popup_pnt &&
|
if (gsel->gradient_popup_pnt)
|
||||||
gimp_gradient_set_popup (gsel->gradient_popup_pnt, gname))
|
gimp_gradients_set_popup (gsel->gradient_popup_pnt, gname);
|
||||||
ret_val = TRUE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret_val;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,106 @@
|
||||||
|
/* LIBGIMP - The GIMP Library
|
||||||
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
||||||
|
*
|
||||||
|
* gimpgradientselect_pdb.c
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* NOTE: This file is autogenerated by pdbgen.pl */
|
||||||
|
|
||||||
|
#include "gimp.h"
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_gradients_popup (gchar *gradients_callback,
|
||||||
|
gchar *popup_title,
|
||||||
|
gchar *initial_gradient,
|
||||||
|
gint sample_size)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_gradients_popup",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_STRING, gradients_callback,
|
||||||
|
PARAM_STRING, popup_title,
|
||||||
|
PARAM_STRING, initial_gradient,
|
||||||
|
PARAM_INT32, sample_size,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_gradients_close_popup (gchar *gradients_callback)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_gradients_close_popup",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_STRING, gradients_callback,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_gradients_set_popup (gchar *gradients_callback,
|
||||||
|
gchar *gradient_name)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_gradients_set_popup",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_STRING, gradients_callback,
|
||||||
|
PARAM_STRING, gradient_name,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
||||||
|
|
||||||
|
gchar *
|
||||||
|
gimp_gradients_get_gradient_data (gchar *name,
|
||||||
|
gint sample_size,
|
||||||
|
gint *width,
|
||||||
|
gdouble **grad_data)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_gradients_get_gradient_data",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_STRING, name,
|
||||||
|
PARAM_INT32, sample_size,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
*width = 0;
|
||||||
|
name = NULL;
|
||||||
|
|
||||||
|
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
||||||
|
{
|
||||||
|
name = g_strdup (return_vals[1].data.d_string);
|
||||||
|
*width = return_vals[2].data.d_int32;
|
||||||
|
*grad_data = g_new (gdouble, *width);
|
||||||
|
memcpy (*grad_data, return_vals[3].data.d_floatarray,
|
||||||
|
*width * sizeof (gdouble));
|
||||||
|
}
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
|
||||||
|
return name;
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
/* LIBGIMP - The GIMP Library
|
||||||
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
||||||
|
*
|
||||||
|
* gimpgradientselect_pdb.h
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* NOTE: This file is autogenerated by pdbgen.pl */
|
||||||
|
|
||||||
|
#ifndef __GIMP_GRADIENT_SELECT_PDB_H__
|
||||||
|
#define __GIMP_GRADIENT_SELECT_PDB_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/* For information look into the C source or the html documentation */
|
||||||
|
|
||||||
|
|
||||||
|
void gimp_gradients_popup (gchar *gradients_callback,
|
||||||
|
gchar *popup_title,
|
||||||
|
gchar *initial_gradient,
|
||||||
|
gint sample_size);
|
||||||
|
void gimp_gradients_close_popup (gchar *gradients_callback);
|
||||||
|
void gimp_gradients_set_popup (gchar *gradients_callback,
|
||||||
|
gchar *gradient_name);
|
||||||
|
gchar* gimp_gradients_get_gradient_data (gchar *name,
|
||||||
|
gint sample_size,
|
||||||
|
gint *width,
|
||||||
|
gdouble **grad_data);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* __GIMP_GRADIENT_SELECT_PDB_H__ */
|
|
@ -19,6 +19,8 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "gimp.h"
|
#include "gimp.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -841,84 +843,6 @@ gimp_image_set_filename (gint32 image_ID,
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
}
|
}
|
||||||
|
|
||||||
GimpParasite *
|
|
||||||
gimp_image_parasite_find (gint32 image_ID,
|
|
||||||
const gchar *name)
|
|
||||||
{
|
|
||||||
GParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
GimpParasite *parasite;
|
|
||||||
return_vals = gimp_run_procedure ("gimp_image_parasite_find",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_IMAGE, image_ID,
|
|
||||||
PARAM_STRING, name,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
|
||||||
{
|
|
||||||
parasite = gimp_parasite_copy (&return_vals[1].data.d_parasite);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
parasite = NULL;
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
|
|
||||||
return parasite;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gimp_image_parasite_attach (gint32 image_ID,
|
|
||||||
const GimpParasite *parasite)
|
|
||||||
{
|
|
||||||
GParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_image_parasite_attach",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_IMAGE, image_ID,
|
|
||||||
PARAM_PARASITE, parasite,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gimp_image_attach_new_parasite (gint32 image_ID,
|
|
||||||
const gchar *name,
|
|
||||||
gint flags,
|
|
||||||
gint size,
|
|
||||||
const gpointer data)
|
|
||||||
{
|
|
||||||
GParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
GimpParasite *p = gimp_parasite_new (name, flags, size, data);
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_image_parasite_attach",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_IMAGE, image_ID,
|
|
||||||
PARAM_PARASITE, p,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
gimp_parasite_free (p);
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gimp_image_parasite_detach (gint32 image_ID,
|
|
||||||
const gchar *name)
|
|
||||||
{
|
|
||||||
GParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_image_parasite_detach",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_IMAGE, image_ID,
|
|
||||||
PARAM_STRING, name,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_image_get_resolution (gint32 image_ID,
|
gimp_image_get_resolution (gint32 image_ID,
|
||||||
double *xresolution,
|
double *xresolution,
|
||||||
|
@ -1086,60 +1010,6 @@ gimp_image_get_thumbnail_data (gint32 image_ID,
|
||||||
return image_data;
|
return image_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
gimp_image_convert_rgb (gint32 image_ID)
|
|
||||||
{
|
|
||||||
GParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_convert_rgb",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_IMAGE, image_ID,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gimp_image_convert_grayscale (gint32 image_ID)
|
|
||||||
{
|
|
||||||
GParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_convert_grayscale",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_IMAGE, image_ID,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gimp_image_convert_indexed (gint32 image_ID,
|
|
||||||
GimpConvertDitherType dither_type,
|
|
||||||
GimpConvertPaletteType palette_type,
|
|
||||||
gint num_colors,
|
|
||||||
gint alpha_dither,
|
|
||||||
gint remove_unused,
|
|
||||||
gchar *palette)
|
|
||||||
{
|
|
||||||
GParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_convert_indexed",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_IMAGE, image_ID,
|
|
||||||
PARAM_INT32, dither_type,
|
|
||||||
PARAM_INT32, palette_type,
|
|
||||||
PARAM_INT32, num_colors,
|
|
||||||
PARAM_INT32, alpha_dither,
|
|
||||||
PARAM_INT32, remove_unused,
|
|
||||||
PARAM_STRING, palette,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
}
|
|
||||||
|
|
||||||
gint32 *
|
gint32 *
|
||||||
gimp_image_list (gint *nimages)
|
gimp_image_list (gint *nimages)
|
||||||
{
|
{
|
||||||
|
|
|
@ -110,17 +110,6 @@ void gimp_image_set_component_visible (gint32 image_ID,
|
||||||
gboolean visible);
|
gboolean visible);
|
||||||
void gimp_image_set_filename (gint32 image_ID,
|
void gimp_image_set_filename (gint32 image_ID,
|
||||||
gchar *name);
|
gchar *name);
|
||||||
GimpParasite * gimp_image_parasite_find (gint32 image_ID,
|
|
||||||
const gchar *name);
|
|
||||||
void gimp_image_parasite_attach (gint32 image_ID,
|
|
||||||
const GimpParasite *parasite);
|
|
||||||
void gimp_image_attach_new_parasite (gint32 image_ID,
|
|
||||||
const gchar *name,
|
|
||||||
gint flags,
|
|
||||||
gint size,
|
|
||||||
const gpointer data);
|
|
||||||
void gimp_image_parasite_detach (gint32 image_ID,
|
|
||||||
const gchar *name);
|
|
||||||
void gimp_image_set_resolution (gint32 image_ID,
|
void gimp_image_set_resolution (gint32 image_ID,
|
||||||
gdouble xresolution,
|
gdouble xresolution,
|
||||||
gdouble yresolution);
|
gdouble yresolution);
|
||||||
|
@ -139,34 +128,7 @@ guchar * gimp_image_get_thumbnail_data (gint32 image_ID,
|
||||||
gint *width,
|
gint *width,
|
||||||
gint *height,
|
gint *height,
|
||||||
gint *bytes);
|
gint *bytes);
|
||||||
void gimp_image_convert_rgb (gint32 image_ID);
|
gint32 * gimp_image_list (gint *nimages);
|
||||||
void gimp_image_convert_grayscale (gint32 image_ID);
|
|
||||||
void gimp_image_convert_indexed (gint32 image_ID,
|
|
||||||
GimpConvertDitherType dither_type,
|
|
||||||
GimpConvertPaletteType palette_type,
|
|
||||||
gint num_colors,
|
|
||||||
gint alpha_dither,
|
|
||||||
gint remove_unused,
|
|
||||||
gchar *palette);
|
|
||||||
gint32 * gimp_image_list (gint *nimages);
|
|
||||||
|
|
||||||
|
|
||||||
/****************************************
|
|
||||||
* Guides *
|
|
||||||
****************************************/
|
|
||||||
|
|
||||||
gint32 gimp_image_add_hguide (gint32 image_ID,
|
|
||||||
gint32 yposition);
|
|
||||||
gint32 gimp_image_add_vguide (gint32 image_ID,
|
|
||||||
gint32 xposition);
|
|
||||||
void gimp_image_delete_guide (gint32 image_ID,
|
|
||||||
gint32 guide_ID);
|
|
||||||
gint32 gimp_image_find_next_guide (gint32 image_ID,
|
|
||||||
gint32 guide_ID);
|
|
||||||
GOrientation gimp_image_get_guide_orientation (gint32 image_ID,
|
|
||||||
gint32 guide_ID);
|
|
||||||
gint32 gimp_image_get_guide_position (gint32 image_ID,
|
|
||||||
gint32 guide_ID);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -967,7 +967,7 @@ gen_temp_plugin_name (void)
|
||||||
/* Can only be used in conjuction with gdk since we need to tie into the input
|
/* Can only be used in conjuction with gdk since we need to tie into the input
|
||||||
* selection mech.
|
* selection mech.
|
||||||
*/
|
*/
|
||||||
gpointer
|
gchar *
|
||||||
gimp_interactive_selection_brush (gchar *dialogname,
|
gimp_interactive_selection_brush (gchar *dialogname,
|
||||||
gchar *brush_name,
|
gchar *brush_name,
|
||||||
gdouble opacity,
|
gdouble opacity,
|
||||||
|
@ -1048,92 +1048,7 @@ gimp_interactive_selection_brush (gchar *dialogname,
|
||||||
return pdbname;
|
return pdbname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gchar *
|
gchar *
|
||||||
gimp_brushes_get_brush_data (gchar *bname,
|
|
||||||
gdouble *opacity,
|
|
||||||
gint *spacing,
|
|
||||||
gint *paint_mode,
|
|
||||||
gint *width,
|
|
||||||
gint *height,
|
|
||||||
gchar **mask_data)
|
|
||||||
{
|
|
||||||
GimpParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
gchar *ret_name = NULL;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_brushes_get_brush_data",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_STRING, bname,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
|
||||||
{
|
|
||||||
ret_name = g_strdup (return_vals[1].data.d_string);
|
|
||||||
*opacity = return_vals[2].data.d_float;
|
|
||||||
*spacing = return_vals[3].data.d_int32;
|
|
||||||
*paint_mode = return_vals[4].data.d_int32;
|
|
||||||
*width = return_vals[5].data.d_int32;
|
|
||||||
*height = return_vals[6].data.d_int32;
|
|
||||||
*mask_data = g_new (gchar, return_vals[7].data.d_int32);
|
|
||||||
g_memmove (*mask_data,
|
|
||||||
return_vals[8].data.d_int32array, return_vals[7].data.d_int32);
|
|
||||||
}
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
|
|
||||||
return ret_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
gint
|
|
||||||
gimp_brush_close_popup (gpointer popup_pnt)
|
|
||||||
{
|
|
||||||
GimpParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
gint retval;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_brushes_close_popup",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_STRING, popup_pnt,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
|
|
||||||
retval = (return_vals[0].data.d_status == STATUS_SUCCESS);
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
gint
|
|
||||||
gimp_brush_set_popup (gpointer popup_pnt,
|
|
||||||
gchar *pname,
|
|
||||||
gdouble opacity,
|
|
||||||
gint spacing,
|
|
||||||
gint paint_mode)
|
|
||||||
{
|
|
||||||
GimpParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
gint retval;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_brushes_set_popup",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_STRING, popup_pnt,
|
|
||||||
PARAM_STRING, pname,
|
|
||||||
PARAM_FLOAT, opacity,
|
|
||||||
PARAM_INT32, spacing,
|
|
||||||
PARAM_INT32, paint_mode,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
|
|
||||||
retval = (return_vals[0].data.d_status == STATUS_SUCCESS);
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
gpointer
|
|
||||||
gimp_interactive_selection_pattern (gchar *dialogname,
|
gimp_interactive_selection_pattern (gchar *dialogname,
|
||||||
gchar *pattern_name,
|
gchar *pattern_name,
|
||||||
GimpRunPatternCallback callback,
|
GimpRunPatternCallback callback,
|
||||||
|
@ -1197,80 +1112,7 @@ gimp_interactive_selection_pattern (gchar *dialogname,
|
||||||
return pdbname;
|
return pdbname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gchar *
|
gchar *
|
||||||
gimp_pattern_get_pattern_data (gchar *pname,
|
|
||||||
gint *width,
|
|
||||||
gint *height,
|
|
||||||
gint *bytes,
|
|
||||||
gchar **mask_data)
|
|
||||||
{
|
|
||||||
GimpParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
gchar *ret_name = NULL;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_patterns_get_pattern_data",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_STRING, pname,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
|
||||||
{
|
|
||||||
ret_name = g_strdup(return_vals[1].data.d_string);
|
|
||||||
*width = return_vals[2].data.d_int32;
|
|
||||||
*height = return_vals[3].data.d_int32;
|
|
||||||
*bytes = return_vals[4].data.d_int32;
|
|
||||||
*mask_data = g_new (gchar,return_vals[5].data.d_int32);
|
|
||||||
g_memmove (*mask_data,
|
|
||||||
return_vals[6].data.d_int32array, return_vals[5].data.d_int32);
|
|
||||||
}
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
|
|
||||||
return ret_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
gint
|
|
||||||
gimp_pattern_close_popup (gpointer popup_pnt)
|
|
||||||
{
|
|
||||||
GimpParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
gint retval;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_patterns_close_popup",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_STRING, popup_pnt,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
|
|
||||||
retval = (return_vals[0].data.d_status == STATUS_SUCCESS);
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
gint
|
|
||||||
gimp_pattern_set_popup (gpointer popup_pnt,
|
|
||||||
gchar *pname)
|
|
||||||
{
|
|
||||||
GimpParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
gint retval;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_patterns_set_popup",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_STRING, popup_pnt,
|
|
||||||
PARAM_STRING, pname,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
|
|
||||||
retval = (return_vals[0].data.d_status == STATUS_SUCCESS);
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
gpointer
|
|
||||||
gimp_interactive_selection_gradient (gchar *dialogname,
|
gimp_interactive_selection_gradient (gchar *dialogname,
|
||||||
gchar *gradient_name,
|
gchar *gradient_name,
|
||||||
gint sample_sz,
|
gint sample_sz,
|
||||||
|
@ -1332,77 +1174,3 @@ gimp_interactive_selection_gradient (gchar *dialogname,
|
||||||
|
|
||||||
return pdbname;
|
return pdbname;
|
||||||
}
|
}
|
||||||
|
|
||||||
gchar *
|
|
||||||
gimp_gradient_get_gradient_data (gchar *gname,
|
|
||||||
gint *width,
|
|
||||||
gint sample_sz,
|
|
||||||
gdouble **grad_data)
|
|
||||||
{
|
|
||||||
GimpParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
gchar *ret_name = NULL;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_gradients_get_gradient_data",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_STRING, gname,
|
|
||||||
PARAM_INT32, sample_sz,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
|
||||||
{
|
|
||||||
gint i;
|
|
||||||
|
|
||||||
ret_name = g_strdup (return_vals[1].data.d_string);
|
|
||||||
*width = return_vals[2].data.d_int32;
|
|
||||||
*grad_data = g_new (gdouble, *width);
|
|
||||||
|
|
||||||
for (i = 0; i < *width; i++)
|
|
||||||
(*grad_data)[i] = return_vals[3].data.d_floatarray[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
|
|
||||||
return ret_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
gint
|
|
||||||
gimp_gradient_close_popup (gpointer popup_pnt)
|
|
||||||
{
|
|
||||||
GimpParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
gint retval;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_gradients_close_popup",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_STRING, popup_pnt,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
|
|
||||||
retval = (return_vals[0].data.d_status == STATUS_SUCCESS);
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
gint
|
|
||||||
gimp_gradient_set_popup (gpointer popup_pnt,
|
|
||||||
gchar *gname)
|
|
||||||
{
|
|
||||||
GimpParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
gint retval;
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_gradients_set_popup",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_STRING, popup_pnt,
|
|
||||||
PARAM_STRING, gname,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
|
|
||||||
retval = (return_vals[0].data.d_status == STATUS_SUCCESS);
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ GtkWidget * gimp_drawable_menu_new (GimpConstraintFunc constraint,
|
||||||
gint32 active_drawable);
|
gint32 active_drawable);
|
||||||
|
|
||||||
|
|
||||||
gpointer gimp_interactive_selection_brush (gchar *dialogname,
|
gchar * gimp_interactive_selection_brush (gchar *dialogname,
|
||||||
gchar *brush_name,
|
gchar *brush_name,
|
||||||
gdouble opacity,
|
gdouble opacity,
|
||||||
gint spacing,
|
gint spacing,
|
||||||
|
@ -96,30 +96,14 @@ GtkWidget * gimp_brush_select_widget (gchar *dname,
|
||||||
GimpRunBrushCallback cback,
|
GimpRunBrushCallback cback,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
gboolean gimp_brush_select_widget_set_popup (GtkWidget *widget,
|
void gimp_brush_select_widget_set_popup (GtkWidget *widget,
|
||||||
gchar *pname,
|
gchar *pname,
|
||||||
gdouble opacity,
|
gdouble opacity,
|
||||||
gint spacing,
|
gint spacing,
|
||||||
gint paint_mode);
|
gint paint_mode);
|
||||||
gboolean gimp_brush_select_widget_close_popup (GtkWidget *widget);
|
void gimp_brush_select_widget_close_popup (GtkWidget *widget);
|
||||||
|
|
||||||
gchar * gimp_brushes_get_brush_data (gchar *pname,
|
gchar * gimp_interactive_selection_pattern (gchar *dialogtitle,
|
||||||
gdouble *opacity,
|
|
||||||
gint *spacing,
|
|
||||||
gint *paint_mode,
|
|
||||||
gint *width,
|
|
||||||
gint *height,
|
|
||||||
gchar **mask_data);
|
|
||||||
|
|
||||||
gboolean gimp_brush_set_popup (gpointer popup_pnt,
|
|
||||||
gchar *pname,
|
|
||||||
gdouble opacity,
|
|
||||||
gint spacing,
|
|
||||||
gint paint_mode);
|
|
||||||
gboolean gimp_brush_close_popup (gpointer popup_pnt);
|
|
||||||
|
|
||||||
|
|
||||||
gpointer gimp_interactive_selection_pattern (gchar *dialogtitle,
|
|
||||||
gchar *pattern_name,
|
gchar *pattern_name,
|
||||||
GimpRunPatternCallback callback,
|
GimpRunPatternCallback callback,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
@ -129,21 +113,11 @@ GtkWidget * gimp_pattern_select_widget (gchar *dname,
|
||||||
GimpRunPatternCallback cback,
|
GimpRunPatternCallback cback,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
gboolean gimp_pattern_select_widget_close_popup (GtkWidget *widget);
|
void gimp_pattern_select_widget_close_popup (GtkWidget *widget);
|
||||||
gboolean gimp_pattern_select_widget_set_popup (GtkWidget *widget,
|
void gimp_pattern_select_widget_set_popup (GtkWidget *widget,
|
||||||
gchar *pname);
|
gchar *pname);
|
||||||
|
|
||||||
gchar * gimp_pattern_get_pattern_data (gchar *pname,
|
gchar * gimp_interactive_selection_gradient (gchar *dialogtitle,
|
||||||
gint *width,
|
|
||||||
gint *height,
|
|
||||||
gint *bytes,
|
|
||||||
gchar **mask_data);
|
|
||||||
|
|
||||||
gboolean gimp_pattern_set_popup (gpointer popup_pnt,
|
|
||||||
gchar *pname);
|
|
||||||
gboolean gimp_pattern_close_popup (gpointer popup_pnt);
|
|
||||||
|
|
||||||
gpointer gimp_interactive_selection_gradient (gchar *dialogtitle,
|
|
||||||
gchar *gradient_name,
|
gchar *gradient_name,
|
||||||
gint sample_sz,
|
gint sample_sz,
|
||||||
GimpRunGradientCallback callback,
|
GimpRunGradientCallback callback,
|
||||||
|
@ -154,18 +128,9 @@ GtkWidget * gimp_gradient_select_widget (gchar *gname,
|
||||||
GimpRunGradientCallback cback,
|
GimpRunGradientCallback cback,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
gboolean gimp_gradient_select_widget_set_popup (GtkWidget *widget,
|
void gimp_gradient_select_widget_close_popup (GtkWidget *widget);
|
||||||
gchar *pname);
|
void gimp_gradient_select_widget_set_popup (GtkWidget *widget,
|
||||||
gboolean gimp_gradient_select_widget_close_popup (GtkWidget *widget);
|
gchar *gname);
|
||||||
|
|
||||||
gchar * gimp_gradient_get_gradient_data (gchar *pname,
|
|
||||||
gint *width,
|
|
||||||
gint sample_sz,
|
|
||||||
gdouble **mask_data);
|
|
||||||
|
|
||||||
gboolean gimp_gradient_set_popup (gpointer popup_pnt,
|
|
||||||
gchar *pname);
|
|
||||||
gboolean gimp_gradient_close_popup (gpointer popup_pnt);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gimpparasite.h"
|
#include "gimpparasite.h"
|
||||||
|
#include "gimpparasite_pdb.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -181,7 +182,7 @@ gimp_parasite_name (const GimpParasite *parasite)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
gpointer
|
||||||
gimp_parasite_data (const GimpParasite *parasite)
|
gimp_parasite_data (const GimpParasite *parasite)
|
||||||
{
|
{
|
||||||
if (parasite)
|
if (parasite)
|
||||||
|
@ -198,3 +199,44 @@ gimp_parasite_data_size (const GimpParasite *parasite)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_attach_new_parasite (const gchar *name,
|
||||||
|
gint flags,
|
||||||
|
gint size,
|
||||||
|
const gpointer data)
|
||||||
|
{
|
||||||
|
GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);
|
||||||
|
|
||||||
|
gimp_parasite_attach (parasite);
|
||||||
|
|
||||||
|
gimp_parasite_free (parasite);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_drawable_attach_new_parasite (gint32 drawable,
|
||||||
|
const gchar *name,
|
||||||
|
gint flags,
|
||||||
|
gint size,
|
||||||
|
const gpointer data)
|
||||||
|
{
|
||||||
|
GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);
|
||||||
|
|
||||||
|
gimp_drawable_parasite_attach (drawable, parasite);
|
||||||
|
|
||||||
|
gimp_parasite_free (parasite);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_image_attach_new_parasite (gint32 image_ID,
|
||||||
|
const gchar *name,
|
||||||
|
gint flags,
|
||||||
|
gint size,
|
||||||
|
const gpointer data)
|
||||||
|
{
|
||||||
|
GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);
|
||||||
|
|
||||||
|
gimp_image_parasite_attach (image_ID, parasite);
|
||||||
|
|
||||||
|
gimp_parasite_free (parasite);
|
||||||
|
}
|
||||||
|
|
|
@ -54,27 +54,42 @@ struct _GimpParasite
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
GimpParasite * gimp_parasite_new (const gchar *name,
|
GimpParasite * gimp_parasite_new (const gchar *name,
|
||||||
guint32 flags,
|
guint32 flags,
|
||||||
guint32 size,
|
guint32 size,
|
||||||
const gpointer data);
|
const gpointer data);
|
||||||
void gimp_parasite_free (GimpParasite *parasite);
|
void gimp_parasite_free (GimpParasite *parasite);
|
||||||
|
|
||||||
GimpParasite * gimp_parasite_copy (const GimpParasite *parasite);
|
GimpParasite * gimp_parasite_copy (const GimpParasite *parasite);
|
||||||
|
|
||||||
gboolean gimp_parasite_compare (const GimpParasite *a,
|
gboolean gimp_parasite_compare (const GimpParasite *a,
|
||||||
const GimpParasite *b);
|
const GimpParasite *b);
|
||||||
|
|
||||||
gboolean gimp_parasite_is_type (const GimpParasite *parasite,
|
gboolean gimp_parasite_is_type (const GimpParasite *parasite,
|
||||||
const gchar *name);
|
const gchar *name);
|
||||||
gboolean gimp_parasite_is_persistent (const GimpParasite *parasite);
|
gboolean gimp_parasite_is_persistent (const GimpParasite *parasite);
|
||||||
gboolean gimp_parasite_is_undoable (const GimpParasite *parasite);
|
gboolean gimp_parasite_is_undoable (const GimpParasite *parasite);
|
||||||
gboolean gimp_parasite_has_flag (const GimpParasite *parasite,
|
gboolean gimp_parasite_has_flag (const GimpParasite *parasite,
|
||||||
gulong flag);
|
gulong flag);
|
||||||
gulong gimp_parasite_flags (const GimpParasite *parasite);
|
gulong gimp_parasite_flags (const GimpParasite *parasite);
|
||||||
const gchar * gimp_parasite_name (const GimpParasite *parasite);
|
const gchar * gimp_parasite_name (const GimpParasite *parasite);
|
||||||
void * gimp_parasite_data (const GimpParasite *parasite);
|
gpointer gimp_parasite_data (const GimpParasite *parasite);
|
||||||
glong gimp_parasite_data_size (const GimpParasite *parasite);
|
glong gimp_parasite_data_size (const GimpParasite *parasite);
|
||||||
|
|
||||||
|
void gimp_attach_new_parasite (const gchar *name,
|
||||||
|
gint flags,
|
||||||
|
gint size,
|
||||||
|
const gpointer data);
|
||||||
|
void gimp_drawable_attach_new_parasite (gint32 drawable_ID,
|
||||||
|
const gchar *name,
|
||||||
|
gint flags,
|
||||||
|
gint size,
|
||||||
|
const gpointer data);
|
||||||
|
void gimp_image_attach_new_parasite (gint32 image_ID,
|
||||||
|
const gchar *name,
|
||||||
|
gint flags,
|
||||||
|
gint size,
|
||||||
|
const gpointer data);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -57,25 +57,6 @@ gimp_parasite_attach (const GimpParasite *parasite)
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
gimp_attach_new_parasite (const gchar *name,
|
|
||||||
gint flags,
|
|
||||||
gint size,
|
|
||||||
const gpointer data)
|
|
||||||
{
|
|
||||||
GParam *return_vals;
|
|
||||||
gint nreturn_vals;
|
|
||||||
GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);
|
|
||||||
|
|
||||||
return_vals = gimp_run_procedure ("gimp_parasite_attach",
|
|
||||||
&nreturn_vals,
|
|
||||||
PARAM_PARASITE, parasite,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
gimp_parasite_free (parasite);
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_parasite_detach (const gchar *name)
|
gimp_parasite_detach (const gchar *name)
|
||||||
{
|
{
|
||||||
|
@ -89,3 +70,119 @@ gimp_parasite_detach (const gchar *name)
|
||||||
|
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GimpParasite *
|
||||||
|
gimp_drawable_parasite_find (gint32 drawable_ID,
|
||||||
|
const gchar *name)
|
||||||
|
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
GimpParasite *parasite;
|
||||||
|
return_vals = gimp_run_procedure ("gimp_drawable_parasite_find",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_DRAWABLE, drawable_ID,
|
||||||
|
PARAM_STRING, name,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
||||||
|
{
|
||||||
|
parasite = gimp_parasite_copy (&return_vals[1].data.d_parasite);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
parasite = NULL;
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
|
||||||
|
return parasite;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_drawable_parasite_attach (gint32 drawable_ID,
|
||||||
|
const GimpParasite *parasite)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_drawable_parasite_attach",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_DRAWABLE, drawable_ID,
|
||||||
|
PARAM_PARASITE, parasite,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_drawable_parasite_detach (gint32 drawable_ID,
|
||||||
|
const gchar *name)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_drawable_parasite_detach",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_DRAWABLE, drawable_ID,
|
||||||
|
PARAM_STRING, name,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
||||||
|
|
||||||
|
GimpParasite *
|
||||||
|
gimp_image_parasite_find (gint32 image_ID,
|
||||||
|
const gchar *name)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
GimpParasite *parasite;
|
||||||
|
return_vals = gimp_run_procedure ("gimp_image_parasite_find",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_IMAGE, image_ID,
|
||||||
|
PARAM_STRING, name,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
||||||
|
{
|
||||||
|
parasite = gimp_parasite_copy (&return_vals[1].data.d_parasite);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
parasite = NULL;
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
|
||||||
|
return parasite;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_image_parasite_attach (gint32 image_ID,
|
||||||
|
const GimpParasite *parasite)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_image_parasite_attach",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_IMAGE, image_ID,
|
||||||
|
PARAM_PARASITE, parasite,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_image_parasite_detach (gint32 image_ID,
|
||||||
|
const gchar *name)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_image_parasite_detach",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_IMAGE, image_ID,
|
||||||
|
PARAM_STRING, name,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
||||||
|
|
|
@ -29,13 +29,22 @@ extern "C" {
|
||||||
/* For information look into the C source or the html documentation */
|
/* For information look into the C source or the html documentation */
|
||||||
|
|
||||||
|
|
||||||
GimpParasite * gimp_parasite_find (const gchar *name);
|
GimpParasite * gimp_parasite_find (const gchar *name);
|
||||||
void gimp_parasite_attach (const GimpParasite *parasite);
|
void gimp_parasite_attach (const GimpParasite *parasite);
|
||||||
void gimp_attach_new_parasite (const gchar *name,
|
void gimp_parasite_detach (const gchar *name);
|
||||||
gint flags,
|
|
||||||
gint size,
|
GimpParasite * gimp_drawable_parasite_find (gint32 drawable_ID,
|
||||||
const gpointer data);
|
const gchar *name);
|
||||||
void gimp_parasite_detach (const gchar *name);
|
void gimp_drawable_parasite_attach (gint32 drawable_ID,
|
||||||
|
const GimpParasite *parasite);
|
||||||
|
void gimp_drawable_parasite_detach (gint32 drawable_ID,
|
||||||
|
const gchar *name);
|
||||||
|
GimpParasite * gimp_image_parasite_find (gint32 image_ID,
|
||||||
|
const gchar *name);
|
||||||
|
void gimp_image_parasite_attach (gint32 image_ID,
|
||||||
|
const GimpParasite *parasite);
|
||||||
|
void gimp_image_parasite_detach (gint32 image_ID,
|
||||||
|
const gchar *name);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -58,7 +58,7 @@ struct __patterns_sel
|
||||||
gint height;
|
gint height;
|
||||||
gint bytes;
|
gint bytes;
|
||||||
gchar *mask_data; /* local copy */
|
gchar *mask_data; /* local copy */
|
||||||
void *pattern_popup_pnt; /* Pointer use to control the popup */
|
gchar *pattern_popup_pnt; /* Pointer use to control the popup */
|
||||||
gpointer data;
|
gpointer data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -291,10 +291,11 @@ gimp_pattern_select_widget (gchar *dname,
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *pattern;
|
GtkWidget *pattern;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
gint length;
|
||||||
gint width;
|
gint width;
|
||||||
gint height;
|
gint height;
|
||||||
gint bytes;
|
gint bytes;
|
||||||
gchar *mask_data;
|
guint8 *mask_data;
|
||||||
gchar *pattern_name;
|
gchar *pattern_name;
|
||||||
PSelect *psel;
|
PSelect *psel;
|
||||||
|
|
||||||
|
@ -329,7 +330,7 @@ gimp_pattern_select_widget (gchar *dname,
|
||||||
|
|
||||||
/* Do initial pattern setup */
|
/* Do initial pattern setup */
|
||||||
pattern_name =
|
pattern_name =
|
||||||
gimp_pattern_get_pattern_data (ipattern, &width, &height, &bytes, &mask_data);
|
gimp_patterns_get_pattern_data (ipattern, &length, &width, &height, &bytes, &mask_data);
|
||||||
|
|
||||||
if(pattern_name)
|
if(pattern_name)
|
||||||
{
|
{
|
||||||
|
@ -357,33 +358,29 @@ gimp_pattern_select_widget (gchar *dname,
|
||||||
return hbox;
|
return hbox;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
gboolean
|
|
||||||
gimp_pattern_select_widget_close_popup (GtkWidget *widget)
|
gimp_pattern_select_widget_close_popup (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
gboolean ret_val = FALSE;
|
|
||||||
PSelect *psel;
|
PSelect *psel;
|
||||||
|
|
||||||
psel = (PSelect *) gtk_object_get_data (GTK_OBJECT (widget), PSEL_DATA_KEY);
|
psel = (PSelect *) gtk_object_get_data (GTK_OBJECT (widget), PSEL_DATA_KEY);
|
||||||
|
|
||||||
if (psel && psel->pattern_popup_pnt)
|
if (psel && psel->pattern_popup_pnt)
|
||||||
{
|
{
|
||||||
ret_val = gimp_pattern_close_popup (psel->pattern_popup_pnt);
|
gimp_patterns_close_popup (psel->pattern_popup_pnt);
|
||||||
psel->pattern_popup_pnt = NULL;
|
psel->pattern_popup_pnt = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret_val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
void
|
||||||
gimp_pattern_select_widget_set_popup (GtkWidget *widget,
|
gimp_pattern_select_widget_set_popup (GtkWidget *widget,
|
||||||
gchar *pname)
|
gchar *pname)
|
||||||
{
|
{
|
||||||
gboolean ret_val = FALSE;
|
gint length;
|
||||||
gint width;
|
gint width;
|
||||||
gint height;
|
gint height;
|
||||||
gint bytes;
|
gint bytes;
|
||||||
gchar *mask_data;
|
guint8 *mask_data;
|
||||||
gchar *pattern_name;
|
gchar *pattern_name;
|
||||||
PSelect *psel;
|
PSelect *psel;
|
||||||
|
|
||||||
|
@ -392,15 +389,13 @@ gimp_pattern_select_widget_set_popup (GtkWidget *widget,
|
||||||
if (psel)
|
if (psel)
|
||||||
{
|
{
|
||||||
pattern_name =
|
pattern_name =
|
||||||
gimp_pattern_get_pattern_data (pname,
|
gimp_patterns_get_pattern_data (pname,
|
||||||
&width, &height, &bytes, &mask_data);
|
&length, &width, &height, &bytes, &mask_data);
|
||||||
|
|
||||||
pattern_select_invoker (pname, width, height, bytes, mask_data, 0, psel);
|
pattern_select_invoker (pname, width, height, bytes, mask_data, 0, psel);
|
||||||
|
|
||||||
if (psel->pattern_popup_pnt &&
|
if (psel->pattern_popup_pnt)
|
||||||
gimp_pattern_set_popup (psel->pattern_popup_pnt, pname))
|
gimp_patterns_set_popup (psel->pattern_popup_pnt, pname);
|
||||||
ret_val = TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret_val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
/* LIBGIMP - The GIMP Library
|
||||||
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
||||||
|
*
|
||||||
|
* gimppatterns_pdb.c
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* NOTE: This file is autogenerated by pdbgen.pl */
|
||||||
|
|
||||||
|
#include "gimp.h"
|
||||||
|
|
||||||
|
gchar *
|
||||||
|
gimp_patterns_get_pattern_data (gchar *name,
|
||||||
|
gint *length,
|
||||||
|
gint *width,
|
||||||
|
gint *height,
|
||||||
|
gint *mask_bpp,
|
||||||
|
guint8 **mask_data)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_patterns_get_pattern_data",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_STRING, name,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
*length = 0;
|
||||||
|
name = NULL;
|
||||||
|
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
||||||
|
{
|
||||||
|
name = g_strdup (return_vals[1].data.d_string);
|
||||||
|
*width = return_vals[2].data.d_int32;
|
||||||
|
*height = return_vals[3].data.d_int32;
|
||||||
|
*mask_bpp = return_vals[4].data.d_int32;
|
||||||
|
*length = return_vals[5].data.d_int32;
|
||||||
|
*mask_data = g_new (guint8, *length);
|
||||||
|
memcpy (*mask_data, return_vals[6].data.d_int8array,
|
||||||
|
*length * sizeof (guint8));
|
||||||
|
}
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
|
||||||
|
return name;
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
/* LIBGIMP - The GIMP Library
|
||||||
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
||||||
|
*
|
||||||
|
* gimppatterns_pdb.h
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* NOTE: This file is autogenerated by pdbgen.pl */
|
||||||
|
|
||||||
|
#ifndef __GIMP_PATTERNS_H__
|
||||||
|
#define __GIMP_PATTERNS_H__
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
|
||||||
|
gchar* gimp_patterns_get_pattern_data (gchar *name,
|
||||||
|
gint *length,
|
||||||
|
gint *width,
|
||||||
|
gint *height,
|
||||||
|
gint *mask_bpp,
|
||||||
|
guint8 **mask_data);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __GIMP_PATTERNS_H__ */
|
|
@ -0,0 +1,72 @@
|
||||||
|
/* LIBGIMP - The GIMP Library
|
||||||
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
||||||
|
*
|
||||||
|
* gimppatternselect_pdb.c
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* NOTE: This file is autogenerated by pdbgen.pl */
|
||||||
|
|
||||||
|
#include "gimp.h"
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_patterns_popup (gchar *pattern_callback,
|
||||||
|
gchar *popup_title,
|
||||||
|
gchar *initial_pattern)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_patterns_popup",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_STRING, pattern_callback,
|
||||||
|
PARAM_STRING, popup_title,
|
||||||
|
PARAM_STRING, initial_pattern,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_patterns_close_popup (gchar *pattern_callback)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_patterns_close_popup",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_STRING, pattern_callback,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_patterns_set_popup (gchar *pattern_callback,
|
||||||
|
gchar *pattern_name)
|
||||||
|
{
|
||||||
|
GParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_patterns_set_popup",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_STRING, pattern_callback,
|
||||||
|
PARAM_STRING, pattern_name,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
/* LIBGIMP - The GIMP Library
|
||||||
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
||||||
|
*
|
||||||
|
* gimppatternselect_pdb.h
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* NOTE: This file is autogenerated by pdbgen.pl */
|
||||||
|
|
||||||
|
#ifndef __GIMP_PATTERN_SELECT_PDB_H__
|
||||||
|
#define __GIMP_PATTERN_SELECT_PDB_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/* For information look into the C source or the html documentation */
|
||||||
|
|
||||||
|
|
||||||
|
void gimp_patterns_popup (gchar *pattern_callback,
|
||||||
|
gchar *popup_title,
|
||||||
|
gchar *initial_pattern);
|
||||||
|
void gimp_patterns_close_popup (gchar *pattern_callback);
|
||||||
|
void gimp_patterns_set_popup (gchar *pattern_callback,
|
||||||
|
gchar *pattern_name);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* __GIMP_PATTERN_SELECT_PDB_H__ */
|
|
@ -19,6 +19,8 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "gimp.h"
|
#include "gimp.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -126,6 +128,62 @@ gimp_procedural_db_query (gchar *name_regexp,
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gimp_procedural_db_proc_arg (gchar *proc_name,
|
||||||
|
gint nth_arg,
|
||||||
|
GimpParamDef *param)
|
||||||
|
{
|
||||||
|
GimpParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
gboolean success;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_procedural_db_proc_arg",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_STRING, proc_name,
|
||||||
|
PARAM_INT32, nth_arg,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
success = (return_vals[0].data.d_status == STATUS_SUCCESS);
|
||||||
|
if (success)
|
||||||
|
{
|
||||||
|
param->type = return_vals[1].data.d_int32;
|
||||||
|
param->name = g_strdup (return_vals[2].data.d_string);
|
||||||
|
param->description = g_strdup (return_vals[3].data.d_string);
|
||||||
|
}
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gimp_procedural_db_proc_val (gchar *proc_name,
|
||||||
|
gint nth_val,
|
||||||
|
GimpParamDef *param)
|
||||||
|
{
|
||||||
|
GimpParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
gboolean success;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_procedural_db_proc_val",
|
||||||
|
&nreturn_vals,
|
||||||
|
PARAM_STRING, proc_name,
|
||||||
|
PARAM_INT32, nth_val,
|
||||||
|
PARAM_END);
|
||||||
|
|
||||||
|
success = (return_vals[0].data.d_status == STATUS_SUCCESS);
|
||||||
|
if (success)
|
||||||
|
{
|
||||||
|
param->type = return_vals[1].data.d_int32;
|
||||||
|
param->name = g_strdup (return_vals[2].data.d_string);
|
||||||
|
param->description = g_strdup (return_vals[3].data.d_string);
|
||||||
|
}
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gimp_procedural_db_proc_info (gchar *proc_name,
|
gimp_procedural_db_proc_info (gchar *proc_name,
|
||||||
gchar **proc_blurb,
|
gchar **proc_blurb,
|
||||||
|
@ -164,58 +222,26 @@ gimp_procedural_db_proc_info (gchar *proc_name,
|
||||||
|
|
||||||
for (i = 0; i < *nparams; i++)
|
for (i = 0; i < *nparams; i++)
|
||||||
{
|
{
|
||||||
GimpParam *rvals;
|
if (! gimp_procedural_db_proc_arg (proc_name, i, &(*params)[i]))
|
||||||
gint nrvals;
|
|
||||||
|
|
||||||
rvals = gimp_run_procedure ("gimp_procedural_db_proc_arg",
|
|
||||||
&nrvals,
|
|
||||||
PARAM_STRING, proc_name,
|
|
||||||
PARAM_INT32, i,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
if (rvals[0].data.d_status == STATUS_SUCCESS)
|
|
||||||
{
|
|
||||||
(* params) [i].type = rvals[1].data.d_int32;
|
|
||||||
(* params) [i].name = g_strdup (rvals[2].data.d_string);
|
|
||||||
(* params) [i].description = g_strdup (rvals[3].data.d_string);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
g_free (*params);
|
g_free (*params);
|
||||||
g_free (*return_vals);
|
g_free (*return_vals);
|
||||||
gimp_destroy_params (rvals, nrvals);
|
gimp_destroy_params (ret_vals, nret_vals);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_destroy_params (rvals, nrvals);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < *nreturn_vals; i++)
|
for (i = 0; i < *nreturn_vals; i++)
|
||||||
{
|
{
|
||||||
GimpParam *rvals;
|
if (! gimp_procedural_db_proc_val (proc_name, i, &(*return_vals)[i]))
|
||||||
gint nrvals;
|
|
||||||
|
|
||||||
rvals = gimp_run_procedure ("gimp_procedural_db_proc_val",
|
|
||||||
&nrvals,
|
|
||||||
PARAM_STRING, proc_name,
|
|
||||||
PARAM_INT32, i,
|
|
||||||
PARAM_END);
|
|
||||||
|
|
||||||
if (rvals[0].data.d_status == STATUS_SUCCESS)
|
|
||||||
{
|
|
||||||
(* return_vals)[i].type = rvals[1].data.d_int32;
|
|
||||||
(* return_vals)[i].name = g_strdup (rvals[2].data.d_string);
|
|
||||||
(* return_vals)[i].description = g_strdup (rvals[3].data.d_string);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
g_free (*params);
|
g_free (*params);
|
||||||
g_free (*return_vals);
|
g_free (*return_vals);
|
||||||
gimp_destroy_params (rvals, nrvals);
|
gimp_destroy_params (ret_vals, nret_vals);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_destroy_params (rvals, nrvals);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -65,22 +65,28 @@ void gimp_procedural_db_query (gchar *name_regexp,
|
||||||
gint *nprocs,
|
gint *nprocs,
|
||||||
gchar ***proc_names);
|
gchar ***proc_names);
|
||||||
|
|
||||||
|
|
||||||
|
gboolean gimp_procedural_db_proc_arg (gchar *proc_name,
|
||||||
|
gint nth_arg,
|
||||||
|
GimpParamDef *param);
|
||||||
|
gboolean gimp_procedural_db_proc_val (gchar *proc_name,
|
||||||
|
gint nth_val,
|
||||||
|
GimpParamDef *param);
|
||||||
|
|
||||||
/* Query the gimp application's procedural database
|
/* Query the gimp application's procedural database
|
||||||
* regarding a particular procedure.
|
* regarding a particular procedure.
|
||||||
*/
|
*/
|
||||||
gboolean gimp_procedural_db_query_proc (gchar *proc_name,
|
gboolean gimp_procedural_db_proc_info (gchar *proc_name,
|
||||||
gchar **proc_blurb,
|
gchar **proc_blurb,
|
||||||
gchar **proc_help,
|
gchar **proc_help,
|
||||||
gchar **proc_author,
|
gchar **proc_author,
|
||||||
gchar **proc_copyright,
|
gchar **proc_copyright,
|
||||||
gchar **proc_date,
|
gchar **proc_date,
|
||||||
gint *proc_type,
|
gint *proc_type,
|
||||||
gint *nparams,
|
gint *nparams,
|
||||||
gint *nreturn_vals,
|
gint *nreturn_vals,
|
||||||
GimpParamDef **params,
|
GimpParamDef **params,
|
||||||
GimpParamDef **return_vals);
|
GimpParamDef **return_vals);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gimpparasite.h"
|
#include "gimpparasite.h"
|
||||||
|
#include "gimpparasite_pdb.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -181,7 +182,7 @@ gimp_parasite_name (const GimpParasite *parasite)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
gpointer
|
||||||
gimp_parasite_data (const GimpParasite *parasite)
|
gimp_parasite_data (const GimpParasite *parasite)
|
||||||
{
|
{
|
||||||
if (parasite)
|
if (parasite)
|
||||||
|
@ -198,3 +199,44 @@ gimp_parasite_data_size (const GimpParasite *parasite)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_attach_new_parasite (const gchar *name,
|
||||||
|
gint flags,
|
||||||
|
gint size,
|
||||||
|
const gpointer data)
|
||||||
|
{
|
||||||
|
GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);
|
||||||
|
|
||||||
|
gimp_parasite_attach (parasite);
|
||||||
|
|
||||||
|
gimp_parasite_free (parasite);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_drawable_attach_new_parasite (gint32 drawable,
|
||||||
|
const gchar *name,
|
||||||
|
gint flags,
|
||||||
|
gint size,
|
||||||
|
const gpointer data)
|
||||||
|
{
|
||||||
|
GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);
|
||||||
|
|
||||||
|
gimp_drawable_parasite_attach (drawable, parasite);
|
||||||
|
|
||||||
|
gimp_parasite_free (parasite);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_image_attach_new_parasite (gint32 image_ID,
|
||||||
|
const gchar *name,
|
||||||
|
gint flags,
|
||||||
|
gint size,
|
||||||
|
const gpointer data)
|
||||||
|
{
|
||||||
|
GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);
|
||||||
|
|
||||||
|
gimp_image_parasite_attach (image_ID, parasite);
|
||||||
|
|
||||||
|
gimp_parasite_free (parasite);
|
||||||
|
}
|
||||||
|
|
|
@ -54,27 +54,42 @@ struct _GimpParasite
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
GimpParasite * gimp_parasite_new (const gchar *name,
|
GimpParasite * gimp_parasite_new (const gchar *name,
|
||||||
guint32 flags,
|
guint32 flags,
|
||||||
guint32 size,
|
guint32 size,
|
||||||
const gpointer data);
|
const gpointer data);
|
||||||
void gimp_parasite_free (GimpParasite *parasite);
|
void gimp_parasite_free (GimpParasite *parasite);
|
||||||
|
|
||||||
GimpParasite * gimp_parasite_copy (const GimpParasite *parasite);
|
GimpParasite * gimp_parasite_copy (const GimpParasite *parasite);
|
||||||
|
|
||||||
gboolean gimp_parasite_compare (const GimpParasite *a,
|
gboolean gimp_parasite_compare (const GimpParasite *a,
|
||||||
const GimpParasite *b);
|
const GimpParasite *b);
|
||||||
|
|
||||||
gboolean gimp_parasite_is_type (const GimpParasite *parasite,
|
gboolean gimp_parasite_is_type (const GimpParasite *parasite,
|
||||||
const gchar *name);
|
const gchar *name);
|
||||||
gboolean gimp_parasite_is_persistent (const GimpParasite *parasite);
|
gboolean gimp_parasite_is_persistent (const GimpParasite *parasite);
|
||||||
gboolean gimp_parasite_is_undoable (const GimpParasite *parasite);
|
gboolean gimp_parasite_is_undoable (const GimpParasite *parasite);
|
||||||
gboolean gimp_parasite_has_flag (const GimpParasite *parasite,
|
gboolean gimp_parasite_has_flag (const GimpParasite *parasite,
|
||||||
gulong flag);
|
gulong flag);
|
||||||
gulong gimp_parasite_flags (const GimpParasite *parasite);
|
gulong gimp_parasite_flags (const GimpParasite *parasite);
|
||||||
const gchar * gimp_parasite_name (const GimpParasite *parasite);
|
const gchar * gimp_parasite_name (const GimpParasite *parasite);
|
||||||
void * gimp_parasite_data (const GimpParasite *parasite);
|
gpointer gimp_parasite_data (const GimpParasite *parasite);
|
||||||
glong gimp_parasite_data_size (const GimpParasite *parasite);
|
glong gimp_parasite_data_size (const GimpParasite *parasite);
|
||||||
|
|
||||||
|
void gimp_attach_new_parasite (const gchar *name,
|
||||||
|
gint flags,
|
||||||
|
gint size,
|
||||||
|
const gpointer data);
|
||||||
|
void gimp_drawable_attach_new_parasite (gint32 drawable_ID,
|
||||||
|
const gchar *name,
|
||||||
|
gint flags,
|
||||||
|
gint size,
|
||||||
|
const gpointer data);
|
||||||
|
void gimp_image_attach_new_parasite (gint32 image_ID,
|
||||||
|
const gchar *name,
|
||||||
|
gint flags,
|
||||||
|
gint size,
|
||||||
|
const gpointer data);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -252,7 +252,9 @@ CODE
|
||||||
$arglist .= "$datatype **$_->{name}";
|
$arglist .= "$datatype **$_->{name}";
|
||||||
}
|
}
|
||||||
|
|
||||||
$return_args .= "\n" . ' ' x 2 . "gint i;";
|
if ($ch || $cf) {
|
||||||
|
$return_args .= "\n" . ' ' x 2 . "gint i;";
|
||||||
|
}
|
||||||
|
|
||||||
my $numvar = '*' . $_->{array}->{name};
|
my $numvar = '*' . $_->{array}->{name};
|
||||||
$numvar = "num_$_->{name}" if exists $_->{array}->{no_lib};
|
$numvar = "num_$_->{name}" if exists $_->{array}->{no_lib};
|
||||||
|
@ -264,7 +266,7 @@ NEW
|
||||||
for (i = 0; i < $numvar; i++)
|
for (i = 0; i < $numvar; i++)
|
||||||
$dh$_->{name}$df\[i] = ${ch}return_vals[$argc].data.d_$type\[i]${cf};
|
$dh$_->{name}$df\[i] = ${ch}return_vals[$argc].data.d_$type\[i]${cf};
|
||||||
CP1
|
CP1
|
||||||
memcpy ($var, return_vals[$argc].data.d_$type\[i],
|
memcpy ($var, return_vals[$argc].data.d_$type,
|
||||||
$numvar * sizeof ($datatype));
|
$numvar * sizeof ($datatype));
|
||||||
CP2
|
CP2
|
||||||
}
|
}
|
||||||
|
@ -378,10 +380,14 @@ $funcname ($clist)
|
||||||
CODE
|
CODE
|
||||||
}
|
}
|
||||||
|
|
||||||
my $lgpl = <<'LGPL';
|
my $lgpl_top = <<'LGPL';
|
||||||
/* LIBGIMP - The GIMP Library
|
/* LIBGIMP - The GIMP Library
|
||||||
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
||||||
*
|
*
|
||||||
|
LGPL
|
||||||
|
|
||||||
|
my $lgpl_bottom = <<'LGPL';
|
||||||
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* License as published by the Free Software Foundation; either
|
* License as published by the Free Software Foundation; either
|
||||||
|
@ -396,7 +402,7 @@ CODE
|
||||||
* License along with this library; if not, write to the
|
* License along with this library; if not, write to the
|
||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* NOTE: This file is autogenerated by pdbgen.pl */
|
/* NOTE: This file is autogenerated by pdbgen.pl */
|
||||||
|
|
||||||
|
@ -405,10 +411,12 @@ LGPL
|
||||||
# We generate two files, a _pdb.h file with prototypes for all
|
# We generate two files, a _pdb.h file with prototypes for all
|
||||||
# the functions we make, and a _pdb.c file for the actual implementation
|
# the functions we make, and a _pdb.c file for the actual implementation
|
||||||
while (my($group, $out) = each %out) {
|
while (my($group, $out) = each %out) {
|
||||||
my $hfile = "$destdir/gimp${group}pdb.h$FILE_EXT";
|
my $hname = "gimp${group}pdb.h";
|
||||||
my $cfile = "$destdir/gimp${group}pdb.c$FILE_EXT";
|
my $cname = "gimp${group}pdb.c";
|
||||||
|
$hname =~ s/_//g; $hname =~ s/pdb\./_pdb./;
|
||||||
foreach ($hfile $cfile) { s/_//g; s/pdb\./_pdb./ }
|
$cname =~ s/_//g; $cname =~ s/pdb\./_pdb./;
|
||||||
|
my $hfile = "$destdir/$hname$FILE_EXT";
|
||||||
|
my $cfile = "$destdir/$cname$FILE_EXT";
|
||||||
|
|
||||||
my $extra = {};
|
my $extra = {};
|
||||||
if (exists $main::grp{$group}->{extra}->{lib}) {
|
if (exists $main::grp{$group}->{extra}->{lib}) {
|
||||||
|
@ -482,21 +490,20 @@ LGPL
|
||||||
chomp $body;
|
chomp $body;
|
||||||
|
|
||||||
open HFILE, "> $hfile" or die "Can't open $hfile: $!\n";
|
open HFILE, "> $hfile" or die "Can't open $hfile: $!\n";
|
||||||
print HFILE $lgpl;
|
print HFILE $lgpl_top;
|
||||||
my $guard = "__GIMP_\U$group\E_H__";
|
print HFILE " * $hname\n";
|
||||||
|
print HFILE $lgpl_bottom;
|
||||||
|
my $guard = "__GIMP_\U$group\E_PDB_H__";
|
||||||
print HFILE <<HEADER;
|
print HFILE <<HEADER;
|
||||||
#ifndef $guard
|
#ifndef $guard
|
||||||
#define $guard
|
#define $guard
|
||||||
|
|
||||||
|
|
||||||
#include <glib.h>
|
|
||||||
#include <libgimp/gimpprocs.h>
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/* For information look into the C source or the html documentation */
|
||||||
|
|
||||||
|
|
||||||
$body
|
$body
|
||||||
|
|
||||||
|
@ -505,15 +512,16 @@ $body
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
|
||||||
#endif /* $guard */
|
#endif /* $guard */
|
||||||
HEADER
|
HEADER
|
||||||
close HFILE;
|
close HFILE;
|
||||||
&write_file($hfile);
|
&write_file($hfile);
|
||||||
|
|
||||||
open CFILE, "> $cfile" or die "Can't open $cfile: $!\n";
|
open CFILE, "> $cfile" or die "Can't open $cfile: $!\n";
|
||||||
print CFILE $lgpl;
|
print CFILE $lgpl_top;
|
||||||
print CFILE qq/#include "gimp${group}.h"\n/;
|
print CFILE " * $cname\n";
|
||||||
|
print CFILE $lgpl_bottom;
|
||||||
|
print CFILE qq/#include "gimp.h"\n/;
|
||||||
print CFILE qq/#include "gimpprivate.h"\n/ if $privatevars;
|
print CFILE qq/#include "gimpprivate.h"\n/ if $privatevars;
|
||||||
print CFILE "\n", $extra->{code} if exists $extra->{code};
|
print CFILE "\n", $extra->{code} if exists $extra->{code};
|
||||||
print CFILE $out->{code};
|
print CFILE $out->{code};
|
||||||
|
|
|
@ -53,7 +53,7 @@ HELP
|
||||||
@headers = qw("gimphelp.h");
|
@headers = qw("gimphelp.h");
|
||||||
|
|
||||||
@procs = qw(help);
|
@procs = qw(help);
|
||||||
%exports = (app => [@procs]);
|
%exports = (app => [@procs], lib => [@procs]);
|
||||||
|
|
||||||
$desc = 'Help procedures';
|
$desc = 'Help procedures';
|
||||||
|
|
||||||
|
|
|
@ -63,37 +63,6 @@ sub convert_proc {
|
||||||
|
|
||||||
# The defs
|
# The defs
|
||||||
|
|
||||||
sub parasite_new {
|
|
||||||
$blurb = 'Creates a new parasite.';
|
|
||||||
|
|
||||||
$help = 'Creates a new parasite unatached to to any image or drawable.';
|
|
||||||
|
|
||||||
&pdb_misc;
|
|
||||||
|
|
||||||
@inargs = (
|
|
||||||
&name_arg('create'),
|
|
||||||
{ name => 'flags', type => 'int32',
|
|
||||||
desc => 'The flags (1 == persistance)' },
|
|
||||||
{ name => 'size', type => '0 <= int32',
|
|
||||||
desc => 'The size of the data in bytes' },
|
|
||||||
{ name => 'data', type => 'string',
|
|
||||||
desc => 'The data', no_success => 1 }
|
|
||||||
);
|
|
||||||
|
|
||||||
@outargs = ( ¶site_outarg('new') );
|
|
||||||
|
|
||||||
%invoke = (
|
|
||||||
code => <<'CODE'
|
|
||||||
{
|
|
||||||
if (size > 0 && data == NULL)
|
|
||||||
success = FALSE;
|
|
||||||
else
|
|
||||||
success = (parasite = gimp_parasite_new (name, flags, size, data)) != NULL;
|
|
||||||
}
|
|
||||||
CODE
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub parasite_find {
|
sub parasite_find {
|
||||||
$blurb = 'Finds the named parasite.';
|
$blurb = 'Finds the named parasite.';
|
||||||
|
|
||||||
|
@ -185,15 +154,15 @@ gimp_parasite_attach_new (gchar *name,
|
||||||
gint size,
|
gint size,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GimpParasite *p = gimp_parasite_new (name, flags, size, data);
|
GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);
|
||||||
gimp_parasite_attach (p);
|
|
||||||
gimp_parasite_free (p);
|
gimp_parasite_attach (parasite);
|
||||||
|
gimp_parasite_free (parasite);
|
||||||
}
|
}
|
||||||
|
|
||||||
CODE
|
CODE
|
||||||
|
|
||||||
@procs = qw(parasite_new parasite_find parasite_attach parasite_detach
|
@procs = qw(parasite_find parasite_attach parasite_detach parasite_list);
|
||||||
parasite_list);
|
|
||||||
|
|
||||||
@types = (
|
@types = (
|
||||||
['drawable', '&drawable_arg' , 'drawable'],
|
['drawable', '&drawable_arg' , 'drawable'],
|
||||||
|
@ -203,7 +172,7 @@ CODE
|
||||||
my %code;
|
my %code;
|
||||||
|
|
||||||
foreach $type (@types) {
|
foreach $type (@types) {
|
||||||
foreach (@procs[1..4]) {
|
foreach (@procs[0..3]) {
|
||||||
my $desc = ($type->[0] =~ /^[aeiou]/ ? 'an ' : 'a ') . $type->[0];
|
my $desc = ($type->[0] =~ /^[aeiou]/ ? 'an ' : 'a ') . $type->[0];
|
||||||
my $args = join(', ', map { /^&/ ? $_ : "'$_'" } @$type);
|
my $args = join(', ', map { /^&/ ? $_ : "'$_'" } @$type);
|
||||||
my $pre = ""; my $post = "";
|
my $pre = ""; my $post = "";
|
||||||
|
|
|
@ -157,7 +157,7 @@ pattern_get_patternselect (gchar *name)
|
||||||
CODE
|
CODE
|
||||||
|
|
||||||
@procs = qw(patterns_popup patterns_close_popup patterns_set_popup);
|
@procs = qw(patterns_popup patterns_close_popup patterns_set_popup);
|
||||||
%exports = (app => [@procs]);
|
%exports = (app => [@procs], lib => [@procs]);
|
||||||
|
|
||||||
$desc = 'Pattern UI';
|
$desc = 'Pattern UI';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue