aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xinerama/xinerama.go
diff options
context:
space:
mode:
Diffstat (limited to 'nexgb/xinerama/xinerama.go')
-rw-r--r--nexgb/xinerama/xinerama.go36
1 files changed, 15 insertions, 21 deletions
diff --git a/nexgb/xinerama/xinerama.go b/nexgb/xinerama/xinerama.go
index 31b9f8d..12902a8 100644
--- a/nexgb/xinerama/xinerama.go
+++ b/nexgb/xinerama/xinerama.go
@@ -139,7 +139,7 @@ type GetScreenCountCookie struct {
}
// GetScreenCount sends a checked request.
-// If an error occurs, it will be returned with the reply by calling GetScreenCountCookie.Reply()
+// If an error occurs, it will be returned with the reply by calling GetScreenCountCookie.Reply.
func GetScreenCount(c *xgb.Conn, Window xproto.Window) GetScreenCountCookie {
c.ExtLock.RLock()
defer c.ExtLock.RUnlock()
@@ -204,8 +204,7 @@ func getScreenCountReply(buf []byte) *GetScreenCountReply {
return v
}
-// Write request to wire for GetScreenCount
-// getScreenCountRequest writes a GetScreenCount request to a byte slice.
+// getScreenCountRequest writes a GetScreenCount request to a byte slice for transfer.
func getScreenCountRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -234,7 +233,7 @@ type GetScreenSizeCookie struct {
}
// GetScreenSize sends a checked request.
-// If an error occurs, it will be returned with the reply by calling GetScreenSizeCookie.Reply()
+// If an error occurs, it will be returned with the reply by calling GetScreenSizeCookie.Reply.
func GetScreenSize(c *xgb.Conn, Window xproto.Window, Screen uint32) GetScreenSizeCookie {
c.ExtLock.RLock()
defer c.ExtLock.RUnlock()
@@ -310,8 +309,7 @@ func getScreenSizeReply(buf []byte) *GetScreenSizeReply {
return v
}
-// Write request to wire for GetScreenSize
-// getScreenSizeRequest writes a GetScreenSize request to a byte slice.
+// getScreenSizeRequest writes a GetScreenSize request to a byte slice for transfer.
func getScreenSizeRequest(c *xgb.Conn, Window xproto.Window, Screen uint32) []byte {
size := 12
b := 0
@@ -343,7 +341,7 @@ type GetStateCookie struct {
}
// GetState sends a checked request.
-// If an error occurs, it will be returned with the reply by calling GetStateCookie.Reply()
+// If an error occurs, it will be returned with the reply by calling GetStateCookie.Reply.
func GetState(c *xgb.Conn, Window xproto.Window) GetStateCookie {
c.ExtLock.RLock()
defer c.ExtLock.RUnlock()
@@ -408,8 +406,7 @@ func getStateReply(buf []byte) *GetStateReply {
return v
}
-// Write request to wire for GetState
-// getStateRequest writes a GetState request to a byte slice.
+// getStateRequest writes a GetState request to a byte slice for transfer.
func getStateRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -438,7 +435,7 @@ type IsActiveCookie struct {
}
// IsActive sends a checked request.
-// If an error occurs, it will be returned with the reply by calling IsActiveCookie.Reply()
+// If an error occurs, it will be returned with the reply by calling IsActiveCookie.Reply.
func IsActive(c *xgb.Conn) IsActiveCookie {
c.ExtLock.RLock()
defer c.ExtLock.RUnlock()
@@ -502,8 +499,7 @@ func isActiveReply(buf []byte) *IsActiveReply {
return v
}
-// Write request to wire for IsActive
-// isActiveRequest writes a IsActive request to a byte slice.
+// isActiveRequest writes a IsActive request to a byte slice for transfer.
func isActiveRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -529,7 +525,7 @@ type QueryScreensCookie struct {
}
// QueryScreens sends a checked request.
-// If an error occurs, it will be returned with the reply by calling QueryScreensCookie.Reply()
+// If an error occurs, it will be returned with the reply by calling QueryScreensCookie.Reply.
func QueryScreens(c *xgb.Conn) QueryScreensCookie {
c.ExtLock.RLock()
defer c.ExtLock.RUnlock()
@@ -600,8 +596,7 @@ func queryScreensReply(buf []byte) *QueryScreensReply {
return v
}
-// Write request to wire for QueryScreens
-// queryScreensRequest writes a QueryScreens request to a byte slice.
+// queryScreensRequest writes a QueryScreens request to a byte slice for transfer.
func queryScreensRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -627,8 +622,8 @@ type QueryVersionCookie struct {
}
// 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, Major byte, Minor byte) QueryVersionCookie {
+// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply.
+func QueryVersion(c *xgb.Conn, Major, Minor byte) QueryVersionCookie {
c.ExtLock.RLock()
defer c.ExtLock.RUnlock()
if _, ok := c.Extensions["XINERAMA"]; !ok {
@@ -641,7 +636,7 @@ func QueryVersion(c *xgb.Conn, Major byte, Minor byte) QueryVersionCookie {
// 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, Major byte, Minor byte) QueryVersionCookie {
+func QueryVersionUnchecked(c *xgb.Conn, Major, Minor byte) QueryVersionCookie {
c.ExtLock.RLock()
defer c.ExtLock.RUnlock()
if _, ok := c.Extensions["XINERAMA"]; !ok {
@@ -695,9 +690,8 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
return v
}
-// Write request to wire for QueryVersion
-// queryVersionRequest writes a QueryVersion request to a byte slice.
-func queryVersionRequest(c *xgb.Conn, Major byte, Minor byte) []byte {
+// queryVersionRequest writes a QueryVersion request to a byte slice for transfer.
+func queryVersionRequest(c *xgb.Conn, Major, Minor byte) []byte {
size := 8
b := 0
buf := make([]byte, size)