Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
main_wrapper.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2017 Tobias Ellinghaus.
4 Copyright (C) 2022 Martin Baƙinka.
5
6 darktable is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 darktable is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with darktable. If not, see <http://www.gnu.org/licenses/>.
18*/
19#pragma once
20
21#include <glib.h>
22
23// On Windows the command line arguments are ANSI encoded. We want UTF-8 in dt though.
24// including this file will add a wrapper that acts together with linker switch -municode
25
26int main(int argc, char *argv[]);
27
28int wmain(int argc, wchar_t *argv[])
29{
30 char **_argv = g_malloc0((argc + 1) * sizeof(char *));
31 for(int i = 0; i < argc; i++)
32 _argv[i] = g_utf16_to_utf8(argv[i], -1, NULL, NULL, NULL);
33 int res = main(argc, _argv);
34 g_strfreev(_argv);
35 return res;
36}
37// clang-format off
38// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
39// vim: shiftwidth=2 expandtab tabstop=2 cindent
40// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
41// clang-format on
42
const float i
Definition colorspaces_inline_conversions.h:669
int main(int argc, char *argv[])
Definition chart/main.c:1909
int wmain(int argc, wchar_t *argv[])
Definition main_wrapper.h:28