2000-06-01 05:16:11 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
2003-07-03 08:47:26 +08:00
|
|
|
* Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
|
2000-06-01 05:16:11 +08:00
|
|
|
*
|
|
|
|
* gimpbrushselect_pdb.c
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This library is free software: you can redistribute it and/or
|
2000-06-01 05:16:11 +08:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2009-01-18 06:28:01 +08:00
|
|
|
* version 3 of the License, or (at your option) any later version.
|
2000-06-01 05:16:11 +08:00
|
|
|
*
|
|
|
|
* 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
|
2009-01-18 06:28:01 +08:00
|
|
|
* License along with this library. If not, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
2000-06-01 05:16:11 +08:00
|
|
|
*/
|
|
|
|
|
2007-01-09 18:52:47 +08:00
|
|
|
/* NOTE: This file is auto-generated by pdbgen.pl */
|
2000-06-01 05:16:11 +08:00
|
|
|
|
2002-05-14 07:30:23 +08:00
|
|
|
#include "config.h"
|
|
|
|
|
2000-06-01 05:16:11 +08:00
|
|
|
#include "gimp.h"
|
|
|
|
|
2010-07-07 17:43:10 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* SECTION: gimpbrushselect
|
|
|
|
* @title: gimpbrushselect
|
|
|
|
* @short_description: Functions providing a brush selection dialog.
|
|
|
|
*
|
|
|
|
* Functions providing a brush selection dialog.
|
|
|
|
**/
|
|
|
|
|
|
|
|
|
2000-08-25 07:06:53 +08:00
|
|
|
/**
|
|
|
|
* gimp_brushes_popup:
|
|
|
|
* @brush_callback: The callback PDB proc to call when brush selection is made.
|
2007-01-09 18:52:47 +08:00
|
|
|
* @popup_title: Title of the brush selection dialog.
|
2000-08-25 07:06:53 +08:00
|
|
|
* @initial_brush: The name of the brush to set as the first selected.
|
|
|
|
* @opacity: The initial opacity of the brush.
|
|
|
|
* @spacing: The initial spacing of the brush (if < 0 then use brush default spacing).
|
|
|
|
* @paint_mode: The initial paint mode.
|
|
|
|
*
|
|
|
|
* Invokes the Gimp brush selection.
|
|
|
|
*
|
2007-01-09 18:52:47 +08:00
|
|
|
* This procedure opens the brush selection dialog.
|
2000-08-25 07:06:53 +08:00
|
|
|
*
|
|
|
|
* Returns: TRUE on success.
|
2010-09-16 04:07:36 +08:00
|
|
|
**/
|
2000-08-23 09:44:59 +08:00
|
|
|
gboolean
|
2017-01-09 06:00:19 +08:00
|
|
|
gimp_brushes_popup (const gchar *brush_callback,
|
|
|
|
const gchar *popup_title,
|
|
|
|
const gchar *initial_brush,
|
|
|
|
gdouble opacity,
|
|
|
|
gint spacing,
|
|
|
|
GimpLayerMode paint_mode)
|
2000-06-01 05:16:11 +08:00
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-06-01 05:16:11 +08:00
|
|
|
gint nreturn_vals;
|
2000-08-23 09:44:59 +08:00
|
|
|
gboolean success = TRUE;
|
2000-06-01 05:16:11 +08:00
|
|
|
|
2005-08-03 06:52:23 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp-brushes-popup",
|
2006-04-12 18:27:31 +08:00
|
|
|
&nreturn_vals,
|
|
|
|
GIMP_PDB_STRING, brush_callback,
|
|
|
|
GIMP_PDB_STRING, popup_title,
|
|
|
|
GIMP_PDB_STRING, initial_brush,
|
|
|
|
GIMP_PDB_FLOAT, opacity,
|
|
|
|
GIMP_PDB_INT32, spacing,
|
|
|
|
GIMP_PDB_INT32, paint_mode,
|
|
|
|
GIMP_PDB_END);
|
2000-06-01 05:16:11 +08:00
|
|
|
|
2000-08-23 09:44:59 +08:00
|
|
|
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
|
|
|
|
|
2000-06-01 05:16:11 +08:00
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
2000-08-23 09:44:59 +08:00
|
|
|
|
|
|
|
return success;
|
2000-06-01 05:16:11 +08:00
|
|
|
}
|
|
|
|
|
2000-08-25 07:06:53 +08:00
|
|
|
/**
|
|
|
|
* gimp_brushes_close_popup:
|
2007-01-09 18:52:47 +08:00
|
|
|
* @brush_callback: The name of the callback registered for this pop-up.
|
2000-08-25 07:06:53 +08:00
|
|
|
*
|
2007-01-09 18:52:47 +08:00
|
|
|
* Close the brush selection dialog.
|
2000-08-25 07:06:53 +08:00
|
|
|
*
|
|
|
|
* This procedure closes an opened brush selection dialog.
|
|
|
|
*
|
|
|
|
* Returns: TRUE on success.
|
2010-09-16 04:07:36 +08:00
|
|
|
**/
|
2000-08-23 09:44:59 +08:00
|
|
|
gboolean
|
2003-07-02 09:20:08 +08:00
|
|
|
gimp_brushes_close_popup (const gchar *brush_callback)
|
2000-06-01 05:16:11 +08:00
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-06-01 05:16:11 +08:00
|
|
|
gint nreturn_vals;
|
2000-08-23 09:44:59 +08:00
|
|
|
gboolean success = TRUE;
|
2000-06-01 05:16:11 +08:00
|
|
|
|
2005-08-03 06:52:23 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp-brushes-close-popup",
|
2006-04-12 18:27:31 +08:00
|
|
|
&nreturn_vals,
|
|
|
|
GIMP_PDB_STRING, brush_callback,
|
|
|
|
GIMP_PDB_END);
|
2000-06-01 05:16:11 +08:00
|
|
|
|
2000-08-23 09:44:59 +08:00
|
|
|
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
|
|
|
|
|
2000-06-01 05:16:11 +08:00
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
2000-08-23 09:44:59 +08:00
|
|
|
|
|
|
|
return success;
|
2000-06-01 05:16:11 +08:00
|
|
|
}
|
|
|
|
|
2000-08-25 07:06:53 +08:00
|
|
|
/**
|
|
|
|
* gimp_brushes_set_popup:
|
2007-01-09 18:52:47 +08:00
|
|
|
* @brush_callback: The name of the callback registered for this pop-up.
|
2000-08-25 07:06:53 +08:00
|
|
|
* @brush_name: The name of the brush to set as selected.
|
|
|
|
* @opacity: The initial opacity of the brush.
|
|
|
|
* @spacing: The initial spacing of the brush (if < 0 then use brush default spacing).
|
|
|
|
* @paint_mode: The initial paint mode.
|
|
|
|
*
|
2007-01-09 18:52:47 +08:00
|
|
|
* Sets the current brush in a brush selection dialog.
|
2000-08-25 07:06:53 +08:00
|
|
|
*
|
2007-01-09 18:52:47 +08:00
|
|
|
* Sets the current brush in a brush selection dialog.
|
2000-08-25 07:06:53 +08:00
|
|
|
*
|
|
|
|
* Returns: TRUE on success.
|
2010-09-16 04:07:36 +08:00
|
|
|
**/
|
2000-08-23 09:44:59 +08:00
|
|
|
gboolean
|
2017-01-09 06:00:19 +08:00
|
|
|
gimp_brushes_set_popup (const gchar *brush_callback,
|
|
|
|
const gchar *brush_name,
|
|
|
|
gdouble opacity,
|
|
|
|
gint spacing,
|
|
|
|
GimpLayerMode paint_mode)
|
2000-06-01 05:16:11 +08:00
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-06-01 05:16:11 +08:00
|
|
|
gint nreturn_vals;
|
2000-08-23 09:44:59 +08:00
|
|
|
gboolean success = TRUE;
|
2000-06-01 05:16:11 +08:00
|
|
|
|
2005-08-03 06:52:23 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp-brushes-set-popup",
|
2006-04-12 18:27:31 +08:00
|
|
|
&nreturn_vals,
|
|
|
|
GIMP_PDB_STRING, brush_callback,
|
|
|
|
GIMP_PDB_STRING, brush_name,
|
|
|
|
GIMP_PDB_FLOAT, opacity,
|
|
|
|
GIMP_PDB_INT32, spacing,
|
|
|
|
GIMP_PDB_INT32, paint_mode,
|
|
|
|
GIMP_PDB_END);
|
2000-06-01 05:16:11 +08:00
|
|
|
|
2000-08-23 09:44:59 +08:00
|
|
|
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
|
|
|
|
|
2000-06-01 05:16:11 +08:00
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
2000-08-23 09:44:59 +08:00
|
|
|
|
|
|
|
return success;
|
2000-06-01 05:16:11 +08:00
|
|
|
}
|