diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/rootston/desktop.h | 4 | ||||
-rw-r--r-- | include/wlr/types/meson.build | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_gtk_primary_selection.h | 70 | ||||
-rw-r--r-- | include/wlr/types/wlr_primary_selection.h | 70 | ||||
-rw-r--r-- | include/wlr/types/wlr_seat.h | 2 | ||||
-rw-r--r-- | include/xwayland/selection.h | 2 |
6 files changed, 75 insertions, 75 deletions
diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h index 4ce92e2b..31338acf 100644 --- a/include/rootston/desktop.h +++ b/include/rootston/desktop.h @@ -15,7 +15,7 @@ #include <wlr/types/wlr_output_layout.h> #include <wlr/types/wlr_output.h> #include <wlr/types/wlr_presentation_time.h> -#include <wlr/types/wlr_primary_selection.h> +#include <wlr/types/wlr_gtk_primary_selection.h> #include <wlr/types/wlr_screencopy_v1.h> #include <wlr/types/wlr_screenshooter.h> #include <wlr/types/wlr_text_input_v3.h> @@ -51,7 +51,7 @@ struct roots_desktop { struct wlr_export_dmabuf_manager_v1 *export_dmabuf_manager_v1; struct wlr_server_decoration_manager *server_decoration_manager; struct wlr_xdg_decoration_manager_v1 *xdg_decoration_manager; - struct wlr_primary_selection_device_manager *primary_selection_device_manager; + struct wlr_gtk_primary_selection_device_manager *primary_selection_device_manager; struct wlr_idle *idle; struct wlr_idle_inhibit_manager_v1 *idle_inhibit; struct wlr_input_inhibit_manager *input_inhibit; diff --git a/include/wlr/types/meson.build b/include/wlr/types/meson.build index 3f61ae20..df611970 100644 --- a/include/wlr/types/meson.build +++ b/include/wlr/types/meson.build @@ -7,6 +7,7 @@ install_headers( 'wlr_export_dmabuf_v1.h', 'wlr_gamma_control_v1.h', 'wlr_gamma_control.h', + 'wlr_gtk_primary_selection.h', 'wlr_idle_inhibit_v1.h', 'wlr_idle.h', 'wlr_input_device.h', @@ -22,7 +23,6 @@ install_headers( 'wlr_output.h', 'wlr_pointer.h', 'wlr_presentation_time.h', - 'wlr_primary_selection.h', 'wlr_region.h', 'wlr_screencopy_v1.h', 'wlr_screenshooter.h', diff --git a/include/wlr/types/wlr_gtk_primary_selection.h b/include/wlr/types/wlr_gtk_primary_selection.h new file mode 100644 index 00000000..f3410f69 --- /dev/null +++ b/include/wlr/types/wlr_gtk_primary_selection.h @@ -0,0 +1,70 @@ +/* + * 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 + +#include <wayland-server.h> +#include <wlr/types/wlr_seat.h> + +struct wlr_gtk_primary_selection_device_manager { + struct wl_global *global; + struct wl_list resources; + + struct wl_listener display_destroy; + + struct { + struct wl_signal destroy; + } events; + + void *data; +}; + +struct wlr_gtk_primary_selection_source { + // source metadata + struct wl_array mime_types; + + // source implementation + void (*send)(struct wlr_gtk_primary_selection_source *source, + const char *mime_type, int32_t fd); + void (*cancel)(struct wlr_gtk_primary_selection_source *source); + + // source status + struct wlr_seat_client *seat_client; + + struct { + struct wl_signal destroy; + } events; + + void *data; +}; + +struct wlr_gtk_primary_selection_offer { + struct wl_resource *resource; + struct wlr_gtk_primary_selection_source *source; + + struct wl_listener source_destroy; + + void *data; +}; + +struct wlr_gtk_primary_selection_device_manager * + wlr_gtk_primary_selection_device_manager_create(struct wl_display *display); +void wlr_gtk_primary_selection_device_manager_destroy( + struct wlr_gtk_primary_selection_device_manager *manager); + +void wlr_seat_client_send_gtk_primary_selection(struct wlr_seat_client *seat_client); +void wlr_seat_set_gtk_primary_selection(struct wlr_seat *seat, + struct wlr_gtk_primary_selection_source *source, uint32_t serial); + +void wlr_gtk_primary_selection_source_init( + struct wlr_gtk_primary_selection_source *source); +void wlr_gtk_primary_selection_source_finish( + struct wlr_gtk_primary_selection_source *source); + +#endif diff --git a/include/wlr/types/wlr_primary_selection.h b/include/wlr/types/wlr_primary_selection.h deleted file mode 100644 index 192bfc02..00000000 --- a/include/wlr/types/wlr_primary_selection.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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_PRIMARY_SELECTION_H -#define WLR_TYPES_WLR_PRIMARY_SELECTION_H - -#include <wayland-server.h> -#include <wlr/types/wlr_seat.h> - -struct wlr_primary_selection_device_manager { - struct wl_global *global; - struct wl_list resources; - - struct wl_listener display_destroy; - - struct { - struct wl_signal destroy; - } events; - - void *data; -}; - -struct wlr_primary_selection_source { - // source metadata - struct wl_array mime_types; - - // source implementation - void (*send)(struct wlr_primary_selection_source *source, - const char *mime_type, int32_t fd); - void (*cancel)(struct wlr_primary_selection_source *source); - - // source status - struct wlr_seat_client *seat_client; - - struct { - struct wl_signal destroy; - } events; - - void *data; -}; - -struct wlr_primary_selection_offer { - struct wl_resource *resource; - struct wlr_primary_selection_source *source; - - struct wl_listener source_destroy; - - void *data; -}; - -struct wlr_primary_selection_device_manager * - wlr_primary_selection_device_manager_create(struct wl_display *display); -void wlr_primary_selection_device_manager_destroy( - struct wlr_primary_selection_device_manager *manager); - -void wlr_seat_client_send_primary_selection(struct wlr_seat_client *seat_client); -void wlr_seat_set_primary_selection(struct wlr_seat *seat, - struct wlr_primary_selection_source *source, uint32_t serial); - -void wlr_primary_selection_source_init( - struct wlr_primary_selection_source *source); -void wlr_primary_selection_source_finish( - struct wlr_primary_selection_source *source); - -#endif diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h index 59de8207..9670e6a5 100644 --- a/include/wlr/types/wlr_seat.h +++ b/include/wlr/types/wlr_seat.h @@ -194,7 +194,7 @@ struct wlr_seat { struct wlr_data_source *selection_source; uint32_t selection_serial; - struct wlr_primary_selection_source *primary_selection_source; + struct wlr_gtk_primary_selection_source *primary_selection_source; uint32_t primary_selection_serial; // `drag` goes away before `drag_source`, when the implicit grab ends diff --git a/include/xwayland/selection.h b/include/xwayland/selection.h index fc910e46..6529e9eb 100644 --- a/include/xwayland/selection.h +++ b/include/xwayland/selection.h @@ -62,7 +62,7 @@ int xwm_handle_xfixes_selection_notify(struct wlr_xwm *xwm, xcb_xfixes_selection_notify_event_t *event); bool data_source_is_xwayland(struct wlr_data_source *wlr_source); bool primary_selection_source_is_xwayland( - struct wlr_primary_selection_source *wlr_source); + struct wlr_gtk_primary_selection_source *wlr_source); void xwm_seat_handle_start_drag(struct wlr_xwm *xwm, struct wlr_drag *drag); |