~eliasnaur/gio-patches

gio: io/pointer: add new pointers v1 PROPOSED

~pierrec: 1
 io/pointer: add new pointers

 2 files changed, 32 insertions(+), 0 deletions(-)
#675187 apple.yml success
#675188 freebsd.yml success
#675189 linux.yml success
#675190 openbsd.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~eliasnaur/gio-patches/patches/28465/mbox | git am -3
Learn more about email & git

[PATCH gio] io/pointer: add new pointers Export this patch

From: Pierre Curto <pierre.curto@gmail.com>

Add resize pointer cursor names for resize operations
in preparation for the window decorations patch.

Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
---
 app/os_wayland.go     | 16 ++++++++++++++++
 io/pointer/pointer.go | 16 ++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/app/os_wayland.go b/app/os_wayland.go
index 0424b75f..311a7389 100644
--- a/app/os_wayland.go
+++ b/app/os_wayland.go
@@ -1018,6 +1018,22 @@ func (w *window) SetCursor(name pointer.CursorName) {
		name = "left_side"
	case pointer.CursorGrab:
		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))
	defer C.free(unsafe.Pointer(cname))
diff --git a/io/pointer/pointer.go b/io/pointer/pointer.go
index 97987f7c..adefea4b 100644
--- a/io/pointer/pointer.go
+++ b/io/pointer/pointer.go
@@ -110,6 +110,22 @@ const (
	CursorGrab CursorName = "grab"
	// CursorNone hides the cursor. To show it again, use any other cursor.
	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 (
-- 
2.32.0
gio/patches: SUCCESS in 19m27s

[io/pointer: add new pointers][0] from [~pierrec][1]

[0]: https://lists.sr.ht/~eliasnaur/gio-patches/patches/28465
[1]: mailto:pierre.curto@gmail.com

✓ #675187 SUCCESS gio/patches/apple.yml   https://builds.sr.ht/~eliasnaur/job/675187
✓ #675190 SUCCESS gio/patches/openbsd.yml https://builds.sr.ht/~eliasnaur/job/675190
✓ #675189 SUCCESS gio/patches/linux.yml   https://builds.sr.ht/~eliasnaur/job/675189
✓ #675188 SUCCESS gio/patches/freebsd.yml https://builds.sr.ht/~eliasnaur/job/675188
Thank you, merged.

Elias