github.com/rajveermalviya/gamen@v0.1.2-0.20220930195403-9be15877c1aa/internal/common/xcursor/cursors.go (about) 1 //go:build linux 2 3 package xcursor 4 5 import ( 6 "strconv" 7 8 "github.com/rajveermalviya/gamen/cursors" 9 ) 10 11 func ToXcursorName(icon cursors.Icon) []string { 12 switch icon { 13 case cursors.Default: 14 return []string{"default"} 15 case cursors.ContextMenu: 16 return []string{"context-menu"} 17 case cursors.Help: 18 return []string{"help", "question_arrow"} 19 case cursors.Pointer: 20 return []string{"pointer", "hand"} 21 case cursors.Progress: 22 return []string{"progress", "left_ptr_watch"} 23 case cursors.Wait: 24 return []string{"wait", "watch"} 25 case cursors.Cell: 26 return []string{"cell", "crosshair"} 27 case cursors.Crosshair: 28 return []string{"crosshair", "cross"} 29 case cursors.Text: 30 return []string{"text", "xterm"} 31 case cursors.VerticalText: 32 return []string{"vertical-text", "xterm"} 33 case cursors.Alias: 34 return []string{"alias", "dnd-link"} 35 case cursors.Copy: 36 return []string{"copy", "dnd-copy"} 37 case cursors.Move: 38 return []string{"move", "dnd-move"} 39 case cursors.NoDrop: 40 return []string{"no-drop", "dnd-none"} 41 case cursors.NotAllowed: 42 return []string{"not-allowed", "crossed_circle"} 43 case cursors.Grab: 44 return []string{"grab", "hand2"} 45 case cursors.Grabbing: 46 return []string{"grabbing", "hand2"} 47 case cursors.AllScroll: 48 return []string{"all-scroll"} 49 case cursors.ColResize: 50 return []string{"col-resize", "h_double_arrow"} 51 case cursors.RowResize: 52 return []string{"row-resize", "v_double_arrow"} 53 case cursors.NResize: 54 return []string{"n-resize", "top_side"} 55 case cursors.EResize: 56 return []string{"e-resize", "right_side"} 57 case cursors.SResize: 58 return []string{"s-resize", "bottom_side"} 59 case cursors.WResize: 60 return []string{"w-resize", "left_side"} 61 case cursors.NEResize: 62 return []string{"ne-resize", "top_right_corner"} 63 case cursors.NWResize: 64 return []string{"nw-resize", "top_left_corner"} 65 case cursors.SEResize: 66 return []string{"se-resize", "bottom_right_corner"} 67 case cursors.SWResize: 68 return []string{"sw-resize", "bottom_left_corner"} 69 case cursors.EWResize: 70 return []string{"ew-resize", "h_double_arrow"} 71 case cursors.NSResize: 72 return []string{"ns-resize", "v_double_arrow"} 73 case cursors.NESWResize: 74 return []string{"nesw-resize", "fd_double_arrow"} 75 case cursors.NWSEResize: 76 return []string{"nwse-resize", "bd_double_arrow"} 77 case cursors.ZoomIn: 78 return []string{"zoom-in"} 79 case cursors.ZoomOut: 80 return []string{"zoom-out"} 81 } 82 83 panic("invalid cursor: " + strconv.FormatUint(uint64(icon), 10)) 84 }