summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/yasl/yasl.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/yasl/yasl.h b/include/yasl/yasl.h
index 350339b..38c5b88 100644
--- a/include/yasl/yasl.h
+++ b/include/yasl/yasl.h
@@ -20,7 +20,7 @@ typedef struct yasl_event yasl_event;
enum yasl_backend { YASL_BACKEND_AUTO, YASL_BACKEND_WAYLAND, YASL_BACKEND_X11, YASL_BACKEND_COCOA };
enum yasl_surface_flags { YASL_SURFACE_CPU=1u, YASL_SURFACE_HIDDEN=2u, YASL_SURFACE_UNDECORATED=4u, YASL_SURFACE_FIXED_SIZE=8u };
enum yasl_error { YASL_ERROR_NONE, YASL_ERROR_INVALID, YASL_ERROR_UNSUPPORTED, YASL_ERROR_NO_MEMORY,
- YASL_ERROR_NOT_INITIALIZED, YASL_ERROR_BUSY, YASL_ERROR_WRONG_THREAD, YASL_ERROR_CONTEXT_EXPIRED, YASL_ERROR_IO };
+ YASL_ERROR_NOT_INITIALIZED, YASL_ERROR_BUSY, YASL_ERROR_WRONG_THREAD, YASL_ERROR_CONTEXT_EXPIRED, YASL_ERROR_IO, YASL_ERROR_DISCONNECTED };
enum yasl_selection { YASL_CLIPBOARD, YASL_PRIMARY };
enum yasl_key_action { YASL_KEY_PRESS, YASL_KEY_RELEASE, YASL_KEY_REPEAT };
enum yasl_mod { YASL_MOD_SHIFT=1u, YASL_MOD_ALT=2u, YASL_MOD_CTRL=4u, YASL_MOD_SUPER=8u, YASL_MOD_CAPS=16u };
@@ -52,7 +52,7 @@ enum yasl_resize_edge { YASL_EDGE_TOP=1, YASL_EDGE_BOTTOM=2, YASL_EDGE_LEFT=4, Y
enum yasl_event_type { YASL_EVENT_NONE, YASL_EVENT_CLOSE, YASL_EVENT_QUIT, YASL_EVENT_REOPEN, YASL_EVENT_WINDOW,
YASL_EVENT_REFRESH, YASL_EVENT_KEY, YASL_EVENT_TEXT, YASL_EVENT_POINTER, YASL_EVENT_SCROLL, YASL_EVENT_PEN,
YASL_EVENT_INPUT_RESET, YASL_EVENT_COMPOSITION, YASL_EVENT_TEXT_EDIT, YASL_EVENT_CLIPBOARD, YASL_EVENT_DROP,
- YASL_EVENT_DRAG, YASL_EVENT_DISPLAY_LOST };
+ YASL_EVENT_DRAG, YASL_EVENT_DISPLAY_LOST, YASL_EVENT_DISPLAY_RESTORED };
enum yasl_drop_action { YASL_DROP_OVER, YASL_DROP_LEAVE, YASL_DROP_DATA };
enum yasl_drag_action { YASL_DRAG_OVER, YASL_DRAG_LEAVE, YASL_DRAG_DROP };
/** Read the union member named by type. Strings stay valid until the next wait.
@@ -60,7 +60,11 @@ enum yasl_drag_action { YASL_DRAG_OVER, YASL_DRAG_LEAVE, YASL_DRAG_DROP };
* WINDOW: size, scale or state changed. REFRESH: draw now; sent once the window
* has a size, after every resize and when the system needs the contents again.
* INPUT_RESET: forget held keys, buttons and strokes. DROP: external data over
- * the window, delivered as DATA. DRAG: another YASL surface dragged over. */
+ * the window, delivered as DATA. DRAG: another YASL surface dragged over.
+ * DISPLAY_LOST: the display server went away. Destroy Vulkan surfaces and GL
+ * objects now; windows stay valid. Wayland reconnects, then sends DISPLAY_RESTORED:
+ * recreate them (GL contexts are new and must be bound again). Elsewhere loss is
+ * final and later waits fail. */
struct yasl_event {
enum yasl_event_type type;
yasl_surface *surface;