Merge branch 'master' into heghe/wl_list

This commit is contained in:
Drew DeVault 2017-10-21 22:03:29 -04:00
commit 16f35ecbea
41 changed files with 263 additions and 157 deletions

View file

@ -13,7 +13,8 @@
#include <wlr/backend/session.h>
#include <wlr/backend/drm.h>
#include <wlr/types/wlr_output.h>
#include <wlr/egl.h>
#include <wlr/render/egl.h>
#include <wlr/types/wlr_list.h>
#include "iface.h"
#include "properties.h"
@ -30,7 +31,6 @@ struct wlr_drm_plane {
// Only used by cursor
float matrix[16];
struct wlr_renderer *wlr_rend;
struct wlr_texture *wlr_tex;
struct gbm_bo *cursor_bo;
@ -113,7 +113,6 @@ struct wlr_drm_mode {
struct wlr_drm_connector {
struct wlr_output output;
struct wlr_drm_backend *drm;
enum wlr_drm_connector_state state;
uint32_t id;

View file

@ -5,7 +5,7 @@
#include <wayland-client.h>
#include <wayland-server.h>
#include <wayland-egl.h>
#include <wlr/egl.h>
#include <wlr/render/egl.h>
#include <wlr/backend/wayland.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_input_device.h>

View file

@ -5,7 +5,7 @@
#include <xcb/xcb.h>
#include <X11/Xlib-xcb.h>
#include <wayland-server.h>
#include <wlr/egl.h>
#include <wlr/render/egl.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_input_device.h>

View file

@ -8,9 +8,9 @@
#include <GLES2/gl2ext.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <wlr/egl.h>
#include <wlr/backend.h>
#include <wlr/render.h>
#include <wlr/render/egl.h>
#include <wlr/render/interface.h>
#include <wlr/util/log.h>

View file

@ -42,6 +42,7 @@ struct roots_config {
struct wl_list devices;
struct wl_list bindings;
char *config_path;
char *startup_cmd;
};
struct roots_config *parse_args(int argc, char *argv[]);

View file

@ -24,18 +24,12 @@ struct roots_keyboard {
struct roots_pointer {
struct roots_input *input;
struct wlr_input_device *device;
// We don't listen to any pointer events directly - they go through
// wlr_cursor
struct wl_list link;
};
struct roots_touch {
struct roots_input *input;
struct wlr_input_device *device;
struct wl_listener down;
struct wl_listener up;
struct wl_listener motion;
struct wl_listener cancel;
struct wl_list link;
};
@ -70,6 +64,13 @@ struct roots_input_event {
struct wlr_input_device *device;
};
struct roots_touch_point {
struct roots_touch *device;
int32_t slot;
double x, y;
struct wl_list link;
};
struct roots_input {
struct roots_config *config;
struct roots_server *server;
@ -104,9 +105,16 @@ struct roots_input {
struct wl_listener cursor_motion_absolute;
struct wl_listener cursor_button;
struct wl_listener cursor_axis;
struct wl_listener cursor_touch_down;
struct wl_listener cursor_touch_up;
struct wl_listener cursor_touch_motion;
struct wl_listener cursor_tool_axis;
struct wl_listener cursor_tool_tip;
struct wl_list touch_points;
struct wl_listener pointer_grab_end;
struct wl_listener request_set_cursor;
@ -120,6 +128,8 @@ void pointer_add(struct wlr_input_device *device, struct roots_input *input);
void pointer_remove(struct wlr_input_device *device, struct roots_input *input);
void keyboard_add(struct wlr_input_device *device, struct roots_input *input);
void keyboard_remove(struct wlr_input_device *device, struct roots_input *input);
void touch_add(struct wlr_input_device *device, struct roots_input *input);
void touch_remove(struct wlr_input_device *device, struct roots_input *input);
void tablet_tool_add(struct wlr_input_device *device, struct roots_input *input);
void tablet_tool_remove(struct wlr_input_device *device, struct roots_input *input);

View file

@ -8,13 +8,12 @@
struct roots_wl_shell_surface {
struct roots_view *view;
// TODO: Maybe destroy listener should go in roots_view
struct wl_listener destroy;
struct wl_listener ping_timeout;
struct wl_listener request_move;
struct wl_listener request_resize;
struct wl_listener request_set_fullscreen;
struct wl_listener request_set_maximized;
struct wl_listener surface_commit;
};
@ -25,15 +24,13 @@ struct roots_xdg_surface_v6 {
// TODO: Maybe destroy listener should go in roots_view
struct wl_listener commit;
struct wl_listener destroy;
struct wl_listener ping_timeout;
struct wl_listener request_minimize;
struct wl_listener request_move;
struct wl_listener request_resize;
struct wl_listener request_show_window_menu;
};
struct roots_xwayland_surface {
struct roots_view *view;
// TODO: Maybe destroy listener should go in roots_view
struct wl_listener destroy;
struct wl_listener request_configure;

View file

@ -3,7 +3,7 @@
#include <wayland-server.h>
#include <wlr/backend/session.h>
#include <wlr/egl.h>
#include <wlr/render/egl.h>
struct wlr_backend_impl;

View file

@ -3,7 +3,7 @@
#include <stdbool.h>
#include <wlr/backend.h>
#include <wlr/egl.h>
#include <wlr/render/egl.h>
struct wlr_backend_impl {
bool (*start)(struct wlr_backend *backend);

View file

@ -1,8 +1,9 @@
#ifndef WLR_INTERFACES_WLR_OUTPUT_H
#define WLR_INTERFACES_WLR_OUTPUT_H
#include <wlr/types/wlr_output.h>
#include <stdbool.h>
#include <wlr/types/wlr_output.h>
#include <wlr/backend.h>
struct wlr_output_impl {
void (*enable)(struct wlr_output *output, bool enable);
@ -21,7 +22,8 @@ struct wlr_output_impl {
uint16_t (*get_gamma_size)(struct wlr_output *output);
};
void wlr_output_init(struct wlr_output *output, const struct wlr_output_impl *impl);
void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend,
const struct wlr_output_impl *impl);
void wlr_output_free(struct wlr_output *output);
void wlr_output_update_matrix(struct wlr_output *output);
struct wl_global *wlr_output_create_global(

View file

@ -16,6 +16,7 @@ struct wlr_output_impl;
struct wlr_output {
const struct wlr_output_impl *impl;
struct wlr_backend *backend;
struct wl_global *wl_global;
struct wl_list wl_resources;
@ -57,6 +58,9 @@ struct wlr_output {
struct wl_listener surface_destroy;
} cursor;
// the output position in layout space reported to clients
int32_t lx, ly;
void *data;
};
@ -67,6 +71,7 @@ bool wlr_output_set_mode(struct wlr_output *output,
struct wlr_output_mode *mode);
void wlr_output_transform(struct wlr_output *output,
enum wl_output_transform transform);
void wlr_output_set_position(struct wlr_output *output, int32_t lx, int32_t ly);
bool wlr_output_set_cursor(struct wlr_output *output,
const uint8_t *buf, int32_t stride, uint32_t width, uint32_t height,
int32_t hotspot_x, int32_t hotspot_y);