Commit cdffff70 authored by Michael Natterer's avatar Michael Natterer 😴

app: add gimp_filter_get,set_applicator()

The filter does absolutely nothing with the applicator, this API is
just for associating an applicator with a filter so it can be found by
other parts of the code.
parent 72a32dd7
......@@ -39,8 +39,10 @@ typedef struct _GimpFilterPrivate GimpFilterPrivate;
struct _GimpFilterPrivate
{
GeglNode *node;
gboolean is_last_node;
GeglNode *node;
gboolean is_last_node;
GimpApplicator *applicator;
};
#define GET_PRIVATE(filter) G_TYPE_INSTANCE_GET_PRIVATE (filter, \
......@@ -237,3 +239,24 @@ gimp_filter_get_is_last_node (GimpFilter *filter)
return GET_PRIVATE (filter)->is_last_node;
}
void
gimp_filter_set_applicator (GimpFilter *filter,
GimpApplicator *applicator)
{
GimpFilterPrivate *private;
g_return_if_fail (GIMP_IS_FILTER (filter));
private = GET_PRIVATE (filter);
private->applicator = applicator;
}
GimpApplicator *
gimp_filter_get_applicator (GimpFilter *filter)
{
g_return_val_if_fail (GIMP_IS_FILTER (filter), NULL);
return GET_PRIVATE (filter)->applicator;
}
......@@ -47,15 +47,19 @@ struct _GimpFilterClass
};
GType gimp_filter_get_type (void) G_GNUC_CONST;
GimpFilter * gimp_filter_new (const gchar *name);
GType gimp_filter_get_type (void) G_GNUC_CONST;
GimpFilter * gimp_filter_new (const gchar *name);
GeglNode * gimp_filter_get_node (GimpFilter *filter);
GeglNode * gimp_filter_peek_node (GimpFilter *filter);
GeglNode * gimp_filter_get_node (GimpFilter *filter);
GeglNode * gimp_filter_peek_node (GimpFilter *filter);
void gimp_filter_set_is_last_node (GimpFilter *filter,
gboolean is_last_node);
gboolean gimp_filter_get_is_last_node (GimpFilter *filter);
void gimp_filter_set_is_last_node (GimpFilter *filter,
gboolean is_last_node);
gboolean gimp_filter_get_is_last_node (GimpFilter *filter);
void gimp_filter_set_applicator (GimpFilter *filter,
GimpApplicator *applicator);
GimpApplicator * gimp_filter_get_applicator (GimpFilter *filter);
#endif /* __GIMP_FILTER_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment