skelterjohn / go.uik Goto Github PK
View Code? Open in Web Editor NEWThis project is "closed". If I begin again, it will be from scratch
This project is "closed". If I begin again, it will be from scratch
I copy/pasted your widget tutorial code, built it, and tried to run it.
peter@sofia:~/src/tmp/gowid$ go get -v .
github.com/skelterjohn/geom (download)
github.com/skelterjohn/go.uik (download)
code.google.com/p/draw2d (download)
code.google.com/p/freetype-go (download)
github.com/skelterjohn/go.wde (download)
github.com/skelterjohn/geom
image/draw
code.google.com/p/freetype-go/freetype/truetype
code.google.com/p/freetype-go/freetype/raster
github.com/skelterjohn/go.wde
code.google.com/p/freetype-go/freetype
code.google.com/p/draw2d/draw2d
github.com/skelterjohn/go.uik
github.com/skelterjohn/go.uik/layouts
github.com/skelterjohn/go.uik/widgets
tmp/gowid
peter@sofia:~/src/tmp/gowid$ gowid
panic: no wde backend imported
goroutine 1 [running]:
github.com/skelterjohn/go%2ewde._func_001()
/Users/peter/src/github.com/skelterjohn/go.wde/wde.go:81 +0x47
github.com/skelterjohn/go%2ewde.Run()
/Users/peter/src/github.com/skelterjohn/go.wde/wde.go:77 +0x1d
main.main()
/Users/peter/src/tmp/gowid/x.go:15 +0x26
. . .
Am I missing something?
The https://www.dropbox.com/sh/89guvpsbtlcexf1/t4VN0RZ2oq/rb/vision.pdf link in widgettut.md is dead.
go get github.com/skelterjohn/go.uik
go/src/pkg/github.com/skelterjohn/go.uik/fonts.go:34: not enough arguments in call to font.Bounds
go/src/pkg/github.com/skelterjohn/go.uik/fonts.go:35: font.UnitsPerEm undefined (type *truetype.Font has no field or method UnitsPerEm)
I tried to build the uikradio on windows 7 64 bit using 64bit go (tip):
D:\dev\go-3rdparty\src\github.com\skelterjohn\go.uik\examples\uikradio>go build
# github.com/skelterjohn/go.wde/win
..\..\..\go.wde\win\events_windows.go:55: cannot use msg (type uint32) as type uint in function argument
..\..\..\go.wde\win\events_windows.go:116: cannot use 24 (type uint32) as type uint in assignment
..\..\..\go.wde\win\events_windows.go:170: cannot use msg (type uint32) as type uint in function argument
..\..\..\go.wde\win\events_windows.go:173: cannot use msg (type uint32) as type uint in function argument
..\..\..\go.wde\win\events_windows.go:184: cannot use msg (type uint32) as type uint in function argument
..\..\..\go.wde\win\utils_windows.go:92: cannot use 80 (type uint32) as type uint in assignment
..\..\..\go.wde\win\win_windows.go:77: cannot use w32.CW_USEDEFAULT + int32(width) (type int32) as type int in field value
..\..\..\go.wde\win\win_windows.go:78: cannot use w32.CW_USEDEFAULT + int32(height) (type int32) as type int in field value
..\..\..\go.wde\win\win_windows.go:80: undefined: w32.AdjustWindowRectEx
..\..\..\go.wde\win\win_windows.go:177: cannot use 40 (type uint32) as type uint in assignment
..\..\..\go.wde\win\win_windows.go:177: too many errors
I'm currently migrating an application I'm working on from go-ui to go.uik
I discovered an issue while building on Linux, and the fixes are simple (incorrect and missing casts)
I got the following errors when trying to build:
../../github.com/skelterjohn/go.wde/xgb/icon.go:57: cannot use width (type int) as type uint in field value
../../github.com/skelterjohn/go.wde/xgb/icon.go:58: cannot use height (type int) as type uint in field value
../../github.com/skelterjohn/go.wde/xgb/icon.go:59: cannot use data (type []int) as type []uint in field value
so I changed the function SetIcon like so:
func (w *Window) SetIcon(icon image.Image) {
width := icon.Bounds().Max.X - icon.Bounds().Min.X
height := icon.Bounds().Max.Y - icon.Bounds().Min.Y
data := make([]uint, width*height)
for x := 0; x < width; x++ {
for y := 0; y < height; y++ {
i := x + y*width
c := icon.At(x, y)
r, g, b, a := c.RGBA()
data[i] = uint(a + r<<8 + g<<16 + b<<24)
}
}
wmicon := ewmh.WmIcon{
Width: uint(width),
Height: uint(height),
Data: data,
}
ewmh.WmIconSet(w.xu, w.win.Id, []ewmh.WmIcon{wmicon})
}
and it now builds and runs properly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.