diff options
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/interfaces/wlr_input_device.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_input_device.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_tablet_pad.h | 3 | ||||
-rw-r--r-- | include/wlr/xwayland.h | 4 | ||||
-rw-r--r-- | include/wlr/xwm.h | 125 |
5 files changed, 5 insertions, 131 deletions
diff --git a/include/wlr/interfaces/wlr_input_device.h b/include/wlr/interfaces/wlr_input_device.h index 2a681ff8..a5c513b7 100644 --- a/include/wlr/interfaces/wlr_input_device.h +++ b/include/wlr/interfaces/wlr_input_device.h @@ -10,7 +10,7 @@ struct wlr_input_device_impl { void wlr_input_device_init( struct wlr_input_device *wlr_device, enum wlr_input_device_type type, - struct wlr_input_device_impl *impl, + const struct wlr_input_device_impl *impl, const char *name, int vendor, int product); void wlr_input_device_destroy(struct wlr_input_device *dev); diff --git a/include/wlr/types/wlr_input_device.h b/include/wlr/types/wlr_input_device.h index 306a1166..6d8e3631 100644 --- a/include/wlr/types/wlr_input_device.h +++ b/include/wlr/types/wlr_input_device.h @@ -24,7 +24,7 @@ enum wlr_input_device_type { struct wlr_input_device_impl; struct wlr_input_device { - struct wlr_input_device_impl *impl; + const struct wlr_input_device_impl *impl; enum wlr_input_device_type type; int vendor, product; diff --git a/include/wlr/types/wlr_tablet_pad.h b/include/wlr/types/wlr_tablet_pad.h index e70db516..73082c56 100644 --- a/include/wlr/types/wlr_tablet_pad.h +++ b/include/wlr/types/wlr_tablet_pad.h @@ -29,6 +29,7 @@ struct wlr_event_tablet_pad_button { uint32_t time_msec; uint32_t button; enum wlr_button_state state; + unsigned int mode; }; enum wlr_tablet_pad_ring_source { @@ -41,6 +42,7 @@ struct wlr_event_tablet_pad_ring { enum wlr_tablet_pad_ring_source source; uint32_t ring; double position; + unsigned int mode; }; enum wlr_tablet_pad_strip_source { @@ -53,6 +55,7 @@ struct wlr_event_tablet_pad_strip { enum wlr_tablet_pad_strip_source source; uint32_t strip; double position; + unsigned int mode; }; #endif diff --git a/include/wlr/xwayland.h b/include/wlr/xwayland.h index 0d4b91ed..f34860aa 100644 --- a/include/wlr/xwayland.h +++ b/include/wlr/xwayland.h @@ -8,10 +8,6 @@ #include <wlr/types/wlr_seat.h> #include <xcb/xcb.h> -#ifdef WLR_HAS_XCB_ICCCM - #include <xcb/xcb_icccm.h> -#endif - struct wlr_xwm; struct wlr_xwayland_cursor; diff --git a/include/wlr/xwm.h b/include/wlr/xwm.h deleted file mode 100644 index 7d518f7e..00000000 --- a/include/wlr/xwm.h +++ /dev/null @@ -1,125 +0,0 @@ -#ifndef WLR_XWM_H -#define WLR_XWM_H - -#include <wayland-server-core.h> -#include <wlr/xwayland.h> -#include <xcb/render.h> - -enum atom_name { - WL_SURFACE_ID, - WM_DELETE_WINDOW, - WM_PROTOCOLS, - WM_HINTS, - WM_NORMAL_HINTS, - WM_SIZE_HINTS, - MOTIF_WM_HINTS, - UTF8_STRING, - WM_S0, - NET_SUPPORTED, - NET_WM_S0, - NET_WM_PID, - NET_WM_NAME, - NET_WM_STATE, - NET_WM_WINDOW_TYPE, - WM_TAKE_FOCUS, - WINDOW, - _NET_ACTIVE_WINDOW, - _NET_WM_MOVERESIZE, - _NET_WM_NAME, - _NET_SUPPORTING_WM_CHECK, - _NET_WM_STATE_FULLSCREEN, - _NET_WM_STATE_MAXIMIZED_VERT, - _NET_WM_STATE_MAXIMIZED_HORZ, - WM_STATE, - CLIPBOARD, - PRIMARY, - WL_SELECTION, - TARGETS, - CLIPBOARD_MANAGER, - INCR, - TEXT, - TIMESTAMP, - NET_WM_WINDOW_TYPE_UTILITY, - NET_WM_WINDOW_TYPE_TOOLTIP, - NET_WM_WINDOW_TYPE_DND, - NET_WM_WINDOW_TYPE_DROPDOWN_MENU, - NET_WM_WINDOW_TYPE_POPUP_MENU, - NET_WM_WINDOW_TYPE_COMBO, - ATOM_LAST, -}; - -extern const char *atom_map[ATOM_LAST]; - -enum net_wm_state_action { - NET_WM_STATE_REMOVE = 0, - NET_WM_STATE_ADD = 1, - NET_WM_STATE_TOGGLE = 2, -}; - -struct wlr_xwm_selection { - struct wlr_xwm *xwm; - xcb_atom_t atom; - xcb_window_t window; - xcb_selection_request_event_t request; - xcb_window_t owner; - xcb_timestamp_t timestamp; - int incr; - int source_fd; - int property_start; - xcb_get_property_reply_t *property_reply; - struct wl_event_source *property_source; - int flush_property_on_delete; - struct wl_array source_data; - xcb_atom_t target; - bool property_set; -}; - -struct wlr_xwm { - struct wlr_xwayland *xwayland; - struct wl_event_source *event_source; - struct wlr_seat *seat; - - xcb_atom_t atoms[ATOM_LAST]; - xcb_connection_t *xcb_conn; - xcb_screen_t *screen; - xcb_window_t window; - xcb_visualid_t visual_id; - xcb_colormap_t colormap; - xcb_render_pictformat_t render_format_id; - xcb_cursor_t cursor; - - xcb_window_t selection_window; - struct wlr_xwm_selection clipboard_selection; - struct wlr_xwm_selection primary_selection; - - struct wlr_xwayland_surface *focus_surface; - - struct wl_list surfaces; // wlr_xwayland_surface::link - struct wl_list unpaired_surfaces; // wlr_xwayland_surface::unpaired_link - - const xcb_query_extension_reply_t *xfixes; - - struct wl_listener compositor_new_surface; - struct wl_listener compositor_destroy; - struct wl_listener seat_selection; - struct wl_listener seat_primary_selection; -}; - -struct wlr_xwm *xwm_create(struct wlr_xwayland *wlr_xwayland); - -void xwm_destroy(struct wlr_xwm *xwm); - -void xwm_set_cursor(struct wlr_xwm *xwm, const uint8_t *pixels, uint32_t stride, - uint32_t width, uint32_t height, int32_t hotspot_x, int32_t hotspot_y); - -int xwm_handle_selection_event(struct wlr_xwm *xwm, xcb_generic_event_t *event); - -void xwm_selection_init(struct wlr_xwm *xwm); -void xwm_selection_finish(struct wlr_xwm *xwm); - -void xwm_set_seat(struct wlr_xwm *xwm, struct wlr_seat *seat); - -bool wlr_xwm_atoms_contains(struct wlr_xwm *xwm, xcb_atom_t *atoms, - size_t num_atoms, enum atom_name needle); - -#endif |