diff --git a/CHANGELOG.md b/CHANGELOG.md index 45fd07b..cd681ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased - Implement `Hash` for `ParseError`. +- Add `CursorIcon::DndAsk` and `CursorIcon::AllResize` from the wayland-protocols version 1.42 ## 1.1.0 diff --git a/src/lib.rs b/src/lib.rs index e5ed8fa..c079dcb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -252,10 +252,24 @@ pub enum CursorIcon { /// Indicates that something can be zoomed in. Often rendered as a /// magnifying glass with a "-" in the center of the glass. ZoomOut, + + /// Indicates that the user will select the action that will be carried out. + /// + /// This is a non-standard extension of the w3c standard used in freedesktop + /// cursor icon themes. + DndAsk, + + /// Indicates that something can be moved or resized in any direction. + /// + /// This is a non-standard extension of the w3c standard used in freedesktop + /// cursor icon themes. + AllResize, } impl CursorIcon { - /// The name of the cursor icon as defined in w3c standard. + /// The name of the cursor icon as defined in the w3c standard. + /// Non-standard cursors such as "DndAsk" and "AllResize" are translated as + /// "dnd-ask" and "all-resize" respectively. /// /// This name most of the time could be passed as is to cursor loading /// libraries on X11/Wayland and could be used as-is on web. @@ -319,6 +333,8 @@ impl CursorIcon { CursorIcon::AllScroll => "all-scroll", CursorIcon::ZoomIn => "zoom-in", CursorIcon::ZoomOut => "zoom-out", + CursorIcon::DndAsk => "dnd-ask", + CursorIcon::AllResize => "all-resize", } } @@ -363,6 +379,8 @@ impl CursorIcon { CursorIcon::AllScroll => &["size_all"], CursorIcon::ZoomIn => &[], CursorIcon::ZoomOut => &[], + CursorIcon::DndAsk => &["copy"], + CursorIcon::AllResize => &["move"], } } }