2019-02-08 23:43:59 +01:00
|
|
|
/*
|
|
|
|
* This protocol is obsolete and will be removed in a future version. The
|
|
|
|
* recommended replacement is wp-primary-selection.
|
|
|
|
*/
|
|
|
|
|
2018-11-23 11:58:56 +01:00
|
|
|
/*
|
|
|
|
* This an unstable interface of wlroots. No guarantees are made regarding the
|
|
|
|
* future consistency of this API.
|
|
|
|
*/
|
|
|
|
#ifndef WLR_USE_UNSTABLE
|
|
|
|
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef WLR_TYPES_WLR_GTK_PRIMARY_SELECTION_H
|
|
|
|
#define WLR_TYPES_WLR_GTK_PRIMARY_SELECTION_H
|
|
|
|
|
2019-07-27 10:53:54 +02:00
|
|
|
#include <wayland-server-core.h>
|
2018-11-23 11:58:56 +01:00
|
|
|
#include <wlr/types/wlr_seat.h>
|
|
|
|
|
2019-02-08 23:43:59 +01:00
|
|
|
/**
|
|
|
|
* A primary selection manager which implements the GTK protocol.
|
|
|
|
*/
|
2018-11-23 11:58:56 +01:00
|
|
|
struct wlr_gtk_primary_selection_device_manager {
|
|
|
|
struct wl_global *global;
|
2018-11-27 18:41:46 +01:00
|
|
|
struct wl_list devices; // wlr_gtk_primary_selection_device::link
|
2018-11-23 11:58:56 +01:00
|
|
|
|
|
|
|
struct wl_listener display_destroy;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
struct wl_signal destroy;
|
|
|
|
} events;
|
|
|
|
|
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
2018-11-27 18:41:46 +01:00
|
|
|
/**
|
|
|
|
* A device is a per-seat object used to set and get the current selection.
|
|
|
|
*/
|
|
|
|
struct wlr_gtk_primary_selection_device {
|
|
|
|
struct wlr_gtk_primary_selection_device_manager *manager;
|
|
|
|
struct wlr_seat *seat;
|
|
|
|
struct wl_list link; // wlr_gtk_primary_selection_device_manager::devices
|
|
|
|
struct wl_list resources; // wl_resource_get_link
|
|
|
|
|
2018-11-27 19:45:39 +01:00
|
|
|
struct wl_list offers; // wl_resource_get_link
|
2018-11-27 18:41:46 +01:00
|
|
|
|
|
|
|
struct wl_listener seat_destroy;
|
|
|
|
struct wl_listener seat_focus_change;
|
2018-11-29 19:30:04 +01:00
|
|
|
struct wl_listener seat_set_primary_selection;
|
2018-11-23 11:58:56 +01:00
|
|
|
|
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct wlr_gtk_primary_selection_device_manager *
|
|
|
|
wlr_gtk_primary_selection_device_manager_create(struct wl_display *display);
|
|
|
|
|
|
|
|
#endif
|