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