Skip to content

mouse cursor enhancements #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions include/compositor.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,21 @@ struct compositor {

struct {
bool is_enabled;
int cursor_size;
const struct cursor_icon *current_cursor;
int current_rotation;
int hot_x, hot_y;
int x, y;

int width;
int height;
int bpp;
int depth;
int pitch;
int size;

bool has_buffer;
int buffer_depth;
int buffer_pitch;
int buffer_width;
int buffer_height;
int buffer_size;
uint32_t drm_fb_id;
uint32_t gem_bo_handle;
uint32_t *buffer;
int x, y;
} cursor;
};

Expand Down Expand Up @@ -235,12 +238,14 @@ int compositor_remove_view_callbacks(
int64_t view_id
);

int compositor_set_cursor_enabled(bool enabled);
int compositor_apply_cursor_state(
bool is_enabled,
int rotation,
double device_pixel_ratio
);

int compositor_set_cursor_pos(int x, int y);

int compositor_apply_cursor_skin_for_rotation(int rotation);

int compositor_initialize(
struct drmdev *drmdev
);
Expand Down
2 changes: 1 addition & 1 deletion include/cursor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ struct cursor_icon {
uint32_t *data;
};

extern const struct cursor_icon cursors[4];
extern const struct cursor_icon cursors[5];
extern int n_cursors;

#endif
Loading