Pugl as a single header library
|
rigil
09c40f9c26
move build directory to input
build is often used by build tools as a target directory |
||
|---|---|---|
| genshl @264e3ac5d6 | first full generation of pug-shl.h | |
| input | move build directory to input | |
| pugl @ac61c57d6e | initial commit | |
| .editorconfig | initial commit | |
| .gitmodules | initial commit | |
| Makefile | move build directory to input | |
| pugl-shl.h | first full generation of pug-shl.h | |
| README.md | first full generation of pug-shl.h | |
Pugl as a single header library.
#define PUGL_IMPLEMENTATION
#include "pugl-shl.h"
int main(void) {
/* use PUGL */
return 0;
}
Macros for Pugl
When used, those macros must be defined both for the header and the implementation:
| Macro | Needed | Usage |
|---|---|---|
| PUGL_DISABLE_DEPRECATED | No | Remove old definitions instead of warning for their usage |
| PUGL_CAIRO_BACKEND | No | Enable Cairo backend |
| PUGL_OPENGL_BACKEND | No | Enable OpenGL backend |
| PUGL_VULKAN_BACKEND | No | Enable Vulkan backend |
Platform specific macros
Taken from meson.build in Pugl source tree:
Linux/X11
| Macro | Needed | Usage |
|---|---|---|
| _POSIX_C_SOURCE | Yes | Set to 200809L minimum |
| HAVE_XCURSOR | No | Enable system cursors extension |
| HAVE_XRANDR | No | Enable monitors and randr support |
| HAVE_XSYNC | No | Enable Xsync extension |
MacOS X
TODO
Windows
| Macro | Needed | Usage |
|---|---|---|
| WINVER | No | Set to 0x0500 minimum for Windows 2000 compatibility |
| _WIN32_WINNT | No | Same than WINVER |
Linking
Linux/X11
X11 Xcursor Xrandr Xext
MacOS X
TODO
Windows
user32 shlwapi dwmapi