mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
Before this patch, we used legacy X11 xcursor names, and didn't really have any fallback handling in place (we only tried to fallback to "xterm", regardless of which cursor shape we were trying to load). This patch changes two things: 1. Improved fallback support. cursor_shape_to_string() now returns a list of strings. This allows us to have per-shape fallbacks, and any number of fallbacks. 2. We prefer CSS xcursor names over legacy X11 names.
29 lines
735 B
C
29 lines
735 B
C
#pragma once
|
|
|
|
#include <cursor-shape-v1.h>
|
|
|
|
enum cursor_shape {
|
|
CURSOR_SHAPE_NONE,
|
|
CURSOR_SHAPE_CUSTOM,
|
|
CURSOR_SHAPE_HIDDEN,
|
|
|
|
CURSOR_SHAPE_LEFT_PTR,
|
|
CURSOR_SHAPE_TEXT,
|
|
CURSOR_SHAPE_TOP_LEFT_CORNER,
|
|
CURSOR_SHAPE_TOP_RIGHT_CORNER,
|
|
CURSOR_SHAPE_BOTTOM_LEFT_CORNER,
|
|
CURSOR_SHAPE_BOTTOM_RIGHT_CORNER,
|
|
CURSOR_SHAPE_LEFT_SIDE,
|
|
CURSOR_SHAPE_RIGHT_SIDE,
|
|
CURSOR_SHAPE_TOP_SIDE,
|
|
CURSOR_SHAPE_BOTTOM_SIDE,
|
|
|
|
CURSOR_SHAPE_COUNT,
|
|
};
|
|
|
|
const char *const *cursor_shape_to_string(enum cursor_shape shape);
|
|
|
|
enum wp_cursor_shape_device_v1_shape cursor_shape_to_server_shape(
|
|
enum cursor_shape shape);
|
|
enum wp_cursor_shape_device_v1_shape cursor_string_to_server_shape(
|
|
const char *xcursor);
|