aboutsummaryrefslogtreecommitdiff
path: root/include/mgl/window/window.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mgl/window/window.h')
-rw-r--r--include/mgl/window/window.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/mgl/window/window.h b/include/mgl/window/window.h
index 34f8cbb..ed50dcb 100644
--- a/include/mgl/window/window.h
+++ b/include/mgl/window/window.h
@@ -56,12 +56,15 @@ typedef struct {
} mgl_window_create_params;
typedef enum {
- MGL_CLIPBOARD_TYPE_STRING,
- MGL_CLIPBOARD_TYPE_IMAGE_PNG,
- MGL_CLIPBOARD_TYPE_IMAGE_JPG,
- MGL_CLIPBOARD_TYPE_IMAGE_GIF,
+ MGL_CLIPBOARD_TYPE_STRING = 1 << 0,
+ MGL_CLIPBOARD_TYPE_IMAGE_PNG = 1 << 1,
+ MGL_CLIPBOARD_TYPE_IMAGE_JPG = 1 << 2,
+ MGL_CLIPBOARD_TYPE_IMAGE_GIF = 1 << 3,
} mgl_clipboard_type;
+#define MGL_CLIPBOARD_TYPE_ALL 0xFFFFFFFF
+#define MGL_CLIPBOARD_TYPE_IMAGE (MGL_CLIPBOARD_TYPE_IMAGE_PNG | MGL_CLIPBOARD_TYPE_IMAGE_JPG | MGL_CLIPBOARD_TYPE_IMAGE_GIF)
+
/*
Return true to continue. |mgl_window_get_clipboard| returns false if this returns false.
Note: |size| is the size of the current data, not the total data (if the callback only contains a part of the data).
@@ -115,7 +118,8 @@ void mgl_window_set_size(mgl_window *self, mgl_vec2i size);
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);
-bool mgl_window_get_clipboard(mgl_window *self, mgl_clipboard_callback callback, void *userdata);
+/* clipboard_types should be a bit-or of mgl_clipboard_type */
+bool mgl_window_get_clipboard(mgl_window *self, mgl_clipboard_callback callback, void *userdata, uint32_t clipboard_types);
/*
A new string is allocated and the pointer is copied to |str| with the size returned in |size|.
|str| should be deallocated with |free| by the user.