mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
app,io/pointer: [API] remove CursorNameOp and rename CursorName -> Cursor
It's now possible to directly user pointer.Cursor to add to the ops. pointer.CursorText.Add(gtx.Ops) This is an API change. Use pointer.Cursor directly instead of CursorNameOp. Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
+4
-4
@@ -1338,9 +1338,9 @@ func (w *window) Perform(system.Action) {}
|
||||
|
||||
func (w *window) Raise() {}
|
||||
|
||||
func (w *window) SetCursor(name pointer.CursorName) {
|
||||
func (w *window) SetCursor(cursor pointer.Cursor) {
|
||||
runInJVM(javaVM(), func(env *C.JNIEnv) {
|
||||
setCursor(env, w.view, name)
|
||||
setCursor(env, w.view, cursor)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1379,8 +1379,8 @@ var androidCursor = [...]uint16{
|
||||
pointer.CursorNorthWestSouthEastResize: 1017, // TYPE_TOP_LEFT_DIAGONAL_DOUBLE_ARROW
|
||||
}
|
||||
|
||||
func setCursor(env *C.JNIEnv, view C.jobject, name pointer.CursorName) {
|
||||
curID := androidCursor[name]
|
||||
func setCursor(env *C.JNIEnv, view C.jobject, cursor pointer.Cursor) {
|
||||
curID := androidCursor[cursor]
|
||||
callVoidMethod(env, view, gioView.setCursor, jvalue(curID))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user