currust 1.3.4

A tool to convert Windows (CUR/ANI) cursor themes to Linux (Xcursor) cursor themes.
//! Symlinks for X11 cursor names in [`super::theme::CursorTheme`].
//!
//! The first string in each list is treated as
//! the "concrete" file that symlinks point to.
//!
//! Derived from [win2xcur-batch](https://github.com/khayalhus/win2xcur-batch/blob/main/map.json),
//! with some modifications.

use super::theme::CursorType;

pub(super) const ARROW: &[&str] = &["arrow", "default", "left_ptr", "top_left_arrow"];
pub(super) const HAND: &[&str] = &[
    "alias",
    "dnd-link",
    "hand",
    "hand1",
    "hand2",
    "link",
    "openhand",
    "pointer",
    "pointing_hand",
    "3085a0e285430894940527032f8b26df",
    "640fb0e74195791501fd1ed57b41487f",
    "9d800788f1b08800ae810202380a0822",
    "a2a266d0498c3104214a47bd64ab0fc8",
    "b66166c04f8c3109214a4fbd64a50fc8",
    "e29285e634086352946a0e7090d73106",
];

pub(super) const WATCH: &[&str] = &["wait", "watch"];
pub(super) const LEFT_PTR_WATCH: &[&str] = &[
    "half-busy",
    "left_ptr_watch",
    "progress",
    "00000000000000020006000e7e9ffc3f",
    "08e8e1c95fe2fc01f976f1e063a24ccd",
    "3ecb610c1bf2410f44200f48c40d3599",
];

pub(super) const HELP: &[&str] = &[
    "dnd-ask",
    "help",
    "left_ptr_help",
    "question_arrow",
    "whats_this",
    "5c6cd98b3f3ebcb1f9c7f1c204630408",
    "d9ce0ab605698f320427677b458ad60b",
];

pub(super) const TEXT: &[&str] = &["ibeam", "text", "xterm", "vertical-text"];
pub(super) const PENCIL: &[&str] = &["draft", "pencil"];
pub(super) const CROSSHAIR: &[&str] = &[
    "cell",
    "color-picker",
    "cross_reverse",
    "cross",
    "crosshair",
    "diamond_cross",
    "plus",
    "tcross",
];

pub(super) const FORBIDDEN: &[&str] = &[
    "circle",
    "crossed_circle",
    "dnd-no-drop",
    "forbidden",
    "not-allowed",
    "no-drop",
    "pirate",
    "03b6e0fcb3499374a867c041f52298f0",
];

pub(super) const NS_RESIZE: &[&str] = &[
    "top_side",
    "bottom_side",
    "n-resize",
    "ns-resize",
    "row-resize",
    "s-resize",
    "sb_v_double_arrow",
    "size_ver",
    "split_v",
    "v_double_arrow",
    "00008160000006810000408080010102",
    "2870a09082c103050810ffdffffe0204",
];

pub(super) const EW_RESIZE: &[&str] = &[
    "col-resize",
    "down-arrow",
    "e-resize",
    "ew-resize",
    "h_double_arrow",
    "left_side",
    "left-arrow",
    "right_side",
    "right-arrow",
    "sb_h_double_arrow",
    "size_hor",
    "split_h",
    "w-resize",
    "14fef782d02440884392942c11205230",
    "028006030e0e7ebffc7f7070c0600140",
];

pub(super) const NWSE_RESIZE: &[&str] = &[
    "bottom_right_corner",
    "nw-resize",
    "nwse-resize",
    "se-resize",
    "size_fdiag",
    "top_left_corner",
    "ul_angle",
    "c7088f0f3e6c8088236ef8e1e3e70000",
];

pub(super) const NESW_RESIZE: &[&str] = &[
    "bd_double_arrow",
    "bottom_left_corner",
    "fd_double_arrow",
    "ne-resize",
    "nesw-resize",
    "size_bdiag",
    "sw-resize",
    "top_right_corner",
    "ur_angle",
    "fcf1c3c7cd4491d801f1e1c78f100000",
];

pub(super) const MOVE: &[&str] = &[
    "size_all",
    "all-scroll",
    "closedhand",
    "dnd-move",
    "dnd-none",
    "fleur",
    "grab",
    "grabbing",
    "move",
    "4498f0e0c1937ffe01fd06f973665830",
    "9081237383d90e509aa00f00170e968f",
];

pub(super) const CENTER_PTR: &[&str] = &[
    "up_arrow",
    "right_ptr",
    "draft_large",
    "draft_small",
    "up-arrow",
    "center_ptr",
];

pub(super) const fn get_symlinks(r#type: &CursorType) -> &'static [&'static str] {
    use CursorType::*;

    match r#type {
        Arrow => ARROW,
        Hand => HAND,
        Watch => WATCH,
        LeftPtrWatch => LEFT_PTR_WATCH,
        Help => HELP,
        Text => TEXT,
        Pencil => PENCIL,
        Crosshair => CROSSHAIR,
        Forbidden => FORBIDDEN,
        NsResize => NS_RESIZE,
        EwResize => EW_RESIZE,
        NwseResize => NWSE_RESIZE,
        NeswResize => NESW_RESIZE,
        Move => MOVE,
        CenterPtr => CENTER_PTR,
    }
}