aboutsummaryrefslogtreecommitdiff
path: root/nexgb/examples/seq-wrap.go
diff options
context:
space:
mode:
authorAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-05 18:22:40 -0400
committerAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-05 18:22:40 -0400
commit99bc76de54729df5494faa944d4da96a8885d51e (patch)
treea855999db11daed23007aaab866e273ffd275b86 /nexgb/examples/seq-wrap.go
parent369ad0d33e51035a3e48436fc85f60130b201437 (diff)
downloadhaven-99bc76de54729df5494faa944d4da96a8885d51e.tar.gz
haven-99bc76de54729df5494faa944d4da96a8885d51e.tar.xz
haven-99bc76de54729df5494faa944d4da96a8885d51e.zip
examples. some should be tests
Diffstat (limited to 'nexgb/examples/seq-wrap.go')
-rw-r--r--nexgb/examples/seq-wrap.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/nexgb/examples/seq-wrap.go b/nexgb/examples/seq-wrap.go
new file mode 100644
index 0000000..b5bc834
--- /dev/null
+++ b/nexgb/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)
+ }
+ }
+}
+