gimppatternselect_pdb.c 3.33 KB
Newer Older
1
/* LIBGIMP - The GIMP Library
2
 * Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
 *
 * gimppatternselect_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 2 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, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

/* NOTE: This file is autogenerated by pdbgen.pl */

Sven Neumann's avatar
Sven Neumann committed
24 25
#include "config.h"

26 27
#include "gimp.h"

28 29 30 31 32 33 34 35 36 37 38 39
/**
 * gimp_patterns_popup:
 * @pattern_callback: The callback PDB proc to call when pattern selection is made.
 * @popup_title: Title to give the pattern popup window.
 * @initial_pattern: The name of the pattern to set as the first selected.
 *
 * Invokes the Gimp pattern selection.
 *
 * This procedure popups the pattern selection dialog.
 *
 * Returns: TRUE on success.
 */
40
gboolean
41 42 43
gimp_patterns_popup (const gchar *pattern_callback,
		     const gchar *popup_title,
		     const gchar *initial_pattern)
44
{
45
  GimpParam *return_vals;
46
  gint nreturn_vals;
47
  gboolean success = TRUE;
48 49 50

  return_vals = gimp_run_procedure ("gimp_patterns_popup",
				    &nreturn_vals,
51 52 53 54
				    GIMP_PDB_STRING, pattern_callback,
				    GIMP_PDB_STRING, popup_title,
				    GIMP_PDB_STRING, initial_pattern,
				    GIMP_PDB_END);
55

56 57
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

58
  gimp_destroy_params (return_vals, nreturn_vals);
59 60

  return success;
61 62
}

63 64 65 66 67 68 69 70 71 72
/**
 * gimp_patterns_close_popup:
 * @pattern_callback: The name of the callback registered for this popup.
 *
 * Popdown the Gimp pattern selection.
 *
 * This procedure closes an opened pattern selection dialog.
 *
 * Returns: TRUE on success.
 */
73
gboolean
74
gimp_patterns_close_popup (const gchar *pattern_callback)
75
{
76
  GimpParam *return_vals;
77
  gint nreturn_vals;
78
  gboolean success = TRUE;
79 80 81

  return_vals = gimp_run_procedure ("gimp_patterns_close_popup",
				    &nreturn_vals,
82 83
				    GIMP_PDB_STRING, pattern_callback,
				    GIMP_PDB_END);
84

85 86
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

87
  gimp_destroy_params (return_vals, nreturn_vals);
88 89

  return success;
90 91
}

92 93 94 95 96 97 98 99 100 101 102
/**
 * gimp_patterns_set_popup:
 * @pattern_callback: The name of the callback registered for this popup.
 * @pattern_name: The name of the pattern to set as selected.
 *
 * Sets the current pattern selection in a popup.
 *
 * Sets the current pattern selection in a popup.
 *
 * Returns: TRUE on success.
 */
103
gboolean
104 105
gimp_patterns_set_popup (const gchar *pattern_callback,
			 const gchar *pattern_name)
106
{
107
  GimpParam *return_vals;
108
  gint nreturn_vals;
109
  gboolean success = TRUE;
110 111 112

  return_vals = gimp_run_procedure ("gimp_patterns_set_popup",
				    &nreturn_vals,
113 114 115
				    GIMP_PDB_STRING, pattern_callback,
				    GIMP_PDB_STRING, pattern_name,
				    GIMP_PDB_END);
116

117 118
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

119
  gimp_destroy_params (return_vals, nreturn_vals);
120 121

  return success;
122
}