forked from joejulian/gio
io/pointer: add new pointers
Add resize pointer cursor names for resize operations in preparation for the window decorations patch. Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
This commit is contained in:
@@ -1018,6 +1018,22 @@ func (w *window) SetCursor(name pointer.CursorName) {
|
|||||||
name = "left_side"
|
name = "left_side"
|
||||||
case pointer.CursorGrab:
|
case pointer.CursorGrab:
|
||||||
name = "hand1"
|
name = "hand1"
|
||||||
|
case pointer.CursorTopLeftResize:
|
||||||
|
name = "top_left_corner"
|
||||||
|
case pointer.CursorTopRightResize:
|
||||||
|
name = "bottom_left_corner"
|
||||||
|
case pointer.CursorBottomLeftResize:
|
||||||
|
name = "top_right_corner"
|
||||||
|
case pointer.CursorBottomRightResize:
|
||||||
|
name = "bottom_right_corner"
|
||||||
|
case pointer.CursorLeftResize:
|
||||||
|
name = "right_side"
|
||||||
|
case pointer.CursorRightResize:
|
||||||
|
name = "left_side"
|
||||||
|
case pointer.CursorTopResize:
|
||||||
|
name = "top_side"
|
||||||
|
case pointer.CursorBottomResize:
|
||||||
|
name = "bottom_side"
|
||||||
}
|
}
|
||||||
cname := C.CString(string(name))
|
cname := C.CString(string(name))
|
||||||
defer C.free(unsafe.Pointer(cname))
|
defer C.free(unsafe.Pointer(cname))
|
||||||
|
|||||||
@@ -110,6 +110,22 @@ const (
|
|||||||
CursorGrab CursorName = "grab"
|
CursorGrab CursorName = "grab"
|
||||||
// CursorNone hides the cursor. To show it again, use any other cursor.
|
// CursorNone hides the cursor. To show it again, use any other cursor.
|
||||||
CursorNone CursorName = "none"
|
CursorNone CursorName = "none"
|
||||||
|
// CursorTopLeftResize is the cursor for top-left corner resizing.
|
||||||
|
CursorTopLeftResize = "top-left-resize"
|
||||||
|
// CursorTopRightResize is the cursor for top-right corner resizing.
|
||||||
|
CursorTopRightResize = "top-right-resize"
|
||||||
|
// CursorBottomLeftResize is the cursor for bottom-left corner resizing.
|
||||||
|
CursorBottomLeftResize = "bottom-left-resize"
|
||||||
|
// CursorBottomRightResize is the cursor for bottom-right corner resizing.
|
||||||
|
CursorBottomRightResize = "bottom-right-resize"
|
||||||
|
// CursorLeftResize is the cursor for left resizing.
|
||||||
|
CursorLeftResize = "left-resize"
|
||||||
|
// CursorRightResize is the cursor for right resizing.
|
||||||
|
CursorRightResize = "right-resize"
|
||||||
|
// CursorTopResize is the cursor for top resizing.
|
||||||
|
CursorTopResize = "top-resize"
|
||||||
|
// CursorBottomResize is the cursor for bottom resizing.
|
||||||
|
CursorBottomResize = "bottom-resize"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
Reference in New Issue
Block a user