mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
app, libgimp, pdb: passing GimpDrawableFilter across the wire.
A few functions were added, but the main one is gimp_drawable_get_filters() to request the list of filters applied non-destructively on a drawable. We can't do much with these for the time being, but this will come. WIP.
This commit is contained in:
parent
1d7d3ab621
commit
08362d1e7b
31 changed files with 925 additions and 1 deletions
|
@ -676,6 +676,46 @@ gimp_drawable_mask_intersect (GimpDrawable *drawable,
|
|||
return non_empty;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_drawable_get_filters:
|
||||
* @drawable: The drawable.
|
||||
*
|
||||
* Returns the list of filters applied to the drawable.
|
||||
*
|
||||
* This procedure returns the list of filters which are currently
|
||||
* applied non-destructively to @drawable. The order of filters is from
|
||||
* topmost to bottommost.
|
||||
*
|
||||
* Returns: (element-type GimpDrawableFilter) (array zero-terminated=1) (transfer container):
|
||||
* The list of filters on the drawable.
|
||||
* The returned value must be freed with g_free().
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
GimpDrawableFilter **
|
||||
gimp_drawable_get_filters (GimpDrawable *drawable)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
GimpDrawableFilter **filters = NULL;
|
||||
|
||||
args = gimp_value_array_new_from_types (NULL,
|
||||
GIMP_TYPE_DRAWABLE, drawable,
|
||||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-drawable-get-filters",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
|
||||
filters = g_value_dup_boxed (gimp_value_array_index (return_vals, 1));
|
||||
|
||||
gimp_value_array_unref (return_vals);
|
||||
|
||||
return filters;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_drawable_merge_filters:
|
||||
* @drawable: The drawable.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue