forked from darktable-org/darktable
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.h
More file actions
62 lines (48 loc) · 2.4 KB
/
Copy pathvariables.h
File metadata and controls
62 lines (48 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
This file is part of darktable,
copyright (c) 2010 henrik andersson.
darktable is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
darktable is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with darktable. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VARIABLES_H
#define VARIABLES_H
#include <glib.h>
typedef struct dt_variables_params_t
{
/** only validates string */
gboolean validate_only;
/** used for expanding variables that uses filename $(FILE_FOLDER) $(FILE_NAME) and $(FILE_EXTENSION). */
const gchar *filename;
/** used for expanding variable $(JOBCODE) */
const gchar *jobcode;
/** used for expanding variables such as $(IMAGE_WIDTH) $(IMAGE_HEIGT). */
uint32_t imgid;
/** used as thread-safe sequence number. only used if >= 0. */
int sequence;
/** internal variables data */
struct dt_variables_data_t *data;
} dt_variables_params_t;
/** allocate and initializes a dt_variables_params_t. */
void dt_variables_params_init(dt_variables_params_t **params);
/** destroys an initialized dt_variables_params_t, pointer is garbage after this call. */
void dt_variables_params_destroy(dt_variables_params_t *params);
/** set the time in a dt_variables_params_t. */
void dt_variables_set_time(dt_variables_params_t *params, time_t time);
/** expands variables in string, this free's previous expanding result */
gboolean dt_variables_expand(dt_variables_params_t *params, gchar *string, gboolean iterate);
/** get the expanded string result, use a copy of this string in your code like g_strdup(). */
const gchar *dt_variables_get_result(dt_variables_params_t *params);
/** reset sequence number */
void dt_variables_reset_sequence(dt_variables_params_t *params);
#endif
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.sh
// vim: shiftwidth=2 expandtab tabstop=2 cindent
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-space on;