diff options
Diffstat (limited to 'nexgb/examples/atom.go')
-rw-r--r-- | nexgb/examples/atom.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/nexgb/examples/atom.go b/nexgb/examples/atom.go new file mode 100644 index 0000000..c64acee --- /dev/null +++ b/nexgb/examples/atom.go @@ -0,0 +1,27 @@ +package main + +import ( + // "fmt" + "log" + + "github.com/BurntSushi/xgb" +) + +func init() { + log.SetFlags(0) +} + +func main() { + X, err := xgb.NewConn() + if err != nil { + log.Fatal(err) + } + + aname := "_NET_ACTIVE_WINDOW" + atom, err := X.InternAtom(true, uint16(len(aname)), aname) + if err != nil { + log.Fatal(err) + } + log.Printf("%d", atom.Atom) +} + |