gimppatternselect_pdb.c 3.27 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
/* LIBGIMP - The GIMP Library
 * Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
 *
 * 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 */

#include "gimp.h"

26 27 28 29 30 31 32 33 34 35 36 37
/**
 * 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.
 */
38
gboolean
39 40 41 42
gimp_patterns_popup (gchar *pattern_callback,
		     gchar *popup_title,
		     gchar *initial_pattern)
{
43
  GimpParam *return_vals;
44
  gint nreturn_vals;
45
  gboolean success = TRUE;
46 47 48

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

54 55
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

56
  gimp_destroy_params (return_vals, nreturn_vals);
57 58

  return success;
59 60
}

61 62 63 64 65 66 67 68 69 70
/**
 * 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.
 */
71
gboolean
72 73
gimp_patterns_close_popup (gchar *pattern_callback)
{
74
  GimpParam *return_vals;
75
  gint nreturn_vals;
76
  gboolean success = TRUE;
77 78 79

  return_vals = gimp_run_procedure ("gimp_patterns_close_popup",
				    &nreturn_vals,
80 81
				    GIMP_PDB_STRING, pattern_callback,
				    GIMP_PDB_END);
82

83 84
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

85
  gimp_destroy_params (return_vals, nreturn_vals);
86 87

  return success;
88 89
}

90 91 92 93 94 95 96 97 98 99 100
/**
 * 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.
 */
101
gboolean
102 103 104
gimp_patterns_set_popup (gchar *pattern_callback,
			 gchar *pattern_name)
{
105
  GimpParam *return_vals;
106
  gint nreturn_vals;
107
  gboolean success = TRUE;
108 109 110

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

115 116
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;

117
  gimp_destroy_params (return_vals, nreturn_vals);
118 119

  return success;
120
}