aboutsummaryrefslogtreecommitdiff
path: root/src/disp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/disp.h')
-rw-r--r--src/disp.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/disp.h b/src/disp.h
index d0b2d19..454378d 100644
--- a/src/disp.h
+++ b/src/disp.h
@@ -18,11 +18,19 @@
#define DISP_H
#include <stdbool.h>
+#include <limits.h>
/* Available display types. */
#define DISP_CLI "cli"
#define DISP_RAY "ray"
+/* Reserved return values for the read_input function. */
+#ifndef NDEBUG
+# define DISP_RELOAD INT_MAX
+#endif
+#define DISP_QUIT (INT_MAX - 1)
+#define DISP_ERR (INT_MAX - 2)
+
struct disp {
void *dl_handle;
void (*init)(void);
@@ -30,13 +38,19 @@ struct disp {
int (*read_input)(void);
void (*display_res)(bool, int);
void (*destroy)(void);
+#ifndef NDEBUG
+ char *so_path;
void *(*pre_reload)(void);
void (*post_reload)(void *);
+#endif
};
/* Get a display handler for the given display type. */
-struct disp *get_disp(char *disp_name);
+struct disp *get_disp(char *);
+void destroy_disp(struct disp *);
-void destroy_disp(void);
+#ifndef NDEBUG
+void disp_reload(struct disp *);
+#endif /* NDEBUG */
-#endif
+#endif /* DISP_H */