gimpparasiteio.h 2.23 KB
Newer Older
1
/* LIBGIMP - The GIMP Library
2 3
 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
 *
4
 * gimpparasiteio.h
5 6
 * Copyright (C) 1999 Tor Lillqvist <tml@iki.fi>
 *
7
 * This library is free software: you can redistribute it and/or
Marc Lehmann's avatar
Marc Lehmann committed
8
 * modify it under the terms of the GNU Lesser General Public
9
 * License as published by the Free Software Foundation; either
10
 * version 3 of the License, or (at your option) any later version.
11 12 13 14
 *
 * 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
15
 * Lesser General Public License for more details.
16
 *
Marc Lehmann's avatar
Marc Lehmann committed
17
 * You should have received a copy of the GNU Lesser General Public
18
 * License along with this library.  If not, see
19
 * <https://www.gnu.org/licenses/>.
20
 */
21

22 23
#ifndef __GIMP_PARASITE_IO_H__
#define __GIMP_PARASITE_IO_H__
24

25
G_BEGIN_DECLS
26

27 28 29
/* For information look into the C source or the html documentation */


30 31 32
/*  Data structures for various standard parasites used by plug-ins and
 *  the GIMP core, and functions to build and parse their string
 *  representations.
33 34 35
 */

/*
36
 *  Pixmap brush pipes.
37 38
 */

39
#define GIMP_PIXPIPE_MAXDIM 4
40

41 42 43
typedef struct _GimpPixPipeParams GimpPixPipeParams;

struct _GimpPixPipeParams
44 45 46 47 48 49 50 51 52 53 54 55
{
  gint      step;
  gint      ncells;
  gint      dim;
  gint      cols;
  gint      rows;
  gint      cellwidth;
  gint      cellheight;
  gchar    *placement;
  gboolean  free_placement_string;
  gint      rank[GIMP_PIXPIPE_MAXDIM];
  gchar    *selection[GIMP_PIXPIPE_MAXDIM];
56
  /* this flag is now useless. All selection strings are allocated. */
57
  gboolean  free_selection_string;
58
};
59

60
/* Initialize with dummy values */
61
void    gimp_pixpipe_params_init  (GimpPixPipeParams *params);
62

63
/* Parse a string into a GimpPixPipeParams */
64
void    gimp_pixpipe_params_parse (const gchar       *parameters,
Sven Neumann's avatar
Sven Neumann committed
65
                                   GimpPixPipeParams *params);
66

67
/* Build a string representation of GimpPixPipeParams */
68
gchar * gimp_pixpipe_params_build (GimpPixPipeParams *params) G_GNUC_MALLOC;
69

luz.paz's avatar
luz.paz committed
70
/* Free the internal values. It does not free the struct itself. */
71
void    gimp_pixpipe_params_free  (GimpPixPipeParams *params);
72

73
G_END_DECLS
74

75
#endif /* __GIMP_PARASITE_IO_H__ */