Skip to content
Myr

clipboard.h

This file

Path

clipboard.h

40 lines · 1.1 KiB · C

Last changed by

Not known.

History of this file

Take it

1#pragma once23#include <stdint.h>4#include <primary-selection-unstable-v1.h>56/* Mime-types we support when dealing with data offers (e.g. copy-paste, or DnD) */7enum data_offer_mime_type {8    DATA_OFFER_MIME_UNSET,9    DATA_OFFER_MIME_TEXT_PLAIN,10    DATA_OFFER_MIME_TEXT_UTF8,11    DATA_OFFER_MIME_URI_LIST,1213    DATA_OFFER_MIME_TEXT_TEXT,14    DATA_OFFER_MIME_TEXT_STRING,15    DATA_OFFER_MIME_TEXT_UTF8_STRING,16};1718struct wl_clipboard {19    //struct wl_window *window;  /* For DnD */20    struct wl_data_source *data_source;21    struct wl_data_offer *data_offer;22    enum data_offer_mime_type mime_type;23    char *text;24    uint32_t serial;25};2627struct wl_primary {28    struct zwp_primary_selection_source_v1 *data_source;29    struct zwp_primary_selection_offer_v1 *data_offer;30    enum data_offer_mime_type mime_type;31    char *text;32    uint32_t serial;33};3435extern const struct wl_data_device_listener data_device_listener;36extern const struct zwp_primary_selection_device_v1_listener primary_selection_device_listener;3738struct seat;39void paste_from_clipboard(struct seat *seat);40void paste_from_primary(struct seat *seat);