2011-11-01 05:22:19 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
|
|
|
* Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
|
|
|
|
*
|
|
|
|
* gimpdynamics_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 3 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, see
|
2018-07-12 05:27:07 +08:00
|
|
|
* <https://www.gnu.org/licenses/>.
|
2011-11-01 05:22:19 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* NOTE: This file is auto-generated by pdbgen.pl */
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
2022-03-28 21:13:17 +08:00
|
|
|
#include "stamp-pdbgen.h"
|
|
|
|
|
2011-11-01 05:22:19 +08:00
|
|
|
#include "gimp.h"
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-31 16:04:43 +08:00
|
|
|
* SECTION: gimpdynamics
|
2011-11-01 05:22:19 +08:00
|
|
|
* @title: gimpdynamics
|
2011-11-04 05:47:12 +08:00
|
|
|
* @short_description: Operations related to paint dynamics.
|
2011-11-01 05:22:19 +08:00
|
|
|
*
|
2011-11-04 05:47:12 +08:00
|
|
|
* Operations related to paint dynamics.
|
2011-11-01 05:22:19 +08:00
|
|
|
**/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gimp_dynamics_refresh:
|
|
|
|
*
|
|
|
|
* Refresh current paint dynamics. This function always succeeds.
|
|
|
|
*
|
|
|
|
* This procedure retrieves all paint dynamics currently in the user's
|
|
|
|
* paint dynamics path and updates the paint dynamics dialogs
|
|
|
|
* accordingly.
|
|
|
|
*
|
|
|
|
* Returns: TRUE on success.
|
|
|
|
*
|
2015-06-01 03:18:09 +08:00
|
|
|
* Since: 2.8
|
2011-11-01 05:22:19 +08:00
|
|
|
**/
|
|
|
|
gboolean
|
|
|
|
gimp_dynamics_refresh (void)
|
|
|
|
{
|
2019-07-30 16:51:16 +08:00
|
|
|
GimpValueArray *args;
|
|
|
|
GimpValueArray *return_vals;
|
2011-11-01 05:22:19 +08:00
|
|
|
gboolean success = TRUE;
|
|
|
|
|
2019-08-08 19:01:50 +08:00
|
|
|
args = gimp_value_array_new_from_types (NULL,
|
|
|
|
G_TYPE_NONE);
|
2011-11-01 05:22:19 +08:00
|
|
|
|
2023-10-17 04:07:55 +08:00
|
|
|
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
|
|
|
"gimp-dynamics-refresh",
|
|
|
|
args);
|
2019-07-30 16:51:16 +08:00
|
|
|
gimp_value_array_unref (args);
|
2011-11-01 05:22:19 +08:00
|
|
|
|
2019-09-04 07:49:35 +08:00
|
|
|
success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
|
2019-07-30 16:51:16 +08:00
|
|
|
|
|
|
|
gimp_value_array_unref (return_vals);
|
2011-11-01 05:22:19 +08:00
|
|
|
|
|
|
|
return success;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gimp_dynamics_get_list:
|
|
|
|
* @filter: An optional regular expression used to filter the list.
|
|
|
|
*
|
|
|
|
* Retrieve the list of loaded paint dynamics.
|
|
|
|
*
|
|
|
|
* This procedure returns a list of the paint dynamics that are
|
|
|
|
* currently available.
|
|
|
|
*
|
2021-12-02 05:35:25 +08:00
|
|
|
* Returns: (array zero-terminated=1) (transfer full):
|
2019-08-05 04:09:04 +08:00
|
|
|
* The list of paint dynamics names.
|
|
|
|
* The returned value must be freed with g_strfreev().
|
2011-11-01 05:22:19 +08:00
|
|
|
*
|
2015-06-01 03:18:09 +08:00
|
|
|
* Since: 2.8
|
2011-11-01 05:22:19 +08:00
|
|
|
**/
|
|
|
|
gchar **
|
2021-12-02 05:35:25 +08:00
|
|
|
gimp_dynamics_get_list (const gchar *filter)
|
2011-11-01 05:22:19 +08:00
|
|
|
{
|
2019-07-30 16:51:16 +08:00
|
|
|
GimpValueArray *args;
|
|
|
|
GimpValueArray *return_vals;
|
2011-11-01 05:22:19 +08:00
|
|
|
gchar **dynamics_list = NULL;
|
|
|
|
|
2019-08-08 19:01:50 +08:00
|
|
|
args = gimp_value_array_new_from_types (NULL,
|
|
|
|
G_TYPE_STRING, filter,
|
2019-07-30 16:51:16 +08:00
|
|
|
G_TYPE_NONE);
|
|
|
|
|
2023-10-17 04:07:55 +08:00
|
|
|
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
|
|
|
"gimp-dynamics-get-list",
|
|
|
|
args);
|
2019-07-30 16:51:16 +08:00
|
|
|
gimp_value_array_unref (args);
|
2011-11-01 05:22:19 +08:00
|
|
|
|
2019-09-04 07:49:35 +08:00
|
|
|
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
|
2021-12-02 05:35:25 +08:00
|
|
|
dynamics_list = GIMP_VALUES_DUP_STRV (return_vals, 1);
|
2011-11-01 05:22:19 +08:00
|
|
|
|
2019-07-30 16:51:16 +08:00
|
|
|
gimp_value_array_unref (return_vals);
|
2011-11-01 05:22:19 +08:00
|
|
|
|
|
|
|
return dynamics_list;
|
|
|
|
}
|