better docs
This commit is contained in:
		@@ -2,7 +2,7 @@
 | 
			
		||||
package ge
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
	This file was generated by ge.xml on May 10 2012 8:04:31pm EDT.
 | 
			
		||||
	This file was generated by ge.xml on May 10 2012 11:56:18pm EDT.
 | 
			
		||||
	This file is automatically generated. Edit at your peril!
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
@@ -40,10 +40,6 @@ func init() {
 | 
			
		||||
	xgb.NewExtErrorFuncs["Generic Event Extension"] = make(map[int]xgb.NewErrorFun)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Skipping definition for base type 'Card8'
 | 
			
		||||
 | 
			
		||||
// Skipping definition for base type 'Int16'
 | 
			
		||||
 | 
			
		||||
// Skipping definition for base type 'Int32'
 | 
			
		||||
 | 
			
		||||
// Skipping definition for base type 'Void'
 | 
			
		||||
@@ -64,36 +60,42 @@ func init() {
 | 
			
		||||
 | 
			
		||||
// Skipping definition for base type 'Float'
 | 
			
		||||
 | 
			
		||||
// Request QueryVersion
 | 
			
		||||
// size: 8
 | 
			
		||||
// Skipping definition for base type 'Card8'
 | 
			
		||||
 | 
			
		||||
// Skipping definition for base type 'Int16'
 | 
			
		||||
 | 
			
		||||
// QueryVersionCookie is a cookie used only for QueryVersion requests.
 | 
			
		||||
type QueryVersionCookie struct {
 | 
			
		||||
	*xgb.Cookie
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// QueryVersion sends a checked request.
 | 
			
		||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
 | 
			
		||||
func QueryVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) QueryVersionCookie {
 | 
			
		||||
	cookie := c.NewCookie(true, true)
 | 
			
		||||
	c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
 | 
			
		||||
	return QueryVersionCookie{cookie}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// QueryVersionUnchecked sends an unchecked request.
 | 
			
		||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
 | 
			
		||||
func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) QueryVersionCookie {
 | 
			
		||||
	cookie := c.NewCookie(false, true)
 | 
			
		||||
	c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
 | 
			
		||||
	return QueryVersionCookie{cookie}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Request reply for QueryVersion
 | 
			
		||||
// size: 32
 | 
			
		||||
// QueryVersionReply represents the data returned from a QueryVersion request.
 | 
			
		||||
type QueryVersionReply struct {
 | 
			
		||||
	Sequence uint16
 | 
			
		||||
	Length   uint32
 | 
			
		||||
	Sequence uint16 // sequence number of the request for this reply
 | 
			
		||||
	Length   uint32 // number of bytes in this reply
 | 
			
		||||
	// padding: 1 bytes
 | 
			
		||||
	MajorVersion uint16
 | 
			
		||||
	MinorVersion uint16
 | 
			
		||||
	// padding: 20 bytes
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Waits and reads reply data from request QueryVersion
 | 
			
		||||
// Reply blocks and returns the reply data for a QueryVersion request.
 | 
			
		||||
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
 | 
			
		||||
	buf, err := cook.Cookie.Reply()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
@@ -105,7 +107,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
 | 
			
		||||
	return queryVersionReply(buf), nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Read reply into structure from buffer for QueryVersion
 | 
			
		||||
// queryVersionReply reads a byte slice into a QueryVersionReply value.
 | 
			
		||||
func queryVersionReply(buf []byte) *QueryVersionReply {
 | 
			
		||||
	v := new(QueryVersionReply)
 | 
			
		||||
	b := 1 // skip reply determinant
 | 
			
		||||
@@ -130,6 +132,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Write request to wire for QueryVersion
 | 
			
		||||
// queryVersionRequest writes a QueryVersion request to a byte slice.
 | 
			
		||||
func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) []byte {
 | 
			
		||||
	size := 8
 | 
			
		||||
	b := 0
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user