1 /*
2  * Photos - access, organize and share your photos on GNOME
3  * Copyright © 2015 – 2019 Red Hat, Inc.
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef PHOTOS_PIPELINE_H
20 #define PHOTOS_PIPELINE_H
21 
22 #include <stdarg.h>
23 
24 #include <gegl.h>
25 #include <gio/gio.h>
26 
27 G_BEGIN_DECLS
28 
29 #define PHOTOS_TYPE_PIPELINE (photos_pipeline_get_type ())
30 G_DECLARE_FINAL_TYPE (PhotosPipeline, photos_pipeline, PHOTOS, PIPELINE, GObject);
31 
32 void                   photos_pipeline_new_async         (GeglNode *parent,
33                                                           const gchar *const *uris,
34                                                           GCancellable *cancellable,
35                                                           GAsyncReadyCallback callback,
36                                                           gpointer user_data);
37 
38 PhotosPipeline        *photos_pipeline_new_finish        (GAsyncResult *res, GError **error);
39 
40 void                   photos_pipeline_add_valist        (PhotosPipeline *self,
41                                                           const gchar *operation,
42                                                           const gchar *first_property_name,
43                                                           va_list ap);
44 
45 gboolean               photos_pipeline_get               (PhotosPipeline *self,
46                                                           const gchar *operation,
47                                                           const gchar *first_property_name,
48                                                           ...) G_GNUC_NULL_TERMINATED G_GNUC_WARN_UNUSED_RESULT;
49 
50 gboolean               photos_pipeline_get_valist        (PhotosPipeline *self,
51                                                           const gchar *operation,
52                                                           const gchar *first_property_name,
53                                                           va_list ap) G_GNUC_WARN_UNUSED_RESULT;
54 
55 GeglNode              *photos_pipeline_get_graph         (PhotosPipeline *self);
56 
57 GeglNode              *photos_pipeline_get_output        (PhotosPipeline *self);
58 
59 gboolean               photos_pipeline_is_edited         (PhotosPipeline *self);
60 
61 GeglProcessor         *photos_pipeline_new_processor     (PhotosPipeline *self);
62 
63 void                   photos_pipeline_save_async        (PhotosPipeline *self,
64                                                           GCancellable *cancellable,
65                                                           GAsyncReadyCallback callback,
66                                                           gpointer user_data);
67 
68 gboolean               photos_pipeline_save_finish       (PhotosPipeline *self, GAsyncResult *res, GError **error);
69 
70 gboolean               photos_pipeline_remove            (PhotosPipeline *self, const gchar *operation);
71 
72 void                   photos_pipeline_revert            (PhotosPipeline *self);
73 
74 void                   photos_pipeline_revert_to_original(PhotosPipeline *self);
75 
76 void                   photos_pipeline_set_parent        (PhotosPipeline *self, GeglNode *parent);
77 
78 void                   photos_pipeline_snapshot          (PhotosPipeline *self);
79 
80 G_END_DECLS
81 
82 #endif /* PHOTOS_PIPELINE_H */
83