Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
dynload.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2009-2011 johannes hanika.
4 Copyright (C) 2011 Ulrich Pegelow.
5 Copyright (C) 2012 Richard Wonka.
6 Copyright (C) 2013-2014, 2016 Tobias Ellinghaus.
7 Copyright (C) 2020 parafin.
8 Copyright (C) 2020 Pascal Obry.
9 Copyright (C) 2022 Martin Baƙinka.
10
11 darktable is free software: you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
15
16 darktable is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with darktable. If not, see <http://www.gnu.org/licenses/>.
23*/
24
25#pragma once
26
27#ifdef HAVE_OPENCL
28
29#ifdef HAVE_CONFIG_H
30#include "config.h"
31#endif
32
33#ifndef __APPLE__
34#include <glib.h>
35#include <gmodule.h>
36#endif
37
38typedef struct dt_gmodule_t
39{
40#ifndef __APPLE__
41 GModule *gmodule;
42#else
43 void *gmodule;
44#endif
45 char *library;
46} dt_gmodule_t;
47
48
49/* check if gmodules is supported on this platform */
50int dt_gmodule_supported(void);
51
52/* dynamically load library */
53dt_gmodule_t *dt_gmodule_open(const char *);
54
55/* get pointer to function */
56int dt_gmodule_symbol(dt_gmodule_t *, const char *, void (**)(void));
57
58#endif // HAVE_OPENCL
59
60// clang-format off
61// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
62// vim: shiftwidth=2 expandtab tabstop=2 cindent
63// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
64// clang-format on
65