app: add gimp_gegl_node_is_source_operation()

... which determines if a node is a source operation.
This commit is contained in:
Ell
2019-03-27 14:31:14 -04:00
parent 8f845d3a51
commit ff13e55c16
2 changed files with 16 additions and 0 deletions

View File

@ -119,6 +119,21 @@ gimp_gegl_progress_connect (GeglNode *node,
(GDestroyNotify) g_free);
}
gboolean
gimp_gegl_node_is_source_operation (GeglNode *node)
{
GeglOperation *operation;
g_return_val_if_fail (GEGL_IS_NODE (node), FALSE);
operation = gegl_node_get_gegl_operation (node);
if (! operation)
return FALSE;
return GEGL_IS_OPERATION_SOURCE (operation);
}
gboolean
gimp_gegl_node_is_point_operation (GeglNode *node)
{

View File

@ -32,6 +32,7 @@ void gimp_gegl_progress_connect (GeglNode *node,
GimpProgress *progress,
const gchar *text);
gboolean gimp_gegl_node_is_source_operation (GeglNode *node);
gboolean gimp_gegl_node_is_point_operation (GeglNode *node);
const Babl * gimp_gegl_node_get_format (GeglNode *node,