aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-11-16 10:56:52 +0100
committerdec05eba <dec05eba@protonmail.com>2021-11-16 10:56:52 +0100
commiteba962c3e353b3fd3f11e30a7d6f48585e3a153c (patch)
treea5b93bb2c4d5af7db63ab9d1e07e1ce7b0efddd1 /include
parent8df2299beba0f1465c3167edb67dd593c5c9e8db (diff)
Window: add set/get clipboard
Diffstat (limited to 'include')
-rw-r--r--include/mgl/window/window.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mgl/window/window.h b/include/mgl/window/window.h
index 812a5b2..95e3273 100644
--- a/include/mgl/window/window.h
+++ b/include/mgl/window/window.h
@@ -7,6 +7,7 @@
#include "key.h"
#include "mouse_button.h"
#include <stdbool.h>
+#include <stddef.h>
/* Vsync is automatically set for created windows, if supported by the system */
@@ -32,6 +33,8 @@ struct mgl_window {
bool focused;
double frame_time_limit;
mgl_clock frame_timer;
+ char *clipboard_string;
+ size_t clipboard_size;
};
typedef struct {
@@ -75,4 +78,8 @@ void mgl_window_set_size(mgl_window *self, mgl_vec2i size);
/* if |minimum| is (0, 0) then there is no minimum limit, if |maximum| is (0, 0) then there is no maximum limit */
void mgl_window_set_size_limits(mgl_window *self, mgl_vec2i minimum, mgl_vec2i maximum);
+void mgl_window_set_clipboard(mgl_window *self, const char *str, size_t size);
+/* A malloc'ed and null terminated string is returned in |str|, it should be deallocated with free */
+bool mgl_window_get_clipboard(mgl_window *self, char **str, size_t *size);
+
#endif /* MGL_WINDOW_H */