github.com/jmigpin/editor@v1.6.0/util/uiutil/widget/context.go (about) 1 package widget 2 3 import ( 4 "image/draw" 5 6 "github.com/jmigpin/editor/util/uiutil/event" 7 ) 8 9 type UIContext interface { 10 Error(error) 11 12 ImageContext 13 CursorContext 14 // Image() draw.Image // TODO 15 // SetCursor(event.Cursor) // TODO 16 17 RunOnUIGoRoutine(f func()) 18 SetClipboardData(event.ClipboardIndex, string) 19 GetClipboardData(event.ClipboardIndex, func(string, error)) 20 } 21 22 type ImageContext interface { 23 Image() draw.Image 24 } 25 26 type CursorContext interface { 27 SetCursor(event.Cursor) 28 }