all tasks

This commit is contained in:
Ingy döt Net 2013-04-11 01:07:29 -07:00
parent b83f433714
commit 68f8f3e56b
14735 changed files with 178959 additions and 0 deletions

View file

@ -0,0 +1,14 @@
package main
import "gtk"
func main() {
gtk.Init(nil)
window := gtk.Window(gtk.GTK_WINDOW_TOPLEVEL)
window.Connect("destroy", func(*gtk.CallbackContext) {
gtk.MainQuit()
},
"")
window.Show()
gtk.Main()
}

View file

@ -0,0 +1,22 @@
package main
import (
"sdl"
"fmt"
)
func main() {
if sdl.Init(sdl.INIT_VIDEO) != 0 {
fmt.Println(sdl.GetError())
return
}
defer sdl.Quit()
if sdl.SetVideoMode(200, 200, 32, 0) == nil {
fmt.Println(sdl.GetError())
return
}
for e := new(sdl.Event); e.Wait() && e.Type != sdl.QUIT; {
}
}

View file

@ -0,0 +1,26 @@
package main
import (
"code.google.com/p/x-go-binding/ui"
"code.google.com/p/x-go-binding/ui/x11"
"fmt"
"os"
)
func main() {
win, err := x11.NewWindow()
if err != nil {
fmt.Printf("Error: %v\n", err)
os.Exit(1)
}
defer win.Close()
evchan := win.EventChan()
for ev := range evchan {
switch e := ev.(type) {
case ui.ErrEvent:
fmt.Printf("Error: %v\n", e.Err)
os.Exit(1)
}
}
}