Git Product home page Git Product logo

go.uik's Introduction

This project is closed. If I begin again, it will be from scratch and using lessons learned while writing go.uik. Of course, if I begin again it will still be called go.uik.

#go.uik

A concurrent UI kit written in pure go.

This project is in its infancy. Feel free to experiment, but don't expect too much yet.

There is a google group dedicated to this project.


###A concurrent UI kit

Every component visible on the screen is backed by a Block. Every collection of components is backed by a Foundation. All Blocks are built upon a Foundation, but a Foundation itself is made up of a Block, which must itself be laid upon a Foundation. The only exception to this rule is the WindowFoundation.

All communication between Foundations, Blocks and the widgets and layouts composed of them is done via non-blocking channel communication.

While this is a break from the typical polymorphism approach, the result is that a component that stalls while processing input cannot get in the way of other components.

go.uik's People

Contributors

ajstarks avatar olreich avatar samnardoni avatar sebastianskejoe avatar skelterjohn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go.uik's Issues

go get fails

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)

widgettut.md: panic: no wde backend imported

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?

xgb backend problem

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.

compiling on windows

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.