blob: 152f176f8d94a1957f8e3bdea39b3d4ebc52fd4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include <stdlib.h>
#include "cursor-shape.h"
#include "debug.h"
#include "util.h"
const char *
cursor_shape_to_string(enum cursor_shape shape)
{
static const char *const table[] = {
[CURSOR_SHAPE_NONE] = NULL,
[CURSOR_SHAPE_HIDDEN] = "hidden",
[CURSOR_SHAPE_LEFT_PTR] = "left_ptr",
[CURSOR_SHAPE_TEXT] = "text",
[CURSOR_SHAPE_TEXT_FALLBACK] = "xterm",
[CURSOR_SHAPE_TOP_LEFT_CORNER] = "top_left_corner",
[CURSOR_SHAPE_TOP_RIGHT_CORNER] = "top_right_corner",
[CURSOR_SHAPE_BOTTOM_LEFT_CORNER] = "bottom_left_corner",
[CURSOR_SHAPE_BOTTOM_RIGHT_CORNER] = "bottom_right_corner",
[CURSOR_SHAPE_LEFT_SIDE] = "left_side",
[CURSOR_SHAPE_RIGHT_SIDE] = "right_side",
[CURSOR_SHAPE_TOP_SIDE] = "top_side",
[CURSOR_SHAPE_BOTTOM_SIDE] = "bottom_side",
};
xassert(shape <= ALEN(table));
return table[shape];
}
|