mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
Merge pull request #1387 from emersion/rename-gtk-primary-selection
Rename wlr_primary_selection to wlr_gtk_primary_selection
This commit is contained in:
commit
05bb440786
15 changed files with 133 additions and 133 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
70
include/wlr/types/wlr_gtk_primary_selection.h
Normal file
70
include/wlr/types/wlr_gtk_primary_selection.h
Normal file
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue