AtlatestRepositorysigil-app

sigil-app / tree / includesigil-desktop.h

1/*
2 * sigil-desktop.h - the C surface of sigil-desktop for sibling packages
3 *
4 * sigil-graphics builds its sokol_gfx environment and swapchain from
5 * these, and loads GL through the proc loader instead of linking libGL.
6 * Everything here is valid only while app-run is running (between the
7 * init callback and the cleanup callback).
8 */
9
10#ifndef SIGIL_DESKTOP_H
11#define SIGIL_DESKTOP_H
13#ifdef __cplusplus
14extern "C" {
15#endif
17/* The window's framebuffer size in pixels: what GL draws into and what
18 * frame-width / frame-height report. 1x1 before the window exists. */
19void sigil_desktop_framebuffer_size(int *width, int *height);
21/* The address of a GL or GL extension function for the current context
22 * (glfwGetProcAddress), or NULL. Valid once the window exists; GL is
23 * loaded by GLFW at run time, nothing links it. */
24void *sigil_desktop_gl_get_proc_address(const char *name);
26/* The platform GLFW picked: "wayland", "x11", "win32", "cocoa", or
27 * "none" before app-run. */
28const char *sigil_desktop_platform(void);
30#ifdef __cplusplus
32#endif
34#endif /* SIGIL_DESKTOP_H */