summaryrefslogtreecommitdiff
path: root/src/platform/wayland/clipboard.h
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-13 23:41:31 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-13 23:41:31 +0300
commit76073fe5fad8799e5850805f2f090af2cb62c741 (patch)
tree9658019babe4760a3634bdab4da0731a10e42e68 /src/platform/wayland/clipboard.h
parentdd1775a9927922c14f8679ccbc4d3ca8d5917e20 (diff)
Simplify the public event and CPU API
Applications now need far less ceremony: hello.c is a 20-line loop that handles REFRESH, CLOSE and QUIT and draws into the surface's own pixels. - Fold GEOMETRY, STATE and FOCUS into one WINDOW event carrying size, scale and state; unchanged values send nothing. - Guarantee REFRESH once a window has a size and after every resize, never at size zero. - Merge DROP_HOVER into DROP with over/leave/data actions and give drag and drop actions enums. - Keep event strings valid until the next wait and drop yasl_event_release; empty or failed waits report NONE. - Replace copy-in presentation with a lent pixel buffer: yasl_cpu_pixels and yasl_cpu_present. - Remove yasl_poll_event, yasl_cpu_read_pixels, unused event fields and comments that restated names. - Wayland: resize floating windows in request_size instead of reporting it unsupported, and stop marking new GPU surfaces as Vulkan so yasl_vulkan_create_surface no longer fails with NATIVE_WINDOW_IN_USE. Also includes the in-progress public API refactor that was uncommitted in the tree (removal of the app/loop layer, new surface, GL and Vulkan entry points). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'src/platform/wayland/clipboard.h')
-rw-r--r--src/platform/wayland/clipboard.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/platform/wayland/clipboard.h b/src/platform/wayland/clipboard.h
index 133cc14..d03df17 100644
--- a/src/platform/wayland/clipboard.h
+++ b/src/platform/wayland/clipboard.h
@@ -1,10 +1,10 @@
-#ifndef YASL_WAYLAND_CLIPBOARD_H
-#define YASL_WAYLAND_CLIPBOARD_H
+#ifndef YASL_PRIVATE_WAYLAND_CLIPBOARD_H
+#define YASL_PRIVATE_WAYLAND_CLIPBOARD_H
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
-#include "yasl/yasl.h"
+#include "common/types.h"
struct wl_display;
struct wl_data_device_manager;
@@ -16,27 +16,27 @@ struct zwp_primary_selection_device_manager_v1;
typedef void (*clipboard_receive_fn)(const char *, size_t, bool uri_list,
struct wl_surface *on, uint64_t request_id,
- enum yasl_transfer_status, void *);
+ enum yasl_private_transfer_status, void *);
struct clipboard *clipboard_create(struct wl_display *, struct wl_data_device_manager *,
- struct wl_seat *, struct yasl_loop *,
+ struct wl_seat *, struct yasl_private_loop *,
clipboard_receive_fn, void *);
void clipboard_destroy(struct clipboard *);
bool clipboard_set_seat(struct clipboard *, struct wl_seat *);
void clipboard_set_primary_manager(struct clipboard *, struct zwp_primary_selection_device_manager_v1 *);
bool clipboard_copy(struct clipboard *, const char *, uint32_t);
void clipboard_paste(struct clipboard *, struct wl_surface *target);
-bool clipboard_request_paste(struct clipboard *, enum yasl_selection,
+bool clipboard_request_paste(struct clipboard *, enum yasl_private_selection,
struct wl_surface *target, uint64_t request_id);
void clipboard_forget_surface(struct clipboard *, struct wl_surface *);
bool clipboard_copy_primary(struct clipboard *, const char *, uint32_t);
void clipboard_paste_primary(struct clipboard *, struct wl_surface *target);
-typedef void (*clipboard_drag_fn)(enum yasl_drag_event, struct wl_surface *on,
+typedef void (*clipboard_drag_fn)(enum yasl_private_drag_event, struct wl_surface *on,
double x, double y, void *);
void clipboard_set_drag_handler(struct clipboard *, clipboard_drag_fn, void *);
-typedef void (*clipboard_drop_fn)(enum yasl_drop_event, struct wl_surface *on,
+typedef void (*clipboard_drop_fn)(enum yasl_private_drop_event, struct wl_surface *on,
double x, double y, void *);
void clipboard_set_drop_handler(struct clipboard *, clipboard_drop_fn, void *);
const char *clipboard_drag_mime(void);