1 /*
2     This file is part of darktable,
3     Copyright (C) 2010-2020 darktable developers.
4 
5     darktable 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     darktable 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 darktable.  If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #include "control/jobs/develop_jobs.h"
20 #include "control/jobs/control_jobs.h"
21 
dt_dev_process_preview_job_run(dt_job_t * job)22 static int32_t dt_dev_process_preview_job_run(dt_job_t *job)
23 {
24   dt_develop_t *dev = dt_control_job_get_params(job);
25   dt_dev_process_preview_job(dev);
26   return 0;
27 }
28 
dt_dev_process_preview2_job_run(dt_job_t * job)29 static int32_t dt_dev_process_preview2_job_run(dt_job_t *job)
30 {
31   dt_develop_t *dev = dt_control_job_get_params(job);
32   dt_dev_process_preview2_job(dev);
33   return 0;
34 }
35 
dt_dev_process_preview_job_create(dt_develop_t * dev)36 dt_job_t *dt_dev_process_preview_job_create(dt_develop_t *dev)
37 {
38   dt_job_t *job = dt_control_job_create(&dt_dev_process_preview_job_run, "develop process preview");
39   if(!job) return NULL;
40   dt_control_job_set_params(job, dev, NULL);
41   return job;
42 }
43 
dt_dev_process_preview2_job_create(dt_develop_t * dev)44 dt_job_t *dt_dev_process_preview2_job_create(dt_develop_t *dev)
45 {
46   dt_job_t *job = dt_control_job_create(&dt_dev_process_preview2_job_run, "develop process preview");
47   if(!job) return NULL;
48   dt_control_job_set_params(job, dev, NULL);
49   return job;
50 }
51 
dt_dev_process_image_job_run(dt_job_t * job)52 static int32_t dt_dev_process_image_job_run(dt_job_t *job)
53 {
54   dt_develop_t *dev = dt_control_job_get_params(job);
55   dt_dev_process_image_job(dev);
56   return 0;
57 }
58 
dt_dev_process_image_job_create(dt_develop_t * dev)59 dt_job_t *dt_dev_process_image_job_create(dt_develop_t *dev)
60 {
61   dt_job_t *job = dt_control_job_create(&dt_dev_process_image_job_run, "develop process image");
62   if(!job) return NULL;
63   dt_control_job_set_params(job, dev, NULL);
64   return job;
65 }
66 
67 // modelines: These editor modelines have been set for all relevant files by tools/update_modelines.sh
68 // vim: shiftwidth=2 expandtab tabstop=2 cindent
69 // kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
70