app: add gimp_filter_stack_new(filter_type)

This commit is contained in:
Michael Natterer 2013-04-11 19:04:51 +02:00
parent a203a270df
commit 7c96952bd4
2 changed files with 15 additions and 2 deletions

View File

@ -150,6 +150,18 @@ gimp_filter_stack_reorder (GimpContainer *container,
/* public functions */
GimpContainer *
gimp_filter_stack_new (GType filter_type)
{
g_return_val_if_fail (g_type_is_a (filter_type, GIMP_TYPE_FILTER), NULL);
return g_object_new (GIMP_TYPE_FILTER_STACK,
"name", g_type_name (filter_type),
"children-type", filter_type,
"policy", GIMP_CONTAINER_POLICY_STRONG,
NULL);
}
GeglNode *
gimp_filter_stack_get_graph (GimpFilterStack *stack)
{

View File

@ -46,9 +46,10 @@ struct _GimpFilterStackClass
};
GType gimp_filter_stack_get_type (void) G_GNUC_CONST;
GType gimp_filter_stack_get_type (void) G_GNUC_CONST;
GimpContainer * gimp_filter_stack_new (GType filter_type);
GeglNode * gimp_filter_stack_get_graph (GimpFilterStack *stack);
GeglNode * gimp_filter_stack_get_graph (GimpFilterStack *stack);
#endif /* __GIMP_FILTER_STACK_H__ */