github.com/jmigpin/editor@v1.6.0/driver/xdriver/dragndrop/finished.go (about) 1 package dragndrop 2 3 import "github.com/BurntSushi/xgb/xproto" 4 5 type FinishedEvent struct { 6 Window xproto.Window 7 Accepted bool 8 Action xproto.Atom 9 } 10 11 func (f *FinishedEvent) Data32() []uint32 { 12 acc := uint32(0) 13 if f.Accepted { 14 acc = 1 // first bit of uint32 15 } else { 16 f.Action = xproto.AtomNone 17 } 18 return []uint32{ 19 uint32(f.Window), 20 acc, 21 uint32(f.Action), 22 uint32(0), // pad 23 uint32(0), // pad 24 } 25 }