mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
implement cursor and device geometry mapping
This commit is contained in:
parent
d0cf8d0d01
commit
0a97b68278
10 changed files with 186 additions and 5 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include <wlr/types/wlr_input_device.h>
|
||||
#include <wlr/types/wlr_geometry.h>
|
||||
#include <wlr/xcursor.h>
|
||||
|
||||
struct wlr_cursor_state;
|
||||
|
|
@ -87,12 +88,13 @@ void wlr_cursor_map_input_to_output(struct wlr_cursor *cur,
|
|||
/**
|
||||
* Maps this cursor to an arbitrary region on the associated wlr_output_layout.
|
||||
*/
|
||||
//void wlr_cursor_map_to_region(struct wlr_cursor *cur, struct wlr_geometry *geo);
|
||||
void wlr_cursor_map_to_region(struct wlr_cursor *cur, struct wlr_geometry *geo);
|
||||
|
||||
/**
|
||||
* Maps inputs from this input device to an arbitrary region on the associated
|
||||
* wlr_output_layout.
|
||||
*/
|
||||
//void wlr_cursor_map_input_to_region(struct wlr_cursor *cur, struct wlr_input_device *dev, struct wlr_geometry *geo);
|
||||
void wlr_cursor_map_input_to_region(struct wlr_cursor *cur,
|
||||
struct wlr_input_device *dev, struct wlr_geometry *geo);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
12
include/wlr/types/wlr_geometry.h
Normal file
12
include/wlr/types/wlr_geometry.h
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#ifndef _WLR_TYPES_GEOMETRY_H
|
||||
#define _WLR_TYPES_GEOMETRY_H
|
||||
|
||||
struct wlr_geometry {
|
||||
int x, y;
|
||||
int width, height;
|
||||
};
|
||||
|
||||
void wlr_geometry_closest_boundary(struct wlr_geometry *geo, double x, double y,
|
||||
int *dest_x, int *dest_y, double *distance);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue