aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xevie
diff options
context:
space:
mode:
authorAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-10 23:57:34 -0400
committerAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-10 23:57:34 -0400
commitc00652934e4ec68016a152b9bea10273b0be8726 (patch)
tree069dc287fa76dcec2d6240e1afdfe5652118a88a /nexgb/xevie
parenta3363755cdfdafdf02d5a772bd47a462e99af057 (diff)
downloadhaven-c00652934e4ec68016a152b9bea10273b0be8726.tar.gz
haven-c00652934e4ec68016a152b9bea10273b0be8726.tar.xz
haven-c00652934e4ec68016a152b9bea10273b0be8726.zip
better docs
Diffstat (limited to 'nexgb/xevie')
-rw-r--r--nexgb/xevie/xevie.go127
1 files changed, 70 insertions, 57 deletions
diff --git a/nexgb/xevie/xevie.go b/nexgb/xevie/xevie.go
index 47d9146..3076680 100644
--- a/nexgb/xevie/xevie.go
+++ b/nexgb/xevie/xevie.go
@@ -2,7 +2,7 @@
package xevie
/*
- This file was generated by xevie.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by xevie.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,16 +40,6 @@ func init() {
xgb.NewExtErrorFuncs["XEVIE"] = 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'
-
-// Skipping definition for base type 'Byte'
-
// Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16'
@@ -64,18 +54,26 @@ func init() {
// Skipping definition for base type 'Float'
+// Skipping definition for base type 'Card8'
+
+// Skipping definition for base type 'Int16'
+
+// Skipping definition for base type 'Int32'
+
+// Skipping definition for base type 'Void'
+
+// Skipping definition for base type 'Byte'
+
const (
DatatypeUnmodified = 0
DatatypeModified = 1
)
-// 'Event' struct definition
-// Size: 32
type Event struct {
// padding: 32 bytes
}
-// Struct read Event
+// EventRead reads a byte slice into a Event value.
func EventRead(buf []byte, v *Event) int {
b := 0
@@ -84,7 +82,7 @@ func EventRead(buf []byte, v *Event) int {
return b
}
-// Struct list read Event
+// EventReadList reads a byte slice into a list of Event values.
func EventReadList(buf []byte, dest []Event) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -94,7 +92,7 @@ func EventReadList(buf []byte, dest []Event) int {
return xgb.Pad(b)
}
-// Struct write Event
+// Bytes writes a Event value to a byte slice.
func (v Event) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -104,7 +102,7 @@ func (v Event) Bytes() []byte {
return buf
}
-// Write struct list Event
+// EventListBytes writes a list of %s(MISSING) values to a byte slice.
func EventListBytes(buf []byte, list []Event) int {
b := 0
var structBytes []byte
@@ -116,36 +114,38 @@ func EventListBytes(buf []byte, list []Event) int {
return b
}
-// Request QueryVersion
-// size: 8
+// 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
ServerMajorVersion uint16
ServerMinorVersion 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 {
@@ -157,7 +157,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
@@ -182,6 +182,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
@@ -205,34 +206,36 @@ func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVers
return buf
}
-// Request Start
-// size: 8
+// StartCookie is a cookie used only for Start requests.
type StartCookie struct {
*xgb.Cookie
}
+// Start sends a checked request.
+// If an error occurs, it will be returned with the reply by calling StartCookie.Reply()
func Start(c *xgb.Conn, Screen uint32) StartCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(startRequest(c, Screen), cookie)
return StartCookie{cookie}
}
+// StartUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func StartUnchecked(c *xgb.Conn, Screen uint32) StartCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(startRequest(c, Screen), cookie)
return StartCookie{cookie}
}
-// Request reply for Start
-// size: 32
+// StartReply represents the data returned from a Start request.
type StartReply 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
// padding: 24 bytes
}
-// Waits and reads reply data from request Start
+// Reply blocks and returns the reply data for a Start request.
func (cook StartCookie) Reply() (*StartReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -244,7 +247,7 @@ func (cook StartCookie) Reply() (*StartReply, error) {
return startReply(buf), nil
}
-// Read reply into structure from buffer for Start
+// startReply reads a byte slice into a StartReply value.
func startReply(buf []byte) *StartReply {
v := new(StartReply)
b := 1 // skip reply determinant
@@ -263,6 +266,7 @@ func startReply(buf []byte) *StartReply {
}
// Write request to wire for Start
+// startRequest writes a Start request to a byte slice.
func startRequest(c *xgb.Conn, Screen uint32) []byte {
size := 8
b := 0
@@ -283,34 +287,36 @@ func startRequest(c *xgb.Conn, Screen uint32) []byte {
return buf
}
-// Request End
-// size: 8
+// EndCookie is a cookie used only for End requests.
type EndCookie struct {
*xgb.Cookie
}
+// End sends a checked request.
+// If an error occurs, it will be returned with the reply by calling EndCookie.Reply()
func End(c *xgb.Conn, Cmap uint32) EndCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(endRequest(c, Cmap), cookie)
return EndCookie{cookie}
}
+// EndUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func EndUnchecked(c *xgb.Conn, Cmap uint32) EndCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(endRequest(c, Cmap), cookie)
return EndCookie{cookie}
}
-// Request reply for End
-// size: 32
+// EndReply represents the data returned from a End request.
type EndReply 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
// padding: 24 bytes
}
-// Waits and reads reply data from request End
+// Reply blocks and returns the reply data for a End request.
func (cook EndCookie) Reply() (*EndReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -322,7 +328,7 @@ func (cook EndCookie) Reply() (*EndReply, error) {
return endReply(buf), nil
}
-// Read reply into structure from buffer for End
+// endReply reads a byte slice into a EndReply value.
func endReply(buf []byte) *EndReply {
v := new(EndReply)
b := 1 // skip reply determinant
@@ -341,6 +347,7 @@ func endReply(buf []byte) *EndReply {
}
// Write request to wire for End
+// endRequest writes a End request to a byte slice.
func endRequest(c *xgb.Conn, Cmap uint32) []byte {
size := 8
b := 0
@@ -361,34 +368,36 @@ func endRequest(c *xgb.Conn, Cmap uint32) []byte {
return buf
}
-// Request Send
-// size: 104
+// SendCookie is a cookie used only for Send requests.
type SendCookie struct {
*xgb.Cookie
}
+// Send sends a checked request.
+// If an error occurs, it will be returned with the reply by calling SendCookie.Reply()
func Send(c *xgb.Conn, Event Event, DataType uint32) SendCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(sendRequest(c, Event, DataType), cookie)
return SendCookie{cookie}
}
+// SendUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SendUnchecked(c *xgb.Conn, Event Event, DataType uint32) SendCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(sendRequest(c, Event, DataType), cookie)
return SendCookie{cookie}
}
-// Request reply for Send
-// size: 32
+// SendReply represents the data returned from a Send request.
type SendReply 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
// padding: 24 bytes
}
-// Waits and reads reply data from request Send
+// Reply blocks and returns the reply data for a Send request.
func (cook SendCookie) Reply() (*SendReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -400,7 +409,7 @@ func (cook SendCookie) Reply() (*SendReply, error) {
return sendReply(buf), nil
}
-// Read reply into structure from buffer for Send
+// sendReply reads a byte slice into a SendReply value.
func sendReply(buf []byte) *SendReply {
v := new(SendReply)
b := 1 // skip reply determinant
@@ -419,6 +428,7 @@ func sendReply(buf []byte) *SendReply {
}
// Write request to wire for Send
+// sendRequest writes a Send request to a byte slice.
func sendRequest(c *xgb.Conn, Event Event, DataType uint32) []byte {
size := 104
b := 0
@@ -447,34 +457,36 @@ func sendRequest(c *xgb.Conn, Event Event, DataType uint32) []byte {
return buf
}
-// Request SelectInput
-// size: 8
+// SelectInputCookie is a cookie used only for SelectInput requests.
type SelectInputCookie struct {
*xgb.Cookie
}
+// SelectInput sends a checked request.
+// If an error occurs, it will be returned with the reply by calling SelectInputCookie.Reply()
func SelectInput(c *xgb.Conn, EventMask uint32) SelectInputCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(selectInputRequest(c, EventMask), cookie)
return SelectInputCookie{cookie}
}
+// SelectInputUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SelectInputUnchecked(c *xgb.Conn, EventMask uint32) SelectInputCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(selectInputRequest(c, EventMask), cookie)
return SelectInputCookie{cookie}
}
-// Request reply for SelectInput
-// size: 32
+// SelectInputReply represents the data returned from a SelectInput request.
type SelectInputReply 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
// padding: 24 bytes
}
-// Waits and reads reply data from request SelectInput
+// Reply blocks and returns the reply data for a SelectInput request.
func (cook SelectInputCookie) Reply() (*SelectInputReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -486,7 +498,7 @@ func (cook SelectInputCookie) Reply() (*SelectInputReply, error) {
return selectInputReply(buf), nil
}
-// Read reply into structure from buffer for SelectInput
+// selectInputReply reads a byte slice into a SelectInputReply value.
func selectInputReply(buf []byte) *SelectInputReply {
v := new(SelectInputReply)
b := 1 // skip reply determinant
@@ -505,6 +517,7 @@ func selectInputReply(buf []byte) *SelectInputReply {
}
// Write request to wire for SelectInput
+// selectInputRequest writes a SelectInput request to a byte slice.
func selectInputRequest(c *xgb.Conn, EventMask uint32) []byte {
size := 8
b := 0