diff options
| author | Andrew Gallant (Ocelot) <[email protected]> | 2012-05-05 18:22:40 -0400 |
|---|---|---|
| committer | Andrew Gallant (Ocelot) <[email protected]> | 2012-05-05 18:22:40 -0400 |
| commit | 65ab69dd1e32e52fb075072df7d520229d643e0b (patch) | |
| tree | 47cfbe231c757f91bdc7c8e106906071a286550c /examples/seq-wrap.go | |
| parent | cc5573858c6d9b41609ed1ba334d37e77887b69e (diff) | |
examples. some should be tests
Diffstat (limited to 'examples/seq-wrap.go')
| -rw-r--r-- | examples/seq-wrap.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/seq-wrap.go b/examples/seq-wrap.go new file mode 100644 index 0000000..b5bc834 --- /dev/null +++ b/examples/seq-wrap.go @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + + "github.com/BurntSushi/xgb" +) + +func main() { + X, _ := xgb.NewConn() + + aname := "_NET_ACTIVE_WINDOW" + + for i := 1; i <= 1<<16 + 10; i++ { + atom, err := X.InternAtom(true, uint16(len(aname)), aname).Reply() + if err != nil { + fmt.Println(err) + } else { + fmt.Printf("%d. Sequence: %d, Atom: %d\n", + i, atom.Sequence, atom.Atom) + } + } +} + |
