Add scale parameter to wlr_cursor_set_image

This commit is contained in:
emersion 2017-11-11 17:27:44 +01:00
parent 2bee288090
commit ac1573b0e7
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
6 changed files with 35 additions and 18 deletions

View file

@ -60,9 +60,22 @@ void wlr_cursor_warp_absolute(struct wlr_cursor *cur,
void wlr_cursor_move(struct wlr_cursor *cur, struct wlr_input_device *dev,
double delta_x, double delta_y);
/**
* Set the cursor image. stride is given in bytes. If pixels is NULL, hides the
* cursor.
*
* If scale isn't zero, the image is only set on outputs having the provided
* scale.
*/
void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels,
int32_t stride, uint32_t width, uint32_t height, int32_t hotspot_x,
int32_t hotspot_y);
int32_t hotspot_y, uint32_t scale);
/**
* Set the cursor surface. The surface can be committed to update the cursor
* image. The surface position is substracted from the hotspot. A NULL surface
* commit hides the cursor.
*/
void wlr_cursor_set_surface(struct wlr_cursor *cur, struct wlr_surface *surface,
int32_t hotspot_x, int32_t hotspot_y);