mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
30 lines
402 B
Go
30 lines
402 B
Go
package gtk
|
|
|
|
/*
|
|
#cgo pkg-config: gtk+-3.0
|
|
|
|
#include "gtk.h"
|
|
*/
|
|
import "C"
|
|
|
|
import (
|
|
"sync"
|
|
)
|
|
|
|
var mu = sync.Mutex{}
|
|
|
|
func DragWindow(files []string) {
|
|
mu.Lock()
|
|
defer mu.Unlock()
|
|
|
|
size := C.int(len(files))
|
|
urisUnsafe := C.uris_make(size);
|
|
defer C.uris_free(urisUnsafe, size)
|
|
|
|
for i, file := range files {
|
|
C.uris_set_file(urisUnsafe, C.CString(file), C.int(i))
|
|
}
|
|
|
|
C.drag_window(urisUnsafe)
|
|
}
|