diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2018-03-26 21:27:00 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2018-03-26 21:28:37 +0100 |
commit | 604ae85b6e76befe96036d16c4e3096b966a03e0 (patch) | |
tree | b6cf94126804d196c9631ac7a1da26891eb5d50f /loadgl.h.in | |
parent | ca761a910c25197b10aeadcb0120dae132442d56 (diff) | |
download | faqe-604ae85b6e76befe96036d16c4e3096b966a03e0.tar.gz faqe-604ae85b6e76befe96036d16c4e3096b966a03e0.tar.xz faqe-604ae85b6e76befe96036d16c4e3096b966a03e0.zip |
loadgl: Use m4 to generate the loads
The loadgl interfaces, loads and functions are now generated with m4 so
that all the information can be stored in a single place.
Diffstat (limited to 'loadgl.h.in')
-rw-r--r-- | loadgl.h.in | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/loadgl.h.in b/loadgl.h.in new file mode 100644 index 0000000..e7381cd --- /dev/null +++ b/loadgl.h.in @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2018 Tomasz Kramkowski <tk@the-tk.com> + * SPDX-License-Identifier: MIT + */ +#ifndef LOADGL_H +#define LOADGL_H + +#include "gldefs.h" + +typedef void *lgl_loadfunc(const char *name); + +enum lgl_status { + LGL_OK, + LGL_MISSING, +}; + +enum lgl_status lgl_load(lgl_loadfunc *load); +const char *lgl_strerror(enum lgl_status status); + +#define _LGL_INTERFACE(rett, name, func, ...) \ + typedef rett func(__VA_ARGS__); \ + extern func *name; +#define LGL_INTERFACE(rett, name, ...) _LGL_INTERFACE(rett, name, name##_func, __VA_ARGS__) + +INTERFACES()dnl + +#endif // LOADGL_H |