~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to libgimp/gimpcontext_pdb.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-10-06 13:30:41 UTC
  • mto: This revision was merged to the branch mainline in revision 35.
  • Revision ID: james.westby@ubuntu.com-20081006133041-3panbkcanaymfsmp
Tags: upstream-2.6.0
ImportĀ upstreamĀ versionĀ 2.6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
}
90
90
 
91
91
/**
 
92
 * gimp_context_list_paint_methods:
 
93
 * @num_paint_methods: The number of the available paint methods.
 
94
 * @paint_methods: The names of the available paint methods.
 
95
 *
 
96
 * Lists the available paint methods.
 
97
 *
 
98
 * This procedure lists the names of the available paint methods. Any
 
99
 * of the results can be used for gimp_context_set_paint_method().
 
100
 *
 
101
 * Returns: TRUE on success.
 
102
 *
 
103
 * Since: GIMP 2.4
 
104
 */
 
105
gboolean
 
106
gimp_context_list_paint_methods (gint    *num_paint_methods,
 
107
                                 gchar ***paint_methods)
 
108
{
 
109
  GimpParam *return_vals;
 
110
  gint nreturn_vals;
 
111
  gboolean success = TRUE;
 
112
  gint i;
 
113
 
 
114
  return_vals = gimp_run_procedure ("gimp-context-list-paint-methods",
 
115
                                    &nreturn_vals,
 
116
                                    GIMP_PDB_END);
 
117
 
 
118
  *num_paint_methods = 0;
 
119
  *paint_methods = NULL;
 
120
 
 
121
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
 
122
 
 
123
  if (success)
 
124
    {
 
125
      *num_paint_methods = return_vals[1].data.d_int32;
 
126
      *paint_methods = g_new (gchar *, *num_paint_methods);
 
127
      for (i = 0; i < *num_paint_methods; i++)
 
128
        (*paint_methods)[i] = g_strdup (return_vals[2].data.d_stringarray[i]);
 
129
    }
 
130
 
 
131
  gimp_destroy_params (return_vals, nreturn_vals);
 
132
 
 
133
  return success;
 
134
}
 
135
 
 
136
/**
92
137
 * gimp_context_get_paint_method:
93
138
 *
94
139
 * Retrieve the currently active paint method.
156
201
}
157
202
 
158
203
/**
159
 
 * gimp_context_list_paint_methods:
160
 
 * @num_paint_methods: The number of the available paint methods.
161
 
 * @paint_methods: The names of the available paint methods.
162
 
 *
163
 
 * Lists the available paint methods.
164
 
 *
165
 
 * This procedure lists the names of the available paint methods. Any
166
 
 * of the results can be used for gimp_context_set_paint_method().
167
 
 *
168
 
 * Returns: TRUE on success.
169
 
 *
170
 
 * Since: GIMP 2.4
171
 
 */
172
 
gboolean
173
 
gimp_context_list_paint_methods (gint    *num_paint_methods,
174
 
                                 gchar ***paint_methods)
175
 
{
176
 
  GimpParam *return_vals;
177
 
  gint nreturn_vals;
178
 
  gboolean success = TRUE;
179
 
  gint i;
180
 
 
181
 
  return_vals = gimp_run_procedure ("gimp-context-list-paint-methods",
182
 
                                    &nreturn_vals,
183
 
                                    GIMP_PDB_END);
184
 
 
185
 
  *num_paint_methods = 0;
186
 
  *paint_methods = NULL;
187
 
 
188
 
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
189
 
 
190
 
  if (success)
191
 
    {
192
 
      *num_paint_methods = return_vals[1].data.d_int32;
193
 
      *paint_methods = g_new (gchar *, *num_paint_methods);
194
 
      for (i = 0; i < *num_paint_methods; i++)
195
 
        (*paint_methods)[i] = g_strdup (return_vals[2].data.d_stringarray[i]);
196
 
    }
197
 
 
198
 
  gimp_destroy_params (return_vals, nreturn_vals);
199
 
 
200
 
  return success;
201
 
}
202
 
 
203
 
/**
204
204
 * gimp_context_get_foreground:
205
205
 * @foreground: The foreground color.
206
206
 *