2006-12-10 05:33:38 +08:00
|
|
|
# GIMP - The GNU Image Manipulation Program
|
1999-04-04 13:59:08 +08:00
|
|
|
# Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
|
2009-01-18 06:28:01 +08:00
|
|
|
# This program is free software: you can redistribute it and/or modify
|
1999-04-04 13:59:08 +08:00
|
|
|
# it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
1999-04-04 13:59:08 +08:00
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
# This program 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 General Public License for more details.
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2018-07-12 05:27:07 +08:00
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
1999-04-04 13:59:08 +08:00
|
|
|
|
|
|
|
# "Perlized" from C source by Manish Singh <yosh@gimp.org>
|
|
|
|
|
|
|
|
sub brushes_refresh {
|
2003-12-08 19:58:45 +08:00
|
|
|
$blurb = 'Refresh current brushes. This function always succeeds.';
|
1999-04-04 13:59:08 +08:00
|
|
|
|
|
|
|
$help = <<'HELP';
|
|
|
|
This procedure retrieves all brushes currently in the user's brush path
|
2004-09-23 23:05:48 +08:00
|
|
|
and updates the brush dialogs accordingly.
|
1999-04-04 13:59:08 +08:00
|
|
|
HELP
|
|
|
|
|
2006-03-15 05:35:50 +08:00
|
|
|
&seth_pdb_misc('1997');
|
1999-04-04 13:59:08 +08:00
|
|
|
|
|
|
|
%invoke = (
|
2006-03-22 17:58:08 +08:00
|
|
|
code => <<'CODE'
|
|
|
|
{
|
2010-04-11 19:12:41 +08:00
|
|
|
gimp_data_factory_data_refresh (gimp->brush_factory, context);
|
2006-03-22 17:58:08 +08:00
|
|
|
}
|
|
|
|
CODE
|
|
|
|
);
|
1999-04-04 13:59:08 +08:00
|
|
|
}
|
|
|
|
|
2002-03-13 23:29:59 +08:00
|
|
|
sub brushes_get_list {
|
|
|
|
$blurb = 'Retrieve a complete listing of the available brushes.';
|
|
|
|
|
|
|
|
$help = <<'HELP';
|
2004-09-23 23:05:48 +08:00
|
|
|
This procedure returns a complete listing of available GIMP
|
|
|
|
brushes. Each name returned can be used as input to the
|
2006-06-14 16:32:08 +08:00
|
|
|
gimp_context_set_brush() procedure.
|
2002-03-13 23:29:59 +08:00
|
|
|
HELP
|
|
|
|
|
|
|
|
&std_pdb_misc;
|
|
|
|
|
2003-09-05 01:04:36 +08:00
|
|
|
@inargs = (
|
2004-09-23 23:05:48 +08:00
|
|
|
{ name => 'filter', type => 'string', null_ok => 1,
|
2003-09-05 01:04:36 +08:00
|
|
|
desc => 'An optional regular expression used to filter the list' }
|
|
|
|
);
|
|
|
|
|
2002-03-13 23:29:59 +08:00
|
|
|
@outargs = (
|
2020-12-24 04:15:43 +08:00
|
|
|
{ name => 'brush_list', type => 'strv',
|
|
|
|
desc => 'The list of brush names' }
|
2002-03-13 23:29:59 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
%invoke = (
|
2003-09-05 01:04:36 +08:00
|
|
|
headers => [ qw("core/gimpcontainer-filter.h") ],
|
2006-03-22 17:58:08 +08:00
|
|
|
code => <<'CODE'
|
|
|
|
{
|
2008-12-20 05:58:17 +08:00
|
|
|
brush_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->brush_factory),
|
2020-12-24 04:15:43 +08:00
|
|
|
filter);
|
2006-03-22 17:58:08 +08:00
|
|
|
}
|
|
|
|
CODE
|
2002-03-13 23:29:59 +08:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2006-06-14 16:32:08 +08:00
|
|
|
@headers = qw(<string.h>
|
|
|
|
"core/gimp.h"
|
|
|
|
"core/gimpbrush.h"
|
|
|
|
"core/gimpcontext.h"
|
2007-12-11 17:54:41 +08:00
|
|
|
"core/gimpdatafactory.h"
|
2012-04-09 06:59:20 +08:00
|
|
|
"core/gimptempbuf.h"
|
2007-12-11 17:54:41 +08:00
|
|
|
"gimppdb-utils.h");
|
1999-04-04 13:59:08 +08:00
|
|
|
|
2008-02-08 01:08:54 +08:00
|
|
|
@procs = qw(brushes_refresh
|
2018-04-29 02:15:15 +08:00
|
|
|
brushes_get_list);
|
2006-03-24 05:17:16 +08:00
|
|
|
|
2002-03-13 23:29:59 +08:00
|
|
|
%exports = (app => [@procs], lib => [@procs]);
|
1999-04-04 13:59:08 +08:00
|
|
|
|
|
|
|
$desc = 'Brushes';
|
2010-07-07 17:43:10 +08:00
|
|
|
$doc_title = 'gimpbrushes';
|
|
|
|
$doc_short_desc = 'Functions for manipulating brushes.';
|
|
|
|
$doc_long_desc = 'Functions related to getting and setting brushes.';
|
1999-04-04 13:59:08 +08:00
|
|
|
|
|
|
|
1;
|