Merge branch 'master' of github.com:andlabs/ui
This commit is contained in:
commit
28012570b0
|
@ -2,7 +2,7 @@
|
|||
|
||||
package ui
|
||||
|
||||
// #cgo LDFLAGS: ${SRCDIR}/static_windows_386.o ${SRCDIR}/libui_windows_386.a ${SRCDIR}/libui_windows_386.res.o
|
||||
// #cgo LDFLAGS: ${SRCDIR}/libui_windows_386.a ${SRCDIR}/libui_windows_386.res.o
|
||||
// /* note the order; also note the lack of uuid */
|
||||
// #cgo LDFLAGS: -luser32 -lkernel32 -lusp10 -lgdi32 -lcomctl32 -luxtheme -lmsimg32 -lcomdlg32 -ld2d1 -ldwrite -lole32 -loleaut32 -loleacc -static -static-libgcc -static-libstdc++
|
||||
import "C"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
package ui
|
||||
|
||||
// #cgo LDFLAGS: ${SRCDIR}/static_windows_amd64.o ${SRCDIR}/libui_windows_amd64.a ${SRCDIR}/libui_windows_amd64.res.o
|
||||
// #cgo LDFLAGS: ${SRCDIR}/libui_windows_amd64.a ${SRCDIR}/libui_windows_amd64.res.o
|
||||
// /* note the order; also note the lack of uuid */
|
||||
// #cgo LDFLAGS: -luser32 -lkernel32 -lusp10 -lgdi32 -lcomctl32 -luxtheme -lmsimg32 -lcomdlg32 -ld2d1 -ldwrite -lole32 -loleaut32 -loleacc -static -static-libgcc -static-libstdc++
|
||||
import "C"
|
||||
|
|
|
@ -8,30 +8,34 @@ import "C"
|
|||
// TODO
|
||||
func MsgBoxError(w *Window, title string, description string) {
|
||||
ctitle := C.CString(title)
|
||||
defer freestr(ctitle)
|
||||
cdescription := C.CString(description)
|
||||
defer freestr(cdescription)
|
||||
C.uiMsgBoxError(w.w, ctitle, cdescription)
|
||||
freestr(ctitle)
|
||||
freestr(cdescription)
|
||||
}
|
||||
|
||||
func OpenFile(w *Window) string {
|
||||
cname := C.uiOpenFile(w.w)
|
||||
name := C.GoString(cname)
|
||||
C.uiFreeText(cname)
|
||||
return name
|
||||
if cname == nil {
|
||||
return ""
|
||||
}
|
||||
defer C.uiFreeText(cname)
|
||||
return C.GoString(cname)
|
||||
}
|
||||
|
||||
func SaveFile(w *Window) string {
|
||||
cname := C.uiSaveFile(w.w)
|
||||
name := C.GoString(cname)
|
||||
C.uiFreeText(cname)
|
||||
return name
|
||||
if cname == nil {
|
||||
return ""
|
||||
}
|
||||
defer C.uiFreeText(cname)
|
||||
return C.GoString(cname)
|
||||
}
|
||||
|
||||
func MsgBox(w *Window, title string, description string) {
|
||||
ctitle := C.CString(title)
|
||||
defer freestr(ctitle)
|
||||
cdescription := C.CString(description)
|
||||
defer freestr(cdescription)
|
||||
C.uiMsgBox(w.w, ctitle, cdescription)
|
||||
freestr(ctitle)
|
||||
freestr(cdescription)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue