mirror of https://github.com/GNOME/gimp.git
add some perl evilness to make the includes in the generated files look
2008-02-07 Michael Natterer <mitch@gimp.org> * tools/pdbgen/app.pl: add some perl evilness to make the includes in the generated files look almost like they should. * tools/pdbgen/pdb/*.pdb: remove inclusion of "core/gimp.h" where not needed, clean up lists of includes and functions and reorder some functions to make more sense. Zero logic changed. * app/pdb/*_cmds.c * libgimp/gimpcontext_pdb.[ch] * libgimp/gimpbrush_pdb.[ch]: regenerated. svn path=/trunk/; revision=24830
This commit is contained in:
parent
dc490d3b84
commit
e4b3d432d2
|
@ -461,172 +461,6 @@ gimp_brush_get_shape (const gchar *name)
|
|||
return shape;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_get_radius:
|
||||
* @name: The brush name.
|
||||
*
|
||||
* Get the radius of a generated brush.
|
||||
*
|
||||
* This procedure gets the radius value for a generated brush. If
|
||||
* called for any other type of brush, it does not succeed.
|
||||
*
|
||||
* Returns: The radius of the brush in pixels.
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
*/
|
||||
gdouble
|
||||
gimp_brush_get_radius (const gchar *name)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gdouble radius = 0.0;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-brush-get-radius",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_STRING, name,
|
||||
GIMP_PDB_END);
|
||||
|
||||
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
||||
radius = return_vals[1].data.d_float;
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return radius;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_get_spikes:
|
||||
* @name: The brush name.
|
||||
*
|
||||
* Get the number of spikes for a generated brush.
|
||||
*
|
||||
* This procedure gets the number of spikes for a generated brush. If
|
||||
* called for any other type of brush, it does not succeed.
|
||||
*
|
||||
* Returns: The number of spikes on the brush.
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
*/
|
||||
gint
|
||||
gimp_brush_get_spikes (const gchar *name)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gint spikes = 0;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-brush-get-spikes",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_STRING, name,
|
||||
GIMP_PDB_END);
|
||||
|
||||
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
||||
spikes = return_vals[1].data.d_int32;
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return spikes;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_get_hardness:
|
||||
* @name: The brush name.
|
||||
*
|
||||
* Get the hardness of a generated brush.
|
||||
*
|
||||
* This procedure gets the hardness of a generated brush. The hardness
|
||||
* of a brush is the amount its intensity fades at the outside edge. If
|
||||
* called for any other type of brush, the function does not succeed.
|
||||
*
|
||||
* Returns: The hardness of the brush.
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
*/
|
||||
gdouble
|
||||
gimp_brush_get_hardness (const gchar *name)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gdouble hardness = 0.0;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-brush-get-hardness",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_STRING, name,
|
||||
GIMP_PDB_END);
|
||||
|
||||
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
||||
hardness = return_vals[1].data.d_float;
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return hardness;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_get_aspect_ratio:
|
||||
* @name: The brush name.
|
||||
*
|
||||
* Get the aspect ratio of a generated brush.
|
||||
*
|
||||
* This procedure gets the aspect ratio of a generated brush. If called
|
||||
* for any other type of brush, it does not succeed.
|
||||
*
|
||||
* Returns: The aspect ratio of the brush.
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
*/
|
||||
gdouble
|
||||
gimp_brush_get_aspect_ratio (const gchar *name)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gdouble aspect_ratio = 0.0;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-brush-get-aspect-ratio",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_STRING, name,
|
||||
GIMP_PDB_END);
|
||||
|
||||
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
||||
aspect_ratio = return_vals[1].data.d_float;
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return aspect_ratio;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_get_angle:
|
||||
* @name: The brush name.
|
||||
*
|
||||
* Get the rotation angle of a generated brush.
|
||||
*
|
||||
* This procedure gets the angle of rotation for a generated brush. If
|
||||
* called for any other type of brush, it does not succeed.
|
||||
*
|
||||
* Returns: The rotation angle of the brush.
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
*/
|
||||
gdouble
|
||||
gimp_brush_get_angle (const gchar *name)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gdouble angle = 0.0;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-brush-get-angle",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_STRING, name,
|
||||
GIMP_PDB_END);
|
||||
|
||||
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
||||
angle = return_vals[1].data.d_float;
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return angle;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_set_shape:
|
||||
* @name: The brush name.
|
||||
|
@ -667,6 +501,39 @@ gimp_brush_set_shape (const gchar *name,
|
|||
return shape_out;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_get_radius:
|
||||
* @name: The brush name.
|
||||
*
|
||||
* Get the radius of a generated brush.
|
||||
*
|
||||
* This procedure gets the radius value for a generated brush. If
|
||||
* called for any other type of brush, it does not succeed.
|
||||
*
|
||||
* Returns: The radius of the brush in pixels.
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
*/
|
||||
gdouble
|
||||
gimp_brush_get_radius (const gchar *name)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gdouble radius = 0.0;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-brush-get-radius",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_STRING, name,
|
||||
GIMP_PDB_END);
|
||||
|
||||
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
||||
radius = return_vals[1].data.d_float;
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return radius;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_set_radius:
|
||||
* @name: The brush name.
|
||||
|
@ -703,6 +570,39 @@ gimp_brush_set_radius (const gchar *name,
|
|||
return radius_out;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_get_spikes:
|
||||
* @name: The brush name.
|
||||
*
|
||||
* Get the number of spikes for a generated brush.
|
||||
*
|
||||
* This procedure gets the number of spikes for a generated brush. If
|
||||
* called for any other type of brush, it does not succeed.
|
||||
*
|
||||
* Returns: The number of spikes on the brush.
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
*/
|
||||
gint
|
||||
gimp_brush_get_spikes (const gchar *name)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gint spikes = 0;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-brush-get-spikes",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_STRING, name,
|
||||
GIMP_PDB_END);
|
||||
|
||||
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
||||
spikes = return_vals[1].data.d_int32;
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return spikes;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_set_spikes:
|
||||
* @name: The brush name.
|
||||
|
@ -739,6 +639,40 @@ gimp_brush_set_spikes (const gchar *name,
|
|||
return spikes_out;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_get_hardness:
|
||||
* @name: The brush name.
|
||||
*
|
||||
* Get the hardness of a generated brush.
|
||||
*
|
||||
* This procedure gets the hardness of a generated brush. The hardness
|
||||
* of a brush is the amount its intensity fades at the outside edge. If
|
||||
* called for any other type of brush, the function does not succeed.
|
||||
*
|
||||
* Returns: The hardness of the brush.
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
*/
|
||||
gdouble
|
||||
gimp_brush_get_hardness (const gchar *name)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gdouble hardness = 0.0;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-brush-get-hardness",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_STRING, name,
|
||||
GIMP_PDB_END);
|
||||
|
||||
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
||||
hardness = return_vals[1].data.d_float;
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return hardness;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_set_hardness:
|
||||
* @name: The brush name.
|
||||
|
@ -775,6 +709,39 @@ gimp_brush_set_hardness (const gchar *name,
|
|||
return hardness_out;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_get_aspect_ratio:
|
||||
* @name: The brush name.
|
||||
*
|
||||
* Get the aspect ratio of a generated brush.
|
||||
*
|
||||
* This procedure gets the aspect ratio of a generated brush. If called
|
||||
* for any other type of brush, it does not succeed.
|
||||
*
|
||||
* Returns: The aspect ratio of the brush.
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
*/
|
||||
gdouble
|
||||
gimp_brush_get_aspect_ratio (const gchar *name)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gdouble aspect_ratio = 0.0;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-brush-get-aspect-ratio",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_STRING, name,
|
||||
GIMP_PDB_END);
|
||||
|
||||
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
||||
aspect_ratio = return_vals[1].data.d_float;
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return aspect_ratio;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_set_aspect_ratio:
|
||||
* @name: The brush name.
|
||||
|
@ -811,6 +778,39 @@ gimp_brush_set_aspect_ratio (const gchar *name,
|
|||
return aspect_ratio_out;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_get_angle:
|
||||
* @name: The brush name.
|
||||
*
|
||||
* Get the rotation angle of a generated brush.
|
||||
*
|
||||
* This procedure gets the angle of rotation for a generated brush. If
|
||||
* called for any other type of brush, it does not succeed.
|
||||
*
|
||||
* Returns: The rotation angle of the brush.
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
*/
|
||||
gdouble
|
||||
gimp_brush_get_angle (const gchar *name)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gdouble angle = 0.0;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-brush-get-angle",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_STRING, name,
|
||||
GIMP_PDB_END);
|
||||
|
||||
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
||||
angle = return_vals[1].data.d_float;
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return angle;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_brush_set_angle:
|
||||
* @name: The brush name.
|
||||
|
|
|
@ -55,21 +55,21 @@ gboolean gimp_brush_get_spacing (const gchar *n
|
|||
gboolean gimp_brush_set_spacing (const gchar *name,
|
||||
gint spacing);
|
||||
GimpBrushGeneratedShape gimp_brush_get_shape (const gchar *name);
|
||||
gdouble gimp_brush_get_radius (const gchar *name);
|
||||
gint gimp_brush_get_spikes (const gchar *name);
|
||||
gdouble gimp_brush_get_hardness (const gchar *name);
|
||||
gdouble gimp_brush_get_aspect_ratio (const gchar *name);
|
||||
gdouble gimp_brush_get_angle (const gchar *name);
|
||||
GimpBrushGeneratedShape gimp_brush_set_shape (const gchar *name,
|
||||
GimpBrushGeneratedShape shape_in);
|
||||
gdouble gimp_brush_get_radius (const gchar *name);
|
||||
gdouble gimp_brush_set_radius (const gchar *name,
|
||||
gdouble radius_in);
|
||||
gint gimp_brush_get_spikes (const gchar *name);
|
||||
gint gimp_brush_set_spikes (const gchar *name,
|
||||
gint spikes_in);
|
||||
gdouble gimp_brush_get_hardness (const gchar *name);
|
||||
gdouble gimp_brush_set_hardness (const gchar *name,
|
||||
gdouble hardness_in);
|
||||
gdouble gimp_brush_get_aspect_ratio (const gchar *name);
|
||||
gdouble gimp_brush_set_aspect_ratio (const gchar *name,
|
||||
gdouble aspect_ratio_in);
|
||||
gdouble gimp_brush_get_angle (const gchar *name);
|
||||
gdouble gimp_brush_set_angle (const gchar *name,
|
||||
gdouble angle_in);
|
||||
|
||||
|
|
|
@ -88,6 +88,51 @@ gimp_context_pop (void)
|
|||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_context_list_paint_methods:
|
||||
* @num_paint_methods: The number of the available paint methods.
|
||||
* @paint_methods: The names of the available paint methods.
|
||||
*
|
||||
* Lists the available paint methods.
|
||||
*
|
||||
* This procedure lists the names of the available paint methods. Any
|
||||
* of the results can be used for gimp_context_set_paint_method().
|
||||
*
|
||||
* Returns: TRUE on success.
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
*/
|
||||
gboolean
|
||||
gimp_context_list_paint_methods (gint *num_paint_methods,
|
||||
gchar ***paint_methods)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gboolean success = TRUE;
|
||||
gint i;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-context-list-paint-methods",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_END);
|
||||
|
||||
*num_paint_methods = 0;
|
||||
*paint_methods = NULL;
|
||||
|
||||
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
|
||||
|
||||
if (success)
|
||||
{
|
||||
*num_paint_methods = return_vals[1].data.d_int32;
|
||||
*paint_methods = g_new (gchar *, *num_paint_methods);
|
||||
for (i = 0; i < *num_paint_methods; i++)
|
||||
(*paint_methods)[i] = g_strdup (return_vals[2].data.d_stringarray[i]);
|
||||
}
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_context_get_paint_method:
|
||||
*
|
||||
|
@ -155,51 +200,6 @@ gimp_context_set_paint_method (const gchar *name)
|
|||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_context_list_paint_methods:
|
||||
* @num_paint_methods: The number of the available paint methods.
|
||||
* @paint_methods: The names of the available paint methods.
|
||||
*
|
||||
* Lists the available paint methods.
|
||||
*
|
||||
* This procedure lists the names of the available paint methods. Any
|
||||
* of the results can be used for gimp_context_set_paint_method().
|
||||
*
|
||||
* Returns: TRUE on success.
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
*/
|
||||
gboolean
|
||||
gimp_context_list_paint_methods (gint *num_paint_methods,
|
||||
gchar ***paint_methods)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gboolean success = TRUE;
|
||||
gint i;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-context-list-paint-methods",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_END);
|
||||
|
||||
*num_paint_methods = 0;
|
||||
*paint_methods = NULL;
|
||||
|
||||
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
|
||||
|
||||
if (success)
|
||||
{
|
||||
*num_paint_methods = return_vals[1].data.d_int32;
|
||||
*paint_methods = g_new (gchar *, *num_paint_methods);
|
||||
for (i = 0; i < *num_paint_methods; i++)
|
||||
(*paint_methods)[i] = g_strdup (return_vals[2].data.d_stringarray[i]);
|
||||
}
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_context_get_foreground:
|
||||
* @foreground: The foreground color.
|
||||
|
|
|
@ -31,10 +31,10 @@ G_BEGIN_DECLS
|
|||
|
||||
gboolean gimp_context_push (void);
|
||||
gboolean gimp_context_pop (void);
|
||||
gchar* gimp_context_get_paint_method (void);
|
||||
gboolean gimp_context_set_paint_method (const gchar *name);
|
||||
gboolean gimp_context_list_paint_methods (gint *num_paint_methods,
|
||||
gchar ***paint_methods);
|
||||
gchar* gimp_context_get_paint_method (void);
|
||||
gboolean gimp_context_set_paint_method (const gchar *name);
|
||||
gboolean gimp_context_get_foreground (GimpRGB *foreground);
|
||||
gboolean gimp_context_set_foreground (const GimpRGB *foreground);
|
||||
gboolean gimp_context_get_background (GimpRGB *background);
|
||||
|
|
Loading…
Reference in New Issue