mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 17:05:38 +00:00
io/pointer: added CursorNameOp
The cursor can now be customized for a given area. Signed-off-by: pierre <pierre.curto@gmail.com>
This commit is contained in:
@@ -30,6 +30,7 @@ const (
|
||||
TypeAux
|
||||
TypeClip
|
||||
TypeProfile
|
||||
TypeCursor
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -55,6 +56,7 @@ const (
|
||||
TypeAuxLen = 1
|
||||
TypeClipLen = 1 + 4*4 + 4 + 2 + 4
|
||||
TypeProfileLen = 1
|
||||
TypeCursorLen = 1 + 1
|
||||
)
|
||||
|
||||
func (t OpType) Size() int {
|
||||
@@ -81,12 +83,13 @@ func (t OpType) Size() int {
|
||||
TypeAuxLen,
|
||||
TypeClipLen,
|
||||
TypeProfileLen,
|
||||
TypeCursorLen,
|
||||
}[t-firstOpIndex]
|
||||
}
|
||||
|
||||
func (t OpType) NumRefs() int {
|
||||
switch t {
|
||||
case TypeKeyInput, TypePointerInput, TypeProfile, TypeCall, TypeClipboardRead, TypeClipboardWrite:
|
||||
case TypeKeyInput, TypePointerInput, TypeProfile, TypeCall, TypeClipboardRead, TypeClipboardWrite, TypeCursor:
|
||||
return 1
|
||||
case TypeImage:
|
||||
return 2
|
||||
|
||||
Reference in New Issue
Block a user