This commit is contained in:
Andrew Gallant (Ocelot) 2012-05-12 21:36:31 -04:00
parent f77feff864
commit 24fef4062a
5 changed files with 29 additions and 7 deletions

View File

@ -1,9 +1,11 @@
// Copyright 2009 The XGB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package xgb package xgb
/*
auth.go contains functions to facilitate the parsing of .Xauthority files.
It is largely unmodified from the original XGB package that I forked.
*/
import ( import (
"bufio" "bufio"
"errors" "errors"

View File

@ -1,5 +1,12 @@
package xgb package xgb
/*
conn.go contains a couple of functions that do some real dirty work related
to the initial connection handshake with X.
This code is largely unmodified from the original XGB package that I forked.
*/
import ( import (
"errors" "errors"
"fmt" "fmt"

View File

@ -1,5 +1,15 @@
package xgb package xgb
/*
help.go is meant to contain a rough hodge podge of functions that are mainly
used in the auto generated code. Indeed, several functions here are simple
wrappers so that the sub-packages don't need to be smart about which stdlib
packages to import.
Also, the 'Get..' and 'Put..' functions are used through the core xgb package
too. (xgbutil uses them too.)
*/
import ( import (
"fmt" "fmt"
"strings" "strings"

View File

@ -1,6 +1,6 @@
package xgb package xgb
// Sync sends a round trip request and wait for the response. // Sync sends a round trip request and waits for the response.
// This forces all pending cookies to be dealt with. // This forces all pending cookies to be dealt with.
// You actually shouldn't need to use this like you might with Xlib. Namely, // You actually shouldn't need to use this like you might with Xlib. Namely,
// buffers are automatically flushed using Go's channels and round trip requests // buffers are automatically flushed using Go's channels and round trip requests

View File

@ -166,8 +166,11 @@ type eventOrError interface{}
// NewID generates a new unused ID for use with requests like CreateWindow. // NewID generates a new unused ID for use with requests like CreateWindow.
// If no new ids can be generated, the id returned is 0 and error is non-nil. // If no new ids can be generated, the id returned is 0 and error is non-nil.
// Note that the value returned will need to be converted to the proper // This shouldn't be used directly, and is exported for use in the extension
// type. i.e., xproto.Window(id). // sub-packages.
// If you need identifiers, use the appropriate constructor.
// e.g., For a window id, use xproto.NewWindowId. For
// a new pixmap id, use xproto.NewPixmapId. And so on.
func (c *Conn) NewId() (uint32, error) { func (c *Conn) NewId() (uint32, error) {
xid := <-c.xidChan xid := <-c.xidChan
if xid.err != nil { if xid.err != nil {